An audio and video freezing detection method and electronic device

By adaptively adjusting the reference rate in electronic devices and utilizing the fluctuation range of the first and second network rates to identify audio and video stuttering, the problem of inaccurate detection in existing technologies is solved, achieving higher detection accuracy and lower computational load.

CN120676134BActive Publication Date: 2026-05-19HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-03-12
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, electronic devices lack sufficient accuracy in detecting audio and video stuttering, resulting in an inability to adjust the network in a timely manner to avoid stuttering and affecting user experience.

Method used

By adaptively adjusting the baseline rate and using the first network rate as a benchmark, the fluctuation range of the second network rate is statistically analyzed to identify whether audio and video services are experiencing stuttering, thereby improving detection accuracy.

Benefits of technology

It improves the accuracy of stutter detection in audio and video scenarios, reduces computational load and power consumption, simplifies the implementation process, and is suitable for deployment in electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676134B_ABST
    Figure CN120676134B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of terminal, and particularly relate to an audio and video lag detection method and electronic equipment, which can improve the accuracy of lag detection. The method is applied to an electronic equipment connected to a network, and the method comprises: outputting data of an audio and video service; the audio and video service corresponds to a first preset rate and a second preset rate; the first preset rate is lower than the second preset rate; the audio and video service is lagged when the network rate of the electronic equipment is lower than the first preset rate; a first network rate of the electronic equipment in a first time period is counted; a second network rate of the electronic equipment in a second time period is counted; the second time period is a time period after the first time period; the audio and video service is identified as lagged when the second network rate is between the first preset rate and the second preset rate, and the second network rate decreases by more than a first threshold; wherein the decrease amount indicates the amplitude of the second network rate fluctuating downward compared with the first network rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to an audio / video stuttering detection method and electronic device. Background Technology

[0002] With the continuous development of network information technology, electronic devices can provide users with a variety of network audio and video services. Network audio and video services are services that transmit audio and / or video data in real time over the internet. Examples of network audio and video services include: live streaming services (watching or hosting live streams), audio services (making or receiving audio calls), video services (making or receiving video calls), and video conferencing services. Once connected to Wi-Fi or cellular networks, electronic devices have the capability to provide users with a variety of network audio and video services.

[0003] In conventional technologies, when electronic devices are performing network audio and video services, if playback stuttering is detected, they can switch networks in a timely manner to avoid stuttering and ensure smooth audio and video playback, providing users with a better viewing experience. However, the stuttering detection methods provided by conventional technologies have the problem of inaccurate detection. Summary of the Invention

[0004] This application provides an audio / video stuttering detection method and electronic device that can adaptively adjust the reference rate, which helps to improve the accuracy of stuttering detection.

[0005] Firstly, a method for detecting audio / video buffering is provided, applied to electronic devices connected to a network. The electronic device outputs audio / video service data, which corresponds to a first preset rate and a second preset rate. The first preset rate is lower than the second preset rate. When the network speed of the electronic device is lower than the first preset rate, the audio / video service data output is buffered. During the output of the audio / video service data, the electronic device calculates the first network speed within a first time period and the second network speed within a second time period. The first network speed reflects the network speed required for the audio / video service within the first time period and can therefore be used as a benchmark rate for determining whether the audio / video service is buffering. When the second network speed is between the first and second preset rates, and the decrease in the second network speed exceeds a first threshold (i.e., the downward fluctuation of the second network speed compared to the first network speed exceeds the first threshold), audio / video service buffering is identified.

[0006] Electronic devices can adaptively determine the real-time network speed (first network speed) in the current scenario as a baseline speed, and measure the fluctuation range of the network speed based on this baseline speed to accurately identify stuttering. This improves the coverage of stuttering tests in audio and video scenarios and helps to improve the accuracy of stuttering tests. Furthermore, it has low load, is simple to implement, and is easy to deploy in electronic devices.

[0007] In one possible implementation of the first aspect, the first network rate includes a first uplink rate and a first downlink rate, and the second network rate includes a second uplink rate and a second downlink rate. A first preset rate includes a first preset uplink rate and a first preset downlink rate, and a second preset rate includes a second preset uplink rate and a second preset downlink rate. A first threshold includes a second threshold and a third threshold. Audio / video service stuttering is identified when the second uplink rate is between the first and second preset uplink rates, the second downlink rate is between the first and second preset downlink rates, and a first decrease in the second uplink rate exceeds the second threshold and / or a second decrease in the second downlink rate exceeds the third threshold. The first decrease indicates the magnitude of the downward fluctuation of the second uplink rate compared to the first uplink rate; the second decrease indicates the magnitude of the downward fluctuation of the second downlink rate compared to the first downlink rate. Audio / video services require not only downloading data from the internet but also uploading data to the internet. Therefore, this application uses the first uplink rate as a benchmark to identify whether the fluctuation of the second uplink rate exceeds the second threshold. It also uses the first downlink rate as a benchmark to identify whether the fluctuation of the second downlink rate exceeds the third threshold. The electronic device can only identify a stutter when both the second downlink rate and the second uplink rate meet the conditions mentioned above, which can further improve the accuracy of stutter identification.

[0008] In one possible implementation of the first aspect, the first network rate is a first uplink rate, the second network rate is a second uplink rate, the first preset rate is a first preset uplink rate, and the second preset rate is a second preset uplink rate. Then, if the second uplink rate is between the first and second preset uplink rates, and the decrease in the second uplink rate exceeds a first threshold, the electronic device identifies that the audio / video service is experiencing stuttering. In this application, only the uplink rate can be used to identify whether stuttering occurs, which can improve identification efficiency, reduce identification time, reduce computational load, and thus help save power consumption.

[0009] In one possible implementation of the first aspect, the first network rate is a first downlink rate, the second network rate is a second downlink rate, the first preset rate is a first preset downlink rate, and the second preset rate is a second preset downlink rate. Then, if the second downlink rate falls between the first preset downlink rate and the second preset downlink rate, and the decrease in the second downlink rate exceeds a first threshold, the electronic device identifies that the audio / video service is experiencing stuttering. This application can use only the downlink rate to identify whether stuttering occurs, which can improve identification efficiency, reduce identification time, reduce computational load, and thus help save power consumption.

[0010] In one possible implementation of the first aspect, audio / video service stuttering is identified when the second uplink rate is lower than the first preset uplink rate and / or the second downlink rate is lower than the first preset downlink rate. When the second uplink rate is higher than the second preset uplink rate and the second downlink rate is higher than the second preset downlink rate, audio / video service stuttering is identified. In this application, if either the second uplink rate or the second downlink rate is lower than the corresponding preset rate, the electronic device identifies stuttering. If both the second uplink rate and the second downlink rate are higher than the corresponding preset rates, the electronic device identifies no stuttering. This implementation provides another possible implementation for electronic device stuttering identification.

[0011] In one possible implementation of the first aspect, if one of the second uplink rate and the second downlink rate is between a corresponding first preset rate and a corresponding second preset rate, and the other second rate is higher than the corresponding second preset rate, and the decrease in rate between the corresponding first preset rate and the second preset rate exceeds a corresponding threshold, then audio / video service stuttering is identified. In this application, when the second network rate includes a second uplink rate and a second downlink rate, there is a situation where one of the second uplink rate and the second downlink rate is between a corresponding first preset rate and a corresponding second preset rate, and the other rate is higher than the corresponding second preset rate. The electronic device can calculate the decrease in rate between the corresponding first preset rate and the second preset rate. When the decrease exceeds the corresponding threshold, the electronic device identifies stuttering. When the decrease does not exceed the corresponding threshold, the electronic device identifies no stuttering. This implementation provides another possible implementation for the electronic device to identify stuttering.

[0012] In one possible implementation of the first aspect, the electronic device stores a first mapping relationship and a second mapping relationship. The first mapping relationship includes a mapping relationship between multiple consecutive first uplink rate intervals and multiple second thresholds; the multiple consecutive first uplink rate intervals are obtained by dividing the uplink rate interval between a first preset uplink rate and a second preset uplink rate. The second mapping relationship includes a mapping relationship between multiple consecutive first downlink rate intervals and multiple third thresholds; the multiple consecutive first downlink rate intervals are obtained by dividing the downlink rate interval between a first preset downlink rate and a second preset downlink rate. After statistically analyzing the second network rate within a second time period, the electronic device can further determine the second threshold based on the first mapping relationship and the first uplink rate. The third threshold is then determined based on the second mapping relationship and the first downlink rate. This implementation provides a possible way for the electronic device to obtain the second and third thresholds. This application sets different drop thresholds for different rate intervals (first uplink rate intervals and first downlink rate intervals), and these different drop thresholds can be empirical values ​​or obtained through testing, which helps to improve accuracy.

[0013] In one possible implementation of the first aspect, the electronic device may first determine a first uplink rate interval to which the first uplink rate belongs based on a first uplink rate. Then, the electronic device determines a second threshold based on the first uplink rate interval and a first mapping relationship. The electronic device may first determine a first downlink rate interval to which the first downlink rate belongs based on a first downlink rate. Then, the electronic device determines a third threshold based on the first downlink rate interval and a second mapping relationship. This implementation provides a possible way for an electronic device to obtain the second and third thresholds based on a mapping relationship.

[0014] In one possible implementation of the first aspect, the multiple second thresholds corresponding to the multiple first uplink rate intervals are different, and the second thresholds increase sequentially as the rate increases. In this application, the lower the network rate, the smaller the allowed downward fluctuation range of the network rate (second threshold). The higher the network rate, the larger the allowed downward fluctuation range of the network rate (second threshold).

[0015] In one possible implementation of the first aspect, the multiple third thresholds corresponding to the multiple first downlink rate intervals are different, and the third thresholds increase sequentially as the rate increases. In this application, the lower the network rate, the smaller the allowed downward fluctuation range of the network rate (third threshold). The higher the network rate, the larger the allowed downward fluctuation range of the network rate (third threshold).

[0016] In one possible implementation of the first aspect, after the electronic device calculates the first network speed for a first time period, it can first identify whether the first network speed is between a first preset speed and a second preset speed. If the first network speed is between the first and second preset speeds, the electronic device calculates the second network speed for a second time period. If the first network speed is lower than the first preset speed, the electronic device identifies a lag, updates the connected network, and recalculates the first network speed until it falls between the first and second preset speeds, then calculates the second network speed. If the first network speed is higher than the second preset speed, the electronic device recalculates the first network speed until it falls between the first and second preset speeds, then calculates the second network speed. In other words, only when the first network speed is between the first and second preset speeds can it be used as the reference speed for judging lag in the second network speed.

[0017] In one possible implementation of the first aspect, the first network rate includes a first uplink rate and a first downlink rate. After the electronic device calculates the first network rate for a first time period, it can first identify whether the first uplink rate is between a first preset uplink rate and a second preset uplink rate, and whether the first downlink rate is between a first preset downlink rate and a second preset downlink rate. If the first uplink rate is between the first preset uplink rate and the second preset uplink rate, and the first downlink rate is between the first preset downlink rate and the second preset downlink rate, the electronic device calculates the second network rate for a second time period. If some or all of the first uplink rate and the first downlink rate are lower than the corresponding first preset rate, the electronic device updates the connected network and recalculates the first network rate until the first network rate is between the first preset rate and the second preset rate, and then calculates the second network rate. If some or all of the first uplink rate and the first downlink rate are higher than the corresponding second preset rate, the electronic device recalculates the first network rate until the first network rate is between the first preset rate and the second preset rate. In other words, the first uplink rate must be between the first preset uplink rate and the second preset uplink rate, and the first downlink rate must be between the first preset downlink rate and the second preset downlink rate. Only then can the first uplink rate be used as the reference rate for the second uplink rate to determine stuttering, and only then can the first downlink rate be used as the reference rate for the second downlink rate to determine stuttering.

[0018] In one possible implementation of the first aspect, after identifying audio / video service stuttering, the electronic device recalculates the first and second network rates when the time between the last time the first network rate was calculated and the current time is a preset duration. Stuttering detection is then performed based on the recalculated first and second network rates. In this application, the electronic device periodically calculates the first network rate, adaptively modifies the reference rate, and identifies stuttering using the new reference rate. It is capable of adaptively acquiring the first network rate under different resolutions and / or content, and identifying stuttering.

[0019] In one possible implementation of the first aspect, the second network speed of the mobile phone is periodically counted within a second time period over a preset duration. For each of the periodically counted second network speeds, if the second network speed decreases between a first preset speed and a second preset speed, and the decrease in the second network speed exceeds a first threshold, audio / video service stuttering is identified. In this application, the electronic device can set an effective duration (preset duration) for the first network speed, and within the effective duration, the second network speed is counted multiple times, and stuttering is identified based on the first network speed.

[0020] In one possible implementation of the first aspect, the electronic device can execute the stuttering detection method provided in this application embodiment after recognizing that it is performing audio / video services. The electronic device can identify whether it is performing audio / video services by recognizing the current interface and / or hardware such as camera, microphone, and speaker usage.

[0021] In a second aspect, this application provides an electronic device comprising: a memory, a communication module, and one or more processors; the communication module receiving and transmitting data under the control of the processor to enable communication between the electronic device and other electronic devices; the memory, the display screen, and the processor are coupled; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any of the first aspects.

[0022] Thirdly, this application provides a chip system applicable to electronic devices including memory. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines. The interface circuits are used to receive signals from the aforementioned memory and send the signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any of its possible design embodiments.

[0023] Fourthly, this application provides a computer-readable storage medium including computer instructions. When the computer instructions are executed on an electronic device, they cause the electronic device to perform the method as described in the first aspect and any of its possible design embodiments.

[0024] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method as described in the first aspect and any of its possible design methods.

[0025] Understandably, the beneficial effects that can be achieved by the electronic device of any possible design of the second aspect, the chip system of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can be referred to as the beneficial effects of the first aspect and any possible design, which will not be repeated here. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0027] Figure 2 A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;

[0028] Figure 3 A flowchart illustrating an audio / video stuttering detection method provided in an embodiment of this application;

[0029] Figure 4 A schematic diagram of an audio / video service interface provided in an embodiment of this application;

[0030] Figure 5 A schematic diagram of an interface for another audio / video service provided in an embodiment of this application;

[0031] Figure 6 This is a schematic diagram of a first time period and a second time period provided in an embodiment of this application. Detailed Implementation

[0032] With the continuous development of network information technology, electronic devices can provide users with a variety of network audio and video services. These services may include, for example, live streaming services (watching or hosting live streams), audio services (making or receiving audio calls), video services (making or receiving video calls), and video conferencing services. Network audio and video services are services that transmit audio and / or video data in real time over the internet. For instance, electronic devices, after connecting to Wi-Fi or a cellular network, have the capability to provide users with network audio and video services.

[0033] Electronic devices may experience stuttering or buffering when performing network audio and video services. Stuttering refers to instances where the displayed video feed freezes, displays glitches, or experiences choppy playback, or where audio data is played haltingly. The causes of stuttering are related to the content of the video data, the parameters of the audio data and / or video data (such as resolution and sound effects), and network quality.

[0034] In conventional technologies, when an electronic device detects playback stuttering, it can promptly switch the network it is currently connected to, providing a better user experience. For example, if an electronic device is conducting a video call over a cellular network and detects stuttering, it can switch to a Wi-Fi network to continue the video call and avoid stuttering. Alternatively, the electronic device can change its network standard, such as switching from a 5G network to a 4G network. Or, the electronic device can switch the base station it is currently connected to.

[0035] Existing methods for detecting playback stuttering are computationally expensive, have low accuracy, and are complex to implement, making them unsuitable for deployment in electronic devices. Below, we present examples of several common detection methods, using video stuttering detection as an example.

[0036] In some embodiments, the electronic device can analyze the differences in image information between two adjacent video frames frame by frame. If the difference in image information between two frames is greater than a threshold, it is considered that a stutter has occurred. If the difference in image information between two frames is less than the threshold, it is considered that no stutter has occurred. The image information can include the position of a person or object in the frame, the proportion of the person or object in the frame, and the time when the person or object appears in the frame. Frame-by-frame analysis has a high recognition accuracy, but it is extremely computationally expensive.

[0037] In other embodiments, the electronic device can analyze whether stuttering has occurred based on the timing information of the decoder or encoder calls made by the electronic device. For example, when a user is watching a live stream, the electronic device can receive video frames sent from the internet and call a decoder to decode the video frames. The electronic device can obtain the timing information of two consecutive decoder calls and, based on this timing information, determine the duration of processing a single video frame. The electronic device can then determine whether stuttering has occurred while processing this video frame based on this duration. For example, if the duration exceeds a threshold, stuttering is considered to have occurred. This detection method has a high load and is complex to implement. Furthermore, since different audio and video applications use different decoders, and different encoders have different processing times, this method has low accuracy and is not suitable for deployment in electronic devices.

[0038] In other embodiments, the electronic device can determine whether video playback stuttering has occurred based on network speed. For example, if the current network speed of the electronic device is lower than the minimum required speed, stuttering is considered to have occurred. However, the minimum required speed for audio and video playback is related to the content and / or resolution of the audio and video. For example, resolution includes high definition, standard definition, and smooth playback. High definition requires a higher minimum speed than standard definition, which in turn requires a higher minimum speed than smooth playback. Content may include, for example, game videos and chat videos. Game live streams require a higher minimum speed than chat live streams. Especially in live streaming scenarios, users can switch the video resolution or content at any time. That is, in audio and video services, the minimum required speed for playback changes in real time with changes in resolution and content; that is, the minimum requirements differ even in the same scenario, and the differences can be significant. However, since electronic devices currently cannot obtain information such as audio and video resolution and / or content, they cannot obtain the corresponding minimum speed requirements. Therefore, this stuttering detection method typically uses a preset minimum speed requirement compared with the current network speed to determine whether stuttering has occurred.

[0039] Using this minimum speed requirement to detect buffering issues has problems with inaccurate identification and inability to accurately detect buffering in real time. For example, taking watching live streaming services as an example, a phone's built-in minimum speed requirement is 5Mbps. If a user is watching a high-definition video and their required minimum speed requirement is 25Mbps, and the current network speed is 10Mbps, the current network speed is insufficient to meet the data transmission demand, and the electronic device is actually experiencing buffering, but the device itself cannot detect the buffering. As another example, if a phone's built-in minimum speed requirement is 50Mbps, and a user is watching a high-definition video and their required minimum speed requirement is 25Mbps, and the current network speed is 35Mbps, playback will be smooth, but the phone will still detect buffering. Similarly, the minimum speed requirement varies depending on the resolution of the audio data. For example, audio data resolution can be standard, very high, lossless, etc., with the corresponding minimum requirements increasing accordingly. Using a similar method to detect audio buffering also suffers from similar problems.

[0040] Therefore, this application provides an audio / video stuttering detection method applicable to network-connected electronic devices, which can adaptively detect stuttering. Specifically, during the output of audio / video service data, since the clarity and / or content of the audio / video service varies, the electronic device can use a first network rate within a first time period as a benchmark threshold to calculate the downward fluctuation of a second network rate within a second time period. Since the first network rate reflects the network rate required for the current audio / video service, it can be used as the minimum network requirement for determining whether the audio / video service is stuttering. When the downward fluctuation of the second network rate exceeds a preset threshold, the electronic device detects stuttering. In this way, the electronic device can adaptively determine the benchmark rate (first network rate) and accurately identify stuttering based on the fluctuation of the second network rate relative to the benchmark rate, improving stuttering test coverage in audio / video scenarios and contributing to improved stuttering test accuracy. Furthermore, it has low load, is simple to implement, and is well-suited for deployment in electronic devices.

[0041] The method provided in this application can be applied to electronic devices with data processing capabilities and a display screen. These electronic devices may include mobile phones, tablets, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, smart home devices (e.g., smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (e.g., smartwatches, smart bracelets, etc.), in-vehicle devices, virtual reality devices, etc., and this application does not impose any limitations on these. In this application, the aforementioned electronic device is an electronic device capable of running an operating system and installing applications. Optionally, the operating system running on the electronic device may be... system, system, Systems, etc.

[0042] For example, please refer to Figure 1 The diagram illustrates the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an audio module 130, a speaker 130A, a microphone 130B, a display screen 140, a communication module 150, a power module 160, an input device 170, a sensor module 180, a camera 190, etc. The sensor module 180 may include a pressure sensor, a touch sensor, etc.

[0043] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0044] Processor 110 may include one or more processing units. For example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, electronic device 100 may also include one or more processors 110.

[0045] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0046] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0047] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the aforementioned instructions stored in internal memory 121, thereby causing electronic device 100 to perform the application running methods, various applications, and data management, etc., provided in some embodiments of this application. In some embodiments, processor 110 can execute instructions stored in internal memory 121 and / or instructions stored in memory disposed in processor 110 to cause electronic device 100 to perform the audio / video stuttering detection method provided in the embodiments of this application.

[0048] Electronic device 100 can implement audio functions through audio module 130, speaker 130A, microphone 130B, and application processor, such as music playback and recording. Speaker 130A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals.

[0049] Microphone 130B, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. Users can speak by bringing their mouth close to microphone 130B, inputting sound signals into microphone 130B.

[0050] The communication function of electronic device 100 can be realized through antenna 1, antenna 2 and communication module 150, etc.

[0051] Communication module 150 can provide solutions for wireless communication applications on electronic device 100, including cellular, Wi-Fi, Bluetooth (BT), and wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz). Communication module 150 can be one or more devices integrating at least one communication processing module. Communication module 150 receives electromagnetic waves via antenna 1 or antenna 2, filters and frequency-modulates the electromagnetic wave signals, and sends the processed signal to processor 110. Communication module 150 can also receive signals to be transmitted from processor 110, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 1 or antenna 2.

[0052] Electronic device 100 implements display functions through a GPU, display screen 140, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0053] The display screen 140 is used to display images, videos, etc. The display screen 140 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 140, where N is a positive integer greater than 1. In this embodiment, the display screen 140 can be used to display a user interface (UI) and receive user actions on the UI.

[0054] The power module 160 can be used to supply power to the various components included in the electronic device 100. In some embodiments, the power module 160 can be a battery, such as a rechargeable battery.

[0055] The input device 170 may include a keyboard, a mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc. into the electronic device 100, thereby issuing commands to the electronic device 100 and inputting data.

[0056] Electronic device 100 can implement shooting functions through an ISP, camera 190, video codec, GPU, display 140, and application processor. The ISP processes data fed back by the camera 190. The camera 190 captures still images or videos. In some embodiments, electronic device 100 may include one or N cameras 190, where N is a positive integer greater than 1. The digital signal processor processes digital signals, including digital image signals and other digital signals. For example, when electronic device 100 selects a frequency, the digital signal processor performs Fourier transforms on the frequency energy. The video codec compresses or decompresses digital video.

[0057] Taking the aforementioned electronic device 100 as an example, which is a mobile phone, the software system of the electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of the electronic device 100. This software structure is as follows... Figure 2 As shown.

[0058] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into six layers, from top to bottom: application layer, application framework layer, system library layer, and kernel layer.

[0059] The application layer can include a series of application packages.

[0060] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and social networking.

[0061] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 2 As shown, the application framework layer may include a content provider, a view system, a resource manager, a notification manager, an input system, a rate statistics module, a stuttering detection module, etc.

[0062] The input system is used to monitor the phone's input modules (such as touchscreen drivers) and convert the parameters input by the input modules into usable events, which are then passed to the relevant upper-layer modules. For example, the input system is used to monitor the phone's touchscreen through the touchscreen driver and convert the touch parameters generated by the touchscreen input into usable events, which are then passed to the upper-layer APP.

[0063] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0064] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build the display interface of an application.

[0065] The rate statistics module is used to calculate the first network rate within a first time period while the mobile phone is running audio and video services. The first network rate can include a first uplink rate, a first downlink rate, or both. For example, the rate statistics module can obtain the uplink rate for each second within the first time period from the communication module and calculate the rate for that first time period, which is the first uplink rate. Similarly, the rate statistics module can obtain the downlink rate for each second within the first time period from the communication module and calculate the rate for that first time period, which is the first downlink rate.

[0066] The rate statistics module can also count the second network rate within a second time period. The second network rate can be a second uplink rate, a second downlink rate, or both. For example, the rate statistics module can obtain the uplink rate for each second within the second time period from the communication module and count the rate for that second time period; this rate is the second uplink rate. Similarly, the rate statistics module can obtain the downlink rate for each second within the second time period from the communication module and count the rate for that second time period; this rate is the second downlink rate.

[0067] The communication module can be a hardware module used to control the reception and transmission of audio and video data.

[0068] The stuttering identification module is used to identify stuttering based on a first network speed within a first time period and a second network speed within a second time period.

[0069] The notification manager allows applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short time without user interaction.

[0070] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that Java calls, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0071] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0072] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0073] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0074] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0075] A 2D graphics engine is a graphics engine for 2D drawing.

[0076] The kernel layer can include touchscreen drivers, display drivers, sensor drivers, and audio drivers, etc.

[0077] The following uses a mobile phone as an example to illustrate an audio / video stuttering detection method and electronic device provided in this application, along with accompanying drawings.

[0078] Figure 3 This is a flowchart illustrating an audio / video stuttering detection method provided in an embodiment of this application. Figure 3 As shown, the method may include:

[0079] S301: The mobile phone connects to the network, performs audio and video services, and outputs audio and video service data.

[0080] The network can be a Wi-Fi network or a cellular network (also known as a mobile network).

[0081] Audio and video services are those highly sensitive to real-time network speeds, such as online audio and video services requiring a continuous network connection. Audio and video services can include audio services, video services, and live streaming services. Audio services can include making or receiving audio calls. Video services can include making or receiving video calls and web conferencing. Live streaming services can include watching or hosting live streams. The data for audio and video services can be audio data and / or video data. For example, audio service data can be audio data, and video service data can be both audio and video data. Specifically, mobile phone audio data output includes audio data output from the phone's speaker or audio data output through headphones, speakers, or other devices. Mobile phone video data output includes video data output from the phone's display screen or video data output through an extended screen.

[0082] The mobile phone has audio and video software installed, which may include a user interface (UI). Users can operate on the UI to trigger the phone to execute audio and video services and output audio and video data. This audio and video software could be, for example, a live streaming application. This audio and video software can also be, for example, various instant messaging software, such as...

[0083] For example, such as Figure 4 As shown, in an audio call scenario, when mobile phone A initiates a voice call to mobile phone B, mobile phone A can display a voice call interface 401, which includes information about the audio call recipient, a cancel button, a microphone switch, and a speaker switch. Mobile phone B can display a voice call interface 402, which includes an answer button, a hang-up button, and information about the audio call initiator. In response to the user clicking the answer button on mobile phone B's interface 402, mobile phone B establishes an audio call connection with mobile phone A. After the audio call connection is successfully established, mobile phone A begins to perform the audio call service, also known as making an audio call. Of course, mobile phone B can also begin to perform the audio call service and output audio data, also known as answering an audio call. In this embodiment, the mobile phones in S301 can include mobile phone A, mobile phone B, or both mobile phone A and mobile phone B. That is, both devices in the audio call can use the scheme in this embodiment to perform stuttering detection.

[0084] In a video call scenario, when mobile phone A initiates a video call to mobile phone B, mobile phone A can display a video call interface 403, which includes information about the video call recipient, a cancel button, a camera on / off switch, and a camera switching switch. Mobile phone B can display a video call interface 404, which includes information about the video call initiator, an answer button, a hang-up button, a camera on / off switch, and a camera switching switch. In response to the user clicking the answer button on mobile phone B's interface 404, mobile phone B establishes a video call connection with mobile phone A. After the video call connection is successfully established, mobile phone A begins to perform the video call service and output audio and video data, also known as making a video call. Of course, mobile phone B can also perform the video call service and output audio and video data, also known as answering a video call. The mobile phones in this embodiment can include mobile phone A, mobile phone B, or both mobile phone A and mobile phone B. That is, both devices in the video call can use the solution in this embodiment to perform stuttering detection.

[0085] like Figure 5 As shown, in a live streaming service scenario, for example, when watching a live stream, the mobile phone can display a main interface, which may include an application icon for the live streaming app. In response to the user clicking the application icon, the mobile phone displays either live streaming interface 501 or live streaming interface 502, and the mobile phone begins the live streaming viewing service and outputs audio and video data. For example, in a live streaming service scenario, the mobile phone can display a live streaming interface 505. Specifically, the mobile phone can display the live streaming app's creation interface 503, which includes a "Start Live Stream" button 504. In response to the user clicking the "Start Live Stream" button 504, the mobile phone can display the "Start Live Stream" interface 505, and the mobile phone begins the live streaming service and outputs audio and video data.

[0086] Audio and video services are highly sensitive to network speed. High network speeds result in smooth playback, while low network speeds may cause buffering or stuttering. Therefore, in this embodiment, the mobile phone can identify whether buffering is occurring based on network speed. Network speed includes downlink speed and uplink speed. Downlink speed refers to the rate at which the mobile phone downloads data from the network, and uplink speed refers to the rate at which the mobile phone uploads data to the network. The units for both uplink and downlink speeds can be megabits per second (Mbps). For example, while the mobile phone is performing an audio or video service, it can continue executing step S302.

[0087] S302, the mobile phone statistics the first network speed within the first time period.

[0088] The first network rate may include a first uplink rate, a first downlink rate, and a first uplink rate and a first downlink rate. The following example, using a first network rate comprising a first uplink rate and a first downlink rate, illustrates this scheme.

[0089] Optionally, S302 can also be: after the mobile phone recognizes that it is performing audio and video services, it counts the first network speed within the first time period.

[0090] When a mobile phone performs audio or video services, it can display a corresponding interface and / or utilize corresponding hardware such as the camera, microphone, and speaker. Therefore, a mobile phone can identify whether it is performing an audio or video service by recognizing the current interface and / or hardware usage (such as camera, microphone, and speaker). For example, when a mobile phone performs an audio call, the displayed interface is as follows: Figure 4 If the phone displays interface 401 or 402 and the microphone is activated, then the phone can recognize that an audio call is currently in progress when it detects interface 401 or 402 and that the microphone is on. When the phone is making a video call, it displays the following: Figure 4 If the phone detects interface 403 or 404 and the microphone and camera are both on, then the phone can recognize that a video call is currently in progress. When watching live streams, the phone displays an interface like this: Figure 5 If the phone displays interface 501 or 502 and the speaker is on, then the phone can recognize that it is currently watching a live stream. If the phone displays interface 505 and the microphone and / or camera are on while watching a live stream, then the phone can recognize that it is currently watching a live stream.

[0091] It should be noted that the interfaces of different audio and video software that provide the above-mentioned audio and video services may vary. When implementing the solution of this application, the specific interface identified is not limited to the interface shown in the above example. The above interface is only an example.

[0092] In practical implementation, the mobile phone can identify whether the currently displayed interface is for an audio / video service based on the activity running on the phone. The activity contains the user-visible interface used for user interaction. When an activity is running, its contained interface is displayed on the current screen. The mobile phone can identify whether the currently running activity is the interface corresponding to the audio / video service through its identifier. For example, this identifier can be carried in the activity's attribute information.

[0093] The mobile phone can store a whitelist containing preset identifiers for audio and video services. This whitelist includes at least one preset identifier for an audio or video service. The mobile phone can obtain identifier 1 from the attribute information of the currently running activity. Then, if the mobile phone recognizes that identifier 1 is included in the whitelist, it recognizes that it is currently performing an audio or video service. Furthermore, the mobile phone pre-stores a mapping relationship between preset identifiers and audio / video services. For example, the preset identifier for an audio call service could be 1, for a video call service could be 2, for a video conferencing service could be 3, for watching a live stream could be 4, and for starting a live stream could be 5, etc. Based on the obtained preset identifiers and the pre-stored mapping relationship, the mobile phone identifies the specific audio or video service it is currently performing. Different audio and video services correspond to different first and second preset rates. After identifying the specific audio or video service being performed, the mobile phone can obtain the first and second preset rates corresponding to that service. If the identifier 1 of the currently running activity is not included in the whitelist, the mobile phone recognizes that it is not performing an audio or video service.

[0094] The specific duration of the first time period can be M seconds, where M is an integer greater than or equal to 1. After recognizing that the phone is performing an audio / video service, the phone can begin to calculate the first network speed within M seconds. Alternatively, the phone can begin calculating the first network speed within M seconds only after performing the audio / video service for a certain period of time. This application embodiment does not impose specific limitations on this.

[0095] For example, a mobile phone can acquire the uplink rate and downlink rate every second. Then, the phone can determine a first uplink rate based on M uplink rates. For instance, averaging the M uplink rates yields the first uplink rate within M seconds. Alternatively, taking the mode of the M uplink rates also yields the first uplink rate within M seconds. Similarly, the phone can determine a first downlink rate based on M downlink rates. For instance, averaging the M downlink rates yields the first downlink rate within M seconds. Alternatively, taking the mode of the M downlink rates also yields the first downlink rate within M seconds. Where M equals 1, the first uplink rate within the first time period can be the uplink rate of that one second, and the first downlink rate within the first time period can be the downlink rate of that one second.

[0096] The first network speed reflects the network speed required for audio and video services within a first time period and can be used as the minimum speed requirement to determine whether the current audio and video service is experiencing buffering. Specifically, the first uplink speed reflects the minimum uplink speed required for audio and video services within the first time period. The first downlink speed reflects the minimum downlink speed required for audio and video services within the first time period. Optionally, after obtaining the first network speed, the mobile phone can further execute S303.

[0097] S303, the mobile phone identifies whether the first network speed is between the first preset speed and the second preset speed.

[0098] Audio and video services have a first preset rate and a second preset rate. The first preset rate is lower than the second preset rate. When performing audio and video services, if the mobile phone's network speed is lower than the first preset rate, the audio and video services will experience buffering.

[0099] Furthermore, the first preset rate may include a first preset uplink rate and / or a first preset downlink rate. The second preset rate may include a second preset uplink rate and / or a second preset downlink rate. For example, the first preset rate may be a minimum rate, and the second preset rate may be an optimal rate. The first preset uplink rate may be a minimum uplink rate, and the first preset downlink rate may be a minimum downlink rate. The second preset uplink rate may be an optimal uplink rate, and the second preset downlink rate may be an optimal downlink rate. The first uplink rate and the second uplink rate constitute an uplink rate range, and the first downlink rate and the second downlink rate constitute a downlink rate range.

[0100] The minimum download speed can be the minimum download speed required for this audio / video service, while the optimal download speed can be the maximum download speed required for this multimedia service. Similarly, the minimum upload speed can be the minimum upload speed required for this multimedia service, while the optimal upload speed can be the maximum upload speed required for this multimedia service.

[0101] The first and second preset rates can be pre-configured in the phone. The first preset rate, such as the first and second preset uplink rates, and the second preset rate, such as the first and second preset downlink rates, can be empirical values. Optionally, the first and second preset rates can be obtained through testing. An example of a possible testing method is given below.

[0102] For example, in audio and video call scenarios, the mobile phone can continuously reduce its current uplink speed until a stutter occurs, and the uplink speed at which the stutter occurs is taken as the first preset uplink speed. Similarly, the mobile phone can continuously reduce its downlink speed until a stutter occurs, and the downlink speed at which the stutter occurs is taken as the first preset downlink speed. The second preset uplink speed and the second preset downlink speed can be preset maximum values; at the second preset uplink speed and the second preset downlink speed, the mobile phone will not experience stuttering.

[0103] Taking live streaming as an example, different video content and different resolutions require different network speeds. Therefore, a mobile phone can determine the first preset uplink and downlink speeds for different resolutions, different video content, and various combinations of different resolutions and video content by reducing the network speed until buffering occurs. Examples of these combinations include high-definition (HD) live streaming of games, standard-definition (SD) live streaming of games, smooth live streaming of games, HD live streaming of chat programs, SD live streaming of chat programs, and smooth live streaming of chat programs. The phone then uses the lowest value among these first preset downlink speeds as the first preset downlink speed for watching the live stream, and the lowest value among these first preset uplink speeds as the first preset uplink speed for watching the live stream. The second preset uplink and downlink speeds can be preset maximum values. At these second preset uplink and downlink speeds, regardless of whether the video content is a game live stream or a chat live stream, and regardless of whether the resolution is HD, SD, or smooth, the phone will not experience buffering.

[0104] For the same audio / video service, the corresponding first preset uplink rate and first preset downlink rate can be the same or different, and the second preset uplink rate and second preset downlink rate can also be the same or different. Specifically, services such as audio calls, video calls, and video conferencing not only need to upload the user's audio / video data to the internet but also need to download the other end's audio / video data from the internet in real time to ensure the normal operation of the call service. That is, neither party in the call should experience any buffering. Therefore, the first preset uplink rate and first preset downlink rate for the above services can be the same, and the second preset uplink rate and second preset downlink rate can also be the same. For example, the uplink rate range for an audio call service can be 10Mbps-500Mbps, where 10Mbps is the first preset uplink rate and 500Mbps is the second preset uplink rate; the downlink rate range can also be 10Mbps-500Mbps, where 10Mbps is the first preset downlink rate and 500Mbps is the second preset downlink rate. However, live streaming services require uploading audio / video data to the internet in real time, therefore their corresponding uplink rate is higher, and the downlink rate can be lower. For example, the second preset uplink speed for watching live streaming services is relatively high, and the first preset uplink speed is also relatively high. Watching live streaming services requires real-time downloading of audio and video data from the internet; therefore, its corresponding downlink speed is relatively high, although it can be relatively low. For example, the second preset downlink speed for watching live streaming services is relatively high, and the first preset downlink speed is also relatively high.

[0105] As mentioned earlier, audio and video services can be any of the following: audio call services, video call services, live streaming services, or watching live streaming services. Each audio and video service includes a corresponding uplink rate range and a downlink rate range. Different audio and video services may have the same or different uplink rate ranges. Specifically, different audio and video services may have the same or different first preset uplink rates, and different audio and video services may have the same or different second preset uplink rates. Similarly, different audio and video services may have the same or different downlink rate ranges. Specifically, different audio and video services may have the same or different first preset downlink rates, and different audio and video services may have the same or different second preset downlink rates.

[0106] For example, Table 1 shows the uplink rate range and downlink rate range corresponding to different audio and video services.

[0107] Table 1

[0108]

[0109] Specifically, after recognizing the audio / video service being executed and calculating the first network speed, such as the first uplink speed and the first downlink speed, the mobile phone can determine whether the first uplink speed is between the first preset uplink speed and the second preset uplink speed corresponding to the currently executed audio / video service, and whether the first downlink speed is between the first preset downlink speed and the second preset downlink speed corresponding to the currently executed audio / video service. If the first uplink speed is between the first preset uplink speed and the second preset uplink speed, and the first downlink speed is between the first preset downlink speed and the second preset downlink speed, then the mobile phone can execute S304. If the first uplink speed is not between the first preset uplink speed and the second preset uplink speed, and / or the first downlink speed is not between the first preset downlink speed and the second preset downlink speed, then the mobile phone can re-execute S302 and S303 until the first downlink speed is between the first preset downlink speed and the second preset downlink speed, and only then will the mobile phone execute S304.

[0110] The situation where the first uplink rate is not between the first preset uplink rate and the second preset uplink rate, and / or the first downlink rate is not between the first preset downlink rate and the second preset downlink rate, includes: any one or both of the first uplink rate and the second uplink rate are not between the corresponding first preset rate and the second preset rate. For example, both the first uplink rate and the first downlink rate are lower than the first preset rate. Another example is that both the first uplink rate and the first downlink rate are higher than the second preset rate. Yet another example is that, of the first uplink rate and the second uplink rate, one rate is between the corresponding first preset rate and the second preset rate, and the other rate is lower than the corresponding first preset rate. Yet another example is that, of the first uplink rate and the second uplink rate, one rate is between the corresponding first preset rate and the second preset rate, and the other rate is higher than the corresponding second preset rate.

[0111] If some or all of the first uplink and first downlink speeds are lower than the first preset speed, the phone can switch the currently connected network and re-execute S302 and S303. If some or all of the first uplink and first downlink speeds are higher than the second preset speed, the phone can directly re-execute S302 and S303.

[0112] Optionally, the first network speed can be a first uplink speed, a first preset speed can be a first preset uplink speed, and a second preset speed can be a second preset uplink speed. Specifically, S303 can be: the phone identifies whether the first uplink speed is between the first preset uplink speed and the second preset uplink speed. If the first uplink speed is between the first preset uplink speed and the second preset speed, the phone can execute S304. If the first uplink speed is not between the first preset uplink speed and the second preset uplink speed, the phone can re-execute S302 and S303 until the first uplink speed falls between the first preset uplink speed and the second preset uplink speed, at which point the phone executes S304. The first uplink speed not falling between the first preset uplink speed and the second preset uplink speed includes: the first uplink speed being lower than the first preset uplink speed, and the first uplink speed being higher than the second preset uplink speed. If the first uplink speed is lower than the first preset uplink speed, the phone can update the connected network and re-execute S302 and S303 until the first uplink speed falls between the first preset uplink speed and the second preset uplink speed, at which point S304 is executed. If the first uplink rate is higher than the second preset uplink rate, the mobile phone may not update the connected network. The mobile phone may directly re-execute S302 and S303 until the first uplink rate is between the first preset uplink rate and the second preset uplink rate, and then execute S304.

[0113] Optionally, the first network speed can be a first downlink speed, the first preset speed can be a first preset uplink speed, and the second preset speed can be a second preset downlink speed. Specifically, S303 can be: the phone identifies whether the first downlink speed is between the first preset downlink speed and the second preset downlink speed. If the first downlink speed is between the first preset downlink speed and the second preset downlink speed, the phone can execute S304. If the first downlink speed is not between the first preset downlink speed and the second preset downlink speed, the phone can re-execute S302 and S303 until the first downlink speed falls between the first preset downlink speed and the second preset downlink speed, at which point the phone executes S304. The situation where the first downlink speed is not between the first preset downlink speed and the second preset downlink speed includes: the first downlink speed is lower than the first preset downlink speed, and the first downlink speed is higher than the second preset downlink speed. If the first downlink speed is lower than the first preset downlink speed, the phone can update the connected network and re-execute S302 and S303 until the first downlink speed falls between the first preset downlink speed and the second preset downlink speed, at which point S304 is executed. If the first downlink rate is higher than the second preset downlink rate, the mobile phone may not update the connected network. The mobile phone may directly re-execute S302 and S303 until the first downlink rate is between the first preset downlink rate and the second preset downlink rate, and then execute S304.

[0114] S304, when the first network speed is between the first preset speed and the second preset speed, the mobile phone counts the second network speed within the second time period.

[0115] The second network rate can include a second uplink rate, a second downlink rate, or both. The following example, using the second network rate including both uplink and downlink rates, illustrates this scheme.

[0116] The second time period can be the time period following the first time period. The second time period and the first time period can be consecutive. For example, such as... Figure 6 As shown in 'a', the first time period can be from the 1st second to the 15th second, and the second time period can be from the 16th second to the 18th second. Alternatively, the second time period and the first time period can be discontinuous. For example, the first time period can be from the 1st second to the 15th second, and the second time period can be from the 19th second to the 22nd second. This application does not impose specific limitations on this.

[0117] The specific duration of the second time period can be N seconds, where N is an integer greater than or equal to 1. The duration of the second time period can be the same as or different from that of the first time period. For example, N and M are both 10. Or, N is 20 and M is 10. Optionally, M is greater than N. For example, N is 5 and M is 30. Optionally, N and M are both 1.

[0118] For example, a mobile phone can acquire the uplink rate and downlink rate every second. Then, the phone can determine a second uplink rate based on N uplink rates. For instance, averaging the N uplink rates yields the second uplink rate over N seconds. Alternatively, taking the mode of the N uplink rates also yields the second uplink rate over N seconds. Similarly, the phone can determine a second downlink rate based on N downlink rates. Averaging the N downlink rates yields the second downlink rate over N seconds. Alternatively, taking the mode of the N downlink rates also yields the second downlink rate over N seconds. When N equals 1, the second uplink rate for the second time period can be the uplink rate of this one second, and the second downlink rate for the second time period can be the downlink rate of this one second.

[0119] After determining the second network speed, the phone can continue to identify whether there is lag based on the second network speed, the first network speed, the first preset speed, and the second preset speed. For example, the phone can continue to execute S305.

[0120] S305, the mobile phone identifies whether the second network speed is between the first preset speed and the second preset speed.

[0121] Specifically, the mobile phone identifies whether the second uplink rate is between the first preset uplink rate and the second preset uplink rate, and whether the second downlink rate is between the first preset downlink rate and the second preset downlink rate. If the second uplink rate is between the first preset uplink rate and the second preset uplink rate, and the second downlink rate is between the first preset downlink rate and the second preset downlink rate, the mobile phone can execute S306.

[0122] Optionally, the second network rate can be a second uplink rate, then S305 can specifically be: the mobile phone identifies whether the second uplink rate is between the first preset uplink rate and the second preset uplink rate. If the second uplink rate is between the first preset uplink rate and the second preset uplink rate, the mobile phone can execute S306.

[0123] Optionally, the second network rate can be a second downlink rate, then S305 can specifically be: the mobile phone identifies whether the second downlink rate is between the first preset downlink rate and the first preset downlink rate. If the second downlink rate is between the first preset downlink rate and the first preset downlink rate, the mobile phone can execute S306.

[0124] S306, if the second network speed is between the first preset speed and the second preset speed, the mobile phone calculates the decrease in the second network speed.

[0125] Specifically, if the second uplink rate is between the first preset uplink rate and the second preset uplink rate, and the second downlink rate is between the first preset downlink rate and the second preset downlink rate, the mobile phone calculates the first decrease in the second uplink rate and the second decrease in the second downlink rate.

[0126] The first descent can be equal to the difference between the second upward rate and the first upward rate. The second descent can be equal to the difference between the second downward rate and the first downward rate. That is, using the first upward rate M seconds ago as the baseline rate, calculate the downward fluctuation of the second upward rate relative to the baseline rate within N seconds. Similarly, using the first downward rate M seconds ago as the baseline rate, calculate the downward fluctuation of the second downward rate relative to the baseline rate within N seconds.

[0127] Optionally, the first decrease can be a ratio, for example, the first decrease can be the ratio of the difference between the second downlink rate and the first downlink rate to the first downlink rate. The second decrease can also be a ratio, for example, the second decrease can be the ratio of the difference between the second uplink rate and the first uplink rate to the first uplink rate. The downward fluctuation of the second uplink rate and / or the second downlink rate may be caused by network instability, network congestion, etc., and this application embodiment does not specifically limit this.

[0128] Optionally, the second network rate can be a second uplink rate. Specifically, S306 can be: if the second uplink rate is between a first preset uplink rate and a second preset uplink rate, the mobile phone calculates the decrease in the second uplink rate. The decrease in the second uplink rate can be the first decrease mentioned above, which will not be elaborated further here.

[0129] Optionally, the second network rate can be a second downlink rate. Specifically, S306 can be: if the second downlink rate is between a first preset downlink rate and a first preset downlink rate, the mobile phone calculates the decrease in the second downlink rate. The decrease in the second downlink rate can be the aforementioned second decrease amount, which will not be elaborated upon here.

[0130] The phone then compares the drop in latency with a threshold to identify lag. Specifically, the phone can continue executing S307.

[0131] S307 identifies audio / video service stuttering when the decrease in the second network rate exceeds the first threshold.

[0132] The first threshold may include a second threshold and a third threshold. Specifically, S306 may be: identifying audio / video service stuttering when the first drop in the second uplink rate exceeds the second threshold and / or the second drop in the second downlink rate exceeds the third threshold.

[0133] Specifically, if the first decrease in speed is greater than or equal to the second threshold and the second decrease in speed is greater than or equal to the third threshold, it indicates that the decrease in the second downlink rate is higher than a preset value and the decrease in the second uplink rate is higher than a preset value, and the phone recognizes that a stutter has occurred. Alternatively, if the first decrease in speed is greater than or equal to the second threshold and the second decrease in speed is less than the third threshold, it indicates that the decrease in the second downlink rate is higher than a preset value, and the phone recognizes that a stutter has occurred. Or, if the first decrease in speed is less than the second threshold and the second decrease in speed is greater than or equal to the third threshold, it indicates that the decrease in the second uplink rate is higher than a preset value, and the phone recognizes that a stutter has occurred. In other words, if either the first decrease in speed or the second decrease in speed is greater than or equal to its corresponding threshold, the phone recognizes a stutter.

[0134] The second threshold is a preset threshold for the decrease in uplink speed. The third threshold is a preset threshold for the decrease in downlink speed. The second and third thresholds can be pre-configured in the mobile phone. The second and third thresholds can be specific preset values. They can also be fixed values ​​configured in the mobile phone. For example, the second threshold could be 30Mbps and the third threshold could be 50Mbps. Alternatively, the second threshold could be 5% and the third threshold could be 10%. The second and third thresholds for the same audio / video service can be the same or different. The second thresholds for different audio / video services can be the same or different, and the third thresholds for different audio / video services can be the same or different.

[0135] Optionally, the second and third thresholds are variable. For example, the phone includes a first mapping relationship between the uplink rate and the second threshold. The phone includes a second mapping relationship between the downlink rate and the third threshold. The phone can determine the second threshold based on the first uplink rate and the first mapping relationship. The phone can determine the third threshold based on the first downlink rate and the second mapping relationship.

[0136] For example, the first mapping relationship can be a mapping relationship between multiple first uplink rate intervals and multiple second thresholds. The multiple first uplink rate intervals can be consecutive. The multiple first uplink rate intervals can be obtained by dividing an uplink rate interval consisting of a minimum uplink rate to an optimal uplink rate. For example, the multiple first uplink rate intervals can be [minimum uplink rate, uplink rate 1], (uplink rate 1, uplink rate 2], ..., (uplink rate i-1, uplink rate i], (uplink rate i, optimal uplink rate).

[0137] In some embodiments, the uplink rate i = minimum uplink rate + i * fixed step size. That is, starting from the minimum uplink rate, the uplink rate interval formed by the minimum uplink rate and the optimal uplink rate is divided into multiple first uplink rate intervals with a fixed step size.

[0138] In some embodiments, the uplink rate i = uplink rate i-1 + variable step size i. When i = 1, the uplink rate i-1 is the minimum uplink rate. Optionally, the variable step size 1, ..., variable step size i increases sequentially. For example, the variable step size 1, ..., variable step size i increases sequentially in multiples. As an example, the variable step size i = i * variable step size 1. For example, variable step size 1 is 100 Mbps, variable step size 2 is 200 Mbps, variable step size 3 is 300 Mbps, etc. As another example, the variable step size i = 2i * variable step size 1. For example, variable step size 1 is 100 Mbps, variable step size 2 is 400 Mbps, variable step size 3 is 600 Mbps, etc. As another example, the variable step size 1, ..., variable step size i increases randomly in sequence. This application does not specifically limit this. An example is given below. For example, the minimum uplink rate corresponding to the video call service is 10 Mbps, and the optimal uplink rate is 1000 Mbps. The first uplink speed ranges are [10Mbps, 100Mbps], (100Mbps, 300Mbps], (300Mbps, 600Mbps], and (600Mbps, 1000Mbps).

[0139] Each of the multiple first uplink rate intervals has a corresponding second threshold. For example, [lowest uplink rate, uplink rate 1] corresponds to the second threshold y1, [uplink rate 1, uplink rate 2] corresponds to the second threshold y2, ..., [uplink rate i-1, uplink rate i] corresponds to the second threshold y1. (i-1) [Uplink rate i, optimal uplink rate] corresponds to the second threshold y i Among them, y1, ..., y i The values ​​increase sequentially. This is because, to avoid stuttering caused by network speed fluctuations, the lower the network speed, the smaller the allowable downward fluctuation. The higher the network speed, the larger the allowable downward fluctuation. Continuing with the example from before, the second threshold corresponding to the first uplink speed range [10Mbps, 100Mbps] is 3%, the second threshold corresponding to [100Mbps, 300Mbps] is 8%, the second threshold corresponding to [300Mbps, 600Mbps] is 10%, and the second threshold corresponding to [600Mbps, 1000Mbps] is 15%.

[0140] The mobile phone can determine a second threshold corresponding to the first uplink rate based on a statistically obtained first uplink rate and a first mapping relationship. Specifically, the mobile phone can first determine the first uplink rate range to which the first uplink rate belongs based on the statistically obtained first uplink rate. Then, based on the first mapping relationship, it determines the second threshold. For example, the mobile phone calculates the first uplink rate as 360Mbps. The mobile phone identifies this first uplink rate as belonging to the first uplink rate range (300Mbps, 600Mbps). Further, the mobile phone determines that the second threshold corresponding to this first uplink rate range (300Mbps, 600Mbps) is 10%.

[0141] Similarly, the second mapping relationship can be a mapping relationship between multiple first downlink rate intervals and multiple third thresholds. The multiple first downlink rate intervals can be consecutive. These intervals can be derived from a downlink rate interval consisting of the lowest downlink rate to the optimal downlink rate. For example, the multiple first downlink rate intervals could be [lowest downlink rate, downlink rate 1], (downlink rate 1, downlink rate 2], ..., (downlink rate k-1, downlink rate k], (downlink rate k, optimal downlink rate).

[0142] In some embodiments, the downlink rate k = minimum downlink rate + k * fixed step size. That is, starting from the minimum downlink rate, the numerical range formed by the minimum downlink rate and the optimal downlink rate is divided into multiple first downlink rate ranges with a fixed step size.

[0143] In other embodiments, the downlink rate k = downlink rate k-1 + variable step size k. When k = 1, the downlink rate k-1 is the minimum downlink rate. Optionally, the variable step size 1, ..., variable step size k increases sequentially. For example, the variable step size 1, ..., variable step size k increases sequentially in multiples. Another example is that the variable step size 1, ..., variable step size k increases randomly in sequence. This application does not impose specific limitations on this aspect.

[0144] Each of the multiple first downlink rate intervals has a corresponding third threshold. For example, [lowest downlink rate, downlink rate 1] corresponds to the second threshold x1, [downlink rate 1, downlink rate 2] corresponds to the third threshold x2, ..., [downlink rate k-1, downlink rate i] corresponds to the third threshold x. (k-1) [Downlink rate k, optimal downlink rate] corresponds to the third threshold x k Where x1, ..., x kThe values ​​increase sequentially. For example, the minimum upload speed for watching live streams is 300Mbps, and the optimal upload speed is 2500Mbps. Multiple first upload speed ranges are [300Mbps, 400Mbps], (400Mbps, 600Mbps], (600Mbps, 1000Mbps], (1000Mbps, 1600Mbps], and (1600Mbps, 1500Mbps). Their corresponding third thresholds could be, for example, 3%, 6%, 10%, 13%, and 19%, respectively.

[0145] The mobile phone can determine the third threshold corresponding to the second downlink rate based on the statistically obtained first downlink rate and the second mapping relationship. Specifically, the mobile phone can first determine the first downlink rate interval to which the first downlink rate belongs based on the statistically obtained average first downlink rate. Then, based on the first mapping relationship, it determines the third threshold. For example, taking watching live online streaming as an example, the mobile phone calculates the first downlink rate as 1600Mbps. The mobile phone identifies this first downlink rate as belonging to the first downlink rate interval (1000Mbps, 1600Mbps). Further, the mobile phone determines that the third threshold corresponding to the first downlink rate interval (1000Mbps, 1600Mbps) is 13%.

[0146] Optionally, the second network rate can be the second uplink rate. Specifically, S307 can be: if the decrease in the second uplink rate exceeds a first threshold, the phone identifies a lag. The first threshold can be the aforementioned second threshold; its specific implementation will not be elaborated here.

[0147] Optionally, the second network rate can be the second downlink rate, then S307 can specifically be: if the decrease in the second downlink rate exceeds a first threshold, the mobile phone identifies a lag. The first threshold can be the third threshold mentioned above; its specific implementation will not be elaborated here.

[0148] Optionally, the above method also includes S308.

[0149] S308 ensures that audio and video services do not experience lag when the decrease in the second network speed does not exceed the first threshold.

[0150] Specifically, if the first drop is less than the second threshold and the second drop is less than the third threshold, the audio and video recognition service will not be interrupted.

[0151] Optionally, the second network rate can be the second uplink rate, then S308 can specifically be: ensuring that audio and video services are not interrupted if the decrease in the second uplink rate does not exceed a first threshold. Here, the first threshold can be the second threshold.

[0152] Optionally, the second network rate can be the second downlink rate, then S308 can specifically be: under the condition that the decrease in the second downlink rate does not exceed the first threshold, the audio and video services are identified as not being interrupted.

[0153] If the phone detects that the second network speed is between the first and second preset speeds, the phone can execute steps S306-S308. If the phone detects that the second network speed is not between the first and second preset speeds, the phone can execute steps S309-S310.

[0154] S309, the phone detected that the second network speed was lower than the first preset speed, and the audio and video services were experiencing lag.

[0155] Specifically, if the phone detects that the second uplink rate is lower than the first preset uplink rate and / or the second downlink rate is lower than the first preset downlink rate, the phone recognizes that the current audio / video service is experiencing stuttering. That is, if part or all of the second uplink and second downlink rates are lower than the corresponding first preset rates, the phone recognizes that the audio / video service is experiencing stuttering. For example, if the phone detects that both the second uplink and downlink rates are lower than the first preset uplink and downlink rates, the phone recognizes that the audio / video service is experiencing stuttering. If the phone detects that the second uplink rate is lower than the first preset uplink rate and the second downlink rate is between the first and second preset downlink rates, the phone recognizes that the audio / video service is experiencing stuttering. If the phone detects that the second uplink rate is lower than the first preset uplink rate and the second downlink rate is higher than the second preset downlink rate, the phone recognizes that the audio / video service is experiencing stuttering. As another example, if the phone detects that both the second downlink and second uplink rates are lower than the first preset uplink rate, the phone recognizes that the audio / video service is experiencing stuttering. If the phone detects that the second downlink rate is lower than the first preset downlink rate and the second uplink rate is between the first and second preset uplink rates, the phone recognizes that the audio / video service is experiencing stuttering. If the phone detects that the second downlink rate is lower than the first preset downlink rate, and the second uplink rate is higher than the second preset uplink rate, then the phone recognizes that the audio / video service is experiencing buffering. In other words, if either the second uplink rate or the second downlink rate is lower than the minimum rate corresponding to the audio / video service, the phone determines that buffering has occurred.

[0156] Optionally, the second network speed can be the second uplink speed. In this case, S309 can specifically be: the mobile phone recognizes that the second uplink speed is lower than the first preset uplink speed, and the mobile phone recognizes that the current audio and video service is lagging.

[0157] Optionally, the second network speed can be the second downlink speed. In this case, S309 can specifically be: the mobile phone recognizes that the second downlink speed is lower than the first preset downlink speed, and the mobile phone recognizes that the current audio and video service is lagging.

[0158] The S310 phone recognizes that the second network speed is higher than the second preset speed, and audio and video services are not laggy.

[0159] Specifically, if the phone detects that the second uplink rate is higher than the first preset uplink rate and the second downlink rate is also higher than the first preset downlink rate, the phone will ensure that the current audio and video service is not choppy. In other words, if all rates in the second uplink and second downlink are higher than their corresponding second preset rates, the phone will ensure that the audio and video service is not choppy.

[0160] Optionally, the second network speed can be the second uplink speed. In this case, S310 can specifically be: the mobile phone recognizes that the second uplink speed is higher than the first preset uplink speed, and the mobile phone recognizes that the current audio and video service is not lagging.

[0161] Optionally, the second network speed can be the second downlink speed. Specifically, S310 can be: the mobile phone recognizes that the second downlink speed is higher than the second preset downlink speed, and the mobile phone recognizes that the current audio and video service is not lagging.

[0162] For example, taking the live streaming service in Table 1 as an example, when the mobile phone detects the start of watching the live stream, it calculates the first uplink speed of 30Mbps and the first downlink speed of 1000Mbps over M seconds. Then, the phone calculates the second uplink speed and the second downlink speed over the next N seconds. If the second uplink speed is 80Mbps, lower than the first preset uplink speed, and / or the second downlink speed is 260Mbps, lower than the first preset downlink speed, the phone identifies a buffering issue. If the second uplink speed is 1000Mbps, higher than the second preset uplink speed, and the second downlink speed is 2900Mbps, higher than the second preset downlink speed, the phone identifies no buffering issue.

[0163] Optionally, when the second network rate includes a second uplink rate and a second downlink rate, another possible scenario is that one of the second uplink and downlink rates falls between the corresponding first and second preset rates, while the other second rate is higher than the corresponding second preset rate. For example, the second uplink rate falls between the first and second preset uplink rates, and the second downlink rate is higher than the second preset downlink rate. Continuing with the example of watching live streaming services in Table 1, for example, the second uplink rate is 500 Mbps and the second downlink rate is 3000 Mbps. Another example is that the second downlink rate falls between the first and second preset downlink rates, and the second uplink rate is higher than the second preset uplink rate. Continuing with the example of watching live streaming services in Table 1, for example, the second uplink rate is 2000 Mbps and the second downlink rate is 1800 Mbps. In this case, the mobile phone can execute S311 (not shown in the figure).

[0164] S311, when one of the second uplink rate and the second downlink rate is between the corresponding first preset rate and the second preset rate, and the other second rate is higher than the corresponding second preset rate, and the decrease in the second rate exceeds the corresponding threshold, the audio and video service is identified as being stuck.

[0165] For example, when the second uplink rate is between the first preset uplink rate and the second preset uplink rate, and the second downlink rate is higher than the second preset downlink rate, the phone can calculate a first drop in the second uplink rate. If the first drop exceeds a second threshold, the phone experiences a lag. If the first drop does not exceed the second threshold, the phone does not experience a lag.

[0166] For example, when the second downlink rate is between the first and second preset downlink rates and the second uplink rate is higher than the second preset uplink rate, the phone can calculate a second drop in the second downlink rate. If the second drop exceeds a third threshold, the phone's recognition process will stall. If the second drop does not exceed the third threshold, the phone's recognition process will not stall.

[0167] Furthermore, the phone can set a valid duration for the first network speed. Within this valid duration, the phone can calculate the second network speed multiple times and use the first network speed as a benchmark to identify lag. Optionally, S303 can periodically calculate the phone's second network speed within a preset duration.

[0168] The preset duration can be the effective duration of the first network rate, for example, such as... Figure 6 As shown in b, the preset duration can be 30 seconds, such as the duration consisting of the 16th to the 45th second. Within the preset duration, the phone periodically counts the second network rate, such as acquiring the second network rate every 3 seconds. For example, the phone can start timing at the 16th second. The phone can count the second network rate from the 16th to the 18th second at the 18th second, the second network rate from the 19th to the 21st second at the 21st second, the second network rate from the 22nd to the 24th second at the 24th second, and so on, until the duration between the start of timing and the current counting time is the preset duration. That is, within the preset duration, the phone can count the second network rate for at least one second time period. The phone can periodically count the second network rate within the second time period within the preset duration, using the duration included in the second time period as the cycle. For each of the multiple periodically acquired second network rates, the phone can perform the methods shown in S304-S311 to identify lag.

[0169] Furthermore, the phone can periodically measure the initial network speed, adaptively adjust the baseline speed, and use the new baseline speed to identify lag. Optionally, the phone can periodically measure the initial network speed at preset intervals. Following S308, the phone can also execute S312.

[0170] S312, if the time elapsed between the last time the first network speed was obtained and the current time is a preset time, the method shown in S302-S311 is re-executed.

[0171] like Figure 6 As shown in b, the preset duration is 30 seconds. The phone calculates the first network speed at the 15th second. After 30 seconds, the phone recalculates the first network speed for the first time period and re-executes the methods shown in S303-S311. Optionally, the phone can stop executing the lag identification method described above at the 45th second, and then execute the lag identification method described above again after calculating the first network speed at the 60th second.

[0172] Optionally, the phone can continue to execute the lag identification method described above before updating the first network speed. For example, the phone can continue to count the second network speed, such as counting the second network speed from the 46th to the 48th second at the 48th second, ..., counting the second network speed from the 58th to the 59th second at the 60th second, and identifying lag based on the second network speed and the unupdated first network speed, until the phone updates the first network speed.

[0173] In this way, during the process of executing audio and video services and outputting audio and video service data, the mobile phone can periodically execute, for example... Figure 3 The methods shown in S302-S312 continue until the mobile phone stops performing audio or video services. For example, in an audio or video call, when the call initiator or recipient clicks the hang-up button on the call interface, the mobile phone stops performing the audio or video call service. Another example is in a live streaming scenario, specifically in a live streaming viewing scenario, where the user exits... Figure 5 If you see screen 501 or screen 502, your phone will stop watching live online streams.

[0174] As can be seen, the audio / video stuttering detection method provided in this application allows electronic devices to adaptively adjust the reference rate (first uplink rate and first downlink rate), thereby identifying stuttering based on network rate fluctuations. This improves the stuttering test coverage in audio / video scenarios and helps improve the accuracy of stuttering tests. This solution adaptively statistically analyzes network rates in audio / video service scenarios, enabling the acquisition of the first network rate under different resolutions and / or content, identifying stuttering, and ultimately guiding the mobile phone to select the optimal network, thus improving the user's internet experience.

[0175] This application provides an electronic device including a memory, a display screen, and one or more processors. The display screen is coupled to the processors. The memory stores computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the mobile phone in the above method embodiments. The structure of the electronic device can be referred to... Figure 1 The structure of the electronic device 100 shown.

[0176] This application embodiment also provides a computer storage medium, which includes computer instructions, when the computer instructions are executed in the aforementioned electronic device (such as...). Figure 1 When the electronic device 100 shown is run, it causes the electronic device to perform the various functions or steps in the above method embodiments.

[0177] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps described in the above method embodiments.

[0178] This application also provides a chip system including at least one processor and at least one interface circuit. The processor and the interface circuit are interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit can be used to send signals to other devices (e.g., the processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application does not specifically limit this.

[0179] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0180] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0181] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0182] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0183] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0184] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting audio / video stuttering, characterized in that, The method, applied to an electronic device already connected to a network, includes: Output audio and video service data; the audio and video service corresponds to a first preset rate and a second preset rate; the first preset rate is lower than the second preset rate; when the network rate of the electronic device is lower than the first preset rate, the audio and video service is interrupted. The first network speed of the electronic device within the first time period is statistically analyzed. When the first network speed is between the first preset speed and the second preset speed, the second network speed of the electronic device within a second time period is calculated; the second time period is the time period after the first time period. If the second network rate is between the first preset rate and the second preset rate, and the decrease in the second network rate exceeds a first threshold, the audio / video service is identified as experiencing a stutter; wherein the decrease indicates the magnitude of the downward fluctuation of the second network rate compared to the first network rate.

2. The method according to claim 1, characterized in that, The first network rate includes a first uplink rate and a first downlink rate, and the second network rate includes a second uplink rate and a second downlink rate; the first preset rate includes a first preset uplink rate and a first preset downlink rate, and the second preset rate includes a second preset uplink rate and a second preset downlink rate. The first threshold includes a second threshold and a third threshold; When the second network rate is between the first preset rate and the second preset rate, and the decrease in the second network rate exceeds a first threshold, identifying audio / video service stuttering includes: If the second uplink rate is between the first preset uplink rate and the second preset uplink rate, the second downlink rate is between the first preset downlink rate and the second preset downlink rate, and the first decrease in the second uplink rate exceeds the second threshold and / or the second decrease in the second downlink rate exceeds the third threshold, then the audio / video service is identified as experiencing a stutter; wherein the first decrease indicates the magnitude of the downward fluctuation of the second uplink rate relative to the first uplink rate; and the second decrease indicates the magnitude of the downward fluctuation of the second downlink rate relative to the first downlink rate.

3. The method according to claim 2, characterized in that, The method further includes: If the second uplink rate is lower than the first preset uplink rate and / or the second downlink rate is lower than the first preset downlink rate, the audio and video service is identified as being stuck. or, When the second uplink rate is higher than the second preset uplink rate, and the second downlink rate is higher than the second preset downlink rate, the audio and video service is identified as not being interrupted. or, If one of the second uplink rate and the second downlink rate is between the corresponding first preset rate and the second preset rate, and the other rate is higher than the corresponding second preset rate, and the decrease in the rate between the corresponding first preset rate and the second preset rate exceeds the corresponding threshold, then the audio / video service is identified as being stuck.

4. The method according to any one of claims 2-3, characterized in that, After calculating the second network rate within the second time period, the method further includes: Based on the first mapping relationship and the first uplink rate, the second threshold is determined; wherein, the first mapping relationship includes a mapping relationship between multiple consecutive first uplink rate intervals and multiple second thresholds; the multiple consecutive first uplink rate intervals are obtained by dividing the uplink rate interval between the first preset uplink rate and the second preset uplink rate; The third threshold is determined based on the second mapping relationship and the first downlink rate; wherein the second mapping relationship includes the mapping relationship between multiple consecutive first downlink rate intervals and multiple third thresholds; the multiple consecutive first downlink rate intervals are obtained by dividing the downlink rate interval between the first preset downlink rate and the second preset downlink rate.

5. The method according to claim 4, characterized in that, The multiple consecutive first uplink rate intervals correspond to multiple different second thresholds, and the second thresholds increase sequentially as the rate increases; the multiple consecutive first downlink rate intervals correspond to multiple different third thresholds, and the third thresholds increase sequentially as the rate increases.

6. The method according to claim 2, characterized in that, The statistical analysis of the second network rate of the electronic device during the second time period includes: When the first uplink rate is between the first preset uplink rate and the second preset uplink rate, and the first downlink rate is between the first preset downlink rate and the second preset downlink rate, the second network rate of the electronic device during the second time period is calculated.

7. The method according to any one of claims 1-3, characterized in that, The statistical analysis of the second network rate of the electronic device during the second time period includes: The second network rate of the electronic device is periodically counted within a preset time period.

8. The method according to any one of claims 1-3, characterized in that, The method further includes: If the time elapsed between the last time the first network speed was obtained and the current time is a preset duration, the first network speed and the second network speed are recalculated, and stuttering detection is performed based on the recalculated first network speed and the second network speed.

9. The method according to claim 1, characterized in that, The first network rate is a first uplink rate, the second network rate is a second uplink rate, the first preset rate is a first preset uplink rate, and the second preset rate is a second preset uplink rate; or... The first network rate is the first downlink rate, the second network rate is the second downlink rate, the first preset rate is the first preset downlink rate, and the second preset rate is the second preset downlink rate.

10. The method according to any one of claims 1-3, characterized in that, The audio and video services mentioned are any one of the following: audio call services, video call services, video conferencing services, and live streaming services.

11. An electronic device, characterized in that, The electronic device includes: a memory, a communication module, and one or more processors; the communication module receives and sends data under the control of the processor to realize communication between the electronic device and other electronic devices; the memory is coupled to the processor; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-10.

12. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-10.

13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-10.