A live video playing method, a client and a medium

By periodically polling and reusing network connections to obtain live stream data in the video streaming page, the problem of live video playback latency is solved, achieving low-latency live video switching and an improved user experience.

CN117640970BActive Publication Date: 2026-08-25SHUXING TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210970162.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2026-08-25
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

The playback latency issue in live video, especially when the client switches from the video streaming page to the live room, cannot be effectively reduced by existing technologies, resulting in a poor user experience.

Method used

The system periodically polls the live video stream within the video streaming page while maintaining a network connection. When a consumption command is detected, the network connection is reused to obtain the live stream data. When a state transition is detected, the live stream image is placed on top of the playback layer to avoid re-establishing a connection.

Benefits of technology

By reducing network connection setup time, the playback latency of live video is reduced, improving the user's viewing experience and ensuring a seamless and low-latency switching process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640970B_ABST
    Figure CN117640970B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a live video playing method, a client and a medium, wherein the method comprises the following steps: acquiring a video list in a video in-stream page; if there is a live video in the video list, determining N live videos from the video list, and performing a periodic polling operation on the N live videos; when a consumption instruction of a target live video in the N live videos is detected, multiplexing a network connection of the target live video to acquire live stream data of the target live video, and playing the target live video in the video in-stream page of the client by using the live stream data; when a trigger operation for switching the playing state of the target live video from the video in-stream page to a playing state of entering a live room is detected, a current live stream picture of the target live video in the video in-stream page is placed in a playing top layer, so that the playing delay can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a live video playback method, client, and medium. Background Technology

[0002] With the rapid development of multimedia technology, live streaming services have also experienced rapid growth. Currently, when a video is opened in a video playback client, it typically leads to an in-stream page, which can contain a large number of on-demand and live videos. Due to the real-time nature of live streaming, each time a live video is consumed, the live stream data needs to be fetched from the server in real time, which may result in significant playback latency. Therefore, reducing live video playback latency has become a current research hotspot. Summary of the Invention

[0003] This application provides a live video playback method, client, and medium that can reduce the playback latency of live videos.

[0004] The first aspect of this application discloses a method for playing live video, the method comprising:

[0005] Obtain the video list on the video streaming page, and detect whether there are any live videos of the live streaming type in the video list;

[0006] If they exist, N live videos are determined from the video list, and the N live videos are periodically polled; one polling operation for any live video is used to maintain the network connection between the client and the corresponding server for any live video, where N is a positive integer;

[0007] When a consumption instruction for a target live video among the N live videos is detected, the network connection of the target live video is reused to obtain the live stream data of the target live video, and the live stream data is used to play the target live video in the video in-stream page of the client.

[0008] When a trigger operation is detected that the target live video has changed from the playback state of the video in-stream page to the playback state of the live room, the current live stream image of the target live video in the video in-stream page is placed on the top layer of the playback.

[0009] A second aspect of this application discloses a live video playback device, the device comprising:

[0010] The acquisition unit is used to acquire a list of videos in the video streaming page and detect whether there are live videos of the live streaming type in the video list;

[0011] A polling unit is used to determine N live videos from the video list if they exist, and to perform a periodic polling operation on the N live videos; one polling operation for any live video is used to maintain the network connection between the client and the corresponding server for any live video, where N is a positive integer;

[0012] The first playback unit is used to, when a consumption instruction for a target live video among the N live videos is detected, reuse the network connection of the target live video to obtain the live stream data of the target live video, and use the live stream data to play the target live video in the video in-stream page of the client.

[0013] The second playback unit is used to place the current live stream image of the target live video in the video in the video in the top layer of playback when a trigger operation is detected that the playback state of the target live video has changed from the playback state of the video in the in-stream page to the playback state of entering the live room.

[0014] A third aspect of this application discloses a client, including a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the method of the first aspect described above.

[0015] A fourth aspect of this application discloses a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described in the first aspect.

[0016] The fifth aspect of this application discloses a computer program product or computer program, which includes program instructions that, when executed by a processor, implement the method described in the first aspect.

[0017] In this embodiment, a video list on the video in-stream page can be obtained. If a live video of the live type is detected in the video list, N live videos can be determined from the video list, and a periodic polling operation can be performed on the N live videos. One polling operation for any live video can be used to maintain the network connection between the client and the corresponding server for any live video, where N is a positive integer. When a consumption instruction for a target live video among the N live videos is detected, the network connection of the target live video can be reused to obtain the live stream data of the target live video, and the live stream data can be used to play the target live video on the client's video in-stream page. When a trigger operation is detected that changes the playback state of the target live video from the video in-stream page to the playback state of entering the live room, the current live stream image of the target live video on the video in-stream page can be placed on top of the playback. This can effectively reduce the playback latency of the live video and improve the user viewing experience. Attached Figure Description

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

[0019] Figure 1 This is a schematic diagram of the architecture of a live video playback system provided in an embodiment of this application;

[0020] Figure 2 This is a flowchart illustrating a live video playback method provided in an embodiment of this application;

[0021] Figure 3a This is a schematic diagram of the interface of a live stream when a target live video is played on a video streaming page, according to an embodiment of this application.

[0022] Figure 3b This is a schematic diagram of the interface for switching between the playback state of a target live video and the playback state of entering the live room, provided in an embodiment of this application.

[0023] Figure 3c This is a schematic diagram of a live stream interface for clearing real-time live information, provided in an embodiment of this application.

[0024] Figure 4 This is a flowchart illustrating another live video playback method provided in an embodiment of this application;

[0025] Figure 5aThis is a schematic diagram of the interface of a live stream when a target live video is played in a live streaming room, according to an embodiment of this application.

[0026] Figure 5b This is a schematic diagram of the interface for switching between the playback state of a target live video and the playback state of entering the video in-stream page, as provided in an embodiment of this application.

[0027] Figure 6 This is a flowchart illustrating another live video playback method provided in an embodiment of this application;

[0028] Figure 7 This is a schematic diagram of the structure of a live video playback device provided in an embodiment of this application;

[0029] Figure 8 This is a schematic diagram of the structure of a client provided in an embodiment of this application. Detailed Implementation

[0030] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0031] To reduce playback latency of live video, this application provides a live video playback scheme. The principle of this scheme is as follows: When a target user plays video using a client, a video list on the video in-stream page can be obtained. The live videos requiring polling are then identified from this list, and polling is performed on these live videos to maintain network connectivity with the corresponding server. When a live video consumption instruction is detected, the network connection can be reused to retrieve the live stream data from the corresponding server, and the live stream data can be used to play the live video on the client's video in-stream page. When a trigger operation is detected that changes the playback state of the live video from the video in-stream page to the live room playback state, the currently playing live stream on the video in-stream page can be left running; for example, the current live stream can be placed at the top of the playback layer.

[0032] Through the above implementation methods, during actual consumption of live video, the live stream data can be pulled directly without re-establishing a network connection, thereby improving the speed of live stream data acquisition and achieving low latency, i.e., reducing playback delay or startup delay. When the live video enters the live room from the video in-stream page, the currently playing live stream on the video in-stream page is not closed, thus achieving the goal of not interrupting the user's consumption experience and improving the user's consumption experience.

[0033] In practical implementation, the entity executing the live video playback mentioned above can be a client. This client can be a client with video playback capabilities running on a terminal, such as a multimedia playback client, a browser client, a news feed client, and so on. The terminal mentioned here can include, but is not limited to, smartphones, tablets, laptops, desktop computers, smart TVs, etc.

[0034] Based on the aforementioned live video playback solutions, this application provides an architectural diagram of a live video playback system suitable for live video playback solutions, as shown below. Figure 1 As shown, this application relates to client 10 and server 11.

[0035] Taking client 10 as an example, the target object (which can refer to any user) can perform relevant operations to trigger video playback on the playback interface of client 10. When client 10 detects the relevant operation, it can trigger a data acquisition request to server 11 to obtain the video list. After server 11 obtains the data acquisition request, it can send the video list to client 10. After obtaining the video list, client 10 can determine the live videos that need to be polled from the video list. For example, if there are N live videos, then the N live videos can be periodically polled, where N is a positive integer.

[0036] Subsequently, when client 10 detects a consumption instruction for a target live video (which can refer to any one of the N live videos) among N live videos, client 10 can reuse the network connection of the target live video to obtain the live stream data of the target live video from server 11, and use the live stream data to play the target live video in the client 10's video in-stream page. Furthermore, when client 10 detects a trigger operation that changes the playback state of the target live video from the video in-stream page to the playback state of entering the live room, client 10 can place the current live stream image of the target live video in the video in-stream page at the top of the playback hierarchy.

[0037] in, Figure 1 The server 11 shown can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, big data, and artificial intelligence platforms, etc. The client 10 and server 11 can be connected directly or indirectly via wired or wireless communication, which is not limited herein.

[0038] It should be noted that all user information-related data in this application embodiment is data authorized by the user.

[0039] Based on the above description of the live video playback scheme, this application proposes a live video playback method, which is mainly described with the client as the execution subject; please refer to Figure 2 The live video playback method may include the following steps S201-S204:

[0040] S201, retrieve the video list on the video streaming page, and check if there are any live videos of the live streaming type in the video list.

[0041] The video list may include on-demand videos (referred to as video-on-demand videos) or live videos (referred to as live videos). In one implementation, after obtaining the video list, it can be first checked whether there are any live videos in the video list, and the decision to execute step S202 is based on the detection result. Optionally, each video in the video list may be associated with corresponding video type indication information. This indication information can be used to indicate the video type, and the presence of live videos in the video list can be detected using the indication information corresponding to each video.

[0042] The container form during video playback on the client side can be immersive streaming, list streaming, etc., and this application does not impose specific limitations. The container form can refer to the presentation format of the information stream (such as the video stream in the embodiments of this application). Immersive streaming typically maximizes the display of information content to the user, with a high degree of focus; for example, the entire playback interface of the client is a display of video content (or the playback of a single video). In the immersive content container form, a good viewing experience can be provided for live video. This application mainly uses immersive streaming as an example.

[0043] S202, if they exist, determine N live videos from the video list and perform periodic polling on the N live videos; one polling operation for any live video is used to maintain the network connection between the client and the corresponding server for any live video.

[0044] In one implementation, if live videos exist in the video list, the live videos to be polled can be selected from the list. For example, N live videos can be determined from the video list, and these N live videos can be periodically polled to maintain the network connection between the client and the corresponding server for each live video, or in other words, to keep the connection between the client and the server corresponding to the live video open. The servers corresponding to the live videos can include one or more, meaning the live videos can be delivered to the client by any one of these servers. In the polling operation, if a live video corresponds to multiple servers, for a single polling operation of any live video, one of these servers can be selected to maintain the network connection with the client. When selecting a server, it can be randomly selected from these servers, or it can be selected based on server characteristics (such as remaining load, transmission bandwidth, security factor, etc.). For example, servers with larger remaining load (e.g., remaining load greater than a preset remaining load), larger transmission bandwidth (e.g., transmission bandwidth greater than a preset transmission bandwidth), or higher security factor (e.g., security factor greater than a preset security factor) can be preferentially selected as the servers to maintain the network connection with. The specific values ​​corresponding to the aforementioned preset values ​​(such as preset remaining load, preset transmission bandwidth, and preset security factor) are not limited.

[0045] Considering that when the target audience watches videos through a client, they typically first see the video adjacent to the currently playing video on the client's playback interface, the N live videos here can refer to the live videos adjacent to the currently playing video in the video list. Here, the currently playing video is a video in the video list (which can be a live video or a video-on-demand video).

[0046] In one implementation, if the target object switches the video played on the playback interface by swiping up, then the live video adjacent to the current live video can refer to the live video adjacent to the current live video at the top. If the target object switches the video played on the playback interface by swiping down, then the live video adjacent to the current live video at the bottom can refer to the live video adjacent to the current live video at the top. If the target object switches the video played on the playback interface by swiping down and swiping up, then the live video adjacent to the current live video at the top can refer to the live videos adjacent to the current live video at the bottom and the live videos adjacent to the current live video at the top.

[0047] It's understandable that the videos in the video list are arranged sequentially, and their positions within the list are relative. "Upward adjacent" refers to a video that is listed before the currently playing video and is adjacent to it; conversely, "downward adjacent" refers to a video that is listed after the currently playing video and is adjacent to it. For example, if videos 1, 2, 3, and 4 are listed in the video list in the order of 1, 2, 3, and 4, and the currently playing video is 2, then the downward adjacent videos are 3 and 4, and the upward adjacent video is 1.

[0048] Where N is a positive integer, and its value can be preset, such as to 3 or 5; it can also be determined based on characteristics such as the video scrolling frequency of the target object and the duration of each video in the video list. The video scrolling frequency can refer to the number of videos viewed within a specified time (e.g., one minute). For example, the N value can be determined using the video scrolling frequency. Optionally, the video scrolling frequency can be positively correlated with the N value; that is, if the video scrolling frequency is fast, the N value can be set to a larger value, and if the video scrolling frequency is slow, the N value can be set to a smaller value. This setting relationship allows for more live videos to maintain a network connection in advance when the target object scrolls at a fast frequency, so that when scrolling to the corresponding live video, the existing network connection can be used to acquire the live stream data. At a slower scrolling frequency, by setting fewer live videos requiring polling, the overhead caused by polling operations can also be effectively reduced.

[0049] For example, assuming N is 3, and adjacent points to the next adjacent; if the videos in the video list that are next to the currently playing video include: live video 1, video-on-demand 1, video-on-demand 2, live video 2, video-on-demand 3, live video 3, ..., then the 3 live videos determined from the video list are: live video 1, live video 2, and live video 3.

[0050] S203, when a consumption instruction for the target live video is detected among N live videos, the network connection of the target live video is reused to obtain the live stream data of the target live video, and the live stream data is used to play the target live video in the video in-stream page of the client.

[0051] It is understandable that the target audience is watching various videos on the client's playback interface, and can switch between videos by performing actions such as swiping down, up, left, or right on the playback interface. Therefore, when it is detected that the target live video needs to be displayed on the client's playback interface, it can be determined that a consumption instruction for the target live video has been detected among N live videos. This consumption instruction can be an instruction triggered by the target audience to play the target live video on the playback interface; or, it can also be an instruction triggered by the target audience to perform actions such as sharing, commenting, or liking the video.

[0052] In one implementation, since step S202 mentions that the network connection between the client and the server can be maintained through polling, when a consumption instruction for a target live video is detected among N live videos, the network connection for that target live video can be reused to obtain the live stream data of the target video from the server, and the obtained live stream data can be used to play the target live video in the client's video in-stream page. It can be seen that by maintaining the network connection during the polling operation, the time required to establish a network connection to obtain live stream data during actual consumption of the live video can be reduced, thereby improving the speed of obtaining live stream data and achieving low latency in live video playback, i.e., reducing the start-up delay of the live stream.

[0053] S204, when a trigger operation is detected that the playback state of the target live video changes from the playback state of the video in-stream page to the playback state of the live room, the current live stream screen of the target live video in the video in-stream page is placed on the top layer of the playback.

[0054] In one implementation, when a target object needs to enter the live stream room of a target live video, it can perform a target operation (such as pressing or clicking) on ​​the client's playback interface to trigger entry into the live stream room. This can be achieved by detecting the target object performing a target operation on the playback interface, thus determining a trigger operation to switch the target live video's playback state from the video's internal streaming state to the live stream room playback state. Optionally, the trigger operation can also be determined by detecting the target object performing a target operation in a designated trigger area of ​​the playback interface. This designated trigger area can be pre-set; for example, it can be the entire area of ​​the playback interface, or a portion of the playback interface. This designated trigger area can be marked on the playback interface so that the target object can directly perform the target operation in the marked area, thereby triggering entry into the live stream room. For example, see... Figure 3a The image shown is the playback interface of the target live video. The specified trigger area can be... Figure 3a The area marked with 31.

[0055] In one implementation, after the client detects the trigger operation to enter the live stream room, the currently playing live stream on the video in-stream page can be reused without closing it, thus achieving the switch between the video in-stream page and the entered live stream room. If a custom animation can be triggered, the current live stream frame of the target live video on the video in-stream page can be placed on top of the playback, without generating a new live stream frame. This avoids significant delays caused by opening a new page (or frame), achieving the goal of not interrupting the user's viewing experience and achieving seamless and low-latency switching between live stream scenarios. When placing the current live stream frame on top of the playback, other information, such as real-time user comments and viewer count information, can also be displayed in the live stream interface of the live stream room, allowing the target audience to better understand the real-time information of the target live video and improving the user experience. For example, see... Figure 3b As shown, Figure 3b The interface marked with 301 represents the live stream of the target live video within the video's streaming page. If the target clicks on the area marked "Enter Live Room," the client's playback interface can be updated to the interface marked with 302, which is the live stream screen after the target live video enters the live room. It can be seen that the live stream screen displayed in interface 302 is the same as that displayed in interface 301, and interface 302 can also display other real-time live information, such as the number of viewers (e.g., "10,000 viewed") and user comments (e.g., "Wang Wu: Buy, buy, buy").

[0056] In one implementation, when a target audience enters the live stream to watch the target live video, as mentioned earlier, the live stream interface can display real-time live information (such as user comments, number of viewers, etc.). To improve the user's viewing experience and allow them to see the target live video more clearly, this real-time live information can be deleted. For example, a full-screen deletion of all real-time live information on the live stream interface can be performed, or only partial deletion can be made, retaining only the information of interest to the target audience. For instance, only user comments or only the number of viewers can be deleted. After deleting the real-time live information, it can also be restored to enhance the flexibility of the real-time live information display and thus improve the user experience.

[0057] Optionally, when live stream information is present on the live stream interface, the operation performed by the target object on the live stream interface can be detected. If the detected operation is a full-screen clear operation, all live stream information on the live stream interface can be deleted. For example, a full-screen clear operation can be a swipe operation from left to right or from right to left. When no live stream information is present on the live stream interface, the operation performed by the target object on the live stream interface can also be detected. If the detected operation is a full-screen restore operation, all live stream information on the live stream interface can be restored. For example, a full-screen restore operation can be the opposite of a full-screen clear operation. For instance, if a full-screen clear operation is a swipe operation from left to right, then a full-screen restore operation can be a swipe operation from right to left.

[0058] Optionally, each live stream information displayed on the live stream interface can have a deletion icon, allowing a target to partially delete live stream information based on this icon. For example, for a given live stream information, a target can click or press the corresponding deletion icon to delete that live stream information. That is, when an action (such as clicking or pressing) on ​​the deletion icon is detected, the deletion of the corresponding live stream information can be triggered. This deletion icon can be displayed explicitly or implicitly on the live stream interface. When the deletion icon is implicitly displayed, it can be made explicit first, such as when an explicit trigger action (such as a double-click or single-click at the location of a live stream information) is detected. If it is necessary to restore any one of the multiple live stream information pieces, when a restoration action (such as a click at the original location of the live stream information) is detected, the corresponding live stream information can be redisplayed on the live stream interface.

[0059] For example, see Figure 3c As shown, a delete icon is present at the corresponding location of each live stream message. This delete icon can be used as follows: Figure 3c The icon marked 32 is a deletion indicator, which is only an example and can be any other deletion indicator. When the target user does not want to see user comments, they can click on icon 32 to delete the user comments from the live stream interface. After clicking icon 32, the live stream interface can be updated from the interface marked 303 to the interface marked 304.

[0060] In one implementation, any piece of live video information on the live stream interface can be scaled (enlarged or reduced). For example, if the target object wants the area occupied by the live stream information on the live stream interface to be smaller, the live stream information can be reduced in size; if the target object wants the area occupied by the live stream information on the live stream interface to be larger, the live stream information can be enlarged in size. Through scaling operations, the live stream information can be transformed to the size required by the target object, thereby enhancing the user experience. In specific implementation, if a zoom-in operation by the target object on the live stream interface for any piece of live stream information is detected, the corresponding live stream information can be enlarged; if a zoom-out operation by the target object on the live stream interface for any piece of live stream information is detected, the corresponding live stream information can be reduced in size.

[0061] In one implementation, the position of any live video information on the live stream interface can be changed to place the live information at the desired location of the target object. Specifically, if a position change operation (such as dragging the live information) is detected on the live stream interface by the target object, the corresponding live information can be moved to the endpoint position corresponding to the position change operation.

[0062] In this embodiment, the presence of a live video in the current video list can be checked first within the video in-stream page. If a live video is present, it can be polled to maintain network connectivity between the client and server. Therefore, when the target user actually consumes the live video, the live stream data can be pulled directly without re-establishing a network connection, thus improving the data acquisition speed and achieving low latency. When the live video enters the live room from the video in-stream page, a custom animation can be used to place the currently playing live stream on top of the playback layer without closing it, thereby preserving the user's viewing experience and enhancing it.

[0063] Please see Figure 4 This is a flowchart illustrating another live video playback method provided in this application embodiment. This application embodiment primarily describes the process using a client as the execution entity; please refer to... Figure 4 The live video playback method may include the following steps S401-S406:

[0064] S401, retrieve the video list on the video streaming page, and check if there are any live videos of the live streaming type in the video list.

[0065] The specific implementation of step S401 can be found in the specific implementation of step S201 above, and will not be repeated here.

[0066] S402, if they exist, determine N live videos from the video list and perform periodic polling on the N live videos; one polling operation for any live video is used to maintain the network connection between the client and the server under any live video.

[0067] In one implementation, if a live video is detected in the video list, N live videos can be determined from the video list. These N live videos can be determined in any of the following ways, which are described in detail below:

[0068] Method 1: First, the currently playing video on the client's playback interface can be determined. Then, N adjacent live videos can be selected from the video list. These N adjacent live videos are the N live videos required in this embodiment. The specific implementation of determining adjacent live videos can be found in step S202 above, and will not be repeated here.

[0069] Method Two: First, determine the currently playing video on the client's playback interface. Then, select M live videos adjacent to the currently playing video from the video list, where M is a positive integer. After determining these M live videos, filter them to obtain N live videos. Various filtering features can be used to perform reasonable selection, such as object features of the target object, video features of the live videos, etc. The following explanation uses different filtering features as examples to illustrate how to filter N live videos from M live videos.

[0070] (1) When filtering features that are the object features of the target object

[0071] Among them, object characteristics can refer to the content type of videos that the target object is interested in. For example, content type can refer to shopping, sports, singing, etc.

[0072] First, the object characteristics of the target object can be obtained, which can be determined based on the target object's historical viewing records within a historical time period. The so-called historical time period refers to the time period preceding the current time and with a preset time interval (e.g., 1 day, 3 days, etc.). The current time here can refer to the moment when a video playback request is detected. The historical viewing records contain the videos watched by the target object. These videos can refer to any video type, such as only on-demand videos, only live videos, or both live videos and on-demand videos; there are no restrictions. The object characteristics of the target object can then be determined based on the content types corresponding to these videos. Optionally, the content types of each video in the historical viewing records can be obtained first; then, a target number of content types can be selected from these content types as the object characteristics of the target object. For example, we can count the number of videos for each content type, then sort the content types in descending order of quantity to obtain a content type ranking result. Finally, we select the top K content types from this ranking result, where K is the target quantity, which can be preset and its specific value is not limited. The selected content types then represent the object characteristics of the target object.

[0073] Then, a reference content type can be determined based on the object characteristics. For example, the object characteristics can be directly used as the reference content type; or a subset of object characteristics can be selected as the reference content type, for example, when the number of content types indicated by the object characteristics is large. Specifically, when the number of content types indicated by the object characteristics (i.e., the target number mentioned above) exceeds a preset number, a specified number of object characteristics can be selected as reference content types from the object characteristics; when the number of content types indicated by the object characteristics does not exceed the preset number, the object characteristics can be directly used as the reference content type. The preset number can be set in advance and is not limited thereto. Optionally, when selecting a specified number of object characteristics as reference content types, a specified number of object characteristics can be randomly selected from the object characteristics, or the selection can be based on the number of videos under the content type indicated by the object characteristics. The selection operation here can also select the content type with a larger number of videos under the content type. The specific implementation of this selection can refer to the implementation of the selection operation when determining object characteristics mentioned above. For example, if the object characteristics include shopping type, sports type, singing type, etc., then the reference content type can include all of these object characteristics, or the reference content type can include shopping type, sports type, and singing type.

[0074] Finally, the reference content type can be matched with the content type of each of the M live videos. If a match is found, the live videos that match the reference content type can be selected from the M live videos and used as N live videos.

[0075] In summary, filtering live videos based on the target audience's characteristics can identify those videos that are of interest to the target audience from a large pool of live videos. Subsequently, the network connection maintained during the polling operation can be used to quickly retrieve the live stream data corresponding to these videos, thereby accelerating the playback startup time and improving the user viewing experience.

[0076] (2) When the filtering feature is a live video feature

[0077] Among them, the video features can be historical viewing information of the live video, which can be one or more of the following: historical click count, historical viewing duration, historical sharing count, etc. This application does not make specific limitations.

[0078] Specifically, the video features of each of the M live videos can be obtained. Then, the M live videos can be sorted according to the video features of each live video to obtain a video sorting result. Then, the top N live videos can be selected from the video sorting result.

[0079] For example, taking historical viewing duration as a video feature in historical viewing information, M live videos can be sorted in descending order of historical viewing duration to obtain a video ranking result based on historical viewing duration. Then, the top N live videos can be selected from this ranking result. Similarly, taking historical click count as a video feature in historical viewing information, M live videos can be sorted in descending order of historical click count to obtain a video ranking result based on historical click count. Then, the top N live videos can be selected from this ranking result. Furthermore, taking historical viewing duration and historical click count as video features in historical viewing information, the historical viewing duration and historical click count of each live video can be weighted and summed to obtain a weighted sum result for each live video. Then, the M live videos can be sorted in descending order of the weighted sum result to obtain a video ranking result. Finally, the top N live videos can be selected from this ranking result. In the weighted summation process, the weight coefficients corresponding to the historical viewing duration and historical viewing information can be preset, and their specific values ​​are not specifically limited in this application.

[0080] In summary, filtering live streams based on their video characteristics can identify the most popular ones from a large pool of live streams. This allows for faster retrieval of the live stream data corresponding to these videos by leveraging the network connection maintained during polling, thus accelerating playback and improving the user viewing experience.

[0081] (3) When filtering for object features of the target object and video features of the live video (i.e., historical viewing information).

[0082] First, the object characteristics of the target object and the historical viewing information of each of the M live videos can be obtained. Then, based on the object characteristics and the historical viewing information of each live video, N live videos can be selected from the M live videos. Optionally, the reference content type can be determined based on the object characteristics first; live videos that match the reference content type can be selected from the M live videos and added to the candidate live video set; after obtaining the candidate live video set, N live videos can be further selected from the candidate live video set based on the historical viewing information of each candidate live video in the candidate live video set. The specific implementation method for obtaining the candidate live video set can refer to the description in (1) above, and the specific implementation method for selecting N live videos from the candidate live video set can refer to the description in (2) above, which will not be repeated here. It should be noted that the live videos can be selected sequentially according to the object characteristics and historical viewing information, or the live videos can be selected sequentially according to the historical viewing information and object characteristics.

[0083] In one implementation, N live videos are periodically polled. The target period for the polling operation can be arbitrarily set or set according to a preset rule. For example, the preset rule can be related to the video sliding frequency of the target object in a historical time period, the value of N, etc. The determination of the target period is explained in detail below.

[0084] (1) When using video sliding frequency to determine the target period

[0085] The target period can be negatively correlated with the video sliding frequency. That is, when the target object's video sliding frequency is high, the target period duration can be set to be shorter, and when the target object's video sliding frequency is low, the target period duration can be set to be longer. Optionally, a mapping relationship between the period and the video sliding frequency can be preset to determine the target period. For example, the video sliding frequency of the target object within a historical time period can be obtained, and the mapping relationship can also be obtained to query the period corresponding to the video sliding frequency. The queried period is the target period for the polling operation. Optionally, the target period can also be determined based on the video sliding frequency and a preset sliding frequency. For example, the video sliding frequency of the target object within a historical time period can be obtained; if the video sliding frequency exceeds the preset sliding frequency, N live videos can be polled according to a first period; if the video sliding frequency does not exceed the preset sliding frequency, N live videos can be polled according to a second period; wherein the duration of the first period is shorter than the duration of the second period.

[0086] (2) When using the N value to determine the target period

[0087] The target period can be negatively correlated with the value of N; that is, the larger the value of N, the shorter the target period, and vice versa. Optionally, a mapping relationship between the period and the value of N can be preset to determine the target period. For example, after determining the value of N, the mapping relationship can be obtained to query the period corresponding to the value of N, and the queried period is the target period for the polling operation. Optionally, the target period can also be determined based on the value of N and a preset value of N. For example, if the value of N exceeds the preset value of N, the N live videos can be polled according to the first period; if the value of N does not exceed the preset value of N, the N live videos can be polled according to the second period.

[0088] In summary, by using the video scrolling frequency or the N value to determine the target period, a shorter period can be set when the video scrolling frequency is fast or the N value is large, thus speeding up the polling operation and ensuring that the live video maintains a network connection as much as possible when quickly scrolling to a specific live video. Conversely, a longer period can be set when the video scrolling frequency is slow or the N value is small, thus slowing down the polling operation and effectively reducing the overhead caused by polling.

[0089] In one implementation, before polling N live videos, playback permission checks can be performed on each of the N live videos to ensure the reliability of video playback. Optionally, the object identifier of the target object can be obtained to perform playback permission checks on each of the N live videos based on the object identifier. Each live video can be pre-set with a playback identifier corresponding to playback permission. The object identifier can be matched with the playback identifier of each live video. If the object identifier matches the playback identifier, the live video corresponding to the matching playback identifier is determined to have passed the playback permission check, while the live video that does not match the playback identifier is determined to have failed the playback permission check. Then, for any live video, if any live video passes the playback permission check, the step of periodically polling any live video can be performed. If any live video fails the playback permission check, this live video can be filtered out, that is, the periodic polling operation on this live video is not performed. For example, the object identifier can be the age of the target object, and the playback identifier of the live video can refer to the age at which the video is allowed to be viewed (such as a specific age range). For example, suppose a live video's playback identifier is "22 years and older". If the target audience identifier is "15 years old", the live video can be filtered out; if the target audience identifier is "25 years old", the live video will not be filtered out. Similarly, the target audience identifier could be the profession of the intended viewers, and the live video's playback identifier could refer to the applicable professions for watching the video. The target audience identifier and playback identifier can also be other information, which will not be listed here.

[0090] In one implementation, during the periodic polling of N live videos, abnormal situations may occur, such as network instability, CDN (Content Delivery Network) node errors, or faults in the live video itself, causing the live video to fail to maintain a network connection. In this case, to ensure that the live stream data can be successfully obtained through the network connection for playback in subsequent live video consumption, disaster recovery processing can be performed on the live videos that have failed to maintain a network connection (such as live videos awaiting reconnection). This increases disaster recovery capacity for abnormal situations such as network instability and CDN node errors, thereby improving system stability.

[0091] Optionally, if any live video awaiting reconnection fails to maintain a network connection during any polling operation in the periodic polling process, a retry to maintain the network connection for that live video can be performed according to the disaster recovery rules. If the live video awaiting reconnection still fails to maintain a network connection during the retry process, it can be removed from the video list to ensure the reliability of the live videos in the list. The disaster recovery rules can refer to retrying the network connection for the live video awaiting reconnection in the L subsequent polling operations of any given polling operation, until the live video awaiting reconnection successfully maintains a network connection in one of the L subsequent polling operations, at which point the retry operation can be stopped. The value of L can be preset; for example, L can be 1, 2, etc.

[0092] For example, suppose the current polling operation is the 3rd polling operation. For instance, with L = 1, this can be understood as retrying to maintain the network connection for the live video to be reconnected in the 4th polling operation. If the live video to be reconnected has not successfully maintained the network connection by the 4th polling operation, it can be removed from the video list. For instance, with L = 2, this can be understood as retrying to maintain the network connection for the live video to be reconnected in the 4th polling operation. If the live video to be reconnected successfully maintains the network connection in the 4th polling operation, there is no need to retry in the 5th polling operation, and the live video to be reconnected will not be removed from the video list. If the live video to be reconnected has not successfully maintained the network connection by the 4th polling operation, then retrying to maintain the network connection for the live video to be reconnected in the 5th polling operation; if the live video to be reconnected has not successfully maintained the network connection by the 5th polling operation, it can be removed from the video list. If the live video to be reconnected successfully maintains its network connection during the 5th polling operation, it will not be removed from the video list.

[0093] Optionally, the servers corresponding to the live video can include one or more, meaning the live video can be delivered to the client by any one of these servers. When there is only one server corresponding to the live video to be reconnected to, the client can retry the network connection with that single server during the hold-and-retry operation. When there are multiple servers corresponding to the live video to be reconnected to, server switching can be performed during the hold-and-retry operation, meaning the client can retry the network connection with multiple servers. In the case of retries between the client and multiple servers, during the subsequent L rounds of polling, the retry can be performed sequentially with each server in any of the subsequent L rounds, or it can be performed with only one server in this single round; there is no limitation on this. In one embodiment, to reduce overhead, the number of server switching attempts can also be set. Specifically, if the live video to be reconnected can successfully maintain its network connection within the number of server switching attempts, the live video to be reconnected will not be removed from the video list. However, if the live video to be reconnected fails to maintain its network connection after the number of server switching attempts has been exceeded, the live video to be reconnected will be removed from the video list.

[0094] In summary, by adding a polling mechanism to the live videos within the video streaming page, we can accurately mitigate potential failure risks. These failure risks can refer to the risk of network connection failure during the actual consumption of the live video. The polling mechanism can filter out problematic live videos in advance, thus avoiding situations where the live stream data cannot be obtained due to unsuccessful network connection during the actual consumption of the live video, resulting in failure to display the live stream.

[0095] In one implementation, if a live stream has ended, the client's live stream interface might go black when swiping to that video. Furthermore, the user needs to wait for the corresponding streaming data to return before the end of the live stream can be detected, leading to a poor viewing experience. Therefore, considering the time-sensitive nature of live streams (which may end at any time), a periodic polling operation on N live streams can be performed. If an ended live stream is detected during any polling operation, it can be removed from the video list. Typically, this method removes ended live streams from the data source before the target user has consumed them, making the change imperceptible to the user and improving the viewing experience.

[0096] S403, when a consumption instruction for the target live video is detected among N live videos, the network connection of the target live video is reused to obtain the live stream data of the target live video, and the live stream data is used to play the target live video in the video in-stream page of the client.

[0097] S404, when a trigger operation is detected that the playback state of the target live video changes from the playback state of the video in-stream page to the playback state of the live room, the current live stream screen of the target live video in the video in-stream page is placed on the top layer of the playback.

[0098] The specific implementation of steps S403 and S404 can be found in the specific implementation of steps S203 and S204 described above, and will not be repeated here.

[0099] S405, if a gesture operation of the target object is detected on the live stream interface of the live room in the client, the sliding speed and sliding distance corresponding to the gesture operation are obtained.

[0100] In one implementation, the target object can exit the live stream room for the target live video at any time. When an exit operation for the target live video is detected, the currently playing live stream can remain on top of the playback screen without closing it. This achieves a seamless transition from the live stream room to the video's internal stream, avoiding black screen flickering and other issues. This results in a seamless transition between live stream scenes, improving the user's viewing experience. For example, when the target object wants to exit the target live video's live stream room, it can perform a specified operation on the live stream interface to trigger the exit operation for the target live video. This specified operation can be a tap (click or press) or a gesture. The specified operation can be performed anywhere on the live stream interface, or it can be performed in a designated area on the live stream interface. This designated area can be preset and is not specifically limited.

[0101] Optionally, if a tap operation is detected on the live stream interface of the client, an exit operation can be directly triggered. Specifically, the currently playing live stream can be left running; for example, a custom exit animation can be triggered, placing the current live stream on top of the playback screen without creating a new live stream. This avoids significant delays caused by opening a new page, preventing black screen flickering and achieving a seamless experience when switching live stream scenes, thus improving the user experience. However, if a gesture operation is detected on the live stream interface of the client, the corresponding swipe speed and distance must be obtained to determine whether to trigger the exit operation.

[0102] S406, if the sliding speed exceeds the preset speed and the sliding distance exceeds the preset distance, the exit operation of leaving the live room is triggered, and the current live stream screen of the live room is placed on the top layer of the playback.

[0103] In one implementation, if both the swiping speed and swiping distance meet preset conditions, an exit operation can be triggered to leave the live stream. For example, the preset conditions could be that the swiping speed exceeds a preset speed and the swiping distance exceeds a preset distance; that is, the exit operation is triggered when both the swiping speed and swiping distance exceed the preset speed and distance. The preset speed and preset distance can be preset, and their specific values ​​are not limited. For example, see... Figure 5a As shown, when the finger of the target object marked 51 slides from the position of the finger marked 51 to the position of the finger marked 52, if the sliding distance D between the positions of the fingers 51 and 52 exceeds the preset distance and the sliding speed of the finger exceeds the preset speed, the exit operation of leaving the live broadcast room can be triggered.

[0104] When exiting a live stream, the currently playing live stream can remain active. A custom exit animation can be triggered, placing the current live stream on top of the existing playback screen. This avoids creating a new live stream screen, preventing significant delays caused by opening a new page and thus avoiding black screen flickering. This achieves a seamless transition between live stream scenes, improving the user viewing experience. When the target live video exits the live stream screen of the live stream room and enters the live stream screen of the video's internal streaming page, relevant information displayed in the live stream room's live stream screen (such as real-time information like user comments and viewer counts) can be removed to differentiate the playback status between the video's internal streaming page and the live stream room's playback status.

[0105] For example, see Figure 5b As shown, Figure 5b The interface marked 501 represents the live stream of the target live video within the live streaming room. If a gesture operation by the target object on this 501 interface is detected, and the corresponding swipe speed and swipe distance meet preset conditions, the target live video can exit the live streaming room. This means the client's playback interface can be updated to the interface marked 502, which represents the live stream of the target live video entering the video's internal streaming page. It can be seen that the live stream displayed in interface 502 is the same as the live stream displayed in interface 501, and no other real-time live information is displayed in interface 502.

[0106] In summary, besides tapping to exit, exiting a live stream can also be achieved based on the swipe speed and distance corresponding to the gesture operation. For example, if the swipe speed and distance reach a threshold (i.e., the swipe speed exceeds a preset speed and the swipe distance exceeds a preset distance), a seamless, customizable exit animation can be triggered, significantly improving the user experience. Gesture detection and custom animations can also greatly reduce the possibility of interruptions when entering and exiting a live stream. Furthermore, since the live stream entry implementation reuses the live stream from the video streaming page, seamless and low-latency switching between live stream scenarios can be achieved.

[0107] In summary, it can be seen that the embodiments of this application can provide a disaster-tolerant, low-latency live video playback method that provides uninterrupted live video distribution and consumption during interaction. To better understand the live video playback method provided by the embodiments of this application, the following is combined with... Figure 6 The live video playback method proposed in the embodiments of this application is further described below. See also... Figure 6 As shown, the target object can request data from the client. This data request can be understood as a data request used to request video when the target object's need to watch video is detected through the client. When the client detects the target object's need to watch video, it can send a data retrieval request to the server. Upon receiving this request, the server can distribute a video list containing various types of videos (such as video-on-demand and live videos). Typically, the server can process live videos, mixing them with the video-on-demand stream before distribution. Therefore, the distributed video list can contain both video-on-demand and live videos. After receiving this video list, the client can process it. For example, it can separate the video-on-demand and live videos in the list to determine the live videos. Furthermore, the client can also determine N live videos from all the live videos that require polling.

[0108] After obtaining these N live videos, a periodic polling operation can be performed on these N live videos. Each polling operation for any live video can be used to maintain the network connection between the client and the server for that particular live video. For example, the client can send a network connection maintenance request to the server corresponding to the live video. After receiving the network connection maintenance request, the server can respond to the request to maintain the network connection between the client and the server. Optionally, during the polling operation, disaster recovery processing can be performed on live videos awaiting reconnection that have failed to maintain a network connection. For example, disaster recovery processing can be performed on live videos awaiting reconnection according to disaster recovery rules, and live videos awaiting reconnection that do not meet the disaster recovery rules can be removed from the video list. Optionally, during the polling operation, the validity of each live video can also be determined, i.e., whether the live video is in a live state or an ended state. For example, live videos in an ended state can be removed from the video list. Therefore, live videos with failed network connections or that have expired (i.e., in an ended state) can be removed from the video list, thereby achieving data removal without the user's awareness and improving the user's viewing experience.

[0109] When a consumption command for a target live video is detected among N live videos, the network connection maintained during the polling operation of the target live video can be reused for streaming processing. This involves retrieving the live stream data of the target live video from the server. After obtaining the live stream data, it can be played on the client's in-stream video page. While the target live video is playing on the in-stream video page, the target user can enter the corresponding live room at any time. Entering the live room can be triggered by the target user, such as by clicking or pressing on the client's playback interface. When a trigger operation is detected indicating a transition from the in-stream video's playback state to the live room's playback state, a custom animation can be triggered to place the current live stream image of the target live video on top of the playback, thus achieving the effect of not interrupting the target user's consumption. Simultaneously, the client's playback screen after entering the live room can also be fed back to the target user, meaning that the target user sees the target live video in the live room's playback state on the client.

[0110] If a target user's gesture is detected on the live stream interface while they are consuming the target live video, it indicates that they are exiting the live stream using a gesture. The corresponding swipe speed and distance can then be obtained. If the swipe speed or distance exceeds a preset limit, an exit operation is triggered, and the current live stream is placed on top of the playback layer to prevent black screen flickering. Simultaneously, the client's playback screen after exiting the live stream is also displayed to the target user, indicating that the target live video viewed on the client is in the in-stream playback state.

[0111] In this embodiment, the system first checks if there are any live videos in the current video list on the video in-stream page. If so, it polls the live videos to maintain the network connection between the client and the server. Then, when the target user actually consumes the live video, the live stream data can be pulled directly without re-establishing a network connection, thus improving the speed of data acquisition and achieving low latency. Furthermore, if an anomaly occurs during the polling operation that prevents the network connection from being maintained, a retry can be performed to increase disaster recovery and improve system stability. If a live video in an ended state is detected, it can be removed from the data source (i.e., the video list) before the user consumes it, without the user noticing. When the live video enters the live room from the video in-stream page, a custom animation can be used to place the currently playing live stream on top of the playback layer without closing it, thus ensuring uninterrupted user experience. When exiting a live stream, users can use a combination of tap-to-exit and gesture-to-exit methods to trigger the exit action. Both methods can trigger a seamless, customizable exit animation, thereby enhancing the user's experience.

[0112] Please see Figure 7 This is a schematic diagram of a live video playback device provided in an embodiment of this application. The live video playback device described in this embodiment includes:

[0113] The acquisition unit 701 is used to acquire a list of videos in the video streaming page and detect whether there are live videos of the live streaming type in the video list;

[0114] Polling unit 702 is used to determine N live videos from the video list if they exist, and to perform periodic polling operations on the N live videos; one polling operation for any live video is used to maintain the network connection between the client and the corresponding server under any live video, where N is a positive integer;

[0115] The first playback unit 703 is used to, when a consumption instruction for a target live video among the N live videos is detected, reuse the network connection of the target live video to obtain the live stream data of the target live video, and use the live stream data to play the target live video in the video in-stream page of the client.

[0116] The second playback unit 704 is used to place the current live stream image of the target live video in the video inner stream page at the top layer of playback when a trigger operation is detected that the playback state of the target live video has changed from the playback state of the video inner stream page to the playback state of entering the live room.

[0117] In one implementation, the device includes an exit unit 705, which is specifically used for:

[0118] If a gesture operation of a target object is detected on the live stream interface of the live room on the client, the sliding speed and sliding distance corresponding to the gesture operation are obtained.

[0119] If the sliding speed exceeds a preset speed and the sliding distance exceeds a preset distance, an exit operation is triggered to exit the live stream, and the current live stream image of the live stream is placed on top of the playback.

[0120] In one implementation, the polling unit 702 is specifically used for:

[0121] Determine the currently playing video corresponding to the playback interface on the client, and select M live videos adjacent to the currently playing video from the video list, where M is a positive integer;

[0122] Obtain the object characteristics of the target object, as well as the historical viewing information of each of the M live videos;

[0123] Based on the object characteristics and the historical viewing information of each live video, N live videos are selected from the M live videos.

[0124] In one implementation, the polling unit 702 is specifically used for:

[0125] The reference content type is determined based on the object characteristics;

[0126] Filter out live videos that match the reference content type from the M live videos, and add the matched live videos to the candidate live video set;

[0127] Based on the historical viewing information of each candidate live video in the candidate live video set, N live videos are selected from the candidate live video set.

[0128] In one implementation, the polling unit 702 is specifically used for:

[0129] Obtain the video scrolling frequency of the target object within a historical time period;

[0130] If the video sliding frequency exceeds the preset sliding frequency, the N live videos will be polled according to the first cycle.

[0131] If the video sliding frequency does not exceed the preset sliding frequency, then the N live videos will be polled according to the second cycle.

[0132] The duration of the first cycle is shorter than the duration of the second cycle.

[0133] In one implementation, the polling unit 702 is further configured to:

[0134] If, during any of the periodic polling operations, there is a live video that has failed to maintain its network connection and needs to be reconnected, the live video that needs to be reconnected will be retried to maintain its network connection in accordance with the disaster recovery rules.

[0135] If the live video to be reconnected fails to maintain a network connection during the retry process, the live video to be reconnected will be removed from the video list.

[0136] In one implementation, the polling unit 702 is further configured to:

[0137] If a live video is detected to be in an ended state during any of the periodic polling operations, the live video in the ended state is removed from the video list.

[0138] In one implementation, the polling unit 702 is further configured to:

[0139] Obtain the object identifier of the target object, and perform playback permission verification on each of the N live videos based on the object identifier;

[0140] For any live video, if the live video passes the playback permission verification, then the step of periodically polling the live video is executed.

[0141] It is understood that the division of units in this embodiment is illustrative and merely a logical functional division; in actual implementation, there may be other division methods. The functional units in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.

[0142] Please see Figure 8 , Figure 8 This is a schematic diagram of a client architecture provided in an embodiment of this application. The client includes a processor 801 and a memory 802. Optionally, the client may also include a network interface 803. The processor 801, memory 802, and network interface 803 can exchange data.

[0143] The processor 801 described above can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0144] The aforementioned memory 802 may include read-only memory and random access memory, and provides program instructions and data to the processor 801. A portion of the memory 802 may also include non-volatile random access memory. The processor 801 executes the program instructions by calling them.

[0145] Obtain the video list on the video streaming page, and detect whether there are any live videos of the live streaming type in the video list;

[0146] If they exist, N live videos are determined from the video list, and the N live videos are periodically polled; one polling operation for any live video is used to maintain the network connection between the client and the corresponding server for any live video, where N is a positive integer;

[0147] When a consumption instruction for a target live video among the N live videos is detected, the network connection of the target live video is reused to obtain the live stream data of the target live video, and the live stream data is used to play the target live video in the video in-stream page of the client.

[0148] When a trigger operation is detected that the target live video has changed from the playback state of the video in-stream page to the playback state of the live room, the current live stream image of the target live video in the video in-stream page is placed on the top layer of the playback.

[0149] In one implementation, the processor 801 is further configured to:

[0150] If a gesture operation of a target object is detected on the live stream interface of the live room on the client, the sliding speed and sliding distance corresponding to the gesture operation are obtained.

[0151] If the sliding speed exceeds a preset speed and the sliding distance exceeds a preset distance, an exit operation is triggered to exit the live stream, and the current live stream image of the live stream is placed on top of the playback.

[0152] In one implementation, the processor 801 is specifically used for:

[0153] Determine the currently playing video corresponding to the playback interface on the client, and select M live videos adjacent to the currently playing video from the video list, where M is a positive integer;

[0154] Obtain the object characteristics of the target object, as well as the historical viewing information of each of the M live videos;

[0155] Based on the object characteristics and the historical viewing information of each live video, N live videos are selected from the M live videos.

[0156] In one implementation, the processor 801 is specifically used for:

[0157] The reference content type is determined based on the object characteristics;

[0158] Filter out live videos that match the reference content type from the M live videos, and add the matched live videos to the candidate live video set;

[0159] Based on the historical viewing information of each candidate live video in the candidate live video set, N live videos are selected from the candidate live video set.

[0160] In one implementation, the processor 801 is specifically used for:

[0161] Obtain the video scrolling frequency of the target object within a historical time period;

[0162] If the video sliding frequency exceeds the preset sliding frequency, the N live videos will be polled according to the first cycle.

[0163] If the video sliding frequency does not exceed the preset sliding frequency, then the N live videos will be polled according to the second cycle.

[0164] The duration of the first cycle is shorter than the duration of the second cycle.

[0165] In one implementation, the processor 801 is further configured to:

[0166] If, during any of the periodic polling operations, there is a live video that has failed to maintain its network connection and needs to be reconnected, the live video that needs to be reconnected will be retried to maintain its network connection in accordance with the disaster recovery rules.

[0167] If the live video to be reconnected fails to maintain a network connection during the retry process, the live video to be reconnected will be removed from the video list.

[0168] In one implementation, the processor 801 is further configured to:

[0169] If a live video is detected to be in an ended state during any of the periodic polling operations, the live video in the ended state is removed from the video list.

[0170] In one implementation, the processor 801 is further configured to:

[0171] Obtain the object identifier of the target object, and perform playback permission verification on each of the N live videos based on the object identifier;

[0172] For any live video, if the live video passes the playback permission verification, then the step of periodically polling the live video is executed.

[0173] This application also provides a computer storage medium storing program instructions, which, when executed, may include, for example... Figure 2 or Figure 4 Some or all of the steps of the live video playback method in the corresponding embodiments.

[0174] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0175] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0176] This application also provides a computer program product or computer program that includes program instructions. When executed by a processor, the program instructions can implement some or all of the steps in the above-described methods. For example, the program instructions are stored in a computer-readable storage medium. The processor of a client or terminal reads the program instructions from the computer-readable storage medium and executes the program instructions, causing the client or terminal to perform the steps in the embodiments of the above-described methods.

[0177] The above provides a detailed description of a live video playback method, client, and medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for playing live video, characterized in that, The method includes: Obtain the video list on the video streaming page, and detect whether there are any live videos of the live streaming type in the video list; If they exist, N live videos are determined from the video list, and the N live videos are periodically polled; one polling operation for any live video is used to maintain the network connection between the client and the corresponding server for any live video, where N is a positive integer; When a consumption instruction for a target live video among the N live videos is detected, the network connection of the target live video is reused to obtain the live stream data of the target live video, and the live stream data is used to play the target live video in the video in-stream page of the client. When a trigger operation is detected that the target live video has changed from the playback state of the video in-stream page to the playback state of the live room, the current live stream image of the target live video in the video in-stream page is placed on the top layer of the playback.

2. The method according to claim 1, characterized in that, The method further includes: If a gesture operation of a target object is detected on the live stream interface of the live room on the client, the sliding speed and sliding distance corresponding to the gesture operation are obtained. If the sliding speed exceeds a preset speed and the sliding distance exceeds a preset distance, an exit operation is triggered to exit the live stream, and the current live stream image of the live stream is placed on top of the playback.

3. The method according to claim 1, characterized in that, The step of determining N live videos from the video list includes: Determine the currently playing video corresponding to the playback interface on the client, and select M live videos adjacent to the currently playing video from the video list, where M is a positive integer; Obtain the object characteristics of the target object, as well as the historical viewing information of each of the M live videos; Based on the object characteristics and the historical viewing information of each live video, N live videos are selected from the M live videos.

4. The method according to claim 3, characterized in that, The step of selecting N live videos from the M live videos based on the object characteristics and the historical viewing information of each live video includes: The reference content type is determined based on the object characteristics; Filter out live videos that match the reference content type from the M live videos, and add the matched live videos to the candidate live video set; Based on the historical viewing information of each candidate live video in the candidate live video set, N live videos are selected from the candidate live video set.

5. The method according to claim 1, characterized in that, The periodic polling operation on the N live videos includes: Obtain the video scrolling frequency of the target object within a historical time period; If the video sliding frequency exceeds the preset sliding frequency, the N live videos will be polled according to the first cycle. If the video sliding frequency does not exceed the preset sliding frequency, then the N live videos will be polled according to the second cycle. The duration of the first cycle is shorter than the duration of the second cycle.

6. The method according to claim 1, characterized in that, The method further includes: If, during any of the periodic polling operations, there is a live video that has failed to maintain its network connection and needs to be reconnected, the live video that needs to be reconnected will be retried to maintain its network connection in accordance with the disaster recovery rules. If the live video to be reconnected fails to maintain a network connection during the retry process, the live video to be reconnected will be removed from the video list.

7. The method according to claim 1, characterized in that, The method further includes: If a live video is detected to be in an ended state during any of the periodic polling operations, the live video in the ended state is removed from the video list.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: Obtain the object identifier of the target object, and perform playback permission verification on each of the N live videos based on the object identifier; For any live video, if the live video passes the playback permission verification, then the step of periodically polling the live video is executed.

9. A client, characterized in that, The system includes a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to perform the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method for spotting advertisement in dynamic switching of internet on-demand or live broadcast signals

    CN101990126A

  • Live broadcast audio switching method, stream media server and client

    CN105657579A