Play jump processing method, device, electronic equipment and medium
In the video scheduling service, by using the video channel of the target period to send videos of overlapping periods to multiple users, and determining the target video channel according to user requests, the problem of excessive load on the video source and user playback jump is solved, and the problem of excessive load on the video source is realized. Efficient video resource utilization and personalized playback experience.
Patent Information
- Application Number
- CN202210662369.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-06-13
AI Technical Summary
In the video scheduling service, frequent video requests lead to excessive load on the video source and waste of network resources, and users cannot realize personalized playback jumps, affecting the viewing experience of other users.
By sending videos of overlapping periods to multiple users in the video channel corresponding to the target period, and determining the jump type and target video channel of the playback jump request based on the user's playback jump request, ensuring that the jump video playback does not affect the jump. Other users, save video channel resources.
It reduces the load of video sources, meets users' personalized playback needs, improves the utilization rate of video channel resources, and avoids the black screen and screen-flowing phenomenon during video jump.
Smart Images

Figure CN115209226B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a playback jump processing method, device, electronic equipment and medium. Background Art
[0002] At present, with the development of network technology, users are accustomed to watching videos online, including real-time videos, such as live broadcasts and surveillance, and recorded videos, such as movies and TV series, etc. Generally speaking, the server sends the video requested by the user to the user where the user is located.
[0003] In the related art, when providing video scheduling services to users, the corresponding video is generally requested from the video source according to the needs of each user. For example, in a monitoring scenario, the corresponding video will be requested from the camera device according to the request of each user. In this way, the video source will be frequently retrieved, causing the video source to receive a large number of video requests and cause downtime, and also waste a lot of network resources. Summary of the invention
[0004] In view of the above problems, an embodiment of the present invention provides a playback jump processing method, device, electronic device and medium to overcome the above problems or at least partially solve the above problems.
[0005] According to a first aspect of an embodiment of the present invention, a playback jump processing method is disclosed, the method comprising:
[0006] For multiple users whose request time period overlaps with the target time period, the video of the overlapping time period is respectively sent to the multiple users through the video channel corresponding to the target time period;
[0007] In response to a play jump request sent by a target user among the plurality of users for the request time period, determining a play time moment to which the play jump request jumps;
[0008] Based on the playback moment, a target video channel that responds to the playback jump request is determined, and the video starting from the playback moment is sent to the target user through the target video channel.
[0009] Optionally, determining a target video channel for responding to the playback jump request based on the playback time includes:
[0010] Based on the play time and the current play time in the target time period, determining a jump type of the play jump request, wherein the jump type includes an advance play type and a fallback play type;
[0011] Based on the jump type, the target video channel is determined.
[0012] Optionally, determining the target video channel based on the jump type includes:
[0013] In the case where the jump type is the advance play type, creating a first video channel, and using the first video channel as the target video channel;
[0014] In the case where the jump type is the type of backward playback, the target video channel is determined based on the cache data of the currently used video channel.
[0015] Optionally, when the jump type is the type of advance playback, the method further includes:
[0016] Determining whether there is currently a second video channel containing the playback time;
[0017] In the case where the second video channel exists, creating a new first video channel and using the first video channel as the target video channel includes:
[0018] Determining whether the playback time is later than the current playback time of the second video channel;
[0019] If yes, then create a new first video channel and use the first video channel as the target video channel;
[0020] If not, the second video channel is used as the target video channel.
[0021] Optionally, determining the target video channel based on cached data of a currently used video channel includes:
[0022] Determine whether the cache start time of the cached data is earlier than the playback time;
[0023] If yes, taking the currently used video channel as the target video channel;
[0024] If not, a third video channel is newly created, and the third video channel is used as the target video channel.
[0025] Optionally, sending the video starting from the playback moment to the target user through the target video channel includes:
[0026] Determining a target key frame corresponding to the playback moment;
[0027] The video data starting from the target key frame is sent to the target user through the target video channel.
[0028] Optionally, determining the target key frame corresponding to the playback moment includes:
[0029] Determining two key frames adjacent to the playback moment;
[0030] The start key frame or the end key frame of the two key frames is used as the target key frame.
[0031] The embodiment of the present invention further discloses a playback jump processing device, the device comprising:
[0032] A first sending module, configured to send the video of the overlapping time period to a plurality of users whose request time period overlaps with the target time period through the video channel corresponding to the target time period;
[0033] a play time determination module, configured to determine the play time to which the play jump request jumps in response to a play jump request sent by a target user among the plurality of users for the request time period;
[0034] The second sending module is used to determine a target video channel that responds to the play jump request based on the play time, and send the video starting from the play time to the target user through the target video channel.
[0035] The embodiment of the present invention further discloses an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0036] Memory, used to store computer programs;
[0037] The processor is used to implement the playback jump processing method as described in the first aspect of the embodiment of the present invention when executing the program stored in the memory.
[0038] The embodiment of the present invention further discloses a computer-readable storage medium, wherein the computer program stored in the storage medium enables a processor to execute the playback jump processing method as described in the first aspect of the embodiment of the present invention.
[0039] The embodiments of the present invention include the following advantages:
[0040] In this embodiment, for multiple users whose request time periods overlap with the target time periods, the videos of the overlapping time periods can be respectively sent to the multiple users through the video channels corresponding to the target time periods; and for the play jump request triggered by the target user among the multiple users for the request time period, the play time to which the play jump request jumps is determined; then, based on the play time, the target video channel that responds to the play jump request is determined, and the video starting from the play time is sent to the target user through the target video channel.
[0041] Adopting the technical solution of the present application, on the one hand, due to the fact that there are multiple users whose request time period overlaps with the target time period, the video of the overlapping time period can be sent through the video channel corresponding to the target time period. In this way, the video of the overlapping time period can be sent to multiple users through the same video channel, and then for the video of the overlapping time period, there is no need to request the video source for each user to retrieve the video, thereby reducing the load of the video source. On the other hand, in the case where the target user can use the video channel of the overlapping time period to receive the video of the overlapping time period, if the target user triggers the play jump request, the play time to which the play jump request jumps can be determined, and the target video channel is determined based on the play time. Then, the video starting from the play time can be sent to the target user through the target video channel. In this way, the play of the video after the target user jumps can be satisfied through the target video channel. Thus, in the process of multiple users watching videos on the shared video channel, one of the users can be allowed to jump to watch the video without affecting the viewing of other users. On the other hand, since the video channel corresponding to the target time period can be used to send videos of the overlapping time period to multiple users, there is no need to create a new video channel for users whose requested time period overlaps, so that multiple users can share the video channel, thereby saving video channel resources and improving the utilization rate of video channel resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 is an implementation environment diagram of the playback jump processing method of an embodiment of the present invention;
[0044] Figure 2 is a flowchart of a playback jump processing method according to an embodiment of the present invention;
[0045] Figure 3 is a schematic diagram of sending video data of corresponding time periods to different terminals in turn in the same video channel in an embodiment of the present invention;
[0046] Figure 4 It is a structural schematic diagram of a playback jump processing device in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] In the related art, the videos watched online include live videos and recorded videos. Generally speaking, when there is a demand for watching videos shot by a camera device, for example, when there is a demand for watching videos shot by a camera device, the video shot by the camera device will be retrieved. The retrieved video is generally based on the time period that the user wants to retrieve, so as to specifically retrieve the video in the corresponding time period. For example, if the user wants to watch the video shot by the camera device in the time period of 15:00-16:00, the video shot in the time period of 15:00-16:00 will be retrieved and sent to the user. Of course, depending on the viewing time period, the retrieved video can be a video shot in real time by the camera device, or it can be a video that is recorded and stored on the user device in the dispatch room.
[0049] In the related art, it is necessary to initiate a request to the camera device and create a new video channel for each user. In this way, a corresponding video channel will be established for each user, which will lead to a waste of video channel resources, and the video will be retrieved from the dispatch room or the camera device again; this not only leads to a waste of video channel resources but also increases the load on the user equipment of the camera device or the dispatch room.
[0050] In order to save video channel resources, one video channel is generally used to send videos of the target time period to multiple users. However, this method is similar to the live broadcast mode, that is, all users in the video channel watch live data, and it is impossible to watch videos according to the user's own needs. In this way, a user cannot arbitrarily play and jump, because his arbitrary play jump may affect other users' viewing. For example, for the video from 15:00 to 16:00, the current live broadcast is to 15:10. When one of the users 1 drags to 15:30, the video source will be requested to play the video starting from 15:30. In this way, the video of the video channel will jump to 15:30 to start playing. In this way, the video screen watched by user 2 and user 3 will jump directly from 15:10 to 15:30, so these users will miss the video screen between 15:10 and 15:30.
[0051] In view of this, the applicant has proposed a solution that can reduce the load of the video source device and meet the viewing needs of different users. The core concept is: for multiple users whose request period overlaps with the target period, the video of the overlapping period is sent to the multiple users respectively through the video channel of the target period; when a playback jump request triggered by the target user for the request period is received, the playback time to which the playback jump request jumps is determined, and the corresponding target video channel is determined based on the playback time; the video starting from the playback time is sent to the target user through the target video channel.
[0052] Therefore, for a playback jump request from a user sharing the same video channel, the target video channel can be re-determined to send the jumped video to the corresponding user, thus satisfying the target user's jump video viewing without affecting other users' viewing.
[0053] Reference Figure 1 As shown, an implementation environment diagram of the playback jump processing method of the embodiment of the present application is shown, such as Figure 1 As shown, it includes: a server, a camera device, a dispatch room and multiple users; wherein the camera device is generally connected to the corresponding dispatch room. When the server needs to retrieve the video of the camera device, if real-time video is needed, it can be retrieved from the camera device; if it is a recorded video, it can be retrieved from the terminal device in the dispatch room. The terminal device in the dispatch room generally stores the video after recording the video taken by the camera device.
[0054] The video referred to in this application may be a video shot by a camera device, and the time period may refer to the shooting time period of the video shot by the camera device. For example, if the camera device shoots a video between 14:00 and 16:00, the time period of the video is 14:00-16:00; of course, a general camera device will store videos shot 24 hours a day as a video file. If you want to request a video of a certain time period in a day, the video of the time period will be extracted and sent to the user based on the shooting time of the video data in the video file.
[0055] Among them, the above Figure 1 The communication environment can be in a visual network, in the Internet, or in both the visual network and the Internet. When located in a visual network, the video channel referred to in this application can be roughly understood as a virtual terminal. In the visual network, a virtual terminal will be allocated to a user who requests resources, so that the user receives the required resources through the virtual terminal or uploads shared resources to the visual network. Generally speaking, the number of virtual terminals in a visual network is limited. When the video of the same time period in which this application is proposed can be sent to multiple users using the same video channel, the virtual terminal resources in the visual network can be saved.
[0056] by Figure 1 The implementation environment described above is taken as an example to introduce the playback jump processing method of the embodiment of the present application. Of course, in actual application, the playback jump processing method of the present application can be used not only for Figure 1 In the implementation environment, it is also applicable to other video service scenarios, such as the application scenario of watching product live broadcasts and the scenario of watching TV series with episodes (one episode can be considered as a time period).
[0057] Reference Figure 2As shown, a flowchart of the play jump processing method according to an embodiment of the present application is shown. Specifically, the server may perform the following steps: Figure 2 As shown, the following steps are included:
[0058] Step S201: for multiple users whose request time period overlaps with the target time period, the video of the overlapping time period is respectively sent to the multiple users through the video channel corresponding to the target time period.
[0059] In a specific implementation, each time a video of a time period is requested for the first time, the video of the time period will be scheduled to the corresponding user through a video channel. After the video channel is created, for multiple users whose request time period overlaps with the time period of the video channel (target time period), the corresponding videos of the overlapping time periods can be sent directly to the multiple users through the video channel.
[0060] For example, a user 1 initiates a request for a video from 15:00-16:00, and it is determined that 15:00-16:00 is the time period requested for the first time, that is, no user currently requests the video for this time period, and no other user watches the video for this time period. In this way, a video channel corresponding to 15:00-16:00 can be created on the server side. In the process of sending the video to user 1 through the video channel, if the request time period of other users overlaps with 15:00-16:00, the video of the overlapping time period can be sent to other users through the video channel; other users can use the video channel of 15:00-16:00 to watch the video of the overlapping time period.
[0061] In an optional example, different video channels can be used to schedule videos of different time periods, that is, different video channels will send videos of different time periods to corresponding users. Among them, the time periods corresponding to each video channel (hereinafter referred to as video channel time periods) can be non-intersecting, so that the videos sent by multiple video channels are separated on the time axis. For example, three video channels, these three video channels correspond to videos of three time periods, and these three time periods can be non-intersecting, such as corresponding to the time periods of 15:00-16:00, 14:00-15:00, and 12:00-13:00 respectively. In this way, each video channel can be responsible for the transmission of videos of one time period. In this way, for a camera device, the video it shoots can create video channels based on the time periods requested by the user, thereby saving video channel resources overall. For example, the video shot by the camera device in a day, among which there are user requests in the time periods of 10:00-12:00, 14:00-16:00, and 18:00-19:00, three video channels can be created on the server side, and the three video channels can meet the viewing needs of many users with the same time period requirements.
[0062] like Figure 1 As shown, when sending the video corresponding to the overlapping time period through the video channel, if it is a recorded broadcast scene, the server can retrieve the video of the corresponding time period from the terminal device in the dispatch room, and then send the retrieved video to multiple users, so that multiple users can watch the recorded video; if it is a live broadcast scene, the server can retrieve the video shot in real time by the camera device from the camera device, and then broadcast the retrieved video to multiple users, so that multiple users can watch the live broadcast.
[0063] In an optional example, for each user, the video of the overlapping time period can be sent using the video channel corresponding to the target time period, and for the video of the time period other than the overlapping time period in the requested time period, a new video channel can be created for sending.
[0064] In an optional example, in the process of sending the videos of the overlapping time periods to multiple users respectively through the video channels of the target time period, the video channels can be used in turn to send the videos currently required by multiple users, that is, at the same time, only one user occupies the first video channel to receive the video required by the user. And each user receives video data each time, and the received video data is the video data offset according to the starting time of the user in the target time period. For example, for user 2, the starting time is 15:30, and for user 3, the starting time is 15:00.
[0065] Reference Figure 3 As shown, a schematic diagram of sending video data of corresponding time periods to different terminals in turn in the same video channel is shown. For example, the video channel is for videos from 15:00 to 16:00, user 4 is a terminal with live broadcast requirements, the time period requested by user 2 overlaps with 15:00 to 16:00, and the overlapping time period is 15:00 to 15:30, and the time period requested by user 3 overlaps with 15:00 to 16:00, and the overlapping time period is 15:30 to 16:00;
[0066] The current playback time is 15:10. Before 15:10, live video is sent to user 4. At the playback time of 15:10, video data from 15:10 to 15:11 is first sent to user 4 in the video channel. After that, video data from 15:00 to 15:01 is sent to user 2. After that, video data from 15:11 to 15:12 is sent to user 4. After that, video data from 15:02 to 15:03 is sent to user 2, and so on. When the playback time of 15:30 arrives, video data from 15:30 to 16:00 is broadcast live to user 4 and user 3 in the video channel. During the live broadcast, the video starting from 15:20 is still sent to user 2 in the previous mode.
[0067] Step S202: for a play jump request triggered by a target user among multiple users for a requested time period, determine a play time to which the play jump request jumps.
[0068] Step S203: Based on the playback time, determine the target video channel that responds to the playback jump request, and send the video starting from the playback time to the target user through the target video channel.
[0069] In this embodiment, among multiple users who have joined the video channel corresponding to the target time period, if one of the target users triggers a play jump request within his own request time period, that is, jumps from the current play time to another play time, in this case, in order to satisfy the jump play of the target user without affecting the video viewing of other users, the target video channel that responds to the play jump request can be determined based on the play time. The target video channel is a video channel determined to respond to the play jump request to send the video starting from the play time.
[0070] In an optional example, the play jump request can be understood as a request generated by the user dragging the progress bar. Generally speaking, a progress bar will be set on the user's play page, which can be a progress bar generated based on the user's request period. For example, if the request period is 14:00-16:00, the progress bar corresponds to 14:00-16:00, where the two time points of 14:00 and 16:00 can be marked on the progress bar, or the time point of 15:00 can be marked. The marking of the time point is to provide the user with a reference for the playback time point when the user drags. Among them, when the user drags the progress bar, it can be dragged forward or backward relative to the current playback time. When dragging forward, it can indicate that the user wants to watch the video ahead of time, and when dragging backward, it can indicate that the user is watching the video again.
[0071] Among them, since the target user's request time period may only include the overlapping time period with the target user, or may include the overlapping time period overlapping with multiple different target time periods, that is, it has multiple overlapping time periods, or may also include time periods other than the overlapping time periods, when sending the video of the requested time period to the target user, it may be sent through one video channel (the video channel corresponding to the target time period) or through multiple video channels.
[0072] In this way, when determining the target video channel based on the playback time, it is possible to first determine which part of the requested time period the playback time to jump to is in, and determine the target video channel based on the video channel corresponding to the part of the time period. The target video channel may be the video channel corresponding to the part of the time period, or a newly created video channel.
[0073] By adopting the technical solution of this embodiment, on the one hand, the videos of the respective overlapping time periods can be sent to multiple users through the same video channel, without requesting video retrieval from the video source for each user, thereby reducing the load of the video source. On the other hand, in the case where the target user can use the video channel of the overlapping time period to receive the video of the overlapping time period, if the target user triggers a play jump request, the target video channel corresponding to the play time to which the play jump request jumps can be determined, and then the video starting from the play time can be sent to the target user through the target video channel. In this way, in the process of multiple users watching videos on a shared video channel, one of the users can be allowed to jump to watch the video without affecting the viewing of other users. On the other hand, since the first video channel can be used to send the videos of the overlapping time period to multiple users, in this way, for users with overlapping time periods in the request period, there is no need to create a new video channel, so that multiple users can share the video channel, thereby saving video channel resources and improving the utilization rate of video channel resources.
[0074] This embodiment will now mainly describe the target user and explain how to execute the playback jump request of the target user.
[0075] First, the process of sending a video to each user according to the requested request period of the present application is described:
[0076] In one embodiment, the request time period of each user may only include the overlapping time period with the target user, or may include the overlapping time period overlapping with multiple different target time periods, that is, having multiple overlapping time periods, or may also include time periods other than the overlapping time periods. In this way, the request time period can be divided into at least one sub-time period by the overlapping time period, and the overlapping time period is one of the sub-time periods.
[0077] For example, the request period of user 1 is 14:00-16:00, and the target period is 15:00-16:00, then the overlapping period is 15:00-16:00, so the request period is divided into two periods: 14:00-15:00 and 15:00-16:00.
[0078] Accordingly, the video of each sub-period can be sent respectively through the video channel corresponding to at least one sub-period according to the request period sent by the user. Among them, for the sub-period that belongs to the overlapping period that overlaps with the target period, the video of the sub-period can be sent using the video channel corresponding to the overlapping period, and for the sub-period that does not belong to the overlapping period, a new video channel can be created to send the video of the sub-period.
[0079] For example, the video channel corresponding to 15:00-16:00 can be used to send the video of this period to user 1, and a new video channel can be created to send the video of 14:00-15:00. Of course, when sending the video of 14:00-16:00, the video of 14:00-15:00 is first sent using the newly created video channel, and then the video channel corresponding to 15:00-16:00 is multiplexed to send the video of 15:00-16:00.
[0080] Next, two optional implementation methods of determining the target video channel according to the playback time to which the playback jump request jumps are described in the present application:
[0081] Implementation method 1:
[0082] When the target user triggers a play jump request, the server will resend the video to the target user based on the play jump request. In an optional embodiment, the jump type of the play jump request can be determined based on the play time and the current play time of the request period, and the target video channel can be determined based on the jump type; wherein the jump type includes an advance play type and a fallback play type.
[0083] When it is determined that the playback jump request is of the advance playback type, indicating that the user needs to watch the video after the current playback time, the following tasks may be performed:
[0084] One possible implementation method is to directly create a first video channel and use the first video channel as the target video channel. In this case, in order to meet the advanced playback requirements of the target user without affecting the video viewing of other users, a first video channel can be created, and the newly created first video channel can be used to directly send the target user the video starting from the playback time to be jumped.
[0085] Of course, in some other embodiments, since the request period of the present application may be divided into multiple sub-periods by the overlapping period, and the target period also changes dynamically, for example, at one moment, the video channel from 15:00 to 16:00 exists, and at the next moment, the video channel from 15:00 to 16:00 is released because all video sending tasks are completed. Or, at one moment, the video channel from 15:00 to 16:00 does not exist, and at the next moment, the video channel from 15:00 to 16:00 is created again due to the user's request.
[0086] Therefore, when it is determined that it is the type of advance playback, it can be determined whether there is currently a second video channel containing the playback time. If there is no second video channel, and when there is a second video channel but the playback time is later than the current playback time of the second video channel, a new first video channel is created and the first video channel is used as the target video channel; if there is a second video channel and the playback time is earlier than the current playback time of the second video channel, the second video channel is used as the target video channel.
[0087] In this embodiment, if the second video channel does not exist, it means that there is no video channel that can be reused at the playback time to jump to, so a new first video channel needs to be created; if the second video channel exists, but the current playback time of the second video channel is earlier than the playback time to jump to, it means that the playback time to which the target user fast-forwards is after the current playback time of the second video channel, and the second video channel does not cache the video of this part. For example, the target time period of the second video channel is 15:10-16:00, the current playback time is 15:20, and the playback time to jump to is 15:30, then the corresponding video is not cached in the server. In this case, a new first video channel is created to send the video to the target user.
[0088] If there is a second video channel, but the current playback time of the second video channel is later than the playback time to be jumped to, it means that the target user fast-forwards to the playback time before the current playback time, and the second video channel has already cached the video of this part. For example, the target time period of the second video channel is 15:10-16:00, the current playback time is 15:20, and the playback time to be jumped to is 15:15, then the corresponding video has been cached in the server, so there is no need to create a new channel to re-request the video, and the video can be directly extracted from the cached video through the second video channel and sent to the target user.
[0089] When it is determined that the playback jump request is of the type of backward playback, indicating that the user needs to watch the video that has been watched before the current playback time, the following tasks can be performed:
[0090] The target video channel is determined based on the cached data of the currently used video channel, wherein the currently used video channel may be the video channel through which the server sends the video to the target user before the play jump request occurs.
[0091] In this case, the current video channel can generally be reused directly, and the video starting from the playback time can be extracted from the cached videos and sent to the target user. However, in some cases, the video cache period is limited, for example, a video is cached every three minutes. After a certain number of videos are cached, the first cached videos can be cleared according to the first-in-first-out principle to save storage space. In this way, if the current video channel continues to be reused to respond to the playback jump request, the corresponding video data may not be extracted from the cached videos of the current video channel. To avoid this problem, the cache start time of the video currently cached by the current video channel can be determined.
[0092] If the cache start time of the video cached by the current video channel is earlier than the playback time, it indicates that the cached video contains video data starting from the playback time, and the current video channel is used as the target video channel. For example, the time period corresponding to the current video channel is 15:00-16:00, the playback time corresponding to the current playback jump request is 15:10, and the cache start time of the cached video is 15:05. The time period of the cached video is: the time period after 15:05, and the video starting from 15:10 can be directly sent from the cached video through the current video channel.
[0093] If the cache start time is later than the playback time, it indicates that there is no video data starting from the playback time in the cached video, so a new third video channel is created and the third video channel is used as the target video channel. For example, the time period corresponding to the current video channel is 15:00-16:00, the playback time corresponding to the current playback jump request is 15:10, and the cache start time of the cached video is 15:15. The time period of the cached video is: the time period after 15:15, and there is no video before 15:15, so a new third video channel needs to be created.
[0094] Implementation method 2:
[0095] Since the target user's request period is divided into multiple sub-periods by the overlapping period, when a playback jump request occurs, the target sub-period where the playback time to be jumped to is located can be determined. If the video channel of the target sub-period still exists, the corresponding target video channel is determined based on the time sequence between the current playback time of the video channel of the target sub-period and the playback time to be jumped to. The details are as follows:
[0096] First, it can be determined whether the video channel of the target sub-period corresponds to a user other than the target user; if so, the target video channel is determined based on the playback time and the current playback time of the video channel of the target sub-period; if not, the video channel of the target sub-period is used as the target video channel.
[0097] In this embodiment, by determining whether the video channel of the target sub-period corresponds to a user other than the target user, it can be determined whether the video channel of the target sub-period satisfies the video transmission of multiple users, that is, whether the video channel of the target sub-period is a shared video channel. If it is a shared video channel, when responding to the play jump request of the target user, it is necessary to avoid affecting the video viewing of other users in the video channel of the target sub-period. Of course, if the video channel of the target sub-period only includes the target user, the video channel of the target sub-period is a dedicated video channel for the target user. In this case, when the video channel of the target sub-period responds to the play jump request of the target user, it will not affect the video viewing of other users.
[0098] Among them, when it is determined that the video channel of the target sub-time period corresponds to a user other than the target user, in order to respond to the playback jump request of the target user, it is necessary to avoid affecting the video viewing of other users in the video channel of the target sub-time period. Therefore, it can be determined first whether sending the video to the target user from the playback time will affect the video viewing of other users.
[0099] Specifically, since the video called by the video channel of the target sub-period is cached, for users who join the video channel of the target sub-period later and whose starting time is before the time corresponding to the video currently called by the video channel of the target sub-period, video data can be obtained from the cached video and sent.
[0100] Specifically, if the playback time exceeds the current playback time of the video channel of the target sub-period, it means that the time of the video that the target user wants to watch is later than the time of the video currently played by the video channel of the target sub-period, and the target user sends a playback jump request of the advanced viewing type. In this case, if the playback jump request is responded to through the video channel of the target sub-period, the server will re-retrieve the video from the video source, which will affect the video viewing of other users. Therefore, a new first video channel can be created and the first video channel can be used as the target video channel.
[0101] If the playback time does not exceed the current playback time of the video channel of the target sub-period, it means that the time of the video that the target user wants to watch is not later than the time of the video currently playing on the video channel of the target sub-period. The target user initiates a fallback playback request, requesting to watch the video that has been sent by the video channel of the target sub-period. In this case, if the playback jump request is responded to through the video channel of the target sub-period, the video can be extracted from the video cached in the video channel of the target sub-period without re-requesting the video from the camera device. Therefore, it will not affect the video viewing of other users. One case is to directly use the video channel of the target sub-period as the target video channel.
[0102] For example, assuming that the current playing time of the video channel of the target sub-period is 15:10, and the target user directly jumps to 15:40 to start playing, the video channel of the target sub-period will jump to the video starting at 15:40, which will inevitably cause other users to miss the video screen. Therefore, in this case, a new first video channel will be created.
[0103] For example, assuming that the current playback time of the video channel of the target sub-period is 15:10, and the target user directly jumps to 15:00 to start playback, the corresponding video may have been cached in the server. In this case, the video channel of the target sub-period is directly reused, and the video starting at 15:00 can be extracted from the cached video and sent to the target user.
[0104] Of course, if the playback time does not exceed the current playback time of the video channel of the target sub-period, in this case, the video channel of the target sub-period can be directly reused, and the video starting from the playback time can be extracted from the cached video and sent to the target user. However, in some cases, as shown above, the time period of video caching is limited, for example, one video is cached every three minutes, and after a certain number of videos are cached, the first cached video can be cleared according to the first-in-first-out principle. In this way, if the video channel of the target sub-period continues to be reused to respond to the playback jump request, the corresponding video data may not be extracted from the cached video of the video channel of the target sub-period. To avoid the occurrence of this problem, the cache start time of the video currently cached by the video channel of the target sub-period can be determined.
[0105] If the cache start time of the video cached by the video channel of the target sub-period is earlier than the playback time, it means that the cached video has video data starting from the playback time, and the video channel of the target sub-period is used as the target video channel. If the cache start time is later than the playback time, it means that the cached video does not have video data starting from the playback time, and a third video channel is newly created and used as the target video channel.
[0106] Next, the playback jump processing method on the server side is generally described, which specifically includes the following processes:
[0107] S1: receiving a video playback request for a requested time period from a target user, if the requested time period does not overlap with the time period corresponding to any existing video channel, then creating a separate video channel 1 corresponding to the target user, and proceeding to step S2;
[0108] If the request period coincides with the period corresponding to an existing video channel, the video channel of the coincident period is used as the video channel of the coincident period for the target user, wherein the request period is divided into multiple sub-periods by the coincident period, and the video of each sub-period can be sent to the target user through the video channel corresponding to the sub-period, and the process proceeds to step S3.
[0109] S2: If a playback jump request sent by a target user is received, determine the playback time to which the playback jump request jumps, and send the video starting from the playback time through video channel 1.
[0110] S3: If a play jump request is received from a target user when watching a video in a requested time period, determine the play time to which the play jump request jumps, and determine the jump type of the play jump request based on the play time and the current play time of the requested time period.
[0111] When the jump type is the type of advance playback, execute steps S4-S7. When the jump type is the type of rewind playback, execute steps S8-S10.
[0112] S4: Determine whether there is a second video channel containing a playback time at present:
[0113] If yes, go to step S5; if no, go to step S6.
[0114] S5: Determine whether the current playback time of the second video channel is earlier than the playback time to be jumped to, if so, execute S6, if not, execute S7.
[0115] S6: Create a new first video channel, and use the first video channel as the target video channel.
[0116] S7: Use the second video channel as the target video channel.
[0117] S8: Determine whether the cache start time of the video cached by the currently used video channel is earlier than the playback time to jump to; if so, enter S9; if not, enter S10.
[0118] S9: The currently used video channel is used as the target video channel, and the video starting from the playback time is sent through the currently used video channel. In this case, the cached data of the currently used video channel can meet the needs of playing the video after the jump.
[0119] S10: Create a new third video channel, use the third video channel as the target video channel, and send the video starting from the playback time through the third video channel. In this case, the cache data of the currently used video channel cannot meet the needs of playing the video after the jump, and another video channel needs to be created.
[0120] In an optional example, during video playback jump, if the playback time to which the user drags the progress bar happens not to be an I frame but a P frame or a B frame, if it is a P frame or a B frame, the playback end cannot decode it and will automatically discard it, and the video screen will be black or distorted. In this regard, when sending the video starting from the playback time to the target user through the target video channel, the target key frame corresponding to the playback time can be determined, and the video data starting from the target key frame can be sent.
[0121] Specifically, two key frames adjacent to the playback moment may be determined; the start key frame or the end key frame of the two key frames may be used as the target key frame. In specific implementation, the time interval of each two adjacent key frames in the request period may be determined; the target time interval where the start playback moment is located may be determined from multiple time intervals; the start key frame or the end key frame of the target time interval may be used as the target key frame.
[0122] In an optional implementation, the process of determining the time interval between every two adjacent key frames in the request period can be: obtaining the playback parameters of the request period, the playback parameters can include a frame rate, wherein the frame rate is the frequency (rate) at which a bitmap image in units of frame rate appears continuously on the display, wherein the frame rate can be carried in a video data packet as a data describing video attributes, which is related to the playback rate of the video, so that the I frame interval and frame rate can be determined based on the frame rate. In practice, all videos contain at least one key frame as the first frame of the file, and other key frames can be used to improve the quality of the video. Generally speaking, at least 1 key frame is required for every second of video. When the frame rate is 25 frames per second, there will be 1 key frame every 25 frames. Therefore, according to
[0123] If the I frame interval of the camera device is 50 and the video frame rate is 25fps, it means that the I frame interval is 2s and one I frame appears in 2s. Among them, the time interval between each two adjacent key frames in the request period can be determined according to the time interval between each two adjacent key frames in the request period and the request period, and then it can be determined whether there is a key frame at the playback time point to which the play jump request jumps.
[0124] For example, the video frame rate is 25fps, and the I frame interval is 50. Then in the request period, every 2s is the time interval between every two adjacent key frames, such as the time interval between I frame 1 and I frame 2 is 15:00:00-15:00:02, the time interval between I frame 2 and I frame 3 is 15:00:02-15:00:04, and so on.
[0125] If there is a key frame at the playback time to which the play jump request jumps, the video data can be sent to the target user starting from the key frame at the playback time. If there is no key frame at the playback time to which the play jump request jumps, the key frame interval where the playback time is located is determined, and the key frame interval is the time interval between each two adjacent key frames in the request period, and then the start key frame or the end key frame of the two key frames in the key frame interval is used as the target key frame.
[0126] Assume that the playback time to which the play jump request jumps is 15:00:03, and there is no key frame here, then I frame 2 or I frame 3 will be used as the target key frame, where I frame 2 is the start key frame and I frame 3 is the end key frame.
[0127] In practice, the end key frame or the start key frame can be used as the target key frame to start sending video data to the target user. In this case, the playback time to which the playback jump request jumps can be corrected to the playback time corresponding to the target key frame, and then the video data is sent to the target user starting from the playback time corresponding to the target key frame.
[0128] In an optional embodiment, the key frame between the start key frame and the end key frame that is closer to the playback time to which the playback jump request jumps can be used as the target key frame. In this case, the time between the issuance of the playback jump request and the target user seeing the video screen can be shortened, so that the target user can see the video screen after the playback jump as soon as possible.
[0129] Below, Figure 1 Taking the implementation environment shown as an example, combined with a specific example, the playback jump processing method of the present application is generally described:
[0130] 1. User 1, User 2, User 3 and User 4 enter the video channel A1 from 15:00 to 16:00 at different times and watch the video from 15:00 to 16:00. In the video channel A1, User 1, User 2, User 3 and User 4 all start watching the video from 15:00, among which User 4 watches the video in live broadcast mode, that is, the viewing progress of User 4 is synchronized with the progress of the video retrieved by the video channel A1.
[0131] Among them, at the live broadcast time 15:20, user 4 is currently watching the 15:20 picture, user 2 is watching the 15:10 picture, user 3 is watching the 15:05 picture, and user 1 is watching the 15:01 picture.
[0132] For user 2, the request period of user 2 is 14:00-16:00, wherein the newly created video channel A2 is responsible for sending the video from 14:00-15:00, and the video from 15:00-16:00 is responsible for sending the video from video channel A1.
[0133] 2. When user 2 reaches 15:20 (the current live broadcast time of video channel A1 is 15:30), he directly drags the progress bar to jump to the playback, and determines the target video channel according to the playback time to jump to.
[0134] 3. Determine whether to rewind or advance the video based on the playback time jumped to and the current playback time of user 2.
[0135] Case 1: Advance viewing. The playback time jumped to exceeds 15:20. At 15:40, it is determined that video channel A1 cannot meet the advance viewing. A new video channel A3 needs to be created to send the video.
[0136] Case 2: For advanced viewing, the playback time jumped to exceeds 15:20. At 15:25 (the current live broadcast time of video channel A1 is 15:30), it is determined that video channel A1 can meet the advanced viewing, and video channel A1 is multiplexed to send the video.
[0137] Case 4: Go back and watch. The playback time jumped to is 15:10. Determine whether the cache start time of the cached data of video channel A1 is earlier than 15:10. If it is earlier, the current video channel A1 sends the video; if it is later, a new video channel A4 sends the video.
[0138] Case 5: Go back and watch. The playback time jumped to is 14:10. Then determine whether video channel A2 still exists. If it does, determine whether the cache start time of the cached data is earlier than 14:10. If it is earlier, the current video channel A2 sends the video; if it is later, a new video channel A5 is created to send the video.
[0139] Case 6: When watching backwards, the playback time you jump to is 14:10. Video channel A2 no longer exists. Then you can create a new video channel A6 to send the video.
[0140] The technical solution of the embodiment of the present application has the following advantages:
[0141] First, it reduces the load on the video source.
[0142] Since there are multiple users whose request time periods overlap with the target time periods, the videos of the overlapping time periods can be sent through the video channel corresponding to the target time periods. In this way, the videos of the overlapping time periods can be sent to multiple users through the same video channel. Therefore, there is no need to request video retrieval from the video source for each user for the videos of the overlapping time periods, thereby reducing the number of times the video is requested from the video source and reducing the load on the video source as a whole.
[0143] Secondly, it meets the personalized video playback needs of different users.
[0144] In the scheme of sending videos through multiplexed video channels, if the target user triggers a play jump request, the play time to which the play jump request jumps can be determined, and the target video channel can be determined based on the play time. Then, the video starting from the play time can be sent to the target user through the target video channel. In this way, the target video channel can be used to satisfy the target user's need to play the video after the jump. Therefore, when multiple users are watching videos through a shared video channel, one of the users can be allowed to jump to watch the video without affecting the viewing of other users, thereby satisfying the user's personalized playback needs.
[0145] Thirdly, it saves video channel resources.
[0146] Since the video channel corresponding to the target time period can be used to send videos of the overlapping time period to multiple users, there is no need to create a new video channel for users whose requested time period overlaps with the target time period, so that multiple users can share the video channel, thereby saving video channel resources and improving the utilization rate of video channel resources.
[0147] Fourthly, avoid black screen and flowery screen phenomena during video jump.
[0148] The target key frame corresponding to the playback time to which the play jump request jumps is determined, and video data is sent starting from the target key frame. Therefore, the first frame sent to the target user is a decodable I frame, so that the video picture can be decoded and displayed on the playback page in time, avoiding the problems of black screen and flowery screen.
[0149] Based on the same inventive concept, a second aspect of an embodiment of the present invention discloses a video sending device, referring to Figure 4 , shows a playback jump processing device, which may specifically include the following modules:
[0150] The first sending module 401 is used to send the video of the overlapping time period to multiple users whose request time period overlaps with the target time period through the video channel corresponding to the target time period;
[0151] The play time determination module 402 is used to determine the play time to which the play jump request jumps in response to the play jump request sent by the target user among the multiple users for the request time period;
[0152] The second sending module 403 is used to determine a target video channel that responds to the play jump request based on the play time, and send the video starting from the play time to the target user through the target video channel.
[0153] Optionally, the second sending module 403 includes:
[0154] An operation type determining unit, configured to determine a jump type of the play jump request based on the play time and the current play time of the request period, wherein the jump type includes an advance play type and a rewind play type;
[0155] A video channel determination unit is used to determine the target video channel based on the jump type.
[0156] Optionally, the video channel determination unit includes:
[0157] A first determining subunit is configured to create a first video channel and use the first video channel as the target video channel when the jump type is the advance play type;
[0158] The second determining subunit is configured to determine the target video channel based on the cached data of the currently used video channel when the jump type is the fallback playback type.
[0159] Optionally, when the jump type is the advance play type, the step of creating a new first video channel and using the first video channel as the target video channel includes:
[0160] Determining whether there is currently a second video channel containing the playback time;
[0161] If not, and in the case that the second video channel exists but the play time is later than the current play time of the second video channel, executing the step of creating a new first video channel and taking the first video channel as the target video channel;
[0162] If the second video channel exists and the play time is earlier than the current play time of the second video channel, the second video channel is used as the target video channel.
[0163] Optionally, the second determining subunit is specifically configured to perform the following steps:
[0164] Determine whether the cache start time of the cached data is earlier than the playback time;
[0165] If yes, taking the currently used video channel as the target video channel;
[0166] If not, a third video channel is newly created, and the third video channel is used as the target video channel.
[0167] Optionally, the second sending module includes:
[0168] A key frame determination unit, used to determine a target key frame corresponding to the playback moment;
[0169] A sending unit is used to send the video data starting from the target key frame to the target user through the target video channel.
[0170] Optionally, the key frame determination unit includes:
[0171] An adjacent key frame determination subunit, used to determine two key frames adjacent to the playback moment;
[0172] The key frame selection subunit is used to select the start key frame or the end key frame of the two key frames as the target key frame.
[0173] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.
[0174] An embodiment of the present invention further provides a server, the server comprising a remote service module, and the remote service module is used to execute the playback jump processing method described in any of the above embodiments.
[0175] An embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0176] Memory, used to store computer programs;
[0177] The processor is used to implement the playback jump processing method as described in the first aspect of the embodiment of the present invention when executing the program stored in the memory.
[0178] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program that enables a processor to execute the playback jump processing method as described in any of the above embodiments of the present invention.
[0179] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0180] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0181] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0182] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0184] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0185] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0186] The above is a detailed introduction to a playback jump processing method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in the field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A playback jump processing method, characterized in that: The method comprises: For multiple users whose request time periods overlap with the target time periods, the videos of the overlapping time periods are sent to the multiple users in turn through the video channels corresponding to the target time periods, and the videos of the time periods other than the overlapping time periods in the request time periods are sent through another different video channel, so as to send the videos of the request time periods to the users through multiple video channels; wherein different video channels are for different time periods; wherein each of the users receives video data each time, the received video data is video data offset from the starting time of the user in the target time period; In response to a play jump request sent by a target user among the plurality of users for the request time period, determining a play time moment to which the play jump request jumps; Based on the playback time, determine a target video channel that responds to the playback jump request, and send the video starting from the playback time to the target user through the target video channel; wherein the target video channel is a multiplex of a video channel corresponding to a part of the time period where the playback time is located, or is a newly created video channel; The determining, based on the playback time, a target video channel that responds to the playback jump request includes: Based on the play time and the current play time of the request period, determining a jump type of the play jump request, wherein the jump type includes an advance play type and a fallback play type; Based on the jump type, the target video channel is determined.
2. The method according to claim 1, characterized in that Based on the jump type, determining the target video channel includes: In the case where the jump type is the advance play type, creating a first video channel, and using the first video channel as the target video channel; In the case where the jump type is the type of fallback playback, the target video channel is determined based on the cache data of the currently used video channel.
3. The method according to claim 2, characterized in that In the case where the jump type is the advance play type, creating a first video channel and using the first video channel as the target video channel includes: Determining whether there is currently a second video channel containing the playback time; If not, and in the case that the second video channel exists but the play time is later than the current play time of the second video channel, executing the step of creating a new first video channel and taking the first video channel as the target video channel; If the second video channel exists and the play time is earlier than the current play time of the second video channel, the second video channel is used as the target video channel.
4. The method according to claim 2, characterized in that: Determining the target video channel based on the cached data of the currently used video channel includes: Determine whether the cache start time of the cached data is earlier than the playback time; If yes, taking the currently used video channel as the target video channel; If not, a third video channel is newly created, and the third video channel is used as the target video channel.
5. The method according to any one of claims 1 to 4, characterized in that: Sending the video starting from the playback moment to the target user through the target video channel includes: Determining a target key frame corresponding to the playback moment; The video data starting from the target key frame is sent to the target user through the target video channel.
6. The method according to claim 5, characterized in that Determining the target key frame corresponding to the playback moment includes: Determining two key frames adjacent to the playback moment; The start key frame or the end key frame of the two key frames is used as the target key frame.
7. A playback jump processing device, characterized in that: The device comprises: A first sending module is used to send the video of the overlapping time period to the multiple users whose request time period overlaps with the target time period in turn through the video channel corresponding to the target time period, and send the video of the time period other than the overlapping time period in the request time period through another different video channel, so as to send the video of the request time period to the users through multiple video channels; wherein different video channels are for different time periods; wherein each of the users receives video data each time, the received video data is the video data offset from the starting time of the user in the target time period; a play time determination module, configured to determine the play time to which the play jump request jumps in response to a play jump request sent by a target user among the plurality of users for the request time period; A second sending module is used to determine a target video channel that responds to the play jump request based on the play time, and send the video starting from the play time to the target user through the target video channel; wherein the target video channel is a multiplex of a video channel corresponding to a part of the time period where the play time is located, or is a newly created video channel; The second sending module includes: An operation type determining unit, configured to determine a jump type of the play jump request based on the play time and the current play time of the request period, wherein the jump type includes an advance play type and a rewind play type; A video channel determination unit is used to determine the target video channel based on the jump type.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the playback jump processing method described in any one of claims 1-6 when executing the program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the playback jump processing method as described in any one of claims 1-6.
