Method, device, storage medium and electronic device for detecting sudden change of live streaming bit rate
By processing the live stream into a video file and performing bitrate sequence mutation detection, the problem of difficulty in detecting bitrate mutations during live streaming is solved, enabling rapid and accurate location and investigation, and improving user experience.
Patent Information
- Application Number
- CN202211652483.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-12-21
AI Technical Summary
Sudden changes in bitrate during live streaming can lead to a drop in image quality that is difficult to detect quickly and accurately, resulting in a poor viewing experience for users. Existing technologies are unable to efficiently locate and troubleshoot the problem.
The live stream is processed into video files, divided into multiple video segments of equal duration, and bitrate sequence mutation detection is performed using methods such as Pettitt to quickly and accurately identify bitrate mutations.
It improves the detection efficiency of sudden changes in live stream bitrate, reduces manual costs, quickly locates and troubleshoots problems, and enhances user experience.
Smart Images

Figure CN116156209B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of computer technology, and more specifically to a method, device, computer program product, non-transitory computer-readable storage medium, and electronic device for detecting a sudden change in bit rate of a live stream. Background Art
[0002] This section is intended to introduce some aspects of the art, which may be related to various aspects of the present disclosure described below and / or claimed. It is believed that this section helps to provide background information to facilitate a better understanding of various aspects of the present disclosure. Therefore, it should be understood that these statements should be understood from this perspective, rather than as an admission of the prior art.
[0003] With the development of the Internet and the improvement of bandwidth environment, the market size of online live broadcasting continues to expand, and a large number of live broadcasting technologies are gradually becoming known to the public. Whether it is a concert, a press conference, interactive sales or a personal performance, it can be presented to the public in the form of live broadcast. As long as users have a device that can connect to the Internet and a good network environment, they can watch the live broadcast anytime and anywhere.
[0004] The quality of live broadcast directly affects the user's viewing experience. What users expect is a smooth and clear live broadcast. The core factors that affect the quality of live broadcast are resolution, frame rate and bit rate, among which bit rate is the focus and core. Bit rate determines the upper limit of the quality of live video. Generally, under the condition of a certain resolution, the higher the bit rate, the better the live broadcast quality. However, in the case of the same live broadcast with the same resolution, if the live broadcast bit rate suddenly changes sharply, especially if the bit rate drops sharply, the live broadcast quality will usually deteriorate significantly, seriously affecting the user's viewing experience. This sudden change in bit rate is usually caused by a bug in the video cloud's processing of the live stream. This type of bug is not easy to find during the project testing process, and it is not easy for developers to detect it after the project goes online, but it will bring users a poor viewing experience if it occurs accidentally.
[0005] Sudden and drastic changes in the bitrate during live broadcasting usually lead to a significant decrease in the quality of live broadcasting, seriously affecting the user's viewing experience. This abnormal and drastic change in video bitrate may be caused by a bug in the video cloud's processing of the live stream. Usually, the triggering frequency of such bugs is low. During the offline testing phase of the project, since the test time and live broadcasting scenarios are limited, the sudden change in bitrate may not be triggered, and such bugs will not be discovered by testers. After the project goes online, since the live broadcasting scenarios of users are diverse and huge in number, the number of such bugs will increase accordingly, giving users a poor viewing experience. Live broadcast developers have limited time and energy, and it is impossible to discover occasional bugs by manually watching the live broadcast room. User feedback descriptions of poor live broadcast quality are usually vague, and developers cannot accurately locate the problem in a short time based on this. Troubleshooting is inefficient and wastes time and manpower.
[0006] Therefore, it is necessary to propose a detection scheme for sudden changes in the bit rate of a live stream to alleviate or solve at least one of the above technical problems. Summary of the invention
[0007] The purpose of the present disclosure is to provide a method, device, computer program product, non-temporary computer-readable storage medium and electronic device for detecting a sudden change in the bit rate of a live stream, so as to quickly and accurately detect a sudden change in the bit rate of a live stream.
[0008] According to a first aspect of the present disclosure, a method for detecting a sudden change in the bitrate of a live stream is provided, comprising: obtaining a live stream of a target live broadcast room, and saving a continuous portion of the live stream as a video file; dividing the video file into a plurality of video segments of equal duration, and determining the bitrate of each of the video segments to obtain a corresponding bitrate sequence; performing a mutation detection on the bitrate sequence to obtain a corresponding mutation detection result; and determining, based on the mutation detection result, whether there is a bitrate mutation in the live stream of the target live broadcast room.
[0009] According to a second aspect of the present disclosure, a device for detecting a sudden change in the bit rate of a live broadcast stream is provided, comprising: an acquisition module, used to acquire the live broadcast stream of a target live broadcast room, and save a continuous part of the live broadcast stream as a video file; a division module, used to divide the video file into a plurality of video segments of equal duration, and determine the bit rate of each of the video segments to obtain a corresponding bit rate sequence; a detection module, used to perform mutation detection on the bit rate sequence to obtain a corresponding mutation detection result; and a determination module, used to determine whether there is a bit rate mutation in the live broadcast stream of the target live broadcast room based on the mutation detection result.
[0010] According to a third aspect of the present disclosure, a computer program product is provided, comprising program code instructions. When the program product is executed by a computer, the program code instructions enable the computer to execute the method according to the first aspect of the present disclosure.
[0011] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method according to the first aspect of the present disclosure.
[0012] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor, a memory that electronically communicates with the processor; and instructions, the instructions being stored in the memory and executable by the processor to enable the electronic device to perform the method according to the first aspect of the present disclosure.
[0013] In various embodiments provided in the present disclosure, the live stream is processed into a video file, and mutation detection is performed on the bit rate sequence corresponding to the video file. This can quickly and accurately discover and locate the bit rate mutation of the live stream, so that the troubleshooting work of developers can be traced in a short time, reducing labor costs and improving the efficiency of effectively discovering problems.
[0014] It should be understood that the content described in this section is not intended to identify key or essential features of the claimed invention, nor is it intended to be used alone to determine the scope of the claimed invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0016] Figure 1 A system architecture diagram showing an embodiment of a method for detecting a sudden change in bitrate of a live stream according to the present disclosure is shown;
[0017] Figure 2 A flow chart of an embodiment of a method for detecting a sudden change in bitrate of a live stream according to the present disclosure is shown;
[0018] Figure 3A A schematic diagram showing the automatic inspection process of a live stream according to the method for detecting a sudden change in the bit rate of a live stream disclosed in the present invention is shown;
[0019] Figure 3BA schematic diagram showing a bit rate mutation checking process of a method for detecting a bit rate mutation of a live stream according to the present disclosure is shown;
[0020] Figure 3C A schematic diagram showing bit rate data of a method for detecting a sudden change in bit rate of a live stream according to the present disclosure is shown;
[0021] Figure 4 An exemplary block diagram of a device for detecting a sudden change in bitrate of a live stream according to an embodiment of the present disclosure is shown;
[0022] Figure 5 A schematic diagram of an example electronic device 500 is shown that may be used to implement embodiments of the present disclosure.
[0023] Specific implementation method
[0024] The present disclosure will be described more fully below with reference to the accompanying drawings. However, the present disclosure may be embodied in a variety of alternative forms and should not be construed as being limited to the embodiments described herein. Therefore, although the present disclosure is susceptible to various modifications and alternative forms, its specific embodiments are shown by way of example in the accompanying drawings and will be described in detail herein. However, it should be understood that this approach is not intended to limit the present disclosure to the specific form disclosed, but rather, the present disclosure covers all modifications, equivalents, and alternatives that fall within the spirit and scope of the present disclosure as defined by the claims.
[0025] It should be understood that although various elements can be described herein with terms such as first, second, etc., these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the teaching of the present disclosure.
[0026] Some examples are described herein in conjunction with block diagrams and / or flow charts, wherein each box represents a circuit element, module, or portion of code that includes one or more executable instructions for implementing a specified logical function. It should also be noted that in other implementations, the functions described in the box may not occur in the order described. For example, depending on the functions involved, two boxes shown in succession may actually be executed substantially simultaneously, or the boxes may sometimes be executed in reverse order.
[0027] The phrases "according to an embodiment..." or "in an embodiment..." mentioned herein mean that a specific feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one implementation of the present disclosure. The phrases "according to an embodiment..." or "in an embodiment..." that appear in different places herein do not necessarily refer to the same embodiment, nor are they necessarily separate or alternative embodiments that are mutually exclusive with other embodiments.
[0028] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the method, apparatus, terminal device and storage medium for detecting a sudden change in bit rate of a live stream disclosed in the present invention can be applied.
[0029] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0030] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as voice interaction applications, video conferencing applications, short video social applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0031] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with microphones and speakers, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0032] The server 105 may be a server that provides various services. For example, the server 105 may be a background server that processes a detection request for a sudden change in the bit rate of a live stream sent by the terminal devices 101 , 102 , and 103 .
[0033] In some cases, the method for detecting a sudden change in the bit rate of a live stream provided in the present disclosure may be executed by the server 105. Accordingly, the device for detecting a sudden change in the bit rate of a live stream may also be arranged in the server 105. In this case, the system architecture 100 may not include the terminal devices 101, 102, and 103.
[0034] In some cases, the method for detecting a sudden change in the bit rate of a live stream provided in the present disclosure can be jointly executed by the terminal devices 101, 102, 103 and the server 105. Accordingly, the detection device for detecting a sudden change in the bit rate of a live stream can also be respectively arranged in the terminal devices 101, 102, 103 and the server 105.
[0035] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0037] Figure 2 A flowchart of an embodiment of a method for detecting a sudden change in the bit rate of a live stream according to the present disclosure is shown. The method in this embodiment can be Figure 1 Implementation by the server in , or by Figure 1 It is implemented jointly by the terminal devices and servers in the system.
[0038] like Figure 2 As shown, the method 200 for detecting a sudden change in the bit rate of a live stream in this embodiment includes the following steps:
[0039] Step 210, obtaining the live stream of the target live broadcast room, and saving a continuous part of the live stream as a video file.
[0040] In this embodiment, the target live broadcast room may be one of a preset number of live broadcast rooms with the largest number of viewers on the live broadcast platform, such as a live broadcast room in the top 100 viewers.
[0041] In this embodiment, the live stream is streaming audio and video data in a live network broadcast.
[0042] In this embodiment, a continuous part of the live stream, such as the live stream of the most recent 1 minute, is saved as a video file. Since the time length of the live stream is usually not fixed, the above process converts the live stream into a video file with a specific duration, so as to provide a basis for subsequent segmentation and mutation detection.
[0043] In an optional embodiment, the live stream may include a source stream and at least one transcoded stream. The source stream and the at least one transcoded stream correspond to different video files. In subsequent steps, mutation detection is performed on both the source stream and the transcoded stream to discover bugs generated by the transcoding service and save time in locating the problem.
[0044] Step 220: divide the video file into a plurality of video segments of equal length, and determine the bit rate of each video segment to obtain a corresponding bit rate sequence.
[0045] In this embodiment, the duration of each video segment is equal. Optionally, a video segment may be a group of pictures (Group of Pictures, GOP). A group of pictures may be a set of continuous pictures between two key frames. A key frame refers to an image frame that is encoded using only information of the frame without reference to other image frames.
[0046] In this embodiment, the bit rate refers to the number of bits transmitted per unit time, and is generally expressed in kbps.
[0047] In an optional embodiment, step 220 may further include the following steps: first, parsing the video file to obtain frame information of the video file. Secondly, according to the frame information of the video file, determining the portion between two adjacent key frames in the video file as a picture group. Finally, according to the time length and data volume of each picture group, determining the bit rate of each picture group.
[0048] In an optional embodiment, ffmpeg (an audio and video processing command line tool) can be used to parse the video file.
[0049] Step 230: Perform mutation detection on the bit rate sequence to obtain a corresponding mutation detection result.
[0050] In this embodiment, the sudden change of data refers to a rapid change of data, which is manifested as discontinuity of data change.
[0051] In an optional embodiment, the Pettitt method (a non-parametric data mutation detection method) can be used to perform mutation detection on the bit rate sequence. The specific implementation process can be found in the description below. In other embodiments, other methods (such as MK mutation detection method, Bernaola Galvan segmentation algorithm) can also be used for mutation detection.
[0052] Step 240, based on the mutation detection result, determine whether there is a bit rate mutation in the live stream of the target live broadcast room.
[0053] In this embodiment, if the mutation detection result of the bit rate sequence is that there is a mutation, it can be determined that there is a bit rate mutation in the live stream of the target live broadcast room.
[0054] In an optional embodiment, when it is determined that there is a sudden change in the bit rate of the live stream of the target live room, an alarm message is sent to the target device (such as a terminal device of a developer or maintenance personnel) to quickly locate and troubleshoot the problem.
[0055] Figure 3A The schematic diagram of the live stream automatic inspection process according to the live stream bit rate mutation detection method disclosed in the present invention is shown. Figure 3A As shown in the figure, the inspection service continuously pulls the live stream of the room from the online environment. The specific live room selection logic here is determined by the task service, which is usually the live room with the top 100 viewers, because such a live room is more typical.
[0056] Continuously pull live streams for a certain period of time and save them as video files, such as 1 minute, including the source stream and each transcoded stream. The saved video files are used for subsequent bitrate verification. Both the source stream and the transcoded stream need to be verified to discover bugs caused by the transcoding service and save time in locating problems.
[0057] After obtaining the video file, we proceed to the data preprocessing part. Use the ffmpeg tool to parse the saved video file. After the video is parsed, the information of each frame can be obtained. According to the frame information, the bit rate of each gop can be obtained, thereby obtaining a set of ordered bit rate data. This set of bit rate data is used as the input of Pettitt mutation detection. According to the p value calculated by Pettitt mutation detection, it is judged whether the obtained mutation point is statistically significant. After obtaining the judgment result, it is reported to the task service together with the corresponding live stream information, and the verification result is recorded. Once an abnormal bit rate mutation occurs, an alarm message is immediately sent to the developer to quickly locate and troubleshoot the problem.
[0058] Figure 3B The schematic diagram of the bit rate mutation checking process of the method for detecting bit rate mutation of live streaming according to the present disclosure is shown. Figure 3B As shown in the figure, in the process of checking the bit rate mutation, the video file is first preprocessed to obtain the bit rate data sequence. The video file is parsed using the ffmpeg command line tool, and the parameter "-show_entries packet = pts_time, dts_time, duration_time, size, flags" is specified to obtain the information of each frame of the video file. In this way, the decoding timestamp pts and data size of each key frame can be obtained, and the bit rate of each gop is calculated in sequence according to the information of the key frame, so as to obtain a set of ordered video bit rate data (i.e., bit rate sequence).
[0059] The ordered bitrate data obtained above is used as the input of the Pettitt mutation detection algorithm. The Pettitt algorithm uses the order sequence to detect the mutation point. First, the input bitrate data sequence is converted into the corresponding order sequence, and then the corresponding statistics are constructed. The mutation point U and its corresponding statistical parameter p value are obtained according to the maximum value in the statistics. Finally, the p value is compared with the given significance level of 0.05, and the conclusion of whether the data has a mutation is output. The significance level of 0.05 specified here is an empirical value. If the p value is smaller than the given significance level, it means that the verification result is significant, and there is a bitrate mutation in this video, and the mutation point is U. Otherwise, it is considered that the video bitrate changes steadily and there is no mutation.
[0060] For example, there is a video file demo.flv saved from a live stream. After the preprocessing stage, a set of ordered bit rate data is obtained as follows: 6068.49, 8418.93, 4677.00, 4318.72, 4553.21, 6929.99, 6258.84, 7057.91, 3364.56, 6738.09, 6947.85, 4251.57, 2681.61, 4653.75, 4949.90, 7585.17, 5934.91, 7599.84, 5779.91 , 8696.179811358612, 5465.97, 4086.56, 5061.50, 6953.20, 6535.66, 6372.51, 6270.55, 6552.23, 4234.74, 7211.66, 5153.47, 4754.98, 126.95, 127.59, 130.41, 129.18, 128.50, 128.89, 129.91, 128.79, 129.87, 128.96, 129.54, 129.35.
[0061] Figure 3C The schematic diagram of the bitrate data of the live stream bitrate mutation detection method disclosed in the present invention is shown. It can be seen from the figure that the bitrate of the video has dropped sharply. This set of bitrate data is used as the input of the Pettitt algorithm. After the above series of calculations, the p-value of the mutation point of this set of data is 7.37e-05, which is much smaller than the specified significance level of 0.05. The conclusion that the video has a bitrate mutation can be output. This conclusion is consistent with Figure 3C The trend shown in the line chart is consistent with that in Figure 2.
[0062] Figure 4 FIG. 2 shows an exemplary block diagram of a device for detecting a sudden change in the bit rate of a live stream according to an embodiment of the present disclosure. Figure 4As shown, the live stream bitrate mutation detection device 400 includes: an acquisition module 410, used to acquire the live stream of the target live broadcast room, and save a continuous part of the above live stream as a video file; a division module 420, used to divide the above video file into multiple video segments of equal length, and determine the bitrate of each of the above video segments to obtain a corresponding bitrate sequence; a detection module 430, used to perform mutation detection on the above bitrate sequence to obtain a corresponding mutation detection result; a determination module 440, used to determine whether there is a bitrate mutation in the live stream of the above target live broadcast room based on the above mutation detection result.
[0063] In various embodiments provided in the present disclosure, the live stream is processed into a video file, and mutation detection is performed on the bit rate sequence corresponding to the video file. This can quickly and accurately discover and locate the bit rate mutation of the live stream, so that the troubleshooting work of developers can be traced in a short time, reducing labor costs and improving the efficiency of effectively discovering problems.
[0064] It should be understood that Figure 4 The various modules of the apparatus 400 shown in FIG. 4 can be used in conjunction with the reference Figure 2 The steps in the method 200 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the apparatus 400 and the modules included therein. For the sake of brevity, some operations, features and advantages are not described in detail here.
[0065] In an optional embodiment, the apparatus 400 further includes a sending module, which is used to send an alarm message to a target device when it is determined that there is a sudden change in the bit rate of the live stream of the target live broadcast room.
[0066] In an optional embodiment, each of the above video clips is a picture group.
[0067] In an optional embodiment, the division module 420 is also used to: parse the above-mentioned video file to obtain the frame information of the above-mentioned video file; determine the part between two adjacent key frames in the above-mentioned video file as a picture group according to the frame information of the above-mentioned video file; and determine the bit rate of each of the above-mentioned picture groups according to the time length and data volume of each of the above-mentioned picture groups.
[0068] In an optional embodiment, the detection module 430 is further configured to perform Pettitt mutation detection on the above bit rate sequence.
[0069] In an optional embodiment, the live broadcast stream includes a source stream and at least one transcoded stream, and the source stream and the at least one transcoded stream correspond to different video files.
[0070] In an optional embodiment, the target live broadcast room is one of a preset number of live broadcast rooms with the largest number of viewers on the live broadcast platform.
[0071] Figure 5 Schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. Figure 5 , a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein. Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504. Multiple components in the device 500 are connected to the I / O interface 505, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0072] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as a method for detecting a sudden change in the bit rate of a live stream. For example, in some embodiments, the method for detecting a sudden change in the bit rate of a live stream may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method for detecting a sudden change in the bit rate of a live stream described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the method for detecting a sudden change in the bitrate of a live stream by any other appropriate means (eg, by means of firmware).
[0073] The various illustrative logics, logic blocks, modules, circuits, and algorithmic processes described in conjunction with the aspects disclosed herein may be implemented as electronic hardware, computer software, or a combination of both. The interchangeability of hardware and software has been generally described in terms of functionality and illustrated in the various illustrative components, blocks, modules, circuits, and processes described above. Whether such functionality is implemented in hardware or software depends on the specific application and design constraints on the overall system.
[0074] The hardware and data processing apparatus for implementing the various illustrative logics, logic blocks, modules and circuits described in conjunction with the aspects disclosed herein can be implemented or executed with a general purpose single-chip or multi-chip processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor can be a microprocessor or any conventional processor, controller, microcontroller or state machine. The processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In some aspects, specific processes and methods can be performed by circuits specific to a given function.
[0075] In one or more aspects, the functions described may be implemented in hardware, digital electronic circuitry, computer software, firmware (including the structures disclosed in this specification and their equivalents), or any combination thereof. Aspects of the subject matter described in this specification may also be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on computer storage media for execution by a data processing apparatus or to control the operation of the data processing apparatus.
[0076] If implemented in software, the function can be stored or transferred to a computer-readable medium as one or more instructions or codes. The process of the method or algorithm disclosed herein can be implemented in a software module executable by a processor, and the software module can reside on a computer-readable medium. Computer-readable media include computer storage media and communication media, and the communication media include any medium capable of transmitting a computer program from one place to another. The storage medium can be any available medium accessible by a computer. As an example and not limitation, this computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to store the required program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. The disk (Disk) and disk (disc) used herein include high-density optical disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein the disk (Disk) usually copies data magnetically, and the disk (disc) copies data optically with lasers. The above combination should also be included in the scope of computer-readable media. Additionally, the operations of a method or algorithm may be implemented as one or any combination or set of codes and instructions on a machine-readable medium and a computer-readable medium, which may be incorporated into a computer program product.
[0077] Each embodiment in the present disclosure is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, equipment embodiment, computer-readable storage medium embodiment, and computer program product embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A method for detecting a sudden change in bit rate of a live stream, comprising: Obtaining a live stream of a target live broadcast room, and saving a continuous portion of the live stream as a video file; Divide the video file into a plurality of video segments of equal duration, and determine the bit rate of each of the video segments to obtain a corresponding bit rate sequence; wherein each of the video segments is a picture group; the dividing the video file into a plurality of video segments of equal duration and determining the bit rate of each of the video segments comprises: parsing the video file to obtain frame information of the video file; determining a portion between two adjacent key frames in the video file as a picture group according to the frame information of the video file; and determining the bit rate of each of the picture groups according to the time length and data volume of each of the picture groups; Performing mutation detection on the bit rate sequence to obtain a corresponding mutation detection result; According to the mutation detection result, it is determined whether there is a bit rate mutation in the live stream of the target live broadcast room.
2. The method according to claim 1, wherein: The method further comprises: When it is determined that there is a sudden change in the bit rate of the live stream of the target live room, an alarm message is sent to the target device.
3. The method according to claim 1, wherein: The performing mutation detection on the bit rate sequence includes: A Pettitt mutation test is performed on the bit rate sequence.
4. The method according to claim 1, wherein: The live stream includes a source stream and at least one transcoded stream, and the source stream and the at least one transcoded stream correspond to different video files.
5. The method according to any one of claims 1 to 4, wherein: The target live broadcast room is one of the preset number of live broadcast rooms with the largest number of viewers on the live broadcast platform.
6. A device for detecting a sudden change in bit rate of a live stream, comprising: An acquisition module, used for acquiring a live stream of a target live broadcast room, and saving a continuous part of the live stream as a video file; A division module is used to divide the video file into a plurality of video segments of equal length, and determine the bit rate of each of the video segments to obtain a corresponding bit rate sequence; wherein each of the video segments is a picture group; said dividing the video file into a plurality of video segments of equal length, and determining the bit rate of each of the video segments, comprises: parsing the video file to obtain frame information of the video file; according to the frame information of the video file, determining the part between two adjacent key frames in the video file as a picture group; and determining the bit rate of each of the picture groups according to the time length and data volume of each of the picture groups; A detection module, used to perform mutation detection on the bit rate sequence to obtain a corresponding mutation detection result; A determination module is used to determine whether there is a bit rate mutation in the live stream of the target live broadcast room according to the mutation detection result.
7. A computer program product comprising program code instructions, which, when the program product is executed by a computer, cause the computer to perform the method of at least one of claims 1 to 5.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to at least one of claims 1-5.
9. An electronic device, comprising: processor, a memory in electronic communication with the processor; as well as Instructions, which are stored in the memory and can be executed by the processor to cause the electronic device to perform the method according to at least one of claims 1-5.
