A video code stream interruption detection method, device, equipment and storage medium

By adaptively adjusting the network transmission parameters of the video stream, extracting and comparing the motion vector features of the video stream, and combining the decision tree model to achieve video interruption detection, the accuracy and real-time performance of video stream interruption detection in complex network environments are solved. issues, improving video playback stability and user experience.

CN119135952BActive Publication Date: 2025-01-24SHENZHEN HUIMINGJIE TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411347228.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-24
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In a complex and changeable network environment, it is difficult for the existing technology to achieve accurate and real-time video stream interrupt detection, resulting in unstable video playback and impact on user experience.

Method used

By obtaining network transmission parameters of historical video code flow, adjustment of adaptive network transmission strategies to adjust, analyze the video code flow to build a key frame sequence, extract the characteristics of motion vector and compare with the standard template, determine the video interrupt position, and build training data The training decision -making tree model to identify the video interruption.

Benefits of technology

A precise and real -time detection of the interruption of video code flow in complex network environments, improved the stability and user experience of video playback, and ensured the quality of video transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135952B_ABST
    Figure CN119135952B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for detecting interruption of a video stream, and belongs to the field of video processing technology. First, the historical transmission parameters are adjusted through an adaptive strategy to better cope with changes in the video transmission environment. Then, the video stream is parsed to construct a key frame sequence. Subsequently, the key frame motion vector features are extracted and compared with the standard vector feature template to accurately locate the video interruption position. Next, the video interruption position is marked in the key frame sequence, and a training data set is constructed to train a decision tree model to identify video interruptions. In practical applications, a multi-level cache mechanism is used to monitor the video stream in real time, parse the current data and input it into the stream interruption detection model for analysis, so as to effectively detect video stream interruptions. The present application can adapt to complex network environments and effectively detect video stream interruptions, so as to repair video interruptions and ensure the quality of video transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Video stream interruption detection is a key technical issue in the video transmission process. In actual video business scenarios, due to changes in network conditions, video data often encounters various problems during transmission, resulting in video stream interruption. Therefore, how to detect video stream interruption in a timely and accurate manner is the key to ensuring smooth video playback and user experience.

[0003] Traditional video stream interruption detection methods mainly rely on inserting identification information such as heartbeat packets or sequence numbers into the video stream, and using timeout detection and retransmission mechanisms to determine whether video transmission is abnormally interrupted. However, these methods often do not work well in actual complex network environments. For example, in the case of large network jitter, even if the video stream is not interrupted, the timeout detection mechanism may misjudge. For another example, when the video stream interruption time is short, relying solely on the detection method of heartbeat packets and sequence numbers cannot accurately determine the specific location of the interruption, thus affecting subsequent recovery measures.

[0004] Therefore, how to achieve accurate and real-time video stream interruption detection in a complex and changeable network environment is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a method, device, computer equipment and storage medium for detecting interruption of a video stream, so as to realize accurate and real-time detection of interruption of a video stream in a complex and changeable network environment.

[0006] In order to solve the above technical problems, the embodiment of the present application provides a method for detecting interruption of a video stream, which adopts the following technical solution:

[0007] A method for detecting interruption of a video code stream, comprising:

[0008] Obtaining network transmission parameters of historical video code streams, obtaining historical transmission parameters, and adjusting the historical transmission parameters using a preset adaptive network transmission strategy;

[0009] After the adjustment of the historical transmission parameters is completed, the historical video code stream is parsed, the key frames in the historical video code stream are identified, the first key frame is obtained, and the first key frame sequence is constructed;

[0010] Extracting the motion vector feature of the first key frame to obtain a first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result;

[0011] Determine the video interruption position according to the vector feature comparison result, and mark the key frame corresponding to the video interruption position in the first key frame sequence;

[0012] The first key frame sequence after the annotation is used as a training data set to train a bitstream interruption detection model, wherein the bitstream interruption detection model is built based on a decision tree model architecture;

[0013] Monitor the current video stream in real time and use a multi-level cache mechanism to cache the current video stream;

[0014] Parsing the cached current video stream, identifying the key frame in the current video stream, obtaining the second key frame, and constructing the second key frame sequence;

[0015] The second key frame sequence is input into the bitstream interruption detection model, and the interruption detection result of the current video bitstream is output.

[0016] Further, the steps of obtaining the network transmission parameters of the historical video code stream, obtaining the historical transmission parameters, and adjusting the historical transmission parameters by using a preset adaptive network transmission strategy specifically include:

[0017] Obtaining network transmission parameters of historical video code streams to obtain historical transmission parameters, wherein the historical transmission parameters include network bandwidth, network delay, packet loss rate, frame rate, and video bit rate;

[0018] The particle swarm optimization algorithm is used to find the optimal network parameter combination through iterative search;

[0019] Adjust historical transmission parameters based on the optimal network parameter combination.

[0020] Further, the step of extracting the motion vector feature of the first key frame to obtain the first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result specifically includes:

[0021] The motion vector feature of the first key frame is calculated by using an optical flow method to obtain a first motion vector feature;

[0022] Acquire a standard vector feature template matching the first key frame from a pre-built standard vector feature template library;

[0023] Calculating the vector feature similarity value between the first motion vector feature and the standard vector feature template using cosine similarity;

[0024] The vector feature similarity value is used as the vector feature comparison result.

[0025] Further, the step of determining the video interruption position according to the vector feature comparison result, and marking the key frame corresponding to the video interruption position in the first key frame sequence specifically includes:

[0026] Compare the vector feature similarity value with a preset similarity threshold;

[0027] The first key frame whose vector feature similarity value is less than a preset similarity threshold is marked as a target key frame, and the position of the target key frame in the historical video bitstream is determined as the video interruption position;

[0028] Generate a motion descriptor according to the motion vector features of the target key frame;

[0029] Based on the motion descriptor, the target key frames are clustered by a clustering algorithm to obtain a target key frame subset;

[0030] Generate annotation labels for each target key frame subset, and use the annotation labels to annotate the target key frames in the first key frame sequence.

[0031] Further, the step of generating a label for each target key frame subset and labeling the target key frames in the first key frame sequence using the label includes:

[0032] Generate a motion type label for each target key frame subset according to the motion descriptor corresponding to each target key frame subset;

[0033] Based on the pre-trained support vector machine model, a motion vector label of each target key frame subset is generated according to the motion vector features of each target key frame subset;

[0034] The target key frames in the first key frame sequence are traversed, and a corresponding motion type label and motion vector label are added to each target key frame.

[0035] Furthermore, the steps of training a bitstream interruption detection model using the first key frame sequence after the annotation as a training data set specifically include:

[0036] Initialize the decision tree model and configure the model parameters of the decision tree model, where the model parameters include the depth of the tree, the minimum number of samples and the splitting criterion;

[0037] Dividing the data set of the first key frame sequence based on the minimum number of samples to obtain a number of data subsets;

[0038] Each data subset is imported into the decision tree model in turn, and the motion type label and motion vector label are used as splitting criteria. The depth of the decision tree is used as the termination condition. The decision tree model is recursively trained until the model is fitted to obtain a bitstream interruption detection model.

[0039] Furthermore, the current video code stream is monitored in real time, and a multi-level cache mechanism is used to cache the current video code stream, specifically including:

[0040] Get the stream parameters of the current video stream;

[0041] According to the bitstream parameters of the current video bitstream, a target buffer corresponding to the current video bitstream is determined from a preset multi-level buffer;

[0042] Store the current video stream into the target buffer.

[0043] In order to solve the above technical problems, the embodiment of the present application further provides a video code stream interruption detection device, which adopts the following technical solution:

[0044] A video code stream interruption detection device, comprising:

[0045] The parameter adjustment module is used to obtain the network transmission parameters of the historical video code stream, obtain the historical transmission parameters, and use the preset adaptive network transmission strategy to adjust the historical transmission parameters;

[0046] A first parsing module, used for obtaining historical video code stream data after completing the adjustment of historical transmission parameters, parsing the historical video code stream data, identifying key frames in the historical video code stream, obtaining a first key frame, and constructing a first key frame sequence;

[0047] A feature comparison module is used to extract the motion vector feature of the first key frame to obtain a first motion vector feature, and compare the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result;

[0048] An interruption marking module, used to determine the video interruption position according to the vector feature comparison result, and mark the key frame corresponding to the video interruption position in the first key frame sequence;

[0049] A model training module, used to train a bitstream interruption detection model using the first key frame sequence after the annotation as a training data set, wherein the bitstream interruption detection model is built based on a decision tree model architecture;

[0050] The code stream cache module is used to monitor the current video code stream in real time, cache the current video code stream using a multi-level cache mechanism, and obtain the current video code stream data when the video code stream is cached;

[0051] A second parsing module is used to parse the current video code stream data, identify the key frame in the current video code stream, obtain the second key frame, and construct a second key frame sequence;

[0052] The interruption identification module is used to input the second key frame sequence into the code stream interruption detection model and output the interruption detection result of the current video code stream.

[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0054] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the video code stream interruption detection method as described in any one of the above when executing the computer-readable instructions.

[0055] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0056] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the video code stream interruption detection method as described in any one of the above.

[0057] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0058] The present application discloses a method, device, equipment and storage medium for detecting interruption of a video code stream, and belongs to the field of video processing technology. First, the historical transmission parameters are adjusted through an adaptive strategy to better cope with changes in the video transmission environment. Then, the video code stream is parsed to construct a key frame sequence. Subsequently, the key frame motion vector features are extracted and compared with the standard vector feature template to accurately locate the video interruption position. Next, the video interruption position is marked in the key frame sequence, and a training data set is constructed to train a decision tree model to identify video interruption. In practical applications, a multi-level cache mechanism is used to monitor the video code stream in real time, and the current data is parsed and input into the code stream interruption detection model for analysis to effectively detect the video code stream interruption. The present application adjusts the historical transmission parameters through an adaptive strategy to better cope with changes in the video transmission environment, determines the interruption position in the video through motion vector feature analysis, and marks the video interruption position in the key frame sequence, and constructs a training data set to train a decision tree model to identify video interruption, which can adapt to complex network environments, effectively detect video code stream interruption, so as to perform video interruption repair and ensure video transmission quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are 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 work.

[0060] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;

[0061] Figure 2 A flowchart of an embodiment of a method for detecting interruption of a video code stream according to the present application is shown;

[0062] Figure 3 Shows Figure 2 A flowchart of an embodiment of step S201;

[0063] Figure 4 Shows Figure 2 A flowchart of an embodiment of step S203;

[0064] Figure 5 Shows Figure 2 A flowchart of an embodiment of step S204;

[0065] Figure 6 Shows Figure 5 A flowchart of an embodiment of step S505;

[0066] Figure 7 Shows Figure 2 A flowchart of an embodiment of step S205;

[0067] Figure 8 A schematic structural diagram of an embodiment of a video code stream interruption detection device according to the present application is shown;

[0068] Fig. 9 A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION

[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0070] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0071] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0072] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0073] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0074] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, the tablet computer 1012 or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0075] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0076] It should be noted that the video stream interruption detection method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the video stream interruption detection device is generally arranged in the server / terminal device.

[0077] It should be understood that Figure 1 The numbers of terminal devices, networks and servers in the embodiment are merely illustrative. The above system may have any number of terminal devices, networks and servers according to implementation requirements.

[0078] Please refer to Figure 2 , shows a flow chart of an embodiment of a method for detecting interruption of a video code stream according to the present application. The method for detecting interruption of a video code stream comprises the following steps:

[0079] S201, obtaining network transmission parameters of historical video code streams, obtaining historical transmission parameters, and adjusting the historical transmission parameters using a preset adaptive network transmission strategy.

[0080] Specifically, the network transmission parameters collected in advance during the historical video transmission process, such as packet loss rate, delay, jitter, bandwidth and other network transmission parameters, can reflect the impact of the network on video transmission in different time periods and environments. According to the analysis results of the historical transmission parameters, the transmission strategy is dynamically adjusted through the preset adaptive network transmission strategy. For example, for a network environment with a high packet loss rate, the adaptive strategy reduces the transmission bit rate of the video stream or adjusts the error correction mechanism to ensure smooth video playback. The application of this strategy enables the system to better adapt to the volatility of the network, thereby improving the stability of video transmission.

[0081] When transmitting video data under complex and changeable network transmission parameters, it is very likely to encounter transmission errors and retransmissions caused by network congestion, packet loss and other problems, which will not only increase transmission delays, but also waste network resources. This application dynamically adjusts transmission parameters according to network conditions through an adaptive network transmission strategy to ensure that video data can be transmitted to the receiving end at the most appropriate rate and quality. The purpose of limiting the parsing of historical video bitstreams after the transmission parameters are adjusted is to optimize video transmission efficiency and quality, reduce errors and retransmission rates, and prepare accurate key frame sequences for subsequent use.

[0082] In a specific embodiment of the present application, when using a conference control all-in-one machine, due to the complex and changeable network environment, problems such as insufficient bandwidth and network delays may cause video transmission interruptions, affecting the smooth progress of the meeting. Based on this, the system will collect network transmission parameters of the video stream based on past network usage, such as network bandwidth and delays in different meeting periods. Based on historical network transmission parameters, the system can preset different network transmission strategies, such as automatically reducing video quality when bandwidth is limited, or enabling a stronger error correction mechanism to ensure smooth video transmission. The adaptive adjustment strategy enables the conference system to dynamically respond to changes in the network environment and improve the stability of the conference video.

[0083] S202, after the adjustment of the historical transmission parameters is completed, the historical video code stream is parsed, key frames in the historical video code stream are identified, a first key frame is obtained, and a first key frame sequence is constructed.

[0084] Specifically, a key frame is a frame in a video frame that contains complete image data. Compared with other video frames that rely on key frames, key frames play a key role in video compression. By identifying key frames in historical video streams, the system can extract important frames that can represent changes in historical video content, namely the first key frames. After identifying the first key frame, the system constructs these first key frames into a first key frame sequence in chronological order. The first key frame sequence can not only reflect the overall change trend of the video content, but also help identify possible interruption points during video transmission by analyzing the relationship between frames.

[0085] S203, extracting the motion vector feature of the first key frame to obtain a first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result.

[0086] Specifically, in video coding, motion vector is the basic unit used to represent inter-frame motion, usually indicating how an image block in a frame moves from the previous frame to the current position. By extracting the motion vector features of key frames, the system can capture dynamic change information in the video. These motion vector features reflect the direction and speed of movement of objects or scenes in the picture. The main purpose of extracting motion vector features is to identify anomalies or interruptions in the video. For example, if the motion vector features of a frame are significantly different from those during normal playback, the location of the frame may have problems such as transmission interruption and screen freeze.

[0087] The standard vector feature template is a pre-set set of motion vector features used to characterize normal video streaming conditions. It is trained based on a large amount of historical video data and represents the motion feature pattern that a video screen should have under normal network conditions.

[0088] During the comparison process, the extracted first motion vector feature is compared with the standard vector feature template. This comparison can use a certain similarity measurement method (such as Euclidean distance, cosine similarity, etc.) to determine whether the motion feature of the current video conforms to the normal mode. The comparison result reveals whether the motion features of certain key frames in the video deviate from the normal range. If the comparison result shows that the motion features of the current frame are significantly different from the standard template, the system can determine that there may be network transmission anomalies or video interruptions at this location.

[0089] S204, determining the video interruption position according to the vector feature comparison result, and marking the key frame corresponding to the video interruption position in the first key frame sequence.

[0090] Specifically, the system analyzes the specific location of the video interruption based on the above vector feature comparison results. The interruption location usually refers to the moment when the video stream is abnormal or paused during transmission, usually manifested as a sudden stop of the picture, frame loss or severe freeze. After determining the video interruption location, the system will mark the key frames corresponding to the interruption location. The purpose of marking these key frames is to clearly indicate which key frames are directly related to the video interruption.

[0091] Annotation can usually be done by adding specific tags or metadata to the relevant keyframes, which can indicate whether the frame is related to the interruption and some data characteristics of the frame. This annotation process provides accurate training samples for the model so that the model can effectively identify and judge when faced with similar situations.

[0092] S205, using the first key frame sequence after the annotation as a training data set to train a bitstream interruption detection model, wherein the bitstream interruption detection model is built based on a decision tree model architecture.

[0093] Specifically, the first key frame sequence after annotation contains important feature information in the video stream, especially the key frames related to interruptions. These annotated data not only identify normal frames, but also abnormal frames or interruption frames, providing a clear learning objective for the model.

[0094] The stream interruption detection model is built based on the decision tree model architecture. The decision tree recursively divides the data set into different subsets and builds a tree structure to make decisions. Each node corresponds to the selection of a feature, and each path represents a decision rule. Finally, the classification result is obtained at the leaf node. The decision tree model can handle complex data such as the motion vector features of the video key frames well, and can make branch decisions based on these features to determine whether there is a video interruption.

[0095] During the training process, the labeled first key frame sequence is input into the decision tree model, which learns the characteristic patterns related to video interruption based on these data. Through repeated training and adjustment, the decision tree model can optimize its decision path, so as to more accurately judge whether there is interruption in future video stream detection.

[0096] S206, monitor the current video code stream in real time, and use a multi-level cache mechanism to cache the current video code stream.

[0097] Specifically, real-time monitoring of the current video bitstream includes monitoring of the video content itself (such as frame rate, picture quality, etc.) and monitoring of network transmission parameters (such as bandwidth usage, packet loss rate, delay, etc.). During network transmission, due to bandwidth fluctuations, delays or jitters, the video stream may be briefly interrupted or stuck. By storing part of the video data on the client or server through a multi-level cache mechanism, the cached data can be used to continue playing the video when network problems occur, thereby smoothing the video stream and reducing the interruptions or stucks perceived by users.

[0098] In view of the complex network environment during video conferencing, the cache strategy can be dynamically adjusted according to the actual situation. For example, when the system detects that the network delay of the video conference increases or the bandwidth decreases, the cache capacity needs to be increased so that more data can be used for buffering. When the network conditions of the video conference are good, the system can reduce the cache and reduce the delay.

[0099] S207, parsing the cached current video stream, identifying key frames in the current video stream, obtaining second key frames, and constructing a second key frame sequence.

[0100] Specifically, in order to perform interruption detection, the system needs to parse the current video code stream data in these caches. The parsing process includes decoding the current video code stream and extracting the key frame of the current video, that is, the second key frame. Identifying the key frame can help the system focus on the most important frame in the video stream, especially during the video transmission process. If the key frame is damaged or lost, it may cause a long video interruption or picture damage. In addition, the system also needs to construct a second key frame sequence through the extracted second key frame so that the subsequent model can perform video interruption detection based on this sequence.

[0101] S208, inputting the second key frame sequence into the bitstream interruption detection model, and outputting the interruption detection result of the current video bitstream.

[0102] Specifically, the bitstream interruption detection is based on decision tree architecture training. The decision tree model makes decisions by building a tree structure, and outputs the result of whether there is an interruption by classifying the features in the key frame sequence. Inputting the second key frame sequence into the bitstream interruption detection model can provide a real-time data basis for the model so that the model can obtain and learn the motion vector features in the second key frame sequence, that is, the second motion vector features, and perform further feature classification to realize interruption detection analysis and obtain the interruption detection result of the current video bitstream.

[0103] In the above embodiment, first, the system obtains the network transmission parameters of the historical video code stream, and adjusts these historical transmission parameters through the preset adaptive network transmission strategy to better cope with the changes in the video transmission environment. Then, the adjusted historical video code stream is parsed, the key frames therein are identified, and a key frame sequence is constructed. Next, the motion vector features of these key frames are extracted, and compared with the preset standard vector feature template to obtain the comparison result. Based on this, the interruption position in the video is determined, and the key frames corresponding to the interruption position are marked. Through the marked key frame sequence, a training data set is established, and a code stream interruption detection model is trained based on the decision tree model architecture. In actual use, the current video code stream is monitored in real time through a multi-level cache mechanism, and the current video data is cached and then parsed, key frames are identified, and a key frame sequence of the current video is constructed. The sequence will be input into the pre-trained code stream interruption detection model, and the model is analyzed based on the feature data obtained during training to detect whether the current video code stream is interrupted.

[0104] This application adjusts historical transmission parameters through an adaptive strategy to better cope with changes in the video transmission environment, determines the interruption position in the video through motion vector feature analysis, and marks the video interruption position in the key frame sequence, constructs a training data set to train a decision tree model to identify video interruptions, can adapt to complex network environments, and effectively detect video bitstream interruptions to repair video interruptions and ensure video transmission quality.

[0105] For further information, please refer to Figure 3 , obtaining the network transmission parameters of the historical video code stream, obtaining the historical transmission parameters, and using a preset adaptive network transmission strategy to adjust the historical transmission parameters, specifically comprising:

[0106] S301, obtaining network transmission parameters of historical video code streams, and obtaining historical transmission parameters, wherein the historical transmission parameters include network bandwidth, network delay, packet loss rate, frame rate, and video bit rate;

[0107] S302, using a particle swarm optimization algorithm to find the optimal network parameter combination through an iterative search method;

[0108] S303: Adjust historical transmission parameters based on the optimal network parameter combination.

[0109] Historical transmission parameters include network bandwidth, network delay, packet loss rate, frame rate and video bit rate. Network bandwidth refers to the available transmission rate of the network, which affects the transmission speed of video data; network delay refers to the time delay from the source to the destination of data, which affects the real-time performance of the video stream; packet loss rate refers to the proportion of data packets lost during the transmission process, which affects the video quality and smoothness; frame rate refers to the number of frames displayed per second in the video, which affects the smoothness of video playback; video bit rate refers to the amount of data transmitted per second, which affects the video quality and data volume.

[0110] Particle Swarm Optimization (PSO) is an optimization algorithm that simulates the foraging behavior of bird flocks. It finds the optimal solution by iteratively searching for particles in the search space. Each particle represents a possible solution. Particles continuously update their positions and velocities to find the optimal solution.

[0111] In this embodiment, the network transmission parameters of the historical video code stream are obtained to obtain the historical transmission parameters. In the video transmission optimization, the PSO algorithm uses the network transmission parameters as the position of the particles, and optimizes these parameter combinations by iterative optimization. Each particle updates its position according to the fitness function, and finally finds the optimal network parameter combination.

[0112] The fitness function defines the pros and cons of particles (i.e., combinations of network parameters). The fitness function takes into account multiple factors such as the delay, smoothness, and quality of video transmission to ensure that the optimization results meet actual needs. In the scenario of conference video transmission optimization, the particle swarm optimization (PSO) algorithm is used to optimize network parameters. The network parameters are defined as network bandwidth (B), network delay (D), packet loss rate (L), frame rate (F), and video bit rate (R). In order to design a fitness function, it is necessary to consider how these parameters jointly affect the quality of video transmission and user experience. A common goal is to maximize the quality of video transmission while maintaining low delay and packet loss rate. Therefore, a fitness function can be designed that gives positive weights to frame rate and bit rate, and negative weights to network delay and packet loss rate. Fitness function The expression is as follows:

[0113] ;

[0114] In the formula, is the frame rate, is the maximum or expected target value of the frame rate; is the video bitrate, It is the maximum value or expected target value of the video bit rate; is the network delay, It is the ideal minimum value of network delay; is the packet loss rate, It is the ideal minimum value of packet loss rate; , , , It is a weight coefficient, which is used to adjust the influence of different parameters on the fitness function. These coefficients need to be set and adjusted according to the specific application scenario and priority.

[0115] and Respectively represent the normalized values ​​of frame rate and bit rate relative to their maximum values, and Contributes positively to fitness. and They represent the normalized values ​​of delay and packet loss rate relative to their minimum values, and Contributes negatively to fitness.

[0116] Through the above steps, the optimal network parameter combination found by the PSO algorithm can improve the overall performance of video transmission, reduce delays, and improve video fluency and quality. The optimization process is dynamic and can adapt to different network environments and video content.

[0117] For further information, please refer to Figure 4 , extracting the motion vector feature of the first key frame to obtain the first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result, specifically comprising:

[0118] S401, calculating the motion vector feature of the first key frame by using an optical flow method to obtain a first motion vector feature;

[0119] S402, acquiring a standard vector feature template matching the first key frame from a pre-built standard vector feature template library;

[0120] S403, using cosine similarity to calculate the vector feature similarity value between the first motion vector feature and the standard vector feature template;

[0121] S404: taking the vector feature similarity value as the vector feature comparison result.

[0122] Optical flow is a technique for calculating the motion of objects in an image sequence. It estimates the motion vector (i.e., optical flow) of each pixel by analyzing the motion of pixels between consecutive frames. This optical flow information can reveal the motion patterns in the image, such as the direction and speed of the object's movement.

[0123] In this embodiment, first, the system applies the optical flow method to analyze the first key frame, and can extract the motion vector features of the frame. The motion vector features describe the motion of each area in the key frame, and these features can reflect the dynamic information of the image. Then, a standard vector feature template that matches the motion features of the first key frame is selected from the template library. The standard vector feature template library is a pre-built template library that contains standard vector feature templates for various typical scenes or motion modes. Next, the first motion vector features actually extracted are compared with the predefined standard vector feature templates to identify the specific content or motion mode of the key frame. Then, the motion vector features of the first key frame and the standard vector feature template are converted into vector form, and then the cosine similarity value of the two vectors is calculated. Finally, the calculated vector feature similarity value can be used as a feature comparison result.

[0124] Through the above steps, efficient motion feature comparison is achieved through the combination of optical flow method, standard template library and cosine similarity, which not only provides accurate motion feature recognition, but can also be applied to various video analysis tasks to improve the intelligence level and processing capabilities of the system.

[0125] For further information, please refer to Figure 5 The step of determining the video interruption position according to the vector feature comparison result and marking the key frame corresponding to the video interruption position in the first key frame sequence specifically includes:

[0126] S501, comparing the vector feature similarity value with a preset similarity threshold;

[0127] S502, marking the first key frame whose vector feature similarity value is less than a preset similarity threshold as a target key frame, and determining the position of the target key frame in the historical video bitstream as the video interruption position;

[0128] S503, generating a motion descriptor according to the motion vector feature of the target key frame;

[0129] S504, clustering the target key frames by a clustering algorithm based on the motion descriptor to obtain a target key frame subset;

[0130] S505 : Generate a label for each target key frame subset, and use the label to label the target key frames in the first key frame sequence.

[0131] Motion descriptors are a set of features extracted based on motion vector features to describe and quantify the motion patterns of objects or scenes. Motion descriptors not only contain the motion direction and distance information in the motion vector features, but may also include other relevant information such as speed, acceleration, and motion trajectory. The introduction of motion descriptors makes the description of the motion patterns of objects or scenes in video sequences more accurate and comprehensive. It not only contains basic information about the motion (such as direction and distance), but also extracts more advanced motion features (such as speed, acceleration, etc.) through certain algorithms and rules, providing richer data support for video processing and analysis.

[0132] In this embodiment, the system compares the calculated vector feature similarity value with a preset threshold. If the vector feature similarity value is lower than the set threshold, the key frame is marked as a target key frame, and these target key frames are considered to have anomalies or interruptions. By marking the target key frames, their positions in the historical video are determined, and these positions are possible interruption positions. Marking the target key frames helps locate the anomalies or interruption points in the video stream.

[0133] Then, the system generates motion descriptors based on the motion vector features of the target keyframes. Motion descriptors are high-level representations of motion features, usually used to describe the type, intensity, direction, etc. of motion. Through motion descriptor clustering, the system groups the target keyframes to obtain multiple target keyframe subsets, each of which represents a specific type of motion or feature pattern, which helps to summarize and process similar interruption patterns.

[0134] Finally, the system generates annotation labels for each target keyframe subset, which describe the motion mode or anomaly type represented by the target keyframe, and applies the generated annotation labels to the target keyframes in the first keyframe sequence.

[0135] Through the above steps, the target key frame and the video interruption position are determined by feature similarity comparison, and the target key frame is clustered in combination with the motion descriptor to obtain the target key frame subset. Finally, the target key frame subset is assigned a matching annotation label. The first key frame sequence is annotated by the annotation label, which helps to further analyze and classify the target key frame and improve the system's detection and processing capabilities for video interruptions.

[0136] For further information, please refer to Figure 6 , generating a label for each target key frame subset, and using the label to label the target key frames in the first key frame sequence, specifically comprising:

[0137] S601, generating a motion type label for each target key frame subset according to a motion descriptor corresponding to each target key frame subset;

[0138] S602, generating a motion vector label for each target key frame subset based on a pre-trained support vector machine model and according to the motion vector features of each target key frame subset;

[0139] S603, traversing the target key frames in the first key frame sequence, and adding a corresponding motion type label and motion vector label to each target key frame.

[0140] In this embodiment, first, the system uses the motion descriptor of each target keyframe subset to generate a motion type label. The motion descriptor usually contains information such as the motion mode, speed, direction, etc. of the object in the keyframe. By analyzing and comparing this information, the keyframe subset can be automatically classified into different motion types, such as "static", "slow movement", "fast movement", etc.

[0141] Then, the pre-trained support vector machine (SVM) model is used to generate motion vector labels based on the motion vector features of each target key frame subset. The SVM support vector machine is a powerful classification tool that can learn and predict the category of new data based on historical data. By training the SVM model, it can learn to identify different motion patterns or behaviors from motion vector features, thereby providing a more specific motion description for the key frame subset.

[0142] Finally, all target key frames in the first key frame sequence are traversed, and corresponding motion type labels and motion vector labels are added to each target key frame, so that each key frame is endowed with rich semantic information, which not only identifies its position in the video (as the key frame at the interruption position), but also describes its motion characteristics and type.

[0143] Through the above steps, by generating motion type and motion vector labels, we deepened the understanding and classification of key frames at video interruptions, and improved the accuracy and efficiency of video content analysis.

[0144] For further information, please refer to Figure 7 The steps of training the bitstream interruption detection model using the first key frame sequence after the annotation as the training data set include:

[0145] S701, initializing a decision tree model and configuring model parameters of the decision tree model, wherein the model parameters include the depth of the tree, the minimum number of samples, and a splitting criterion;

[0146] S702, dividing the first key frame sequence into a data set based on the minimum number of samples to obtain a plurality of data subsets;

[0147] S703, import each data subset into the decision tree model in turn, and use the motion type label and the motion vector label as the splitting criteria, and the depth of the decision tree as the termination condition to recursively train the decision tree model until the model is fitted to obtain a bitstream interruption detection model.

[0148] In this embodiment, first, the system initializes the decision tree model and configures its key parameters, including the depth of the tree, the minimum number of samples, and the splitting criterion. These parameters have a direct impact on the performance and complexity of the model. The depth of the tree determines the complexity of the model, and too deep may lead to overfitting; the minimum number of samples is used to control the minimum amount of data for node splitting, which helps to avoid generating too small leaf nodes; the splitting criterion guides the model how to divide the data set according to the features.

[0149] Then, based on the constraint of the minimum number of samples, the first key frame sequence including the motion type label and the motion vector label is divided into a data set to obtain several data subsets.

[0150] Finally, the system imports each data subset into the decision tree model in turn, and uses the motion type label and motion vector label as the splitting criteria for recursive training. The model will try to build decision rules based on the motion characteristics and types of key frames to accurately identify the interruption position in the bitstream. At the same time, the depth of the decision tree is used as the termination condition to ensure that the model training stops when the preset complexity is reached to avoid overfitting.

[0151] Through the above steps, the decision tree model is constructed and trained to realize the automatic detection of video stream interruption. This solution makes full use of the motion characteristics of key frames and improves the accuracy and efficiency of interruption detection.

[0152] Furthermore, the current video code stream is monitored in real time, and a multi-level cache mechanism is used to cache the current video code stream, specifically including:

[0153] Get the stream parameters of the current video stream;

[0154] According to the bitstream parameters of the current video bitstream, a target buffer corresponding to the current video bitstream is determined from a preset multi-level buffer;

[0155] Store the current video stream into the target buffer.

[0156] The multi-level cache design allows the system to flexibly allocate resources based on the different characteristics of the video stream, such as bandwidth requirements, processing complexity, etc. For example, a high-resolution, high-bitrate video stream may be allocated to a cache level with larger capacity and faster access speed to ensure a smooth playback experience.

[0157] In this embodiment, the current video bitstream is monitored in real time, including the monitoring of the video content itself (such as frame rate, picture quality, etc.) and the monitoring of network transmission parameters (such as bandwidth usage, packet loss rate, delay, etc.). Based on the bitstream parameters of the current video bitstream, the system will select a most suitable cache level from the preset multi-level cache structure as the target cache. Once the target cache is determined, the system will store the current video bitstream in the cache.

[0158] For example, suppose there is a video conferencing system that supports multiple video resolutions and encoding formats and is configured with a three-level cache structure. The first-level cache has a smaller capacity but the fastest access speed, which is suitable for storing low-resolution or low-bit-rate video data; the second-level cache has a moderate capacity and a faster access speed, which is suitable for storing medium-resolution or medium-bit-rate video data; the third-level cache has the largest capacity but a relatively slow access speed, which is suitable for storing high-resolution or high-bit-rate video data.

[0159] Suppose a participant is initiating a video conference and selects a video output with 1080p resolution and H.265 encoding format. First, the system obtains key video parameters such as the resolution (1080p) and encoding format (H.265) of the current video stream. Then, the system matches these stream parameters with the multi-level cache structure. Since 1080p resolution and H.265 encoding format usually correspond to higher bandwidth and storage requirements, the system selects the third-level cache as the target cache. Finally, the system stores the current video stream in the third-level cache and reads data from the cache for subsequent transmission and processing.

[0160] Through the above steps, by dynamically selecting multi-level cache to store video streams, resource allocation is optimized, data access efficiency and video playback smoothness are improved, and the system's ability to cope with emergencies is enhanced, ensuring the stability and continuity of video services.

[0161] In this embodiment, the video code stream interruption detection method is executed on the electronic device (eg Figure 1 The server shown in the figure) can receive instructions or obtain data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0163] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0164] Further references Figure 8 , as a response to the above Figure 2 The present application provides an embodiment of a video code stream interruption detection device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0165] like Figure 8 As shown, the video code stream interruption detection device 800 described in this embodiment includes:

[0166] The parameter adjustment module 801 is used to obtain the network transmission parameters of the historical video code stream, obtain the historical transmission parameters, and adjust the historical transmission parameters using a preset adaptive network transmission strategy;

[0167] The first parsing module 802 is used to obtain historical video code stream data after completing the adjustment of the historical transmission parameters, parse the historical video code stream data, identify key frames in the historical video code stream, obtain a first key frame, and construct a first key frame sequence;

[0168] The feature comparison module 803 is used to extract the motion vector feature of the first key frame to obtain the first motion vector feature, and compare the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result;

[0169] The interruption marking module 804 is used to determine the video interruption position according to the vector feature comparison result, and mark the key frame corresponding to the video interruption position in the first key frame sequence;

[0170] A model training module 805 is used to train a bitstream interruption detection model using the first key frame sequence after the annotation as a training data set, wherein the bitstream interruption detection model is built based on a decision tree model architecture;

[0171] The code stream buffering module 806 is used to monitor the current video code stream in real time, use a multi-level buffering mechanism to buffer the current video code stream, and obtain the current video code stream data when the video code stream is buffered;

[0172] The second parsing module 807 is used to parse the current video code stream data, identify the key frame in the current video code stream, obtain the second key frame, and construct a second key frame sequence;

[0173] The interruption identification module 808 is used to input the second key frame sequence into the bitstream interruption detection model and output the interruption detection result of the current video bitstream.

[0174] Furthermore, the parameter adjustment module 801 specifically includes:

[0175] A transmission parameter acquisition unit, used to acquire network transmission parameters of historical video code streams to obtain historical transmission parameters, wherein the historical transmission parameters include network bandwidth, network delay, packet loss rate, frame rate and video bit rate;

[0176] The optimal parameter combination unit is used to find the optimal network parameter combination through iterative search using a particle swarm optimization algorithm;

[0177] The transmission parameter adjustment unit is used to adjust the historical transmission parameters based on the optimal network parameter combination.

[0178] Furthermore, the feature comparison module 803 specifically includes:

[0179] A vector feature calculation unit, used to calculate the motion vector feature of the first key frame by using an optical flow method to obtain a first motion vector feature;

[0180] A feature template acquisition unit, used to acquire a standard vector feature template matching the first key frame from a pre-built standard vector feature template library;

[0181] A feature similarity calculation unit, used to calculate a vector feature similarity value between the first motion vector feature and a standard vector feature template using cosine similarity;

[0182] The vector feature comparison unit is used to use the vector feature similarity value as the vector feature comparison result.

[0183] Furthermore, the interruption marking module 804 specifically includes:

[0184] A feature similarity comparison unit, used to compare the vector feature similarity value with a preset similarity threshold;

[0185] A target key frame determination unit, used to mark the first key frame whose vector feature similarity value is less than a preset similarity threshold as a target key frame, and determine the position of the target key frame in the historical video bitstream as the video interruption position;

[0186] A motion descriptor generating unit, used for generating a motion descriptor according to a motion vector feature of a target key frame;

[0187] A key frame clustering unit, used for clustering target key frames through a clustering algorithm based on motion descriptors to obtain a target key frame subset;

[0188] The key frame labeling unit is used to generate a labeling label for each target key frame subset, and use the labeling label to label the target key frames in the first key frame sequence.

[0189] Furthermore, the key frame marking unit specifically includes:

[0190] A motion type label generating subunit, for generating a motion type label for each target key frame subset according to a motion descriptor corresponding to each target key frame subset;

[0191] A motion vector label generation subunit, for generating a motion vector label for each target key frame subset according to the motion vector features of each target key frame subset based on a pre-trained support vector machine model;

[0192] The key frame joint labeling subunit is used to traverse the target key frames in the first key frame sequence and add a corresponding motion type label and motion vector label to each target key frame.

[0193] Furthermore, the model training module 805 specifically includes:

[0194] A model initialization unit, used to initialize the decision tree model and configure the model parameters of the decision tree model, wherein the model parameters include the depth of the tree, the minimum number of samples and the splitting criterion;

[0195] A data set division unit, used for dividing the data set of the first key frame sequence based on the minimum number of samples to obtain a plurality of data subsets;

[0196] The model recursive training unit is used to import each data subset into the decision tree model in turn, and use the motion type label and the motion vector label as the splitting criteria and the depth of the decision tree as the termination condition to recursively train the decision tree model until the model is fitted to obtain a bitstream interruption detection model.

[0197] Furthermore, the second parsing module 807 specifically includes:

[0198] A bitstream parameter acquisition unit, used to acquire bitstream parameters of the current video bitstream;

[0199] A cache matching unit, used to determine a target cache corresponding to the current video code stream from a preset multi-level cache according to the code stream parameters of the current video code stream;

[0200] The video code stream storage unit is used to store the current video code stream in the target cache.

[0201] In the above embodiment, the present application discloses a video code stream interruption detection device, which belongs to the field of video processing technology. First, the historical transmission parameters are adjusted through an adaptive strategy to better cope with changes in the video transmission environment. Then, the video code stream is parsed to construct a key frame sequence. Subsequently, the key frame motion vector features are extracted and compared with the standard vector feature template to accurately locate the video interruption position. Next, the video interruption position is marked in the key frame sequence, and a training data set is constructed to train a decision tree model to identify video interruption. In practical applications, a multi-level cache mechanism is used to monitor the video code stream in real time, and the current data is parsed and input into the code stream interruption detection model for analysis to effectively detect video code stream interruption. The present application adjusts the historical transmission parameters through an adaptive strategy to better cope with changes in the video transmission environment, determines the interruption position in the video through motion vector feature analysis, and marks the video interruption position in the key frame sequence, and constructs a training data set to train a decision tree model to identify video interruption, which can adapt to complex network environments, effectively detect video code stream interruption, so as to perform video interruption repair and ensure video transmission quality.

[0202] To solve the above technical problems, the present application also provides a computer device. Fig. 9 , Fig. 9 This is a basic structural block diagram of the computer device in this embodiment.

[0203] The computer device 9 includes a memory 91, a processor 92, and a network interface 93 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 9 with a memory 91, a processor 92, and a network interface 93, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.

[0204] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0205] The memory 91 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 91 can be an internal storage unit of the computer device 9, such as a hard disk or memory of the computer device 9. In other embodiments, the memory 91 can also be an external storage device of the computer device 9, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 9. Of course, the memory 91 can also include both the internal storage unit of the computer device 9 and its external storage device. In this embodiment, the memory 91 is generally used to store the operating system and various application software installed on the computer device 9, such as computer-readable instructions of the interruption detection method of the video code stream, etc. In addition, the memory 91 can also be used to temporarily store various types of data that have been output or are to be output.

[0206] The processor 92 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 92 is generally used to control the overall operation of the computer device 9. In this embodiment, the processor 92 is used to run computer-readable instructions stored in the memory 91 or process data, such as computer-readable instructions for running the interruption detection method of the video code stream.

[0207] The network interface 93 may include a wireless network interface or a wired network interface. The network interface 93 is generally used to establish a communication connection between the computer device 9 and other electronic devices.

[0208] In the above embodiment, the present application discloses a computer device, which belongs to the field of video processing technology. First, the historical transmission parameters are adjusted through an adaptive strategy to better cope with changes in the video transmission environment. Then, the video code stream is parsed to construct a key frame sequence. Subsequently, the key frame motion vector features are extracted and compared with the standard vector feature template to accurately locate the video interruption position. Next, the video interruption position is marked in the key frame sequence, and a training data set is constructed to train a decision tree model to identify video interruption. In practical applications, a multi-level cache mechanism is used to monitor the video code stream in real time, parse the current data and input the code stream interruption detection model for analysis, and effectively detect the video code stream interruption. The present application adjusts the historical transmission parameters through an adaptive strategy to better cope with changes in the video transmission environment, determines the interruption position in the video through motion vector feature analysis, and marks the video interruption position in the key frame sequence, and constructs a training data set to train a decision tree model to identify video interruption, which can adapt to complex network environments, effectively detect video code stream interruption, so as to perform video interruption repair and ensure video transmission quality.

[0209] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the video stream interruption detection method as described above.

[0210] In the above embodiment, the present application discloses a computer-readable storage medium, which belongs to the field of video processing technology. First, the historical transmission parameters are adjusted through an adaptive strategy to better cope with changes in the video transmission environment. Then, the video code stream is parsed to construct a key frame sequence. Subsequently, the key frame motion vector features are extracted and compared with the standard vector feature template to accurately locate the video interruption position. Next, the video interruption position is marked in the key frame sequence, and a training data set is constructed to train a decision tree model to identify video interruption. In practical applications, a multi-level cache mechanism is used to monitor the video code stream in real time, and the current data is parsed and input into the code stream interruption detection model for analysis to effectively detect video code stream interruption. The present application adjusts the historical transmission parameters through an adaptive strategy to better cope with changes in the video transmission environment, determines the interruption position in the video through motion vector feature analysis, and marks the video interruption position in the key frame sequence, and constructs a training data set to train a decision tree model to identify video interruption, which can adapt to complex network environments, effectively detect video code stream interruption, so as to perform video interruption repair and ensure video transmission quality.

[0211] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0212] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for detecting interruption of a video stream, characterized in that: include: Acquire network transmission parameters of historical video code streams, obtain historical transmission parameters, and use a preset adaptive network transmission strategy to adjust the historical transmission parameters; After the adjustment of the historical transmission parameters is completed, the historical video code stream is parsed, key frames in the historical video code stream are identified, a first key frame is obtained, and a first key frame sequence is constructed; Extracting the motion vector feature of the first key frame to obtain a first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result; Determine a video interruption position according to the vector feature comparison result, and mark a key frame in the first key frame sequence corresponding to the video interruption position; Using the first key frame sequence after the labeling as a training data set, training a bitstream interruption detection model, wherein the bitstream interruption detection model is built based on a decision tree model architecture; Monitor the current video code stream in real time and cache the current video code stream using a multi-level cache mechanism; Parsing the cached current video stream, identifying key frames in the current video stream, obtaining second key frames, and constructing a second key frame sequence; Inputting the second key frame sequence into the bitstream interruption detection model, and outputting the interruption detection result of the current video bitstream; The step of acquiring the network transmission parameters of the historical video code stream, obtaining the historical transmission parameters, and adjusting the historical transmission parameters by using a preset adaptive network transmission strategy specifically includes: Acquire network transmission parameters of historical video code streams to obtain historical transmission parameters, wherein the historical transmission parameters include network bandwidth, network delay, packet loss rate, frame rate and video bit rate; The particle swarm optimization algorithm is used to find the optimal network parameter combination through iterative search; The historical transmission parameters are adjusted based on the optimal network parameter combination.

2. The method for detecting interruption of a video stream as claimed in claim 1, wherein: The step of extracting the motion vector feature of the first key frame to obtain the first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result specifically includes: Calculating the motion vector feature of the first key frame using an optical flow method to obtain the first motion vector feature; Acquire a standard vector feature template matching the first key frame from a pre-built standard vector feature template library; Calculating the vector feature similarity value between the first motion vector feature and the standard vector feature template using cosine similarity; The vector feature similarity value is used as the vector feature comparison result.

3. The method for detecting interruption of a video stream as claimed in claim 2, wherein: The step of determining the video interruption position according to the vector feature comparison result, and marking the key frame corresponding to the video interruption position in the first key frame sequence specifically includes: Comparing the vector feature similarity value with a preset similarity threshold; Marking the first key frame whose vector feature similarity value is less than a preset similarity threshold as a target key frame, and determining the position of the target key frame in the historical video code stream as the video interruption position; Generate a motion descriptor according to the motion vector feature of the target key frame; Based on the motion descriptor, clustering the target key frame by a clustering algorithm to obtain a target key frame subset; Generate a label for each of the target key frame subsets, and use the label to label the target key frames in the first key frame sequence.

4. The method for detecting interruption of a video stream as claimed in claim 3, wherein: The step of generating a label for each of the target key frame subsets and using the label to label the target key frames in the first key frame sequence specifically includes: Generating a motion type label for each of the target key frame subsets according to the motion descriptor corresponding to each of the target key frame subsets; Based on the pre-trained support vector machine model, generating a motion vector label for each of the target key frame subsets according to the motion vector features of each of the target key frame subsets; The target key frames in the first key frame sequence are traversed, and a corresponding motion type label and motion vector label are added to each of the target key frames.

5. The method for detecting interruption of a video code stream as claimed in claim 4, characterized in that: The step of using the first key frame sequence after labeling as a training data set to train the bitstream interruption detection model specifically includes: Initializing a decision tree model and configuring model parameters of the decision tree model, wherein the model parameters include the depth of the tree, the minimum number of samples, and a splitting criterion; Dividing the first key frame sequence into a data set based on the minimum number of samples to obtain a plurality of data subsets; Each of the data subsets is imported into the decision tree model in turn, and the motion type label and the motion vector label are used as splitting criteria, and the depth of the decision tree is used as a termination condition. The decision tree model is recursively trained until the model is fitted to obtain the bitstream interruption detection model.

6. The method for detecting interruption of a video stream as claimed in claim 1, wherein: The real-time monitoring of the current video code stream and the use of a multi-level cache mechanism to cache the current video code stream specifically include: Obtaining the bitstream parameters of the current video bitstream; Determining a target cache corresponding to the current video stream from a preset multi-level cache according to the stream parameters of the current video stream; The current video code stream is stored in the target buffer.

7. A video code stream interruption detection device, characterized in that: include: A parameter adjustment module, used to obtain network transmission parameters of historical video code streams, obtain historical transmission parameters, and adjust the historical transmission parameters using a preset adaptive network transmission strategy; A first parsing module, configured to obtain historical video code stream data after completing the adjustment of the historical transmission parameters, parse the historical video code stream data, identify key frames in the historical video code stream, obtain a first key frame, and construct a first key frame sequence; A feature comparison module, used for extracting the motion vector feature of the first key frame to obtain a first motion vector feature, and comparing the first motion vector feature with a preset standard vector feature template to obtain a vector feature comparison result; An interruption marking module, used to determine the video interruption position according to the vector feature comparison result, and mark the key frame corresponding to the video interruption position in the first key frame sequence; A model training module, used to train a bitstream interruption detection model using the first key frame sequence after the annotation as a training data set, wherein the bitstream interruption detection model is built based on a decision tree model architecture; The code stream caching module is used to monitor the current video code stream in real time, cache the current video code stream using a multi-level cache mechanism, and obtain the current video code stream data when the video code stream is cached; A second parsing module, used to parse the current video code stream data, identify the key frame in the current video code stream, obtain the second key frame, and construct a second key frame sequence; An interruption identification module, used for inputting the second key frame sequence into the bitstream interruption detection model, and outputting an interruption detection result of the current video bitstream; Wherein, the parameter adjustment module is specifically used for: Acquire the network transmission parameters of the historical video code stream to obtain the historical transmission parameters, wherein the historical transmission parameters include network bandwidth, network delay, packet loss rate, frame rate and video bit rate; adopt the particle swarm optimization algorithm to find the optimal network parameter combination through iterative search; adjust the historical transmission parameters based on the optimal network parameter combination.

8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the video code stream interruption detection method according to any one of claims 1 to 6 when executing the computer-readable instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the video code stream interruption detection method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Video monitoring resource adjustment method and device, medium and electronic equipment

    CN111866583A

  • Low-latency HTTP live streaming

    US20180041561A1