Data transmission method and device, nonvolatile storage medium and electronic equipment

By using the DTC-NGA and TB-DPQBA algorithms, dynamic hierarchical and differentiated bandwidth allocation solves the problem of uneven resource allocation in video segmentation and on-demand, improving network resource utilization efficiency and user experience.

CN120956984APending Publication Date: 2025-11-14CHINA TELECOM CORP LTD

Patent Information

Application Number
CN202511165933.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In video-on-demand scenarios, the static and singular bandwidth allocation strategies in existing technologies lead to uneven resource allocation, which cannot effectively cope with dynamic changes in network status, affecting user experience and resource utilization efficiency.

Method used

By acquiring network layer data and application layer behavioral data from clients, a multi-dimensional analysis is performed using the Dynamic Temporal Correlation Network Classification (DTC-NGA) algorithm. This is combined with a sliding window to extract trend, fluctuation, and anomaly density features, dynamically adjusting feature weights to achieve accurate classification of client network status. Simultaneously, a Dynamic Priority Token Bucket (TB-DPQBA) algorithm is employed to allocate differentiated bandwidth quotas and connection resources to clients with different network levels.

Benefits of technology

It achieves efficient bandwidth control and resource optimization in complex network environments, improves network resource utilization efficiency, enhances video playback smoothness, and ensures priority service for users with high network quality and resource control for users with low network quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956984A_ABST
    Figure CN120956984A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, a nonvolatile storage medium and electronic equipment. The method comprises the steps that a plurality of fragmentation requests sent by a plurality of clients are acquired, and each fragmentation request at least comprises network layer data and application layer behavior data; determining a network quality score of the client according to the network layer data and the application layer behavior data of the client; according to the network quality score, the plurality of clients are divided into a plurality of grades, and the grades are in positive correlation with the priority of fragment transmission; determining the maximum connection number corresponding to the clients of the plurality of levels, and determining a fragment transmission strategy based on the maximum connection number; and controlling fragmentation transmission of the client according to the fragmentation transmission strategy. According to the method and the device, the technical problems of non-uniform resource allocation and incapability of effectively coping with the dynamic change of the network state caused by the static property and the singleness of a related bandwidth allocation strategy in a video fragment on-demand scene are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video processing technology, and more specifically, to a data transmission method and apparatus, a non-volatile storage medium, and an electronic device. Background Technology

[0002] One of the core challenges facing the video segmentation and on-demand technology field is the complexity of user terminal network environments, leading to inconsistent video playback quality. Specifically, this manifests in the coexistence of complex scenarios such as 5G access, cellular network signal attenuation, and fluctuating bandwidth in shared Wi-Fi. This network diversity presents a critical issue of "multi-dimensional network adaptation imbalance" in server resource scheduling. Specifically, how to maintain high-speed transmission for clients with good network conditions while avoiding resource waste caused by invalid retransmissions from clients with poor network conditions, thus achieving intelligent and elastic allocation of server resources.

[0003] The interaction process of a video-on-demand system is divided into client-side processing and server-side response. Specifically, on the client side, video decoding and playback, buffer management, video segmentation requests based on HTTP / TCP protocols, and passive bitrate switching based solely on buffer levels are all handled. On the server side, static rule binding strategies or no bandwidth allocation are used, requests are responded to based on fixed quota mechanisms or no allocation is used, and pre-slices are stored according to resolution or bitrate.

[0004] In summary, for the client side, the relevant technologies have the following problems: The bitrate reduction mechanism is only triggered after a noticeable playback interruption occurs, such as buffering or screen freezing, which can have a negative impact on user experience that is difficult to recover from. Relying solely on a single, real-time indicator (such as the download speed of the latest segment) to judge network quality, without comprehensively modeling and analyzing multiple characteristics such as transmission latency fluctuations, the stability of historical connections, and packet loss patterns, can easily lead to high-throughput terminals being misjudged as requiring rate limiting. For the server side, the relevant technologies have the following problems: Fixed bandwidth reservation based on resolution, without linkage to real-time channel quality (such as high bitrate requests in weak signal areas), leads to a surge in segment retransmission rates. In sudden scenarios (such as a sudden increase in WiFi devices), fixed quotas cannot be adjusted in real time, easily resulting in resource mismatch of "idle high-quality bandwidth and congested low-quality channels" when high-value users and low-quality users are concurrent.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides a data transmission method and apparatus, a non-volatile storage medium, and an electronic device to at least solve the technical problems of uneven resource allocation and inability to effectively cope with dynamic changes in network status caused by the static and singular nature of relevant bandwidth allocation strategies in video segmentation and on-demand scenarios.

[0007] According to one aspect of this application, a data transmission method is provided, comprising: acquiring multiple fragmentation requests sent by multiple clients, wherein each fragmentation request includes at least network layer data and application layer behavioral data; determining a network quality score for a client based on the client's network layer data and application layer behavioral data; classifying the multiple clients into multiple levels based on the network quality score, wherein the level is positively correlated with the priority of fragmentation transmission; determining the maximum number of connections corresponding to each of the multiple levels of clients, and determining a fragmentation transmission strategy based on the maximum number of connections; and controlling the fragmentation transmission of the clients according to the fragmentation transmission strategy.

[0008] Optionally, based on the client's network layer data and application layer behavioral data, a network quality score for the client is determined, including: fusing the network layer data and application layer behavioral data into a target matrix; calculating trend features, fluctuation features, and anomaly density features in the target matrix within a sliding window, wherein the size of the sliding window is positively correlated with the frequency of network state changes, the trend features are used to characterize the trend of network state changes of the client, the fluctuation features are used to characterize the network stability of the client, and the anomaly density features are used to characterize the historical packet loss anomaly frequency of data transmission between the client and the server; determining whether a preset abnormal event has occurred based on the trend features, fluctuation features, and anomaly density features, and dynamically adjusting the weight coefficients of the elements in the target matrix according to the type of preset abnormal event; normalizing each element in the target matrix, and then performing a weighted linear combination of each normalized element using the weight coefficients to obtain the network quality score.

[0009] Optionally, the network layer data includes at least: instantaneous bandwidth for fragment download, round-trip latency for fragment requests, and fragment request failure rate; the application layer behavioral data includes at least: client buffer duration, fragment request interval, and fragment download time; the trend characteristics, fluctuation characteristics, and anomaly density characteristics in the target matrix are calculated within a sliding window, including: calculating the first average rate of change of instantaneous bandwidth for fragment download and the second average rate of change of client buffer duration within the sliding window, and determining the trend characteristics based on the first and second average rates of change; calculating the first standard deviation of round-trip latency for fragment requests and the coefficient of variation of fragment request intervals within the sliding window, and determining the fluctuation characteristics based on the first standard deviation and the coefficient of variation; determining the anomaly density characteristics based on the target number and the parameter packet loss anomaly flag of the target number within the sliding window, wherein the target number is the number of fragment requests sent by the client within the sliding window; if the packet loss rate during the i-th fragment request sending process is greater than a preset packet loss threshold, the value of the i-th parameter packet loss anomaly flag is 1, otherwise, the value is 0; i is a positive integer not greater than n, and n is the target number.

[0010] Optionally, the weight coefficients of elements in the target matrix are dynamically adjusted according to the types of preset abnormal events, including: reducing the weight coefficient of client buffer duration and the weight coefficient of instantaneous bandwidth for fragment download when a buffer shortage event is detected, wherein the triggering conditions for a buffer shortage event include: the second average rate of change of client buffer duration is less than a first preset threshold, and the client buffer duration is less than a second preset threshold; and reducing the weight coefficient of fragment request failure rate and the weight coefficient of fragment download time when a continuous packet loss event is detected, wherein the triggering conditions for a continuous packet loss event include: the abnormal density feature is greater than a third preset threshold.

[0011] Optionally, the weight coefficients of elements in the target matrix are dynamically adjusted according to the types of preset abnormal events, including: increasing the weight coefficient of the instantaneous bandwidth of the fragmented download when a bandwidth surge event is detected, wherein the triggering conditions for the bandwidth surge event include: the first average rate of change of the instantaneous bandwidth of the fragmented download being greater than a fourth preset threshold and the instantaneous bandwidth of the fragmented download being greater than the product of the historical average bandwidth and the first preset value; increasing the weight coefficient of the fragmented request interval and decreasing the weight coefficient of the client buffer duration when a request interval abnormal event is detected, wherein the triggering conditions for the request interval abnormal event include: the coefficient of variation being greater than a fifth preset threshold.

[0012] Optionally, based on the network quality score, multiple clients are divided into multiple levels, including: for any target network quality score, among the different preset thresholds corresponding to different levels arranged from smallest to largest, finding the highest level that the target network quality score can reach, where the highest level is the largest positive integer that satisfies the lower limit threshold of the target network quality score being greater than or equal to the target level; and classifying the clients corresponding to the target network quality score to the highest level that the target network quality score can reach.

[0013] Optionally, before controlling the fragmented transmission of the client according to the fragmented transmission strategy, the method further includes: determining the token generation rate of different levels of clients based on the available bandwidth of the server and the different ratio coefficients corresponding to different levels of clients, and updating the token generation rate according to changes in the number of clients and changes in bandwidth utilization; adding tokens to the token bucket according to a preset time interval and the token generation rate; and determining that fragmented transmission with the client is allowed if the amount of fragmented data indicated by the fragmented request sent by the client is less than the actual capacity of the token bucket.

[0014] Optionally, the token generation rate is updated based on changes in the number of clients and changes in bandwidth utilization, including: updating the token generation rate according to different weighting coefficients corresponding to different client levels when the number of clients of any level exceeds a preset multiple of the historical average; reclaiming bandwidth quotas for the first client and calculating the total reclaimed bandwidth quota when the server's bandwidth utilization exceeds a bandwidth utilization threshold, wherein the level of the first client is lower than the level of the second client among multiple clients; determining the updated token generation rate corresponding to the first client based on the token generation rate before the update and a first parameter, wherein the first parameter is determined based on the total number of levels and the level number of the first client; and determining the updated token generation rate corresponding to the second client based on the token generation rate before the update, the total reclaimed bandwidth quota, and the bandwidth quota of the second client.

[0015] Optionally, after updating the token generation rate based on changes in the number of clients and changes in bandwidth utilization, the method further includes: when the bandwidth utilization rate of the server is less than the bandwidth utilization threshold and the number of clients at each level is less than their respective historical average number, restoring the updated token generation rate sequentially in multiple stages based on the target order, wherein each stage is separated by a preset time interval and the target order is from low to high level.

[0016] Optionally, determining the maximum number of connections corresponding to multiple client tiers includes: determining the maximum number of tokens in the token bucket corresponding to each client tier based on the average data volume of the fragmented data indicated by the fragmentation request, the number of clients of different tiers, and the capacity difference between the token buckets corresponding to clients of adjacent tiers; determining the maximum number of connections corresponding to each client tier based on the maximum number of tokens in the token bucket corresponding to each client tier and the average data volume of the fragmented data; controlling the fragmented transmission of clients according to the fragmented transmission strategy includes: allocating connection resources to clients of that tier when the number of connections of any client tier is less than the maximum number of connections corresponding to that tier, and sending the fragmented data indicated by the fragmentation request to the client; adding clients of that tier to the waiting queue when the number of connections of any client tier is not less than the maximum number of connections corresponding to that tier, and discarding the fragmented data if the waiting timeout occurs.

[0017] According to another aspect of this application, a data transmission apparatus is also provided, comprising: an acquisition module for acquiring multiple fragmentation requests sent by multiple clients, wherein each fragmentation request includes at least network layer data and application layer behavioral data; a first determination module for determining a client's network quality score based on the client's network layer data and application layer behavioral data; a partitioning module for partitioning the multiple clients into multiple levels based on the network quality score, wherein the level is positively correlated with the priority of fragmentation transmission; a second determination module for determining the maximum number of connections corresponding to each of the multiple levels of clients, and determining a fragmentation transmission strategy based on the maximum number of connections; and a transmission module for controlling the fragmentation transmission of the clients according to the fragmentation transmission strategy.

[0018] According to another aspect of this application, a non-volatile storage medium is also provided, the storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the above data transmission method.

[0019] According to another aspect of this application, an electronic device is also provided, comprising: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes the above-described data transfer method during runtime.

[0020] According to another aspect of this application, a computer program is also provided, wherein the computer program, when executed by a processor, implements the above-described data transmission method.

[0021] According to another aspect of this application, a computer program product is also provided, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-described data transmission method.

[0022] This application employs a method that acquires multiple fragmentation requests sent by multiple clients, each fragmentation request including at least network layer data and application layer behavioral data; determines the client's network quality score based on the client's network layer data and application layer behavioral data; classifies multiple clients into multiple levels based on the network quality score, where the level is positively correlated with the priority of fragmentation transmission; determines the maximum number of connections corresponding to each level of client, and determines the fragmentation transmission strategy based on the maximum number of connections; and controls the fragmentation transmission of clients according to the fragmentation transmission strategy. This achieves the goal of intelligently optimizing the bandwidth allocation for video fragmentation on-demand, thereby improving network resource utilization efficiency and enhancing the smoothness of video playback in dynamic network environments. Furthermore, it solves the technical problems of uneven resource allocation and inability to effectively cope with dynamic changes in network status caused by the static and singular nature of bandwidth allocation strategies in video fragmentation on-demand scenarios. Attached Figure Description

[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0024] Figure 1 This is a flowchart of a data transmission method according to an embodiment of this application;

[0025] Figure 2 This is a flowchart of another data transmission method according to an embodiment of this application;

[0026] Figure 3 This is a flowchart of a client network level classification method according to an embodiment of this application;

[0027] Figure 4 This is a flowchart of a method for calculating network grades based on DTC-NGA according to an embodiment of this application;

[0028] Figure 5 This is a flowchart of a method for obtaining a token based on TB-DPQBA according to an embodiment of this application;

[0029] Figure 6 This is a flowchart of a method for a client to request video segments according to an embodiment of this application;

[0030] Figure 7 This is a schematic diagram illustrating parameter uploading and storage according to an embodiment of this application;

[0031] Figure 8 This is a structural diagram of a data transmission device according to an embodiment of this application;

[0032] Figure 9 This is a hardware structure block diagram of a computer terminal according to an embodiment of the present application of a data transmission method. Detailed Implementation

[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0035] Patent CN119277125A discloses a video playback bandwidth allocation scheme, covering steps such as receiving requests, determining video and features, calculating experience quality gain, and allocating bandwidth based on gain and bandwidth consumption. It can also optimize resources by utilizing bandwidth released after video playback ends. However, this scheme has shortcomings. Regarding network state adaptability, it does not fully consider the dynamic heterogeneity of client networks, and does not incorporate real-time network parameters when determining bandwidth allocation. In complex network environments, it is difficult to accurately allocate bandwidth, failing to guarantee a high-quality user experience while also failing to prevent low-quality users from excessively consuming resources. Furthermore, when dealing with a large number of concurrent requests, it lacks reasonable scheduling of server resources, easily leading to excessive server load and resource imbalance, affecting service performance and user experience.

[0036] Patent CN119383405A discloses a video segmentation transmission and reception scheme, which creates multiple data streams through the QUIC protocol. It combines the number of segments, buffers, and resource usage, employing time-sharing and concurrency strategies to manage the data streams and improve transmission stability. However, this scheme does not comprehensively analyze multi-dimensional client data, making it unable to accurately classify network levels; it lacks a differentiated bandwidth allocation mechanism based on global resources and network levels, making it difficult to balance resource consumption by users with high and low network quality; and it does not design dedicated segmentation and connection management strategies for different network levels, making it difficult to achieve efficient bandwidth control and resource optimization.

[0037] To address the aforementioned issues, this application provides relevant solutions, which are detailed below.

[0038] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:

[0039] The Dynamic Temporal Correlation-based Network Grading Algorithm (DTC-NGA) addresses the limitations of traditional methods that rely on single network metrics (such as download speed or video importance) or static weighting strategies. These methods fail to adapt to dynamic changes in network conditions, resulting in coarse grading and delayed responses. DTC-NGA, however, integrates client network layer parameters, application layer behavioral data, and historical request records. It utilizes a sliding window to extract trend, fluctuation, and anomaly density features and dynamically adjusts feature weights using event-driven mechanisms (such as buffer insufficiency or packet loss anomalies), achieving real-time and accurate grading of client network conditions. This method overcomes the limitations of traditional single-metric and static rules by dynamically analyzing time-series data and adjusting weights through event-driven processes. It solves the problems of delayed grading and poor adaptability inherent in traditional methods, significantly improving grading accuracy and response speed in complex network environments.

[0040] The Token Bucket with Dynamic Priority QueueBased Bandwidth Allocation (TB-DPQBA) algorithm, while employing methods that generate tokens at a fixed rate and with a fixed bucket capacity, fails to differentiate between client network states and cannot adapt to dynamic resource scheduling in complex network environments. TB-DPQBA, however, utilizes a dynamic hierarchical shared token generation mechanism. It allocates differentiated token generation rates based on client network levels (defined by the DTC-NGA algorithm). When system bandwidth utilization exceeds limits or client requests surge, it automatically reclaims bandwidth from lower-level clients and reallocates it to higher-level clients according to priority. Simultaneously, it dynamically adjusts the bucket capacity to match real-time network load, achieving dynamic optimization and scheduling of token resources for multi-level clients. This solves problems such as resource mismatch, rate limiting for high-bandwidth users, and invalid retransmissions in weak networks caused by static allocation in traditional methods, significantly improving bandwidth utilization and user experience.

[0041] According to an embodiment of this application, a method embodiment for data transmission is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0042] Figure 1 This is a flowchart of a data transmission method according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0043] Step S102: Obtain multiple sharding requests sent by multiple clients, wherein each sharding request includes at least network layer data and application layer behavioral data.

[0044] A segmentation request is a process in video streaming where a client (such as a user's player) requests a portion of the video content from a server; this is known as video "segmentation." In video-on-demand scenarios, the video is pre-divided into a series of smaller data blocks, each of which is called a segment.

[0045] In step S102, the video server receives video segmentation requests from multiple clients. The segmentation requests not only contain the demand signal for obtaining a specific video segment, but also carry real-time status information of the client's current network environment (network layer data) and video playback behavior data (application layer behavior data).

[0046] Among them, application layer behavioral data A t Including but not limited to: client buffer duration D t Fragmentation request interval I tDownload time in chunks (T) t Client buffer duration D t This represents the remaining playable video duration in the media buffer, obtained by the client player, in seconds (s). The segment request interval is... t The time interval between two adjacent fragment requests, in milliseconds (ms). Fragment download time T. t The total time taken from sending a shard request to receiving the shard data for a single shard (including all overhead such as TCP handshake and HTTP response) is measured in milliseconds (ms).

[0047] Network layer data N t Including but not limited to: instantaneous bandwidth B for fragmented downloads t Fragmentation request round-trip latency R t HTTP request failure rate P t Instantaneous bandwidth B for fragmented download t The size S of the most recently acquired video segment slice Download time T t The ratio, in Mbps, is Fragment request round-trip latency R t It is the timestamp t of the client sending the fragmentation request. send The timestamp t of the server response reaching the client recv The difference, in milliseconds (ms). HTTP request failure rate P. t This represents the proportion of client requests that failed to receive complete shard data in the most recent k shard requests. (The total number of requests is k). Any HTTP status code other than 200 indicates a timeout and failure.

[0048] Step S104: Determine the network quality score of the client based on the client's network layer data and application layer behavior data.

[0049] For example, step S104 stores the parameters uploaded by the client in the most recent n requests (including the parameters of the current request), and the storage result is H. t H t It is an n×7 matrix. The parameter storage location can be customized. The default is the local cache on the server. The default value of n is 20, which means storing 20 historical data (preliminary experiments have verified that this value can balance the calculation accuracy and storage overhead in typical network fluctuation scenarios).

[0050]

[0051] Among them, F t;i It is a packet loss exception marker, which is generated by P t;i The calculated value of i (where i is an integer from 0 to n-1) is given if P t;i >Pthresh (P thresh This is a preset packet loss threshold, with a default value of 0.1. Subsequent calculations using percentages will return 1 if packet loss is abnormal, otherwise 0. The parameter 't' represents the latest data, and 't-n+1' represents the oldest data. (Using B...) t;i For example, B t This is the latest data, B t;n:1 This is the oldest data.

[0052] In H t In this context, data indices start with 't' and end with 'tn', representing n data items. The index 't' refers to the data currently being transmitted by the client. For example, B... t This is the data currently being transmitted by the client, B t;1 It's historical data.

[0053] Furthermore, H can be extracted using a sliding window. t The network status score is calculated by dynamically adjusting the feature weights based on the trend, fluctuation, and anomaly density characteristics of the network, combined with event-driven mechanisms (such as insufficient buffering and packet loss anomalies).

[0054] In step S104, after receiving the client's fragmentation request, the server initiates the calculation of the network quality score. Based on the Dynamic Temporal Correlation Network Grading Algorithm (DTC-NGA), it integrates network layer and application layer data reported by the client and uses a sliding window method to capture network status trends, fluctuations, and abnormal packet loss density. Subsequently, considering the immediate impact of network events, such as buffer insufficiency and continuous packet loss events, the weights of the above features are dynamically adjusted to more accurately reflect the client's real network experience. Finally, through a weighted linear combination model, all collected data and weights are transformed into an intuitive network quality score, which comprehensively reflects the client's current network health status.

[0055] Step S106: Based on the network quality score, the multiple clients are divided into multiple levels, where the level is positively correlated with the priority of fragment transmission.

[0056] In step S106, the server categorizes all clients into different levels based on network quality scores. These levels are closely related to the client's performance on the network and are positively correlated with the processing priority of subsequent video segment transmission. In other words, clients with higher scores are assigned higher levels, meaning they will have priority in network resource allocation and service response. This ensures that clients with good network conditions enjoy a smooth video playback experience, while appropriately managing resources for clients with poor network conditions to prevent them from excessively consuming bandwidth.

[0057] Step S108: Determine the maximum number of connections corresponding to the multiple levels of clients, and determine the fragmentation transmission strategy based on the maximum number of connections.

[0058] In step S108, the server dynamically calculates the maximum number of concurrent connections for each client level based on the number of clients at each level in the current network environment. The maximum number of concurrent connections is determined by the token bucket capacity of the level, the average size of video segments, and a pre-set concurrency coefficient, ensuring that clients with high network quality levels can obtain more parallel transmission opportunities, while lower-level clients are subject to certain limitations. Subsequently, based on the maximum number of connections divided by level, the server formulates a differentiated segmentation and transmission strategy, prioritizing services for clients with high-quality network levels while reasonably managing requests from lower-quality levels, achieving a balance between bandwidth utilization and service quality.

[0059] Step S110: Control the fragmented transmission of the client according to the fragmented transmission strategy.

[0060] Segmented transmission is the process in video streaming services of splitting a complete media file into multiple smaller data segments and then transmitting each data segment to the client separately.

[0061] In step S110, the server begins controlling the client's video segment download process according to the determined segmentation transmission strategy. When requesting a video segment, the client needs to acquire a token, which is issued according to a previously established priority level principle. Once the client successfully acquires a token, it can retrieve video segment data based on the allocated number of connections. For requests that cannot immediately acquire a token, the server queues them according to the priority level until sufficient tokens are available. If a request exceeds a specified time or the queue capacity reaches its limit during the waiting process, the server cancels the request and returns an error message to the client, effectively reducing invalid request processing under poor network conditions.

[0062] In steps S102 to S110, the server first collects client network layer parameters, application layer behavior data, and historical request data. It then uses a dynamic temporal correlation network hierarchy algorithm to fuse and analyze the three-dimensional data, classifying the client's network status into multiple network levels. Next, based on bandwidth utilization and the number of clients at each level, a dynamic priority token bucket algorithm is used to allocate differentiated bandwidth quotas to clients at different network levels. Finally, during the video segmentation and transmission stage, differentiated connection configurations are implemented, and requests are processed according to network level through priority scheduling, achieving efficient bandwidth control. These steps ensure high-speed downloads for clients with good networks while effectively reducing the resource consumption of clients with poor networks, achieving efficient bandwidth control and resource optimization in video segmentation and on-demand scenarios.

[0063] The following are Figure 1 The steps shown are illustrated and explained by way of example.

[0064] According to some optional embodiments of this application, the determination of the client's network quality score based on the client's network layer data and application layer behavioral data in step S104 can be achieved by the following method: merging the network layer data and application layer behavioral data into a target matrix; calculating the trend features, fluctuation features, and anomaly density features in the target matrix within a sliding window, wherein the size of the sliding window is positively correlated with the frequency of network state changes, the trend features are used to characterize the trend of the client's network state changes, the fluctuation features are used to characterize the client's network stability, and the anomaly density features are used to characterize the historical packet loss anomaly frequency during data transmission between the client and the server; determining whether a preset abnormal event has occurred based on the trend features, fluctuation features, and anomaly density features, and dynamically adjusting the weight coefficients of the elements in the target matrix according to the type of the preset abnormal event; normalizing each element in the target matrix, and then performing a weighted linear combination of each normalized element using the weight coefficients to obtain the network quality score.

[0065] In this embodiment, the server extracts network layer data, including instantaneous bandwidth and round-trip latency, from each sharding request received from the client, and simultaneously collects application layer behavioral data, such as buffer duration and sharding request interval, organizing them into a target matrix H. t .

[0066] A sliding window technique is employed to extract network state features within the target matrix. The size of the sliding window is matched to the frequency of network state changes to capture both short-term trends and long-term stability of network fluctuations. Trend features are evaluated by observing the average rate of change of instantaneous bandwidth and fragment download time within the sliding window.

[0067] Based on the above characteristics, the server determines whether a pre-defined abnormal event has occurred, such as insufficient buffering or continuous packet loss. If such an event is detected, the server dynamically adjusts the weight coefficients of the corresponding features in the target matrix according to the event type. This allows for real-time correction of the network status analysis, ensuring that the score better reflects the client's actual network experience. For example, an insufficient buffering event might temporarily reduce the weight of download time, while a continuous packet loss event might increase the weight of bandwidth, emphasizing the importance of various parameters under different network events.

[0068] To standardize the comparison, each element in the target matrix is ​​normalized, meaning all data are converted to the same [0,1] interval, eliminating the influence of different parameter value ranges. A weighted linear combination operation is then performed on the normalized parameters using weight coefficients to generate a comprehensive network quality score, which numerically reflects the quality of the client's network environment.

[0069] Specifically, the network condition score can be calculated using the following method.

[0070] Normalize all parameters. The normalized result is [0,1]. The normalization results are shown in the table below. The index max corresponds to the maximum value in the sliding window, and the index min corresponds to the minimum value in the sliding window.

[0071]

[0072] Among them, STD_R t For R t Standard deviation; Density_P t The packet loss anomaly density is calculated as follows: Among them, F i A flag indicating packet loss for parameters stored on the server; CV_I t For I t The coefficient of variation.

[0073] After normalization, the network condition score is calculated using a weighted linear combination, and the result is S. t .

[0074]

[0075] Optionally, the network layer data includes at least: instantaneous bandwidth for fragment download, round-trip latency for fragment requests, and fragment request failure rate; the application layer behavioral data includes at least: client buffer duration, fragment request interval, and fragment download time.

[0076] Furthermore, the trend characteristics, fluctuation characteristics, and anomaly density characteristics in the target matrix within the sliding window can be calculated as follows: Calculate the first average rate of change of the instantaneous bandwidth for fragmented downloads and the second average rate of change of the client buffer duration within the sliding window, and determine the trend characteristics based on the first and second average rates of change; calculate the first standard deviation of the round-trip latency for fragmented requests and the coefficient of variation of the fragmented request interval within the sliding window, and determine the fluctuation characteristics based on the first standard deviation and the coefficient of variation; determine the anomaly density characteristics based on the target quantity within the sliding window and the parameter packet loss anomaly flag for that target quantity, where the target quantity is the number of fragmented requests sent by the client within the sliding window; if the packet loss rate during the i-th fragmented request transmission process is greater than a preset packet loss threshold, the i-th parameter packet loss anomaly flag is set to 1; otherwise, it is set to 0; i is a positive integer not greater than n, and n is the target quantity.

[0077] Specifically, the aforementioned trend characteristics, fluctuation characteristics, and anomaly density characteristics can be calculated using the following method:

[0078] Trend characteristics: including Bt Average rate of change (Trend_B) t ) and D t Average rate of change (Trend_D) t During the calculation process, I needs to be... t All units are converted to seconds. The average rate of change can be calculated using existing methods, which will not be elaborated upon in this embodiment.

[0079] Fluctuation characteristics: including R t Standard deviation (STD_R) t ) and I t coefficient of variation (CV_I) t During the calculation process, I needs to be... t All units are converted to seconds. The calculation methods for standard deviation and coefficient of variation can be used as described in existing methods, and will not be repeated in this embodiment.

[0080] Anomaly density: includes packet loss anomaly density (Density_P) t The calculation method is shown in formula (1).

[0081]

[0082] Among them, F i Mark the parameters stored on the server as an exception due to packet loss.

[0083] Optionally, the weight coefficients of the elements in the target matrix can be dynamically adjusted according to the types of preset abnormal events. This can be achieved through the following methods: When an insufficient buffering event is detected, the weight coefficients of the client buffering duration and the instantaneous bandwidth of the fragment download are reduced. The triggering conditions for the insufficient buffering event include: the second average rate of change of the client buffering duration is less than a first preset threshold, and the client buffering duration is less than a second preset threshold. When a continuous packet loss event is detected, the weight coefficients of the fragment request failure rate and the fragment download time are reduced. The triggering conditions for the continuous packet loss event include: the abnormal density feature is greater than a third preset threshold.

[0084] In the event of a detected bandwidth surge, the weighting factor of the instantaneous bandwidth of the fragmented download is increased. The triggering conditions for the bandwidth surge event include: the first average rate of change of the instantaneous bandwidth of the fragmented download is greater than the fourth preset threshold and the instantaneous bandwidth of the fragmented download is greater than the product of the historical average bandwidth and the first preset value. In the event of a detected abnormal request interval, the weighting factor of the fragmented request interval is increased and the weighting factor of the client buffer duration is decreased. The triggering conditions for the abnormal request interval event include: the coefficient of variation is greater than the fifth preset threshold.

[0085] Specifically, 1. For the insufficient buffer event, the triggering condition is: Trend_D t <α and D t <D min α, with a default value of 0, can be configured by the user, and its unit is seconds per second (s / s); D min The default value is 1 second, which is configurable.

[0086] Weight adjustment behaviors include:

[0087] w D =w D ×α D

[0088] w B =w B ×α B

[0089] Where, α D The default value is 0.5, which is configurable and less than 1; α B The default value is 0.8, which is configurable. A value less than 1 indicates that the bandwidth weight is temporarily reduced.

[0090] The adjustment goal is to prioritize buffer filling and avoid playback stuttering.

[0091] The recovery condition is: the client makes m consecutive requests until Trend_D t >= α or D t ≥D min After stabilizing for m times, the default value is restored, where m is 5 by default and is configurable.

[0092] 2. For continuous packet loss events, the triggering condition is: Density_P t >θ P , where θ P The default value is 20%, which is configurable.

[0093] Weight adjustment behaviors include: w P =w P ×α P w T =w T ×α T ;

[0094] Where, α P The default value is 0.8, which is configurable and less than 1; α T The default value is 0.7, which is less than 1, indicating that the weight of download time is reduced.

[0095] The adjustment aims to enhance transmission reliability and reduce interference caused by retransmission time.

[0096] The recovery condition is: the client continuously performs k operations, Density_P t ≤θ P After k iterations, the default weights are restored, where k defaults to 3 and is configurable.

[0097] 3. For bandwidth surge events, the trigger condition is: Trend_B t >β and β is configurable with a default value of 0, and its unit is Mbps / s. Exclude the current data B t Historical average bandwidth,

[0098]

[0099] Where, θ B The default value is 1.5, which is configurable.

[0100] Weight adjustment behaviors include: w B =w B ×∈ B .

[0101] Where, ∈ B The default value is 1.2, which is configurable. A value greater than 1 indicates an increase in bandwidth weight.

[0102] The adjustment objective is to fully utilize high-bandwidth resources and prioritize the transmission of high-definition fragments.

[0103] The recovery condition is: the client makes x consecutive requests, Trend_B t <= β or The default value for x is 3, and it is configurable.

[0104] 4. For the request interval exception event, the triggering condition is: CV_I t >θ I .

[0105] Where, θ I The default value is 0.5, which is configurable.

[0106] Weight adjustment behaviors include: w I =w I +α I w D =w D ×∈ D .

[0107] Where, α I The default value is 0.05, which is configurable, with a maximum value of 0.2; ∈ D The default value is 0.95, which is configurable, and the maximum value is less than 1.

[0108] The adjustment objective is to identify sudden changes in client consumption rates and balance the correlation between buffering and request intervals.

[0109] The recovery condition is: the client makes z consecutive requests and CV_I t ≤θ I Restore the default weights; the default value for z is 2.

[0110] It should be noted that the above w R w P w I w T w F All were influenced by a single event. B and w D Influenced by two events. B and w D This is affected by two events of the same type: an insufficient buffer event and a request interval exception event. Since they are mutually exclusive events and cannot occur simultaneously, w will be affected on each client request. B or w D Only one event can affect it. However, with each client request, both the buffer shortage event and the bandwidth surge event can occur simultaneously. B Influenced by two events. Therefore, for w B In this context, there's a priority rule: buffer shortage events have higher priority than bandwidth surge events. When both events occur simultaneously, the bandwidth surge event's impact on buffer size is ignored. B , i.e. w B Only affected by insufficient buffering events. Otherwise, affected by one of the events.

[0111] According to some alternative embodiments of this application, based on network quality scores, multiple clients are divided into multiple levels, including: for any target network quality score, among different preset thresholds corresponding to different levels arranged from smallest to largest, finding the highest level that the target network quality score can reach, wherein the highest level is the largest positive integer that satisfies the lower limit threshold of the target network quality score being greater than or equal to the target level; and classifying the clients corresponding to the target network quality score to the highest level that the target network quality score can reach.

[0112] Specifically, clients can be divided into multiple levels using the following method.

[0113] The client network priority is divided into u levels, from level 1 to level u, with higher levels having higher priority, meaning level 1 has the lowest priority and level u has the highest priority. The client score set is: {S1, S2, ..., S...} m (m is the total number of all clients), level ratio vector: L = [L1, L2, ..., L u ],satisfy (Lk (The percentage of clients at level k), the scores after sorting all clients: S in ascending order. sorted =[s1,s2,…,s m ](s1≤s2≤…≤s m Define the cumulative proportional prefix sum:

[0114]

[0115] The lower threshold of level k (i.e., the boundary between level k and level k-1):

[0116]

[0117] Where, t0=-∞ (Level 1 has no lower limit), t u =+∞ (no upper limit on the highest level), This is a floor function; the index starts from 0 (e.g., S). sorted [0] = s1).

[0118] For any fraction S i Its network level is:

[0119] G(S i )=max{k∣S i ≥t k;1}

[0120] That is, find the largest k such that S i The lower limit threshold t of level k is greater than or equal to k;1 Another way to represent it is:

[0121]

[0122] For example, there are 10 clients, which are divided into three levels by default: 1, 2, and 3, with ratios of 0.2, 0.3, and 0.5 respectively. The result after sorting the scores of each client is S. sorted ,

[0123] S sorted =[0.1,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1]

[0124] If FR1 = 0.4 and FR2 = 0.7, then Level 1 has 10 × 0.2 = 2 clients, Level 2 has 10 × 0.3 = 3 clients, and Level 3 has 10 × 0.5 = 5 clients. Therefore, the level divisions are as follows:

[0125]

[0126] In some optional embodiments of this application, before controlling the fragmented transmission of the client according to the fragmented transmission strategy, the method further includes: determining the token generation rate of different levels of clients based on the available bandwidth of the server and different ratio coefficients corresponding to different levels of clients, and updating the token generation rate according to changes in the number of clients and changes in bandwidth utilization; adding tokens to the token bucket according to a preset time interval and the token generation rate; and determining that fragmented transmission with the client is allowed if the amount of fragmented data indicated by the fragmented request sent by the client is less than the actual capacity of the token bucket.

[0127] It should be noted that this embodiment is implemented using the Token Bucket Algorithm Based on Dynamic Priority (TB-DPQBA). The Token Bucket Algorithm Based on Dynamic Priority includes the following parameters:

[0128] B total (Total available bandwidth), N i (Number of clients at each level, i ranges from 1 to u, where u is the network level number), r i (Token generation rate per client at level i, where i ranges from 1 to u, and u is the network level number, measured in Mbps per client, i.e., bits per second per client), C i (Total capacity of all client token buckets under level i, where i ranges from 1 to u, and u is the network level number in MB), U (bandwidth utilization).

[0129] Among them, B total Reserve θ for the total outbound bandwidth of the server (in Mbps). ρ B total As a system buffer, the actual allocable bandwidth is (1-θ) ρ B total θ ρ This is the bandwidth buffer factor, with a default value of 0.1.

[0130] N i Based on the client's network level, the number of clients at each level is counted. Concurrent requests from a client are counted as only one client.

[0131] r i The number of tokens generated per second (1 token = 1MB bandwidth quota) is initially allocated according to the level ratio, and is dynamically adjusted according to the load.

[0132]

[0133] Where, p i It is the proportional coefficient for the allocation of each level, and the sum of all its values ​​is 1-θ. ρ θ ρThis is the bandwidth buffer factor, with a default value of 0.1.

[0134] C i The maximum number of tokens in the bucket is dynamically adjusted using the formula: C i =N i ×k×S avg ×(1+γ ρ ×(i-1)).

[0135] Where, γ ρ This represents the capacity difference between adjacent bucket levels, with a default value of 0.1; k is the fluctuation coefficient, with a default value of 1.5; S avg This is the average size of the requested video segments.

[0136] B used This represents the server's current bandwidth usage. By default, the server collects and calculates data once every 1 second.

[0137] The above S avg This is the average size of the requested video chunks. In the initial phase (when there are no historical requests), S avg The system uses a pre-defined business value of 5MB, which is configurable. During the dynamic update phase (at least one complete sliding window), the average value is used to calculate the size based on the requested video chunk size.

[0138] Initial token generation rate r i With the bucket capacity C i This constitutes the basic bandwidth quota, which is then dynamically adjusted based on system load to achieve flexible allocation of the quota.

[0139] For example, the client network is divided into three levels: network level 1, network level 2, and network level 3, with corresponding key parameters p1 = 0.2, p2 = 0.3, p3 = 0.5, and θ. ρ =0.1. The initial token bucket generation rate for each client level is r1 = 0.2 × 0.9 × B total r² = 0.3 × 0.9 × B total r1 = 0.5 × 0.9 × B total .

[0140] Furthermore, the computation-based token generation rate r i Every Δt (default 50ms, can be configured according to business needs), according to the token generation rate r i Replenish tokens into the bucket; the actual size of the token bucket is CR. i Not exceeding the container capacity C i In the initial state, the number of token buckets for each level is configured according to the default value.

[0141] When the client requests shard S, if CRi If >S, it means the client has successfully obtained a token in this request; otherwise, there are insufficient tokens, and the client joins the token bucket queue to wait. It is understandable that if CR i The ">S" indicates that the client has sufficient tokens, or bandwidth quotas, to support this video segment request. Therefore, the client has successfully "acquired a token." Acquiring a token essentially grants the client permission to use the bandwidth resources allocated to it by the server, allowing the client to begin downloading the requested video segment without waiting. The token acts as a resource credential, ensuring that the server's bandwidth resources are not consumed by arbitrary requests but are allocated to different clients in a planned and controlled manner.

[0142] When there are not enough tokens, requests are entered into the queue. The queue length is differentiated by level (level 3 queue capacity is 200, level 2 and 1 queue capacity is 100). By default, if the queue exceeds 2 seconds, the tokens are discarded. The queue size and timeout can be configured.

[0143] Optionally, the token generation rate can be updated based on changes in the number of clients and bandwidth utilization. This can be achieved as follows: When the number of clients at any level exceeds a preset multiple of the historical average, the token generation rate is updated according to different weighting coefficients corresponding to different client levels; when the server's bandwidth utilization exceeds a bandwidth utilization threshold, the bandwidth quota of the first client is reclaimed, and the total reclaimed bandwidth quota is calculated, wherein the level of the first client is lower than the level of the second client among multiple clients; the updated token generation rate corresponding to the first client is determined based on the token generation rate before the update and a first parameter, wherein the first parameter is determined based on the total number of levels and the level number of the first client; the updated token generation rate corresponding to the second client is determined based on the token generation rate before the update, the total reclaimed bandwidth quota, and the bandwidth quota of the second client.

[0144] Understandably, when the number of client requests surges (the default is a 30% increase in the number of clients, which can be configured), if the token bucket generation rate of a single client remains constant, the total bandwidth usage of a certain tier will far exceed the initial value, thus affecting the bandwidth of other tiers. Therefore, in the event of a surge in clients, it is necessary to minimize the impact on the bandwidth of other tiers, with the impact being smaller for higher-tier clients.

[0145] For example, a surge in client requests could occur when the number of real-time clients at level i is N. i Exceeding its historical average δ times, that is: The default value for δ is 1.5, which is configurable. Defined as the past M periods (average number of clients M defaults to 10, each period is 500ms by default, configurable, the system counts the number of clients of each level every 500ms).

[0146] In this case, the token generation rate needs to be recalculated, and the total available bandwidth needs to be redistributed according to the ratio of level weight × number of clients to ensure that the single-client bandwidth quota of high-level clients is not diluted by the surge in the number of clients.

[0147] Specifically, the token generation rate can be updated using the following formula:

[0148]

[0149] Where, θ ρ This is the bandwidth buffer coefficient, with a default value of 0.1; ω i This represents the level weight, with a default value of i. Higher levels have higher weights. For example, level 1 has a weight of 1, and level 2 has a weight of 2. W total It is the total weight, W total It can be calculated using the following formula:

[0150]

[0151] On the other hand, when bandwidth utilization exceeds the preset U τ (Default value is 0.85, configurable), low-priority bandwidth needs to be reclaimed and allocated to high-priority bandwidth. In other words, the total reclaimed bandwidth ΔB is allocated to the unreclaimed classes according to their priority weights.

[0152] Specifically, First parameter

[0153] Where i is an integer from 1 to u, u is the network level number, and its unit is Mbps / client, that is, bits per second per client, θ q The default value is 0.1. By default, m = u-1, meaning all low-priority items are reclaimed and allocated to the highest priority.

[0154] For example, in the default configuration, the network levels are 3, namely levels 3, 2, and 1. Levels 1 and 2 reclaim bandwidth and allocate it to level 3. Level 1 reclaims bandwidth... Level 2 recycling Level 3 items are not recycled.

[0155] In other words, the bandwidth of low-level clients (first clients) from level 1 to level f is reclaimed, while the bandwidth of high-level clients (second clients) from level f+1 to level u is redistributed.

[0156] The token bucket generation rate of high-level clients after redistribution Where j is an integer from f+1 to u, g j This represents the bandwidth quota for the j-th client. The token bucket generation rate r is determined after the bandwidth of the lower-level client (the first client) is reclaimed. i ′=r i ×(1-q i ).

[0157] Through the above adjustments, the bandwidth quotas for each level change in real time with the number of clients and network load, avoiding resource mismatch caused by static allocation.

[0158] Optionally, after updating the token generation rate based on changes in the number of clients and changes in bandwidth utilization, the following steps can also be performed: when the server's bandwidth utilization is less than the bandwidth utilization threshold and the number of clients at each level is less than their respective historical average number, the updated token generation rate is restored sequentially in multiple stages based on the target order, wherein each stage is separated by a preset time interval, and the target order is from low to high level.

[0159] In this embodiment, when the server's bandwidth utilization U falls below a threshold (the default threshold is 0.8, which is configurable), and the number of clients recovers to within δ times the historical average (…), the server will be considered to have a bandwidth utilization of 0.8. If all levels i are true (δ default value is 1.5), the rate-limited recovery process is triggered, which includes phased recovery and priority recovery.

[0160] The recovery is phased, with p phases used to gradually restore the adjusted token generation rate. Each phase is spaced d seconds apart, and each time the rate is restored to i times the current rate (to avoid bandwidth surges that could cause fluctuations). The default values ​​for p, d, and i are 3, 1, and 0.1, respectively, and all of these values ​​are configurable.

[0161] Assume the speed after the speed limit is r i ′, initial speed is The recovery in stage j is as shown in formula (4):

[0162]

[0163] Where j is an integer from 1 to p.

[0164] Priority restoration: first restore the token generation rate of level 1 (lowest priority), then restore the higher priority levels in sequence (to avoid restoring higher priority levels causing lower priority levels to be throttled again).

[0165] In addition, by default, when the token generation rates of all levels reach or are close to the initial values (the default error is less than 5%, configurable), and the system load remains stable (U < 0.8) for three consecutive cycles (such as 1.5 s), and there is no sharp increase in the number of clients, it is determined that the recovery is complete and the normal dynamic adjustment mode is entered.

[0166] As some optional embodiments of the present application, determining the maximum connection numbers corresponding to clients of multiple levels can be achieved through the following method: determining the maximum number of tokens in the token buckets corresponding to clients of different levels according to the average data volume of the sharded data indicated by the sharding request, the number of clients of different levels, and the capacity difference between the token buckets corresponding to adjacent levels of clients; determining the maximum connection numbers corresponding to clients of different levels according to the maximum number of tokens in the token buckets corresponding to clients of different levels and the average data volume of the sharded data; controlling the sharded transmission of clients according to the sharding transmission strategy, including: when the connection number of clients of any level is less than the maximum connection number corresponding to the clients of that level, allocating connection resources to the clients of that level and sending the sharded data indicated by the sharding request to the clients; when the connection number of clients of any level is not less than the maximum connection number corresponding to the clients of that level, adding the clients of that level to the waiting queue, and discarding the sharded data in case of waiting timeout.

[0167] In this embodiment, after obtaining the token bucket (determining that sharded transmission with the client is allowed), the maximum concurrent connection number of clients of each level is directly associated with the capacity of its token bucket, ensuring that high-level clients obtain more parallel transmission opportunities.

[0168] The maximum connection number of each level is Conn_max(i), as shown in formula (5).

[0169]

[0170] Among them, C i is the total capacity of the token buckets of all clients at level i, and the value range of i is from 1 to u; S avg is the average value of the video shard size; k con is the concurrency coefficient, and the default value is 0.8 to avoid connection waste caused by token exhaustion.

[0171] The active connection number of each level is Coon i If Coon i < Conn_max(i), connection resources are immediately allocated to pull the video shards; otherwise, it is added to the waiting queue. If it times out (the default configuration is 3 s), it is discarded and an http error is returned to the client. When the number of queued requests exceeds the queue size, the requests are directly discarded to avoid a large amount of congestion and increase the system pressure.

[0172] For example, suppose the client network is divided into 3 levels, and the total system bandwidth is B. total =1000Mbps, average fragmentation S avg =5MB, concurrency coefficient k con =0.8; Level 1 token bucket capacity C1 = 100 tokens, Level 2 token bucket capacity C2 = 150 tokens, Level 3 token bucket capacity C3 = 200 tokens. Maximum concurrency for Level 1. Connections, Level 2, Maximum Concurrency Connections, Level 3, Maximum Concurrency connect.

[0173] Figure 2 This is a flowchart of another data transmission method according to an embodiment of this application. In this embodiment, the client requests video in the form of... Figure 7 As shown, the video server stores the parameters reported by the client in the server's local memory. The monitoring platform monitors the server's bandwidth usage. The server's total bandwidth is 2000Mbps, i.e., B_"total" = 2000Mbps. There are three environments, A, B, and C, corresponding to fiber optic network (maximum bandwidth 500Mbps), Wi-Fi network (maximum bandwidth 200Mbps), and a poor network environment (maximum bandwidth 50Mbps, unstable network), respectively. Environment A has 25 clients, environment B has 15 clients, and environment C has 10 clients, for a total of 50 clients. The video is 720P, with each video segment being 5MB in size, totaling 130 segments.

[0174] like Figure 2 The method shown uses a video account system as an example. The application server backend is built using Spring Boot as scaffolding, deployed in a cluster, and video segments are stored on a miniio server. The client supports mobile playback and PC browser playback. Based on the above configuration, combined with... Figure 2 The specific implementation method of the data transmission method is described in detail.

[0175] Step S202, Client network level classification.

[0176] In step S202, the server performs a comprehensive evaluation of the network status based on the previously collected and processed client network layer parameters, application layer behavioral data, and historical request records, using the DTC-NGA algorithm. The DTC-NGA algorithm utilizes a sliding window technique to extract trend, fluctuation, and anomaly density features, combined with an event-driven weight adjustment strategy (such as real-time events like buffer shortages and packet loss anomalies), accurately reflecting the current health status of the client's network environment. Finally, based on these features and weights, the server classifies each client into one of several network levels. The result of this level classification directly affects the priority of subsequent bandwidth allocation and transmission management.

[0177] Figure 3 This is a flowchart of a client network level classification method according to an embodiment of this application, such as... Figure 3 As shown, the method includes the following steps.

[0178] Step S302: The client reports the parameters.

[0179] During video-on-demand playback, the client actively uploads a series of parameters reflecting its network status and application behavior. These parameters include, but are not limited to, instantaneous bandwidth for chunk downloads, round-trip latency, HTTP request failure rate, client buffer duration, and chunk request interval.

[0180] The most recent 10 requests from all clients in network environments A, B, and C are obtained. While the parameters reported by clients may differ within the same network environment, they remain within a small fluctuation range. For ease of calculation, this embodiment stipulates that the parameters reported by all clients are consistent within the same network environment, and that the video request segments are all 5MB.

[0181] The historical parameter data reported by the client in different environments are shown in the table below. The reported parameters are placed in the HTTP request header. The larger the request sequence number, the more recent the data. For example, request sequence number 1 is the most recent parameter data, while request sequence number 10 is the oldest parameter data in the current request.

[0182] Network Environment A Client Historical Parameters

[0183]

[0184] Network Environment B Client Historical Parameters

[0185]

[0186] Network environment C client historical parameters

[0187]

[0188] Step S304: The server stores the relevant parameters.

[0189] Once the server receives the parameters sent by the client, it stores them in a local cache or other suitable data storage system. The server retains a certain amount of historical parameter data (e.g., the most recent n times) for subsequent sliding window analysis.

[0190] The server stores the parameters uploaded by the client in a local cache. By default, it identifies each client by its IP address plus a random string (generated randomly for each client, with at least 32 bits) and stores the parameters for each client. It retains the most recent 20 data entries, but for ease of calculation, only the most recent 10 data entries (request numbers 1 to 10) are displayed. Based on the parameters reported by the clients, the storage matrices for clients A, B, and C are H... tA H tB H tC .

[0191]

[0192] Step S306: Calculate the network level based on DTC-NGA.

[0193] Figure 4 This is a flowchart of a method for calculating network grades based on DTC-NGA according to an embodiment of this application, as shown below. Figure 4 As shown, the method includes the following steps.

[0194] Step S402, sliding window feature extraction.

[0195] The sliding window technique is a key method for analyzing client network conditions. Using the most recent n client parameters collected by the server (where n is a predefined window size, usually set based on the frequency of network condition changes), the algorithm extracts feature values ​​from the data across three dimensions: trend characteristics, fluctuation characteristics, and anomaly density characteristics.

[0196] Based on the above data, the sliding window features include trend characteristics, fluctuation characteristics, and anomaly density. The sliding window size is 10. The window features of each client in the three network environments are calculated below.

[0197] The client characteristic trend calculation result for network environment A is Trend_B tA Trend_D tA (The original parameter is Trend_B) t and Trend_D t (For distinction, subscripts A, B, and C are added; this will not be repeated later); the fluctuation characteristic value is STD_R. tA and CV_I tAThe packet loss anomaly density is Density_P tA Substitute into storage matrix H tA The numerical values ​​are calculated as follows:

[0198] Characteristic trends:

[0199]

[0200] Fluctuation characteristics:

[0201]

[0202] Abnormal density:

[0203]

[0204] The client characteristic trend calculation result for network environment B is Trend_B tB Trend_D tB The volatility characteristic value is STD_R tB and CV_I tB The packet loss anomaly density is Density_P tB Substitute into storage matrix H tB The numerical values ​​are calculated as follows:

[0205] Characteristic trends:

[0206]

[0207]

[0208] Fluctuation characteristics:

[0209]

[0210] Abnormal density:

[0211]

[0212] The client characteristic trend calculation result for network environment C is Trend_B tC Trend_D tC The volatility characteristic value is STD_R tC and CV_I tC The packet loss anomaly density is Density_P tC Substitute into storage matrix H tC The numerical values ​​are calculated as follows:

[0213] Characteristic trends:

[0214]

[0215] Fluctuation characteristics:

[0216]

[0217] Abnormal density:

[0218]

[0219] Step S404, event-driven weight adjustment.

[0220] Based on real-time business events reported by clients, such as insufficient buffer events, continuous packet loss events, bandwidth surge events, or abnormal request interval events, the weights of network features are adjusted in real time to ensure that the evaluation results can quickly reflect the network challenges currently faced by the client.

[0221] In network environment A, no events are triggered, so its weight remains at the default value W. tA = [0.2, 0.15, 0.2, 0.15, 0.1, 0.1, 0.1].

[0222] In network environment B, no events are triggered, so its weight remains at the default value W. tB = [0.2, 0.15, 0.2, 0.15, 0.1, 0.1, 0.1].

[0223] Network environment C experiences continuous packet loss and buffer depletion events. Among these, Trend_D... t <0 and D t <0.6, triggers an out-of-buffer event, w D =0.5 * 0.15 = 0.075, w B =0.8 * 0.2 = 0.16. Density_P t >0.2 triggers a continuous packet loss event, w P =0.2 * 0.8 = 0.16, w T =0.1 * 0.7 = 0.07. W tC = [0.16, 0.075, 0.16, 0.15, 0.1, 0.07, 0.1].

[0224] Step S406, Network Classification.

[0225] Based on the feature values ​​extracted in steps S402 and S404 and the adjusted weights, the server scores the client's network status and classifies it into different network levels. The network level classification is achieved through a weighted linear combination model, which comprehensively considers sliding window features and event-driven weights to quantify the client's network quality in the form of a score.

[0226] The bandwidth normalization results for network environments A, B, and C are shown in the table below.

[0227]

[0228] Based on the table above, and combined with the event-driven weight matrix W t The network scores for network environments A, B, and C are S, ... tA S tB S tC .

[0229]

[0230]

[0231] Based on the default configuration, clients are divided into three network levels according to their quantity and score, with proportional coefficients of 0.5, 0.3, and 0.2 respectively. Network A has 25 clients, Network B has 15 clients, and Network C has 10 clients. Therefore, all clients in Network A belong to level 3, all clients in Network B belong to level 2, and all clients in Network C belong to level 1.

[0232] Step S204: Dynamic allocation of differentiated bandwidth quotas.

[0233] In step S204, after determining the client's network level, the server dynamically adjusts bandwidth resources using the TB-DPQBA algorithm based on the current system bandwidth utilization and the number of clients at each network level. This includes initializing token bucket parameters, such as token generation rate and bucket capacity, and then dynamically adjusting these parameters based on real-time system load (such as bandwidth utilization or client surges) to ensure that high-level clients receive sufficient bandwidth quotas first, while the bandwidth requirements of low-level clients are appropriately limited. In this way, resource allocation is intelligently balanced, video transmission efficiency is optimized, a high-quality network user experience is guaranteed, and inefficient resource consumption is avoided.

[0234] Figure 5 This is a flowchart of a method for obtaining a token based on TB-DPQBA according to an embodiment of this application, as shown below. Figure 5 As shown, the method includes the following steps:

[0235] Step S502: Initialize the token bucket parameters.

[0236] The server first initializes the token bucket algorithm parameters, including the token generation rate and bucket capacity allocated to each network tier. These parameters are set based on the server's total bandwidth, the allocation ratio of network tiers, and the average size of video segments. The initialized token generation rate and bucket capacity provide a starting point for subsequent dynamic adjustments, ensuring that the server can start providing services with a reasonable configuration in the absence of historical data or network fluctuations.

[0237] According to the default configuration, S avg The initial size is 5MB, consistent with the video chunk size in this embodiment. For ease of explanation, the average video chunk size for the first 10 historical data points is 5MB, with a total bandwidth of 2000Mbps. According to Table 5, the token bucket parameters for each network environment are shown in the following table.

[0238]

[0239]

[0240] Step S504, dynamic priority adjustment.

[0241] The server dynamically adjusts the token generation rate and bucket capacity based on real-time system bandwidth utilization and the number of clients at each network level to achieve intelligent allocation of bandwidth resources. In cases of a surge in the number of clients or when bandwidth utilization exceeds a preset threshold, it automatically reclaims some bandwidth from lower-level clients and reallocates it to higher-level clients, ensuring service quality and resource efficiency.

[0242] (1) Scenarios of a surge in client applications.

[0243] When the number of clients surges at a certain level, the token bucket is dynamically adjusted. For ease of calculation and comparison, the request allocation size remains at 5MB in this scenario. The number of clients in network environment A increases from 25 to 50, the number of clients in network environment B increases from 15 to 30, and the number of clients in network environment C remains unchanged at 10.

[0244] The grade weights are redistributed: ω3 = 3, ω2 = 2, ω1 = 3. Total weight. According to formula (2), the single-client token bucket rate after redistribution at each level is:

[0245]

[0246] After the token generation rate is adjusted, the bucket capacity is recalculated. Level 3 bandwidth capacity: C3 = 1.5 × 5 × 1.2 × 50 = 450 MB; Level 2 bandwidth capacity: C2 = 1.5 × 5 × 1.1 × 30 = 247.5 MB; Level 1 bandwidth capacity: C1 = 1.5 × 5 × 1 × 10 = 75 MB.

[0247] All clients simultaneously request a 5MB fragment (total demand: 50 clients, 250MB). After one round of requests, the token bucket has 200MB remaining. Every 50ms, it replenishes 50 × 24.545 × 0.05 / 8 ≈ 7.67MB, requiring (250 - 200) / 7 = 7 replenishments. The next round of requests can be processed approximately 350ms later.

[0248] Similarly, for Tier 2 clients, approximately 3.07MB is added every 50ms, allowing them to process the next round of requests after approximately 850ms. For Tier 1 clients, approximately 0.51MB is added every 50ms, allowing them to process the next round of requests after approximately 2500ms. After dynamic adjustment, the bandwidth for Tier 3 is approximately 24.454 × 50 ≈ 1227, for Tier 2 it is approximately 16.364 × 30 ≈ 491, and for Tier 1 it is approximately 8.182 × 10 ≈ 82. The bandwidth shares are 68.2%, 27.3%, and 4.5%, respectively. After dynamic adjustment, priority is guaranteed. When the number of high-tier clients surges, the single-client rate decreases from 36Mbps to 24.545Mbps (a decrease of 31.8%), but the total bandwidth share increases from 50% to 68.2%, ensuring a high-priority user experience. The queuing latency for bursty requests is approximately 350ms for high-tier clients, 850ms for medium-tier clients, and 2500ms for low-tier clients, reflecting the differences in service quality between tiers.

[0249] (2) Scenarios with excessively high bandwidth utilization.

[0250] When bandwidth utilization U = 90% > 85% (threshold U) τ =85%), triggering lower-level bandwidth reclamation. By default, with three levels, bandwidth reclaimed from Levels 1 and 2 is given to Level 3. Level 1 reclamation percentage: Level 2 recycling ratio: The allocation ratio for Tier 1 is 0.2, the allocation ratio for Tier 2 is 0.3, and the reserved bandwidth ratio is θ. ρ If the value is 0.1, then the total bandwidth recovered is (0.6667×0.2+0.0333×0.3)×0.9×2000≈30Mbps. Therefore, the growth rate for each client in Level 3 is... After bandwidth reclamation, the rate of Level 3 becomes 36 + 1.2 = 37.2 Mbps, the rate of Level 2 becomes 36 × (1 - 0.0667) = 33.6 Mbps, and the rate of Level 2 becomes 36 × (1 - 0.0333) = 34.7 Mbps.

[0251] Step S506: Obtain a token.

[0252] When a client requests a video segment, it obtains a token from the token bucket corresponding to its network level. If the number of remaining tokens in the token bucket is greater than or equal to the size of the requested video segment, the client is immediately allocated a token, allowing the transmission of that segment. Otherwise, if there are insufficient tokens, the client's request enters a waiting queue until a new token is generated or another request releases tokens.

[0253] According to the default configuration, the token bucket is replenished every 50ms. The replenishment value for each client in networks A, B, and C is 18 * 0.05 = 0.9MB, 36.75 * 0.05 = 1.8MB, and 36 * 0.05 = 1.8MB.

[0254] Taking network environment A as an example, the total token bucket capacity C3 = 225MB. The average fragment size S is 5MB. With 25 clients making concurrent requests, the total fragment size requested is 5 × 25 = 125MB < 225MB. All clients obtain tokens, leaving 225 - 125 = 100MB remaining after the requests. After 50ms, each client receives a token replenished with 4.5 × 0.05 = 0.0225MB, so C3 = 100 + 0.225 × 25 = 105.625MB. The next request from each client will require waiting. (The condition is met approximately after the 4th supplement). Similarly, it can be seen that clients in network environments B and C can also obtain tokens.

[0255] If the requested fragment exceeds the remaining total available capacity, the request enters the queue and waits for a new token to be generated. If the wait times out, the request is discarded. Taking a Level 1 client as an example, when requesting a 5MB fragment, if the token is insufficient (3MB remaining), the request is added to the queue every 50ms. It needs to be added 5 times (250ms) to meet the condition. If it takes more than 2 seconds, the request is discarded, and the client is directly returned an HTTP status code of 500.

[0256] Step S508, speed limit restored.

[0257] When system bandwidth utilization drops below a safe threshold and the number of clients returns to historical average levels, the rate limiting recovery process is triggered. This process consists of multiple phases, gradually restoring the adjusted token generation rate to its initial value to avoid network instability caused by sudden bandwidth surges, while ensuring that the priority of high-priority clients is not affected.

[0258] By default, the token bucket generation rate recovery requires two conditions: first, the bandwidth utilization rate U drops from 90% to below 80%; second, the number of clients at each level stabilizes within 1.5 times the historical average. The recovery is phased, consisting of three phases. In each phase, the token generation rate of the lowest level (Level 1) is restored first, followed by Level 2 and Level 3 in sequence.

[0259] Phase 1 (second 1): Tier 1 speeds are increased from 8.182 Mbps to 9 Mbps, Tier 2 from 16.364 Mbps to 18 Mbps, and Tier 3 from 24.454 Mbps to 26.9 Mbps. Phase 2 (second 2): Each tier receives a further 10% speed increase (e.g., Tier 3 to 29.6 Mbps), while simultaneously determining if bandwidth utilization exceeds 80%. Phase 3 (second 3): Tier 1 reverts to 36 Mbps, Tier 2 reverts to 36 Mbps, and Tier 3 reverts to its initial 36 Mbps (because all tiers had the same speed at the initial allocation).

[0260] After the rate limit is restored, the token generation rate of each client level gradually returns to its initial value (e.g., level 3 returns to 36Mbps), the system bandwidth utilization rate increases to 89%, the request latency of high-level clients stabilizes within 50ms, and the stuttering rate of low-level clients drops to less than 3 times / hour, achieving dynamic balance and smooth scheduling of bandwidth resources.

[0261] Step S206, Hierarchical transmission and connection management.

[0262] In step S206, the maximum number of concurrent connections for each client level is calculated based on the token bucket capacity and video segment size for each level. This strategy ensures that clients with better network conditions can prioritize and maintain more parallel connection opportunities, while clients with poor network conditions are limited to a lower number of connections, preventing them from consuming too many resources for extended periods and causing a decline in overall system response performance. Furthermore, by setting priority queues and service queues, requests from higher-level clients are processed first, thereby achieving differentiated processing during the video segment transmission stage, ensuring reasonable resource utilization and optimized user experience.

[0263] Figure 6 This is a flowchart of a method for a client to request video segments according to an embodiment of this application, such as... Figure 6 As shown, the method includes the following steps:

[0264] After the client reports the relevant parameters, the server calculates the client's network quality score based on the DTC-NGA dynamic temporal correlation network classification algorithm. The network quality score is determined by analyzing the client's network layer parameters, application layer behavioral data, and historical request records, aiming to comprehensively assess the client's current network status.

[0265] After calculating the scores, the server categorizes clients into different network tiers based on those scores. This tier classification directly impacts a client's ability to obtain bandwidth quotas; higher-tier clients enjoy priority service and more bandwidth resources.

[0266] The client requests tokens from the server's token bucket based on its tier. In the TB-DPQBA algorithm, a token is equivalent to a bandwidth usage license; only by acquiring enough tokens from the token bucket can the client download the requested video segment.

[0267] Determining if queue capacity is exceeded or timeout occurs: Exceeding queue capacity or timeout (Y path): If a client's request exceeds the queue capacity limit or the waiting time exceeds the preset timeout value in the token acquisition queue, the request will be discarded. The server will return an HTTP error status code to the client, such as 503 (Service Unavailable), indicating that the client's request cannot be processed in a timely manner. This helps prevent system resources from being excessively consumed by invalid requests, ensuring system stability and response speed. Not exceeding queue capacity or timeout occurs (N path): If the client's request in the token waiting queue does not reach the above threshold, the process continues.

[0268] Clients that successfully acquire a token then request to establish a connection for fragmented transmission. Whether or not a connection is established depends on the maximum number of concurrent connections at the current level, ensuring that higher-level clients can acquire connection resources first.

[0269] Determine if queue capacity is exceeded or timeout occurs. If queue capacity is exceeded or timeout occurs (Y path): If the maximum concurrent connections for the current level are full and the waiting time exceeds the preset value, the client's connection request will also be dropped, and the server will return an HTTP error status code, such as 503 or another status code specifically set for connection saturation. If queue capacity is not exceeded or timeout occurs (N path): If the connection request meets the conditions, the client will be allocated the connection required to transmit the video segments.

[0270] After successfully obtaining a connection, the client begins downloading the requested video segments.

[0271] For example, calculate the maximum concurrent connections for each client tier. With 25, 15, and 10 clients in tiers 3, 2, and 1 respectively, what is the maximum number of connections for all clients in tier 3? Number of connections Number of connections

[0272] After obtaining the token bucket, each client can acquire a segment connection. A dedicated queue is set up for each tier: tier 3 queue can hold a maximum of 200 waiting requests, while tier 2 and tier 1 queues can hold a maximum of 100 waiting requests each. If a connection can be acquired immediately, the video segment can be retrieved from the server. If the current active connection limit has been reached, the request enters the queue and waits. If the wait exceeds the default 3 seconds, the request is discarded, and an HTTP status code of 503 is returned directly to the client. If the number of waiting requests in the queue reaches its capacity limit, new requests will also be discarded, returning an HTTP 503. Typical scenarios are as follows.

[0273] Normal connection acquisition scenario: A level 3 client requests a 5MB fragment. The server detects that its current active connection count is 20 (<36) and the token bucket has sufficient remaining capacity (>5MB). It directly allocates a new connection, completes the transmission within 1 second, and updates the active connection count to 21, ensuring that high-level clients can transmit smoothly with sufficient resources.

[0274] In the scenario where the queue has not timed out: A Level 2 client requests a shard, and the number of active connections has reached 18 (close to the upper limit of 19.8). The request is put into the Level 2 queue. After 1 second, a connection is released because the previous shard has been transmitted. New connections are allocated in order to continue transmission. The queue is used for orderly scheduling. Even when resources are scarce, request processing is still guaranteed and service interruption is avoided.

[0275] Queue timeout scenario: A Level 1 client requests a shard, and the current number of active connections has reached 12 (= the maximum number of connections). The request enters the Level 1 queue. Within 3 seconds, due to the slow transmission of previous weak network requests and the lack of connection release, the request is dropped and an HTTP 503 error is returned. This limits weak network clients from occupying queue resources for a long time and ensures the overall system response efficiency.

[0276] In a scenario where a Level 1 client requests a shard, if the queue for that level has reached its limit of 100 requests, the new request will be dropped, and an HTTP 503 error will be returned. This mechanism quickly rejects excessive requests, preventing the system from being slowed down by an endless backlog of requests on weak networks, and ensuring the rational use of queue resources.

[0277] The following comparative analysis uses a relevant static bandwidth allocation scheme as an example, which is a typical representative of server-side resource scheduling in related technologies. The shortcomings of the client-side self-adjustment scheme have been explained in the background section; this application achieves comprehensive optimization through a server-side proactive adjustment mechanism.

[0278] Static bandwidth allocation scheme configuration. Tiering basis: Tiers are fixed solely based on media resolution (Tier 3 = 4K, Tier 2 = 1080P, Tier 1 = 720P), without regard to real-time network status. Bandwidth allocation: Preset fixed bandwidth quotas (total bandwidth 2000Mbps): Tier 3: Fixed reserve of 1000Mbps (50%); Tier 2: Fixed reserve of 600Mbps (30%); Fixed reserve of 400Mbps (20%). The maximum number of concurrent connections is fixed for each tier: Tier 3 allows 50 connections, Tier 2 allows 30 connections, and Tier 1 allows 20 connections.

[0279] Implementation process of static bandwidth allocation scheme. Environment A (high network quality, 25 clients): Requesting 4K resolution video segments (Level 3), fixed usage of 1000Mbps, single client bandwidth. The actual available bandwidth is 500Mbps (fiber optic limit), but it is limited to 40Mbps, resulting in a resource utilization rate of only 8% (40 / 500). Environment B (medium network quality, 15 clients): Requesting 1080P resolution video segments (Level 2), using a fixed 600Mbps, single client bandwidth: The actual available bandwidth is 200Mbps, far exceeding the demand, resulting in 400Mbps of bandwidth being idle (600-200). Environment C (low network quality, 10 clients): Requesting 720P fragmentation (Level 1), with a fixed usage of 400Mbps, single client bandwidth: The actual available bandwidth is 50Mbps, which leads to a large number of timeout retransmissions (request rate of 40Mbps > 80% of the available 50Mbps threshold) and frequent buffer shortage events.

[0280] Typical problems with static bandwidth allocation schemes. Resource mismatch: Environment A is speed-limited and cannot utilize high bandwidth (500Mbps, 460Mbps idle). Environment B has 400Mbps of idle bandwidth, while Environment C experiences congestion due to over-allocation (actual usage 40Mbps > available 40Mbps, due to network instability). Response lag: When Environment C experiences insufficient buffering, it cannot reduce speed in real time; it must wait for clients to report lag before adjusting, with a delay of approximately 2 seconds.

[0281] The comparison between this application and related technologies (static bandwidth allocation) is shown in the table below.

[0282]

[0283]

[0284] In summary, compared with static bandwidth allocation schemes, this application significantly improves the experience for users with high network quality in video segmentation and on-demand scenarios, while effectively limiting resource abuse by low-level clients. Real-world test data shows that bandwidth utilization, request response speed, and resistance to concurrent surges are all superior to traditional solutions, making it suitable for high real-time scenarios such as video segmentation and on-demand.

[0285] Figure 8 This is a structural diagram of a data transmission device according to an embodiment of this application, such as... Figure 8 As shown, the device includes:

[0286] The acquisition module 80 is used to acquire multiple shard requests sent by multiple clients, wherein each shard request includes at least network layer data and application layer behavioral data.

[0287] The first determining module 82 is used to determine the network quality score of the client based on the client's network layer data and application layer behavior data.

[0288] The partitioning module 84 is used to divide multiple clients into multiple levels based on network quality scores, where the level is positively correlated with the priority of fragmented transmission.

[0289] The second determining module 86 is used to determine the maximum number of connections corresponding to the multiple levels of clients, and to determine the fragmentation transmission strategy based on the maximum number of connections.

[0290] The transmission module 88 is used to control the fragmented transmission of the client according to the fragmented transmission strategy.

[0291] Optionally, the first determining module 82 is further configured to perform the following steps: merging network layer data and application layer behavioral data into a target matrix; calculating trend features, fluctuation features, and anomaly density features in the target matrix within a sliding window, wherein the size of the sliding window is positively correlated with the frequency of network state changes, the trend features are used to characterize the trend of network state changes of the client, the fluctuation features are used to characterize the network stability of the client, and the anomaly density features are used to characterize the historical packet loss anomaly frequency of data transmission between the client and the server; determining whether a preset abnormal event has occurred based on the trend features, fluctuation features, and anomaly density features, and dynamically adjusting the weight coefficients of the elements in the target matrix according to the type of the preset abnormal event; normalizing each element in the target matrix, and performing a weighted linear combination of each normalized element using the weight coefficients to obtain a network quality score.

[0292] Optionally, the network layer data includes at least: instantaneous bandwidth for fragment download, round-trip latency for fragment requests, and fragment request failure rate. The application layer behavioral data includes at least: client buffer duration, fragment request interval, and fragment download time. The trend characteristics, fluctuation characteristics, and anomaly density characteristics in the target matrix are calculated within a sliding window, specifically including the following steps: Calculate the first average rate of change of instantaneous bandwidth for fragment download and the second average rate of change of client buffer duration within the sliding window, and determine the trend characteristics based on the first and second average rates of change; calculate the first standard deviation of round-trip latency for fragment requests and the coefficient of variation of the fragment request interval within the sliding window, and determine the fluctuation characteristics based on the first standard deviation and the coefficient of variation; determine the anomaly density characteristics based on the target number within the sliding window and the parameter packet loss anomaly flag for the target number, where the target number is the number of fragment requests sent by the client within the sliding window; if the packet loss rate during the i-th fragment request transmission process is greater than a preset packet loss threshold, the i-th parameter packet loss anomaly flag is set to 1; otherwise, it is set to 0; i is a positive integer not greater than n, and n is the target number.

[0293] Optionally, the weight coefficients of elements in the target matrix are dynamically adjusted according to the types of preset abnormal events. Specifically, this includes the following steps: when an insufficient buffering event is detected, the weight coefficient of the client buffering duration and the weight coefficient of the instantaneous bandwidth for fragment download are reduced. The triggering conditions for the insufficient buffering event include: the second average rate of change of the client buffering duration is less than a first preset threshold, and the client buffering duration is less than a second preset threshold. When a continuous packet loss event is detected, the weight coefficient of the fragment request failure rate and the weight coefficient of the fragment download time are reduced. The triggering conditions for the continuous packet loss event include: the abnormal density feature is greater than a third preset threshold.

[0294] Optionally, the weight coefficients of elements in the target matrix are dynamically adjusted according to the types of preset abnormal events, specifically including the following steps: when a bandwidth surge event is detected, the weight coefficient of the instantaneous bandwidth of the fragmented download is increased, wherein the triggering conditions for the bandwidth surge event include: the first average rate of change of the instantaneous bandwidth of the fragmented download is greater than the fourth preset threshold and the instantaneous bandwidth of the fragmented download is greater than the product of the historical average bandwidth and the first preset value; when a request interval abnormal event is detected, the weight coefficient of the fragmented request interval is increased and the weight coefficient of the client buffer duration is decreased, wherein the triggering conditions for the request interval abnormal event include: the coefficient of variation is greater than the fifth preset threshold.

[0295] Optionally, the partitioning module 84 is also used to perform the following steps: for any target network quality score, find the highest level that the target network quality score can reach among the different preset thresholds corresponding to different levels arranged from smallest to largest, where the highest level is the largest positive integer that satisfies the lower limit threshold of the target network quality score being greater than or equal to the target level; partition the client corresponding to the target network quality score to the highest level that the target network quality score can reach.

[0296] Optionally, the data transmission device further includes: a third determining module, configured to perform the following steps: determining the token generation rate for different levels of clients based on the available bandwidth of the server and the different proportional coefficients corresponding to different levels of clients, and updating the token generation rate based on changes in the number of clients and changes in bandwidth utilization; adding tokens to the token bucket according to a preset time interval and the token generation rate; and determining that fragmented transmission with the client is allowed if the amount of fragmented data indicated by the fragmentation request sent by the client is less than the actual capacity of the token bucket.

[0297] Optionally, the token generation rate is updated based on changes in the number of clients and changes in bandwidth utilization. This includes the following steps: when the number of clients at any level exceeds a preset multiple of the historical average, the token generation rate is updated according to different weighting coefficients corresponding to different client levels; when the server's bandwidth utilization exceeds a bandwidth utilization threshold, the bandwidth quota of the first client is reclaimed, and the total reclaimed bandwidth quota is calculated, wherein the level of the first client is lower than the level of the second client among multiple clients; based on the token generation rate before the update and a first parameter, the updated token generation rate corresponding to the first client is determined, wherein the first parameter is determined based on the total number of levels and the level number of the first client; based on the token generation rate before the update, the total reclaimed bandwidth quota, and the bandwidth quota of the second client, the updated token generation rate corresponding to the second client is determined.

[0298] Optionally, after updating the token generation rate based on changes in the number of clients and changes in bandwidth utilization, the following steps can also be performed: when the server's bandwidth utilization is less than the bandwidth utilization threshold and the number of clients at each level is less than their respective historical average number, the updated token generation rate is restored sequentially in multiple stages based on the target order, wherein each stage is separated by a preset time interval, and the target order is from low to high level.

[0299] Optionally, the second determining module 86 is further configured to perform the following steps: determining the maximum number of tokens in the token bucket corresponding to each client level based on the average data volume of the fragmented data indicated by the fragmentation request, the number of clients at different levels, and the capacity difference between the token buckets corresponding to clients at adjacent levels; determining the maximum number of connections corresponding to each client level based on the maximum number of tokens in the token bucket corresponding to each client level and the average data volume of the fragmented data; controlling the fragmented transmission of the client according to the fragmented transmission strategy, including: when the number of connections of any client level is less than the maximum number of connections corresponding to that client level, allocating connection resources to the client at that level and sending the fragmented data indicated by the fragmentation request to the client; when the number of connections of any client level is not less than the maximum number of connections corresponding to that client level, adding the client at that level to the waiting queue, and discarding the fragmented data if the waiting timeout occurs.

[0300] It should be noted that the above Figure 8 The modules in the above can be program modules (e.g., a set of program instructions that implement a specific function) or hardware modules. For the latter, they can be represented in the following forms, but are not limited to these: each of the above modules is represented by a processor, or the functions of each of the above modules are implemented by a processor.

[0301] It should be noted that, Figure 8 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 1 The relevant descriptions of the embodiments shown will not be repeated here.

[0302] Figure 9 A hardware block diagram of a computer terminal for implementing a data transmission method is shown. Figure 9 As shown, the computer terminal 90 may include one or more processors 902 (shown as 902a, 902b, ..., 902n in the figure) 902 (processor 902 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 904 for storing data, and a transmission module 906 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 9 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, the computer terminal 90 may also include... Figure 9 The more or fewer components shown, or having the same Figure 9 The different configurations shown.

[0303] It should be noted that the aforementioned one or more processors 902 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 90. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0304] The memory 904 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data transmission method in this embodiment. The processor 902 executes various functional applications and data processing by running the software programs and modules stored in the memory 904, thereby realizing the aforementioned data transmission method. The memory 904 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 904 may further include memory remotely located relative to the processor 902, and these remote memories can be connected to the computer terminal 90 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0305] The transmission module 906 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 90. In one example, the transmission module 906 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 906 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0306] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 90.

[0307] It should be noted here that, in some optional embodiments, the above... Figure 9 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 9 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0308] It should be noted that, Figure 9 The computer terminal shown is used to execute Figure 1 The data transmission method shown above is also applicable to this electronic device, and will not be repeated here.

[0309] This application also provides a non-volatile storage medium, which includes a stored program, wherein the program controls the device where the storage medium is located to execute the above data transmission method when it runs.

[0310] A non-volatile storage medium performs the following functions: It acquires multiple fragmentation requests sent by multiple clients, each fragmentation request including at least network layer data and application layer behavioral data; it determines the client's network quality score based on the client's network layer data and application layer behavioral data; it classifies the multiple clients into multiple levels based on the network quality score, where the level is positively correlated with the priority of fragmentation transmission; it determines the maximum number of connections corresponding to each level of client and determines a fragmentation transmission strategy based on the maximum number of connections; and it controls the fragmentation transmission of clients according to the fragmentation transmission strategy.

[0311] This application also provides an electronic device, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the above-described data transmission method during runtime.

[0312] The processor is used to run a program that performs the following functions: acquires multiple fragmentation requests sent by multiple clients, wherein each fragmentation request includes at least network layer data and application layer behavioral data; determines the network quality score of the client based on the client's network layer data and application layer behavioral data; classifies the multiple clients into multiple levels based on the network quality score, wherein the level is positively correlated with the priority of fragmentation transmission; determines the maximum number of connections corresponding to each level of client, and determines the fragmentation transmission strategy based on the maximum number of connections; and controls the fragmentation transmission of the client according to the fragmentation transmission strategy.

[0313] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0314] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0315] In the above embodiments of this application, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with relevant laws, regulations and standards, take necessary protective measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.

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

[0317] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

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

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

[0320] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A data transmission method, characterized in that, include: Obtain multiple sharding requests sent by multiple clients, wherein each sharding request includes at least network layer data and application layer behavioral data; The network quality score of the client is determined based on the network layer data and application layer behavior data of the client. Based on the network quality score, the multiple clients are divided into multiple levels, wherein the level is positively correlated with the priority of fragmented transmission; Determine the maximum number of connections corresponding to the clients at multiple levels, and determine the fragmentation transmission strategy based on the maximum number of connections; The fragmented transmission of the client is controlled according to the fragmented transmission strategy.

2. The method according to claim 1, characterized in that, Based on the client's network layer data and application layer behavioral data, a network quality score for the client is determined, including: The network layer data and the application layer behavioral data are fused into a target matrix; Within a sliding window, the trend feature, fluctuation feature, and anomaly density feature in the target matrix are calculated. The size of the sliding window is positively correlated with the frequency of network state changes. The trend feature is used to characterize the network state change trend of the client, the fluctuation feature is used to characterize the network stability of the client, and the anomaly density feature is used to characterize the historical packet loss anomaly frequency during data transmission between the client and the server. Based on the trend characteristics, fluctuation characteristics, and anomaly density characteristics, determine whether a preset abnormal event has occurred, and dynamically adjust the weight coefficients of the elements in the target matrix according to the type of the preset abnormal event; Each element in the target matrix is ​​normalized, and then a weighted linear combination of each normalized element is performed using the weight coefficients to obtain the network quality score.

3. The method according to claim 2, characterized in that, The network layer data includes at least: instantaneous bandwidth for fragment download, round-trip latency for fragment requests, and fragment request failure rate; the application layer behavioral data includes at least: client buffer duration, fragment request interval, and fragment download time. Calculate the trend characteristics, fluctuation characteristics, and anomaly density characteristics of the target matrix within a sliding window, including: Within the sliding window, calculate the first average rate of change of the instantaneous bandwidth of the segmented download and the second average rate of change of the client buffer duration, and determine the trend characteristics based on the first average rate of change and the second average rate of change. Within the sliding window, calculate the first standard deviation of the round-trip time of the sharding request and the coefficient of variation of the sharding request interval, and determine the fluctuation characteristics based on the first standard deviation and the coefficient of variation; The abnormal density feature is determined based on the target number within the sliding window and the parameter packet loss anomaly flag of the target number, wherein the target number is the number of fragmentation requests sent by the client within the sliding window; if the packet loss rate during the i-th fragmentation request is greater than a preset packet loss threshold, the i-th parameter packet loss anomaly flag is set to 1, otherwise, it is set to 0; i is a positive integer not greater than n, and n is the target number.

4. The method according to claim 3, characterized in that, Based on the type of the preset abnormal event, the weight coefficients of the elements in the target matrix are dynamically adjusted, including: In the event of a buffer shortage, the weighting coefficient of the client buffer duration and the weighting coefficient of the instantaneous bandwidth of the segmented download are reduced. The triggering conditions for the buffer shortage event include: the second average rate of change of the client buffer duration is less than a first preset threshold, and the client buffer duration is less than a second preset threshold. In the event of a continuous packet loss event, the weighting coefficients for reducing the failure rate of the fragment request and the download time of the fragment are reduced. The triggering condition for the continuous packet loss event includes: the abnormal density feature is greater than a third preset threshold.

5. The method according to claim 3, characterized in that, Based on the type of the preset abnormal event, the weight coefficients of the elements in the target matrix are dynamically adjusted, including: In the event of a detected bandwidth surge, the weighting coefficient of the instantaneous bandwidth of the segmented download is increased. The triggering conditions for the bandwidth surge event include: the first average rate of change of the instantaneous bandwidth of the segmented download is greater than a fourth preset threshold and the instantaneous bandwidth of the segmented download is greater than the product of the historical average bandwidth and the first preset value. In the event of an abnormal request interval, the weighting coefficient of the shard request interval is increased and the weighting coefficient of the client buffer duration is decreased. The triggering condition for the abnormal request interval event includes: the coefficient of variation being greater than a fifth preset threshold.

6. The method according to claim 1, characterized in that, Based on the network quality score, the multiple clients are divided into multiple levels, including: For any target network quality score, among the different preset thresholds corresponding to different levels arranged from smallest to largest, find the highest level that the target network quality score can reach, where the highest level is the largest positive integer that satisfies the lower limit threshold of the target network quality score being greater than or equal to the target level. The client corresponding to the target network quality score is classified into the highest level that the target network quality score can achieve.

7. The method according to claim 1, characterized in that, Before controlling the fragmented transmission of the client according to the fragmented transmission strategy, the method further includes: Based on the available bandwidth of the server and the different ratio coefficients corresponding to different levels of clients, the token generation rate of the clients at different levels is determined, and the token generation rate is updated according to the changes in the number of clients and the changes in bandwidth utilization. Based on the preset time interval and the token generation rate, tokens are added to the token bucket. If the amount of fragmented data indicated by the fragmentation request sent by the client is less than the actual capacity of the token bucket, it is determined that fragmented transmission with the client is allowed.

8. The method according to claim 7, characterized in that, The token generation rate is updated based on changes in the number of clients and changes in bandwidth utilization, including: If the number of clients at any level is greater than a preset multiple of the historical average, the token generation rate is updated according to the different weight coefficients corresponding to the clients at different levels. If the bandwidth utilization rate of the server is greater than the bandwidth utilization rate threshold, the bandwidth quota of the first client is reclaimed, and the total reclaimed bandwidth quota is calculated. The level of the first client is lower than the level of the second client among the multiple clients. Based on the token generation rate before the update and the first parameter, the updated token generation rate corresponding to the first client is determined, wherein the first parameter is determined based on the total number of levels and the level number of the first client. The updated token generation rate for the second client is determined based on the token generation rate before the update, the total recycling bandwidth quota, and the bandwidth quota of the second client.

9. The method according to claim 8, characterized in that, After updating the token generation rate based on changes in the number of clients and bandwidth utilization, the method further includes: If the bandwidth utilization rate of the server is less than the bandwidth utilization threshold, and the number of clients at each level is less than their respective historical average number, the updated token generation rate is restored sequentially in multiple stages based on the target order, wherein each stage is separated by a preset time interval, and the target order is the order from low to high level.

10. The method according to claim 1, characterized in that, Determine the maximum number of connections corresponding to the various client tiers, including: Based on the average data volume of the sharded data indicated by the sharding request, the number of clients of different levels, and the capacity difference between the token buckets corresponding to clients of adjacent levels, determine the maximum number of tokens in the token bucket corresponding to each client level. The maximum number of connections corresponding to different client levels is determined based on the maximum number of tokens in the token bucket corresponding to different client levels and the average data volume of the sharded data. Controlling the fragmented transmission of the client according to the fragmented transmission strategy includes: If the number of connections for any client at any tier is less than the maximum number of connections for that tier, connection resources are allocated to the client at that tier, and fragmented data with a fragmentation request indication is sent to the client. If the number of connections for any client at any tier is not less than the maximum number of connections for that tier, the client at that tier is added to the waiting queue, and the fragmented data is discarded if the waiting timeout occurs.

11. A data transmission device, characterized in that, include: The acquisition module is used to acquire multiple sharding requests sent by multiple clients, wherein each sharding request includes at least network layer data and application layer behavioral data; The first determining module is used to determine the network quality score of the client based on the network layer data and the application layer behavior data of the client. The partitioning module is used to divide the multiple clients into multiple levels according to the network quality score, wherein the level is positively correlated with the priority of fragmented transmission; The second determining module is used to determine the maximum number of connections corresponding to the clients of multiple levels, and to determine the fragmentation transmission strategy based on the maximum number of connections. The transmission module is used to control the fragmented transmission of the client according to the fragmented transmission strategy.

12. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the non-volatile storage medium to perform the data transmission method according to any one of claims 1 to 10.

13. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, performs the data transfer method according to any one of claims 1 to 10.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data transmission method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Video playing bandwidth allocation method, computer equipment and storage medium

    CN119277125A

  • Video fragment transmission method and device and video fragment receiving method and device

    CN119383405A

Cited By

  • Generative video transmission method and device

    CN122069256A