Data download process control method and apparatus, electronic device, medium, and product
By obtaining real network status parameters and preset mapping relationships, the receive buffer size is dynamically adjusted, which solves the problem that the buffer configuration parameters in the TCP protocol cannot be flexibly adjusted, optimizes network performance during data download, and reduces overall time consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
Smart Images

Figure CN122160430A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of network communication technology, and in particular to a data download process control method, apparatus, electronic device, medium, and product. Background Technology
[0002] During TCP protocol data transmission, the receive buffer is usually configured uniformly by the operating system by default.
[0003] However, in practical applications, when downloading some data resources, uniformly configured cache parameters are not optimal. The cache may be insufficient or excessive. The size of the receive buffer also affects transmission speed and latency, making it difficult to achieve an optimal balance between bandwidth and latency with uniformly configured cache parameters. Summary of the Invention
[0004] This disclosure provides a data download process control method, apparatus, electronic device, medium, and product that can dynamically adjust the data receiving buffer during the data download process to adapt to dynamic network changes and reduce the overall data download time.
[0005] In a first aspect, embodiments of this disclosure provide a data download process control method, the method comprising:
[0006] Obtain the actual network state parameters during the download of the first data segment; wherein, the first data segment is any data segment of the target data download object that is in the downloading state;
[0007] Based on the preset mapping relationship between the receive buffer size and network status parameters, the reference network status data is determined under different receive buffer parameter configurations.
[0008] Based on the actual network state parameters and the reference network state parameters, the estimated network state parameters for downloading the second data segment are determined according to different receive buffer sizes; wherein, the second data segment is the next data segment adjacent to the first data segment in the target data download object;
[0009] Based on the estimated network state parameters, the estimated download time for downloading the second data segment is calculated for different receive buffer size configurations.
[0010] Set the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment.
[0011] Secondly, embodiments of this disclosure also provide a data download process control device, the device comprising:
[0012] The network status data acquisition module is used to acquire the actual network status parameters during the download of the first data segment; wherein, the first data segment is any data segment of the target data download object that is in the downloading state;
[0013] The reference network status data determination module is used to determine the reference network status data under different receive buffer parameter configurations based on the preset mapping relationship between the receive buffer size and the network status parameters.
[0014] The network state parameter estimation module is used to determine the estimated network state parameters for downloading the second data segment based on the actual network state parameters and the reference network state parameters; wherein, the second data segment is the next data segment adjacent to the first data segment in the target data download object;
[0015] The download duration estimation module is used to calculate the estimated download duration for downloading the second data segment based on different receive buffer size configurations, according to the estimated network status parameters.
[0016] The cache configuration parameter determination module is used to set the receive cache size corresponding to the shortest estimated download duration as the receive cache size when downloading the second data segment.
[0017] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0018] One or more processors;
[0019] Storage device for storing one or more programs.
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the data download process control method as described in any embodiment of this disclosure.
[0021] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the data download process control method as described in any of the embodiments of this disclosure.
[0022] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the data download process control method as described in any of the embodiments of the present invention.
[0023] This embodiment of the disclosure obtains real network state parameters during the download of a first data segment; wherein the first data segment is any data segment of the target data download object that is in the process of being downloaded; based on a preset mapping relationship between the receive buffer size and network state parameters, reference network state data is determined under different receive buffer parameter configurations; based on the real network state parameters and the reference network state parameters, estimated network state parameters for downloading a second data segment based on different receive buffer size configurations are determined; wherein the second data segment is the next data segment of the target data download object adjacent to the first data segment; based on the estimated network state parameters, the estimated download duration for downloading the second data segment based on different receive buffer size configurations is calculated respectively; the receive buffer size corresponding to the shortest estimated download duration is set as the receive buffer size when downloading the second data segment. The technical solution of this embodiment of the disclosure solves the problem that the receive buffer configuration parameters cannot be flexibly configured, and the receive buffer can be dynamically adjusted during the data download process to reduce the overall data download time. Attached Figure Description
[0024] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0025] Figure 1 This is a schematic flowchart of a data download process control method provided in an embodiment of this disclosure;
[0026] Figure 2 This is a schematic diagram illustrating a preset mapping relationship between receive buffer size and network status parameters provided in an embodiment of this disclosure;
[0027] Figure 3 This is a schematic diagram illustrating a preset mapping relationship between receive buffer size and network status parameters provided in an embodiment of this disclosure;
[0028] Figure 4 This is a schematic flowchart of a data download process control method provided in an embodiment of this disclosure;
[0029] Figure 5 This is a schematic flowchart of a data download process control method provided in an embodiment of this disclosure;
[0030] Figure 6 This is a schematic diagram of the structure of a data download process control device provided in an embodiment of this disclosure;
[0031] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0032] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0033] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0034] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0035] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0036] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0037] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0038] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0039] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0040] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0041] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0042] Figure 1 This is a flowchart illustrating a data download process control method provided in an embodiment of the present disclosure. This embodiment is applicable to scenarios involving data transmission process management. The method can be executed by a data download process control device, which can be implemented in software and / or hardware. Optionally, the data download process control device can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.
[0043] like Figure 1 As shown, the data download process control method includes:
[0044] S110. Obtain the actual network state parameters during the download of the first data segment.
[0045] The first data segment is any data segment of the target data download object that is in the downloading state.
[0046] Typically, during data downloads, especially for large datasets, the entire dataset is not downloaded at once. Instead, multiple data segments are downloaded sequentially to alleviate memory pressure during the download process.
[0047] Network status refers to the overall operating condition of a network at a certain moment. Status data such as whether the network connection is normal, whether the network equipment is working properly, and the degree of network congestion can be used to characterize network quality.
[0048] The real network status parameters are the real network status parameters obtained during the download of the first data segment, which represent the network status during the data download process based on the data transmission protocol configuration for downloading the first data segment.
[0049] S120. Based on the preset mapping relationship between the receive buffer size and network status parameters, determine the reference network status data under different receive buffer parameter configurations.
[0050] In the process of data downloading, it was found that different terminal operating systems have different receive buffer configurations that affect network performance during data transmission based on the TCP protocol (Transmission Control Protocol).
[0051] The preset mapping relationship between receive buffer size and network status parameters can be determined by obtaining network status measurement results during actual data download, and then performing statistical analysis based on the measurement results. For example... Figure 2 and Figure 3 The diagrams shown below illustrate the preset mapping relationship between the receive buffer size and network status parameters. Figure 2 This is a preset mapping relationship between TCP receive buffer size and average speed (bandwidth). Figure 3 A preset mapping relationship between TCP receive buffer size and network latency (Round-Trip Time, RTT).
[0052] The impact of receive buffering on network quality can be divided into two aspects: transmission speed and latency, and there is a trade-off between these two. During data download, increasing the receive buffer will increase speed but increase latency; conversely, speed will decrease but latency will decrease. Therefore, it is necessary to adjust the receive buffer to find the optimal balance between bandwidth and latency, thereby achieving the best overall network service quality.
[0053] Different receive buffer parameter configurations can be any receive buffer size value within the predicted buffer size configuration range. During the process of determining the control parameters during data download, it is necessary to iterate through each configurable receive buffer size value.
[0054] For each configurable receive buffer size, the network status parameter corresponding to each configurable receive buffer size can be found in the preset mapping relationship between receive buffer size and network status parameters, thus obtaining the reference network status data for different receive buffer parameter configurations.
[0055] S130. Based on the actual network state parameters and the reference network state parameters, determine the estimated network state parameters for downloading the second data segment based on different receive buffer sizes.
[0056] The second data segment is the next data segment adjacent to the first data segment in the target data download object. After downloading the first data segment, the second data segment can be downloaded based on a TCP request for the second data segment.
[0057] It can be understood that this refers to the size of the TCP receive buffer when downloading the first data segment, or it can be one of the different receive buffer size configurations.
[0058] Therefore, the reference network state parameters and the actual network state parameters corresponding to the size of the TCP receive buffer when downloading the first data segment are known.
[0059] The system can establish a numerical relationship, such as the change in buffer size or a proportional value, between different receive buffer sizes and the TCP receive buffer size when downloading the first data segment. Within a pre-defined mapping, it can determine the change in network state parameters when the buffer size changes from one size to another. Based on the actual network state parameters, and then using this change, it can obtain the estimated network state parameters for downloading the second data segment.
[0060] S140. Based on the estimated network state parameters, calculate the estimated download time for downloading the second data segment according to different receive buffer size configurations.
[0061] Based on the estimated network state parameters and the data size of the second data segment under different receive buffer size configurations, the estimated download time for downloading the second data segment can be calculated. The download time can be calculated by dividing the total data volume by the download speed. The download speed can be determined based on the estimated network state parameters.
[0062] S150. Set the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment.
[0063] After the first data segment is downloaded, when downloading the second data segment, the receive buffer size corresponding to the shortest estimated download time can be set as the receive buffer size when downloading the second data segment, thereby controlling the data download process to adapt to network conditions.
[0064] In this embodiment, the actual network state parameters during the download of the first data segment are obtained; wherein the first data segment is any data segment of the target data download object that is in the download state; based on the preset mapping relationship between the receive buffer size and the network state parameters, reference network state data under different receive buffer parameter configurations are determined; based on the actual network state parameters and the reference network state parameters, the estimated network state parameters for downloading the second data segment based on different receive buffer size configurations are determined; wherein the second data segment is the next data segment of the target data download object adjacent to the first data segment; based on the estimated network state parameters, the estimated download duration for downloading the second data segment based on different receive buffer size configurations is calculated respectively; the receive buffer size corresponding to the shortest estimated download duration is set as the receive buffer size when downloading the second data segment. The technical solution of this embodiment solves the problem that the receive buffer configuration parameters cannot be flexibly configured, and the receive buffer can be dynamically adjusted during the data download process to reduce the overall data download time.
[0065] Figure 4 This is a flowchart illustrating a data download process control method provided in an embodiment of this disclosure. Based on the above embodiment, it further explains the process of calculating the estimated network state parameters. This method can be executed by a data download process control device, which can be implemented in software and / or hardware, optionally through an electronic device such as a mobile terminal, PC, or server.
[0066] like Figure 4 As shown, the data download process control method includes:
[0067] S210. Obtain the actual network state parameters during the process of downloading the first data segment.
[0068] The first data segment is any data segment of the target data download object that is in the downloading state.
[0069] S220. Based on the preset mapping relationship between the receive buffer size and network status parameters, determine the reference network status data under different receive buffer parameter configurations.
[0070] S230. For each different receive buffer size configuration, based on the receive buffer candidate value corresponding to the different receive buffer size configuration and the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment, determine the buffer adjustment coefficient corresponding to each receive buffer candidate value.
[0071] Assume the receive buffer configuration value when downloading the first data segment is represented as recv_buf i Each candidate value in the receive buffer can be represented as recv_bufi+1 Where i represents the sequence number of the first data segment in the target data download object. i+1 represents the sequence number of the second data segment following the first data segment in the target data download object. y i (recv_buf i This refers to the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment, y. i+1 (recv_buf i+1 This represents the reference network state parameter corresponding to the receive buffer candidate value. The buffer adjustment coefficient can be expressed as...
[0072] In one optional implementation, based on the candidate receive buffer values configured for different receive buffer sizes and the reference network state parameters corresponding to the receive buffer configuration values when downloading the first data segment, a buffer adjustment coefficient corresponding to each candidate receive buffer value is determined. This can be achieved by first calculating the ratio of the reference network state parameters corresponding to the receive buffer configuration values when downloading the first data segment to the reference network state parameters corresponding to each candidate receive buffer value, corresponding to Tune(recv_buf). i ,recv_buf i+1 Then, based on the prediction error of the historical network state parameter estimation results, each ratio is adjusted to obtain the corresponding ratio adjustment result, and the ratio adjustment result is determined as the buffer adjustment coefficient corresponding to each candidate value of the receive buffer.
[0073] The process of adjusting each ratio based on the prediction error derived from historical network state parameter estimation can be expressed as follows: err k It can be or Where k represents the k-th network parameter prediction performed before downloading the first data segment. β is the time decay coefficient, representing the weight of the historical error reference.
[0074] It is understandable that prediction errors can take other forms, such as mean absolute error, mean square error, and KL hash error. In actual control, it is necessary to correct future predictions while taking historical errors into account. The actual configurations in the above formulas can be constrained and weighted according to the actual application and the device's memory situation to achieve the optimal configuration.
[0075] S240. Based on the buffer adjustment coefficient and the actual network state parameters, determine the estimated network state parameters for downloading the second data segment according to different receive buffer sizes.
[0076] The estimated network state parameters can be expressed as: y i =bandi or rtt i Represents the actual network state parameters.
[0077] S250. Based on the estimated network state parameters, calculate the estimated download time for downloading the second data segment according to different receive buffer size configurations.
[0078] The estimated download time can be calculated based on the bandwidth, data transmission latency, and data size of the second data segment in each estimated network state parameter, thus obtaining the estimated download time for downloading the second data segment based on different receive buffer size configurations.
[0079]
[0080] Among them, T i+1 The size of the second data segment is band. i+1 and band i+1 To predict network state parameters The two parameters in it.
[0081] S260. Set the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment.
[0082] The technical solution of this disclosure involves obtaining real network state parameters during the download of a first data segment; the first data segment is any data segment of the target data download object that is in the download state; based on a preset mapping relationship between the receive buffer size and network state parameters, reference network state data is determined under different receive buffer parameter configurations; for each different receive buffer size configuration, a buffer adjustment coefficient is determined based on the receive buffer candidate value corresponding to the different receive buffer size configuration and the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment. Based on the buffer adjustment coefficient and the real network state parameters, estimated network state parameters for downloading a second data segment based on different receive buffer size configurations are determined; based on the estimated network state parameters, estimated download durations for downloading the second data segment based on different receive buffer size configurations are calculated respectively. The receive buffer size corresponding to the shortest estimated download duration is set as the receive buffer size when downloading the second data segment. The technical solution of this disclosure solves the problems of inflexible configuration of receive buffer parameters and how to determine accurate buffer adjustment coefficients. It allows dynamic adjustment of the receive buffer during data download to achieve the best balance between network latency and bandwidth, thereby reducing overall data download time.
[0083] Figure 5This is a flowchart illustrating a data download process control method provided in an embodiment of this disclosure. Based on the above embodiment, the closed-loop control process of the data download process is further explained. This method can be executed by a data download process control device, which can be implemented in software and / or hardware, optionally through an electronic device, such as a mobile terminal, PC, or server.
[0084] like Figure 5 As shown, the data download process control method includes:
[0085] S310. When the first data segment is the first data segment of the target data download object, configure the data download protocol parameters for downloading the first data segment according to the preset receive buffer size value.
[0086] The preset receive buffer size is determined based on the object type of the target data being downloaded. Different object types correspond to different preset receive buffer sizes. For example, the preset receive buffer size when the target data is video data can be larger than the preset receive buffer size when the target data is text data. It can also be set in conjunction with the device's memory size.
[0087] The preset receive buffer size can be used as the initial receive buffer parameter value during the download process of the target data download object, that is, the protocol memory during the data download link startup phase.
[0088] S320. Obtain the actual network state parameters during the download of the first data segment.
[0089] S330. Based on the preset mapping relationship between the receive buffer size and network status parameters, determine the reference network status data under different receive buffer parameter configurations.
[0090] S340. Based on the actual network state parameters and the reference network state parameters, determine the estimated network state parameters for downloading the second data segment based on different receive buffer sizes.
[0091] The second data segment is the next data segment in the target data download object that is adjacent to the first data segment.
[0092] S350. Based on the estimated network state parameters, calculate the estimated download time for downloading the second data segment according to different receive buffer size configurations.
[0093] S360: Set the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment.
[0094] S370. Determine whether the second data segment is the last data segment of the target data download object.
[0095] S380. When the second data segment is not the last data segment of the target data download object, during the download process of the second data segment, update the corresponding data segments of the first and second data segments in the target data download object to continuously control the data download process.
[0096] When the second data segment is not the last data segment of the target data download object, it indicates that the target data download object has not been completely downloaded, and the remaining data segments need to be downloaded. Therefore, during the download of the second data segment, the above steps can be repeated to determine the receive buffer for data segments following the second data segment. Updating the corresponding data segments of the first and second data segments in the target data download object can be done by updating the data segment corresponding to the first data segment in the target data download object to the data segment corresponding to the original second data segment that is currently being downloaded, and updating the data segment corresponding to the second data segment in the target data download object to the next data segment of the original second data segment that is currently being downloaded.
[0097] When the second data segment is the last data segment of the target data download object, the data download protocol parameters are reconfigured according to the preset receive buffer size in order to download the data segment of the new target data download object.
[0098] In a specific application instance where video is the data download object, the protocol receive buffer during the video download initiation phase can be configured first to download the first video segment and measure the initial network state data. Then, based on historical measurement data and the network state parameter prediction implementation method (prediction model) provided in the above embodiments, and using historical errors for prediction correction, the expected download time of the next video segment is obtained. Finally, the TCP receive buffer corresponding to the shortest download time is selected as the control parameter for downloading the next video segment. Based on the adjusted control parameters, the data download of the next video segment is performed. After completion, the actual download speed and latency are recorded and fed back to the prediction model until the entire video data object is downloaded or the download process is terminated. During the data download process based on the data download process control method provided in this embodiment, latency and network speed can be effectively balanced to achieve the shortest overall data download time and optimize the network quality of practical applications. For example, in short video applications, it can effectively alleviate video stuttering and loading time.
[0099] The technical solution of this disclosure embodiment includes the following steps: When the first data segment is the first data segment of the target data download object, the data download protocol parameters for downloading the first data segment are configured according to a preset receive buffer size value, wherein the preset receive buffer size is determined based on the object type of the target data download object; the actual network status parameters during the downloading of the first data segment are obtained; based on a preset mapping relationship between the receive buffer size and the network status parameters, reference network status data is determined under different receive buffer parameter configurations; based on the actual network status parameters and the reference network status parameters, estimated network status parameters for downloading the second data segment are determined based on different receive buffer size configurations; wherein the second data segment is the next data segment in the target data download object adjacent to the first data segment. Based on the estimated network state parameters, the estimated download time for downloading the second data segment is calculated for different receive buffer sizes. The receive buffer size corresponding to the shortest estimated download time is set as the receive buffer size when downloading the second data segment. It is determined whether the second data segment is the last data segment of the target data download object. When the second data segment is not the last data segment of the target data download object, during the download of the second data segment, the corresponding data segments of the first and second data segments in the target data download object are updated to continuously control the data download process. Alternatively, when the second data segment is the last data segment of the target data download object, the data download protocol parameters are reconfigured according to the preset receive buffer size to download the new data segment of the target data download object. The technical solution of this disclosure solves the problem of the inflexible configuration of receive buffer parameters and the problem of how to control the data download process in a closed loop throughout the entire data download process. It can dynamically adjust the receive buffer during the data download process, optimize the buffer allocation and usage method when transmitting data based on the TCP protocol without changing the operating system kernel implementation, and reduce the overall data download time.
[0100] Figure 6 This disclosure provides a data download process control device, which is applicable to scenarios involving data transmission process management. The data download process control device can be implemented in the form of software and / or hardware, and can be configured on an electronic device, such as a mobile terminal, a PC, or a server.
[0101] like Figure 6 As shown, the data download process control device includes: a network status data acquisition module 410, a reference network status data determination module 420, a network status parameter estimation module 430, a download duration estimation module 440, and a cache configuration parameter determination module 450.
[0102] The network status data acquisition module 410 is used to acquire the actual network status parameters during the download of the first data segment; wherein the first data segment is any data segment of the target data download object that is in the download state; the reference network status data determination module 420 is used to determine the reference network status data under different receive buffer parameter configurations based on the preset mapping relationship between the receive buffer size and the network status parameters; the network status parameter estimation module 430 is used to determine the estimated network status parameters for downloading the second data segment based on different receive buffer size configurations according to the actual network status parameters and the reference network status parameters; wherein the second data segment is the next data segment of the target data download object adjacent to the first data segment; the download duration estimation module 440 is used to calculate the estimated download duration for downloading the second data segment based on different receive buffer size configurations according to the estimated network status parameters; the buffer configuration parameter determination module 450 is used to set the receive buffer size corresponding to the shortest duration in the estimated download duration as the receive buffer size when downloading the second data segment.
[0103] The technical solution of this disclosure involves obtaining real network state parameters during the download of a first data segment; wherein the first data segment is any data segment of the target data download object that is in the process of being downloaded; determining reference network state data under different receive buffer parameter configurations based on a preset mapping relationship between the receive buffer size and network state parameters; determining estimated network state parameters for downloading a second data segment based on different receive buffer size configurations based on the real network state parameters and the reference network state parameters; wherein the second data segment is the next data segment of the target data download object adjacent to the first data segment; calculating the estimated download duration for downloading the second data segment based on different receive buffer size configurations based on the estimated network state parameters; and setting the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment. The technical solution of this disclosure solves the problem of inflexible receive buffer configuration parameters, allowing dynamic adjustment of the receive buffer during data download to reduce overall data download time.
[0104] In one optional implementation, the network state parameter estimation module 430 is specifically used for:
[0105] For each different receive buffer size configuration, based on the receive buffer candidate value corresponding to the different receive buffer size configuration and the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment, determine the buffer adjustment coefficient corresponding to each receive buffer candidate value;
[0106] Based on the buffer adjustment coefficient and the actual network state parameters, the estimated network state parameters for downloading the second data segment are determined according to different receive buffer sizes.
[0107] In one optional implementation, the network state parameter estimation module 430 is specifically used for:
[0108] Calculate the ratio of the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment to the reference network state parameter corresponding to each receive buffer candidate value;
[0109] The prediction error based on the historical network state parameter estimation results is adjusted for each ratio to obtain the corresponding ratio adjustment result, and the ratio adjustment result is determined as the buffer adjustment coefficient corresponding to each candidate value of the receive buffer.
[0110] In one optional implementation, the download duration estimation module 440 is specifically used for:
[0111] The data download time is calculated based on the bandwidth, data transmission delay, and second data segment size in each estimated network state parameter, resulting in the estimated download time for downloading the second data segment based on different receive buffer size configurations.
[0112] In one optional implementation, the data download process control device includes a download cache and network status data analysis module, specifically used for:
[0113] During the download of historical data objects, the network latency and bandwidth of data download scenarios with different receive buffer sizes are analyzed.
[0114] Statistical analysis based on network latency and network bandwidth is used to determine the average network latency and average network bandwidth corresponding to different receive buffer size configurations.
[0115] Based on the average network latency and average network bandwidth, a first preset mapping relationship between the receive buffer size and the average network latency is constructed, and a second preset mapping relationship between the receive buffer size and the average network bandwidth is constructed.
[0116] In an optional implementation, the cache configuration parameter determination module 450 is further configured to:
[0117] When the first data segment is the first data segment of the target data download object, before downloading the first data segment, configure the data download protocol parameters for downloading the first data segment according to the preset receive buffer size value;
[0118] The preset receive buffer size is determined based on the object type of the target data download object.
[0119] In an optional implementation, the network status data acquisition module 410 is further configured to: determine whether the second data segment is the last data segment of the target data download object;
[0120] Correspondingly, when the second data segment is the last data segment of the target data download object, the cache configuration parameter determination module 450 is also used to: reconfigure the data download protocol parameters according to the preset receive cache size to download the new data segment of the target data download object; or,
[0121] When the second data segment is not the last data segment of the target data download object, the reference network status data determination module 410 is further configured to: update the corresponding data segments of the first and second data segments in the target data download object during the download process of the second data segment, so as to continuously control the data download process.
[0122] The data download process control device provided in this disclosure can execute the data download process control method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution.
[0123] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0124] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 7 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 7 The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0125] like Figure 7As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 505 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0126] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0127] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0128] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0129] The electronic device provided in this embodiment and the data download process control method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0130] This disclosure also provides a computer storage medium storing a computer program that, when executed by a processor, implements the data download process control method provided in the above embodiments.
[0131] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0132] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0133] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0134] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to:
[0135] Obtain the actual network state parameters during the download of the first data segment; wherein, the first data segment is any data segment of the target data download object that is in the downloading state;
[0136] Based on the preset mapping relationship between the receive buffer size and network status parameters, the reference network status data is determined under different receive buffer parameter configurations.
[0137] Based on the actual network state parameters and the reference network state parameters, the estimated network state parameters for downloading the second data segment are determined according to different receive buffer sizes; wherein, the second data segment is the next data segment adjacent to the first data segment in the target data download object;
[0138] Based on the estimated network state parameters, the estimated download time for downloading the second data segment is calculated for different receive buffer size configurations.
[0139] Set the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment.
[0140] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0142] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0143] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0144] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0145] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the data download process control method provided in any embodiment of this disclosure.
[0146] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0147] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0148] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0149] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A data download process control method, characterized in that, include: Obtain the actual network state parameters during the download of the first data segment; wherein, the first data segment is any data segment of the target data download object that is in the downloading state; Based on the preset mapping relationship between the receive buffer size and network status parameters, the reference network status data is determined under different receive buffer parameter configurations. Based on the actual network state parameters and the reference network state parameters, the estimated network state parameters for downloading the second data segment are determined according to different receive buffer sizes; wherein, the second data segment is the next data segment adjacent to the first data segment in the target data download object; Based on the estimated network state parameters, calculate the estimated download time for downloading the second data segment based on different receive buffer size configurations; Set the receive buffer size corresponding to the shortest estimated download duration as the receive buffer size when downloading the second data segment.
2. The method according to claim 1, characterized in that, The step of determining the estimated network state parameters for downloading the second data segment based on the actual network state parameters and the reference network state parameters includes: For each different receive buffer size configuration, based on the receive buffer candidate value corresponding to the different receive buffer size configuration and the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment, determine the buffer adjustment coefficient corresponding to each receive buffer candidate value; Based on the cache adjustment coefficient and the actual network state parameters, the estimated network state parameters for downloading the second data segment are determined according to different receive cache sizes.
3. The method according to claim 2, characterized in that, The process of determining the cache adjustment coefficient corresponding to each candidate receive cache value based on different receive cache sizes and the reference network state parameters corresponding to the receive cache configuration values when downloading the first data segment includes: Calculate the ratio of the reference network state parameter corresponding to the receive buffer configuration value when downloading the first data segment to the reference network state parameter corresponding to each receive buffer candidate value; The prediction error based on the historical network state parameter estimation results is used to adjust each of the ratios to obtain the corresponding ratio adjustment results, and the ratio adjustment results are determined as the buffer adjustment coefficients corresponding to each of the receiving buffer candidate values.
4. The method according to claim 1, characterized in that, The step of calculating the estimated download time for downloading the second data segment based on the estimated network state parameters and different receive buffer sizes includes: The data download time is calculated based on the bandwidth, data transmission delay, and data size of the second data segment in each of the estimated network state parameters, to obtain the estimated download time for downloading the second data segment based on different receive buffer size configurations.
5. The method according to claim 1, characterized in that, The process of obtaining the preset mapping relationship includes: During the download of historical data objects, the network latency and bandwidth of data download scenarios with different receive buffer sizes are analyzed. Based on the network latency and network bandwidth, statistical analysis is performed to determine the average network latency and average network bandwidth corresponding to different receive buffer size configurations. Based on the average network latency and the average network bandwidth, a first preset mapping relationship between the receive buffer size and the average network latency, and a second preset mapping relationship between the receive buffer size and the average network bandwidth are respectively constructed.
6. The method according to any one of claims 1-5, characterized in that, When the first data segment is the first data segment of the target data download object, the method further includes: Before downloading the first data segment, configure the data download protocol parameters for downloading the first data segment according to the preset receive buffer size value; The preset receive buffer size is determined based on the object type of the target data download object.
7. The method according to claim 6, characterized in that, The method further includes: Determine whether the second data segment is the last data segment of the target data download object; When the second data segment is the last data segment of the target data download object, the data download protocol parameters are reconfigured according to the preset receive buffer size to download the new data segment of the target data download object; or, When the second data segment is not the last data segment of the target data download object, during the download process of the second data segment, the corresponding data segments of the first data segment and the second data segment in the target data download object are updated to continuously control the data download process.
8. A data download process control device, characterized in that, include: The network status data acquisition module is used to acquire real network status parameters during the download of the first data segment; wherein, the first data segment is any data segment of the target data download object that is in the downloading state; The reference network status data determination module is used to determine the reference network status data under different receive buffer parameter configurations based on the preset mapping relationship between the receive buffer size and the network status parameters. The network state parameter estimation module is used to determine the estimated network state parameters for downloading the second data segment based on the actual network state parameters and the reference network state parameters; wherein, the second data segment is the next data segment adjacent to the first data segment in the target data download object; The download duration estimation module is used to calculate the estimated download duration for downloading the second data segment based on different receive buffer size configurations, according to the estimated network status parameters. The cache configuration parameter determination module is used to set the receive cache size corresponding to the shortest duration in the estimated download duration as the receive cache size when downloading the second data segment.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the data download process control method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the data download process control method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the data download process control method as described in any one of claims 1-7.