Machine learning based broadband user network quality prediction method and system

By analyzing video coding parameters and the token bucket model, the number of keyframes is dynamically adjusted to eliminate sudden traffic interference from video plagiarism detection services. Long Short-Term Memory (LSTM) networks are used for network quality prediction, which solves the problem of accuracy in network quality prediction under video plagiarism detection services and improves the accuracy and reliability of prediction results.

CN123145247APending Publication Date: 2026-11-20BEIJING CHANGJU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611472243.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively distinguish and isolate sudden traffic interference from video plagiarism detection feature uploads when video plagiarism detection services occupy broadband access links, leading to a decrease in the accuracy of machine learning network quality predictions.

Method used

By analyzing video coding parameters, dynamically correcting and compensating for the number of keyframes, simulating the data fragmentation and queuing process using the token bucket model, calculating the perturbation residual coefficient, and using a long short-term memory network to correct the network quality prediction value.

Benefits of technology

It significantly improves the accuracy and reliability of network quality prediction for broadband user access links, eliminates traffic interference caused by service bursts, and improves the overall accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145247A_ABST
    Figure CN123145247A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of broadband network quality prediction, in particular to a broadband user network quality prediction method and system based on machine learning. The method determines the initial key frame quantity by acquiring the encoding parameters when a video is checked in a video checking and repeating service, adds and compensates the key frame quantity by combining the effective shot switching determined by a bit rate fluctuation sequence, and obtains the theoretical key frame quantity. The total amount of theoretical feature upload data is calculated and distributed on a time axis to obtain a theoretical burst traffic waveform. The original traffic time sequence data and the theoretical burst traffic waveform are aligned according to timestamps, and the difference is obtained to obtain a basic traffic component. The matching error is calculated to obtain a disturbance residual coefficient. The basic network quality prediction value is obtained by inputting the basic traffic component into a pre-trained machine learning network, and the final network quality prediction value is obtained by correction according to the disturbance residual coefficient. The video checking and repeating service burst interference is stripped from the original traffic data, and the accuracy of broadband user access link network quality prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of broadband network quality prediction technology, specifically to a method and system for predicting broadband user network quality based on machine learning. Background Technology

[0002] With the widespread adoption of broadband networks and the explosive growth of video applications, in real-world network environments, broadband user access links often carry more than just regular internet browsing and video playback. They may also run services with high uplink bandwidth requirements, such as video deduplication. Video deduplication typically involves extracting keyframes and calculating feature vectors from the video to be checked at the user's access link terminal. The extracted feature data is then uploaded to the server via the access link for comparison and analysis. This process generates significant bursts of uplink traffic on the link, the magnitude of which is closely related to factors such as video encoding parameters and content complexity, exhibiting strong randomness and volatility. When such services and the raw traffic time-series data upon which network quality prediction relies coexist on the same access link, the burst traffic generated by video deduplication will overlap and mix with the traffic components reflecting the actual network state of the link itself. This results in the raw traffic time-series data containing both valid information reflecting the actual network quality of the link and bursts of interference from services unrelated to network quality.

[0003] When there is characteristic upload traffic generated by services such as video deduplication on the access link at the same time, this burst traffic, which is unrelated to the actual network quality, will be mistakenly treated by the machine learning network as an effective feature reflecting changes in network status such as link congestion and latency fluctuations. As a result, the model has difficulty in accurately capturing the traffic features that are actually caused by changes in the network status itself. This makes it difficult for existing technologies to effectively solve the problem of decreased prediction accuracy caused by burst traffic interference from services when facing scenarios where service and network quality prediction needs coexist. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for predicting broadband user network quality based on machine learning, in order to solve the problem of how to extract the theoretical burst traffic interference caused by the uploading of video deduplication features from the original traffic time series data in the scenario where video deduplication service occupies broadband access links, and improve the accuracy of machine learning network in predicting the network quality of broadband user access links.

[0005] To achieve the above objectives, in one aspect, the present invention provides a method for predicting broadband user network quality based on machine learning, the method comprising: S1. Obtain the video encoding parameters when the video deduplication service processes the video to be checked on the broadband user access link terminal. The video encoding parameters include video frame rate, video resolution, GOP length, and keyframe extraction interval. Determine the initial number of keyframes based on the video encoding parameters.

[0006] S2. Obtain the bitrate fluctuation sequence of the video encoded bitstream, calculate the fluctuation amplitude of the bitrate fluctuation sequence, determine that a valid shot switch has occurred when the fluctuation amplitude is greater than a preset fluctuation threshold, and add a compensation key frame number based on the number of valid shot switches based on the initial key frame number to obtain the theoretical key frame number.

[0007] S3. Obtain the preset dimension of the feature vector corresponding to a single key frame in the video plagiarism detection service, and calculate the total theoretical feature upload data of the video plagiarism detection service. Distribute the total theoretical feature upload data on the time axis according to the key frame extraction interval to obtain the theoretical burst traffic waveform.

[0008] S4. Obtain the original traffic time-series data of the access link, and calculate the basic traffic component by aligning the original traffic time-series data with the theoretical burst traffic waveform according to the timestamp.

[0009] S5. Calculate the matching error between the theoretical burst flow waveform and the original flow time series data in the corresponding time interval to obtain the disturbance residual coefficient.

[0010] S6. Input the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link; correct the basic network quality prediction value according to the disturbance residual coefficient to obtain the final network quality prediction value.

[0011] Furthermore, the method for determining the initial number of keyframes based on the video encoding parameters includes: The coding complexity parameter of the video to be checked is obtained. The coding complexity parameter is calculated based on the weighted sum of the intra-frame prediction residual energy and the inter-frame motion vector magnitude. The theoretical number of GOPs is calculated based on the video frame rate and GOP length. The theoretical number of GOPs is corrected based on the coding complexity parameter to obtain the corrected theoretical number of GOPs.

[0012] The basic processing time required for keyframe feature extraction per frame is determined based on the video resolution, and an interval adjustment coefficient is obtained based on the ratio of the basic processing time to the keyframe extraction interval. The preliminary number of keyframes is obtained by multiplying the corrected theoretical number of GOPs by the number of frames extracted per GOP and the interval adjustment coefficient.

[0013] Furthermore, the method for determining a valid shot change when the fluctuation amplitude exceeds a preset fluctuation threshold, and adding a compensation keyframe number based on the number of valid shot changes to obtain the theoretical keyframe number, includes: The bit rate fluctuation sequence is subjected to moving average denoising processing, and the candidate switching peak time is determined by the local maximum detection algorithm in the denoised fluctuation sequence.

[0014] A first threshold higher than the preset fluctuation threshold and a second threshold lower than the preset fluctuation threshold are set to form a hysteresis determination window; a valid shot switch is determined to have occurred only when the fluctuation amplitude corresponding to the candidate switching peak moment crosses the first threshold and falls back to below the second threshold within a preset time period, the timestamp of the valid shot switch is recorded, and the number of valid shot switches is accumulated.

[0015] The number of compensated keyframes corresponding to a single effective shot switch is calculated based on the difference between the peak amplitude of the bit rate fluctuation sequence corresponding to the effective shot switch time and the preset fluctuation threshold.

[0016] The number of compensated keyframes corresponding to each effective shot switch is accumulated and added to the initial number of keyframes to obtain the theoretical number of keyframes.

[0017] Furthermore, the method for obtaining the preset dimension of the feature vector corresponding to a single keyframe in the video plagiarism detection service, calculating the theoretical total amount of uploaded feature data for the video plagiarism detection service, and distributing the theoretical total amount of uploaded feature data on the time axis according to the keyframe extraction interval to obtain the theoretical burst traffic waveform includes: The theoretical data volume of the feature vector corresponding to a single keyframe is determined according to the preset dimension. The theoretical number of keyframes is multiplied by the theoretical data volume to obtain the total theoretical feature upload data. The total theoretical feature upload data is divided into multiple data fragments according to the preset fragment data volume.

[0018] A token bucket model is constructed to simulate the queuing and sending process of each data fragment in the access link. The token bucket capacity of the token bucket model is determined according to the preset maximum number of concurrent upload fragments of the access link. The token bucket model releases tokens into the token bucket according to the token generation rate. According to the order in which each data fragment arrives at the token bucket, when the number of available tokens in the token bucket meets the sending conditions of a single data fragment, it is allowed to send and consume the corresponding number of tokens; otherwise, it enters the waiting queue. The queuing and uploading order of each data fragment within the keyframe extraction interval and their respective waiting time are determined.

[0019] Based on the data fragment queuing upload order, corresponding waiting time, and preset single fragment transmission time, the instantaneous traffic values ​​corresponding to each data fragment are distributed sequentially on the time axis to obtain the theoretical burst traffic waveform.

[0020] Furthermore, the method for determining the token generation rate includes: Obtain the historical available uplink bandwidth sequence of the access link in the current time period, perform exponential weighted moving average processing on the historical available uplink bandwidth sequence to obtain a smoothed bandwidth estimate, and calculate the standard deviation of the historical available uplink bandwidth sequence relative to the smoothed bandwidth estimate to obtain the bandwidth stability coefficient; determine the token generation rate of the token bucket based on the smoothed bandwidth estimate.

[0021] Furthermore, the method for dynamically adjusting the preset maximum concurrent upload fragment number includes: When the bandwidth stability coefficient is not lower than the preset stability threshold, the adjustment increment of the preset maximum concurrent upload fragment number is reduced; when the bandwidth stability coefficient is lower than the preset stability threshold, the adjustment increment is calculated using a proportional-integral feedback adjustment method based on the deviation between the current queuing time and the preset queuing time threshold.

[0022] The adjusted concurrent upload fragment count is obtained by adding the adjustment increment to the preset maximum concurrent upload fragment count, and the token bucket capacity is updated accordingly to match the adjusted concurrent upload fragment count.

[0023] Furthermore, the method for obtaining the raw traffic time-series data of the access link, aligning the raw traffic time-series data with the theoretical burst traffic waveform according to timestamps, and then calculating the basic traffic components includes: Obtain the sampling timestamp sequence of the original traffic time-series data of the access link, and the generation timestamp sequence corresponding to the theoretical burst traffic waveform.

[0024] Calculate the cross-correlation coefficient between the original traffic time series data and the theoretical burst traffic waveform at different time offsets within a preset sliding search range, and determine the time offset corresponding to the maximum cross-correlation coefficient as the initial alignment offset.

[0025] A neighborhood search range is set with the initial alignment offset as the center. Within the neighborhood search range, a dynamic time warping algorithm is used to perform nonlinear time warping matching between the original traffic time series data and the theoretical burst traffic waveform to obtain the alignment path with the minimum cumulative warping path cost. The corrected timestamp alignment offset is determined based on the alignment path to compensate for the nonlinear delay introduced by link jitter during the data fragmentation queuing and transmission process.

[0026] The timestamp sequence of the theoretical burst flow waveform is shifted according to the corrected timestamp alignment offset, and the shifted theoretical burst flow waveform is resampled to the same sampling time point as the original flow time series data using a linear interpolation method.

[0027] The basic flow component is obtained by subtracting the original flow time series data from the resampled theoretical burst flow waveform point by point according to the corresponding sampling time point.

[0028] Furthermore, the method for calculating the disturbance residual coefficient by measuring the matching error between the theoretical burst flow waveform and the original flow time series data within the corresponding time interval includes: After completing the timestamp alignment, the difference sequence between the theoretical burst flow waveform and the original flow time series data at each sampling point in the corresponding time interval is obtained, and the root mean square value of the difference sequence is calculated to obtain the matching error.

[0029] The peak amplitude of the theoretical burst flow waveform within the corresponding time interval is obtained, and the normalized matching error is obtained by calculating the ratio of the matching error to the peak amplitude. The disturbance residual coefficient is calculated according to the normalized matching error and the preset disturbance residual coefficient mapping function.

[0030] Furthermore, the method for inputting the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link includes: The basic flow components are subjected to sliding window framing processing, and the mean, variance, peak-to-average power ratio, and spectral energy distribution characteristics obtained by Fourier transform are extracted in each window to form a multidimensional feature sequence.

[0031] The multidimensional feature sequence is input into a pre-trained machine learning network, which includes a long short-term memory network layer and an attention weighting layer connected in sequence. The long short-term memory network layer is used to extract the temporal dependencies of the multidimensional feature sequence, and the attention weighting layer is used to assign attention weights to the temporal dependencies at different times, outputting four sub-quality indicators: latency, packet loss rate, jitter, and throughput stability. The four sub-quality indicators are weighted and summed to obtain the basic network quality prediction value of the access link.

[0032] On the other hand, based on the same inventive concept, this invention also provides a broadband user network quality prediction system based on machine learning. The system includes: a preliminary keyframe quantity determination module, a theoretical keyframe quantity determination module, a theoretical burst traffic waveform generation module, a basic traffic component extraction module, a disturbance residual coefficient calculation module, and a network quality prediction module, with each module being connected in communication with the others in sequence. The preliminary keyframe quantity determination module is used to obtain the video encoding parameters when the video deduplication service processes the video to be checked on the broadband user access link terminal. The video encoding parameters include video frame rate, video resolution, GOP length, and keyframe extraction interval; and to determine the preliminary keyframe quantity based on the video encoding parameters.

[0033] The theoretical keyframe count determination module is used to acquire the bitrate fluctuation sequence of the video encoded bitstream, calculate the fluctuation amplitude of the bitrate fluctuation sequence, determine that a valid shot switch has occurred when the fluctuation amplitude is greater than a preset fluctuation threshold, and add a compensation keyframe count based on the number of valid shot switches based on the initial keyframe count to obtain the theoretical keyframe count.

[0034] The theoretical burst traffic waveform generation module is used to obtain the preset dimension of the feature vector corresponding to a single key frame in the video plagiarism detection business, calculate the total amount of theoretical feature upload data of the video plagiarism detection business, and distribute the total amount of theoretical feature upload data on the time axis according to the key frame extraction interval to obtain the theoretical burst traffic waveform.

[0035] The basic traffic component extraction module is used to acquire the raw traffic time-series data of the access link, and calculate the basic traffic component by aligning the raw traffic time-series data with the theoretical burst traffic waveform according to the timestamp.

[0036] The disturbance residual coefficient calculation module is used to calculate the matching error between the theoretical burst flow waveform and the original flow time series data in the corresponding time interval to obtain the disturbance residual coefficient.

[0037] The network quality prediction module is used to input the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link; and to correct the basic network quality prediction value according to the disturbance residual coefficient to obtain the final network quality prediction value.

[0038] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention analyzes the video encoding parameters of video deduplication services, comprehensively considers encoding complexity factors such as intra-frame prediction residual energy, inter-frame motion vector amplitude, and effective shot switching, and dynamically corrects and compensates the initial number of keyframes to obtain a theoretical number of keyframes that more closely reflects the actual changes in video content, thus avoiding theoretical traffic deviation caused by coarse estimation of the number of keyframes.

[0039] 2. Further, the total amount of theoretical feature upload data is calculated by combining the preset dimensions of the feature vector of a single keyframe, and a token bucket model is introduced to simulate the queuing and sending process of each data fragment on the access link. This allows the constructed theoretical burst traffic waveform to realistically restore the actual queuing and uploading rhythm and instantaneous traffic distribution of video deduplication service feature data on the link. In this way, the burst traffic interference components introduced by the video deduplication service can be effectively separated from the original traffic time series data, solving the problem of the mixture and indistinguishability between service-related burst traffic and real network traffic.

[0040] 3. This invention also obtains a disturbance residual coefficient by calculating the matching error between the theoretical burst traffic waveform and the original traffic time series data within the corresponding time interval. This coefficient is used to characterize the degree of incompletely eliminated interference remaining during the theoretical burst traffic stripping process. The basic traffic components are then input into a machine learning network composed of a long short-term memory network layer and an attention weighting layer for analysis. The disturbance residual coefficient is used to correct the basic network quality prediction value, resulting in a more accurate and reliable final network quality prediction value. This further compensates for the residual errors that may be introduced by the stripping process itself, significantly improving the overall accuracy and reliability of the broadband user access link network quality prediction results, based on the stripping of service-related burst traffic interference. Attached Figure Description

[0041] Figure 1 This is a flowchart of the machine learning-based broadband user network quality prediction method of the present invention.

[0042] Figure 2 This is a schematic diagram of the module composition of the machine learning-based broadband user network quality prediction system of the present invention. Detailed Implementation

[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0044] Example 1: As Figure 1 As shown, this embodiment provides a method for predicting broadband user network quality based on machine learning. The method includes: S1. Obtain the video encoding parameters when the video deduplication service processes the video to be deduplicated on the broadband user access link terminal. The video encoding parameters include video frame rate, video resolution, GOP length, and keyframe extraction interval. The method for determining the initial number of keyframes based on the video encoding parameters includes: The coding complexity parameter of the video to be checked is obtained. The coding complexity parameter is calculated based on the weighted sum of the intra-frame prediction residual energy and the inter-frame motion vector magnitude. The theoretical number of GOPs is calculated based on the video frame rate and GOP length. The theoretical number of GOPs is corrected based on the coding complexity parameter to obtain the corrected theoretical number of GOPs. For example, video encoding parameters include the video frame rate (denoted as f, in frames per second), video resolution, GOP length (denoted as L, in frames, i.e., the length of the group of images between two adjacent keyframes), and keyframe extraction interval (denoted as L). The unit is milliseconds per frame (m / frame), representing the time budget allocated by the video plagiarism detection service to complete the extraction and feature processing of one keyframe. The above parameters can be obtained by parsing the encoding stream encapsulation information of the video to be checked: the video frame rate f and the video resolution can be read from the container format header information of the video file; the GOP length L can be obtained from the image group structure of the encoding stream; and the keyframe extraction interval... This is pre-set by the video plagiarism detection service. For example, let's set the video frame rate of the video to be checked. Frames per second, total duration of the video to be queried (denoted as T, in seconds). Seconds (i.e., 10 minutes), GOP length Frame (corresponding to a group of images every 5 seconds).

[0045] Based on the video frame rate f and the total duration T of the video to be searched, the total number of frames N of the video to be searched is calculated: Substituting the values ​​from the previous example, Frames. Then, based on the total number of frames N and the length L of the GOP, calculate the theoretical number of GOPs G: Substitute the example values, .

[0046] Coding complexity parameter The value is obtained by weighted summation of the intra-frame prediction residual energy (denoted as E, which is the average of the intra-frame prediction residual energies of each macroblock in the encoded bitstream of the video to be checked, and can be obtained by directly reading the prediction residual values ​​corresponding to each macroblock from the encoding log file generated by the encoder after the video to be checked is encoded and averaging them) and the inter-frame motion vector magnitude (denoted as V, in pixels / frame, which is the average of the inter-frame motion vector magnitudes of each macroblock in the encoded bitstream of the video to be checked, and can also be obtained by reading the motion vector values ​​of each macroblock from the encoding log file and averaging them). Since the intra-frame prediction residual energy E and the inter-frame motion vector magnitude V have different physical meanings and dimensions, they cannot be directly weighted and added together. Therefore, they need to be normalized by dividing them by their respective preset reference values ​​first. Specifically, let the intra-frame prediction residual energy reference value be... (Determined based on the statistical upper limit achievable by intra-frame prediction residual energy from a large number of historical video samples), the inter-frame motion vector magnitude reference value is [value missing]. (Determined based on the statistical upper limit that the inter-frame motion vector amplitude can reach from a large number of historical video samples), then the normalized intra-frame prediction residual energy With normalized inter-frame motion vector magnitude They are respectively: The encoding complexity parameter The calculation formula is: ;in, The normalized intra-frame prediction residual energy The corresponding preset weight coefficients, The normalized inter-frame motion vector magnitude The corresponding preset weighting coefficients, and All values ​​are determined by fitting the statistical relationship between the intra-frame prediction residual energy, the inter-frame motion vector magnitude, and the deviation from the actual number of image groups in a large number of historical video samples, and satisfy the following conditions: For example, one could take , In other words, the intra-frame prediction residual energy has a relatively stronger representation effect on the complexity of the image content, and therefore is given a relatively higher weighting coefficient. Because... and All are normalized to dimensionless values ​​between 0 and 1, and Therefore, the value of this encoding complexity parameter is also limited to between 0 and 1. For example, let... Actual measurement ,have to ;set up Pixels / frame, actual measurement pixels / frame ;but .

[0047] The basic processing time required for keyframe feature extraction per frame is determined based on the video resolution, and an interval adjustment coefficient is obtained based on the ratio of the basic processing time to the keyframe extraction interval. The preliminary number of keyframes is obtained by multiplying the corrected theoretical number of GOPs by the number of frames extracted per GOP and the interval adjustment coefficient.

[0048] For example, because the complexity and intensity of motion in actual video content differ, the encoder often dynamically adjusts the actual length of the image group according to changes in the scene during the encoding process. Therefore, the theoretical number of GOPs G calculated solely based on the nominal GOP length L may deviate from the actual situation. Thus, it is necessary to correct the theoretical number of GOPs G based on this encoding complexity parameter. Specifically, this encoding complexity parameter is multiplied by a preset correction ratio coefficient (denoted as L). The coding complexity correction coefficient is obtained by fitting the statistical relationship between the coding complexity parameter and the deviation of the actual number of image groups in historical video samples (for example, taking a value of 0.15). : Substitute the example values, The number of theoretical GOPs, G, is compared with... Multiply to obtain the corrected theoretical number of GOPs. : Substitute the example values, In other words, the more complex the content and the more intense the motion in the video being examined, the higher its encoding complexity parameter, and the higher the theoretical number of GOPs after correction. The greater the increase in the relative theoretical number of GOPs G, the more... This is closer to the actual encoding of the video to be investigated.

[0049] Furthermore, the basic processing time required for keyframe feature extraction for each frame is determined based on the video resolution of the video to be examined, denoted as . (Unit: milliseconds / frame). Because higher video resolution results in a larger amount of pixel data in the corresponding keyframes, the processing time required for feature vector calculation also increases accordingly. Therefore, this basic processing time... There is a positive correlation between resolution and video resolution. The specific value can be pre-calculated by statistically analyzing the actual processing time for feature extraction from videos at different resolutions, thus establishing a correlation between resolution levels and this baseline processing time. The table shows the corresponding relationships. For example, for a video with a resolution of 1920×1080, its basic processing time is... You can take 11 milliseconds per frame. This will be the base processing time. Interval with the keyframe extraction Divide to obtain the interval adjustment coefficient : ; This interval adjustment coefficient Used to characterize the extraction interval for a given keyframe. Under certain conditions, the tightness of the actual feature extraction processing time relative to the allocated time budget: when A value greater than 1 indicates that the actual processing time exceeds the pre-allocated time budget. To prevent processing backlog, the density of keyframes extracted by the video plagiarism detection terminal will be increased accordingly. A value less than 1 indicates a relatively generous time budget. For example, let's say the keyframe extraction interval... milliseconds / frame, then .

[0050] The revised theoretical GOP number The number of frames extracted per GOP within each image group (denoted as n, in frames / GOP, is preset by the video plagiarism detection service, for example, set to...) (i.e., extracting one frame from each image group as a keyframe) and the interval adjustment coefficient. Multiplying these three numbers gives the initial number of keyframes, denoted as . : Substitute the example values, Since the number of keyframes should be an integer, the calculation result is rounded up to obtain... frame.

[0051] S2. Obtain the bitrate fluctuation sequence of the video encoded bitstream, calculate the fluctuation amplitude of the bitrate fluctuation sequence, determine that a valid shot change has occurred when the fluctuation amplitude is greater than a preset fluctuation threshold, and add a compensation keyframe number based on the number of valid shot changes to obtain the theoretical keyframe number, including: The bit rate fluctuation sequence is subjected to moving average denoising processing, and the candidate switching peak time is determined by the local maximum detection algorithm in the denoised fluctuation sequence.

[0052] A first threshold higher than the preset fluctuation threshold and a second threshold lower than the preset fluctuation threshold are set to form a hysteresis determination window; a valid shot switch is determined to have occurred only when the fluctuation amplitude corresponding to the candidate switching peak moment crosses the first threshold and falls back to below the second threshold within a preset time period, the timestamp of the valid shot switch is recorded, and the number of valid shot switches is accumulated.

[0053] The number of compensated keyframes corresponding to a single effective shot switch is calculated based on the difference between the peak amplitude of the bit rate fluctuation sequence corresponding to the effective shot switch time and the preset fluctuation threshold.

[0054] The number of compensated keyframes corresponding to each effective shot switch is accumulated and added to the initial number of keyframes to obtain the theoretical number of keyframes.

[0055] For example, the bitrate fluctuation sequence of the encoded bitstream of the video to be investigated is obtained, denoted as... (Unit: kbps), where i is the time sequence number arranged according to a fixed statistical time window (e.g., statistics are collected every 100 milliseconds). The instantaneous encoded bitrate value within the i-th statistical window can be obtained by the video encoded bitstream parsing module summing the number of bits occupied by each image frame in the encoded bitstream according to the fixed statistical window. The fluctuation amplitude of this bitrate fluctuation sequence is calculated and denoted as... It is calculated as the absolute value of the difference in bit rate values ​​between adjacent statistical windows: .

[0056] When the fluctuation range Greater than the preset fluctuation threshold (denoted as When the value (in kbps) is equal to the value of the frame rate, it indicates that the content of the image has changed significantly around that time, and a valid shot change has been preliminarily determined. This preset fluctuation threshold... The statistical average of the fluctuation range of the video under investigation during periods of stable content and no obvious camera cuts (denoted as ) ) and statistical standard deviation (denoted as )Sure: That is, the average fluctuation range during the stable period plus three times the standard deviation is taken as the preset fluctuation threshold. This allows the preset fluctuation threshold to be set. It can distinguish normal encoding fluctuations from real shot transition events with a high degree of confidence. For example, suppose... kbps kbps, then kbps.

[0057] Considering the bit rate fluctuation sequence There may be short-term jitter introduced by coding noise. If directly based on Does it exceed the preset fluctuation threshold? The traditional method of making judgments can easily lead to misjudgments or repeated judgments on the same shot transition. Therefore, this application further employs a combination of moving average noise reduction and hysteresis judgment to improve the accuracy of the judgment. Specifically, the fluctuation amplitude sequence is first analyzed... Perform moving average denoising, i.e., use a preset length of M statistical points (e.g. (sliding window pair) By averaging point by point, the denoised fluctuation sequence is obtained. : Then, in the denoised fluctuation sequence In this process, a local maximum detection algorithm is used to determine the candidate switching peak time, which involves comparing the values ​​of adjacent statistical points sequentially. When a certain statistical point... corresponding When a value is greater than the values ​​of several adjacent statistical points before and after it, that statistical point is determined to be... This is a local maximum point, and this moment is denoted as the candidate switching peak moment.

[0058] After determining the candidate switching peak time, set a value higher than the preset fluctuation threshold. First threshold and below the preset fluctuation threshold The second threshold Together, these two elements constitute the hysteresis detection window, used to further prevent fluctuations from occurring due to the amplitude falling within a preset fluctuation threshold. Repeated detection caused by repeated traversal of nearby locations: Substitute the example values, kbps kbps. Only when the peak value of a candidate switching occurs... First, cross the first threshold. And within the preset duration (For example, within 500 milliseconds) it falls back to the second threshold Only when the following conditions are met is it determined that a genuine effective shot change has occurred corresponding to the candidate switching peak time, and the timestamp of this effective shot change is recorded. Simultaneously, the number of effective shot changes (denoted as J) is cumulatively counted. If... Crossing the first threshold Failed to meet the preset time limit The price fell back to the second threshold. The following, or It has consistently failed to break through the first threshold. If the signal is not clear, it will not be considered a valid camera switch, thus avoiding misjudging continuous high bit rate fluctuations as multiple camera switches.

[0059] For the j-th ( ) Valid shot transitions confirmed by the above criteria are determined based on the peak fluctuation value corresponding to the time of the valid shot transition (denoted as ). ,Right now The value at the peak of the candidate switching time, compared with the preset fluctuation threshold. The difference between them is used to calculate the number of compensated keyframes corresponding to the effective shot change. : ;in, The effective lens switching relative to the preset fluctuation threshold The relative excess ratio The preset unit compensation coefficient is determined based on the statistical relationship between the intensity of shot transitions in historical video samples and the actual number of keyframes extracted for compensation; for example, a value of 2 may be used. This indicates a floor function, rounding up to the nearest whole number (frame). For example, suppose the video being checked detects... The number of effective camera switches, corresponding to the peak values ​​are respectively kbps kbps kbps, take ,but: , , ; The number of compensated keyframes corresponding to each valid shot switch in the video to be examined. The total number of compensated keyframes is obtained by summing the results. : Substitute the example values, Frames. This will determine the total number of compensated keyframes. Compared with the aforementioned preliminary number of keyframes Adding them together gives us the theoretical number of keyframes, K: Substitute the example values, frame.

[0060] S3. Obtaining the preset dimension of the feature vector corresponding to a single keyframe in the video plagiarism detection service, and calculating the total theoretical feature upload data of the video plagiarism detection service, and distributing the total theoretical feature upload data on the time axis according to the keyframe extraction interval to obtain the theoretical burst traffic waveform includes the following methods: The theoretical data volume of the feature vector corresponding to a single keyframe is determined according to the preset dimension. The theoretical number of keyframes is multiplied by the theoretical data volume to obtain the total theoretical feature upload data. The total theoretical feature upload data is divided into multiple data fragments according to the preset fragment data volume. For example, after obtaining the theoretical number of keyframes K, the preset dimension of the feature vector corresponding to a single keyframe in the video plagiarism detection service is further obtained, denoted as D (determined by the feature extraction algorithm used in the video plagiarism detection service, for example...). The feature values ​​of each dimension are stored in single-precision floating-point format, and the number of bytes occupied by each single-precision floating-point number is denoted as . ,Pick (in bytes). Based on this, the theoretical data size g (in bytes) of the feature vector corresponding to a single keyframe is determined: Substitute the example values, Bytes. Multiplying the theoretical number of keyframes K by the theoretical data size g of a single keyframe yields the theoretical total uploaded data U (in bytes) for the video plagiarism detection service: Substitute the example values, byte.

[0061] The data is fragmented according to a preset size (denoted as p, in bytes), determined based on the maximum transmission unit (VU) used by the access link. For example, the maximum VU for an Ethernet link is typically 1500 bytes. After deducting protocol header overhead, the data is then... The total amount of data U uploaded based on this theoretical feature is divided into multiple data fragments, and the number of data fragments is denoted as . : Substitute the example values, Data shards.

[0062] A token bucket model is constructed to simulate the queuing and sending process of each data fragment in the access link. The token bucket capacity of the token bucket model is determined according to the preset maximum concurrent upload fragment number of the access link. The token bucket model adds tokens to the token bucket according to the token generation rate. The method for determining the token generation rate includes: Obtain the historical available uplink bandwidth sequence of the access link in the current time period, perform exponential weighted moving average processing on the historical available uplink bandwidth sequence to obtain a smoothed bandwidth estimate, and calculate the standard deviation of the historical available uplink bandwidth sequence relative to the smoothed bandwidth estimate to obtain the bandwidth stability coefficient; determine the token generation rate of the token bucket based on the smoothed bandwidth estimate.

[0063] The dynamic adjustment method for the preset maximum concurrent upload fragment number includes: when the bandwidth stability coefficient is not lower than the preset stability threshold, reducing the adjustment increment of the preset maximum concurrent upload fragment number; when the bandwidth stability coefficient is lower than the preset stability threshold, calculating the adjustment increment using a proportional-integral feedback adjustment method based on the deviation between the current queuing time and the preset queuing time threshold.

[0064] The adjusted concurrent upload fragment count is obtained by adding the adjustment increment to the preset maximum concurrent upload fragment count, and the token bucket capacity is updated accordingly to match the adjusted concurrent upload fragment count.

[0065] According to the order in which each data fragment arrives at the token bucket, when the number of available tokens in the token bucket meets the sending conditions of a single data fragment, it is allowed to send and consume the corresponding number of tokens; otherwise, it enters the waiting queue to determine the queuing upload order of each data fragment within the keyframe extraction interval and its respective waiting time.

[0066] Based on the data fragment queuing upload order, corresponding waiting time, and preset single fragment transmission time, the instantaneous traffic values ​​corresponding to each data fragment are distributed sequentially on the time axis to obtain the theoretical burst traffic waveform.

[0067] For example, to simulate the actual queuing and transmission process of the aforementioned data fragments on the access link, this application constructs a token bucket model to simulate this process. The token bucket model is a mathematical model used to describe the data transmission rate control process. Its basic principle is: the token bucket continuously generates tokens and stores them in the bucket at a certain rate; the number of tokens that the bucket can hold has an upper limit, i.e., the token bucket capacity; whenever a data fragment is ready to be sent, it needs to consume a number of tokens matching the size of the data fragment. If the number of currently available tokens in the bucket is sufficient, the data fragment can be sent immediately; otherwise, the data fragment needs to enter the waiting queue until the number of tokens accumulated in the bucket meets the transmission conditions.

[0068] The token bucket capacity of this token bucket model is denoted as . (Unit: Tokens), its value is determined based on the preset maximum concurrent upload fragment count of the access link (denoted as c, unit: fragment count), specifically by multiplying the preset maximum concurrent upload fragment count c by the number of tokens required for a single data fragment (denoted as q, unit: tokens / fragment): The number of tokens q required for a single data fragment is determined based on the preset fragment data size p and the preset data size corresponding to a single token (denoted as u, in bytes / token, for example, setting each token to correspond to a 100-byte data transmission permission): Substitute the example values, Token / Shard. Set the initial maximum number of concurrent upload shards. ,but Token.

[0069] The preset maximum concurrent upload fragment count 'c' is not fixed, but dynamically adjusted based on the stability of the access link's bandwidth. Specifically, it first obtains the historical available uplink bandwidth sequence of the access link within the current time period, denoted as . (Unit: bytes per second) The time sequence number is calculated at a fixed period (e.g., once per second), where m is the total number of statistical points included in the historical sequence (e.g., taking the data from the most recent 5 minutes). ); for historical available uplink bandwidth sequences After performing exponentially weighted moving average processing, the smoothed bandwidth estimate is obtained. (Unit: bytes / second): ;in, A preset smoothing coefficient is set (for example, a value of 0.3; a larger value indicates a higher smoothing bandwidth estimate). For the latest measured bandwidth The more sensitive the response, the more sensitive the initial value of the iteration calculation. Take directly .

[0070] Calculate the available uplink bandwidth sequence in history Relative smooth bandwidth estimate The standard deviation of the smoothed bandwidth estimate is calculated and compared with the average of the smoothed bandwidth estimate over the statistical period (denoted as ). Divide by , and you get the bandwidth stability coefficient. : The bandwidth stability coefficient Essentially, it represents the dispersion of the access link's bandwidth fluctuation relative to its average level. A larger value indicates more drastic bandwidth fluctuations and lower stability; a smaller value indicates more stable bandwidth. For example, suppose... bytes / second, with a standard deviation of 400,000 bytes / second, then .

[0071] Let the preset stability threshold be denoted as (For example, a value of 0.15). When the bandwidth stability coefficient Not lower than the preset stability threshold This indicates that the access link bandwidth is fluctuating drastically and its state is unstable. In this case, a relatively conservative adjustment strategy should be adopted, adjusting the increment of the preset maximum concurrent upload fragment number (denoted as ). (Unit: number of fragments) is fixed to a small value. (For example (each fragment), that is To avoid excessively increasing the number of concurrent uploads under unstable bandwidth conditions, which could exacerbate queuing and congestion; when the bandwidth stability coefficient Below the preset stability threshold When the bandwidth of the access link is relatively stable, the incremental adjustment can be calculated more precisely using a proportional-integral feedback adjustment method based on the deviation between the current queuing time and the target queuing time.

[0072] Specifically, let the current queuing time be denoted as... (Unit: milliseconds; average of actual queuing times for data fragments within the previous statistical period on the access link). The preset queuing time threshold is denoted as... (Based on the latency tolerance of the video plagiarism detection service, for example, a value of 200 milliseconds), first calculate the current deviation. Then divide the deviation by Normalized queuing bias The adjustment increment is calculated using a proportional-integral feedback control method. ;in, This is a preset scaling factor (e.g., 0.5). Both the preset integral coefficient (e.g., 0.1) and the preset integral coefficient are determined in advance based on the actual adjustment effect. This represents the rounding operation, used to ensure the adjustment increment. The number of slices is an integer. For example, let's say it's in milliseconds. milliseconds, then millisecond, ; Let the cumulative sum of the normalization bias during this period be... ,but .

[0073] The adjustment increment calculated above Add this to the current preset maximum concurrent upload fragment count c to obtain the adjusted concurrent upload fragment count. : Substitute the example values, And update the token bucket capacity accordingly. The token bucket model is designed to dynamically adapt to changes in the bandwidth status of the access link.

[0074] The token bucket model continuously adds tokens to the token bucket according to a token generation rate (denoted as r, in tokens / second), which is based on the aforementioned smoothed bandwidth estimate. The data volume u corresponding to the preset single token is determined as follows: Substitute the example value (take) bytes / second Tokens / second. Based on the order in which each data fragment arrives at the token bucket, it is sequentially checked whether the current number of available tokens in the token bucket is not less than the number of tokens q required for a single data fragment. If so, the data fragment is allowed to send, and q tokens are deducted from the token bucket; otherwise, the data fragment enters a waiting queue, waiting for enough tokens to accumulate in the token bucket before sending. Through the above queuing simulation process, the keyframe extraction interval for each data fragment can be determined. The queuing upload order within the data, and the k-th data fragment ( The corresponding waiting time Based on the above data fragment queuing upload order and the corresponding waiting time for each data fragment. And preset single-segment transmission duration Based on the preset data fragment size p and the instantaneous transmission rate The calculation yielded: The instantaneous transmission rate is obtained by multiplying the token generation rate r by the preset data volume u corresponding to a single token; since Therefore In other words, under the simulation mechanism of this token bucket model, the instantaneous transmission rate of data fragments is numerically equal to the current smooth bandwidth estimate of the access link. This aligns with the physical principle that the transmission rate is limited by available bandwidth during actual network transmission. Substituting the example values... bytes / second Seconds, or 0.28 milliseconds.

[0075] The instantaneous flow values ​​corresponding to each data slice are distributed sequentially on the time axis, that is, the k-th data slice in the time interval. The corresponding instantaneous flow rate value is During the remaining waiting time intervals, the instantaneous flow rate is zero, thus yielding the theoretical burst flow waveform. ,in This is the generation timestamp sequence corresponding to the burst flow waveform in this theory.

[0076] S4. The method for obtaining the raw traffic time-series data of the access link and calculating the basic traffic component by aligning the raw traffic time-series data with the theoretical burst traffic waveform according to the timestamp includes: Obtain the sampling timestamp sequence of the original traffic time-series data of the access link, and the generation timestamp sequence corresponding to the theoretical burst traffic waveform.

[0077] Calculate the cross-correlation coefficient between the original traffic time series data and the theoretical burst traffic waveform at different time offsets within a preset sliding search range, and determine the time offset corresponding to the maximum cross-correlation coefficient as the initial alignment offset.

[0078] A neighborhood search range is set with the initial alignment offset as the center. Within the neighborhood search range, a dynamic time warping algorithm is used to perform nonlinear time warping matching between the original traffic time series data and the theoretical burst traffic waveform to obtain the alignment path with the minimum cumulative warping path cost. The corrected timestamp alignment offset is determined based on the alignment path to compensate for the nonlinear delay introduced by link jitter during the data fragmentation queuing and transmission process.

[0079] The timestamp sequence of the theoretical burst flow waveform is shifted according to the corrected timestamp alignment offset, and the shifted theoretical burst flow waveform is resampled to the same sampling time point as the original flow time series data using a linear interpolation method.

[0080] The basic flow component is obtained by subtracting the original flow time series data from the resampled theoretical burst flow waveform point by point according to the corresponding sampling time point.

[0081] For example, after obtaining the theoretical burst flow waveform Next, the raw traffic time-series data of this access link is obtained. ,in This is the sequence of sampling timestamps obtained from the original traffic time-series data at a fixed sampling period (e.g., sampling once every 10 milliseconds). and The units are the same (both are instantaneous link traffic, such as bytes / second).

[0082] First, calculate the original traffic time series data. With respect to the theoretical burst flow waveform Within the preset sliding search range Different time offsets within (e.g., milliseconds) Cross-correlation coefficient under certain conditions ; It should be noted that, due to the generation timestamp sequence of the burst flow waveform in this theory... Compared with the offset time point They are usually not completely identical, so before calculating the above formula, it is necessary to use a linear interpolation method to calculate the theoretical burst flow waveform. Resampled to the time point corresponding to each candidate offset Then, multiply and sum the results point by point to ensure that the cross-correlation calculations are performed on the same time base. The cross-correlation coefficients are then... The time offset corresponding to the point where the maximum value is reached is determined as the initial alignment offset: ; Considering that the access link may experience nonlinear delay variations due to link jitter during actual transmission, meaning the delay deviation is not constant throughout the entire time interval, simply aligning with the aforementioned overall time offset is insufficient to fully eliminate this type of nonlinear delay impact. Therefore, this initial alignment offset is used... Set the neighborhood search range for the center. ( To preset the neighborhood search radius (e.g., 50 milliseconds), a dynamic time warping algorithm is used within this neighborhood search range. and Nonlinear time-bending matching is performed. Specifically, a cumulative bending path cost matrix is ​​constructed. Its recursive calculation formula is: The above recursive method is used to find a path that minimizes the cumulative curved path cost. The matching path with the smallest sum is denoted as the optimal alignment path. According to the optimal alignment path The actual degree of curvature corresponding to each local time period, relative to the aforementioned preliminary alignment offset. Perform local corrections to obtain the corrected timestamp alignment offset, denoted as . This is used to compensate for the nonlinear delay introduced by the jitter of the access link during the data fragmentation and queuing process.

[0083] The corrected timestamp alignment offset Then, the offset is aligned based on the corrected timestamp. The theoretical burst flow waveform The timestamp sequence is shifted accordingly, and the shifted theoretical burst flow waveform is resampled to the same sampling time point as the original flow time series data using a linear interpolation method. The theoretical burst flow waveform after resampling is obtained, denoted as... :set up After translation and alignment, it falls on two known adjacent time points in the theoretical burst flow waveform. and Between (i.e.) ),but: ; this raw traffic time series data Compared with the theoretical burst flow waveform after resampling According to the corresponding sampling time point By subtracting from each point, the basic flow component is obtained. This basic flow component By eliminating the burst traffic components introduced by the video plagiarism detection service, it can more accurately reflect the network status changes of the access link itself.

[0084] S5. The method for calculating the matching error between the theoretical burst flow waveform and the original flow time series data within the corresponding time interval to obtain the disturbance residual coefficient includes: After completing the timestamp alignment, the difference sequence between the theoretical burst flow waveform and the original flow time series data at each sampling point in the corresponding time interval is obtained, and the root mean square value of the difference sequence is calculated to obtain the matching error.

[0085] The peak amplitude of the theoretical burst flow waveform within the corresponding time interval is obtained, and the normalized matching error is obtained by calculating the ratio of the matching error to the peak amplitude. The disturbance residual coefficient is calculated according to the normalized matching error and the preset disturbance residual coefficient mapping function.

[0086] For example, after completing the timestamp alignment process, the difference sequence between the theoretical burst flow waveform and the original flow time series data at each sampling point within the corresponding time interval is obtained (this difference sequence is the aforementioned , (The total number of sampling points within the corresponding time interval) is used to calculate the root mean square value of the difference sequence to obtain the matching error. : Matching error The larger the value, the lower the degree of agreement between the theoretical burst flow waveform and the actual burst flow components of the original flow time series data, and the greater the residual interference.

[0087] Obtain the peak amplitude A of the theoretical burst flow waveform (after resampling) within the corresponding time interval: , Matching error The ratio of the peak amplitude A to the normalized matching error is denoted as . This eliminates the impact of differences in the absolute magnitude of sudden traffic spikes on the correction effect under different video plagiarism detection business scenarios: For example, suppose , ,but .

[0088] Based on normalized matching error By combining the preset perturbation residual coefficient mapping function, the perturbation residual coefficient is calculated. The preset perturbation residual coefficient mapping function is pre-fitted based on the statistical relationship between the normalized matching error and the actual prediction deviation in a large number of historical samples, with a preset lower limit threshold. (e.g., take 0.1), preset upper limit threshold (For example, take 0.3), lower limit of perturbation residual coefficient (For example, take 0.05), upper limit of disturbance residual coefficient (For example, if we take 0.3), then the mapping function is a piecewise function: ; The piecewise function is and When the normalized matching error is small and the theoretical burst flow waveform stripping effect is good, the disturbance residual coefficient should be a smaller value. When the normalized matching error increases, the disturbance residual coefficient is at... to Within the interval, it increases linearly; when the normalized matching error is too large, the disturbance residual coefficient no longer continues to increase but remains at the preset upper limit. This avoids over-correction of the final prediction result. Substituting the example values, since... Therefore: .

[0089] S6. The method for inputting the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link includes: The basic flow components are subjected to sliding window framing processing, and the mean, variance, peak-to-average power ratio, and spectral energy distribution characteristics obtained by Fourier transform are extracted in each window to form a multidimensional feature sequence.

[0090] The multidimensional feature sequence is input into a pre-trained machine learning network, which includes a long short-term memory network layer and an attention weighting layer connected in sequence. The long short-term memory network layer is used to extract the temporal dependencies of the multidimensional feature sequence, and the attention weighting layer is used to assign attention weights to the temporal dependencies at different times, outputting four sub-quality indicators: latency, packet loss rate, jitter, and throughput stability. The four sub-quality indicators are weighted and summed to obtain the basic network quality prediction value of the access link.

[0091] The basic network quality prediction value is corrected based on the disturbance residual coefficient to obtain the final network quality prediction value.

[0092] For example, the basic traffic component Perform sliding window frame division processing, and set the preset window length as follows: (For example, the number of sampling points corresponding to 1 second), the preset sliding step size is... (For example, taking the number of sampling points corresponding to 0.5 seconds to ensure overlap between adjacent windows, thus improving the continuity of temporal feature extraction), resulting in multiple consecutive analysis windows. Let the total number of analysis windows be... The set of basic flow component samples within the y-th analysis window is denoted as . For each analysis window, the following features are extracted: mean. ,variance Peak-to-average ratio and the spectral energy distribution characteristics obtained after Fourier transform processing. The calculation formulas are as follows: Due to this basic flow component As the difference between the raw flow time-series data and the theoretical burst flow waveform, the peak-to-average power ratio (PAPR) can be positive or negative. If the raw mean is used directly as the denominator, the PAPR will lose its physical meaning when the mean is close to zero or negative. Therefore, this PAPR... Instead, the calculation is performed using the ratio of the peak value to the mean absolute value of the fundamental flow component within the window; this spectral energy distribution characteristic... The calculation method is as follows: first calculate... The amplitude of each frequency component is obtained by performing a discrete Fourier transform. Then, the frequency is divided according to a preset frequency band (e.g., low, medium, and high frequency bands), and the proportion of energy in each frequency band to the total energy of the window is calculated to obtain the spectral energy distribution characteristics corresponding to the window. (The sum of all components is 1, dimensionless). The corresponding values ​​for each analysis window... Arrange and combine windows in sequence to form a multidimensional feature sequence. , which serves as the input to this machine learning network.

[0093] The machine learning network consists of a Long Short-Term Memory (LSTM) network layer and an attention-weighted layer connected in sequence. The LSM network layer comprises multiple LSM network units connected in series, and can be configured as a two-layer stacked structure. The first layer has 128 dimensions for its hidden states, and the second layer has 64 dimensions for its hidden states. This LSM network layer is designed for multi-dimensional feature sequences. Each analysis window processes data sequentially. Each Long Short-Term Memory (LSTM) network unit contains three gate structures: a forget gate, an input gate, and an output gate. These gates are used to selectively forget the internal memory state passed from the previous time step and selectively write the feature information input at the current time step. Based on this, the memory state that should be passed to the next time step and the hidden state that should be output at the current time step are determined. Let the hidden state output at the time step corresponding to the y-th analysis window be denoted as... The specific weight matrix forms of each gating structure will not be elaborated here. The Long Short-Term Memory (LSTM) network layer ultimately outputs the hidden states at the corresponding time points of each analysis window. This serves as the input for subsequent attention-weighted layers, thereby enabling the extraction of temporal dependencies between analysis windows in the multidimensional feature sequence.

[0094] The attention-weighted layer is implemented by analyzing the hidden states at each analysis window corresponding to the output of the long short-term memory network layer. Through a set of trainable parameters (weight matrix) Bias vector and weight vector Map it to the corresponding attention score : Then, score the attention at each moment. After processing with a normalized exponential function (softmax function), the corresponding attention weights are obtained. Attention weights at each time step The sum is 1.

[0095] The hidden states at each time step of the output of this Long Short-Term Memory network layer. According to the corresponding attention weight By performing a weighted summation, a comprehensive feature representation that incorporates the differences in importance at different times is obtained. ; Represent this comprehensive feature The output structure is further input, consisting of two fully connected layers. The first fully connected layer has 32 neurons and uses a linear rectified activation function for nonlinear transformation. The second fully connected layer has 4 neurons, corresponding to the predicted values ​​of four sub-quality indicators: output latency, packet loss rate, jitter, and throughput stability. To avoid confusion with the symbols of other physical quantities mentioned above, the predicted values ​​of these four sub-quality indicators are denoted as follows: (Predicted delay value) (Predicted packet loss rate) (Jitter prediction value) (Throughput stability prediction value), and the output of the second fully connected layer is normalized to map the above four prediction values ​​to a preset value range between 0 and 1. The closer the value is to 1, the more ideal the network operation status reflected by the sub-index is.

[0096] The above four sub-quality indicators are weighted and summed according to preset weighting coefficients to obtain the basic network quality prediction value of the access link, denoted as . : ;in, These are the preset weighting coefficients corresponding to the four sub-quality indicators: latency, packet loss rate, jitter, and throughput stability, and they satisfy the following conditions: These four preset weighting coefficients are determined based on historical network quality assessment experience or statistical analysis of a large number of historical labeled samples. For example, taking... , , , For example, suppose a certain prediction output... , , , (The closer the value is to 1, the more ideal the network state reflected by this indicator). .

[0097] Before machine learning networks can be deployed and used, they need to go through processes such as sample data collection, sample labeling, network structure construction, parameter training, and training effect verification.

[0098] During the sample data collection phase, it is necessary to continuously collect raw traffic time-series data for multiple broadband user access links of different types, under different operating conditions such as good network condition, average network condition, and network condition with significant degradation. Simultaneously, the video encoding parameters and effective camera switching occurrences during actual video deduplication services on the access link within the corresponding time period are recorded. Following the methods described in steps S1 to S5 above, the raw traffic time-series data collected above are subjected to theoretical burst traffic waveform stripping processing to obtain the corresponding basic traffic component samples. and the corresponding disturbance residual coefficient To ensure that the training samples cover a comprehensive range of network operating conditions, the sample collection process typically lasts for no less than three months and covers different time periods (weekdays and weekends, peak daytime and nighttime hours), different access methods (fiber optic access, wireless access), and access link operation under different concurrent user scales. This ensures that the machine learning network trained subsequently has good generalization ability.

[0099] During the sample labeling phase, for each basic traffic component sample, a dedicated network quality detection device is deployed on the access link. Active detection methods are used (e.g., sending probe packets to the access link and statistically analyzing round-trip latency and packet loss ratio) to obtain the actual values ​​of four sub-quality indicators: latency, packet loss rate, jitter, and throughput stability. These are denoted as Del (actual latency, the average round-trip latency of probe packets within the time period), Los (actual packet loss rate, the ratio of the number of lost probe packets to the total number of packets sent within the time period), Jit (actual jitter, the standard deviation of the difference in round-trip latency between adjacent probe packets within the time period), and Sta (actual throughput stability, a negative correlation between the actual throughput rate of the access link and its average throughput rate within the time period; the lower the fluctuation, the higher the value). These four actual values ​​are then normalized to the range of 0 to 1, consistent with the range of the predicted values, facilitating comparison between the two. The real value [Del, Los, Jit, Sta] and the multidimensional feature sequence extracted from the corresponding time period together constitute a complete training sample. Multiple training samples together constitute a sample set, which is divided into training set, validation set and test set according to a preset ratio (e.g. 70% for training, 15% for validation, and 15% for testing).

[0100] During the parameter training phase, the parameters of the machine learning network are iteratively optimized using training set samples. The multidimensional feature sequences of each set of samples in the training set are input into the machine learning network to obtain predicted values ​​under the current parameter conditions. Mean squared error is used as the loss function. : ; The backpropagation algorithm is used based on the loss value. The gradients of each trainable parameter in the Long Short-Term Memory (LSTM) layer, attention weighting layer, and output structure of the machine learning network are calculated. An adaptive moment estimation (Adam) optimization algorithm is then used to iteratively update these trainable parameters according to these gradients. The initial learning rate is 0.001, and it decays to half its original value every 20 iterations. Each iteration completes training on all samples in the training set, typically requiring tens to hundreds of iterations until the loss value of the machine learning network on the validation set is reached. The value stops decreasing with increasing iteration count and stabilizes. An early stopping strategy is used during training; the value stops when the validation set loss value reaches a certain threshold. If the loss value stops decreasing or even starts to rise after 10 consecutive iterations, the training process is terminated early, and the network parameters corresponding to the lowest loss value on the validation set are retained as the final parameter values ​​adopted by the machine learning network to avoid overfitting on the training set.

[0101] During the training effectiveness verification phase, the trained machine learning network is independently evaluated using test set samples, and the predicted values ​​are calculated. Compared with the actual value The average absolute error or root mean square error between the above evaluation indicators are used to determine the accuracy of the machine learning network. When the average absolute error of the four sub-quality indicators does not exceed the preset error range, the machine learning network is considered to have completed training. If the preset accuracy requirement is not met, the training sample size is expanded, or the structural parameters of the machine learning network, such as the number of layers and the dimension of hidden states, are adjusted and retrained until the preset accuracy requirement is met.

[0102] It should be noted that after the machine learning network is deployed and put into use in actual network operation and maintenance scenarios, the parameters of the machine learning network can be incrementally trained and updated according to the newly collected sample data during actual operation, according to a preset update cycle (e.g., every month). That is, the newly collected samples and the original training set samples together constitute the updated training set, and the parameters of the machine learning network are further iteratively optimized using the aforementioned parameter training process. This enables the machine learning network to continuously adapt to changes in the broadband network operating environment and maintain good prediction accuracy.

[0103] Based on the calculated disturbance residual coefficient Predicted value of the basic network quality After making corrections, the final network quality prediction value is obtained. : Substituting the values ​​from the previous example, , ,but In other words, the residual disturbance coefficient The larger the value, the higher the degree of residual interference that was not completely eliminated during the theoretical burst traffic waveform stripping process, and the greater the impact on the predicted value of the basic network quality. The correction range is correspondingly larger, and the final network quality prediction value Q obtained can further compensate for the residual errors that may be introduced by the stripping process itself on the basis of stripping out traffic interference from bursts of traffic, so as to make the network quality prediction results of access links more accurate and reliable.

[0104] Example 2: Based on the same inventive concept, such as Figure 2 As shown, this embodiment also provides a broadband user network quality prediction system based on machine learning. The system includes: a preliminary keyframe quantity determination module, a theoretical keyframe quantity determination module, a theoretical burst traffic waveform generation module, a basic traffic component extraction module, a disturbance residual coefficient calculation module, and a network quality prediction module. The modules are connected in sequence. The preliminary keyframe quantity determination module is used to obtain the video encoding parameters when the video deduplication service processes the video to be checked on the broadband user access link terminal. The video encoding parameters include video frame rate, video resolution, GOP length, and keyframe extraction interval; and to determine the preliminary keyframe quantity based on the video encoding parameters.

[0105] The theoretical keyframe count determination module is used to acquire the bitrate fluctuation sequence of the video encoded bitstream, calculate the fluctuation amplitude of the bitrate fluctuation sequence, determine that a valid shot switch has occurred when the fluctuation amplitude is greater than a preset fluctuation threshold, and add a compensation keyframe count based on the number of valid shot switches based on the initial keyframe count to obtain the theoretical keyframe count.

[0106] The theoretical burst traffic waveform generation module is used to obtain the preset dimension of the feature vector corresponding to a single key frame in the video plagiarism detection business, calculate the total amount of theoretical feature upload data of the video plagiarism detection business, and distribute the total amount of theoretical feature upload data on the time axis according to the key frame extraction interval to obtain the theoretical burst traffic waveform.

[0107] The basic traffic component extraction module is used to obtain the original traffic time-series data of the access link, and calculate the basic traffic component by aligning the original traffic time-series data with the theoretical burst traffic waveform according to the timestamp.

[0108] The disturbance residual coefficient calculation module is used to calculate the matching error between the theoretical burst flow waveform and the original flow time series data in the corresponding time interval to obtain the disturbance residual coefficient.

[0109] The network quality prediction module is used to input the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link; and to correct the basic network quality prediction value according to the disturbance residual coefficient to obtain the final network quality prediction value.

[0110] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0111] Finally, it should be noted that although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting broadband user network quality based on machine learning, characterized in that, The method includes: The video encoding parameters are obtained when the video deduplication service processes the video to be checked on the broadband user access link terminal. The video encoding parameters include video frame rate, video resolution, GOP length, and keyframe extraction interval. The initial number of keyframes is determined based on the video encoding parameters. The bitrate fluctuation sequence of the video encoded bitstream is obtained, the fluctuation amplitude of the bitrate fluctuation sequence is calculated, and when the fluctuation amplitude is greater than a preset fluctuation threshold, it is determined that a valid shot switch has occurred. Based on the initial number of keyframes, the number of compensation keyframes is added according to the number of valid shot switches to obtain the theoretical number of keyframes. Obtain the preset dimension of the feature vector corresponding to a single keyframe in the video plagiarism detection service, calculate the total theoretical feature upload data of the video plagiarism detection service, distribute the total theoretical feature upload data on the time axis according to the keyframe extraction interval, and obtain the theoretical burst traffic waveform. Obtain the raw traffic time-series data of the access link, and calculate the basic traffic component by aligning the raw traffic time-series data with the theoretical burst traffic waveform according to the timestamp; The disturbance residual coefficient is obtained by calculating the matching error between the theoretical burst flow waveform and the original flow time series data in the corresponding time interval. The basic traffic components are input into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link; the basic network quality prediction value is corrected according to the disturbance residual coefficient to obtain the final network quality prediction value.

2. The method for predicting broadband user network quality based on machine learning according to claim 1, characterized in that, The method for determining the initial number of keyframes based on the video encoding parameters includes: The coding complexity parameter of the video to be checked is obtained. The coding complexity parameter is calculated based on the weighted sum of the intra-frame prediction residual energy and the inter-frame motion vector magnitude. The theoretical number of GOPs is calculated based on the video frame rate and GOP length. The theoretical number of GOPs is corrected based on the coding complexity parameter to obtain the corrected theoretical number of GOPs. The basic processing time required for keyframe feature extraction per frame is determined based on the video resolution, and an interval adjustment coefficient is obtained based on the ratio of the basic processing time to the keyframe extraction interval. The preliminary number of keyframes is obtained by multiplying the corrected theoretical number of GOPs by the number of frames extracted per GOP and the interval adjustment coefficient.

3. The method for predicting broadband user network quality based on machine learning according to claim 1, characterized in that, The method for determining a valid shot change occurs when the fluctuation amplitude exceeds a preset fluctuation threshold, and for adding a compensation keyframe number based on the number of valid shot changes to obtain the theoretical keyframe number, includes: The bit rate fluctuation sequence is subjected to moving average denoising processing, and the candidate switching peak time is determined by the local maximum detection algorithm in the denoised fluctuation sequence. A first threshold higher than the preset fluctuation threshold and a second threshold lower than the preset fluctuation threshold are set to form a hysteresis determination window; only when the fluctuation amplitude corresponding to the candidate switching peak moment crosses the first threshold and falls back to below the second threshold within a preset time period is it determined that a valid shot switch has occurred, the timestamp of the valid shot switch is recorded, and the number of valid shot switches is accumulated. The number of compensated keyframes corresponding to a single effective shot switch is calculated based on the difference between the peak amplitude of the bit rate fluctuation sequence corresponding to the effective shot switch time and the preset fluctuation threshold. The number of compensated keyframes corresponding to each effective shot switch is accumulated and added to the initial number of keyframes to obtain the theoretical number of keyframes.

4. The method for predicting broadband user network quality based on machine learning according to claim 1, characterized in that, The method for obtaining the preset dimension of the feature vector corresponding to a single keyframe in the video plagiarism detection service, calculating the theoretical total amount of uploaded feature data for the video plagiarism detection service, and distributing the theoretical total amount of uploaded feature data on the time axis according to the keyframe extraction interval to obtain the theoretical burst traffic waveform includes: The theoretical data volume of the feature vector corresponding to a single keyframe is determined according to the preset dimension. The theoretical number of keyframes is multiplied by the theoretical data volume to obtain the total theoretical feature upload data. The total theoretical feature upload data is divided into multiple data fragments according to the preset fragment data volume. A token bucket model is constructed to simulate the queuing and sending process of each data fragment in the access link. The token bucket capacity of the token bucket model is determined according to the preset maximum number of concurrent upload fragments of the access link. The token bucket model releases tokens into the token bucket according to the token generation rate. According to the order in which each data fragment arrives at the token bucket, when the number of available tokens in the token bucket meets the sending conditions of a single data fragment, it is allowed to send and consume the corresponding number of tokens. Otherwise, it enters the waiting queue to determine the queuing and uploading order of each data fragment within the keyframe extraction interval and its respective waiting time. Based on the data fragment queuing upload order, corresponding waiting time, and preset single fragment transmission time, the instantaneous traffic values ​​corresponding to each data fragment are distributed sequentially on the time axis to obtain the theoretical burst traffic waveform.

5. The method for predicting broadband user network quality based on machine learning according to claim 4, characterized in that, The method for determining the token generation rate includes: Obtain the historical available uplink bandwidth sequence of the access link in the current time period, perform exponential weighted moving average processing on the historical available uplink bandwidth sequence to obtain a smoothed bandwidth estimate, and calculate the standard deviation of the historical available uplink bandwidth sequence relative to the smoothed bandwidth estimate to obtain the bandwidth stability coefficient; determine the token generation rate of the token bucket based on the smoothed bandwidth estimate.

6. The method for predicting broadband user network quality based on machine learning according to claim 5, characterized in that, The method for dynamically adjusting the preset maximum concurrent upload fragment number includes: When the bandwidth stability coefficient is not lower than the preset stability threshold, the adjustment increment of the preset maximum concurrent upload fragment number is reduced; when the bandwidth stability coefficient is lower than the preset stability threshold, the adjustment increment is calculated using a proportional-integral feedback adjustment method based on the deviation between the current queuing time and the preset queuing time threshold. The adjusted concurrent upload fragment count is obtained by adding the adjustment increment to the preset maximum concurrent upload fragment count, and the token bucket capacity is updated accordingly to match the adjusted concurrent upload fragment count.

7. The method for predicting broadband user network quality based on machine learning according to claim 1, characterized in that, The method for obtaining the raw traffic time-series data of the access link, aligning the raw traffic time-series data with the theoretical burst traffic waveform according to timestamps, and then calculating the basic traffic component includes: Obtain the sampling timestamp sequence of the original traffic time-series data of the access link, and the generation timestamp sequence corresponding to the theoretical burst traffic waveform; Calculate the cross-correlation coefficient between the original traffic time series data and the theoretical burst traffic waveform at different time offsets within a preset sliding search range, and determine the time offset corresponding to the maximum cross-correlation coefficient as the initial alignment offset. The neighborhood search range is set with the initial alignment offset as the center. Within the neighborhood search range, the dynamic time warping algorithm is used to perform nonlinear time warping matching between the original traffic time series data and the theoretical burst traffic waveform to obtain the alignment path with the minimum cumulative warping path cost. The corrected timestamp alignment offset is determined based on the alignment path to compensate for the nonlinear delay introduced by link jitter during the data fragmentation queuing and transmission process. The timestamp sequence of the theoretical burst flow waveform is shifted according to the corrected timestamp alignment offset, and the shifted theoretical burst flow waveform is resampled to the same sampling time point as the original flow time series data using a linear interpolation method. The basic flow component is obtained by subtracting the original flow time series data from the resampled theoretical burst flow waveform point by point according to the corresponding sampling time point.

8. The method for predicting broadband user network quality based on machine learning according to claim 1, characterized in that, The method for calculating the matching error between the theoretical burst flow waveform and the original flow time series data within the corresponding time interval to obtain the disturbance residual coefficient includes: After completing the timestamp alignment, the difference sequence between the theoretical burst flow waveform and the original flow time series data at each sampling point in the corresponding time interval is obtained, and the root mean square value of the difference sequence is calculated to obtain the matching error. The peak amplitude of the theoretical burst flow waveform within the corresponding time interval is obtained, and the normalized matching error is obtained by calculating the ratio of the matching error to the peak amplitude. The disturbance residual coefficient is calculated according to the normalized matching error and the preset disturbance residual coefficient mapping function.

9. The method for predicting broadband user network quality based on machine learning according to claim 1, characterized in that, The method of inputting the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link includes: The basic flow components are subjected to sliding window frame segmentation processing, and the mean, variance, peak-to-average ratio and spectral energy distribution characteristics obtained by Fourier transform are extracted in each window to form a multidimensional feature sequence. The multidimensional feature sequence is input into a pre-trained machine learning network, which includes a long short-term memory network layer and an attention weighting layer connected in sequence. The long short-term memory network layer is used to extract the temporal dependencies of the multidimensional feature sequence, and the attention weighting layer is used to assign attention weights to the temporal dependencies at different times, outputting four sub-quality indicators: latency, packet loss rate, jitter, and throughput stability. The four sub-quality indicators are weighted and summed to obtain the basic network quality prediction value of the access link.

10. A broadband user network quality prediction system based on machine learning, characterized in that, The system includes: a preliminary keyframe quantity determination module, a theoretical keyframe quantity determination module, a theoretical burst traffic waveform generation module, a basic traffic component extraction module, a disturbance residual coefficient calculation module, and a network quality prediction module, with each module connected in a sequential communication manner. The preliminary keyframe quantity determination module is used to obtain the video encoding parameters when the video deduplication service processes the video to be checked on the broadband user access link terminal. The video encoding parameters include video frame rate, video resolution, GOP length, and keyframe extraction interval; and to determine the preliminary keyframe quantity based on the video encoding parameters. The theoretical keyframe count determination module is used to acquire the bitrate fluctuation sequence of the video encoded bitstream, calculate the fluctuation amplitude of the bitrate fluctuation sequence, determine that a valid shot switch has occurred when the fluctuation amplitude is greater than a preset fluctuation threshold, and add a compensation keyframe count based on the number of valid shot switches based on the initial keyframe count to obtain the theoretical keyframe count. The theoretical burst traffic waveform generation module is used to obtain the preset dimension of the feature vector corresponding to a single key frame in the video plagiarism detection business, calculate the total amount of theoretical feature uploaded data in the video plagiarism detection business, and distribute the total amount of theoretical feature uploaded data on the time axis according to the key frame extraction interval to obtain the theoretical burst traffic waveform. The basic traffic component extraction module is used to obtain the original traffic time-series data of the access link, and calculate the basic traffic component by aligning the original traffic time-series data with the theoretical burst traffic waveform according to the timestamp. The disturbance residual coefficient calculation module is used to calculate the matching error between the theoretical burst flow waveform and the original flow time series data in the corresponding time interval to obtain the disturbance residual coefficient; The network quality prediction module is used to input the basic traffic components into a pre-trained machine learning network for analysis to obtain the basic network quality prediction value of the access link; and to correct the basic network quality prediction value according to the disturbance residual coefficient to obtain the final network quality prediction value.