Method and apparatus for determining bandwidth, and electronic device and storage medium
AssigneeBeijing Dajia Internet Information Technology Co., Ltd.
InventorChao Zhou
Life of this patent
Estimating the term…
Abstract
The present disclosure relates to a method and apparatus for determining bandwidth, and an electronic device and a storage medium. The method includes: determining whether there is historical bandwidth information in a first time window; determining whether there is historical bandwidth information in at least one second time window in response to determining that there is no historical bandwidth information in the first time window; and calculating target bandwidth information according to the historical bandwidth information in response to determining that there is the historical bandwidth information in the second time window, wherein the second time window covers the first time window.
Claims12
A method for determining bandwidth, applicable to a video player application, the video player application being applicable to a terminal, and the method comprising:
- determining whether there is historical bandwidth information in a first time window, wherein the historical bandwidth information is bandwidth information when data is transmitted through a network in the first time window;
- determining whether there is historical bandwidth information in at least one second time window in response to determining that there is no historical bandwidth information in the first time window, the historical bandwidth information being one or more pieces of information, wherein a time interval of the second time window comprises a time interval of the first time window, and the time interval of the second window is larger than the time interval of the first time window;
- calculating target bandwidth information according to the historical bandwidth information in response to determining that there is the historical bandwidth information in the second time window;
- wherein said determining whether there is historical bandwidth information in at least one second time window in response to determining that there is no historical bandwidth information in the first time window, comprises:
- obtaining the second time window by increasing the first time window by a preset time interval each time, and determining whether there is historical bandwidth information in the obtained second time window after each time the first time window is increased by the preset time interval until the first time window is increased by the preset time interval for a preset number of times or there is historical bandwidth information in the second time window obtained by increasing the first time window by the preset time interval for at least one time, in response to determining that there is no historical bandwidth information in the first time window;
- or
- increasing time intervals of the at least one second time window sequentially, an end point of each second time window being identical to an end point of the first time window, and determining whether there is historical bandwidth information in second time windows in an ascending order of time intervals in response to determining that there is no historical bandwidth information in the first time window.
An electronic device, comprising:
- a processor;
- a memory for storing instructions executable by the processor;
- wherein the processor is configured to execute the instructions to:
- determine whether there is historical bandwidth information in a first time window, wherein the historical bandwidth information is bandwidth information when data is transmitted through a network in the first time window;
- determine whether there is historical bandwidth information in at least one second time window in response to determining that there is no historical bandwidth information in the first time window, the historical bandwidth information being one or more pieces of information, wherein a time interval of the second time window comprises a time interval of the first time window, and the time interval of the second window is larger than the time interval of the first time window;
- calculate target bandwidth information according to the historical bandwidth information in response to determining that there is the historical bandwidth information in the second time window;
- wherein the processor is configured to:
- obtain the second time window by increasing the first time window by a preset time interval each time, and determine whether there is historical bandwidth information in the obtained second time window after each time the first time window is increased by the preset time interval until the first time window is increased by the preset time interval for a preset number of times or there is historical bandwidth information in the second time window obtained by increasing the first time window by the preset time interval for at least one time, in response to determining that there is no historical bandwidth information in the first time window;
- or
- increase time intervals of the at least one second time window sequentially, an end point of each second time window being identical to an end point of the first time window, and determine whether there is historical bandwidth information in second time windows in an ascending order of time intervals in response to determining that there is no historical bandwidth information in the first time window.
A non-transitory storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform operations, the operations comprising:
- determining whether there is historical bandwidth information in a first time window, wherein the historical bandwidth information is bandwidth information when data is transmitted through a network in the first time window;
- determining whether there is historical bandwidth information in at least one second time window in response to determining that there is no historical bandwidth information in the first time window, the historical bandwidth information being one or more pieces of information, wherein a time interval of the second time window comprises a time interval of the first time window, and the time interval of the second window is larger than the time interval of the first time window;
- calculating target bandwidth information according to the historical bandwidth information in response to determining that there is the historical bandwidth information in the second time window;
- wherein said determining whether there is historical bandwidth information in at least one second time window in response to determining that there is no historical bandwidth information in the first time window, comprises:
- obtaining the second time window by increasing the first time window by a preset time interval each time, and determining whether there is historical bandwidth information in the obtained second time window after each time the first time window is increased by the preset time interval until the first time window is increased by the preset time interval for a preset number of times or there is historical bandwidth information in the second time window obtained by increasing the first time window by the preset time interval for at least one time, in response to determining that there is no historical bandwidth information in the first time window;
- or
- increasing time intervals of the at least one second time window sequentially, an end point of each second time window being identical to an end point of the first time window, and determining whether there is historical bandwidth information in second time windows in an ascending order of time intervals in response to determining that there is no historical bandwidth information in the first time window.
Dependencies are inferred from the claim text.