A Dynamic Optimization Method for Packet Gluing, Device and Storage Medium

By calculating the data stream reception efficiency within the time window and using convolutional neural network and Transformer model to identify boundaries, the sticky packet problem in TCP streaming is solved, and efficient and real-time data processing and optimization are achieved.

CN120263735BActive Publication Date: 2025-08-05SICHUAN ZHONGDIAN AOSTAR INFORMATION TECHNOLOGIES CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510687614.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-08-05
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

The sticky packet problem caused by TCP's streaming mechanism is difficult to deal with in high frequency transmission and complex network environments. The existing methods have problems such as high protocol complexity, insufficient real-timeness, poor adaptability and large resource overhead.

Method used

Receive data flow within the preset time window, calculate the reception efficiency and dynamically adjust the cache space, use convolutional neural network and Transformer model to identify the data flow boundaries, shard and reorganize data packets and perform protocol analysis.

Benefits of technology

It realizes efficient processing of data flows in complex network environments, improves the real-time and adaptability of the system, reduces resource overhead, and meets diversified data transmission needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263735B_ABST
    Figure CN120263735B_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic packet adhesion optimization method, device and storage medium. The method includes the following steps: receiving a data stream from a network within a preset time window and calculating the reception efficiency of the data stream, setting a data cache space according to the data stream reception efficiency for caching the data stream; constructing a data stream boundary recognition model, inputting the cached data stream into the data stream boundary recognition model for boundary recognition; fragmenting the cached data stream according to the boundary recognition result of the cached data stream and then reorganizing it into a complete data packet; performing protocol parsing on the data packet to extract the valid data in the data packet, and then delivering the valid data to the upper-layer application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a dynamic packet adhesion optimization method, device and storage medium, belonging to the technical field of data processing. Background Art

[0002] In the field of network communication, the TCP protocol is widely used due to its reliability and ordered data transmission characteristics.

[0003] However, the streaming transmission mechanism of TCP may lead to the problem of packet adhesion. Especially in the case of high-frequency transmission and complex network environments, the problem of packet adhesion refers to that multiple independent data packets are treated as a continuous byte stream at the receiving end, resulting in unclear data boundaries and bringing difficulties to data parsing and application layer processing.

[0004] Traditional methods for solving the problem of packet adhesion, such as fixed-length protocols, the design of message headers and message bodies, and the use of delimiters to divide data boundaries, all have the following technical defects:

[0005] High protocol complexity: Some methods require adding additional protocol structures (such as message headers), which complicate the data transmission protocol and reduce the implementation efficiency of the system.

[0006] Insufficient real-time performance: In the scenario of high-frequency small data packet transmission, the schemes relying on fixed lengths or specific delimiters may lead to increased data delay and cannot meet the real-time requirements.

[0007] Poor adaptability: Existing schemes usually cannot flexibly adapt to the dynamic changes of network conditions, such as delay fluctuations, jitters or changes in packet loss rates, and perform poorly especially in complex or unstable network environments.

[0008] High processing overhead: In the scenario of high concurrency or large-scale device connections, the resource overhead required for traditional schemes to process a large number of data packets is too high, affecting the overall performance of the system. Summary of the Invention

[0009] In order to solve the problems existing in the above-mentioned prior art, the present invention proposes a dynamic packet adhesion optimization method, device and storage medium.

[0010] The technical solution of the present invention is as follows:

[0011] On the one hand, the present invention provides a dynamic packet adhesion optimization method, including the following steps:

[0012] Receive the data stream from the network within a preset time window and calculate the reception efficiency of the data stream, and set the data cache space according to the reception efficiency of the data stream to cache the data stream;

[0013] Construct a data stream boundary recognition model, and input the cached data stream into the data stream boundary recognition model for boundary recognition;

[0014] Reassemble the cached data stream into a complete data packet after fragmenting it according to the boundary recognition result of the cached data stream;

[0015] Extract the valid data in the data packet after protocol analysis of the data packet, and then transfer the valid data to the upper-layer application.

[0016] As a preferred embodiment of the present invention, the calculation formula for the reception efficiency of the data stream is:

[0017] ;

[0018] Where: represents the reception efficiency of the data stream within the current time window; represents the total number of time intervals within the current time window; represents the length of the th time interval within the current time window; represents the adjustment parameter; represents the th data reception traffic within the th time interval;

[0017] ;

[0018] Where: represents the reception efficiency of the data stream within the current time window; represents the total number of time intervals within the current time window; represents the length of the th time interval within the current time window; represents the adjustment parameter; represents the th data reception traffic within the th time interval; represents the th data reception delay within the th time interval;

[0019] As a preferred embodiment of the present invention, the calculation formula for the data cache space is:

[0020] ;

[0021] Where: represents the size of the data cache space under the th time window; represents the preset data cache space reference value; represents the reception efficiency of the data stream within the th time window; represents the weight of the th time window; represents the length of the th time window; represents the average load of the data reception terminal within the th time window; represents the average data reception delay within the th time window; represents the average data reception delay jitter within the th time window; represents the data reception packet loss rate within the th time window;

[0016] As a preferred embodiment of the present invention, the calculation formula for the reception efficiency of the data stream is:

[0017] ;

[0018] Where: represents the reception efficiency of the data stream within the current time window; represents the total number of time intervals within the current time window; represents the length of the th time interval within the current time window; represents the adjustment parameter; represents the th data reception traffic within the th time interval; represents the th data reception delay within the th time interval;

[0019] As a preferred embodiment of the present invention, the calculation formula for the data cache space is:

[0020] ;

[0021] Where: represents the size of the data cache space under the th time window; represents the preset data cache space reference value; represents the reception efficiency of the data stream within the th time window; represents the weight of the th time window; represents the length of the th time window; represents the average load of the data reception terminal within the th time window; represents the average data reception delay within the th time window; represents the average data reception delay jitter within the th time window; represents the data reception packet loss rate within the th time window; 、 、 Represents the weight parameter.

[0022] As a preferred embodiment of the present invention, the data flow boundary recognition model is constructed based on a convolutional neural network model, a Transformer model and a rule model;

[0023] The convolutional neural network model is used to extract features of the cache data stream;

[0024] The Transformer model is used to identify the data type of the cached data stream according to the characteristics of the cached data stream;

[0025] The rule model is used to divide the cache data stream into boundaries according to data types using preset rules, and the data types include image types, text types, and audio types.

[0026] As a preferred embodiment of the present invention, the convolutional neural network model sets a variable convolution kernel, and adopts different convolution kernel sizes for cache data streams of different lengths. The specific steps are as follows:

[0027] Perform preliminary feature extraction on the cached data stream through the preset initial convolution kernel to obtain the corresponding initial features;

[0028] Extract the mean, variance, maximum, minimum, and gradient information of the initial features and concatenate them to form a statistical vector;

[0029] The statistical vector is mapped to the scale adjustment factor through a lightweight fully connected network, as shown in the following formula:

[0030] ;

[0031] in: represents the scale adjustment factor; represents the weight matrix; represents a statistical vector; represents a fully connected network; represents the initial features; represents the bias term; Express as well as Perform splicing; Represents the Sigmoid activation function;

[0032] The initial convolution kernel size is adjusted based on the scale adjustment factor, as shown in the following formula:

[0033] ;

[0034] in: Represents the adjusted initial convolution kernel size; Indicates the initial convolution kernel size; represents the scale adjustment factor; Indicates the length of the cached data stream; Indicates the base length of the cached data stream;

[0035] The cached data stream is re-extracted based on the adjusted initial convolution kernel size to obtain the final features of the cached data stream.

[0036] As a preferred embodiment of the present invention, the data types include picture type, text type and audio type;

[0037] For the cached data stream of the image type, multiple demarcation points are preset, and the cached data stream is preliminarily divided according to the demarcation points;

[0038] For each initially divided window, extract the statistical features within the window;

[0039] For every two adjacent windows, the Euclidean distance and cosine distance of the statistical features of the two windows are calculated respectively, and the Euclidean distance and cosine distance of the statistical features of the two windows are weighted summed to obtain the comprehensive distance between the two windows;

[0040] For each preliminarily divided window, the pixel values within the window are extracted and constructed as a histogram;

[0041] For every two adjacent windows, the distance between the histograms of the two windows is calculated, as shown in the following formula:

[0042] ;

[0043] in: Represents the distance between the corresponding histograms of the two windows; Indicates the The first data buckets; Indicates the The first data buckets; represents a constant term;

[0044] For each preliminarily divided window, the edge map corresponding to the pixel value in the window is extracted by the edge detection operator, and the mean absolute difference between the edge maps of each two adjacent windows is calculated, as shown in the following formula:

[0045] ;

[0046] in: represents the mean absolute difference between the edge maps of two windows; represents the total number of pixels in the edge map; Indicates the th pixel value in the th preliminary division window edge map; Indicates the th pixel value in the th preliminary division window edge map;

[0047] The weighted sum of the histogram distance and the mean absolute difference of the edge maps between two windows is used to obtain the pixel distribution difference between the two windows;

[0048] Based on the comprehensive distance between all preliminary division windows, calculate the division confidence of each window, as shown in the following formula:

[0049] ;

[0050] Where: Indicates the division confidence of the th preliminary division window; Indicates the comprehensive distance between the th preliminary division window and the th preliminary division window; Indicates the pixel distribution difference between the th preliminary division window and the th preliminary division window; [[ID=4)) ' and indicate the weight parameters of the division confidence calculation formula;

[0051] Preset the division confidence threshold, calculate the division confidence of all windows. If the division confidence is greater than the preset division confidence threshold, it is determined that the size of the window is unqualified, and then the size of the window is adjusted and the division confidence of all windows is recalculated;

[0052] When the number of window adjustment times exceeds the preset adjustment threshold, the number of break points is adjusted and the window division is redone, and then the division confidence of all windows is recalculated. When the division confidence of all windows is less than the preset adjustment threshold, the picture type cache data stream with boundary division completed is obtained.

[0053] As a preferred embodiment of the present invention, for the cache data stream of the text type, a preset punctuation and line break symbol set is provided. Based on the punctuation and line break symbol set, the cache data stream is traversed to identify the punctuation and line break symbols in the cache data stream, and the cache data stream is preliminarily segmented based on the punctuation and line break symbols;

[0054] Repeat the following operations: extract the semantic features of each segment through a pre-trained word embedding model, extract the context sensitivity between each segment and its adjacent segments through a pre-trained context-sensitive model, and combine the adjacent segments whose sensitivity reaches the preset sensitivity threshold with this segment into a new segment; stop the operation until the context sensitivity between each segment and its adjacent segments does not reach the preset sensitivity threshold, and complete the boundary division of the text type cache data stream.

[0055] As a preferred embodiment of the present invention, for the cache data stream of the audio type, a plurality of demarcation points are preset, and the cache data stream is preliminarily divided according to the demarcation points;

[0056] Divide the cache data stream within each window into multiple small frames, and calculate the short-time energy of each small frame, as shown in the following formula:

[0057] ;

[0058] Where: represents the short-time energy of the th small frame; represents the length of the th small frame; represents the sampling point index of the th small frame; represents the weighted Gaussian window function of the th sampling point; represents the rd sampling point value of the th small frame;

[0059] Define an energy threshold, and regard the small frames with energy lower than the energy threshold as low-energy small frames;

[0060] Repeat the following operations: calculate the proportion of low-energy small frames within each window, retain the windows with a proportion less than the preset low-energy small frame proportion threshold, and combine the windows with a proportion greater than the preset low-energy small frame proportion threshold, re-plan the demarcation points and perform re-division; stop the operation until the proportion of low-energy small frames in all divided windows is less than the preset low-energy small frame proportion threshold, and complete the boundary division of the audio type cache data stream.

[0061] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method described in any embodiment of the present invention is implemented.

[0062] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in any embodiment of the present invention is implemented.

[0063] The present invention has the following beneficial effects:

[0064] 1. By calculating the reception efficiency of the data stream within a preset time window and dynamically adjusting the data cache space accordingly, the system of the present invention can adapt to the fluctuations of the network data stream in real time and improve the overall transmission performance.

[0065] 2. For data streams of picture, text, and audio types, the present invention adopts boundary division strategies specifically designed for each type to achieve more refined processing and optimization, meeting the requirements of diverse data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0067] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0068] It should be understood that the step numbers used herein are only for convenience of description and do not limit the order of execution of the steps.

[0069] It should be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless otherwise clearly specified in the context, the singular forms of "a", "an", and "the" are intended to include the plural forms.

[0070] The terms "include" and "comprise" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0071] The term " / and / " refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0072] Embodiment One:

[0073] Refer to Figure 1 , a dynamic packet coalescence optimization method, including the following steps:

[0074] Receive a data stream from the network within a preset time window and calculate the reception efficiency of the data stream, and set a data cache space according to the data stream reception efficiency to cache the data stream;

[0075] Construct a data stream boundary recognition model, and input the cached data stream into the data stream boundary recognition model for boundary recognition;

[0076] Fragment the cached data stream according to the boundary recognition result of the cached data stream and then recombine it into a complete data packet;

[0077] Parse the protocol of the data packet and extract the valid data in the data packet, and then transfer the valid data to the upper-layer application.

[0078] As a preferred implementation manner of this embodiment, the calculation formula for the reception efficiency of the data stream is:

[0079] ;

[0080] Where: represents the reception efficiency of the data stream within the current time window; represents the total number of time intervals within the current time window; represents the th time interval length within the current time window; represents the adjustment parameter; represents the th data reception traffic within the time interval; represents the th data reception delay within the time interval.

[0081] As a preferred implementation manner of this embodiment, the calculation formula for the data cache space is:

[0082] ;

[0083] Where: represents the size of the data cache space under the th time window; represents the preset data cache space reference value; represents the th reception efficiency of the data stream within the time window; represents the th weight of the time window; represents the th length of the time window; represents the th average load of the data reception terminal within the time window; represents the th average data reception delay within the time window; Represents the average delay jitter of data reception within the th time window; Represents the packet loss rate of data reception within the th time window; , , Represent weight parameters.

[0084] As a preferred implementation manner of this embodiment, the data stream boundary recognition model is constructed based on a convolutional neural network model, a Transformer model, and a rule model;

[0085] The convolutional neural network model is used to extract features of the cached data stream;

[0086] The Transformer model is used to identify the data type of the cached data stream according to the features of the cached data stream;

[0087] [[ID=2�]]The rule model is used to perform boundary division on the cached data stream according to the data type through preset rules, and the data types include picture type, text type, and audio type.

[0088] As a preferred implementation manner of this embodiment, the convolutional neural network model sets variable convolutional kernels, and different convolutional kernel sizes are used for cached data streams of different lengths. The specific steps are as follows:

[0089] Perform preliminary feature extraction on the cached data stream through a preset initial convolutional kernel to obtain corresponding initial features;

[0090] Extract the mean, variance, maximum value, minimum value, and gradient information of the initial features and splice them to construct a statistical vector;

[0091] Map the statistical vector to a scale adjustment factor through a lightweight fully connected network, as shown in the following formula:

[0092] ;

[0093] Where: Represents the scale adjustment factor; Represents the weight matrix; Represents the statistical vector; Represents the fully connected network; Represents the initial feature; Represents the bias term; Represents and are spliced; Represents the Sigmoid activation function;

[0094] Adjust the initial convolutional kernel size based on the scale adjustment factor, as shown in the following formula:

[0095] ;

[0096] in: Represents the adjusted initial convolution kernel size; Indicates the initial convolution kernel size; represents the scale adjustment factor; Indicates the length of the cached data stream; Indicates the base length of the cached data stream;

[0097] The cached data stream is re-extracted based on the adjusted initial convolution kernel size to obtain the final features of the cached data stream.

[0098] As a preferred implementation of this embodiment, the data types include picture type, text type and audio type;

[0099] For the cached data stream of the image type, multiple demarcation points are preset, and the cached data stream is preliminarily divided according to the demarcation points;

[0100] For each initially divided window, extract the statistical features within the window;

[0101] For every two adjacent windows, the Euclidean distance and cosine distance of the statistical features of the two windows are calculated respectively, and the Euclidean distance and cosine distance of the statistical features of the two windows are weighted summed to obtain the comprehensive distance between the two windows;

[0102] For each preliminarily divided window, the pixel values within the window are extracted and constructed as a histogram;

[0103] For every two adjacent windows, the distance between the histograms of the two windows is calculated, as shown in the following formula:

[0104] ;

[0105] in: Represents the distance between the corresponding histograms of the two windows; Indicates the The first data buckets; Indicates the The first data buckets; represents a constant term;

[0106] In this embodiment, the histogram is a grayscale image histogram, and there are 256 data buckets, corresponding to grayscale values 0 to 255;

[0107] For each preliminarily divided window, extract the edge map corresponding to the pixel values within the window through an edge detection operator, and calculate the mean absolute difference between every two adjacent window edge maps, as shown in the following formula:

[0108] ;

[0109] Where: represents the mean absolute difference between two window edge maps; represents the total number of pixels in the edge map; represents the th pixel value in the edge map of the th preliminarily divided window; represents the th pixel value in the edge map of the th preliminarily divided window;

[0110] Perform a weighted sum of the histogram distance and the mean absolute difference of the edge maps between two windows to obtain the pixel distribution difference between the two windows;

[0111] Calculate the division confidence of each window based on the comprehensive distance between all preliminarily divided windows, as shown in the following formula:

[0112] ;

[0113] Where: represents the division confidence of the th preliminarily divided window; represents the comprehensive distance between the th preliminarily divided window and the th preliminarily divided window; represents the pixel distribution difference between the th preliminarily divided window and the th preliminarily divided window; 、 represent the weight parameters of the division confidence calculation formula;

[0114] Preset a division confidence threshold, calculate the division confidence of all windows. If the division confidence is greater than the preset division confidence threshold, it is determined that the size of the window is unqualified, and then the size of the window is adjusted and the division confidence of all windows is recalculated;

[0115] When the number of window adjustment times exceeds the preset adjustment threshold, adjust the number of demarcation points and re-perform window division, and then calculate the division confidence of all windows again. When the division confidence of all windows is less than the preset adjustment threshold, obtain the picture type cache data stream with boundary division completed.

[0116] As a preferred implementation of this embodiment, for the cached data stream of the text type, a set of preset punctuation marks and line break symbols is defined. Based on this set of punctuation marks and line break symbols, the cached data stream is traversed to identify the punctuation marks and line break symbols in the cached data stream, and the cached data stream is preliminarily segmented based on the punctuation marks and line break symbols;

[0117] Repeat the following operations: extract the semantic features of each segment through a pre-trained word embedding model (such as Word2Vec, GloVe), extract the context sensitivity between each segment and its adjacent segment through a pre-trained context-sensitive model (such as BERT, RoBERTa), and combine the adjacent segments whose sensitivity reaches the preset sensitivity threshold with this segment into a new segment; stop the operation until the context sensitivity between each segment and its adjacent segment does not reach the preset sensitivity threshold, and complete the boundary division of the cached data stream of the text type.

[0118] As a preferred implementation of this embodiment, for the cached data stream of the audio type, a plurality of demarcation points are preset, and the cached data stream is preliminarily divided according to the demarcation points;

[0119] Divide the cached data stream within each window into multiple small frames, and calculate the short-time energy of each small frame, as shown in the following formula:

[0120] ;

[0121] Where: represents the short-time energy of the th small frame; represents the length of the th small frame; represents the sampling point index of the th small frame; represents the weighted Gaussian window function of the th sampling point; represents the th sampling point value of the th small frame; represents the frame shift;

[0122] The weighted Gaussian window function is specifically as follows:

[0123] ;

[0124] Where: is an intermediate parameter, ; represents the width of the weighted Gaussian window function;

[0125] Define an energy threshold, and regard the small frames with energy lower than the energy threshold as low-energy small frames;

[0126] Repeat the following operations: calculate the proportion of low-energy small frames within each window, retain the windows with a proportion of low-energy small frames less than the preset threshold, and for the windows with a proportion of low-energy small frames greater than the preset threshold, combine them, re-plan the demarcation points, and perform re-partitioning; stop the operation until the proportion of low-energy small frames in all partitioned windows is less than the preset threshold, and complete the boundary partitioning of the audio type cache data stream.

[0127] Embodiment 2:

[0128] A dynamic packet sticking optimization system includes a network receiving module, a data caching module, a boundary detection module, a data recombination module, a data parsing module, and an upper-layer application interface module;

[0129] The network receiving module is used to receive data streams from the network within a preset time window and calculate the receiving efficiency of the data streams;

[0130] The data caching module is used to set a data caching space according to the data stream receiving efficiency for caching the data stream;

[0131] The boundary detection module is used to build a data stream boundary recognition model and input the cached data stream into the data stream boundary recognition model for boundary recognition;

[0132] The data recombination module is used to slice and recombine the cached data stream into complete data packets according to the boundary recognition result of the cached data stream. Specifically:

[0133] Slice the cached data stream according to the boundary points, and the range of each data segment is determined by two adjacent boundary points, ensuring that the start and end positions of the slicing are clear for subsequent recombination;

[0134] Recombine the data segments into complete data packets according to the field format of the protocol;

[0135] The data parsing module is used to perform protocol parsing on the data packets and extract the valid data in the data packets. Specifically, use a finite state machine (FSM) to parse the protocol fields in each data packet, and the fields include header fields, data bodies, checksum fields, etc.;

[0136] Verify whether the length and format of each field meet the protocol requirements. For example, the field length should match the protocol specification;

[0137] For data packets with parsing failures, try to adjust the slicing boundary and re-parse; if some fields allow a certain tolerance range (such as tolerable checksum errors), continue to parse other fields and generate partially valid data;

[0138] Support multiple protocol types through configurable parsing logic to meet the requirements of different scenarios and data formats;

[0139] The upper-layer application interface module is used to transfer valid data to the upper-layer application. According to the requirements of the upper-layer application, it converts the data packet into a standardized format, such as JSON, Protobuf, or XML, and adds a final integrity check at the interface layer to ensure that the data transferred to the upper layer meets the expectations. If incomplete or abnormally formatted data is found, error messages are fed back to the downstream module. It supports multiple upper-layer applications to subscribe to or receive parsed data simultaneously and can dynamically adjust the interface format and transfer logic according to application requirements.

[0140] This system is used to implement the method in the first embodiment, which will not be elaborated here.

[0141] Embodiment 3:

[0142] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method described in any embodiment of the present invention.

[0143] Embodiment 4:

[0144] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method described in any embodiment of the present invention.

[0145] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent the cases of A existing alone, A and B existing simultaneously, and B existing alone. Here, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0146] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0147] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0148] In several embodiments provided by the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (hereinafter referred to as ROM), random access memories (hereinafter referred to as RAM), magnetic disks, or optical discs that can store program codes.

[0149] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A dynamic sticky package optimization method, characterized in that: The following steps are involved: Receive data streams from the network within a preset time window and calculate the receiving efficiency of the data streams. The calculation formula for the receiving efficiency of the data streams is: ; in: Indicates the receiving efficiency of the data stream in the current time window; Indicates the total number of time intervals in the current time window; Indicates the number of the length of the time interval; represents the adjustment parameter; Indicates the Data receiving traffic within a time interval; Indicates the Data reception delay within a time interval; The data buffer space is set based on the data stream receiving efficiency to cache the data stream. The calculation formula for the data buffer space is: ; in: Indicates the The size of the data cache space under a time window; Indicates the preset data cache space baseline value; Indicates the The receiving efficiency of the data stream within a time window; Indicates the The weight of each time window; Indicates the The length of the time window; Indicates the Average load of data receiving terminals within a time window; Indicates the Average data reception delay within a time window; Indicates the Average delay jitter of data reception within a time window; Indicates the Data reception packet loss rate within a time window; 、 、 represents the weight parameter; Build a data flow boundary recognition model and input the cached data flow into the data flow boundary recognition model for boundary recognition; According to the boundary identification result of the cached data stream, the cached data stream is fragmented and then reassembled into a complete data packet; After parsing the data packet protocol, the valid data in the data packet is extracted and then passed to the upper-layer application.

2. A dynamic sticky package optimization method according to claim 1, characterized in that: The data flow boundary recognition model is constructed based on a convolutional neural network model, a Transformer model and a rule model; The convolutional neural network model is used to extract features of the cache data stream; The Transformer model is used to identify the data type of the cached data stream according to the characteristics of the cached data stream; The rule model is used to divide the cache data stream into boundaries according to data types using preset rules, and the data types include image types, text types, and audio types.

3. A dynamic sticky package optimization method according to claim 2, characterized in that: The convolutional neural network model sets a variable convolution kernel, and adopts different convolution kernel sizes for cache data streams of different lengths. The specific steps are as follows: Perform preliminary feature extraction on the cached data stream through the preset initial convolution kernel to obtain the corresponding initial features; Extract the mean, variance, maximum, minimum, and gradient information of the initial features and concatenate them to form a statistical vector; The statistical vector is mapped to the scale adjustment factor through a lightweight fully connected network, as shown in the following formula: ; in: represents the scale adjustment factor; represents the weight matrix; represents a statistical vector; represents a fully connected network; represents the initial features; represents the bias term; Express as well as Perform splicing; Represents the Sigmoid activation function; The initial convolution kernel size is adjusted based on the scale adjustment factor, as shown in the following formula: ; in: Represents the adjusted initial convolution kernel size; Indicates the initial convolution kernel size; represents the scale adjustment factor; Indicates the length of the cached data stream; Indicates the base length of the cached data stream; The cached data stream is re-extracted based on the adjusted initial convolution kernel size to obtain the final features of the cached data stream.

4. A dynamic sticky package optimization method according to claim 2, characterized in that: For the cached data stream of the image type, multiple demarcation points are preset, and the cached data stream is preliminarily divided according to the demarcation points; For each initially divided window, extract the statistical features within the window; For every two adjacent windows, the Euclidean distance and cosine distance of the statistical features of the two windows are calculated respectively, and the Euclidean distance and cosine distance of the statistical features of the two windows are weighted summed to obtain the comprehensive distance between the two windows; For each preliminarily divided window, the pixel values within the window are extracted and constructed as a histogram; For every two adjacent windows, the distance between the histograms of the two windows is calculated, as shown in the following formula: ; in: Indicates the distance between the corresponding histograms of the two windows; Indicates the The first data buckets; Indicates the The first data buckets; represents a constant term; For each preliminarily divided window, the edge map corresponding to the pixel value in the window is extracted through the edge detection operator, and the mean absolute difference between the edge maps of each two adjacent windows is calculated, as shown in the following formula: ; in: represents the mean absolute difference between the edge maps of two windows; represents the total number of pixels in the edge map; Indicates the The first pixel values; Indicates the The first pixel values; The pixel distribution difference between the two windows is obtained by weighted summing of the histogram distance and the mean absolute difference of the edge map between the two windows; The partition confidence of each window is calculated based on the comprehensive distance between all preliminary partition windows, as shown in the following formula: ; in: Indicates the The confidence level of the initial partition window; Indicates the The first preliminary partition window and the The comprehensive distance between the initial partition windows; Indicates the The first preliminary partition window and the The difference in pixel distribution between the initial divided windows; 、 Represents the weight parameter of the partition confidence calculation formula; A partition confidence threshold is preset, and the partition confidence of all windows is calculated. If the partition confidence is greater than the preset partition confidence threshold, the size of the window is judged to be unqualified, and the size of the window is adjusted and the partition confidence of all windows is recalculated; When the number of window adjustments exceeds the preset adjustment threshold, the number of dividing points is adjusted and the windows are re-divided. The division confidence of all windows is calculated again. When the division confidence of all windows is less than the preset adjustment threshold, the image type cache data stream with completed boundary division is obtained.

5. A dynamic sticky package optimization method according to claim 2, characterized in that: For a text-type cached data stream, a set of punctuation marks and line break marks is preset, the cached data stream is traversed based on the set of punctuation marks and line break marks to identify the punctuation marks and line break marks in the cached data stream, and the cached data stream is preliminarily segmented based on the punctuation marks and line break marks; Repeat the following operations: extract the semantic features of each segment through the pre-trained word embedding model, extract the context sensitivity of each segment and its adjacent segments through the pre-trained context-sensitive model, and combine the adjacent segments whose sensitivity reaches the preset sensitivity threshold with the segment into a new segment; until the context sensitivity of each segment and its adjacent segments does not reach the preset sensitivity threshold, stop the operation and complete the boundary division of the text type cache data stream.

6. A dynamic sticky package optimization method according to claim 2, characterized in that: For the buffered data stream of audio type, multiple demarcation points are preset, and the buffered data stream is preliminarily divided according to the demarcation points; The buffered data stream in each window is divided into multiple small frames, and the short-term energy of each small frame is calculated as shown in the following formula: ; in: Indicates the The short-term energy of a small frame; Indicates the The length of the small frame; Indicates the The sampling point index of each small frame; Indicates the Weighted Gaussian window function of sampling points; Indicates the The first small frame The value of the sampling point; Indicates frame shift; An energy threshold is defined, and small frames below the energy threshold are regarded as low-energy small frames; Repeat the following operations: calculate the low-energy small frame ratio in each window, retain the windows that are less than the preset low-energy small frame ratio threshold, combine the windows that are greater than the preset low-energy small frame ratio threshold, re-plan the dividing point and divide again; until the low-energy small frame ratio of all divided windows is less than the preset low-energy small frame ratio threshold, stop the operation and complete the boundary division of the audio type cache data stream.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • A TCP stream length connection data analysis method

    CN109922081A

  • Transmission delay limit determination method, device and equipment and readable storage medium

    CN118802770A