Video interruption processing method, device, equipment, storage medium and program product

By obtaining and processing the last slice file of the video before the interruption, generating and sending the first shim slice file, the problem of black screen or interruption of the video slice stream when the interruption of the stream is solved, improving the user experience and presenting a smoother Stuck phenomenon.

CN115914681BActive Publication Date: 2024-11-05BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211423807.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2024-11-05
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

When the video slice stream is interrupted, the user may see a black screen or a prompt signal interruption on the playback end, resulting in poor visual experience and abrupt differences in front and back images, affecting the user's viewing experience.

Method used

When the slice stream is detected to be disconnected, the last slice file of the target video generated before the disconnection is obtained, its encoding parameters and the last video screen are parsed, the first gasket video encoding file is generated, and the slice is processed to at least Two slice files are sent to the playback end one after another to ensure that the video screen is stuttering and avoid black screen or interruption of the prompt signal.

Benefits of technology

Through the playback of the first gasket slice file, the user experience is smoother, avoiding abrupt visual differences caused by interruption, and improving the user experience in the video playback of the stream.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914681B_ABST
    Figure CN115914681B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, equipment, storage medium and program product for processing video interruption, and belongs to the field of video playback technology. When the present application detects that the target slice stream is interrupted, the last slice file of the target video generated before the interruption is obtained; the last slice file is parsed to obtain the encoding parameters of the last slice file and the last frame of the video picture, and the encoding parameters of the last slice file are used to encode the last frame of the video picture to obtain a first gasket video encoding file; the first gasket video encoding file is sliced ​​to generate at least two first gasket slice files, and each first gasket slice file is sent to the playback end in sequence for playback. To a certain extent, it can solve the problem that when the video playback is interrupted and presented to the user in the form of a black screen or a screen indicating that the signal is interrupted, the visual difference of the video picture is abrupt, which is very unfavorable to the user's viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video playback processing technology, and specifically relates to a video interruption processing method, device, equipment, storage medium and program product. Background Art

[0002] Slice streaming live broadcast is widely used in the field of Internet or TV video live broadcast, for example, it is widely used in large-scale live broadcast scenarios such as sports and evening parties. There are many links in video live broadcast processing. If any link before slicing processing fails, it is possible that the slicing processing will not receive input, which will cause the slicing stream of the source video to be disconnected.

[0003] When the slice stream is disconnected, the playback interface on the user's playback end will display a black screen. The black screen may make the user unaware of what is happening. The other is a prompt display, which is a screen that prompts the signal interruption. Please refer to Figure 1 , Figure 1 This is an exemplary embodiment showing that when a slice stream is disconnected, a screen indicating a signal interruption is displayed on the playback interface of the user's playback end. In the case of a video playback interruption, whether it is presented to the user in the form of a black screen or in the form of a screen indicating a signal interruption, the user's visual experience is an abrupt visual difference between the previous and the next video screens, which may be a very unfavorable factor for the user's viewing experience. Summary of the invention

[0004] To this end, the present application provides a video interruption processing method, device, equipment, storage medium and program product, which can help to solve to a certain extent the problem that when the video playback is interrupted and presented to the user in the form of a black screen or a screen indicating signal interruption, the abrupt visual difference causes a very unfavorable problem for the user's viewing experience.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, the present application provides a method for processing video interruption, the method comprising:

[0007] When it is detected that the target slice stream is interrupted, the last slice file of the target video generated before the interruption is obtained, and the target slice stream is formed by sending each slice file of the target video to the playback end in sequence for playback;

[0008] Parsing the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and encoding the last frame of video using the encoding parameters of the last slice file to obtain a first shim video encoding file, wherein the first shim video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video in the last slice file;

[0009] The first gasket video encoding file is sliced ​​to generate at least two first gasket slice files, and each of the first gasket slice files is sent to the playback end in sequence for playback.

[0010] In a second aspect, the present application provides a video interruption processing device, the device comprising:

[0011] The module for obtaining the last slice file is used to obtain the last slice file of the target video generated before the target slice stream is interrupted when it is detected that the target slice stream is interrupted. The target slice stream is formed by sending each slice file of the target video to the playback end in sequence for playback;

[0012] A first gasket video encoding file obtaining module is used to parse the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and to encode the last frame of video using the encoding parameters of the last slice file to obtain a first gasket video encoding file, wherein the first gasket video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video in the last slice file;

[0013] The first gasket slice filling module is used to slice the first gasket video encoding file to generate at least two first gasket slice files, and send each of the first gasket slice files to the playback end for playback in sequence.

[0014] In a third aspect, the present application provides an electronic device, including:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0018] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0019] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program implements the method described in the first aspect when executed by a processor.

[0020] This application adopts the above technical solution, which has at least the following beneficial effects:

[0021] In the technical solution provided by the present application, when the target slice stream is interrupted, resulting in the interruption of the target video playing at the playback end, the present application uses the last slice file of the target video generated before the target slice stream is interrupted to generate a first gasket slice file, so as to play the first gasket slice file when the target video playing at the playback end is interrupted, wherein the encoding parameters of the first gasket slice file are obtained by using the encoding parameters of the last slice file of the target video, which can ensure that the first gasket slice file can be smoothly decoded and played by the playback end, and each video picture in the first gasket slice file is the last frame of the target video before the target slice stream is interrupted, so that the target video picture is presented in a stuttering phenomenon on the playback interface of the playback end. In actual scenarios, the duration of video slice stream interruption is often very short. For the situation where the interruption duration is very short, using the present application solution, the user will feel that the video screen is slightly stuck. Compared with displaying a prompt signal interruption screen or a black screen when the video slice stream is interrupted, under the present application solution, when the video slice stream is interrupted, the user's visual experience is not an abrupt difference between the previous and next video screens, but a smoother stuttering phenomenon, thereby improving the user experience in the video playback interruption scenario and avoiding the problem of displaying a prompt signal interruption screen or a black screen to the user when the video slice stream is interrupted, which is very unfavorable to the user's viewing experience due to the abrupt visual difference.

[0022] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 creative work.

[0024] Figure 1According to an exemplary embodiment, when a slice stream is disconnected, a screen indicating that a signal interruption is displayed on a playback interface of a user terminal;

[0025] Figure 2 is a flow chart of a method for processing video interruption according to an exemplary embodiment;

[0026] Figure 3 is a flow chart of a method for processing video interruption according to another exemplary embodiment;

[0027] Figure 4 is a flow chart of a method for processing video interruption according to another exemplary embodiment;

[0028] Figure 5 It is a block diagram schematic diagram of a video interruption processing device according to an exemplary embodiment;

[0029] Figure 6 It is a schematic block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other implementation methods obtained by ordinary technicians in the field without creative work belong to the scope of protection of the present application.

[0031] See also Figure 2 , Figure 2 The flowchart of a method for processing video interruption is shown according to an exemplary embodiment. The method for processing video interruption includes the following steps:

[0032] Step S201: when it is detected that the target slice stream is interrupted, the last slice file of the target video generated before the interruption is obtained, and the target slice stream is formed by sending the slice files of the target video to the playback end in sequence for playback;

[0033] Step S202: parsing the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and encoding the last frame of video using the encoding parameters of the last slice file to obtain a first shim video encoding file, wherein the first shim video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video of the last slice file;

[0034] Step S203: Slice the first gasket video encoding file to generate at least two first gasket slice files, and send each of the first gasket slice files to the playback end in sequence for playback.

[0035] The electronic device as the execution subject of the method may be, but is not limited to, a slicing server. Taking the slicing server as an example, the video live broadcast processing system includes an encoding server and a slicing server. The encoding server obtains the target video source stream signal, encodes the target video source stream signal to generate a video encoding source stream, and the video encoding source stream is embodied in the form of multiple image groups (GOP, Group Of Pictures), each of which includes several frames of video pictures. The slicing processing of the slicing server takes the video encoding source stream as input. After obtaining each image group, the slicing processing is performed with the image group as the minimum unit to obtain a slicing file, and each slicing file may include two or more image groups. For the target video to be played, the target slicing stream is formed by sending each slicing file of the target video to the playback end in sequence. In the case of no interruption, the target slicing stream is continuous, and the continuous target slicing stream makes the target video screen played by the user playback end also continuous.

[0036] In actual scenarios, the slice stream may be disconnected. For example, the target video source stream signal transmitted by the live acquisition terminal to the encoding server is interrupted, the encoding task of the encoding server exits abnormally, etc., which will cause the slice server downstream of the encoding server to fail to receive the video encoding source stream of the target video, and the slice server generates the slice file of the target video interrupted, which leads to the target slice stream being disconnected. Therefore, the detection of the target slice stream being disconnected can be achieved in the following ways: for example, when the slice server receives the prompt information of the interruption of the target video source stream signal sent by the encoding server, it indicates that the target slice stream is detected to be disconnected; for another example, when the slice server receives the prompt information of the abnormal exit of the encoding task of the encoding server itself sent by the encoding server, it indicates that the target slice stream is detected to be disconnected; for another example, when the slice server detects that the received video encoding source stream of the target video is interrupted, it indicates that the target slice stream is detected to be disconnected.

[0037] When the target slice stream is detected to be interrupted, the application switches to executing to obtain the last slice file of the target video generated before the interruption, parses the last slice file, and obtains the encoding parameters of the last slice file and the last frame of video.

[0038] It should be noted that the encoding parameters include but are not limited to the following aspects: codec (CODEC) type, profile, level, etc., among which, with respect to profile, each profile supports a set of specific encoding functions, such as: Base Line Profile: supports intra-frame and inter-frame coding, supports the use of context-based adaptive variable length coding (CAVLC), and for example: Main profile: supports interlaced video, uses inter-frame coding of B films and inter-frame coding using weighted prediction, and supports the use of context-based adaptive arithmetic coding (CABAC). With respect to level, the parameters such as bit rate, resolution, and frame rate are limited. The higher the level, the higher the bit rate, resolution, and frame rate of the video.

[0039] Based on the last frame of video of the last slice file of the target video generated before the interruption, the encoding parameters of the last slice file are used to encode the last frame of video to obtain a first gasket video encoding file, which is composed of image groups, and each frame of video in each image group is the last frame of video of the last slice file. In the present application, when the target slice stream is interrupted, it is necessary to fill in the first gasket slice generated by the first gasket video encoding file as soon as possible to send it to the playback end for playback. Therefore, for the first gasket video encoding file, its file should not be large. On the basis of being able to be used to generate the first gasket slice, the smaller the first gasket video encoding file is, the better. For example, the first gasket video encoding file contains 1 second of video images.

[0040] Regarding slicing the first gasket video encoding file, generating at least two first gasket slice files, and sending each first gasket slice file to the playback end in sequence for playback, in actual applications, slicing the first gasket video encoding file can be to generate the first gasket slice files in sequence, each time generating a first gasket slice file, and each time a first gasket slice file is generated, the first gasket slice file generated at that time is sent to the playback end for playback, and at the same time, the next generation of the first gasket slice file is continued. Slicing the first gasket video encoding file can also be to generate at least two first gasket slice files at the same time, and then send each first gasket slice file to the playback end one by one for playback.

[0041] In the present application, the encoding parameters of the first gasket slice file are obtained based on the encoding parameters of the last slice file of the target video generated before the interruption, so that the obtained first gasket slice file can be consistent with the slice file of the target video in terms of encoding parameters, thereby ensuring that the first gasket slice file obtained subsequently can be decoded and played smoothly. Because each frame of the video in the first gasket slice file is obtained using the last frame of the video in the last slice file before the interruption, under the present application scheme, when an interruption occurs, a video freeze phenomenon may be presented on the user terminal playback interface. In actual scenarios, the duration of the interruption is often very short, such as two or three seconds. For situations where the interruption duration is very short, the present application scheme can be used to avoid the problem of displaying a screen indicating the interruption of the prompt signal or a black screen to the user, which is very unfavorable to the user's viewing experience due to the abrupt visual difference. When the interruption lasts for a very short time, the user will feel that the video screen is slightly stuck. Compared with the screen display indicating the signal interruption or a black screen, the user's visual experience is not an abrupt difference between the previous and next video images, but a smoother stuttering phenomenon, which improves the user experience in the video playback interruption scenario.

[0042] In one embodiment, before encoding the last frame of video using the encoding parameters of the last slice file, the method further includes: replacing the value of the encoding frame rate in the encoding parameters of the last slice file with a preset minimum value.

[0043] Specifically, encoding processing is performed based on the encoding parameters of the last slice file of the target video generated before the interruption of the flow, so that the encoding parameters of the first shim slice file obtained subsequently can be consistent with the slice file of the target video, thereby ensuring that the first shim slice file obtained subsequently can be decoded and played smoothly. On this basis, the value of the encoding frame rate in the encoding parameters of the last slice file is replaced with a preset minimum value, the purpose of which is to ensure encoding efficiency, so as to ensure that the first shim video encoding file can be generated in time, and then ensure that the first shim slice file is produced and filled in time.

[0044] In practical applications, the preset minimum value may be, but is not limited to, 5fps.

[0045] For example, the first gasket video encoding file is a 1s video encoding file. In one embodiment, if the frame rate of the video is 30fps, it means that 30 frames of video images need to be encoded when the target slice stream is interrupted, and encoding itself is a time-consuming operation. However, in the actual interruption scenario, the interruption duration may be shorter. For example, the interruption duration may be only 3 to 5 seconds. If the encoding time is also 3 to 5 seconds, then it may not be possible to produce and fill the first gasket slice file in time. Therefore, the above scheme allows the encoding frame rate to take the set minimum value. For example, the minimum value of the encoding frame rate is 5fps. When the target slice stream is interrupted, when encoding the last frame of the video image, only 5 frames of video images need to be encoded and generated, which helps to quickly obtain the first gasket video encoding file. It can be seen that encoding at the minimum encoding frame rate can effectively reduce the encoding time. For target slice stream interruptions of shorter durations, the first gasket slice file can be produced and filled in time before the interruption is restored.

[0046] In one embodiment, before encoding the last frame of video using the encoding parameters of the last slice file, the method further includes: replacing the value of the volume parameter in the encoding parameters of the last slice file with zero.

[0047] Specifically, when encoding is performed according to the encoding parameters of the last slice file, the encoding parameters contain the audio frame of the last slice file. Therefore, the first shim slice file is obtained to fill in the interrupted position of the target slice stream. When the user playback end presents the last frame of video before the interruption, there is also a jam in the sound. But often, the jamming sound gives the user a worse experience. In this regard, through the above scheme, before encoding the last frame of video using the encoding parameters of the last slice file, the value of the volume parameter in the encoding parameters of the last slice file is replaced with zero, so that the audio frame in the first shim slice file finally obtained is a silent audio frame. Under this setting, when the target slice stream is interrupted, the user playback end plays the first shim slice file, and only the jamming phenomenon of the last frame of video before the target slice stream is interrupted is presented, and there is no jamming phenomenon of the sound.

[0048] See also Figure 3 , Figure 3 FIG. 4 is a flowchart of a method for processing video interruption according to another exemplary embodiment. The method for processing video interruption includes the following steps:

[0049] Step S301: when it is detected that the target slice stream is interrupted, the last slice file of the target video generated before the interruption is obtained, and the target slice stream is formed by sending the slice files of the target video to the playback end in sequence for playback;

[0050] Step S302: parsing the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and encoding the last frame of video using the encoding parameters of the last slice file to obtain a first shim video encoding file, wherein the first shim video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video of the last slice file;

[0051] Step S303: Slice the first gasket video encoding file to generate at least two first gasket slice files, and send each of the first gasket slice files to the playback end in sequence for playback;

[0052] Step S304: detecting the duration of the interruption of the target slice stream, and if the duration of the interruption reaches a preset threshold, stopping the slicing process of the first gasket video encoding file, and obtaining a preset prompt image, wherein the prompt image is used to prompt the signal interruption;

[0053] Step S305: Encode the prompt image using the encoding parameters of the last slice file to obtain a second shim video encoding file, where the second shim video encoding file includes multiple image groups, and each video frame in each image group is the prompt image;

[0054] Step S306: Slice the second gasket video encoding file to generate at least two second gasket slice files, and send each of the second gasket slice files to the playback end for playback in sequence.

[0055] The above steps S301 to S303 have been described in the relevant embodiments and will not be described in detail here.

[0056] In actual scenarios, if the target slice stream is interrupted for a very short time, such as two or three seconds, and the target slice stream is not interrupted for a very short time, the playback end plays the first shim slice file during the target slice stream interruption. Because the video picture in the first shim slice file is the last frame of the video picture of the last slice file before the interruption, the user sees a slight freeze in the video picture on the playback end. Therefore, when the interruption lasts for a very short time, the user will not feel the video interruption.

[0057] However, it may also happen that the interruption lasts for a long time. In this case, the user's playback end will always show a stuck state, which may cause the user to refresh the playback. For example, after the playback end detects that the user has refreshed, it sends a refresh playback request to the slice server. In response to the received refresh request, the slice server searches for the latest produced slice file and then sends it to the playback end for playback. During the interruption lasting for a long time, the playback end always shows a stuck state. After the user refreshes the playback, the slice file sent by the slice server to the playback end for playback is still the first shim slice file, and then the playback end still shows a stuck state. Obviously, this is a useless refresh, so it needs to be avoided. The above-mentioned steps S304 to S306 can solve this problem.

[0058] The preset threshold duration of step S304 may include but is not limited to two slice durations. When it is detected that the duration of the interruption reaches the preset threshold duration, it indicates that the user's playback end has been showing a stuck state, which may cause the user to refresh the playback. In this case, the slicing process of the first gasket video encoding file is stopped, that is, the playback end stops showing a stuck state, and switches to obtaining a preset prompt image, and executes step S305. The prompt image is also encoded using the encoding parameters of the last slice file parsed previously to obtain a second gasket video encoding file, and the second gasket video encoding file includes multiple image groups, and each frame of video in each image group is the prompt image. Then, step S306 is executed again. Regarding step S306, the second gasket video encoding file is sliced ​​to generate at least two second gasket slice files, and each second gasket slice file is sent to the playback end in sequence for playback. In actual applications, the second gasket video encoding file is sliced ​​to generate second gasket slice files in sequence, and each time a second gasket slice file is generated, the second gasket slice file generated at that time is sent to the playback end for playback, and at the same time, the second gasket slice file is generated next time. The second gasket video encoding file is sliced, and at least two second gasket slice files are generated at the same time, and then each second gasket slice file is sent to the playback end one by one for playback. Since the prompt image is encoded using the encoding parameters of the last slice file, it can be ensured that the playback end can smoothly play the second gasket slice file, and the screen of the prompt signal interruption is presented on the playback interface.

[0059] In one embodiment, before encoding the prompt image using the encoding parameters of the last slice file, the method further includes: replacing the value of the encoding frame rate in the encoding parameters of the last slice file with a preset minimum value.

[0060] Specifically, based on the encoding parameters of the last slice file of the target video generated before the interruption of the flow, the encoding parameters of the obtained second gasket slice file can be consistent with those of the slice file of the target video, thereby ensuring that the second gasket slice file can also be decoded and played smoothly. On this basis, the value of the encoding frame rate in the encoding parameters of the last slice file is replaced with a preset minimum value, the purpose of which is to ensure the encoding efficiency, so as to ensure that the second gasket video encoding file can be generated in time, and then ensure that the second gasket slice file is produced and filled in time.

[0061] Similarly, in practical applications, the preset minimum value may be, but is not limited to, 5fps.

[0062] For example, the second gasket video encoding file is a 1s video encoding file. In one embodiment, if the frame rate of the video is 30fps, it means that after stopping the slicing process of the first gasket video encoding file, 30 frames of video pictures of the prompt image need to be encoded, and the encoding itself is a time-consuming operation. Therefore, it may not be possible to produce the second gasket slice file in time. With the above scheme, before using the encoding parameters of the last slice file to encode the prompt image, the encoding frame rate in the encoding parameters is set to the minimum value, such as the minimum value of the encoding frame rate is 5fps. After stopping the slicing process of the first gasket video encoding file, only 5 frames of video pictures need to be encoded in the encoding process of the prompt image, which helps to quickly obtain the second gasket video encoding file, and then helps the subsequent second gasket slice file to be produced in time.

[0063] In one embodiment, before encoding the prompt image using the encoding parameters of the last slice file, the method further includes: replacing the value of the volume parameter in the encoding parameters of the last slice file with zero.

[0064] Specifically, when the prompt image is encoded according to the encoding parameters of the last slice file, the encoding parameters contain the audio frame of the last slice file. Therefore, the obtained second gasket slice file is sent to the playback end for playback, and the playback interface of the playback end presents a picture of the interruption of the prompt signal. At the same time, the playback end also has a jamming sound, which gives the user a bad experience. In this regard, through the above scheme, before the prompt image is encoded using the encoding parameters of the last slice file, the value of the volume parameter in the encoding parameters of the last slice file is replaced with zero, so that the audio frame in the second gasket slice file finally obtained is a silent audio frame. Under this setting, when the user playback end plays the second gasket slice file, only the picture of the interruption of the silent playback prompt signal is presented, and there will be no jamming sound.

[0065] Please refer to Figure 4 , Figure 4 FIG. 4 is a flowchart of a method for processing video interruption according to another exemplary embodiment. The method for processing video interruption includes the following steps:

[0066] Step S401: when it is detected that the target slice stream is interrupted, the last slice file of the target video generated before the interruption is obtained, and the target slice stream is formed by sending the slice files of the target video to the playback end in sequence for playback;

[0067] Step S402: parsing the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and encoding the last frame of video using the encoding parameters of the last slice file to obtain a first shim video encoding file, wherein the first shim video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video of the last slice file;

[0068] Step S403: Slice the first gasket video encoding file to generate at least two first gasket slice files, and send each of the first gasket slice files to the playback end in sequence for playback;

[0069] Step S404, detecting the duration of the interruption of the target slice stream, if the duration of the interruption reaches a preset threshold duration, stopping the slicing process of the first gasket video coding file, searching from the designated storage file of the second gasket video coding file whether the second gasket video coding file exists, the second gasket video coding file includes a plurality of image groups, each frame of video in each image group is a prompt image, and the prompt image is used to prompt the signal interruption; if it does not exist, executing step S405, if it exists, executing step S407;

[0070] Step S405, obtaining the preset prompt image;

[0071] Step S406, encoding the prompt image using the encoding parameters of the last slice file to obtain a second shim video encoding file;

[0072] Step S407: Slice the second gasket video encoding file to generate at least two second gasket slice files, and send each of the second gasket slice files to the playback end for playback in sequence.

[0073] Similarly, the above steps S401 to S403 have been described in the relevant embodiments of the present application and will not be repeated here.

[0074] For one playback of the target video, the possibility of multiple interruptions cannot be ruled out. Taking the slicing server applying the method of the present application as an example, after the second gasket video encoding file is generated for the first time, the second gasket video encoding file can be stored in a designated storage file. When the target video is interrupted again during the subsequent playback and a prompt signal interrupt is required, using the above-mentioned scheme of the present application, the slicing server does not need to use the prompt image to regenerate the second gasket video encoding file, but directly extracts the previously stored second gasket video encoding file from the designated storage file. In this way, step S405 and step S406 can be skipped, saving the generation time of the second gasket video encoding file, and directly entering execution S407 - slicing the second gasket video encoding file to generate a second gasket slice file, and sending the second gasket slice file to the playback end in sequence, which helps to further ensure that the second gasket slice file is produced in a timely manner.

[0075] In one embodiment, the method further includes: during the slicing process of the first gasket video encoding file, when it is detected that the target slice stream is interrupted and restored, stopping the slicing process of the first gasket video encoding file, and sending each slice file of the target video after the interruption and restoration to the playback end in sequence for playback.

[0076] Specifically, when the target slice stream is interrupted, the video screen is stuck on the playback interface of the user's playback end during the period of filling the first gasket slice file. The detection of target slice stream interruption and recovery can be achieved in the following ways. For example, when the slice server receives the prompt information of the interruption and recovery of the target video source stream signal sent by the encoding server, it indicates that the target slice stream interruption and recovery are detected; for another example, when the slice server receives the prompt information of the re-execution of the encoding task of the encoding server sent by the encoding server, it indicates that the target slice stream interruption and recovery are detected; for another example, when the slice server itself detects that the video encoding source stream of the target video is received again, it indicates that the target slice stream interruption and recovery are detected. When it is detected that the target slice stream is interrupted and restored, it indicates that the slice server can re-receive the video encoding source stream of the target video sent by the encoding server. In this case, the slicing processing of the first gasket video encoding file is stopped, that is, the slice server no longer sends the first gasket slice file to the playback end. The slicing processing of the slice server re-uses the video encoding source stream of the target video as input, and performs slicing processing on the video encoding source stream of the target video. The slice files of the target video after the interruption is restored are sent to the playback end in sequence for playback. The video screen freeze phenomenon on the user terminal ends, and the video resumes smooth playback.

[0077] This application allows the playback end to present the target slice stream in a stuttering manner when the target slice stream is disconnected. When there is a limit to the stuttering, that is, when the duration of the interruption reaches a preset threshold duration, the playback end stops presenting the video in a stuttering manner and switches to presenting the video in a prompt signal interruption manner. In actual applications, in order to avoid the video screen of the user terminal being stuck for a long time, which may cause the user to refresh the playback, the filling time limit of the first shim slice file is often shorter, that is, the threshold duration is set to be smaller. When the threshold duration is set to a smaller value, if the target slice stream is detected to be restored during the period when the target slice stream is disconnected for less than the threshold duration, it indicates that the playback end presents the video in a stuttering manner for a very short time when the target slice stream is disconnected. The user feels that the video screen is slightly stuck, and does not feel that the video signal has been interrupted, thereby improving the user experience in the video playback interruption scenario.

[0078] In one embodiment, the method further includes: during the slicing process of the second gasket video encoding file, when it is detected that the target slice stream is interrupted and restored, stopping the slicing process of the second gasket video encoding file, and sending the slice files of the target video after the interruption and restoration to the playback end in sequence for playback.

[0079] Specifically, in the process of slicing the second gasket video encoding file, the obtained second gasket slices are sent to the playback end for playback in sequence, and a static prompt image prompting the user that the signal is interrupted is presented on the playback interface of the user playback end. When it is detected that the target slice stream is interrupted and restored, it indicates that the slice server can re-receive the video encoding source stream of the target video sent by the encoding server. In this case, the slicing process of the second gasket video encoding file is stopped, that is, the slice server no longer sends the second gasket slice file to the playback end, and the slicing process of the slice server re-uses the video encoding source stream of the target video as input, and performs slicing on the video encoding source stream of the target video, and sends the slice files of the target video after the interruption is restored to the playback end in sequence for playback, and the user terminal video screen prompts that the signal interruption is over, and the video resumes smooth playback.

[0080] See also Figure 5 , Figure 5 1 is a block diagram of a video interruption processing device according to an exemplary embodiment. The video interruption processing device 5 includes:

[0081] The module 501 for obtaining the last slice file is used to obtain the last slice file of the target video generated before the target slice stream is interrupted when it is detected that the target slice stream is interrupted. The target slice stream is formed by sending each slice file of the target video to the playback end in sequence for playback;

[0082] The first gasket video encoding file obtaining module 502 is used to parse the last slice file to obtain the encoding parameters of the last slice file and the last video frame, and to encode the last video frame using the encoding parameters of the last slice file to obtain the first gasket video encoding file, wherein the first gasket video encoding file includes a plurality of image groups, and each video frame in each image group is the last video frame of the last slice file;

[0083] The first gasket slice filling module 503 is used to slice the first gasket video encoding file to generate at least two first gasket slice files, and send each of the first gasket slice files to the playback end for playback in sequence.

[0084] Furthermore, the video interruption processing device 5 also includes:

[0085] Switch the second gasket slicing module to detect the duration of the interruption of the target slice stream. If the interruption duration reaches a preset threshold duration, stop slicing the first gasket video encoding file and obtain a preset prompt image, wherein the prompt image is used to prompt the signal interruption; use the encoding parameters of the last slice file to encode the prompt image to obtain a second gasket video encoding file, wherein the second gasket video encoding file includes multiple image groups, and each frame of video in each image group is the prompt image; slice the second gasket video encoding file to generate at least two second gasket slicing files, and send each of the second gasket slicing files to the playback end in sequence for playback.

[0086] Furthermore, the switching second gasket slicing module is also used to search whether the second gasket video encoding file exists from the designated storage file of the second gasket video encoding file before obtaining the preset prompt image; if not, execute the steps of obtaining the preset prompt image and its subsequent steps; if exists, obtain the existing second gasket video encoding file, slice the second gasket video encoding file, generate at least two second gasket slicing files, and send each of the second gasket slicing files to the playback end for playback in sequence.

[0087] Furthermore, the video interruption processing device 5 also includes:

[0088] The encoding frame rate replacement module is used to replace the value of the encoding frame rate in the encoding parameters of the last slice file with a preset minimum value before encoding the last frame of video using the encoding parameters of the last slice file.

[0089] Furthermore, the video interruption processing device 5 also includes:

[0090] The mute setting module is used to replace the value of the volume parameter in the encoding parameters of the last slice file with zero before encoding the last frame of video picture using the encoding parameters of the last slice file.

[0091] Furthermore, the video interruption processing device 5 also includes:

[0092] The first recovery module is used to stop slicing the first gasket video encoding file when it is detected that the target slice stream is restored after interruption during the slicing process of the first gasket video encoding file, and send each slice file of the target video after the interruption is restored to the playback end for playback in sequence.

[0093] Furthermore, the video interruption processing device 5 also includes:

[0094] The second recovery module is used to stop slicing the second gasket video encoding file when it is detected that the target slice stream is restored after being interrupted during the slicing process of the second gasket video encoding file, and send each slice file of the target video after the interruption is restored to the playback end for playback in sequence.

[0095] Regarding the video interruption processing device 5 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the above embodiment of the related method, and will not be elaborated here.

[0096] See also Figure 6 , Figure 6 is a block diagram of an electronic device according to an exemplary embodiment. The electronic device 6 includes:

[0097] at least one processor 61; and

[0098] A memory 62 is communicatively connected to the at least one processor 61; wherein,

[0099] The memory 62 stores instructions that can be executed by the at least one processor 61. The instructions are executed by the at least one processor 61 so that the at least one processor 61 can execute the above-mentioned related video interruption processing method.

[0100] In practical applications, the electronic device 6 can be a slice server for producing a slice flow. It should be noted that the electronic device 6 is not limited to being embodied in the form of a server. Regarding the electronic device 6 in the above embodiment, the specific manner in which its processor 61 executes the program in the memory 62 has been described in detail in the embodiment of the method, and will not be described in detail here.

[0101] In addition, the present application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the above-mentioned related video interruption processing method.

[0102] Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0103] In addition, the present application also provides a computer program product, including a computer program, which implements the above-mentioned related video interruption processing method when executed by a processor.

[0104] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0105] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" and "multiple" refers to at least two.

[0106] It should be understood that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or there may be an intermediate element at the same time; when an element is referred to as being "connected to" another element, it can be directly connected to the other element or there may be an intermediate element at the same time. In addition, the "connection" used here may include wireless connection; the wording "and / or" used includes any unit and all combinations of one or more associated listed items.

[0107] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0108] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0109] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0110] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0111] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0112] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0113] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for processing video interruption, characterized in that: The method comprises: When it is detected that the target slice stream is interrupted, the last slice file of the target video generated before the interruption is obtained, and the target slice stream is formed by sending each slice file of the target video to the playback end in sequence for playback; Parsing the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and encoding the last frame of video using the encoding parameters of the last slice file to obtain a first shim video encoding file, wherein the first shim video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video in the last slice file; Slicing the first shim video encoding file to generate at least two first shim slice files, and sending each of the first shim slice files to the playback end in sequence for playback; Before encoding the last frame of video using the encoding parameters of the last slice file, the method further includes: The value of the encoding frame rate in the encoding parameters of the last slice file is replaced with a preset minimum value.

2. The method according to claim 1, characterized in that The method further comprises: Detecting the duration of the interruption of the target slice stream, if the duration of the interruption reaches a preset threshold, stopping the slicing process of the first gasket video encoding file, and obtaining a preset prompt image, where the prompt image is used to prompt the signal interruption; Using the encoding parameters of the last slice file to encode the prompt image, a second pad video encoding file is obtained, wherein the second pad video encoding file includes a plurality of image groups, and each video frame in each image group is the prompt image; The second gasket video encoding file is sliced ​​to generate at least two second gasket slice files, and each of the second gasket slice files is sent to the playback end in sequence for playback.

3. The method according to claim 1 or 2, characterized in that: Before encoding the last frame of video using the encoding parameters of the last slice file, the method further includes: The value of the volume parameter in the encoding parameters of the last slice file is replaced by zero.

4. The method according to claim 2, characterized in that: Before obtaining the preset prompt image, the method further includes: Searching from a designated storage file of the second pad video encoding file whether the second pad video encoding file exists; If it does not exist, execute the steps of obtaining the preset prompt image and its subsequent steps; If it exists, obtain the existing second gasket video encoding file, slice the second gasket video encoding file to generate at least two second gasket slice files, and send each of the second gasket slice files to the playback end in sequence for playback.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: During the slicing process of the first gasket video encoding file, when it is detected that the target slice stream is interrupted and restored, the slicing process of the first gasket video encoding file is stopped, and each slice file of the target video after the interruption and restoration is sent to the playback end in sequence for playback.

6. The method according to claim 2 or 4, characterized in that: The method further comprises: During the slicing process of the second gasket video encoding file, when it is detected that the target slice stream is interrupted and restored, the slicing process of the second gasket video encoding file is stopped, and each slice file of the target video after the interruption and restoration is sent to the playback end in sequence for playback.

7. A video interruption processing device, characterized in that: The device comprises: A module for obtaining the last slice file is used to obtain the last slice file of the target video generated before the target slice stream is interrupted when it is detected that the target slice stream is interrupted. The target slice stream is formed by sending each slice file of the target video to the playback end in sequence for playback; The first gasket video encoding file obtaining module is used to parse the last slice file to obtain the encoding parameters of the last slice file and the last frame of video, and to encode the last frame of video using the encoding parameters of the last slice file to obtain the first gasket video encoding file, wherein the first gasket video encoding file includes a plurality of image groups, and each frame of video in each image group is the last frame of video in the last slice file; before encoding the last frame of video using the encoding parameters of the last slice file, the module further includes: replacing the value of the encoding frame rate in the encoding parameters of the last slice file with a preset minimum value; The first gasket slice filling module is used to slice the first gasket video encoding file to generate at least two first gasket slice files, and send each of the first gasket slice files to the playback end for playback in sequence.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.