Video rollback method and device, electronic equipment and computer readable storage medium
By collecting ambient noise in real time and automatically recording the rollback point, the problem of video playback interruption caused by manual operation by the user is solved, and automatic rollback is achieved in the event of noise interference, thereby improving the continuity of video playback and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN TCL NEW-TECH CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-05-01
AI Technical Summary
Existing video playback devices require users to manually pause and rewind when there is noise interference, resulting in a poor viewing experience and making it easy to miss key content.
By collecting ambient noise in real time, determining the volume and duration, the system automatically records the video rewind point and rewinds the video when the noise ends, avoiding manual operation by the user.
It enables automatic rewinding of video to before the noise occurred when there is noise interference, improving the viewing experience, preventing the user from missing key content, and reducing the user's operational burden.
Smart Images

Figure CN121967790A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, specifically to a video rollback method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Video playback devices typically have basic playback control functions such as manual pause, stop, and rewind. In everyday video viewing scenarios, sudden howling from a pet or continuous noise from home renovations can disrupt the user's viewing rhythm and affect the normal viewing experience. In such cases, users usually need to manually pause the video and rewind after the noise stops to rewatch the part that was interrupted. However, this manual operation not only affects the viewing experience but may also lead to missing crucial content in the video if the rewind timing is inappropriate. Summary of the Invention
[0003] This application provides a video rollback method, apparatus, electronic device, and computer-readable storage medium that can automatically roll back the video and resume playback after the noise ends.
[0004] In a first aspect, embodiments of this application provide a video rollback method, including: Real-time acquisition of ambient noise while playing video; Determine the volume of the ambient noise and obtain the volume threshold; When the volume of the ambient noise is detected to be greater than the volume threshold, the video rewind point corresponding to the start time of the ambient noise is recorded; When the environmental noise is detected to be over, the video is rewound according to the video rewind point and then played back.
[0005] In one embodiment, the method further includes: The duration of the environmental noise is detected, and a time threshold is obtained; The step of recording the video rewind point corresponding to the start time of the detected environmental noise when its volume exceeds the volume threshold includes: When the volume of the ambient noise is detected to be greater than the volume threshold and the duration is greater than the time threshold, the video rewind point corresponding to the start time of the ambient noise is recorded.
[0006] In one embodiment, the method further includes: The video continues to play when the volume of the detected ambient noise is not greater than the volume threshold and / or the duration is not greater than the time threshold.
[0007] In one embodiment, rewinding the video based on the video rewind point includes: Obtain redundant rollback time; The target rollback point is determined based on the video rollback point and the redundant rollback time; The video is rewound to the target rewind point.
[0008] In one embodiment, the method further includes: When the volume of the ambient noise is detected to be greater than the volume threshold, the video playback is paused.
[0009] In one embodiment, determining the volume of the ambient noise includes: The ambient noise is windowed to obtain a windowed signal; The windowed signal is frequency-domain converted to obtain a frequency-domain signal; Obtain the amplitude spectrum of the frequency domain signal, and calculate the signal power spectral density based on the amplitude spectrum of the frequency domain signal; The total power is determined based on the signal power spectral density. The total power is converted into decibels to obtain the volume of the ambient noise.
[0010] Secondly, embodiments of this application provide a video rollback device, comprising: The noise acquisition module is used to collect ambient noise in real time while playing videos; A volume determination module is used to determine the volume of the ambient noise and obtain a volume threshold. The rollback point recording module is used to record the video rollback point corresponding to the start time point of the environmental noise when the volume of the detected environmental noise is greater than the volume threshold. The video rollback module is used to roll back the video according to the video rollback point when the environmental noise is detected to end, and then play the video.
[0011] In one embodiment, the device further includes: A time detection module is used to detect the duration of the environmental noise and obtain a time threshold. The rollback point recording module includes: The rollback point recording unit is used to record the video rollback point corresponding to the start time point of the environmental noise when the volume of the detected environmental noise is greater than the volume threshold and the duration is greater than the time threshold.
[0012] In one embodiment, the device further includes: The playback continuation module is used to continue playing the video when the volume of the detected ambient noise is not greater than the volume threshold and / or the duration is not greater than the time threshold.
[0013] In one embodiment, the video rollback module includes: Redundancy rollback time acquisition unit, used to acquire redundancy rollback time; The target rollback point determination unit is used to determine the target rollback point based on the video rollback point and the redundant rollback time. A video rollback unit is used to roll back the video to the target rollback point.
[0014] In one embodiment, the device further includes: The pause playback module is used to pause the playback of the video when the volume of the detected ambient noise is greater than the volume threshold.
[0015] In one embodiment, the volume determination module includes: A windowing processing unit is used to window the environmental noise to obtain a windowed signal; A frequency domain conversion unit is used to perform frequency domain conversion on the windowed signal to obtain a frequency domain signal; A signal power spectral density determination unit is used to acquire the amplitude spectrum of the frequency domain signal and calculate the signal power spectral density based on the amplitude spectrum of the frequency domain signal. A total power determination unit is used to determine the total power based on the signal power spectral density; A decibel conversion unit is used to convert the total power into a decibel value to obtain the volume of the ambient noise.
[0016] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the video rollback method described above.
[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the video rollback method described above.
[0018] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.
[0019] The embodiments of this application have the following beneficial effects: During video playback, ambient noise can be collected in real time to determine its volume and obtain a volume threshold. Based on the relationship between the ambient noise and the volume threshold, it can be determined whether to perform video rewind. When the ambient noise volume is detected to be greater than the volume threshold, the video rewind point corresponding to the start time of the ambient noise can be recorded to determine the accurate rewind time and avoid inappropriate rewind timing. When the ambient noise is detected to have ended, the video is rewound according to the video rewind point and then played. In this way, the video can be automatically rewound to before the noise occurred without the need for manual rewinding by the user, avoiding missing key content in the video due to noise affecting viewing and helping to improve the user experience. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram illustrating the steps of a video rewind method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a video rollback method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating yet another video rollback method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a video rewind device provided in one embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0022] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0023] In one embodiment, such as Figure 1As shown, a video rollback method is provided. Although the logical order is illustrated in the step diagram, in some cases, the steps shown or described may be performed in a different order than that shown in the figures. Specifically, this video rollback method can be applied to electronic devices, which may include, but are not limited to, one or more of smart TVs, projectors, video playback devices, smartphones, tablets, laptops, desktop computers, and in-vehicle computers.
[0024] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0025] according to Figure 1 The video rollback method shown includes at least steps S110 to S140, which are described in detail below: In step S110, ambient noise is collected in real time while the video is playing.
[0026] In step S120, the volume of the ambient noise is determined and a volume threshold is obtained.
[0027] In step S130, when the volume of the ambient noise is detected to be greater than the volume threshold, the video rewind point corresponding to the start time of the ambient noise is recorded.
[0028] In step S140, when the environmental noise is detected to end, the video is rewound according to the video rewind point and the video is played back.
[0029] The video can be any video played by the electronic device. The electronic device can have an audio acquisition device (such as a microphone) to collect ambient noise. This can be achieved by using a dual-microphone array with beamforming technology to collect ambient noise while suppressing the propagation path of the audio played by the electronic device itself; alternatively, an audio echo cancellation algorithm can be used to extract a reference signal of the audio played by the electronic device, accurately canceling its own audio components from the acquired signal, thereby extracting the ambient noise.
[0030] The collected ambient noise is analyzed and processed to determine its volume and obtain a volume threshold. The volume threshold is the volume that affects the user's ability to watch the video. When the ambient noise volume exceeds the volume threshold, viewers cannot hear the video audio clearly.
[0031] In one embodiment, the volume threshold may be preset by the user or set in the electronic device during manufacturing.
[0032] In another embodiment, the volume threshold can be determined based on the currently set volume in the electronic device. The currently set volume in the electronic device can be the volume that the user adjusts by increasing or decreasing the volume. A fixed value can be preset, which can be determined based on large datasets or experiments. The volume threshold is the volume corresponding to the fixed value minus the currently set volume in the electronic device, because the user needs to ensure that the currently set volume in the electronic device is greater than the ambient noise in order to hear the sound of the video played by the electronic device clearly. For example, the television volume needs to be at least 10 decibels (dB) higher than the ambient noise to be heard clearly. Therefore, if the television volume is 40 decibels, the volume threshold can be set to 30 decibels. When the ambient noise volume is greater than 30 decibels, the television sound cannot be heard clearly.
[0033] Based on the relationship between ambient noise and a volume threshold, it is determined whether to perform video rewind. If the ambient noise volume is not greater than the volume threshold, video playback can continue without intervention. If the ambient noise volume is greater than the volume threshold, video rewind is required, and the video rewind point corresponding to the start time of the ambient noise can be recorded. The video rewind point refers to the time point in the video playback progress corresponding to the start time of the ambient noise.
[0034] When the ambient noise level exceeds the volume threshold, the video playback can be automatically paused. When ambient noise is excessive, users cannot hear the video content clearly. Automatically pausing the video prevents users from missing crucial content by watching interrupted segments, improving the continuity and overall experience of video viewing. It also eliminates the need for manual pausing, reducing the user's workload. Furthermore, it prevents users from blindly increasing the TV volume to drown out noise, minimizing the long-term hearing damage caused by high volumes.
[0035] Upon detection of the end of the ambient noise, the video rewind and playback resumption process can be automatically triggered. The video is automatically rewound based on the rewind point, ensuring that the rewind position covers key segments before the noise began, preventing the user from missing any disturbed content. After the rewind is complete, the video will immediately and automatically resume playback without manual user intervention.
[0036] Figure 2 This is a flowchart illustrating a video rewind method provided in an embodiment of this application; see reference. Figure 2The electronic device may include a noise detection module, a time recording module, and a video playback control module. The noise detection module can collect ambient noise in real time to determine whether the volume of the ambient noise exceeds a volume threshold. When the ambient noise volume exceeds the volume threshold, the time recording module can automatically record the noise start time; when the ambient noise volume changes from exceeding the volume threshold to not exceeding the volume threshold, it can record the noise end time. The video playback control can determine whether to automatically pause, rewind, and / or resume video playback based on the noise start time and noise end time. The video playback control can automatically pause video playback based on the noise start time and automatically rewind the video based on the noise end time, and immediately resume playback automatically after the rewind is complete. This solves the problem of content loss caused by noise interference and eliminates the tedious steps of manually pausing, rewinding, and restarting, allowing for a natural flow of viewing and significantly improving the continuity and convenience of watching.
[0037] By employing the technical solution of this application embodiment, ambient noise can be collected in real time during video playback, the volume of the ambient noise can be determined, and a volume threshold can be obtained. Based on the relationship between the ambient noise and the volume threshold, it can be determined whether to perform video rewind. When the volume of the ambient noise is detected to be greater than the volume threshold, the video rewind point corresponding to the start time of the ambient noise can be recorded, thereby determining an accurate rewind time and avoiding inappropriate rewind timing. When the ambient noise is detected to have ended, the video is rewound according to the video rewind point, and the video is played. In this way, the video can be automatically rewound to before the noise occurred, without requiring manual rewinding by the user, preventing the user from missing key content in the video due to noise affecting viewing, and helping to improve the user experience.
[0038] Based on the above technical solution, as an embodiment, the method may further include: detecting the duration of the environmental noise and obtaining a time threshold; the step of recording the video rewind point corresponding to the start time point of the environmental noise when the volume of the environmental noise is detected to be greater than the volume threshold includes: when the volume of the environmental noise is detected to be greater than the volume threshold and the duration is greater than the time threshold, recording the video rewind point corresponding to the start time point of the environmental noise.
[0039] When the ambient noise level exceeds a volume threshold, the time recording module automatically records the noise start time. If the ambient noise level remains consistently above the volume threshold, the duration of the ambient noise from its start time to the current moment can be determined. The time threshold can be retrieved; it can be pre-set by the user or configured within the electronic device during manufacturing.
[0040] Figure 3This is a flowchart illustrating another video rewind method provided in an embodiment of this application; see also... Figure 3 When the volume of ambient noise is detected to be greater than the volume threshold, it can be further determined whether the duration of the noise is greater than the time threshold. When both the volume and duration of the ambient noise are detected to be greater than the volume threshold, it is determined that video rollback is required, and therefore the video rollback point corresponding to the start time of the ambient noise can be recorded.
[0041] Upon detection of the end of the ambient noise, the video rewind and playback resumption process can be automatically triggered. The video is automatically rewound based on the rewind point, ensuring that the rewind position covers key segments before the noise began, preventing the user from missing any disturbed content. After the rewind is complete, the video will immediately and automatically resume playback without manual user intervention.
[0042] The video continues playing when the volume of the detected ambient noise is not greater than the volume threshold and / or the duration is not greater than the time threshold. Specifically, when the volume of the detected ambient noise is not greater than the volume threshold, video playback control can be omitted, and the video continues playing. When the volume of the detected ambient noise is greater than the volume threshold, but the duration of the noise is not greater than the time threshold, video playback control can be omitted, and the video continues playing. When the volume of the detected ambient noise is not greater than the volume threshold and the duration is not greater than the time threshold, video playback control can also be omitted, and the video continues playing.
[0043] By employing the technical solution of this application embodiment, and simultaneously determining whether to pause and rewind the video based on the duration of noise, invalid interference can be accurately filtered out, avoiding frequent pausing and rewinding from disrupting the viewing rhythm, ensuring that only interference that truly affects the clarity of the audio content is processed, and improving the accuracy of the judgment.
[0044] Based on the above technical solution, as an embodiment, the step of rewinding the video according to the video rollback point may include: obtaining redundant rollback time; determining a target rollback point based on the video rollback point and the redundant rollback time; and rewinding the video to the target rollback point.
[0045] Redundancy rollback time is a time setting used to improve the fault tolerance of rollback. It ensures that the rolled-back video covers the content before noise interference, preventing users from missing key segments. Redundancy rollback time can be preset, typically ranging from 3 to 5 seconds.
[0046] After determining the video rollback point and redundant rollback time, the target rollback point can be precisely calculated. Specifically, based on the video rollback point, redundant rollback time is added forward to ensure that the rollback range fully includes the content before the interference. The video can automatically jump to this target rollback point without manual user intervention.
[0047] By employing the technical solution of this application embodiment, the problem of content loss caused by noise interference can be solved by calculating the redundant rollback time and the precise video rollback point, ensuring the accuracy and practicality of the rollback operation and greatly improving the continuity of the viewing experience.
[0048] In another embodiment, there is no need to set a redundant rollback time; the video can be rolled back directly to the rollback point during video rollback.
[0049] Based on the above technical solution, as an embodiment, determining the volume of the ambient noise may include: windowing the ambient noise to obtain a windowed signal; performing frequency domain conversion on the windowed signal to obtain a frequency domain signal; acquiring the amplitude spectrum of the frequency domain signal and calculating the signal power spectral density based on the amplitude spectrum of the frequency domain signal; determining the total power based on the signal power spectral density; and converting the total power into a decibel value to obtain the volume of the ambient noise.
[0050] A segment of ambient noise can be acquired from audio acquisition devices such as microphones. This ambient noise is typically a short time segment (called a window). The audio signal is usually stored in the form of sample points for subsequent processing. Because the audio signal may contain too much sample data, to avoid spectral leakage during Fast Fourier Transform (FFT) calculations, the short-time audio signal needs to be windowed, for example using Hann windows or Hamming windows.
[0051] Given an audio frame The window function is The windowed signal obtained after windowing is: ;in, For windowing signals, This represents the number of audio frames; the meanings of the other characters can be found in the previous text.
[0052] Commonly used window functions may include: Hann window: w[n]=0.5(1-cos( )); Hamming window: w[n] = 0.54 - 0.46 cos( )。
[0053] A Fast Fourier Transform (FFT) is performed on the windowed signal to transform it from the time domain to the frequency domain. The FFT output is a sequence of complex frequency components. X ; Among them, X For frequency domain signals, It is the imaginary unit. Characterizing the first The meanings of the remaining characters can be found in the previous text.
[0054] The amplitude spectrum of the frequency domain signal can be obtained. The complex result X is obtained from the FFT operation. Amplitude spectrum of frequency domain signal It reflects the energy of the signal at the corresponding frequency.
[0055] ; in, Characterizing complex numbers The real part, Characterizing complex numbers The meaning of the virtual part of the character can be found in the previous text.
[0056] Amplitude spectrum This is converted into signal power spectral density (energy), i.e.: P ; Among them, P This represents the signal power spectral density; the meanings of the other characters can be found in the preceding text.
[0057] Total power Summation for all frequency components: .
[0058] Finally, it is converted to decibels. In the field of audio processing, the decibel is a commonly used representation of volume. The calculation relationship for decibel values is as follows: .
[0059] The technical solution of this application uses decibel values to characterize the volume of environmental noise, which can directly reflect the relative change of signal power / sound pressure. This avoids the large numerical range and cumbersome calculations caused by using linear scale description. Based on logarithmic characteristics, decibels can convert the absolute change of the signal into a simple relative difference, thereby quickly setting clear judgment criteria.
[0060] To facilitate better implementation of the video rollback method of this application, this application also provides a video rollback device based on the above-described video rollback method. The meanings of the terms used are the same as in the video rollback method described above, and specific implementation details can be found in the descriptions of the method embodiments.
[0061] Please see Figure 4 , Figure 4 This is a schematic diagram of the video rollback device provided in an embodiment of this application, wherein the video rollback device includes: The noise acquisition module 401 is used to acquire ambient noise in real time while playing video; The volume determination module 402 is used to determine the volume of the ambient noise and obtain a volume threshold. The rollback point recording module 403 is used to record the video rollback point corresponding to the start time point of the environmental noise when the volume of the detected environmental noise is greater than the volume threshold. The video rollback module 404 is used to roll back the video according to the video rollback point and play the video when the environmental noise is detected to end.
[0062] In one embodiment, the device further includes: A time detection module is used to detect the duration of the environmental noise and obtain a time threshold. The rollback point recording module 403 includes: The rollback point recording unit is used to record the video rollback point corresponding to the start time point of the environmental noise when the volume of the detected environmental noise is greater than the volume threshold and the duration is greater than the time threshold.
[0063] In one embodiment, the device further includes: The playback continuation module is used to continue playing the video when the volume of the detected ambient noise is not greater than the volume threshold and / or the duration is not greater than the time threshold.
[0064] In one embodiment, the video rollback module 404 includes: Redundancy rollback time acquisition unit, used to acquire redundancy rollback time; The target rollback point determination unit is used to determine the target rollback point based on the video rollback point and the redundant rollback time. A video rollback unit is used to roll back the video to the target rollback point.
[0065] In one embodiment, the device further includes: The pause playback module is used to pause the playback of the video when the volume of the detected ambient noise is greater than the volume threshold.
[0066] In one embodiment, the volume determination module 402 includes: A windowing processing unit is used to window the environmental noise to obtain a windowed signal; A frequency domain conversion unit is used to perform frequency domain conversion on the windowed signal to obtain a frequency domain signal; A signal power spectral density determination unit is used to acquire the amplitude spectrum of the frequency domain signal and calculate the signal power spectral density based on the amplitude spectrum of the frequency domain signal. A total power determination unit is used to determine the total power based on the signal power spectral density; A decibel conversion unit is used to convert the total power into a decibel value to obtain the volume of the ambient noise.
[0067] By employing the technical solution of this application embodiment, ambient noise can be collected in real time during video playback, the volume of the ambient noise can be determined, and a volume threshold can be obtained. Based on the relationship between the ambient noise and the volume threshold, it can be determined whether to perform video rewind. When the volume of the ambient noise is detected to be greater than the volume threshold, the video rewind point corresponding to the start time of the ambient noise can be recorded, thereby determining an accurate rewind time and avoiding inappropriate rewind timing. When the ambient noise is detected to have ended, the video is rewound according to the video rewind point, and the video is played. In this way, the video can be automatically rewound to before the noise occurred, without requiring manual rewinding by the user, preventing the user from missing key content in the video due to noise affecting viewing, and helping to improve the user experience.
[0068] For specific limitations regarding the video rollback device, please refer to the limitations of the video rollback method above, which will not be repeated here. Each module in the aforementioned video rollback device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.
[0069] In addition, this application also provides an electronic device, such as Figure 5 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically: The electronic device may include components such as a processor 501 with one or more processing cores and a memory 502 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 501 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.
[0070] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0071] In one embodiment, the electronic device further includes a power supply 503 that supplies power to the various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0072] In one embodiment, the electronic device may further include an input unit 504, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0073] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502, thereby implementing the steps in any of the video rollback methods provided in the embodiments of this application.
[0074] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0075] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.
[0076] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.
[0077] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.
[0078] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0079] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0080] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to perform the steps in any of the video rewind methods provided in this application.
[0081] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0082] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0083] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the video rollback methods provided in this application, the beneficial effects that any of the video rollback methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0084] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0085] The above provides a detailed description of a video rollback method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A video rollback method, characterized in that, include: Real-time acquisition of ambient noise while playing video; Determine the volume of the ambient noise and obtain the volume threshold; When the volume of the ambient noise is detected to be greater than the volume threshold, the video rewind point corresponding to the start time of the ambient noise is recorded; When the environmental noise is detected to be over, the video is rewound according to the video rewind point and then played back.
2. The method according to claim 1, characterized in that, The method further includes: The duration of the environmental noise is detected, and a time threshold is obtained; The step of recording the video rewind point corresponding to the start time of the detected environmental noise when its volume exceeds the volume threshold includes: When the volume of the ambient noise is detected to be greater than the volume threshold and the duration is greater than the time threshold, the video rewind point corresponding to the start time of the ambient noise is recorded.
3. The method according to claim 2, characterized in that, The method further includes: The video continues to play when the volume of the detected ambient noise is not greater than the volume threshold and / or the duration is not greater than the time threshold.
4. The method according to claim 1, characterized in that, The step of rewinding the video based on the video rewind point includes: Obtain redundant rollback time; The target rollback point is determined based on the video rollback point and the redundant rollback time; The video is rewound to the target rewind point.
5. The method according to claim 1, characterized in that, The method further includes: When the volume of the ambient noise is detected to be greater than the volume threshold, the video playback is paused.
6. The method according to any one of claims 1 to 5, characterized in that, Determining the volume of the ambient noise includes: The ambient noise is windowed to obtain a windowed signal; The windowed signal is frequency-domain converted to obtain a frequency-domain signal; Obtain the amplitude spectrum of the frequency domain signal, and calculate the signal power spectral density based on the amplitude spectrum of the frequency domain signal; The total power is determined based on the signal power spectral density. The total power is converted into decibels to obtain the volume of the ambient noise.
7. A video rewind device, characterized in that, include: The noise acquisition module is used to collect ambient noise in real time while playing videos; A volume determination module is used to determine the volume of the ambient noise and obtain a volume threshold. The rollback point recording module is used to record the video rollback point corresponding to the start time point of the environmental noise when the volume of the detected environmental noise is greater than the volume threshold. The video rollback module is used to roll back the video according to the video rollback point when the environmental noise is detected to end, and then play the video.
8. The apparatus according to claim 7, characterized in that, The device further includes: A time detection module is used to detect the duration of the environmental noise and obtain a time threshold. The rollback point recording module includes: The rollback point recording unit is used to record the video rollback point corresponding to the start time point of the environmental noise when the volume of the detected environmental noise is greater than the volume threshold and the duration is greater than the time threshold.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the video rollback method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the video rollback method as described in any one of claims 1 to 6.