Method for detecting quality of UDP data transmission

Through the UDP data transmission quality detection method, machine learning and dynamic resource allocation are used to optimize the UDP protocol, which solves the problems of data loss and low bandwidth utilization of the UDP protocol in complex network environments, and realizes efficient and reliable data transmission quality detection and optimization.

CN119922149BActive Publication Date: 2025-10-17GUANGZHOU DCOLOUR OPTOELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510094728.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-10-17
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

The UDP protocol is prone to data loss, low bandwidth utilization, and lack of adaptability in unstable network or high-interference environments. It cannot effectively support the transmission requirements of different data priorities, affecting the reliability and efficiency of remote device management and control.

Method used

By performing initial classification based on the metadata of received data packets, using machine learning to calculate priority scores, dynamically adjusting resource allocation, designing anti-interference enhancement mechanisms, and monitoring network status in real time for closed-loop optimization, we ensure the reliable transmission of high-priority data and resource optimization.

Benefits of technology

It improves the reliability and adaptability of the UDP protocol in complex network environments, ensures the transmission reliability of high-priority data, reduces the bandwidth occupied by low-priority data, and improves transmission efficiency and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922149B_ABST
    Figure CN119922149B_ABST
Patent Text Reader

Abstract

The application provides a UDP data transmission quality detection method, which comprises the following steps: receiving original UDP data flow; initializing global resource parameters according to the classified and marked data flow, and adjusting the initial classification according to the priority score of the classified and marked data flow; designing an anti-interference enhancement mechanism of each level of data flow to enhance and optimize each level of data flow; based on the enhanced and optimized data flow, performing consistency checking and reconstruction on high-priority data; and based on the final data flow, adjusting the transmission parameters to form a closed-loop optimization. The application effectively overcomes the deficiencies of the UDP protocol in the prior art in terms of reliability, adaptability and bandwidth utilization, and provides a low-cost and high-efficiency solution for remote device management and control scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of UDP data transmission, and particularly relates to a UDP data transmission quality detection method. BACKGROUND

[0002] With the rapid development of Internet of Things (IoT) and industrial automation technologies, the demand for remote device management and control has increased significantly. Real-time monitoring, command delivery, and data collection of devices through networks have become the basic functions of modern intelligent systems. Among numerous communication protocols, User Datagram Protocol (UDP) is widely used in scenarios with high real-time requirements, such as video streaming, real-time gaming, and industrial control, due to its low latency and high efficiency. However, compared with Transmission Control Protocol (TCP), which has higher reliability, UDP does not provide packet order guarantee, packet retransmission, or error checking, which makes it prone to the following problems in unstable or high-interference environments:

[0003] Risk of loss of critical data: Due to the lack of confirmation and retransmission mechanisms in UDP protocol, data packets are easily lost when the network is congested or jittered, especially in wireless networks with more interference. For high-priority control commands in remote device management scenarios, such as device start or stop commands, once lost, it will seriously affect the safety and stability of the system.

[0004] Low bandwidth utilization: UDP protocol usually transmits data at a fixed frequency and packet size, but in actual networks, bandwidth and transmission quality are dynamic. Traditional static transmission strategies can lead to uneven resource allocation: insufficient bandwidth utilization when network conditions are good, and large-scale packet loss or even communication interruption when network is congested.

[0005] Lack of adaptive anti-interference mechanism: Existing UDP-based technologies rely on hardware retries or simple data redundancy to improve transmission success rate, but these methods are inefficient and cannot effectively cope with complex interference environments. In addition, some data redundancy schemes apply redundancy mechanisms to all data packets, resulting in high network load and further deteriorating transmission performance.

[0006] Insufficient support for different data priorities: In remote device management scenarios, transmitted data usually includes control commands, status updates, and log information of different priorities. However, in existing UDP-based implementations, all types of data are processed with the same priority, which may cause ordinary log data to occupy bandwidth, delaying or losing high-priority commands and reducing system reliability.

[0007] Therefore, although the existing technology can achieve efficient real-time data transmission through the UDP protocol, its reliability and transmission efficiency problems have not been effectively solved when the network stability is poor, resources are limited or tasks are diversified. An improved transmission method is urgently needed. Summary of the Invention

[0008] The purpose of this invention is to propose a UDP data transmission quality detection method that overcomes the shortcomings of the existing UDP protocol in terms of reliability, adaptability, and bandwidth utilization, providing a low-cost, high-efficiency solution for remote device management and control scenarios. The combination of these technical points fully utilizes the advantages of the UDP protocol's low latency and high efficiency, while also enhancing its reliability and adaptability in complex network environments.

[0009] In order to achieve the above object, the present invention provides a UDP data transmission quality detection method, the method comprising:

[0010] S1. Receive an original UDP data stream, where the original UDP data stream includes the content and meta-information of each data packet, where the meta-information includes the data packet's timestamp, task category, and data packet size. Then, initially classify the data packets according to the task category of the meta-information and calculate the arrival delay of each data packet. Dynamically calculate a priority score for each data packet using machine learning based on the classification and arrival delay of each data packet. Append the priority score to each data packet to generate a classified and labeled data stream.

[0011] S2, initialize the global resource parameters according to the data flow after classification and marking, and then adjust the initial classification according to the priority score of the data flow after classification and marking, and calculate the sum of the priority scores for each type of data to dynamically adjust the resource allocation ratio of each type of data, and then adjust the global resource parameters to generate the application control strategy for each type of data, and finally output the priority data flow after dynamic control; wherein, the priority of the initial classification adjustment includes high priority Data H , Medium priority Data M and low priority Data L ;

[0012] S3. Design anti-interference enhancement mechanisms for data streams at all levels to enhance and optimize data streams at all levels;

[0013] S4: Based on the enhanced and optimized data stream, high-priority data is checked for consistency and reconstructed, while the network status is monitored. Data packets that pass the consistency check are aggregated into the final data stream.

[0014] S5, based on the final data flow statistics network indicators, adjusts the transmission parameters and feeds them back to S1 to form a closed-loop optimization.

[0015] Further, the task category according to the meta information is used to initially classify the data packets and calculate the arrival delay time of each data packet, specifically including:

[0016] The initial classification includes:

[0017] Data h represents high-priority data, Data m represents medium-priority data, and Data l represents low-priority data.

[0018] The arrival delay Δt of each data packet is calculated i , which is represented as:

[0019] Δt i = t now - M i .time,

[0020] where t now is the current time; M i .time is the timestamp of the data packet; and Δt i represents the time interval from sending to receiving, which is used to dynamically adjust the priority, with the largest delay having the lowest value for real-time requirements.

[0021] Further, the priority score of each data packet is dynamically calculated using machine learning according to the classification and arrival delay time of each data packet, specifically including:

[0022] The data stream Data raw is accepted, Data raw = {(x i , M i , S i ′)|i = 1, 2, …, n}, where x i represents the content of the i-th data packet; M i is the meta information, S i ′ is the priority score calculated in the previous step, and n represents the total number of data packets.

[0023] Key features are extracted from the data stream to construct a feature vector; wherein the key features include time features, category features, historical priority features, size features, and delay features.

[0024] Random forest and gradient boosting machine are used to form an ensemble model, and the feature vector is used as input to calculate the priority score S i of each data packet, which is represented as:

[0025] S i = w RF · SRF,i +w GBM ·S GBM,i

[0026] where S RF,i is the priority score obtained by random forest; S GBM,i is the priority score obtained by gradient boosting machine; w RF and w GBM are the weights of the corresponding models;

[0027] updating the priority calculation method of the data packet by online learning of the integrated model;

[0028] The final data stream output is the optimized data Data classified packet priority information:

[0029] Data classified ={(x i ,M i ,S i )|i=1,2,…,n}

[0030] where S i is the calculated priority score, combined with the output of machine learning.

[0031] Further, the global resource parameters include the total available bandwidth B total , the sliding window size W total , and the initial resource allocation ratios of high, medium, and low priority data α h , α m , α l .

[0032] Further, the global resource parameters are initialized according to the classified and labeled data stream, and the initial classification is adjusted according to the priority score of the classified and labeled data stream, and the sum of the priority scores of each type of data is calculated for dynamic adjustment of the resource allocation ratio of each type of data, specifically including:

[0033] The sum of the priority scores of the data packets of high priority Data H , medium priority Data M , and low priority Data L is calculated for dynamic adjustment of the resource allocation ratio of each type of data, represented as follows:

[0034]

[0035] wherein, is the priority total score of category P, reflecting the importance of the data of this category, H is high priority, M is medium priority, L is low priority, and Data Pis a data packet set belonging to priority P, P ∈ {H, M, L};

[0036] Combining the initial allocation ratio α P , dynamically calculating the bandwidth allocation ratio β P and the sliding window allocation ratio γ P of each type of data, as follows:

[0037]

[0038] wherein β P and γ P represent the bandwidth and sliding window proportion of category P, dynamically adjust the resource allocation between categories, and ensure that high-priority data gets more resources.

[0039] Further, the readjustment of the global resource parameters generates an application control strategy for each type of data, and finally outputs a dynamically regulated priority data stream, specifically including:

[0040] Use β P and γ P to allocate resource limits for each type of data, specifically including:

[0041] Bandwidth limit B P = β P · B total , representing the maximum transmission rate available to category P;

[0042] Sliding window limit W P = γ P · W total , representing the maximum number of data packets simultaneously sent by category P;

[0043] Apply the control strategy to each type of data, specifically including:

[0044] Limit the sending rate so that the total sending rate of each type of data does not exceed B P ;

[0045] Prioritize sending data packets with the largest S i to ensure that resources are used for more important data;

[0046] Limit the number of data packets simultaneously sent by the sliding window to W P ;

[0047] Output a dynamically regulated priority data stream Data scheduled , which is formatted as:

[0048] Data scheduled = {(x i , M i , S i , BP ,W P )|i=1,2,…,n}

[0049] where M i is meta-information, including timestamp, category and size; S i is priority score; B P and W P are bandwidth and sliding window limit of each category of data, respectively.

[0050] Further, the anti-interference enhancement mechanism specifically comprises:

[0051] According to the priority data flow, the parameters of the anti-interference enhancement mechanism are initialized, including the number of redundant transmissions N P of each category of data, wherein the number of redundant transmissions N H of high priority data is 3, the number of redundant transmissions N M of medium priority data is 2, and the number of redundant transmissions N L of low priority data is 1; a disturbance intensity factor δ is added to the data packet to improve robustness;

[0052] For high priority data Data H , a plurality of redundant versions are generated for each data packet, and a disturbance term is added to the data content to improve the anti-interference ability, which is represented as follows:

[0053]

[0054] wherein, is the jth enhanced version of the data packet x i ; is a disturbance matrix based on the data content x i , and the intensity of the disturbance is controlled by δ; meanwhile, a special regularization term is introduced in the disturbance matrix , so that the disturbance is weighted in the importance dimension, which is represented as follows:

[0055]

[0056] wherein, rand(x i ) is a random noise matrix consistent with the structure of x i , S i is the dynamic priority score of the data packet, which controls the strength of the disturbance as a weight; λ reg is a regularization coefficient, which ensures that the data packet with higher priority is subjected to more stringent disturbance restrictions;

[0057] For medium priority data Data M , N M redundant versions are generated, but no complex disturbance is added, only slight randomization is introduced to reduce the computational burden; for low priority data Data L, directly send the original data packet without generating redundant versions, saving resources to the greatest extent;

[0058] Output data stream after anti-interference enhancement processing enhanced , whose format is:

[0059]

[0060] Among them, B P and W P is the resource allocation constraint for category P, N P is the number of redundant transmissions of category P.

[0061] Furthermore, the S4 specifically includes:

[0062] S401, based on each data packet x i , extract all successfully received redundant versions from the receiving end cache and reconstructed through weighted aggregation as It is expressed as follows:

[0063]

[0064] Among them, N i is the number of successfully received redundant versions, j is the index of the successfully received redundant version; w j It is a redundant version The weight of the weight is designed to ensure that more reliable versions contribute more to the reconstruction;

[0065] S402, reconstructing data Calculate its checksum and the CRC check value M of the meta information i Compare with the standard checksum value in .crc:

[0066] If its check value and the CRC check value M of the meta information i .crc is consistent, then the data is reconstructed Valid, join the final data stream;

[0067] If the check fails, the data packet number is recorded and the priority S i Decide to retransmit or mark the packet as lost;

[0068] S403: Aggregate the data packets that pass the consistency check into the final data stream Data reconstructed , whose format is:

[0069]

[0070] in, is the reconstructed data packet content; M i It is meta-information;

[0071] The redundant version The weight w j The calculation is as follows:

[0072]

[0073] in, Is the version and other versions of median deviation, median median; λ diff is the adjustment coefficient, which is used to control the impact of median deviation on weight;

[0074] Among them, for the data packet that fails the verification, if the dynamic priority score S i >Threshold τ, start the following reconstruction strategy:

[0075] Select and reconstruct the data package content from the version set The two versions with the smallest deviation are reconstructed twice, and the calculation is as follows:

[0076]

[0077] Among them, j and k are the two version numbers with the smallest deviation. and In the data reconstruction process, the two most similar versions are selected according to the principle of minimum deviation from the reconstructed data packet;

[0078] If the secondary reconstruction still fails, the uplink request mechanism is triggered and the sender resends the message.

[0079] Furthermore, the S5 specifically includes:

[0080] S501, initialize the key feedback indicators of the feedback mechanism according to the final data flow; the key feedback indicators include packet loss rate, average delay and weighted bandwidth utilization

[0081] S502: Calculate key feedback indicators for each type of data in combination with the final data stream receiving end cache, specifically including:

[0082] The packet loss rate Based on the number of successfully received packets and the total number of sent packets, the calculation is as follows:

[0083]

[0084] Among them, Received P is the number of packets successfully received by category P, Total P is the number of packets sent;

[0085] the average latency Latency P The calculation is as follows:

[0086]

[0087] Wherein, is the receiving time of the data packet ;

[0088] The weighted bandwidth utilization rate BW util is weighted by priority, combined with the dynamic priority score S i The dynamic allocation weight is calculated as follows:

[0089]

[0090] Wherein, β P is the bandwidth allocation ratio of category P, B total is the total available bandwidth;

[0091] S503, adjust the transmission strategy based on the feedback index, and design an improvement scheme for different problems;

[0092] S504, output the adjusted transmission parameters in the form of a strategy update packet Strategy updated , calculated as follows:

[0093]

[0094] Wherein, is the new bandwidth allocation ratio of each type of data; is the updated sliding window limit of each type of data.

[0095] Further, the S503 specifically includes:

[0096] If the resource allocation ratio β H needs to be preferentially improved, the update formula is:

[0097]

[0098] Wherein κ loss is the adjustment coefficient, used to control the smoothness of the allocation change;

[0099] If the average latency Latency H > delay threshold λ H , the high-priority sliding window limit W H is preferentially increased to alleviate the delay problem, and the low-priority window W L is reduced, calculated as follows:

[0100]

[0101] wherein, is the updated high priority sliding window quota, is the original high priority sliding window quota, and γ is a weight coefficient for adjusting the window increase amplitude;

[0102] If the high utilization rate is significantly lower than the expected target, then the low priority bandwidth is reduced and redistributed to the high priority and medium priority categories.

[0103] The beneficial technical effects of the present application are at least the following:

[0104] (1) The present application addresses the problem of UDP protocol lacking support for different data priority, and designs a priority classification and dynamic regulation mechanism. According to the importance and real-time of data, the data is divided into high priority instruction, medium priority state update and low priority log categories. By adding a priority flag field in the frame header, combined with a dynamic window adjustment strategy, the transmission reliability of high priority data is prioritized, while avoiding low priority data from occupying too much bandwidth resources.

[0105] (2) The present application addresses the problem of data loss and damage of UDP in interference environment, and designs a lightweight streaming anti-interference enhancement mechanism. For high priority data, the sender generates multiple disturbance versions (such as different timestamps or redundant fields) to improve transmission robustness, and the receiver uses a differential checksum and voting algorithm to reconstruct lost data. This mechanism significantly improves the transmission success rate of critical data without significantly increasing network load.

[0106] (3) The present application addresses the problem of UDP protocol lacking adaptability, and adds a real-time feedback mechanism at the receiving end to dynamically monitor the packet loss rate, delay and bandwidth utilization of the network, and transmit feedback information through the UDP channel to the sending end. The sender dynamically adjusts the data sending frequency, redundancy strategy and priority allocation ratio based on the feedback information, thereby achieving optimal allocation of resources and continuous optimization of transmission performance. BRIEF DESCRIPTION OF DRAWINGS

[0107] The present application is further illustrated by the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present application. For those skilled in the art, other drawings can be obtained without creative labor based on the following drawings.

[0108] Figure 1 The flowchart of the UDP data transmission quality detection method of the present application. DETAILED DESCRIPTION

[0109] Embodiments of the present application are described below in the detailed description and illustrated in the accompanying drawings by which like or similar elements, structures and / or functions have been given the same reference numerals and functionalities which are intended to be the same or to be similar in function where possible. The embodiments described below are exemplary and are not intended to be limiting.

[0110] As shown in the drawings, the UDP data transmission quality detection method provided by the embodiments of the present application comprises the following steps S1-S5: Figure 1

[0111] S1, receiving the original UDP data stream, the original UDP data stream comprising the content and meta information of each data packet, the meta information comprising the timestamp, task category and data packet size of the data packet, then performing initial classification on the data packet according to the task category of the meta information and calculating the arrival delay time of each data packet, dynamically calculating the priority score of each data packet according to the classification and arrival delay time of each data packet by machine learning, attaching the priority score to each data packet, and generating the data stream after classification marking.

[0112] Specifically, the received original UDP data stream Data raw has the following format:

[0113] Data raw ={(x i ,M i )|i=1,2,…,n}

[0114] Wherein, x i represents the content of the i-th data packet; M i is the meta information, including:

[0115] M i .time: the timestamp of the data packet, in seconds;

[0116] M i .type: task category (such as control instruction, state feedback, etc.);

[0117] M i .size: data packet size, in bytes.

[0118] Further, an initial feature vector F i is constructed for each data packet:

[0119] F i =[M i .time,M i .type,M i .size]

[0120] Wherein F​i As input for subsequent priority calculation, the time, category, and size dimensions of the feature vector are used to accurately characterize the characteristics of the data packet.

[0121] Further, it is divided into the following three categories:

[0122] Data h : High-priority data (such as control instructions), which is sensitive to delay and requires high reliability;

[0123] Data m Medium-priority data (such as device status feedback) has moderate real-time requirements.

[0124] Data l : Low-priority data (such as log records) has low timeliness requirements.

[0125] Calculate the arrival delay Δt for each data packet i , the formula is:

[0126] Δt i =t now -M i .time

[0127] Among them, t now is the current time; M i .time is the timestamp of the data packet. Δt i Indicates the time interval from sending to receiving, which is used to dynamically adjust the priority. The longer the delay, the lower the value of data for real-time requirements.

[0128] Furthermore, this invention dynamically calculates packet priority scores using machine learning algorithms. It combines classification and regression algorithms, using ensemble learning to improve the accuracy and robustness of priority calculations. Furthermore, innovative computational terms are introduced during feature design and model training to adapt to changes in network traffic.

[0129] As you can understand, the output of the previous step will be used to receive a formatted data stream:

[0130] Data raw ={(x i ,M i ,S i )|i=1,2,…,n}

[0131] Among them, x i Indicates the content of the i-th data packet; M i Meta information, including:

[0132] Mi .time: timestamp of the packet, in seconds;

[0133] M i .type: task category (e.g., control instruction, status feedback, etc.);

[0134] M i .size: packet size, in bytes;

[0135] S i priority score calculated in the previous step.

[0136] Further, a set of features is extracted from the raw data as input to the machine learning model. To improve the accuracy and adaptability of the model, the following innovative features are designed:

[0137] Time feature: based on M i .time, the arrival time of each packet and the time difference (delay) from the previous packet can be calculated, i.e.,

[0138] Δt i = M i .time - M i-1 .time, (7)

[0139] Category feature: based on M i .type, the data packet is one-hot encoded to represent its task category (e.g., control, status, log, etc.).

[0140] Historical priority feature: the average priority score of the previous k packets is calculated through a sliding window as the historical priority feature of the packet, which is used to capture the time-varying nature of traffic.

[0141] Size feature: the size of the packet M i .size is used to regularize the model to prevent large packets from occupying too much priority.

[0142] Delay feature: the real-time delay Δt i of each packet is calculated, and the delay feature is combined with the priority score to train the model.

[0143] These features form a feature vector F i , which is used to train the machine learning model:

[0144] F i = [Δt i , one-hot(M i .type), M i .size, avg_priority_history]

[0145] Further, the present application uses Ensemble Learning to combine multiple machine learning algorithms for priority calculation. In this scheme, Random Forest and Gradient Boosting Machine (GBM) are selected to jointly constitute an ensemble model. These two models can automatically learn the nonlinear relationship of data when facing complex input features.

[0146] It can be understood that the random forest algorithm improves the stability and generalization ability of the model through the integration of multiple decision trees. Each tree is trained according to different data subsets, and finally classified or regressed by voting.

[0147] Gradient boosting machine is a tree model based on gradient descent optimization, which can train multiple weak classifiers or regressors through iteration, thereby gradually correcting the bias of the previous round model to achieve high accuracy.

[0148] Further, through the ensemble method, the results of random forest and GBM are weighted and fused to calculate the priority score of each data packet:

[0149] S i = w RF · S RF,i + w GBM · S GBM,i

[0150] Where S RF,i is the priority score obtained by random forest; S GBM,i is the priority score obtained by GBM; w RF and w GBM are the weights of the corresponding models.

[0151] Further, in order to further improve the accuracy of priority calculation, a dynamic feature updating mechanism is designed to continuously update the priority calculation method of the data packet through online learning of the model. Specifically:

[0152] Data packet historical priority update: As new data packets arrive, historical priority scores need to be updated and fed back to the model.

[0153] Delay and network state monitoring: Real-time calculation of delay changes and network status to fine-tune the model to adapt to network traffic fluctuations.

[0154] Further, the model training process is as follows:

[0155] Data preparation: Collect historical data from the system, format the data and perform feature engineering.

[0156] Model training: Divide data into training set and validation set, train random forest and GBM using training set, and evaluate model performance using validation set.

[0157] Integrated model optimization: Adjust model weights w by cross-validation RF and w GBM , optimize the final priority calculation effect.

[0158] Real-time update and online learning: Adjust features online through real-time network traffic data, and update model using incremental learning.

[0159] Finally, the output of the final data stream is the optimized data packet priority information:

[0160] Data classified ={(x i ,M i ,S i )|i=1,2,…,n}

[0161] Where S i is the calculated priority score, combining the output of the machine learning model (random forest and GBM); data content x i ; meta information M i (time stamp, category, size, etc.).

[0162] S2, according to the classification marked data stream initialization global resource parameter, according to the priority score of the classification marked data stream to adjust the initial classification, and calculate the sum of priority score for each type of data, used for dynamic adjustment of resource allocation proportion of each type of data, then adjust the global resource parameter to generate each type of data application control strategy, finally output the dynamically regulated priority data stream; wherein, the priority of the initial classification adjustment includes high priority Data H , medium priority Data M and low priority Data L .

[0163] Specifically, receive the output data Data classified from step 1, which is in the format:

[0164] Data classified ={(x i ,M i ,S i )|i=1,2,…,n}

[0165] Further, initialize the global resource parameter:

[0166] B totalTotal available bandwidth (byte / s), representing the total data transmission rate allowed by the system.

[0167] W total Sliding window size, representing the number of data packets that the system can send at the same time.

[0168] α H ,α M ,α L Initial resource allocation ratio of high, medium and low priority data, respectively 0.5, 0.3 and 0.2.

[0169] Further, according to S classified and M i .type in Data i , the data packets are reclassified into three groups:

[0170] Data H : High priority (such as control instructions);

[0171] Data M : Medium priority (such as device status feedback);

[0172] Data L : Low priority (such as log information).

[0173] Further, the sum of priority scores is calculated for each type of data to dynamically adjust the resource allocation ratio of each type of data:

[0174]

[0175] Where is the total score of priority of category P, reflecting the importance of the data of this category.

[0176] Combined with the initial allocation ratio α P , the bandwidth allocation ratio β P and the sliding window allocation ratio γ P of each type of data are dynamically calculated:

[0177]

[0178] In the formula, β P and γ P represent the bandwidth and sliding window proportion of category P, dynamically adjusting the resource allocation between categories to ensure that high priority data gets more resources.

[0179] Further, β P and γ P are used to allocate resource limits for each type of data:

[0180] Bandwidth limit B P = βP • B total , denotes the maximum transmission rate that class P can use;

[0181] Sliding window limit W P = γ P • W total , denotes the maximum number of simultaneously transmitted packets for class P.

[0182] Apply the regulation strategy to each class of data:

[0183] Limit the transmission rate so that the total transmission rate of each class of data does not exceed B P ;

[0184] Prioritize the transmission of packets with the highest score S i to ensure that resources are used for more important data;

[0185] Limit the number of simultaneously transmitted packets in the sliding window to W P .

[0186] This strategy dynamically adapts to changes in the priority of data by combining bandwidth and sliding window allocation, while avoiding excessive system resource occupation by low-priority data.

[0187] Further, output the dynamically regulated priority data stream Data scheduled , which has the format:

[0188] Data scheduled = {(x i , M i , S i , B P , W P ) | i = 1, 2, …, n}

[0189] Where x i represents the packet content; M i represents the meta-information, including timestamp, class and size; S i represents the priority score; B P and W P represent the bandwidth and sliding window limit of each class of data.

[0190] S3, design an anti-interference enhancement mechanism for each level of data stream to enhance and optimize each level of data stream.

[0191] Specifically, receive the output data stream Data scheduled from step 2, which has the format:

[0192] Data scheduled = {(x i , M i , S iB P ,W P )|i=1,2,…,n}

[0193] Further, the parameters of the anti-interference enhancement mechanism are initialized:

[0194] N P : the number of redundant transmissions for each type of data, high priority N H = 3, medium priority N M = 2, and low priority N L = 1;

[0195] δ: perturbation intensity factor, used to add slight random perturbations to the data packets to improve robustness. The anti-interference mechanism provides stronger enhancement strategies for high-priority data while ensuring that resources are controlled, serving the regulation results of step 2.

[0196] Further, for high-priority data Data H , multiple redundant versions are generated for each data packet, and perturbation items are added to the data content to improve anti-interference ability. Define the enhanced data version as:

[0197]

[0198] wherein, is the jth enhanced version of data packet x i ; is the perturbation matrix based on data content x i , and the intensity of the perturbation is controlled by δ; δ is the perturbation intensity factor, which ensures that the difference between data versions is within the acceptable range, enhancing anti-interference while not destroying the core content of the data. The perturbation matrix introduces a special regularization term, which weights the perturbation in the importance dimension:

[0199]

[0200] wherein, rand(x i ) is a random noise matrix consistent with the structure of x i ; S i is the priority score of the data packet, which controls the strength of the perturbation as a weight; λ reg is the regularization coefficient, which ensures that data packets with higher priority are subject to stricter perturbation restrictions.

[0201] Further, for medium-priority data Data M , N M redundant versions are generated, but no complex perturbation is added, only slight randomization is introduced to reduce the computational burden. For low-priority data Data L, directly sending original data packets without generating redundant versions, thus saving resources to the maximum extent.

[0202] wherein all the category data packets strictly follow the B P and W P limits assigned in step 2 when being sent, ensuring that the bandwidth and sliding window usage comply with the regulation policy.

[0203] Further, the output data stream Data enhanced has the following format:

[0204]

[0205] wherein, is the enhanced data packet version; M i is the meta information; S i is the priority score; B P and W P are the resource allocation limits of category P; N P is the number of redundant transmissions of category P.

[0206] S4, based on the enhanced and optimized data stream, perform consistency check and reconstruction on high-priority data, while monitoring the network state, and aggregate the data packets that pass the consistency check into the final data stream.

[0207] Specifically, the output data stream Data enhanced from step 3 is received, which has the following format:

[0208]

[0209] wherein, is the jthredundant version of the ithdata packet, which has been subjected to anti-interference enhancement processing; M i is the meta information, including the timestamp M i .time, category M i .type, size M i .size, and CRC check value M i .crc; S i is the priority score of the data packet; B P and W P are the bandwidth and sliding window limits of category P, respectively; N P is the number of redundant transmissions of category P.

[0210] Further, the receiving end buffer is initialized to store the received redundant versions and record the numbers of missing or duplicate data packets to assist subsequent reconstruction and optimization.

[0211] Further, for each data packet xi extract all successfully received redundancy versions from the receiver buffer and reconstruct by weighted aggregation

[0212]

[0213] where N i is the number of successfully received redundancy versions; w j is the weight of redundancy version , the design of which ensures that more reliable versions contribute more to the reconstruction. The version weight w j is dynamically adjusted with the following properties:

[0214]

[0215] where is the median deviation of version from other versions; λ diff is a tuning coefficient to control the influence of median deviation on the weight.

[0216] By introducing a median deviation, an anti-exception mechanism is introduced to reduce the destructive impact of strongly interfered versions on the aggregation result.

[0217] Further, for the reconstructed data , its check value is calculated and compared with the standard check value in the meta-information M i .crc:

[0218] If is consistent with M i .crc, then is determined to be valid and is added to the final data stream;

[0219] If the check fails, the data packet number is recorded, and according to its priority S i , it is decided whether to retransmit or mark it as a lost packet.

[0220] For the data packet whose check fails, if the priority S i >τ(threshold), the following reconstruction strategy is started:

[0221] Select the two versions with the smallest deviation from for secondary reconstruction:

[0222]

[0223] where j, k are the numbers of the two versions with the smallest deviation;

[0224] If the secondary reconstruction still fails, the uplink request mechanism is triggered, and the sender retransmits.

[0225] Further, the data packets passing the consistency check are aggregated into the final data stream Data reconstructed with the format:

[0226]

[0227] wherein, is the reconstructed data packet content; M i is meta information, including timestamp, category, size and CRC check value; S i is the priority score.

[0228] S5, based on the final data stream statistics network indicators, adjust the transmission parameters, and feedback to S1 to form a closed loop optimization.

[0229] Specifically, first, initialize the monitoring indicators of the feedback mechanism:

[0230] Loss rate , record the loss rate of each type of data;

[0231] Latency P , statistics of the transmission delay of each type of data;

[0232] BW util , analyze the resource utilization efficiency of each type of data.

[0233] These indicators provide basic data for dynamic optimization and support subsequent transmission strategy adjustment.

[0234] Further, in combination with the receiving end buffer and Data reconstructed , calculate the key feedback indicators for each type of data:

[0235] Loss rate : the packet loss rate is based on the number of successfully received data packets and the total number of sent packets, defined as:

[0236]

[0237] wherein Received P is the number of successfully received packets of category P, and Total P is the number of sent packets.

[0238] Latency P : the transmission delay is calculated by the difference between the receiving time and the sending timestamp, defined as:

[0239]

[0240] wherein is the receiving time of the data packet .

[0241] weighted bandwidth utilization BW util : resource usage efficiency is weighted by priority, combined with S i dynamic allocation weight:

[0242]

[0243] where β P is the bandwidth allocation ratio of category P, B total is the total available bandwidth. This formula reflects the actual efficiency of bandwidth allocation through priority weight.

[0244] Further, based on the feedback indicators to adjust the transmission strategy, design improvement scheme for different problems:

[0245] Packet loss rate optimization: if the packet loss rate of high priority data (high priority packet loss rate threshold), need to give priority to improve its resource allocation ratio β H , update formula:

[0246]

[0247] where κ loss is the adjustment coefficient, used to control the smoothness of allocation changes.

[0248] Delay optimization: if Latency H > λ H (delay threshold), prefer to increase the high priority sliding window limit W H , to alleviate the delay problem, while cutting low priority window W L , through the formula:

[0249]

[0250] Utilization optimization: if significantly lower than the expected target, reduce the low priority bandwidth, reallocated to high priority and medium priority categories.

[0251] In the adjustment of the introduction of regular constraint term to smooth the adjustment amplitude, to ensure the gradual optimization of resource allocation.

[0252] Further, the adjusted transmission parameters in the form of strategy update package Strategy updated output, format:

[0253]

[0254] where, is the new bandwidth allocation ratio of each type of data; is the update sliding window limit of each type of data.

[0255] The policy update package is fed back to the sending end to complete the closed-loop optimization. This feedback mechanism adapts to network fluctuations through real-time monitoring and optimization, and realizes the dynamic adaptation capability of the patent scheme.

[0256] It should be noted that the above-described workflow is merely illustrative and does not limit the scope of protection of the present application. In actual application, a person skilled in the art can select part or all of them to achieve the purpose of the embodiment scheme according to actual needs, which is not limited here.

[0257] In addition, technical details not described in detail in this embodiment can be referred to the parameter running method provided by any embodiment of the present application, which will not be described here.

[0258] It should be noted that in this paper, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or system including the element.

[0259] The above embodiment number of the present application is only for description, not representing the pros and cons of the embodiments.

[0260] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk), including a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present application.

[0261] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the present application specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. UDP data transmission quality detection method, characterized in that: The method comprises: S1. Receive an original UDP data stream, where the original UDP data stream includes the content and meta-information of each data packet, where the meta-information includes the data packet's timestamp, task category, and data packet size. Then, initially classify the data packets according to the task category of the meta-information and calculate the arrival delay of each data packet. Dynamically calculate a priority score for each data packet using machine learning based on the classification and arrival delay of each data packet. Append the priority score to each data packet to generate a classified and labeled data stream. S2, initialize the global resource parameters according to the data flow after classification and marking, and then adjust the initial classification according to the priority score of the data flow after classification and marking, and calculate the sum of the priority scores for each type of data to dynamically adjust the resource allocation ratio of each type of data, and then adjust the global resource parameters to generate the application control strategy for each type of data, and finally output the priority data flow after dynamic control; wherein, the priority of the initial classification adjustment includes high priority Data H , Medium priority Data M and low priority Data L ; S3. Design anti-interference enhancement mechanisms for data streams at all levels to enhance and optimize data streams at all levels; S4: Based on the enhanced and optimized data stream, high-priority data is checked for consistency and reconstructed, while the network status is monitored. Data packets that pass the consistency check are aggregated into the final data stream. S5, based on the final data flow statistics network indicators, adjusts the transmission parameters and feeds them back to S1 to form a closed-loop optimization.

2. The UDP data transmission quality detection method according to claim 1, wherein: The initial classification of the data packets according to the task category of the meta information and the calculation of the arrival delay time of each data packet specifically include: The initial classification includes: Data h Indicates high priority data, Data m Indicates medium priority data and Data l Indicates low priority data; Calculate the arrival delay Δt for each data packet i , which is expressed as follows: Δt i =t now -M i .time, Among them, t now is the current time; M i .time is the timestamp of the data packet; Δt i Indicates the time interval from sending to receiving, used to dynamically adjust the priority. The data with the longest delay has the lowest value for real-time requirements.

3. The UDP data transmission quality detection method according to claim 2, wherein: The priority score of each data packet is dynamically calculated using machine learning based on the classification and arrival delay time of each data packet, specifically including: Accept data stream Data raw , for Data raw ={(x i ,M i ,S i ′)|i=1,2,…,n}, where x i Indicates the content of the i-th data packet; M i is the meta information, S i ' is the priority score calculated in the previous step, and n represents the total number of packets; Extract key features from the data stream and construct a feature vector; wherein the key features include time features, category features, historical priority features, size features, and delay features; The random forest and gradient boosting machine are used to form an integrated model, and the feature vector is used as input to calculate the priority score S of each data packet. i , expressed as: S i =w RF ·S RF,i +w GBM ·S GBM,i Among them, S RF,i is the priority score obtained by random forest; S GBM,i is the priority score obtained by the gradient boosting machine; w RF and w GBM is the weight of the corresponding model; Update the priority calculation method of data packets through online learning of the integrated model; The final data stream output is the optimized data classified Packet priority information: Data classified ={(x i ,M i ,S i )|i=1,2,…,n} Among them, S i To calculate the priority score, the output of machine learning is combined.

4. The UDP data transmission quality detection method according to claim 1, wherein: The global resource parameters include the total available bandwidth B total , sliding window size W total and the initial resource allocation ratio α of high, medium, and low priority data h ,α m ,α l .

5. The UDP data transmission quality detection method according to any one of claims 3 or 4, characterized in that: The global resource parameters are initialized based on the classified and marked data streams, and the initial classification is adjusted based on the priority scores of the classified and marked data streams. At the same time, the sum of the priority scores is calculated for each type of data to dynamically adjust the resource allocation ratio for each type of data. Specifically, the following steps are performed: High priority data H , Medium priority Data M and low priority Data L The sum of the priority scores of the data packets is calculated respectively, which is used to dynamically adjust the resource allocation ratio of each type of data, as shown below: in, It is the total priority score of category P, reflecting the importance of the data in this category. H is high priority, M is medium priority, and L is low priority. P is the set of packets belonging to priority P, P∈{H,M,L}; Combined with the initial allocation ratio α P , dynamically calculate the bandwidth allocation ratio β for each type of data P and sliding window allocation ratio γ P , which is expressed as follows: Among them, β P and γ P Indicates the bandwidth and sliding window ratio of category P, dynamically adjusts resource allocation between categories, and ensures that high-priority data receives more resources.

6. The UDP data transmission quality detection method according to claim 5, characterized in that: The process of adjusting global resource parameters to generate a control strategy for each type of data application and finally outputting a dynamically controlled priority data stream specifically includes: Using Beta P and γ P Allocate resource limits for each type of data, including: Bandwidth limit B P =β P ·B total , represents the maximum transmission rate that can be used by category P; Sliding window limit W P =γ P W total , represents the maximum number of packets sent simultaneously for category P; Apply governance policies to each type of data, including: Limit the sending rate so that the total sending rate of each type of data does not exceed B P ; Priority sending score S i Largest data packets to ensure resources are used for more important data; The number of packets sent simultaneously by the sliding window is limited to W P ; Output dynamically regulated priority data stream Data scheduled , whose format is: Data scheduled ={(x i ,M i ,S i ,B P ,W P )|i=1,2,…,n} Among them, M i Meta information, including timestamp, category and size; S i is the priority score; B P and W P They are the bandwidth and sliding window limits for each type of data.

7. The UDP data transmission quality detection method according to claim 1, wherein: The anti-interference enhancement mechanism specifically includes: Initialize the parameters of the anti-interference enhancement mechanism according to the priority data stream, including: the number of redundant transmissions N for each type of data P , where high priority N H =3, medium priority N M =2, low priority N L =1; Perturbation intensity factor δ, used to add slight random perturbations to the data packet to improve robustness; For high priority data H , multiple redundant versions are generated for each data packet, and disturbance items are added to the data content to improve the anti-interference ability, which is expressed as follows: in, is data packet x i The j-th enhanced version of ; is based on the data content x i The perturbation matrix, the intensity of the perturbation is controlled by δ; at the same time, in the perturbation matrix A special regularization term is introduced to make the perturbation weighted in the importance dimension, which is expressed as follows: Among them, rand(x i ) is the same as x i The random noise matrix with consistent structure, S i is the dynamic priority score of the data packet, which serves as a weight to control the strength of the disturbance; reg is the regularization coefficient, ensuring that higher priority packets are subject to stricter perturbation limits; Centering priority data M , generate N M Redundant versions, but no complex perturbations are added, only slight randomization is introduced to reduce the computational burden; for low-priority data L , directly send the original data packet without generating redundant versions, saving resources to the greatest extent; Output data stream after anti-interference enhancement processing enhanced , whose format is: Among them, B P and W P is the resource allocation constraint for category P, N P is the number of redundant transmissions of category P.

8. The UDP data transmission quality detection method according to claim 7, wherein: Said S4 specifically includes: S401, based on each data packet x i , extract all successfully received redundant versions from the receiving end cache and reconstructed through weighted aggregation as It is expressed as follows: Among them, N i is the number of successfully received redundant versions, j is the index of the successfully received redundant version; w j It is a redundant version The weight of the weight is designed to ensure that more reliable versions contribute more to the reconstruction; S402, reconstructing data Calculate its checksum and the CRC check value M of the meta information i Compare with the standard checksum value in .crc: If its check value and the CRC check value M of the meta information i .crc is consistent, then the data is reconstructed Valid, join the final data stream; If the check fails, the data packet number is recorded and the priority S i Decide to retransmit or mark the packet as lost; S403: Aggregate the data packets that pass the consistency check into the final data stream Data reconstructed , whose format is: in, is the reconstructed data packet content; M i It is meta-information; The redundant version The weight w j The calculation is as follows: in, Is the version and other versions of median deviation, median median; λ diff is the adjustment coefficient, which is used to control the impact of median deviation on weight; Among them, for the data packet that fails the verification, if the dynamic priority score S i >Threshold τ, start the following reconstruction strategy: Select and reconstruct the data package content from the version set The two versions with the smallest deviation are reconstructed twice, and the calculation is as follows: Among them, j and k are the two version numbers with the smallest deviation. and In the data reconstruction process, the two most similar versions are selected according to the principle of minimum deviation from the reconstructed data packet; If the secondary reconstruction still fails, the uplink request mechanism is triggered and the sender resends the message.

9. The UDP data transmission quality detection method according to claim 1, wherein: Said S5 specifically includes: S501, initializing key feedback indicators of the feedback mechanism according to the final data flow; the key feedback indicators include packet loss rate, average delay and weighted bandwidth utilization; S502: Calculate key feedback indicators for each type of data in combination with the final data stream receiving end cache, specifically including: The packet loss rate Based on the number of successfully received packets and the total number of sent packets, the calculation is as follows: Among them, Received P is the number of packets successfully received by category P, Total P is the number of packets sent; The average latency P The calculation is based on the difference between the receiving time and the sending timestamp, as follows: in, It is a data packet Time of receipt; The weighted bandwidth utilization BW util Weighted by priority, combined with dynamic priority score S i Dynamically assign weights, calculated as follows: Among them, β P is the bandwidth allocation ratio of category P, B total is the total available bandwidth; S503. Adjust the transmission strategy based on the feedback indicators and design improvement solutions for different problems; S504, the adjusted transmission parameters are updated in the strategy package Strategy updated The output is in the form of, and the calculation is as follows: in, is the new bandwidth allocation ratio for each type of data; is the update sliding window limit for each type of data.

10. The UDP data transmission quality detection method according to claim 9, characterized in that: The S503 specifically includes: If the packet loss rate of high priority data >High priority packet loss rate threshold τ H , it is necessary to prioritize increasing its resource allocation ratio β H , the update formula is: where κ loss is the adjustment coefficient used to control the smoothness of the distribution change; If the average latency is high H Delay threshold λ H , give priority to increasing the high priority sliding window limit W H , alleviate the delay problem and cut the low priority window W L , calculated as follows: in, is the updated high priority sliding window limit, is the original high priority sliding window limit, γ is the weight coefficient used to adjust the window increase amplitude; If high utilization If it is significantly lower than the expected target, the low-priority bandwidth will be reduced and reallocated to the high-priority and medium-priority categories.

Citation Information

Patent Citations

  • Data packet level transmission priority adaptive adjustment method oriented to programmable network time delay guarantee

    CN118158173A

  • Telemetry data collection and distribution method and system

    CN118540227A