Video playing method and device, electronic equipment and storage medium
By obtaining user historical playback records on the video playback end and obtaining associated videos for videos to be published from the server, and pre-stored locally, the problem of high bandwidth peaks during video release is solved, the hit rate and utilization rate of pre-pushed videos are improved, and the bandwidth cost is reduced.
Patent Information
- Application Number
- CN202411567452.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, when new videos are released, a large number of users will pour in to watch, resulting in a high bandwidth peak, thereby increasing bandwidth costs.
By obtaining the user's historical playback record on the video playback end, determining the target video according to the preset filtering rules, and obtaining the target associated video to be published from the server based on the video parameters of the target video, and pre-store the video to be stored in the local storage medium, and then playing it after the video is released.
This improves the hit rate and utilization rate of the server to pre-push associated videos, reduces the number of online users when video is released, reduces bandwidth peaks, and thus reduces bandwidth costs.
Smart Images

Figure CN119562110A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a video playback method, device, electronic device and storage medium. Background Art
[0002] With the development of video software, more and more users use video software to watch TV series or variety shows that they are interested in. Among them, an important expenditure of online video services is bandwidth cost, and the bandwidth calculation rule is based on peak value. The more and higher the peak points in a day, the higher the bandwidth cost.
[0003] In actual applications, a series of videos such as TV series or variety shows are updated at a fixed period. For example, TV series are updated at 19:00 every day, and variety shows are updated at 18:00 every Saturday. Based on this, users who follow TV series will watch the latest videos at the right time. As a result, when a new video is released, a large number of users will rush to watch it, resulting in a high bandwidth peak, which increases bandwidth costs. Summary of the invention
[0004] The present application provides a video playback method, device, electronic device and storage medium to solve the technical problem in the prior art that when a new video is released, a large number of users will rush to watch it, resulting in a high bandwidth peak, thereby increasing the bandwidth cost.
[0005] In a first aspect, the present application provides a video playback method, which is applied to a video playback terminal, and the method includes:
[0006] When it is determined that the video pre-acquisition condition is currently met, the user's historical playback records within a preset time period are acquired;
[0007] According to a preset screening rule, the videos included in the historical playback record are screened to determine the target video;
[0008] Acquire video parameters of the target video, and send the video parameters to a preset server, so that the server determines a target associated video to be published for the target video according to the video parameters and a preset matching rule, and sends the target associated video to the video playback end;
[0009] Receiving the target-associated video sent by the server, and storing the target-associated video in a preset storage medium;
[0010] When a play request for a published target-associated video is detected, the target-associated video is acquired from the storage medium and played.
[0011] As a possible implementation manner, determining that the video pre-acquisition condition is currently satisfied includes:
[0012] The time interval for getting video push from the server;
[0013] Get the current timestamp and the historical timestamp of the most recent pre-acquired video currently recorded;
[0014] Determine whether the time interval is currently satisfied according to the current timestamp and the historical timestamp;
[0015] If it is determined that the time interval is currently met, it is determined that the video pre-acquisition condition is currently met.
[0016] As a possible implementation, screening the videos included in the historical playback records according to a preset screening rule to determine the target video includes:
[0017] Determine all videos included in the historical playback record and obtain the video length of each video;
[0018] For each video, determining whether the video duration of the video is greater than a preset duration threshold;
[0019] In the case of determining that the duration of the video is greater than the duration threshold, determining whether the video has an associated video;
[0020] If the video has an associated video, the video is determined as the target video.
[0021] As a possible implementation, the video parameters include a unique identifier of the target video, a set identifier of a video set to which the target video belongs, and video playback parameters;
[0022] The server determines, according to the video parameters and a preset matching rule, a target associated video to be published for the target video, including:
[0023] The server determines the target associated video to be published by the target video in the following manner:
[0024] Determine a target push video from a plurality of pre-stored videos according to the received unique identifier;
[0025] Determine, according to the set identifier, a target video set to which the target pushed video belongs;
[0026] Determine an initial push video to be released in the target video set;
[0027] A target pushed video segment is determined from the initial pushed video according to the video playback parameter, and the target pushed video segment is determined as a target associated video to be released by the target video.
[0028] As a possible implementation manner, when the server determines that the target-related video meets the following conditions, the server sends the target-related video to the video playback end:
[0029] Determine whether the target associated video has push permission set;
[0030] In the case where it is determined that the target associated video has a push permission set, determining whether the current push count of the target associated video is greater than a preset count threshold;
[0031] If it is determined that the number of pushes is greater than the number threshold, determining whether the target pushed video is the most recently released video in the target video set;
[0032] When it is determined that the target pushed video is the most recently released video in the target video set, the target associated video is sent to the video playback end.
[0033] As a possible implementation manner, the playing of the target-related video includes:
[0034] Obtaining the validity period of the target associated video;
[0035] Determine whether the current time exceeds the validity period;
[0036] When it is determined that the current time does not exceed the validity period, the target-associated video is played.
[0037] As a possible implementation, after receiving the target-associated video sent by the server and storing the target-associated video in a preset storage medium, the method further includes:
[0038] When receiving the notification information sent by the server, obtaining the to-be-played video segment corresponding to the notification information, wherein the to-be-played video segment is the target associated video pushed by the server and stored in the storage medium;
[0039] Prompt information for prompting the user to play the video segment to be played is output through a visual interface.
[0040] As a possible implementation manner, before sending the video parameters to a preset server, the method further includes:
[0041] Determining the video playback rules and movie viewing rules of the user according to the historical playback records;
[0042] Inputting the video playback rule and the movie viewing rule into a pre-trained user movie viewing model to obtain the user's movie viewing probability output by the user movie viewing model;
[0043] In a case where the viewing probability is greater than a preset probability threshold, the step of sending the video parameters to a preset server is performed.
[0044] In a second aspect, the present application provides a video playback device, applied to a video playback terminal, the device comprising:
[0045] An acquisition module, used to acquire the user's historical playback records within a preset time period when it is determined that the video pre-acquisition condition is currently met;
[0046] A screening module, used to screen the videos included in the historical playback records according to preset screening rules to determine the target video;
[0047] A sending module, used for acquiring video parameters of the target video, and sending the video parameters to a preset server, so that the server determines the target associated video to be published of the target video according to the video parameters and a preset matching rule, and sends the target associated video to the video playback end;
[0048] A storage module, used for receiving the target-related video sent by the server, and storing the target-related video in a preset storage medium;
[0049] The playing module is used to obtain the target-related video from the storage medium and play the target-related video when receiving a playing request for the published target-related video.
[0050] As a possible implementation, the acquisition module is specifically used to:
[0051] The time interval for getting video push from the server;
[0052] Get the current timestamp and the historical timestamp of the most recent pre-acquired video currently recorded;
[0053] Determine whether the time interval is currently satisfied according to the current timestamp and the historical timestamp;
[0054] In the case where it is determined that the time interval is currently satisfied, it is determined that the video pre-acquisition condition is currently satisfied.
[0055] As a possible implementation, the screening module includes:
[0056] A first acquisition submodule is used to determine all videos included in the historical playback record and obtain the video duration of each video;
[0057] A first determination submodule, used to determine, for each video, whether the video duration of the video is greater than a preset duration threshold;
[0058] A second determination submodule is used to determine whether the video has an associated video when it is determined that the duration of the video is greater than the duration threshold;
[0059] The third determination submodule is used to determine the video as a target video if there is an associated video for the video.
[0060] As a possible implementation manner, the video parameters include a unique identifier of the target video, a set identifier of a video set to which the target video belongs, and video playback parameters;
[0061] The sending module comprises:
[0062] A fourth determination submodule is used for the server to determine a target associated video to be released by the target video in the following manner: determining a target push video from a plurality of pre-stored videos according to the received unique identifier;
[0063] A fifth determination submodule, configured to determine, according to the set identifier, a target video set to which the target pushed video belongs;
[0064] A sixth determination submodule, used to determine an initial push video to be released in the target video set;
[0065] The seventh determination submodule is used to determine a target pushed video segment from the initial pushed video according to the video playback parameter, and determine the target pushed video segment as a target associated video to be released for the target video.
[0066] As a possible implementation manner, the sending module is specifically used to:
[0067] Determine whether the target associated video has push permission set;
[0068] In the case where it is determined that the target associated video has a push permission set, determining whether the current push count of the target associated video is greater than a preset count threshold;
[0069] If it is determined that the number of pushes is greater than the number threshold, determining whether the target pushed video is the most recently released video in the target video set;
[0070] When it is determined that the target pushed video is the most recently released video in the target video set, the target associated video is sent to the video playback end.
[0071] As a possible implementation, the playing module includes:
[0072] A second acquisition submodule is used to acquire the validity period of the target associated video;
[0073] An eighth determination submodule, used to determine whether the current time exceeds the validity period;
[0074] The playing submodule is used to play the target associated video when it is determined that the current time does not exceed the validity period.
[0075] As a possible implementation manner, the device further includes:
[0076] A segment acquisition module is used for, after receiving the target-associated video sent by the server and storing the target-associated video in a preset storage medium, acquiring the to-be-played video segment corresponding to the notification information when receiving the notification information sent by the server, wherein the to-be-played video segment is the target-associated video pushed by the server and stored in the storage medium;
[0077] The output module is used to output prompt information for prompting the user to play the video segment to be played through a visual interface.
[0078] As a possible implementation manner, the device further includes:
[0079] A rule determination module, used for determining the user's video playing rules and movie watching rules according to the historical playing records before sending the video parameters to the preset server;
[0080] A model input module, used for inputting the video playback rule and the movie viewing rule into a pre-trained user movie viewing model to obtain the user's movie viewing probability output by the user movie viewing model;
[0081] An execution module is used to execute the step of sending the video parameters to a preset server when the viewing probability is greater than a preset probability threshold.
[0082] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a video playback program stored in the memory to implement the video playback method described in any one of the first aspects.
[0083] In a fourth aspect, the present application provides a storage medium, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the video playback method described in any one of the first aspects.
[0084] The technical solution provided by the embodiment of the present application obtains the historical playback records of the user within a preset time period when it is determined that the video pre-acquisition conditions are currently met, and the videos included in the above historical playback records are screened according to preset screening rules to determine the target video, obtain the video parameters of the above target video, and send the above video parameters to a preset server, so that the server determines the target associated video to be published for the target video according to the video parameters and the preset matching rules, and sends the target associated video to the video playback end, receives the target associated video sent by the server, and stores the target associated video to a preset storage medium, and when a playback request for the target associated video that has been published is detected, the target associated video is obtained from the above storage medium, and the target associated video is played. This technical solution filters out the target video that the user has recently watched from the user's historical playback records according to preset filtering rules, obtains the associated videos to be released of the target video from the server according to the video parameters of the target video, and stores the associated videos in a preset storage medium in advance. In this way, when the associated video is released, the user can obtain the pre-stored associated video from the storage medium and play it. Since the target video is filtered out according to the user's historical playback records and preset filtering rules, and the server determines the associated videos that can be pre-pushed according to the video parameters of the target video and preset matching rules, this improves the hit rate and utilization rate of the server for the pre-pushed associated videos, thereby increasing the hit rate and utilization rate of the pre-pushed videos to be released, while reducing the number of online users when the video is released, reducing the bandwidth peak, and thus reducing the bandwidth cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0086] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art texts are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0087] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0088] Figure 1 A schematic diagram of the structure of a video playback system provided in an embodiment of the present application;
[0089] Figure 2 A flowchart of a video playback method according to an embodiment of the present application;
[0090] Figure 3 A flowchart of another video playback method provided in an embodiment of the present application;
[0091] Figure 4 A flowchart of another video playback method provided in an embodiment of the present application;
[0092] Figure 5 A block diagram of an embodiment of a video playback device provided in an embodiment of the present application;
[0093] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described in the text are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0095] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0096] In order to solve the technical problem in the prior art that when a new video is released, a large number of users will rush to watch it, resulting in a high bandwidth peak, thereby increasing the bandwidth cost, the present application provides a video playback method, device, electronic device and storage medium, which can filter out the target video that the user has recently watched from the user's historical playback record according to a preset filtering rule, and obtain the associated video to be released of the target video from the server according to the video parameters of the target video, and pre-store the associated video to the preset storage medium, so that when the associated video is released, the user can obtain the pre-stored associated video from the storage medium and play it, and because the target video is filtered out according to the user's historical playback record and the preset filtering rule, and the server determines the associated video that can be pre-pushed according to the video parameters of the target video and the preset matching rule, this improves the hit rate and utilization rate of the server for the pre-pushed associated video, and achieves the increase of the hit rate and utilization rate of the pre-pushing of the video to be released, while reducing the number of online users when the video is released, reducing the bandwidth peak, and thus reducing the bandwidth cost.
[0097] To facilitate understanding of the video playback method provided in the embodiment of the present application, the application scenario of the video playback method is first illustrated below.
[0098] See also Figure 1 , is a schematic diagram of the structure of a video playback system provided in an embodiment of the present application. Figure 1 As shown, the video playback system 10 may include: a video playback terminal 11 and a server 12.
[0099] The video player 11 can be a hardware device or software that supports network connection and provides various network services. When the video player 11 is hardware, it can support various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. Figure 1 Only a smart phone is used as an example. When the video player 11 is software, it can be installed in the electronic devices listed above. In the embodiment of the present application, the video player 11 can be used to play videos.
[0100] The server 12 may be a single server or a cluster of multiple servers, which is not limited in the embodiment of the present application.
[0101] In the embodiment of the present application, the video playback terminal 11 can obtain the video to be played from the server 12 according to the user operation, and play the obtained video.
[0102] In actual applications, a series of videos such as TV series or variety shows are updated online on the server 12 at a fixed period. For example, TV series are updated at 19:00 every day, and variety shows are updated at 18:00 every Saturday. Based on this, users who follow the series will watch the latest videos at the right time. This results in a large number of users obtaining the latest videos through the video player 11 when the server 12 releases a new video, which results in a high bandwidth peak of the server 12, thereby increasing the bandwidth cost.
[0103] In this regard, in an embodiment of the present application, the video playback terminal 11 can obtain the associated videos to be published in the user's historical playback records from the server 12 in advance and store them locally through the video playback method provided in the embodiment of the present application, so that after the associated video is published, after the video playback terminal 11 receives a playback request for the associated video, the associated video is obtained locally and played, thereby reducing the number of online users when the associated video is published, thereby reducing the bandwidth peak of the server 12 and reducing bandwidth costs.
[0104] The video playback method provided by the present application is further explained below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0105] See also Figure 2 , is a flow chart of an embodiment of a video playback method provided in an embodiment of the present application. As an embodiment, Figure 2 The process shown can be applied to the video player, for example Figure 1 The video player 11 is shown. Figure 1 As shown, the process may include the following steps:
[0106] Step 201: When it is determined that the video pre-acquisition condition is currently met, the historical playback records of the user within a preset time period are acquired.
[0107] The video pre-acquisition condition refers to a condition that the video player satisfies in advance to acquire the video to be released from the server. Further, the video pre-acquisition condition may be a condition that the video player acquires from the server.
[0108] The above-mentioned historical playback record refers to the record of the user playing the video through the video playback terminal within a preset time period. The above-mentioned preset time period can be the last week, the last 15 days, or the last 30 days, etc., and the embodiment of the present application does not impose any restrictions on this.
[0109] In one embodiment, each time the video playback terminal is started, it can obtain video pre-acquisition conditions from the server, and detect in real time whether the video pre-acquisition conditions are met. If it is determined that the video pre-acquisition conditions are currently met, the user's historical playback records within a preset time period are obtained.
[0110] As an optional implementation, the user can pre-set in the server the video pre-acquisition conditions that the video player must satisfy to obtain the video to be released. Based on this, the video player obtains the video pre-acquisition conditions from the server each time it is restarted.
[0111] As an exemplary implementation, the video pre-acquisition condition may include the time interval for the server to push the video, that is, the time interval for the server to push the video to the same video player. Based on this, the video player may obtain the time interval for the server to push the video from the server.
[0112] After that, the current timestamp and the historical timestamp of the most recent pre-acquisition of the video by the currently recorded video player can be obtained. Among them, each time the video player pre-acquires a video to be released from the server, it records the timestamp when the video was pre-acquired.
[0113] Finally, the video player can determine whether the time period between the current timestamp and the historical timestamp meets the time interval based on the current timestamp and the historical timestamp, and determine that the video pre-acquisition condition is currently met if the time interval is determined to be met.
[0114] As another exemplary implementation, the video pre-acquisition condition may include a preset time period for the server to push videos (e.g., 9:00-18:00 every day). Based on this, the video player may obtain the preset time period from the server and determine whether the current time point is within the preset time period.
[0115] Optionally, when it is determined that the current time point is within the preset time period, it can be determined that the video pre-acquisition condition is currently met.
[0116] Step 202: Screen the videos included in the above historical playback records according to preset screening rules to determine the target video.
[0117] The above-mentioned screening rules refer to pre-set rules for screening target videos.
[0118] The above-mentioned target video refers to a target video selected from videos included in the user's historical playback records.
[0119] Furthermore, the target video may have associated videos to be released, and the user has currently watched the latest associated video of the target video. For example, the target video is any episode video of a TV series that the user is watching continuously, and the episodes of the TV series have not been fully updated, and the user has watched the latest episode of the TV series. For another example, the target video is any episode video of a variety show that the user is watching continuously, the variety show is updated regularly, and the user has watched the latest episode of the variety show.
[0120] In one embodiment, when the video playback end currently meets the video pre-acquisition condition, the videos included in the historical playback records can be screened according to a preset screening rule to determine the target video to be released that needs to be acquired from the server.
[0121] As an optional implementation method, the video player can first determine all videos included in the above historical playback records and obtain the video duration of each video. Afterwards, since short videos generally do not have associated videos, or the video player consumes less bandwidth to obtain short videos online, the video player can determine whether the video duration of the video is greater than a preset duration threshold. The above duration threshold can be a preset duration. When the video duration is greater than the duration threshold, it indicates that the video is a long video; when the video duration is less than or equal to the duration threshold, it indicates that the video is a short video.
[0122] Optionally, when it is determined that the duration of the video is greater than the duration threshold, it means that the video is not a short video. Therefore, it can be further determined whether the video has an associated video. If the video has an associated video, the video can be determined as the target video; if the video does not have an associated video, it means that the video does not have an associated video to be released, so the video may not be determined as the target video. The above-mentioned associated video refers to a video that has an associated relationship with the target video. The associated relationship may include but is not limited to an associated relationship between the content of the two, the two belonging to the same video set, etc., such as videos of different episodes of the same TV series, and videos of different episodes of the same variety show.
[0123] On the contrary, when it is determined that the video length is less than or equal to the length threshold, it means that the video is a short video, and therefore, the video may not be determined as a target video.
[0124] Step 203, obtaining the video parameters of the target video, and sending the video parameters to a preset server, so that the server determines the target associated video to be published according to the video parameters and preset matching rules, and sends the target associated video to the video playback end.
[0125] Step 204: Receive the target-associated video sent by the server, and store the target-associated video in a preset storage medium.
[0126] The following is a unified description of step 203 and step 204:
[0127] The above-mentioned video parameters refer to parameters related to the target video, which may include but are not limited to: a unique identifier of the target video, a set identifier of the video set to which the target video belongs, and video playback parameters, etc. Furthermore, the above-mentioned video playback parameters may include but are not limited to: whether the target video skips the title playback when being played, the target video's bitstream clarity, Dolby sound effects, and h264 / h265 device capability support information, etc.
[0128] In one embodiment, after determining the target video from the historical playback record, the video playback terminal may obtain the video parameters of the target video and send the video parameters to a preset server, so that the server determines the target associated video to be released according to the above video parameters and the pre-set matching rules, and sends the target associated video to the video playback terminal. The above matching rules may be pre-set rules including multiple matching dimensions, which are used to match the target associated video to be released that has an associated relationship with the target video according to the video parameters, and send the determined target associated video to the video playback terminal.
[0129] Furthermore, in order to improve the effective push of videos by the server, the video player may determine the user's video playback rules and movie viewing rules based on the user's historical playback records before sending the above video parameters to the preset server. The above video playback rules may include the playback time period and playback cycle of the video playback, and the above movie viewing rules may include the types of videos watched by the user in the historical time period, that is, the user's viewing preferences, etc.
[0130] Afterwards, the above-mentioned video playback rules and movie viewing rules can be input into a pre-trained user movie viewing model to obtain the user's movie viewing probability output by the user movie viewing model, and the movie viewing probability can represent the probability of the user watching the target video.
[0131] Optionally, when the viewing probability is greater than a preset probability threshold, it indicates that the user has a high probability of watching the target video, and thus the video parameters may be sent to a preset server.
[0132] Optionally, when the viewing probability is less than or equal to the probability threshold, it indicates that the user is less likely to watch the target video, and obtaining the associated video of the target video is invalid. Therefore, the video parameters may not be sent to the preset server.
[0133] As for how the server specifically determines the target associated video to be released based on the video parameters and the preset matching rules, it can be seen in the following Figure 3 The process shown is explained and will not be described in detail here.
[0134] Among them, the server determines the associated videos that can be pre-pushed according to the video parameters of the target video and the preset matching rules, and the above matching rules may include rules of multiple matching dimensions, which improves the hit rate and utilization rate of the server for the pre-pushed associated videos. The above hit rate refers to the ratio of the number of videos that are pre-pushed and finally played to the total number of videos played in the server, and the above utilization rate refers to the ratio of the number of videos that are pre-pushed and finally played to the total number of videos pushed.
[0135] Based on this, after receiving the target-associated video sent by the server, the video playback end can store the target-associated video in a preset storage medium. The storage medium can be a local disk of the video playback end, or a pre-set database for storing unplayed videos. The embodiment of the present application does not impose any restrictions on this.
[0136] Step 205: When a play request for the published target-related video is detected, the target-related video is obtained from the storage medium, and the target-related video is played.
[0137] The above-mentioned playback request refers to a request for requesting to play the target-related video after the target-related video is released.
[0138] In an embodiment of the present application, the video playback end can store the target-associated video to be released in advance in the storage medium according to the above steps. Based on this, when the target-associated video is released, if the user wants to play the target-associated video, the user can click the play button of the target-associated video on the playback interface of the video playback end.
[0139] Based on this, after the video playback end detects that the play button of the target-associated video is clicked, the video playback end can generate a play request for playing the target-associated video. Based on this, when the video playback end detects a play request for a target-associated video that has been released, it can obtain the target-associated video from the above-mentioned storage medium and play the target-associated video.
[0140] Furthermore, the server may set a validity period for each pre-pushed target-related video, that is, the video player needs to play the target-related video within the validity period. Based on this, when playing the target-related video, the video player can obtain the validity period of the target-related video and determine whether the current time exceeds the validity period.
[0141] Optionally, when it is determined that the current time does not exceed the above validity period, the above target-associated video may be played.
[0142] In addition, in order to prevent the video player from wasting storage resources of the target-associated video by not playing it for a long time after pre-acquisition, the server can periodically send notification information to the video player to prompt the user to play the target-associated video after sending the target-associated video to the video player.
[0143] Based on this, when the video player receives the notification information sent by the server, it can obtain the to-be-played video segment corresponding to the notification information, and the to-be-played video segment is the target associated video pushed by the server stored in the storage medium. Afterwards, the video player can output prompt information for prompting the user to play the to-be-played video segment through a visual interface.
[0144] The technical solution provided by the embodiment of the present application obtains the historical playback records of the user within a preset time period when it is determined that the video pre-acquisition conditions are currently met, and the videos included in the above historical playback records are screened according to preset screening rules to determine the target video, obtain the video parameters of the above target video, and send the above video parameters to a preset server, so that the server determines the target associated video to be published for the target video according to the video parameters and the preset matching rules, and sends the target associated video to the video playback end, receives the target associated video sent by the server, and stores the target associated video to a preset storage medium, and when a playback request for the target associated video that has been published is detected, the target associated video is obtained from the above storage medium, and the target associated video is played. This technical solution filters out the target video that the user has recently watched from the user's historical playback records according to preset filtering rules, obtains the associated videos to be released of the target video from the server according to the video parameters of the target video, and stores the associated videos in a preset storage medium in advance. In this way, when the associated video is released, the user can obtain the pre-stored associated video from the storage medium and play it. Since the target video is filtered out according to the user's historical playback records and preset filtering rules, and the server determines the associated videos that can be pre-pushed according to the video parameters of the target video and preset matching rules, this improves the hit rate and utilization rate of the server for the pre-pushed associated videos, thereby increasing the hit rate and utilization rate of the pre-pushed videos to be released, while reducing the number of online users when the video is released, reducing the bandwidth peak, and thus reducing the bandwidth cost.
[0145] See also Figure 3 , which is a flow chart of another embodiment of a video playback method provided in an embodiment of the present application. Figure 3 The process shown in Figure 2Based on the process shown, it describes how the server determines the target associated video to be released based on the video parameters and the preset matching rules when receiving the video parameters sent by the video player, and the video parameters include the unique identifier of the target video, the set identifier of the video set to which the target video belongs, and the video playback parameters. Figure 3 As shown, the process may include the following steps:
[0146] Step 301: The server determines a target push video from a plurality of pre-stored videos according to the received unique identifier.
[0147] Step 302: The server determines the target video set to which the target pushed video belongs according to the set identifier.
[0148] The following is a unified description of step 301 and step 302:
[0149] The above-mentioned unique identifier refers to the unique identifier of the target video determined by the video playback end.
[0150] Correspondingly, the above-mentioned target pushed video is a video corresponding to the target video stored in the server.
[0151] Depend on Figure 2 As can be seen from the process shown, after the video playback end determines the target video based on the user's historical playback records, it can obtain the video parameters of the target video, and the video parameters may include the unique identifier of the target video, the collection identifier of the video collection to which the target video belongs, and video playback parameters, etc., and then the video parameters can be sent to the server.
[0152] Based on this, after receiving the video parameters, the server can determine the unique identifier of the target video and the collection identifier of the video collection to which the target video belongs from the video parameters. Afterwards, based on the received unique identifier, the target pushed video corresponding to the unique identifier can be determined from multiple pre-stored videos, and based on the collection identifier, the target video collection to which the target pushed video belongs can be determined.
[0153] Step 303: The server determines an initial push video to be released in the target video set.
[0154] Step 304: The server determines a target pushed video segment from the initial pushed video according to the above video playback parameters, and determines the target pushed video segment as a target associated video to be released for the target video.
[0155] The following is a unified description of step 303 and step 304:
[0156] The above-mentioned initially pushed video may be a complete video to be released in the target video set, which may include the beginning and end of the video and other contents.
[0157] The above-mentioned target pushed video segment refers to a video segment determined from the initially pushed video according to the video playback parameters of the user at the video playback end.
[0158] In an embodiment of the present application, after determining the target push video corresponding to the video parameters and the target video set of the target push video, the server can determine whether there is a video to be released in the target video set. If so, the video to be released can be determined as the initial push video.
[0159] Furthermore, the initial pushed video may be a complete video, which may include a beginning and an end credits, and the user may skip the beginning and the end credits when playing the initial pushed video. In addition, different video playback terminals may apply different clarity and sound effects during the playback of the initial pushed video. Therefore, the server may further determine the target pushed video segment from the initial pushed video based on the video playback parameters sent by the video playback terminal, and determine the target pushed video segment as the target associated video to be released for the target video.
[0160] In addition, before sending the determined target-associated video to the video playback end, the server may first determine whether the target-associated video has push permissions set. If the target-associated video has push permissions set, it means that the target-associated video can be pushed to the video playback end.
[0161] Furthermore, in order to prevent the server from being attacked and continuously sending target-related videos to the video player, the server can set a push count for the target-related video. Therefore, the server can determine whether the current push count of the target-related video is greater than a preset count threshold.
[0162] Optionally, when it is determined that the current push count of the target-associated video is greater than the count threshold, it can be further indicated that the target-associated video meets the push condition for being pushed to the video playback end.
[0163] Furthermore, in order to simultaneously improve the hit rate and utilization rate of target-associated video push, the server can determine whether the above-mentioned target pushed video is the most recently released video in the target video set. If so, it means that the user has a need to watch the target-associated video to be released, and therefore, the target-associated video can be sent to the video playback end; if not, it means that the user has not currently watched the most recently released video in the target video set, and therefore, there is no need to watch the target-associated video to be released, and then the target-associated video may not be sent to the video playback end.
[0164] The technical solution provided by the embodiment of the present application is that the server determines the target push video from a plurality of pre-stored videos according to the received unique identifier, and determines the target video set to which the target push video belongs according to the above set identifier. In this technical solution, the server determines the associated videos that can be pre-pushed according to the video parameters of the target video and the preset matching rules, which improves the hit rate and utilization rate of the pre-pushed associated videos by the server. At the same time, by pre-pushing the videos to be released to the video playback end, the situation in which there are a large number of online users when the video is released, resulting in an increase in bandwidth costs, can be solved. When the server pre-pushes the videos to be released, the hit rate and utilization rate of the pre-pushing of the videos to be released can be increased, while reducing the number of online users when the video is released, reducing the bandwidth peak, and thus reducing the bandwidth cost.
[0165] See also Figure 4 , which is a flow chart of another embodiment of a video playback method provided in an embodiment of the present application. Figure 4 The process shown is illustrated by taking the video player including APP / player and downloader as an example, wherein the downloader can interact with APP / player and the server as a third party to achieve pre-acquisition of the video to be released. Figure 4 As shown, the process may include the following steps:
[0166] 1. App (Application) / Player process starts:
[0167] After the App / player process is started, it will obtain the latest policy configuration information (i.e. video pre-fetching conditions) from the server, such as the time interval between two pre-pushes, the limit on the number of videos to be pre-pushed each time, etc. The video pre-fetching conditions can be adjusted at any time, and the server can set the pre-pushing function switch and related push thresholds based on the video pre-fetching conditions.
[0168] 2. Every time the App is cold started or hot started (when entering or returning to the App homepage)
[0169] 2.1 Determine whether the video pre-acquisition conditions are met:
[0170] Get the current timestamp and compare it with the last pre-pre-acquisition timestamp recorded locally. If the interval between the two times is greater than the set time interval, the video pre-acquisition condition is currently met, and the current video pre-acquisition is allowed to be triggered, and the subsequent 2.2 process is entered.
[0171] If the interval between the two times is less than the time interval, the video pre-acquisition condition is not met at present, and the video pre-acquisition is allowed to be triggered.
[0172] 2.2 Trigger video pre-fetching:
[0173] Get the user's recent historical playback records, filter them from recent to distant according to the preset filtering rules, and get a certain number of target videos that meet the filtering rules.
[0174] The screening rules here may include: excluding short videos (video length is less than a preset length threshold), excluding single-episode videos (such as movies), that is, only retaining multi-episode long video types (that is, videos with associated videos).
[0175] At the same time, the video parameters of the above target video can be obtained, including but not limited to: the unique identifier of the target video (such as video ID), the collection identifier of the video collection where the target video is located, whether the user skips the opening playback, the bitstream clarity, Dolby sound effects, etc., and h264 / h265 device capability support information.
[0176] Afterwards, the above video information may be organized into a video parameter list according to a format, and the video parameter list may be passed to the downloader.
[0177] If the target video is not filtered out according to the above filtering rules, the next step will not be performed.
[0178] 2.3 Downloader calls the server:
[0179] After receiving the video parameter list passed by the App / player, the downloader calls the server through a network request and downloads the target associated video matched by the server according to the preset matching rules.
[0180] 2.4 The server matches the target associated video according to the video parameter list:
[0181] After receiving the video parameter list passed by the downloader, the server matches it according to the preset matching rules and returns the target associated videos that meet the conditions. The main matching rules may include:
[0182] a. The server is configured with pre-push permissions for the target associated video;
[0183] b. The current number of pushes of the target-related video in the entire network does not exceed the preset number threshold for the day;
[0184] c. The target associated video is a video that has been produced and is ready to be released;
[0185] d. The video player has played the latest video in the video set corresponding to the target associated video;
[0186] e. Filter the playback methods supported by the video player based on the h264 / h265 support capabilities transmitted;
[0187] f. According to "whether to skip the title", the video segment where the video is actually played is selected from the videos to be released, and the video segment is determined as the target associated video.
[0188] g. Filter the target associated video of the corresponding video clip type according to the code stream clarity and Dolby sound effect status;
[0189] After the above matching rule judgment, if there is a target-related video that meets the conditions, the video parameters (such as video id) and other information of the target-related video are returned to the downloader. It is understandable that the target-related video can also be directly sent to the downloader.
[0190] 2.5 Downloader downloads target associated video:
[0191] After receiving the video parameters returned by the server, the downloader triggers the download operation of the target associated video and saves it to the disk (ie, the preset storage medium).
[0192] In addition, if the total disk capacity occupied after downloading exceeds the corresponding threshold, the oldest historical associated video is deleted.
[0193] 3. Target-related video playback stage:
[0194] When playing a target-associated video, the App / player requests the target-associated video from the downloader, and the downloader internally detects whether the target-associated video has been downloaded locally through pre-push.
[0195] Optionally, if it has been downloaded to the local disk and the target-associated video is within the validity period configured by the server, the target-associated video is directly returned to the App / player without being downloaded from the server again, thus avoiding the download of the target-associated video and reducing the peak bandwidth usage.
[0196] The technical solution provided by the embodiment of the present application is to filter the target video according to the user's historical playback records in the player, and send the video parameters of the target video to the server through the downloader. The server can match the target-related video to be released and associated with the target video according to the preset matching rules, and download the target-related video to the local disk through the downloader. When the player plays the target-related video, the target-related video can be directly obtained from the local disk through the downloader and played. This technical solution can reduce the number of online users when the target-related video is released by downloading the target-related video to the local disk in advance. The target-related video to be released is determined by the screening rules and matching rules of multiple dimensions, which can improve the hit rate and utilization rate of the server pushing the target-related video, and achieve the increase of the hit rate and utilization rate of the pre-push of the video to be released, while reducing the number of online users when the video is released, reducing the bandwidth peak, and thus reducing the bandwidth cost.
[0197] See also Figure 5 , is a block diagram of an embodiment of a video playback device provided in an embodiment of the present application. As an embodiment, Figure 5 The device shown can be applied to a video player, for example Figure 1 The video player 11 is shown. Figure 5 As shown, the device may include:
[0198] An acquisition module 51 is used to acquire the historical playback records of the user within a preset time period when it is determined that the video pre-acquisition condition is currently met;
[0199] A screening module 52, used to screen the videos included in the historical playback records according to a preset screening rule to determine a target video;
[0200] A sending module 53 is used to obtain video parameters of the target video and send the video parameters to a preset server, so that the server determines the target associated video to be published of the target video according to the video parameters and a preset matching rule, and sends the target associated video to the video playback end;
[0201] The storage module 54 is used to receive the target-related video sent by the server and store the target-related video in a preset storage medium;
[0202] The playing module 55 is used to obtain the target-related video from the storage medium and play the target-related video when receiving a play request for the published target-related video.
[0203] As a possible implementation, the acquisition module 51 is specifically configured to:
[0204] The time interval for getting video push from the server;
[0205] Get the current timestamp and the historical timestamp of the most recent pre-acquired video currently recorded;
[0206] Determine whether the time interval is currently satisfied according to the current timestamp and the historical timestamp;
[0207] If it is determined that the time interval is currently met, it is determined that the video pre-acquisition condition is currently met.
[0208] As a possible implementation, the screening module 52 includes:
[0209] A first acquisition submodule is used to determine all videos included in the historical playback record and obtain the video duration of each video;
[0210] A first determination submodule, used to determine, for each video, whether the video duration of the video is greater than a preset duration threshold;
[0211] A second determination submodule is used to determine whether the video has an associated video when it is determined that the duration of the video is greater than the duration threshold;
[0212] The third determination submodule is used to determine the video as a target video if there is an associated video for the video.
[0213] As a possible implementation manner, the video parameters include a unique identifier of the target video, a set identifier of a video set to which the target video belongs, and video playback parameters;
[0214] The sending module 53 includes:
[0215] A fourth determination submodule is used for the server to determine a target associated video to be released by the target video in the following manner: determining a target push video from a plurality of pre-stored videos according to the received unique identifier;
[0216] A fifth determination submodule, configured to determine, according to the set identifier, a target video set to which the target pushed video belongs;
[0217] A sixth determination submodule, used to determine an initial push video to be released in the target video set;
[0218] The seventh determination submodule is used to determine a target pushed video segment from the initial pushed video according to the video playback parameter, and determine the target pushed video segment as a target associated video to be released for the target video.
[0219] As a possible implementation, the sending module 53 is specifically configured to:
[0220] Determine whether the target associated video has push permission set;
[0221] In the case where it is determined that the target associated video has a push permission set, determining whether the current push count of the target associated video is greater than a preset count threshold;
[0222] If it is determined that the number of pushes is greater than the number threshold, determining whether the target pushed video is the most recently released video in the target video set;
[0223] When it is determined that the target pushed video is the most recently released video in the target video set, the target associated video is sent to the video playback end.
[0224] As a possible implementation, the playing module 55 includes:
[0225] A second acquisition submodule is used to acquire the validity period of the target associated video;
[0226] An eighth determination submodule, used to determine whether the current time exceeds the validity period;
[0227] The playing submodule is used to play the target associated video when it is determined that the current time does not exceed the validity period.
[0228] As a possible implementation, the device further includes (not shown in the figure):
[0229] A segment acquisition module is used for, after receiving the target-associated video sent by the server and storing the target-associated video in a preset storage medium, acquiring the to-be-played video segment corresponding to the notification information when receiving the notification information sent by the server, wherein the to-be-played video segment is the target-associated video pushed by the server and stored in the storage medium;
[0230] The output module is used to output prompt information for prompting the user to play the video segment to be played through a visual interface.
[0231] As a possible implementation, the device further includes (not shown in the figure):
[0232] A rule determination module, used for determining the user's video playing rules and movie watching rules according to the historical playing records before sending the video parameters to the preset server;
[0233] A model input module, used for inputting the video playback rule and the movie viewing rule into a pre-trained user movie viewing model to obtain the user's movie viewing probability output by the user movie viewing model;
[0234] An execution module is used to execute the step of sending the video parameters to a preset server when the viewing probability is greater than a preset probability threshold.
[0235] like Figure 6 As shown, it is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, including a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.
[0236] Memory 63, used for storing computer programs;
[0237] In one embodiment of the present application, the processor 61 is used to execute the program stored in the memory 63 to implement the video playback method provided by any of the above method embodiments, including:
[0238] When it is determined that the video pre-acquisition condition is currently met, the user's historical playback records within a preset time period are acquired;
[0239] According to a preset screening rule, the videos included in the historical playback record are screened to determine the target video;
[0240] Acquire video parameters of the target video, and send the video parameters to a preset server, so that the server determines a target associated video to be published for the target video according to the video parameters and a preset matching rule, and sends the target associated video to the video playback end;
[0241] Receiving the target-associated video sent by the server, and storing the target-associated video in a preset storage medium;
[0242] When a play request for a published target-associated video is detected, the target-associated video is acquired from the storage medium and played.
[0243] An embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the video playback method provided in any of the aforementioned method embodiments are implemented.
[0244] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0245] Through the text of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0246] It should be understood that the terms used in the text are only for the purpose of the specific example implementation of the text, and are not intended to be limited. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text can also be represented to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of the stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or their combinations. The method steps, processes, and operations of the text in the text are not interpreted as necessarily requiring them to be performed in the specific order of the text or description, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps can be used.
[0247] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A video playback method, characterized in that: Applied to a video player, the method includes: When it is determined that the video pre-acquisition condition is currently met, the user's historical playback records within a preset time period are acquired; According to a preset screening rule, the videos included in the historical playback record are screened to determine the target video; Acquire video parameters of the target video, and send the video parameters to a preset server, so that the server determines a target associated video to be published for the target video according to the video parameters and a preset matching rule, and sends the target associated video to the video playback end; Receiving the target-associated video sent by the server, and storing the target-associated video in a preset storage medium; When a play request for a published target-associated video is detected, the target-associated video is acquired from the storage medium and played.
2. The method according to claim 1, characterized in that The determining that the video pre-acquisition condition is currently satisfied includes: The time interval for getting video push from the server; Get the current timestamp and the historical timestamp of the most recent pre-acquired video currently recorded; Determine whether the time interval is currently satisfied according to the current timestamp and the historical timestamp; In the case where it is determined that the time interval is currently satisfied, it is determined that the video pre-acquisition condition is currently satisfied.
3. The method according to claim 1, characterized in that The step of screening the videos included in the historical playback records according to a preset screening rule to determine the target video includes: Determine all videos included in the historical playback record and obtain the video length of each video; For each video, determining whether the video duration of the video is greater than a preset duration threshold; In the case of determining that the duration of the video is greater than the duration threshold, determining whether the video has an associated video; If the video has an associated video, the video is determined as the target video.
4. The method according to claim 1, characterized in that: The video parameters include a unique identifier of the target video, a set identifier of a video set to which the target video belongs, and video playback parameters; The server determines, according to the video parameters and a preset matching rule, a target associated video to be published for the target video, including: The server determines the target associated video to be published by the target video in the following manner: Determine a target push video from a plurality of pre-stored videos according to the received unique identifier; Determine, according to the set identifier, a target video set to which the target pushed video belongs; Determine an initial push video to be released in the target video set; A target pushed video segment is determined from the initial pushed video according to the video playback parameter, and the target pushed video segment is determined as a target associated video to be released by the target video.
5. The method according to claim 4, characterized in that When the server determines that the target-associated video meets the following conditions, the server sends the target-associated video to the video playback terminal: Determine whether the target associated video has push permission set; In the case where it is determined that the target associated video has a push permission set, determining whether the current push count of the target associated video is greater than a preset count threshold; If it is determined that the number of pushes is greater than the number threshold, determining whether the target pushed video is the most recently released video in the target video set; When it is determined that the target pushed video is the most recently released video in the target video set, the target associated video is sent to the video playback end.
6. The method according to claim 1, characterized in that The playing of the target-related video includes: Obtaining the validity period of the target associated video; Determine whether the current time exceeds the validity period; When it is determined that the current time does not exceed the validity period, the target-associated video is played.
7. The method according to claim 1, characterized in that After receiving the target-associated video sent by the server and storing the target-associated video in a preset storage medium, the method further includes: When receiving the notification information sent by the server, obtaining the to-be-played video segment corresponding to the notification information, wherein the to-be-played video segment is the target associated video pushed by the server and stored in the storage medium; Prompt information for prompting the user to play the video segment to be played is output through a visual interface.
8. The method according to claim 1, characterized in that Before sending the video parameters to a preset server, the method further includes: Determining the video playback rules and movie viewing rules of the user according to the historical playback records; Inputting the video playback rule and the movie viewing rule into a pre-trained user movie viewing model to obtain the user's movie viewing probability output by the user movie viewing model; In a case where the viewing probability is greater than a preset probability threshold, the step of sending the video parameters to a preset server is performed.
9. A video playback device, characterized in that: Applied to a video player, the device comprises: An acquisition module, used to acquire the user's historical playback records within a preset time period when it is determined that the video pre-acquisition condition is currently met; A screening module, used to screen the videos included in the historical playback records according to preset screening rules to determine the target video; A sending module, used for acquiring video parameters of the target video, and sending the video parameters to a preset server, so that the server determines the target associated video to be published of the target video according to the video parameters and a preset matching rule, and sends the target associated video to the video playback end; A storage module, used for receiving the target-related video sent by the server, and storing the target-related video in a preset storage medium; The playing module is used to obtain the target-related video from the storage medium and play the target-related video when receiving a playing request for the published target-related video.
10. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a video playback program stored in the memory to implement the video playback method according to any one of claims 1 to 8.
11. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the video playback method according to any one of claims 1 to 8.