Video playing method, related equipment and video playing system
By clicking the chapter information on long videos to generate short video URLs, and pre-cache the next short video when playing a short video, the problem of how operators can use long video content to provide a short video immersive playback experience, achieving the effect of reducing operational costs and improving user experience.
Patent Information
- Application Number
- CN202311612893.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2025-05-30
AI Technical Summary
How operators can use massive long video content to provide immersive playback experience of short videos, attract the attention of end users, and reduce the operating costs of video platforms and content distribution networks.
By clicking on chapter information on long videos, generating URLs for multiple short videos, and pre-caches the next short video when playing a short video, thereby reducing network overhead and storage management, and achieving automatic resumption effect.
It realizes video playback without expanding content distribution network equipment, reduces operational costs and improves user viewing experience.
Smart Images

Figure CN120075555A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video, and in particular to a video playing method, related devices and a video playing system. Background Art
[0002] The rise of Internet short video platforms has provided target users with a new and more immersive video experience. The duration of short videos is generally less than 15 minutes, which is suitable for watching during fragmented time. When a target user plays a short video, when one video finishes playing, the next video will be automatically played; it also supports swiping to view (or sliding to view), and the target user can swipe past the content that they are not interested in and enter the next content for playback.
[0003] There is a large amount of long video content in current operator's Internet TV systems and OTT systems, such as movies, TV series, variety shows, documentaries, etc. The duration of long video content is generally not less than 15 minutes, and it requires target users to have relatively concentrated time to watch. Of course, if there is no time to finish watching, functions such as collection and bookmarks can also be used to meet the requirement for target users to continue watching next time after exiting.
[0004] Short video functions are generally provided in Internet video platforms, providing an automatic continuous playback experience of short videos similar to Douyin. How operators make good use of the existing massive long video content to provide an immersive playback experience of short videos, attract the attention of terminal target users, better serve terminal target users, and also obtain more traffic for operators is an urgent problem for operators to solve.
[0005] One solution is: the content provider (CP) or a third-party system splits the existing long video content of the operator into several short video contents, and then injects the short video contents into the video platform; arranges the short video contents and provides a short video playlist for continuous playback by the terminal. At the same time, an association is established between the short video content and the original long video content, so that when the target user plays the short video content through the terminal device, the target user can be prompted to watch the complete full-length film. This method manages and operates the short video content as independent content. This solution of splitting long videos into short videos and injecting them into the video platform will cause a sharp increase in the number of short video content metadata / media files in the video platform, and the content scale will expand rapidly. Often, the video platform and content delivery network (CDN) devices need to be expanded, increasing the cost. Summary of the Invention
[0006] Embodiments of this application provide a video playing method, related devices and a video playing system. Using the embodiments of this application does not require the expansion of CDN devices, reducing the operating cost.
[0007] In a first aspect, an embodiment of the present application provides a video playback method. This method can be applied to a terminal device.
[0008] The terminal device simultaneously obtains the uniform resource locators (URLs) of multiple second videos based on the chapter information of the first video. The chapter information of the first video is determined by marking the first video; the terminal device obtains the shards of the second video A from the CDN device according to the URL of the second video A; the terminal device plays the second video A, and before playing the content of the preset duration of the second video A, obtains the shards of the second video B from the CDN device based on the URL of the second video B, where the preset duration is less than or equal to the duration of the second video A, and the second video A and the second video B are any two of the multiple second videos.
[0009] It can be seen that when obtaining the URLs of the second videos, the URLs of multiple second videos are obtained at one time instead of one by one, which can reduce the network overhead between the terminal device and the platform. When playing the second video A, the second video B is cached, so that when the target user switches the video, the terminal device can directly play the second video B without waiting, improving the viewing experience of the target user. And the solution of this embodiment does not divide the first video into multiple second videos, but operates based on the chapter information of the first video. Therefore, it is not necessary to manage the second videos, thereby reducing the storage overhead and operating costs.
[0010] Wherein, the target user is the owner or user of the terminal device.
[0011] In combination with the first aspect, in a possible implementation manner, the URL of the second video A includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times and the mode identifier of the second video A. The start and end times of the second video A are the start and end times of the second video A in the first video. The ciphertext part is obtained by encrypting the start and end times and the mode identifier of the second video A. The mode identifier is used to indicate that the playback mode of the first short video is the sliding view mode, and the duration of the second video is not greater than the duration of the first video A.
[0012] By introducing the plaintext part and the ciphertext part into the URL, it is possible to verify the URL based on the plaintext part and the ciphertext part to determine whether the URL has been tampered with, thereby ensuring data security.
[0013] In combination with the first aspect, in a possible implementation manner, the method of this embodiment further includes:
[0014] The terminal device determines the duration of the second video A according to the shards of the second video A;
[0015] Or,
[0016] The terminal device determines the duration of the second video A according to the duration parameter of the second video. The duration parameter is fed back to the terminal device simultaneously when the CDN device feeds back the shards of the second video A to the terminal device. For example, the duration parameter is carried in the message that feeds back the shards of the second video A to the terminal device. In this way, it is not necessary for the terminal device to determine the duration of the second video A based on the shards of the second video A, and the duration of the second video A can be directly determined based on the duration parameter, reducing the workload of the terminal device.
[0017] Combined with the first aspect, in a possible implementation, when playing the second video A, the terminal device displays a progress bar of the second video A, and the progress bar of the second video is used to identify the duration of the second video A.
[0018] By displaying the progress bar of the second video A when playing the second video A, the user can know the duration of the second video A.
[0019] In a second aspect, an embodiment of the present application provides another video playing method. This method can be applied to a CDN device.
[0020] The CDN device receives a video acquisition request from the terminal device. The video acquisition request includes the URL of the second video; the video acquisition request is used to request the acquisition of the second video; the URL of the second video includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times and the mode identifier of the second video. The start and end times of the second video are the start and end times of the second video in the first video. The ciphertext part is obtained by encrypting the start and end times and the mode identifier of the second video. The mode identifier is used to indicate that the playing mode of the first short video is the sliding viewing mode, and the duration of the first video is greater than or equal to the duration of the second video; the CDN device sends a response message to the terminal device based on the plaintext part and the ciphertext part, and the response message is used to respond to the video acquisition request.
[0021] It can be seen that in the solution of this embodiment, instead of dividing the first video into multiple second videos, that is, instead of dividing a long video into multiple short videos, operations are performed based on the chapter information of the first video. Therefore, it is not necessary to manage the second videos, thereby reducing the storage overhead and operating costs. By introducing the plaintext part and the ciphertext part in the URL and verifying the plaintext part through the ciphertext part to determine whether the URL has been tampered with, the security of video data is guaranteed. When feeding back the shards of the video, the duration parameter is fed back simultaneously, and the terminal device can determine the duration of the second video based on the duration parameter, reducing the workload of the terminal device.
[0022] In combination with the second aspect, in a possible implementation, when the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, or when the mode identifier in the plaintext part is the same as that in the ciphertext part, or when the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part and the mode identifier in the plaintext part is the same as that in the ciphertext part, the CDN device determines that the URL of the second video has not been tampered with, and the response message fed back by the CDN device to the terminal device includes the shards of the second video.
[0023] By verifying the URL of the second video based on the start and end times and / or mode identifier of the second video in the plaintext part of the second video URL and the start and end times and / or mode identifier of the second video in the ciphertext part, it is possible to determine whether the URL of the second video has been tampered with, thus ensuring data security.
[0024] In combination with the second aspect, in a possible implementation, the CDN device sends a response message to the terminal device based on the plaintext part and the ciphertext part, including:
[0025] The CDN device parses the plaintext part to determine whether the plaintext part includes a mode identifier; if the plaintext part includes a mode identifier, the CDN device determines whether the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and whether the mode identifier in the plaintext part is the same as that in the ciphertext part; if the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and the mode identifier in the plaintext part is the same as that in the ciphertext part, the CDN device determines that the URL of the second video has not been tampered with, and the response message fed back by the CDN device to the terminal device includes the shards of the second video.
[0026] By verifying the URL of the second video based on the start and end times and mode identifier of the second video in the plaintext part of the second video URL and the start and end times and mode identifier of the second video in the ciphertext part, it is possible to determine whether the URL of the second video has been tampered with, and it is possible to ensure the accuracy of the result of determining whether the URL of the second video has been tampered with, improving the guarantee of data security.
[0027] In combination with the second aspect, in a possible implementation, the response message further includes a duration parameter of the second video, and the duration parameter is used to indicate the duration of the second video. In this way, the terminal device can determine the duration of the second video based on the duration parameter, without the need to obtain the duration of the second video based on other methods, reducing the workload of the terminal device.
[0028] In a third aspect, an embodiment of the present application provides another video playing method. This method should be applicable to a video service platform (VSP) device.
[0029] The VSP device receives the chapter information of a first video from a terminal device; wherein, the chapter information of the first video includes the start and end times of one or more second videos; the VSP device generates URLs of one or more second videos according to the chapter information of the first video and the media file information. The URL of the second video includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times of the second video and a mode identifier. The start and end times of the second video are the start and end times of the second video in the first video. The ciphertext part is obtained by encrypting the start and end times of the second video and the mode identifier. The mode identifier is used to indicate that the playing mode of the first short video is the swiping view mode. The duration of the first video is greater than or equal to the duration of the second video; the VSP device sends the URLs of one or more second videos to the terminal device.
[0030] It can be seen that in the solution of this embodiment, instead of dividing the first video into multiple second videos, that is, instead of dividing a long video into multiple short videos, operations are performed based on the chapter information of the first video. Therefore, there is no need to manage the second videos, thus reducing the storage overhead and operating costs.
[0031] In combination with the third aspect, in a possible implementation manner, the method of this embodiment further includes:
[0032] The VSP device receives a URL acquisition request from the terminal device. The URL acquisition request includes the identifier of the first video; this URL acquisition request is used to request the acquisition of the URL of the first video; the VSP device generates the URL of the first video based on the content information of the first video and the media file information corresponding to the first video, and the VSP device sends a response message carrying the URL of the first video for responding to the second URL acquisition request to the terminal device.
[0033] In combination with the third aspect, in a possible implementation manner, the method of this embodiment further includes:
[0034] Obtain the authentication information of the target user; determine whether the target user has the permission to watch the second video based on the authentication information of the target user; when it is determined that the target user has the permission to watch the second video, perform the operation of generating the URL of the second video.
[0035] By verifying the permissions of the target user before generating the URL and only generating the URL and sending it to the terminal device after the verification passes, the security of the data is ensured.
[0036] Fourth aspect, an embodiment of the present application provides a terminal device, including units or modules for implementing the method provided in the first aspect or any possible implementation manner of the first aspect.
[0037] Fifth aspect, an embodiment of the present application provides a CDN device, including units or modules for implementing the method provided in the second aspect or any possible implementation manner of the second aspect.
[0038] Sixth aspect, an embodiment of the present application provides a VSP device, including units or modules for implementing the method provided in the third aspect or any possible implementation manner of the third aspect.
[0039] Seventh aspect, an embodiment of the present application provides a terminal device, including a processor and a memory. The memory is used to store program codes. The processor is used to call the program codes stored in the memory to execute the method provided in the first aspect or any possible implementation manner of the first aspect.
[0040] Eighth aspect, an embodiment of the present application provides a CDN device, including a processor and a memory. The memory is used to store program codes. The processor is used to call the program codes stored in the memory to execute the method provided in the second aspect or any possible implementation manner of the second aspect.
[0041] Ninth aspect, an embodiment of the present application provides a VSP device, including a processor and a memory. The memory is used to store program codes. The processor is used to call the program codes stored in the memory to execute the method provided in the third aspect or any possible implementation manner of the third aspect.
[0042] Tenth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions run on an electronic device, the electronic device is enabled to execute the method provided in any possible implementation manner of the first aspect, or the method provided in any possible implementation manner of the second aspect, or the method provided in any possible implementation manner of the third aspect.
[0043] Eleventh aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the method provided in any possible implementation manner of the first aspect, or the method provided in any possible implementation manner of the second aspect, or the method provided in any possible implementation manner of the third aspect.
[0044] Twelfth aspect, an embodiment of the present application further provides a video playing method. The method is applied to a video playing system, and the video playing system includes a terminal device, a CP device, a VSP device, and a CDN device. The method includes:
[0045] The terminal device obtains the chapter information of the first video from the CP device; the terminal device sends the chapter information of the first video to the VSP device; the VSP device simultaneously sends the URLs of multiple second videos to the terminal device based on the chapter information of the first video; the terminal device sends the URL of the second video A to the CDN device; the CDN device sends the shards of the second video A to the terminal device based on the URL of the second video A; the terminal device plays the second video A, and before playing the content of the preset duration of the second video A, obtains the shards of the second video B from the CDN device based on the URL of the second video B, where the preset duration is less than or equal to the duration of the second video A; the second video A and the second video B are any two of the multiple second videos.
[0046] In a thirteenth aspect, an embodiment of the present application further provides a video playback system, which includes a terminal device, a CP device, a VSP device, and a CDN device.
[0047] The terminal device is used to obtain the chapter information of the first video from the CP device;
[0048] The terminal device is used to send the chapter information of the first video to the VSP device;
[0049] The VSP device is used to simultaneously send the URLs of multiple second videos to the terminal device based on the chapter information of the first video;
[0050] The terminal device is used to send the URL of the second video A to the CDN device;
[0051] The CDN device is used to send the shards of the second video A to the terminal device based on the URL of the second video A;
[0052] The terminal device is used to play the second video A, and before playing the content of the preset duration of the second video A, obtains the shards of the second video B from the CDN device based on the URL of the second video B, where the preset duration is less than or equal to the duration of the second video A; the second video A and the second video B are any two of the multiple second videos.
[0053] It can be understood that the beneficial effects of the embodiments described in the fourth aspect to the thirteenth aspect can refer to the beneficial effects in the methods described in the first aspect to the third aspect, which will not be elaborated here. Description of the Drawings
[0054] Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0055] Figure 2 It is a schematic flowchart of a video playback method provided by an embodiment of the present application;
[0056] Figure 2a It is a schematic diagram of a progress bar;
[0057] Figure 3 It is a schematic flowchart of another video playing method provided by an embodiment of the present application;
[0058] Figure 4 It is a schematic flowchart of another video playing method provided by an embodiment of the present application;
[0059] Figure 5 It is an interactive flowchart of a video playing method provided by an embodiment of the present application;
[0060] Figure 6 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application;
[0061] Figure 7 It is a schematic diagram of the structure of a CDN device provided by an embodiment of the present application;
[0062] Figure 8 It is a schematic diagram of the structure of a VSP device provided by an embodiment of the present application;
[0063] Figure 9 It is a schematic diagram of the structure of another terminal device provided by an embodiment of the present application;
[0064] Figure 10 It is a schematic diagram of the structure of another CDN device provided by an embodiment of the present application;
[0065] Figure 11 It is a schematic diagram of the structure of another VSP device provided by an embodiment of the present application. Detailed implementation manners
[0066] Terms such as "first", "second", "third", and "fourth" in the description and claims of the present application and the accompanying drawings are used to distinguish different objects, rather than to describe a specific order.
[0067] "Plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates three relationships. For example, A and / or B means: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates an "or" relationship between the associated objects before and after.
[0068] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0069] See Figure 1 , Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of the present application. As Figure 1 shown, the system includes: a CP device, a VSP device, a CDN device, and a terminal device.
[0070] Among them, the CP device is the server of a third-party content provider, which is used to provide the first video. Specifically, the CP device marks the first video (i.e., the long video) to obtain the chapter information of the first video, and injects the chapter information of the first video into the VSP device and the CDN device; or the CP device provides the first video, and the marking of the first video is performed by other devices, which is not limited here.
[0071] The VSP device is a video service platform, which is essentially a server. The VSP is used to arrange the chapter information of the first video to form a play content list of the second video and provide it to the terminal device. Optionally, the operation of arranging the chapter information of the first video can be performed by the VSP device, or the VSP can perform it based on the instructions of the operator of the operator.
[0072] The CDN device is a device in the content delivery network, which is essentially a server. Optionally, the terminal device is a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, a large screen device, a set-top box, a television, a vehicle-mounted terminal, an intelligent network terminal, a virtual reality (VR) all-in-one machine, a VR soft terminal, an OTT terminal, etc.
[0073] Among them, the full name of OTT is over the top, which specifically refers to the business operating "above" the Internet after the business of providing the Internet for users becomes a business of the operator. The most typical feature of this business is that its provider does not need to own its own physical network and directly operates on the physical network of the operator's Internet. The OTT terminal is a smart phone, a tablet computer, a desktop computer or an OTT set-top box, etc.
[0074] It should be understood that when the terminal device is a set-top box, the screen of the following terminal device is a TV or a large screen device matching the set-top box.
[0075] After the terminal device obtains the play content list of the second video, it sends a URL acquisition request to the VSP device based on the chapter information of the first video in the play content list of the second video to obtain the URL of the second video; the URL request includes the chapter information of the first video; the VSP device generates the URL of the second video. Optionally, before this, the VSP device determines whether the target user has the permission to watch the second video. When it determines that the target user has the permission to watch the second video, the VSP device performs the operation of generating the URL of the second video and sends the URL of the second video to the terminal device. Among them, the target user is the owner of the terminal device or the owner of the terminal device. The terminal device obtains the second video from the CDN device based on the URL of the second video. Before the CDN device sends the shards of the second video to the terminal device, it determines whether the URL of the second video is tampered with; when it determines that the URL of the second video is not tampered with, it sends the shards of the second video to the terminal device.
[0076] The terminal device plays the second video, and when playing the second video, it obtains the next second video based on the above method and caches it locally; when the current second video finishes playing or a switching instruction of the target user is detected, it automatically plays the next second video cached locally.
[0077] It can be seen that the solution of this embodiment does not divide the first video into multiple second videos, but operates based on the chapter information of the first video. In other words, it manages based on the metadata of the second video. Therefore, it is not necessary to manage the entity files of the second video (such as the media file, media stream, etc. of the second video), thereby reducing the storage overhead and operating cost.
[0078] See Figure 2 , Figure 2 is a schematic flowchart of a video playing method provided by an embodiment of the present application. This method is applied to Figure 1 the terminal device in. As Figure 2 shown, this method includes:
[0079] S201. The terminal device simultaneously obtains the URLs of multiple second videos based on the chapter information of the first video.
[0080] Among them, the first video is a video with a video duration greater than or equal to a duration threshold. Optionally, the duration threshold is 5 minutes, 10 minutes, 20 minutes, 30 minutes, 60 minutes, 90 minutes or other durations, which are not limited here.
[0081] The chapter information of the first video is obtained by the CP device marking the first video. Specifically, the CP device determines the start and end times of the second video in the first video and outputs the start and end times of the second video. Among them, the chapter information of the first video includes the start and end times of the second video. Optionally, while obtaining the start and end times of the second video, the CP device obtains the description information of the second video. Optionally, the chapter information of the first video further includes the description information of the second video. One second video corresponds to one piece of chapter information.
[0082] Among them, the second video is a video segment in the first video that contains the target person. For example, the target person is a popular star or actor; or
[0083] The second video is a video segment in the first video that includes exciting moments. For example, in a sports event video, it is the video segment of the goal-scoring moment.
[0084] In an example, the description information of the second video includes text information, or the description information of the second video includes text information and one or more frames in the second video. Among them, the text information is used to describe the content in the second video.
[0085] In a possible implementation, the URL of the second video A includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times of the second video A and a mode identifier. The start and end times of the second video A are the start and end times of the second video A in the first video. The ciphertext part is obtained by encrypting the start and end times of the second video A and the mode identifier. The mode identifier is used to indicate that the playing mode of the first short video is the swiping view mode. The duration of the second video is not greater than the duration of the first video A. By encrypting the start and end times of the second video and the mode identifier to obtain the ciphertext part, the CDN device can determine the URL of the second video based on the ciphertext part for verification to determine whether the URL of the second video has been tampered with.
[0086] It should be noted here that in addition to including the start and end times of the second video A and the mode identifier, the URL of the second video may of course include other information, which is not limited here.
[0087] It should be understood that the swiping viewing mode specifically means that in this mode, when the terminal device detects a switching instruction of the target user, the terminal device switches the content being played. Among them, the switching instruction can be a sliding instruction for the screen of the terminal device. In the solution of this application, of course, the switching instruction can also be other instructions, such as the voice instruction or text instruction of the target user. For different terminal devices, the generation of the switching instruction is also different. For example, when the terminal device is a large-screen device, a TV set or a set-top box, the switching instruction is an instruction sent by the target user to the large-screen device, TV set or set-top box through a remote control. When the terminal device is a VR all-in-one machine or a VR device, the switching instruction is generated based on the body posture and / or movement.
[0088] It should be noted that the first video is a long video and the second video is a short video. Here, "long" and "short" are relative. "Long" means the first video compared to the second video, and "short" means the second video compared to the first video.
[0089] S202. The terminal device obtains the shards of the second video from the content delivery network (CDN) device according to the URL of the second video A.
[0090] Specifically, the terminal device sends a first video acquisition request to the CDN device, and the URL of the second video is carried in the first video acquisition request; the CDN device obtains the shards of the second video based on the URL of the second video, and the CDN device sends a first response message for responding to the video acquisition request to the terminal device, and the first response message includes the shards of the second video. The terminal device determines the duration of the second video based on the shards of the second video. Optionally, the first response message further includes a duration parameter of the second video, and the duration parameter of the second video is used to represent the duration of the second video.
[0091] In a possible implementation manner, the CDN device sends the shards of the second video to the terminal device through transmission based on the HLS protocol, and the duration parameter of the second video is carried through a newly added field in the HLS protocol. In an example, the duration parameter is represented by an extended tag in the m3u8 secondary index file of the HLS protocol. It should be understood that for other protocols, the duration parameter can also be carried in a similar manner.
[0092] S203. The terminal device plays the second video A, and before playing the content of the preset duration of the second video A, obtains the shards of the second video B from the CDN device based on the URL of the second video B.
[0093] The terminal device obtains the second video A, and the terminal device plays the second video through a video application installed on the terminal device. Before the preset duration of the second video is played, the terminal device obtains the next second video. That is to say, when the terminal device plays the current second video, it simultaneously obtains and caches the next second video. Optionally, the preset duration here can be the duration of the second video, that is, the terminal device obtains and caches the next second video before the current second video is played to completion. The purpose of doing this is to be able to directly play the next second video after the current second video is played to completion, and the target user does not need to wait for the device to obtain the next second video, so as to achieve the waterfall flow automatic playback effect and improve the viewing experience of the target user. Optionally, the preset duration is less than the duration of the second video, that is, the terminal device obtains the next second video before the current second video is played to completion. The purpose of doing this is that when the target user watches the current second video, after watching for a period of time, the target user may not be interested in the current second video and will control the terminal device to play the next second video, such as by touch or voice, etc. At this time, the current second video has not been played to completion, so the next second video is obtained before the current second video is played to completion. When the target user is not interested in the current second video, the target user can directly play the next second video without waiting for the terminal device, which also improves the viewing experience of the target user.
[0094] Optionally, when the terminal device plays the second video A, the terminal device displays the duration of the second video on the screen in the form of a progress bar. The progress bar of the second video is as Figure 2a shown in the following figure below. 5:00 indicates that the duration of the second video is 5 minutes. Figure 2a The upper figure in
[0095] In a possible implementation, when the terminal device plays the second video A, a label for indicating playing the full movie is displayed on the screen of the terminal device. It should be understood that the full movie here is the first video. When the terminal device detects an instruction from the target user for this label, the terminal device obtains the URL of the first video from the VSP device. It should be noted here that for the URL of the first video, refer to the relevant description of the URL of the second video, which will not be elaborated here. The terminal device sends a second video acquisition request to the CDN device, and the URL of the first video is carried in the second video acquisition request; the CDN device obtains the shards of the first video based on the URL of the first video, and the CDN device sends a second response message for responding to the video acquisition request to the terminal device, and the second response message includes the shards of the first video. The terminal device determines the duration of the first video based on the shards of the first video. Optionally, the second response message further includes a duration parameter of the first video, and the duration parameter of the first video is used to represent the duration of the first video.
[0096] It should be noted here that the CDN device sends the shards of the first video to the terminal device through transmission based on the HLS protocol, and the duration parameter of the first video is carried through a newly added field in the HLS protocol.
[0097] In a possible implementation, when the terminal device obtains the chapter information of multiple second videos, there are two subsequent processing methods:
[0098] Method 1: The terminal device displays the chapter information of the second video on the screen, specifically, it displays the description information of the second video, including one or more frames of the second video and text information. Then, the terminal device obtains the URLs of multiple second videos based on the chapter information of the multiple second videos, obtains the shards of the second video based on the URLs of the second videos, and plays them; thus achieving the effect of automatic continuous playback in a waterfall flow, that is, after one second video is played, or after detecting a switching instruction from the target user, the next second video is played, and when playing the current second video, the terminal device obtains the shards of the next second video based on the URL of the next second video. The URL of the next second video here is selected by the terminal device and the next second video has been cached locally before the current second video is played. And when playing the next second video, the second video cached locally is preferentially selected.
[0099] In one example, when the terminal device detects an operation instruction of the user for the short video entry of the video application, the terminal device obtains the chapter information of multiple second videos, and displays the chapter information of the second videos on the screen in a list. The terminal device obtains the URLs of multiple second videos based on the obtained chapter information of the multiple second videos; when detecting an operation instruction of the user for the description information of a second video, the terminal device obtains the shards of the second video based on the URL of the second video and plays it; when playing the second video, the terminal device obtains the shards of the next second video based on the URL of the next second video; after the current second video is played, or after detecting a switching instruction of the target user, the next second video is played, so as to achieve the effect of automatic continuous playback of the waterfall flow.
[0100] Method 2: The terminal device does not display the chapter information of the second videos, directly obtains the URLs of multiple second videos based on the chapter information of the multiple second videos, and then obtains and plays the shards of the second videos one by one based on the URLs of the second videos, so as to achieve the effect of fast startup. And when playing a second video, the terminal device obtains the next second video based on the URL of the next second video. The URL of the next second video here is selected by the terminal device, and the next second video has been cached locally before the current second video is played. And when playing the next second video, the second video cached locally is preferentially selected.
[0101] It can be seen that in the solution of this embodiment, when obtaining the URLs of the second videos, multiple URLs of the second videos are obtained at one time, rather than one by one, which can reduce the network overhead between the terminal device and the video platform. When playing the second video A, the second video B is cached, which is convenient for the target user to switch videos without waiting for the terminal device to directly play the second video B, improving the viewing experience of the target user. And the solution of this embodiment does not divide the first video into multiple second videos, but operates based on the chapter information of the first video. Therefore, it is not necessary to manage the second videos, thus reducing the storage overhead and operating costs.
[0102] See Figure 3 , Figure 3 which is a schematic flowchart of another video playing method provided by an embodiment of the present application. This method is applied to Figure 1 the CDN device in Figure 3 As shown in
[0103] S301. The CDN device receives a first video acquisition request from the terminal device, and the first video acquisition request includes the URL of the second video.
[0104] Among them, the first video acquisition request is used to request the acquisition of the second video. The URL of the second video includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times of the second video and a mode identifier. The start and end times of the second video are the start and end times of the second video in the first video. The ciphertext part is obtained by encrypting the start and end times of the second video and the mode identifier. The mode identifier is used to indicate that the playback mode of the first short video is the swipe-viewing mode, and the duration of the first video is greater than or equal to the duration of the second video.
[0105] By encrypting the start and end times of the second video and the mode identifier to obtain the ciphertext part, the CDN device can determine the URL of the second video based on the ciphertext part for verification to determine whether the URL of the second video has been tampered with.
[0106] It should be noted here that in addition to including the start and end times of the second video and the mode identifier, the URL of the second video may of course include other information, which is not limited here.
[0107] It should be understood that the swipe-viewing mode specifically means that in this mode, when the terminal device detects a switching instruction of the target user, the terminal device switches the content being played. Among them, the switching instruction can be a sliding instruction for the screen of the terminal device. In the solution of this application, of course, the switching instruction can also be other instructions, such as the voice instruction or text instruction of the target user. For different terminal devices, such as when the terminal device is a large-screen device, a TV set or a set-top box, the switching instruction is an instruction sent by the target user to the large-screen device, the TV set or the set-top box through a remote control.
[0108] It should be pointed out that the first video is a long video and the second video is a short video. Here, "long" and "short" are relative. "Long" is for the first video relative to the second video, and "short" is for the second video relative to the first video.
[0109] S302. The CDN device sends a first response message to the terminal device based on the plaintext part and the ciphertext part. The first response message is used to respond to the first video acquisition request.
[0110] In a possible implementation, the CDN device determines whether the URL of the second video has been tampered with based on the plaintext part and the ciphertext part. Specifically, the CDN device parses the plaintext part and the ciphertext part; when the start and end times of the second video in the plaintext part are consistent with the start and end times of the second video in the ciphertext part, the CDN device determines that the URL of the second video has not been tampered with; when the start and end times of the second video in the plaintext part are inconsistent with the start and end times of the second video in the ciphertext part, the CDN device determines that the URL of the second video has been tampered with;
[0111] Alternatively, when the pattern identifier in the plaintext part is the same as the pattern identifier in the ciphertext part, the CDN device determines that the URL of the second video has not been tampered with; when the pattern identifier in the plaintext part is different from the pattern identifier in the ciphertext part, the CDN device determines that the URL of the second video has been tampered with. Here, "the pattern identifier in the plaintext part is different from the pattern identifier in the ciphertext part" includes that the value of the pattern identifier in the plaintext part is different from the value of the pattern identifier in the ciphertext part, or the plaintext part includes the pattern identifier while the ciphertext part does not include the pattern identifier, or the plaintext part does not include the pattern identifier while the ciphertext part includes the pattern identifier;
[0112] Alternatively, when the start and end times of the second video in the plaintext part are the same as the start and end times of the second video in the ciphertext part, and the pattern identifier in the plaintext part is the same as the pattern identifier in the ciphertext part, the CDN device determines that the URL of the second video has not been tampered with; when the start and end times of the second video in the plaintext part are different from the start and end times of the second video in the ciphertext part, or the pattern identifier in the plaintext part is different from the pattern identifier in the ciphertext part, the CDN device determines that the URL of the second video has been tampered with.
[0113] When determining that the URL of the second video has not been tampered with, the CDN device sends the shards of the second video to the terminal device, specifically, the shards of the second video are carried in the first response message; when determining that the URL of the second video has been tampered with, the CDN device feeds back error indication information to the terminal device, specifically, the error indication information is carried in the first response message.
[0114] In another possible implementation, the CDN device sends a response message to the terminal device based on the plaintext part and the ciphertext part, including:
[0115] The CDN device parses the plaintext part to determine whether the plaintext part includes a pattern identifier. If the plaintext part includes a pattern identifier, the CDN device further determines whether the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and determines whether the pattern identifiers in the plaintext part and the ciphertext part are the same. If it is determined that the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and the pattern identifiers in the plaintext part and the ciphertext part are the same, the CDN device sends the shards of the second video to the terminal device. Specifically, the shards of the second video are carried in the response message. If it is determined that the start and end times of the second video in the plaintext part are not the same as those of the second video in the ciphertext part, or the pattern identifiers in the plaintext part and the ciphertext part are not the same, the CDN device feeds back error indication information to the terminal device. Specifically, the error indication information is carried in the first response message. If the plaintext part includes a pattern identifier and does not include the start and end times of the second video, the CDN device determines that the URL of the second video is incorrect, and the CDN device feeds back error indication information to the terminal device, which can be specifically fed back through the first response message.
[0116] Optionally, the error indication information can be a service error code or a Hypertext Transfer Protocol (HTTP) status code.
[0117] In a possible implementation, the CDN device carries the duration parameter of the second video in the response message sent to the terminal device and including the shards of the second video, and the duration parameter of the second video is used to indicate the duration of the second video.
[0118] In a possible implementation, the CDN device sends the shards of the second video to the terminal device through transmission based on the HLS protocol, and the duration parameter of the second video is carried through a newly added field in the HLS protocol.
[0119] In a possible implementation, the CDN device receives a second video acquisition request sent by the terminal device, and the second video acquisition request includes the URL of the first video; the second video acquisition request is used to request the acquisition of the first video. For the specific process, refer to the relevant description of acquiring the second video in S302, which will not be described here.
[0120] It can be seen that in the solution of this embodiment, there is no division of the first video to obtain multiple second videos, that is, there is no division of the long video into multiple short videos. Instead, operations are performed based on the chapter information of the first video. Therefore, there is no need to manage the second videos, thereby reducing the storage overhead and operating costs. By introducing a clear text part and a cipher text part in the URL, the clear text part is verified by the cipher text part to determine whether the URL has been tampered with, thereby ensuring the security of video data. When feedbacking the shards of the video, the duration parameter is also feedbacked at the same time. The terminal device can determine the duration of the video based on the duration parameter, reducing the workload of the terminal device.
[0121] See Figure 4 , Figure 4 which is a schematic flowchart of another video playing method provided by an embodiment of the present application. This method is applied to Figure 1 the VSP device in Figure 4 As shown in
[0122] S401. The VSP device receives the chapter information of the first video from the terminal device.
[0123] Specifically, the terminal device sends a first URL acquisition request to the VSP device, and this first URL acquisition request is used to request to obtain the URL of the second video.
[0124] Among them, the first video is a video with a duration greater than or equal to the duration threshold. Optionally, the duration threshold is 5 minutes, 10 minutes, 20 minutes, 30 minutes, 60 minutes, 90 minutes or other durations, which are not limited here.
[0125] The chapter information of the first video is obtained by the CP device marking the first video. Specifically, the CP device determines the start and end times of the second video in the first video and outputs the start and end times of the second video. Among them, the chapter information of the first video includes the start and end times of the second video. Optionally, when the CP device obtains the start and end times of the second video, it also obtains the description information of the second video. Optionally, the chapter information of the first video further includes the description information of the second video. One second video corresponds to one piece of chapter information.
[0126] Among them, the second video is a video segment in the first video that contains the target person. For example, the target person is a popular star or actor; or
[0127] the second video is a video segment in the first video that includes a wonderful moment. For example, the video segment of the goal moment in a sports event video.
[0128] In one example, the description information of the second video includes text information, or the description information of the second video includes text information and one or more frames in the second video. The text information is used to describe the content in the second video.
[0129] S402. The VSP device generates URLs of one or more second videos according to the chapter information and media file information of the first video.
[0130] Among them, the chapter information of the first video includes metadata for describing the media file corresponding to the first video, such as the start and end times of the second video. Of course, other information can be included, which is not limited here. After the media file corresponding to the first video is injected into the CDN, it is stored on the media server node of the CDN. The VSP device will save the storage address of the media file in the CDN for subsequent generation of the URLs of the second video and the first video.
[0131] Among them, the URL of the second video includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times of the second video and a mode identifier. The start and end times of the second video are the start and end times of the second video in the first video. The ciphertext part is obtained by encrypting the start and end times of the second video and the mode identifier. The mode identifier is used to indicate that the playing mode of the first short video is the sliding view mode, and the duration of the first video is greater than or equal to the duration of the second video.
[0132] It should be understood that when the VSP device receives the chapter information of the first video, it knows that the user views the second video in the sliding view mode through the terminal device. Therefore, when the VSP device generates the URL of the second video, it will carry the mode identifier in the URL of the second video, and the mode identifier is used to indicate the sliding view mode.
[0133] By encrypting the start and end times of the second video and the mode identifier to obtain the ciphertext part, the CDN device can determine and verify the URL of the second video based on the ciphertext part to determine whether the URL of the second video has been tampered with.
[0134] S403. The VSP device sends the URLs of multiple second videos to the terminal device.
[0135] Specifically, the VSP device sends a fourth response message to the terminal device. The fourth response message is used to respond to the first URL acquisition request. Among them, the fourth response message includes the URLs of multiple second videos.
[0136] In a possible implementation manner, the method in this embodiment further includes:
[0137] The VSP device receives a second URL acquisition request from the terminal device. The second URL acquisition request includes the identifier of the first video, and the second URL acquisition request is used to request the acquisition of the URL of the first video. The VSP device generates the URL of the first video based on the content information of the first video and the media file information corresponding to the first video, and the VSP device sends a third response message for responding to the second URL acquisition request to the terminal device. The third response message includes the URL of the first video.
[0138] It should be understood that the terminal device sends the identifier of the first video to the VSP device to inform the VSP device that the URL that the terminal device needs to acquire is the URL of the first video. When the VSP device acquires the identifier of the first video, it can directly generate the URL of the first video based on the content information of the first video and the media file information corresponding to the first video.
[0139] In a possible implementation manner, the method of this embodiment further includes:
[0140] The VSP device acquires the authentication information of the target user, and determines whether the target user has the permission to view the second video based on the authentication information of the target user. When the VSP device determines that the target user has the permission to view the second video, it performs the operation of generating the URL of the second video.
[0141] There are two ways for the VSP device to acquire the authentication information of the target user:
[0142] Way 1: The VSP device stores the authentication information of each user. The target user identifier is carried in the first URL acquisition request or the second URL acquisition request. The VSP device acquires the authentication information of the target user from the stored authentication information of each user based on the target user identifier.
[0143] Way 2: The authentication information of the target user is reported to the VSP device by the target user when logging in.
[0144] Optionally, the authentication information of the target user includes the identity information of the target user or the geographical location information of the target user, or whether the target user subscribes to the first video, or the network type to which the terminal device is connected. The VSP device determines whether the target user has the permission to watch the second video based on the authentication information of the target user, including: if it is determined based on the identity information of the target user that the target user is a video member, the VSP device determines that the target user has the permission to watch the second video; or, if the network type to which the terminal device is connected is a preset network type, such as a wifi network or a 5G network, the VSP device determines that the target user has the permission to watch the second video; or if the target user subscribes to the first video, the VSP device determines that the target user has the permission to watch the second video; or if the first video is only available for target users located within a preset range, and the VSP device determines based on the geographical location information of the target user that the target user is within the preset range, the VSP device determines that the target user has the permission to watch the second video.
[0145] The VSP device can also determine whether the target user has the permission to watch the second video in other ways. For example, the VSP device determines whether the first video is a free video to determine whether the target user has the permission to watch the second video. If the VSP device determines that the first video is a free video, it determines that the target user has the permission to watch the second video. After determining that the target user has the permission to watch the second video, the VSP device will generate the URL of the second video. If it is determined that the target user does not have the permission to watch the second video, the VSP device does not generate the URL of the second video and feedbacks a processing failure indication message and the specific reason for the failure to the terminal device. For example, the processing failure indication message and the specific reason for the failure are carried in the third response message.
[0146] It should be understood that before the VSP device generates the URL of the first video, it also determines whether the target user has the permission to watch the first video in the above manner; if it is determined that the target user has the permission to watch the first video, the VSP device generates the URL of the first video in the above manner; if it is determined that the target user does not have the permission to watch the first video, the VSP device does not generate the URL of the second video and feedbacks a processing failure indication message and the specific reason for the failure to the terminal device.
[0147] It can be seen that in the solution of this embodiment, instead of dividing the first video into multiple second videos, that is, instead of dividing a long video into multiple short videos, operations are performed based on the chapter information of the first video. Therefore, there is no need to manage the second videos, thus reducing the storage overhead and operating costs. Before generating the URL, the permissions of the target user are verified, and only after the verification is passed, the URL is generated and sent to the terminal device, ensuring the security of the data.
[0148] See Figure 5 ,Figure 5 An interactive flowchart of a video playback method provided by an embodiment of the present application. This method is applied to Figure 1 the system shown in Figure 5 As shown in
[0149] S501. The CP device marks the first video to obtain the chapter information of the first video.
[0150] Among them, the first video is a video with a video duration greater than the duration threshold. Optionally, the duration threshold is 5 minutes, 10 minutes, 20 minutes, 30 minutes, 60 minutes, 90 minutes or other durations, which are not limited here.
[0151] Specifically, when the CP device marks the first video, it specifically determines the start and end times of the second video in the first video and obtains the start and end times of the second video. Among them, the chapter information of the first video includes the start and end times of the second video. Optionally, when the CP device obtains the start and end times of the second video, it also obtains the description information of the second video. Optionally, the chapter information of the first video also includes the description information of the second video. One second video corresponds to one piece of chapter information.
[0152] In one example, the description information of the second video includes text information, or the description information of the second video includes text information and one or more frames in the second video. Among them, the text information is used to describe the content in the second video.
[0153] Among them, the second video is a video segment in the first video that contains the target person. For example, the target person is a popular star or actor; or the second video is a video segment in the first video that includes exciting moments, such as the video segment of the goal-scoring moment in a sports event video.
[0154] It should be understood that there is one or more second videos in a first video that contain the target person and / or target event. Correspondingly, there is one or more pieces of chapter information of the first video. There is one or more first videos stored in the CP device. In the above manner, the chapter content of one or more first videos can be obtained.
[0155] S502. The CP device sends the chapter information of the first video to the VSP device.
[0156] After receiving the chapter information of the first video, the VSP device saves the chapter information of the first video.
[0157] S503. The VSP device arranges the chapter information of the first video to obtain the playback content list of the second video.
[0158] Among them, the play content list of the second video includes chapter information, the identifier of the chapter information, and the identifier of the first video corresponding to the chapter information.
[0159] In one example, the VSP device randomly arranges the chapter information of the first video to obtain the play content list of the second video. In another example, the VSP device arranges the chapter information of the first video based on the target user information to obtain the play content list of the second video. Among them, the target user information includes information such as the identity information of the target user and the viewing habits of the target user. For example, in the play content list of the second video, the chapter information of the first video related to the video with a higher viewing frequency of the target user is arranged more forward. In another example, the VSP device receives an arrangement instruction from the operator's staff and arranges the chapter information of the first video based on this arrangement instruction to obtain the play content list of the second video. The VSP device saves the play content list of the second video.
[0160] S504. The terminal device obtains the play content list of the second video from the VSP device.
[0161] Specifically, in one example, when the target user activates the short video function of the video application installed on the terminal device, the terminal device sends a request to obtain the play content list of the second video to the VSP device, and the VSP device sends a response message for responding to this request to the terminal device. This response message includes some or all of the content in the play content list of the second video. Optionally, the terminal device displays the chapter information in the obtained play content list of the second video.
[0162] In another example, when the target user activates the video application installed on the terminal device, the terminal device obtains some or all of the chapter information in the play content list of the second video from the VSP device. Optionally, when the target user activates the short video function of this video application, the terminal device displays the chapter information in the obtained play content list of the second video.
[0163] It should be understood that the display interface of the terminal device is limited, and the terminal device displays some of the chapter information in the obtained play content list of the second video. When the number of chapter information in the obtained play content list of the second video is small and the display interface of the terminal device is sufficient to display this chapter information, the terminal device displays all the chapter information in the obtained play content list of the second video.
[0164] S504 is optional.
[0165] S505. The terminal device sends a first URL acquisition request to the VSP device.
[0166] Specifically, the VSP device provides an interface function for the terminal device to batch obtain information of multiple chapters, as shown in Table 1 below, that is, send a URL acquisition request to the VSP through this interface function.
[0167] Carrier protocol HTTP POST Interface direction Terminal device -> VSP device Call interface http: / / VSP……
[0168] Table 1
[0169] Among them, the interface function supports the terminal device to obtain information of multiple chapters from the VSP device, that is to say, the request parameters of this interface function include the identifier of the chapter information. When the terminal device calls this interface function, it needs to send the identifier of the chapter information to the VSP device. It should be understood that the request parameters of this interface function can also include the vod number, that is, the number of the first video, the media file number, the type of the content number, and the list of chapter content identifiers.
[0170] In an example, for the number of chapter information of the first video, the number of transmissions at one time does not exceed a preset number, such as 10. When the type of the content number is 0, the number of the first video is the identifier of the first video; when the type of the content number is 0, the number of the first video is the code of the first video. It is not allowed to transmit the identifier of the parent set of the first video or the identifier of the episodic series, and there is no chapter information for the parent set. If the data transmitted through the interface function includes the parent set identifier, it is ignored. If the first video does not exist, or the media file of the first video does not exist, or the media file does not correspond to the first video, an error is directly reported. For the number of the first video and the media file number, since the terminal device will transmit multiple at one time, there are duplicate numbers of the first video and duplicate media file numbers among them; in this regard, the VSP device directly performs a merging process. When the type of the content number is 0, the media file number represents the identifier of the media file, and when the type of the content number is 1, the media file number represents the code of the media file. The specific value of the type of the content number includes 0 or 1; when the type of the content number takes 0, this value is generated by the VSP device; when the type of the content number takes 1, it identifies the content code, and this value is generated by a third-party system. The list of chapter content identifiers generally includes 5 chapter content identifiers, and the VSP device obtains the corresponding 5 chapter contents from the chapter information of the first video received from the VSP based on the 5 chapter content identifiers; when the list of chapter content identifiers is empty, 5 chapter contents are directly randomly selected from the chapter information of the first video received from the VSP. If the VSP device does not receive the chapter information of the first video, the VSP device performs a random dotting operation on the first video to obtain 5 chapter information. If the chapter content corresponding to the chapter content identifier included in the list of chapter content identifiers does not belong to the chapter information of the first video received from the VSP, 5 chapter contents are directly randomly selected from the chapter information of the first video received from the VSP. The VSP device generates 5 URLs of the second video based on the 5 chapter contents.
[0171] The return parameters of the interface function include a return result and the URL of the second video. The return result includes a return code and a description message. The URL of the second video includes the number of the first video and the media file number, and these two pieces of information are the same as those in the request parameters. The return parameters of the interface function also include the playback address of the second video, which is sorted in ascending order of the start time of the chapters. The playback address of the second video includes the identifier of the corresponding chapter content. When the identifier of the chapter content is empty, it means that the chapter content is obtained by random sampling; the number of seconds of the start time of the second video relative to the first video, and the playback address of the first video.
[0172] Among them, multiple pieces of chapter information can be of one first video or of multiple first videos.
[0173] The first URL acquisition request is used to request the acquisition of the URLs of multiple second videos. In one example, the URL acquisition request includes the identifier of the first video, and the URLs of the multiple second videos are the URLs of the second videos corresponding to the chapter information of the video indicated by the identifier of the first video. Optionally, the URL acquisition request further includes the identifiers of multiple pieces of chapter information, and the URLs of the multiple second videos are the URLs of the second videos corresponding to the chapter information indicated by the identifiers of the multiple pieces of chapter information. The multiple pieces of chapter information are included in the chapter information of the first video, that is to say, the multiple pieces of chapter information are part or all of the chapter information of the first video.
[0174] In another example, if the URL acquisition request includes the identifier of the first video and does not include the identifier of the chapter information of the first video.
[0175] S506. The VSP device generates the URL of the second video.
[0176] Specifically, the VSP generates the URL of the second video based on the chapter information and the first video information in the URL acquisition request. The number of URLs of the second video is the same as the number of pieces of chapter information in the URL acquisition request. Among them, the first video information includes the storage address of the first video and the identifier of the first video.
[0177] In one example, the URL of the second video includes a plaintext part and a ciphertext part. Among them, the plaintext part includes, but is not limited to, the storage address of the first video, the start and end times of the second video, and the mode identifier. The ciphertext part can also be called an anti-leeching encryption string. Among them, the ciphertext part includes the start and end times of the second video in the first video and the mode identifier. The ciphertext part is used to verify the URL of the second video to prevent the URL of the second video from being tampered with. It should be understood that the start and end times of the second video are the start and end times of the second video in the first video. It should be noted that the URL may of course also include other information, which is not limited here.
[0178] Among them, the mode identifier is used to indicate the playback mode of the second video. Further, when the value of the mode identifier is the first value (such as 1 or true), it indicates that the playback mode of the second video is the sliding view mode.
[0179] To more clearly illustrate the differences between the URLs of the sliding view mode and the preview / watch mode, the URLs specified by Huawei are used as an example for illustration:
[0180] For the sliding view mode, the URL of the second video includes: playseek=xxxxxx-xxxxxx&slidingFlag=1; where slidingFlag is the mode identifier;
[0181] For the preview / watch mode, the URL of the second video includes: playseek=xxxxxx-xxxxxx.
[0182] In an example, the ciphertext part in the URL specified by Huawei is:
[0183] Base64(AES( +"$"+ +"$"+ <c> +"$"+ <d> +"$"+……+"$"+ <starttime> +"$"+ <endtime> +"$"+……+"$"+ <slidingflag> )+[":"+ <e>+……]
[0184] Among them, StartTime and EndTime are the start and end times of the second video in the first video, that is, the allowable playing time period in the first video; slidingFlag is a mode identifier used to indicate the playing mode of the second video.
[0185] For the playing mode of the second video being the sliding view mode, the ciphertext part of the URL of the second video is:
[0186] Base64(AES(< / e> < / slidingflag> < / endtime> < / starttime> < / d> < / c> +"$"+ +"$"+ <c> +"$"+ <d> +"$"+……+"$"+ <starttime> +"$"+ <endtime> +"$"+……+"$"+<1>)+[":"+ <e>+……
[0187] The 12th $-separated slidingFlag in the above ciphertext part has a fixed value of 1, indicating the sliding view mode.
[0188] In a specific example, the URL of the second video is:
[0189] http: / / XXXX / ……playseek=xxxxxx-xxxxxx&1.
[0190] Taking the URL in Migu's specification as an example for illustration:
[0191] For the second video with the play mode of preview / watch sample mode, the ciphertext part of the URL of the second video is:
[0192] MD5(A=xx&B=xx&B=xx&D=xx&preview=1&playseek=xxxxxx-xxxxxx)
[0193] For the second video with the play mode of sliding view mode, the ciphertext part of the URL of the second video is:
[0194] MD5(A=xx&B=xx&C=xx&D=xx&playseek=xxxxxxxxxxxx&slidingFlag=1
[0195] Among them, the enumerated value of slidingFlag is 1 or 0. When the value of slidingFlag is 1, it indicates that the play mode of the second video is the sliding view mode; when the value of slidingFlag is empty or 0, it indicates that the play mode of the second video is not the sliding view mode.
[0196] It should be noted that when the second video's URL carries a preview / watch sample flag, if the value of this flag is 1, it indicates that the play mode of the second video is the preview / watch sample mode; if the value of this flag is 0 or empty, it indicates that the play mode of the second video is not the preview / watch sample mode.
[0197] If the second video's URL does not carry a preview / watch sample flag and a mode flag (slidingFlag), it indicates that the play mode of the second video is the full movie viewing mode, or if the second video's URL carries a preview / watch sample flag or a mode flag, and the carried flag value is 0, and no other flag for indicating the play mode is carried, it indicates that the play mode of the second video is the full movie viewing mode.
[0198] When the URL acquisition request includes the identifier of the first video but does not include the identifier of the chapter information of the first video, the VSP device cannot obtain the start and end times of the second video in the first video. At this time, the VSP device randomly samples the first video to obtain the start and end times of the second video. The specific method is as follows: randomly take a value within M% to N% of the duration of the first video, and use the time point in the first video whose difference from the start time of the first video is the randomly taken value as the start time of the second video; determine the time point in the first video whose difference from the start time of the second video is the preview duration of the first video as the end time of the second video.
[0199] Among them, M and N are represented by the configuration items beginPercentage and endPercentage respectively, with the type of int, the unit of %, and the value range of 0 - 100. In one example, the VSP device obtains the previewEndTime parameter and previewBeginTime parameter of the first video from the configuration item, and determines the preview duration of the first video based on the previewEndTime parameter and previewBeginTime parameter of the first video; if the previewEndTime parameter and previewBeginTime parameter of the first video are not configured in the configuration item, the VSP device obtains the VODPreviewRange parameter from the configuration item, and this parameter represents the preview duration of the first video.
[0200] It should be noted that if the time point obtained by adding the preview duration to the start time of the second video exceeds the end time of the first video, the VSP device normally generates the URL of the second video. When the VSP device requests streaming from the CDN device based on the URL of the first video, the CDN device sends the second video to the terminal device, and the end moment of the second video is the end moment of the first video. That is to say, when the terminal device plays the first video, it starts playing from the start moment of the second video until the first video is played out.
[0201] If M is greater than N, the VSP device starts sampling from the start moment of the first video, that is to say, the start time of the second video is the start time of the first video.
[0202] In one example, in the URL of the second video, the start and end moments of the second video are represented by the playseek parameter.
[0203] For example, if the duration of the first video is 60 minutes, the beginPercentage parameter and the endPercentage parameter are configured as 10 and 20 respectively, and the preview duration of the first video is 5 minutes, then the start time of the second video is a random time between 6 minutes and 12 minutes, such as 10 minutes, and the end time of the second video is 15 minutes, and playseek is 001000 - 001500; if the duration of the first video is empty, that is, the VSP device cannot obtain the duration of the first video, then the playseek of the second video is 000000 - 000500.
[0204] In a possible embodiment, the VSP device determines whether the target user of the terminal device has the permission to watch the second video. The specific methods include but are not limited to: determining whether the target user has the permission to watch the second video based on the identity information of the target user, the geographical location information, or whether the first video is a free video. For example, if it is determined based on the identity information of the target user that the target user is a video member, it is determined that the target user has the permission to watch the second video. Another example is that if the first video is only available for target users located within a preset range, and it is determined based on the geographical location information of the target user that the target user is within the preset range, it is determined that the target user has the permission to watch the second video; if it is determined that the first video is a free video, it is determined that the target user has the permission to watch the second video. Only when it is determined that the target user has the permission to watch the second video, the VSP device will generate the URL of the second video. If it is determined that the target user does not have the permission to watch the second video, the VSP device does not generate the URL of the second video and feeds back a processing failure indication message and the specific reason for the failure to the terminal device.
[0205] The VSP device can obtain the URLs of multiple second videos in the above manner. It should be understood that for one first video, one or more URLs of the second video can be obtained.
[0206] S507. The VSP device sends a fourth response message to the terminal device.
[0207] Among them, the fourth response message is used to respond to the first URL acquisition request. If the VSP device generates multiple URLs of the second video, the first response message includes multiple URLs of the second video. If the VSP device does not generate the URL of the second video, the first response message includes a processing failure indication message and the specific reason for the failure. The specific reasons for the failure include but are not limited to that the target user does not have the permission to watch the second video.
[0208] S508. The terminal device sends a first video acquisition request to the CDN device.
[0209] Among them, the first video acquisition request includes the URL of the second video.
[0210] S509. The CDN device sends a first response message to the terminal device.
[0211] In a possible implementation, the terminal device obtains the start and end times of the second video in the plaintext part and the ciphertext part from the URL of the second video; then obtains the start and end times of the second video from the ciphertext part; if the start and end times of the second video in the plaintext part are inconsistent with the start and end times of the second video in the ciphertext part, it means that the URL of the second video has been tampered with, and the CDN device does not stream, that is, does not return the shards of the second video to the terminal device; if the start and end times of the second video in the plaintext part are consistent with the start and end times of the second video in the ciphertext part, it means that the URL of the second video has not been tampered with, and the CDN device streams, that is, the CDN device returns the shards of the second video to the terminal device based on the start and end times of the second video.
[0212] In another possible implementation, the terminal device obtains the mode identifier in the plaintext part and the ciphertext part from the URL of the second video; then obtains the mode identifier from the ciphertext part; if the value of the mode identifier in the plaintext part is inconsistent with the value of the mode identifier in the ciphertext part, it means that the URL of the second video has been tampered with, and the CDN device does not stream, that is, does not return the shards of the second video to the terminal device; if the value of the mode identifier in the plaintext part is consistent with the value of the mode identifier in the ciphertext part, it means that the URL of the second video has not been tampered with, and the CDN device streams, that is, the CDN device returns the shards of the second video to the terminal device based on the start and end times of the second video.
[0213] In another possible implementation, the terminal device obtains the mode identifier in the plaintext part, the start and end times of the second video, and the ciphertext part from the URL of the second video; then obtains the mode identifier and the start and end times of the second video from the ciphertext part; if the start and end times of the second video in the plaintext part are inconsistent with the start and end times of the second video in the ciphertext part, or the value of the mode identifier in the plaintext part is inconsistent with the value of the mode identifier in the ciphertext part, it means that the URL of the second video has been tampered with, and the CDN device does not stream, that is, does not return the shards of the second video to the terminal device; if the start and end times of the second video in the plaintext part are consistent with the start and end times of the second video in the ciphertext part, and the value of the mode identifier in the plaintext part is consistent with the value of the mode identifier in the ciphertext part, it means that the URL of the second video has not been tampered with, and the CDN device streams, that is, the CDN device returns the shards of the second video to the terminal device based on the start and end times of the second video.
[0214] In another possible implementation, taking the URL of the second video as a Huawei-standard URL as an example for illustration. The CDN device parses the URL of the second video to determine whether the plaintext part of the URL in the second video carries a mode identifier. If the URL of the second video carries a mode identifier, the CDN device determines that the playback mode of the second video is the sliding view mode; further, when the value of the mode identifier is the first value (such as true or 1), the CDN device determines that the playback mode of the second video is the sliding view mode. When determining that the playback mode of the second video is the sliding view mode, the CDN device streams and returns the shards of the second video to the terminal device based on the start and end times in the URL of the second video. The shards of the second video are the video segments corresponding to the start and end times in the URL of the second video in the first video. If the URL of the second video does not carry a mode identifier, the CDN device determines that the playback mode of the second video is the full video viewing mode, the CDN device streams and returns all the shards of the first video to the terminal device; if the URL of the second video carries a preview / watch sample identifier, the CDN device determines that the playback mode of the second video is the watch sample / preview mode, the CDN device streams and returns all the shards of the first video to the terminal device; further, if the value of the preview / watch sample identifier carried by the URL of the second video is 1 or true, the CDN device determines that the playback mode of the second video is the watch sample / preview mode, the CDN device streams and returns all the shards of the first video to the terminal device. When the URL of the second video carries a mode identifier and the value of the mode identifier is the first value, and the URL of the second video does not carry the start and end times of the second video, the CDN device feeds back error indication information to the terminal device, such as a 404 error.
[0215] Optionally, before the CDN device streams, when determining that the playback mode of the second video is the sliding view mode based on the plaintext part of the URL of the second video, the CDN device decrypts the ciphertext part of the URL of the second video to obtain the mode identifier in the ciphertext part and the start and end times of the second video. If the mode identifier and the start and end times of the second video in the ciphertext part are respectively consistent with those in the plaintext part, if they are consistent, the CDN device streams; if they are inconsistent, it means that the URL of the second video has been tampered with, and the CDN device feeds back error indication information to the terminal device, such as a 404 error.
[0216] When it is determined that the playback mode of the second video is the trial view / preview mode based on the plaintext part of the URL of the second video, the CDN device decrypts the ciphertext part of the URL of the second video to determine whether the ciphertext part includes a mode identifier; if it includes a mode identifier, it is determined that the URL of the second video has been tampered with; if it does not include a mode identifier, it is determined whether the start and end times of the second video in the ciphertext part are consistent with the start and end times of the plaintext part. If they are consistent, the CDN device streams; if they are inconsistent, it is determined that the URL of the second video has been tampered with; the CDN device feeds back an error indication message to the terminal device, such as a 403 error.
[0217] In another possible implementation, taking the URL of the second video as a Migu standard URL as an example for illustration. The CDN device parses the plaintext part of the URL of the second video; if the plaintext part includes a preview identifier (preview), the CDN device determines that the playback mode of the second video is the trial view / preview mode. Further, when the value of the preview identifier is the first value (such as true or 1), the CDN device determines that the playback mode of the second video is the trial view / preview mode; when it is determined that the playback mode of the second video is the trial view / preview mode, the CDN device streams and returns all the fragments of the first video to the terminal device. If the URL of the second video carries a mode identifier, the CDN device determines that the playback mode of the second video is the sliding view mode; further, when the value of the mode identifier is the first value (such as true or 1), the CDN device determines that the playback mode of the second video is the sliding view mode. When it is determined that the playback mode of the second video is the sliding view mode, the CDN device streams and returns the fragments of the second video to the terminal device based on the start and end times in the URL of the second video. The fragments of the second video are the video segments corresponding to the start and end times in the URL of the second video in the first video. If the URL of the second video carries both a preview identifier and a mode identifier, the CDN device determines that the URL of the second video is an abnormal URL, and the CDN device feeds back a 400 rejection to the terminal device.
[0218] Optionally, before the CDN device streams out, when the play mode of the second video is determined to be the sliding view mode based on the plaintext part of the URL of the second video, the CDN device generates an MD5 checksum based on the plaintext part, where the MD5 checksum can be expressed as: MD5(A=xx&B=xx&C=xx&D=xx&slidingFlag=1&playseek=xxxxxx-xxxxxx); the CDN device compares the MD5 checksum generated based on the plaintext part with the checksum of the ciphertext part; if they are the same, it indicates that the URL of the second video has not been tampered with, and the CDN device streams out and returns the shards of the second video to the terminal device based on the start and end times in the URL of the second video. If the plaintext part does not include the start and end times of the second video, the CDN device feeds back a 403 Forbidden Access to the terminal device. If they are different, it is determined that the URL of the second video has been tampered with; the CDN device feeds back an error indication message to the terminal device, such as a 404 error.
[0219] When the play mode of the second video is determined to be the trial view / preview mode based on the plaintext part of the URL of the second video, the CDN device generates an MD5 checksum based on the plaintext part, where the MD5 checksum can be expressed as: (A=xx&B=xx&C=xx&D=xx&preview=1&playseek=xxxxxx-xxxxxx); if the plaintext part does not include the start and end times of the second video, the MD5 checksum can be expressed as: (A=xx&B=xx&C=xx&D=xx). The CDN device compares the MD5 checksum generated based on the plaintext part with the checksum of the ciphertext part; if they are the same, it is determined that the URL of the second video has not been tampered with, and the CDN device streams out and returns all the shards of the first video to the terminal device. If they are different, it is determined that the URL of the second video has been tampered with; the CDN device feeds back an error indication message to the terminal device, such as a 404 error.
[0220] It should be noted that if it is determined that the URL of the second video has been tampered with, the second response message includes indication information for indicating that the URL of the second video has been tampered with. If it is determined that the URL of the second video has not been tampered with, the second response message includes the shards of the second video.
[0221] S510. The terminal device plays the second video.
[0222] Specifically, the terminal device plays the second video through a video application installed on the terminal device. The terminal device determines the duration of the second video based on the shards of the second video fed back by the CDN device and displays the duration of the second video on the display interface of the terminal device, such as by means of a progress bar. Optionally, the second response message further includes a duration parameter, and the duration parameter is used to indicate the duration of the second video.
[0223] Further, when playing the second video, S508 and S509 are repeatedly executed so that the terminal device obtains the next second video before the preset duration of the second video is played. That is to say, when the terminal device is playing the current second video, it simultaneously obtains and caches the next second video. Optionally, the preset duration here can be the duration of the second video, that is, the terminal device obtains and caches the next second video before the current second video finishes playing. The purpose of doing this is to be able to directly play the next second video after the current second video finishes playing, and the target user does not need to wait for the device to obtain the next second video, so as to achieve the waterfall flow automatic playback effect and improve the viewing experience of the target user. Optionally, the preset duration is less than the duration of the second video, that is, the terminal device obtains the next second video before the current second video finishes playing. The purpose of doing this is that when the target user is watching the current second video, after watching for a period of time, the target user may not be interested in the current second video and will control the terminal device to play the next second video, such as by touch or voice. At this time, the current second video has not finished playing, so the next second video is obtained before the current second video finishes playing. When the target user is not interested in the current second video, the target user can directly play the next second video without waiting for the terminal device, which also improves the viewing experience of the target user.
[0224] For example, the length of the first video is 12 minutes, and its secondary index m3u8 file is as follows:
[0225] #EXTM3U
[0226] #EXT-X-TARGETDURATION:60
[0227] #EXT-X-MEDIA-SEQUENCE:0
[0228] #EXTINF:60,no desc
[0229] fileSequence0.ts
[0230] #EXTINF:60,no desc
[0231] fileSequence1.ts
[0232] #EXTINF:60,no desc
[0233] fileSequence2.ts
[0234] #EXTINF:60,no desc
[0235] fileSequence3.ts
[0236] #EXTINF:60,no desc
[0237] fileSequence4.ts
[0238] #EXTINF:60,no desc
[0239] fileSequence5.ts
[0240] #EXTINF:60,no desc
[0241] fileSequence6.ts
[0242] #EXTINF:60,no desc
[0243] fileSequence7.ts
[0244] #EXTINF:60,no desc
[0245] fileSequence8.ts
[0246] #EXTINF:60,no desc
[0247] fileSequence9.ts
[0248] #EXTINF:60,no desc
[0249] fileSequence10.ts
[0250] #EXTINF:60,no desc
[0251] fileSequence11.ts
[0252] #EXT-X-ENDLIST
[0253] For the preview / watch sample mode, the preview / watch sample duration of the first video is 3 minutes. At this time, the secondary index m3u8 file fed back by the CDN device to the terminal device is the secondary index m3u8 file of the first video. The terminal device determines the duration of the first video by accumulating the durations of each shard file by itself and plays the content between the 0th minute and the 3rd minute.
[0254] For the sliding view mode, the second video is the content between the 2nd minute and the 6th minute in the first video. The secondary index m3u8 file sent by the CDN device to the terminal device is as follows. The terminal device determines the duration of the second video by accumulating the durations of each segment file in the following m3u8 file and then plays it.
[0255] #EXTM3U
[0256] #EXT-X-TARGETDURATION:60
[0257] #EXT-X-MEDIA-SEQUENCE:0
[0258] #EXTINF:60,no desc
[0259] fileSequence1.ts
[0260] #EXTINF:60,no desc
[0261] fileSequence2.ts
[0262] #EXTINF:60,no desc
[0263] fileSequence3.ts
[0264] #EXTINF:60,no desc
[0265] fileSequence4.ts
[0266] #EXT-X-ENDLIST
[0267] In a possible implementation, when the CDN device feeds back video segments to the terminal device, it simultaneously carries a duration parameter in the feedback information to represent the video duration. Optionally, an extended tag is added to the m3u8 file, that is, a duration parameter is added to represent the video duration.
[0268] In an example, for a video with a preview / watch duration of 3 minutes, its secondary index m3u8 file is as follows:
[0269] #EXTM3U
[0270] #EXT-X-TARGETDURATION:60
[0271] #EXT-X-MEDIA-SEQUENCE:0
[0272] #EXT-X-TOTALDURATION:180
[0273] #EXTINF:60,no desc
[0274] fileSequence0.ts
[0275] #EXTINF:60,no desc
[0276] fileSequence1.ts
[0277] #EXTINF:60,no desc
[0278] fileSequence2.ts
[0279] #EXT-X-ENDLIST
[0280] Among them, the parameter #EXT-X-TOTALDURATION: 180 is used to represent that the duration of the video is 3 minutes.
[0281] In another example, the second video is a video clip from the 2nd minute to the 6th minute of the first video, that is, a clip with a duration of 4 minutes. Its secondary index m3u8 file is as follows:
[0282] #EXTM3U
[0283] #EXT-X-TARGETDURATION:60
[0284] #EXT-X-MEDIA-SEQUENCE:0
[0285] #EXT-X-TOTALDURATION:240
[0286] #EXTINF:60,no desc
[0287] fileSequence1.ts
[0288] #EXTINF:60,no desc
[0289] fileSequence2.ts
[0290] #EXTINF:60,no desc
[0291] fileSequence3.ts
[0292] #EXTINF:60,no desc
[0293] fileSequence4.ts
[0294] #EXT-X-ENDLIST
[0295] Among them, #EXT-X-TOTALDURATION: 240 indicates that the duration of the second video is 4 minutes.
[0296] S511. The terminal device sends a second URL acquisition request to the VSP device.
[0297] Specifically, when the terminal device plays the second video, a label for indicating playing the full movie is displayed on the screen. It should be understood that the full movie here is the first video. When the target user watches the second video and is interested in it and wants to watch the complete first video corresponding to the second video, the target user will obtain the complete first video through this label. When the terminal device detects an operation by the target user on this label, the terminal device sends a second URL acquisition request to the VSP device, and the second URL acquisition request is used to request to obtain the URL of the first video.
[0298] Among them, the second URL acquisition request includes the identity information of the target user and the identifier of the first video. Of course, the second URL acquisition request may also include other information, which is not limited here.
[0299] S512. The VSP device sends a third response message to the terminal device.
[0300] Among them, the fourth response message is used to respond to the second URL acquisition request. Specifically, the VSP device determines whether the target user of the terminal device has the permission to watch the first video. The specific methods include but are not limited to: determining whether the target user has the permission to watch the first video based on the identity information of the target user, the geographical location information, or whether the first video is a free video. For example, if it is determined based on the identity information of the target user that the target user is a video member, it is determined that the target user has the permission to watch the first video. Another example is that the first video is only available for target users located within a preset range. If it is determined based on the geographical location information of the target user that the target user is within the preset range, it is determined that the target user has the permission to watch the first video; if it is determined that the first video is a free video, it is determined that the target user has the permission to watch the first video.
[0301] When it is determined that the target user has the permission to watch the first video, the VSP device will generate the URL of the first video. The VSP device generates the URL of the first video based on the first video content information and the media file and adopts anti-leech protection. The fourth response message includes the URL of the first video. If it is determined that the target user does not have the permission to watch the first video, the VSP device does not generate the URL of the first video and feeds back a fourth response message including a processing failure indication information and the specific reason for the failure to the terminal device.
[0302] S513. The terminal device sends a second video acquisition request to the CDN device.
[0303] The second video acquisition request is used to request the acquisition of the first video, and the second video acquisition request includes the URL of the first video.
[0304] S514. The CDN device sends a second response message to the terminal device.
[0305] Specifically, if the CDN device determines that the URL of the first video has not been tampered with, it sends a second response message including the first video fragment to the terminal device; if the CDN device determines that the URL of the first video has been tampered with, it sends a second response message including indication information for indicating that the URL of the first video has been tampered with to the terminal device.
[0306] S515. The terminal device plays the first video.
[0307] It should be noted here that< / e> < / endtime> < / starttime> < / d> < / c> Figure 5 The beneficial effects shown can be referred to Figures 2 - 4 for the relevant descriptions in
[0308] Refer to Figure 6 As shown, it is a schematic structural diagram of a terminal device provided by an embodiment of the present application. The terminal device 600 is Figure 1 the terminal device in Figure 6 As shown, the terminal device 600 includes:
[0309] An obtaining unit 601, configured to obtain URLs of multiple second videos simultaneously based on the chapter information of the first video, where the chapter information of the first video is determined by making marks on the first video;
[0310] The obtaining unit 601 is further configured to obtain shards of the second video from the CDN device according to the URL of the second video A;
[0311] A playing unit 602, configured to play the second video A;
[0312] The obtaining unit 601 is further configured to, before playing the content of the preset duration of the second video A by the playing unit 602, obtain shards of the second video B from the CDN device based on the URL of the second video B, where the preset duration is less than or equal to the duration of the second video A, and the second video A and the second video B are any two of the multiple second videos.
[0313] In a possible implementation manner, the URL of the second video A includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times and a mode identifier of the second video A. The start and end times of the second video A are the start and end times of the second video A in the first video. The ciphertext part is obtained by encrypting the start and end times and the mode identifier of the second video A. The mode identifier is used to indicate that the playing mode of the first short video is the sliding view mode, and the duration of the second video is not greater than the duration of the first video A.
[0314] In a possible implementation manner, the terminal device 600 further includes:
[0315] A determining unit 603, configured to determine the duration of the second video A according to the shards of the second video A;
[0316] Or,
[0317] Determine the duration of the second video A according to the duration parameter of the second video, where the duration parameter is fed back to the terminal device simultaneously when the CDN device feeds back the shards of the second video A to the terminal device.
[0318] In a possible implementation manner, the terminal device 600 further includes:
[0319] A display unit 604, configured to display a progress bar of the second video A when playing the second video A, where the progress bar of the second video is used to identify the duration of the second video A.
[0320] It should be noted that, for the specific functional implementation manner of the terminal device 600, refer to Figure 2 the specific description of the illustrated embodiments. For example, the obtaining unit 601 is configured to execute the relevant content of S201 - S203, and the playing unit 602, the determining unit 603, and the display unit 604 are configured to execute the relevant content of S203. Each unit or module in the terminal device 600 can be separately or wholly combined into one or several other units or modules to form, or some of the units or modules can be further split into multiple smaller units or modules in terms of function to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above units or modules are divided based on logical functions. In practical applications, the function of one unit (or module) is implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).
[0321] Refer to Figure 7 As shown, it is a schematic structural diagram of a CDN device provided by an embodiment of the present application. The CDN device 700 is Figure 1 the CDN device in
[0322] a receiving unit 701, configured to receive a video obtaining request from a terminal device, where the video obtaining request includes the URL of the second video; the video obtaining request is used to request to obtain the second video; the URL of the second video includes a plaintext part and a ciphertext part, the plaintext part includes the start and end times and the mode identifier of the second video, the start and end times of the second video are the start and end times of the second video in the first video, the ciphertext part is obtained by encrypting the start and end times and the mode identifier of the second video, and the mode identifier is used to indicate that the playing mode of the first short video is the sliding view mode, and the duration of the first video is greater than or equal to the duration of the second video;
[0323] a sending unit 702, configured to send a response message to the terminal device based on the plaintext part and the ciphertext part, where the response message is used to respond to the video obtaining request.
[0324] In a possible implementation, when the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, or when the mode identifier in the plaintext part is the same as that in the ciphertext part, or when the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part and the mode identifier in the plaintext part is the same as that in the ciphertext part, the CDN device determines that the URL of the second video has been tampered with, and the response message sent by the CDN device to the terminal device includes the shards of the second video.
[0325] In a possible implementation, the CDN device 700 further includes:
[0326] A parsing unit 703, configured to parse the plaintext part to determine whether the plaintext part includes a mode identifier;
[0327] A determining unit 704, configured to, if the plaintext part includes a mode identifier, determine whether the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and whether the mode identifier in the plaintext part is the same as that in the ciphertext part;
[0328] A sending unit 702, specifically configured to, if the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and the mode identifier in the plaintext part is the same as that in the ciphertext part, determine that the URL of the second video has been tampered with, and the response message sent by the CDN device to the terminal device includes the shards of the second video.
[0329] In a possible implementation, the response message further includes a duration parameter of the second video, and the duration parameter is used to indicate the duration of the second video.
[0330] It should be noted that, for the specific functional implementation manner of the CDN device 700, refer to the specific description of the above Figure 3 illustrated embodiment. For example, the receiving unit 701 is configured to execute the relevant content of S301, and the sending unit 702, the parsing unit 703, and the determining unit 704 are configured to execute the relevant content of S302. Each unit or module in the CDN device 700 can be separately or wholly combined into one or several other units or modules to form, or some of the units or modules can be further split into multiple smaller functional units or modules to form, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present invention. The above units or modules are divided based on logical functions. In actual applications, the function of one unit (or module) is implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).
[0331] Refer to Figure 8 As shown in the figure, it is a schematic structural diagram of a VSP device provided by an embodiment of the present application. The VSP device 800 is the VSP device in Figure 1 . The VSP device 800 includes:
[0332] A receiving unit 801, configured to receive chapter information of a first video from a terminal device; wherein, the chapter information of the first video includes start and end times of one or more second videos;
[0333] A generating unit 802, configured to generate URLs of one or more second videos by the VSP device according to the chapter information of the first video and media file information. The URL of the second video includes a plaintext part and a ciphertext part. The plaintext part includes the start and end times of the second video and a mode identifier. The start and end times of the second video are the start and end times of the second video in the first video. The ciphertext part is obtained by encrypting the start and end times of the second video and the mode identifier. The mode identifier is used to indicate that the playing mode of the first short video is the sliding viewing mode, and the duration of the first video is greater than or equal to the duration of the second video;
[0334] A sending unit 803, configured to send URLs of one or more second videos by the VSP device to the terminal device.
[0335] In a possible implementation manner, the receiving unit 801 is further configured to receive a URL acquisition request from the terminal device. The URL acquisition request includes an identifier of the first video; the URL acquisition request is used to request to acquire the URL of the first video;
[0336] The generating unit 802 is further configured to generate the URL of the first video based on the content information of the first video and the media file information corresponding to the first video;
[0337] The sending unit 803 is further configured to send a response message carrying the URL of the first video to the terminal device for responding to the second URL acquisition request.
[0338] In a possible implementation manner, the VSP device 800 further includes:
[0339] An authentication unit 804, configured to obtain authentication information of a target user; determine whether the target user has the right to view the second video based on the authentication information of the target user; and perform the operation of generating the URL of the second video when it is determined that the target user has the right to view the second video.
[0340] It should be noted that, for the specific function implementation manner of the VSP device 800, refer to the above Figure 4 Specific descriptions of the illustrated embodiments. For example, the receiving unit 801 is used to execute the relevant content of S401, and the generating unit 802, the sending unit 803, and the authentication unit 804 are used to execute the relevant content of S402 - S403. Each unit or module in the VSP device 800 can be separately or wholly combined into one or several other units or modules to form, or some of the units or modules can be further split into multiple smaller units or modules in terms of function to form, which can achieve the same operations without affecting the realization of the technical effects of the embodiments of the present invention. The above units or modules are divided based on logical functions. In practical applications, the function of one unit (or module) is realized by multiple units (or modules), or the functions of multiple units (or modules) are realized by one unit (or module).
[0341] Based on the descriptions of the above method embodiments and related device embodiments, please refer to Figure 9 , a schematic structural diagram of a terminal device 900 provided by an embodiment of the present invention. Figure 9 The illustrated terminal device 900 includes a memory 901, a processor 902, a communication interface 903, and a bus 904. Among them, the memory 901, the processor 902, and the communication interface 903 are communicatively connected to each other through the bus 904.
[0342] Optionally, the memory 901 is a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
[0343] The memory 901 can store a program. When the program stored in the memory 901 is executed by the processor 902, the processor 902 and the communication interface 903 are used to execute Figure 2 each step of the video playback method of the illustrated embodiment.
[0344] The processor 902 uses a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits to execute relevant programs to implement the functions required to be executed by the units in the terminal device 600 of the embodiments of the present application, or to execute the video playback method of the illustrated embodiment of the present application Figure 2 shown in the present application.
[0345] The processor 902 can also be an integrated circuit chip with signal processing capabilities. During the implementation process, the present application Figure 2 Each step of the video playing method shown can be completed by the integrated logic circuit of the hardware in the processor 902 or the instructions in the form of software. Optionally, the processor 902 is a general-purpose processor, a digital signal processor (DSP), an ASIC, a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 902 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. Optionally, the software module is located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register or other mature storage media in the art. This storage media is located in the memory 901, and the processor 902 reads the information in the memory 901 and combines its hardware to complete the functions required to be executed by the units included in the terminal device 600 in the embodiments of the present application, or execute Figure 2 the video playing method of the embodiment shown.
[0346] The communication interface 903 uses a transceiver device such as, but not limited to, a transceiver to implement the communication between the terminal device 900 and other devices (such as Figure 1 the CDN device or VSP device shown in
[0347] The bus 904 may include a path for transmitting information between various components of the terminal device 900 (for example, the memory 901, the processor 902, the communication interface 903).
[0348] It should be noted that although Figure 9 the terminal device 900 shown only shows the memory, the processor, and the communication interface, in the specific implementation process, those skilled in the art should understand that the terminal device 900 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the terminal device 900 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the terminal device 900 may also only include the devices necessary for implementing the embodiments of the present application, and do not have to include Figure 9 all the devices shown in
[0349] Based on the description of the above method embodiments and related device embodiments, please refer to Figure 10 , A schematic structural diagram of a CDN device 1000 provided by an embodiment of the present invention is also shown. Figure 10 The CDN device 1000 shown includes a memory 1001, a processor 1002, a communication interface 1003, and a bus 1004. Among them, the memory 1001, the processor 1002, and the communication interface 1003 are communicatively connected to each other through the bus 1004.
[0350] Optionally, the memory 1001 is a ROM, a static storage device, a dynamic storage device, or a RAM.
[0351] The memory 1001 is capable of storing a program. When the program stored in the memory 1001 is executed by the processor 1002, the processor 1002 and the communication interface 1003 are used to execute Figure 3 each step of the video playback method of the shown embodiment.
[0352] The processor 1002 uses a general-purpose CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits to execute relevant programs to implement the functions required by the units in the CDN device 700 of the embodiments of the present application, or to execute the Figure 3 video playback method of the shown embodiment of the present application.
[0353] The processor 1002 can also be an integrated circuit chip with signal processing capabilities. During implementation, each step of the video playback method shown in the present application Figure 3 can be completed by the integrated logic circuit in the hardware of the processor 1002 or by instructions in software form. Optionally, the processor 1002 is a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 1002 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module is located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage media in the art. This storage media is located in the memory 1001, and the processor 1002 reads the information in the memory 1001 and combines its hardware to complete the functions required by the units included in the CDN device 700 of the embodiments of the present application, or to execute Figure 3 the video playback method of the shown embodiment.
[0354] The communication interface 1003 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the CDN device 1000 and other devices (such as VSP devices) or a communication network.
[0355] The bus 1004 may include a path for transmitting information between various components of the CDN device 1000 (for example, the memory 1001, the processor 1002, the communication interface 1003).
[0356] It should be noted that although Figure 10 the CDN device 1000 shown only shows a memory, a processor, and a communication interface, in the specific implementation process, those skilled in the art should understand that the CDN device 1000 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the CDN device 1000 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the CDN device 1000 may also only include the devices necessary for implementing the embodiments of the present application, and do not have to include Figure 10 all the devices shown in
[0357] Based on the description of the above method embodiments and related device embodiments, please refer to Figure 11 for a schematic structural diagram of a VSP device 1100 provided by an embodiment of the present invention. Figure 11 The VSP device 1100 shown includes a memory 1101, a processor 1102, a communication interface 1103, and a bus 1104. Among them, the memory 1101, the processor 1102, and the communication interface 1103 are communicatively connected to each other through the bus 1104.
[0358] Optionally, the memory 1101 is a ROM, a static storage device, a dynamic storage device, or a RAM.
[0359] The memory 1101 is capable of storing a program. When the program stored in the memory 1101 is executed by the processor 1102, the processor 1102 and the communication interface 1103 are used to execute Figure 4 each step of the video playback method of the embodiment shown.
[0360] The processor 1102 uses a general-purpose CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits to execute relevant programs to implement the functions required by the units in the VSP device 800 of the embodiments of the present application, or to execute the video playback method of the embodiment shown in the present application Figure 4 shown.
[0361] The processor 1102 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, the present application Figure 4 Each step of the video playback method shown can be completed by the integrated logic circuit of the hardware in the processor 1102 or the instructions in the form of software. Optionally, the processor 1102 is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 1102 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. Optionally, the software module is located in the random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, or other mature storage media in the art. This storage media is located in the memory 1101, and the processor 1102 reads the information in the memory 1101 and combines its hardware to complete the functions required to be executed by the units included in the VSP device 800 in the embodiments of the present application, or execute Figure 4 the video playback method of the illustrated embodiment.
[0362] The communication interface 1103 uses a transceiver device such as, but not limited to, a transceiver to implement the communication between the VSP device 1100 and other devices (such as terminal devices) or communication networks.
[0363] The bus 1104 may include a path for transmitting information between the various components of the VSP device 1100 (for example, the memory 1101, the processor 1102, the communication interface 1103).
[0364] It should be noted that although Figure 11 the illustrated VSP device 1100 only shows the memory, the processor, and the communication interface, in the specific implementation process, those skilled in the art should understand that the VSP device 1100 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the VSP device 1100 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the VSP device 1100 may also only include the devices necessary for implementing the embodiments of the present application, and do not have to include Figure 11 all the devices shown in.
[0365] The embodiments of the present application also provide a chip, the chip includes a processor and a data interface, and the processor reads the instructions stored on the memory through the data interface to implement the video playback method of the embodiments of the present application.
[0366] Optionally, as an implementation, the chip further includes a memory, and instructions are stored in the memory. The processor is configured to execute the instructions stored on the memory. When the instructions are executed, the processor is configured to execute the video playback method described above.
[0367] An embodiment of the present application further provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When it runs on a computer or a processor, the computer or the processor is caused to execute one or more steps in any of the above methods.
[0368] An embodiment of the present application further provides a computer program product containing instructions. When the computer program product runs on a computer or a processor, the computer or the processor is caused to execute one or more steps in any of the above methods.
[0369] Those skilled in the art can appreciate that the functions described in connection with the various illustrative logical blocks, modules, and algorithm steps disclosed herein can be implemented by hardware, software, firmware, or any combination thereof. If implemented in software, the functions described by the various illustrative logical blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium can include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates the transfer of a computer program from one place to another (e.g., based on a communication protocol). In this way, the computer-readable medium generally can correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or a carrier wave. The data storage medium can be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present application. The computer program product can include a computer-readable medium.
[0370] By way of example and not limitation, such computer-readable storage media include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that is accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather are directed to non-transitory tangible storage media. As used herein, disk and optical disks include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, while optical disks utilize lasers to optically reproduce data. Combinations of the above should also be included within the scope of computer-readable media.
[0371] The instructions may be executed by one or more processors, such as one or more DSPs, general purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Thus, as used herein, the term "processor" may refer to any one of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described for the various illustrative logical blocks, modules, and steps are provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Moreover, the techniques may be implemented entirely in one or more circuits or logic elements.
[0372] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there are other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Optionally, the couplings, direct couplings, or communication connections shown or discussed are through some interfaces, indirect couplings or communication connections of devices or units, such as in electrical, mechanical, or other forms.
[0373] Optionally, the unit described as a separation component is or is not physically separated, and the component displayed as a unit is or is not a physical unit, that is, located in one place or distributed to multiple network units. It is possible to select some or all of the units according to actual needs to achieve the purpose of the solution of this embodiment.
[0374] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
[0375] As described above, the above are only the specific implementation manners of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
Claims
1. A video playback method, characterized in that, applied to a terminal device, the method comprising: simultaneously obtaining the uniform resource locator URLs of a plurality of second videos based on the chapter information of a first video, wherein the chapter information of the first video is determined by making marks on the first video; obtaining shards of the second video from a content delivery network (CDN) device according to the URL of the second video A; playing the second video A, and before playing the content of the second video A for a preset duration, obtaining shards of the second video B from the CDN device based on the URL of the second video B, wherein the preset duration is less than or equal to the duration of the second video A, and the second video A and the second video B are any two of the plurality of second videos.
2. The method according to claim 1, characterized in that, the URL of the second video A includes a plaintext part and a ciphertext part, the plaintext part includes the start and end times and a mode identifier of the second video A, the start and end times of the second video A are the start and end times of the second video A in the first video, the ciphertext part is obtained by encrypting the start and end times and the mode identifier of the second video A, the mode identifier is used to indicate that the playback mode of the first short video is a swiping view mode, and the duration of the second video is not greater than the duration of the first video A.
3. The method according to claim 1 or 2, characterized in that, the method further comprises: determining the duration of the second video A according to the shards of the second video A; or, determining the duration of the second video A according to the duration parameter of the second video, wherein the duration parameter is fed back to the terminal device when the CDN device feeds back the shards of the second video A to the terminal device.
4. The method according to any one of claims 1-3, characterized in that, the method further comprises: when playing the second video A, displaying a progress bar of the second video A, and the progress bar of the second video is used to identify the duration of the second video A.
5. A video playback method, characterized in that, the method is applied to a content delivery network (CDN) device, the method comprising: receiving a video acquisition request from a terminal device, the video acquisition request including the uniform resource locator URL of a second video; the video acquisition request is used to request to acquire the second video; the URL of the second video includes a plaintext part and a ciphertext part, the plaintext part includes the start and end times and a mode identifier of the second video, the start and end times of the second video are the start and end times of the second video in the first video, the ciphertext part is obtained by encrypting the start and end times and the mode identifier of the second video, the mode identifier is used to indicate that the playback mode of the first short video is a swiping view mode, and the duration of the first video is greater than or equal to the duration of the second video; sending a response message to the terminal device based on the plaintext part and the ciphertext part, and the response message is used to respond to the video acquisition request.
6. The method according to claim 5, characterized in that, When the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, or when the mode identifier in the plaintext part is the same as that in the ciphertext part, or when the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part and the mode identifier in the plaintext part is the same as that in the ciphertext part, the response message includes shards of the second video.
7. The method according to claim 5, wherein, sending the response message to the terminal device based on the plaintext part and the ciphertext part includes: parsing the plaintext part to determine whether the plaintext part includes the mode identifier; if the plaintext part includes the mode identifier, determining whether the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and whether the mode identifier in the plaintext part is the same as that in the ciphertext part; if the start and end times of the second video in the plaintext part are the same as those of the second video in the ciphertext part, and the mode identifier in the plaintext part is the same as that in the ciphertext part, the response message includes shards of the second video.
8. The method according to claim 6 or 7, wherein, the response message further includes a duration parameter of the second video, and the duration parameter is used to indicate the duration of the second video.
9. A video playing method, wherein, the method is applied to a Video Service Platform (VSP) device, and the method includes: receiving chapter information of a first video from a terminal device; wherein, the chapter information of the first video includes start and end times of one or more second videos; generating a Uniform Resource Locator (URL) for the one or more second videos according to the chapter information of the first video and media file information, the URL of the second video includes a plaintext part and a ciphertext part, the plaintext part includes the start and end times of the second video and a mode identifier, the start and end times of the second video are the start and end times of the second video in the first video, the ciphertext part is obtained by encrypting the start and end times of the second video and the mode identifier, the mode identifier is used to indicate that the playing mode of the first short video is a sliding view mode, and the duration of the first video is greater than or equal to the duration of the second video; sending the URL of the one or more second videos to the terminal device.
10. The method according to claim 9, wherein, the method further includes: receiving a URL acquisition request from the terminal device, the URL acquisition request includes an identifier of the first video; the URL acquisition request is used to request to obtain the URL of the first video; generating the URL of the first video based on the content information of the first video and the media file information corresponding to the first video; sending a response message carrying the URL of the first video to the terminal device for responding to the second URL acquisition request.
11. The method according to claim 10, wherein, the method further comprises: obtaining the authentication information of the target user; determining whether the target user has the permission to view the second video based on the authentication information of the target user; when it is determined that the target user has the permission to view the second video, performing the operation of generating the URL of the second video.
12. A terminal device, wherein, the terminal device comprises units or modules for implementing any one of claims 1-4.
13. A content delivery network (CDN) device, wherein, the CDN device comprises units or modules for implementing any one of claims 5-8.
14. A video service platform (VSP) device, wherein, the VSP device comprises units or modules for implementing any one of claims 9-11.
15. A video playing method, wherein, the method is applied to a video playing system, and the video playing system comprises a terminal device, a content provider (CP) device, a video service platform (VSP) device, and a content delivery network (CDN) device; the terminal device obtains the chapter information of the first video from the CP device; the terminal device sends the chapter information of the first video to the VSP device; the VSP device simultaneously sends uniform resource locators (URLs) of a plurality of second videos to the terminal device based on the chapter information of the first video; the terminal device sends the URL of the second video A to the CDN device; the CDN device sends the shards of the second video A to the terminal device based on the URL of the second video A; the terminal device plays the second video A, and before playing the content of the second video A for a preset duration, obtains the shards of the second video B from the CDN device based on the URL of the second video B, wherein the preset duration is less than or equal to the duration of the second video A; the second video A and the second video B are any two of the plurality of second videos.
16. A video playing system, wherein, the video playing system comprises a terminal device, a content provider (CP) device, a video service platform (VSP) device, and a content delivery network (CDN) device, the terminal device is configured to obtain the chapter information of the first video from the CP device; the terminal device is configured to send the chapter information of the first video to the VSP device; the VSP device is configured to simultaneously send uniform resource locators (URLs) of a plurality of second videos to the terminal device based on the chapter information of the first video; the terminal device is configured to send the URL of the second video A to the CDN device; the CDN device is configured to send the shards of the second video A to the terminal device based on the URL of the second video A; The terminal device is used to play the second video A, and before playing the content of the preset duration of the second video A, obtain the shards of the second video B from the CDN device based on the URL of the second video B, where the preset duration is less than or equal to the duration of the second video A; The second video A and the second video B are any two of the multiple second videos.
17. A terminal device, characterized in that, it includes a processor and a memory, wherein the memory is used to store program code, and the processor is used to execute the program code to implement the method according to any one of claims 1 to 4.
18. A content delivery network (CDN) device, characterized in that, it includes a processor and a memory, wherein the memory is used to store program code, and the processor is used to execute the program code to implement the method according to any one of claims 5 - 8.
19. A video service platform (VSP) device, characterized in that, it includes a processor and a memory, wherein the memory is used to store program code, and the processor is used to execute the program code to implement the method according to any one of claims 9 - 11.
20. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 - 11.