Data transmission method based on network router
By dynamically selecting video slice points and optimizing slice combinations, the video lag caused by fixed interval slice methods is solved, efficient and stable video streaming is achieved, and user experience and network resource utilization is improved.
Patent Information
- Application Number
- CN202510862041.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-08-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the fixed interval video data slicing method cannot adapt to the dynamic characteristics of the video content and the real-time changes in network conditions, resulting in a decrease in video fluency and user experience, especially when the screen is stuck during rapid movement or network fluctuations.
By obtaining the text content and time series of the video stream, establishing text functions, identifying textless frames and calculating inter-frame differences, dynamically selecting slice points, and combining the router transmission rate to select the best slice combination for transmission, avoiding key information loss and network congestion.
It significantly improves the transmission efficiency and stability of video streams, reduces picture lag, improves user experience, and adapts to complex network environments, especially in high-dynamic video scenarios such as live broadcasts and video conferencing to maintain picture coherence and efficient transmission.
Smart Images

Figure CN120547162A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method based on a network router. Background Art
[0002] With the rapid advancement of technology, the use of routers has become increasingly common. In today's digital age, routers have become an indispensable device in homes, offices, and public spaces. Like an intelligent transportation hub, they accurately transmit internet data to various end devices such as computers, mobile phones, and tablets. Using routers for data transmission is also becoming increasingly common, whether it's online gaming, video conferencing, file downloads, or cloud storage.
[0003] In existing data transmission technology systems, to ensure stable transmission of video streams from the source to the destination, a slicing method is often used to process video data. This method divides the continuous video stream into multiple smaller data segments (i.e., slices) and transmits them sequentially, aiming to improve transmission efficiency and reduce data loss or errors caused by network fluctuations.
[0004] However, while slicing is an effective method for transmitting video streams, existing technologies often divide data slices into fixed intervals. While this fixed-interval slicing method simplifies the transmission logic, it ignores the dynamic nature of video content and the real-time changes in network conditions.
[0005] Specifically, when a video scene contains fast-moving objects or complex visual effects, fixed-interval slicing can cause some keyframes to be missed or not transmitted in time, resulting in image freezes when the video is reconstructed at the receiving end. Furthermore, if network bandwidth suddenly decreases or latency increases, fixed-interval slicing may not be able to adapt to these changes, causing some slices to remain in the transmission queue for a long time, further exacerbating the image freeze problem.
[0006] This situation not only affects the smoothness and viewing experience of the video, but can also give users a sense of fragmentation, as if they are watching a series of incoherent images rather than a complete, natural visual story. Therefore, in order to improve the user experience and ensure high-quality video transmission, it is urgent to explore more flexible and intelligent data slicing strategies and technical means. Summary of the Invention
[0007] The purpose of the present invention is to provide a data transmission method based on a network router to solve the above technical problems.
[0008] The purpose of the present invention can be achieved through the following technical solutions: A data transmission method based on a network router comprises the following steps: Step S1: Obtain a video stream, obtain text content and a time sequence of the video stream, wherein the time sequence is a playback time period of the video stream, and the time sequence is divided into a number of time nodes; align the text content with the time sequence, establish a text function, and obtain text-free frames of the video stream according to the text function; Step S2: Obtaining the difference of the text-free frames, setting a difference threshold, and sequentially selecting the text-free frames whose difference is lower than the difference threshold from all text-free frames, recording them as sliceable points; obtaining a starting time, and obtaining a plurality of video slices based on the starting time and each sliceable point; and obtaining the next video slice based on the video slice, thereby obtaining a plurality of slice combinations; Step S3: Obtain the current transmission rate of the router, obtain the priority of each slice combination according to the current transmission rate, and select the best slice combination according to the priority; and slice transmit the video stream according to the best slice combination.
[0009] As a further solution of the present invention: the process of establishing the text function includes: Numbering each time node, obtaining all Chinese characters in the text content, and obtaining the number of the time node corresponding to each Chinese character when it appears in the video stream according to the time sequence; setting an existence coefficient, if a Chinese character appears at any numbered time node, then the existence coefficient of the time node is recorded as 1; otherwise, the existence coefficient of the time node is recorded as 0; A coordinate system is established with the number as the horizontal coordinate and the existence coefficient as the vertical coordinate; the time nodes of each number and their corresponding existence coefficients are converted into coordinate points of corresponding positions on the coordinate system, and the coordinate points are connected with broken lines to obtain a text function.
[0010] As a further solution of the present invention, the process of obtaining the text-free frame of the video stream according to the text function includes: In the text function, all time nodes with existence coefficients lower than 1 are obtained and recorded as text-free time nodes; the video stream is divided into a number of image frames, and all image frames corresponding to each text-free time node are obtained and recorded as text-free frames.
[0011] As a further solution of the present invention: the starting time is the start time of the router transmitting the video stream.
[0012] As a further solution of the present invention: the process of obtaining the difference degree includes: Based on image recognition technology, image features of the text-free frame and the next text-free frame are respectively obtained and recorded as current image features and next image features, respectively; feature vectors of the current image features and the next image features are respectively obtained and recorded as current feature vectors and next feature vectors, respectively; and a cosine value of the angle between the current feature vector and the next feature vector is obtained and recorded as the difference between the text-free frames.
[0013] As a further solution of the present invention: the process of obtaining the video slice includes: Obtain a time node corresponding to the starting moment, record it as the starting node, and obtain a text-free time node corresponding to the sliceable point; according to the starting node and the text-free time node, intercept a video segment in the video stream, record it as a video slice.
[0014] As a further solution of the present invention: the process of obtaining the slice combination includes: For any video slice, the text-free time node of the video slice is taken as the new starting moment, all slicable points after the new starting moment are obtained and recorded as new slicable points, and several next video slices are obtained according to the new starting moment and the new slicable points; the video slice and each next video slice are combined in pairs in sequence to obtain several slice combinations.
[0015] As a further solution of the present invention: the process of obtaining the priority includes: Obtaining the duration and data capacity of the video slice in the slice combination, and obtaining the duration t1 of the next video slice in the slice combination, and recording them as the next duration t2 and the next data capacity R2 respectively; setting a correction index K, if t1 ≥ R2 / v in the slice combination, where v is the current transmission rate, then the correction index K of the slice combination is 1; otherwise, the correction index K of the slice combination is 0; The priority Y=K(t1+t2) of the slice combination is obtained according to the correction index; and the slice combination with the highest priority is selected and recorded as the best slice combination.
[0016] Beneficial effects of the present invention: The present invention significantly optimizes the transmission efficiency and stability of video streams through dynamic video content analysis and network adaptive scheduling. Specifically, the present invention avoids slicing when key information (such as text) appears based on text alignment and text-free frame recognition (step S1), reducing the loss of important content. It also calculates the inter-frame difference through image feature vectors (step S2), and only slices where the visual changes are gentle (with low difference), reducing the risk of screen jumps at the receiving end. The present invention also gives priority to selecting slicing combinations that meet bandwidth conditions (such as filtering overloaded slices by modifying the index K) based on the current transmission rate of the router (step S3), avoiding network congestion. congestion; and through the recursive generation of slice combinations (step S2), it supports multi-path transmission strategies, adapts to network fluctuations, and improves anti-interference capabilities; the dynamic slicing of the present invention avoids the "one-size-fits-all" problem of fixed intervals, maintains picture continuity in complex scenes (such as fast motion); and gives priority to transmitting slices with low data volume and high priority to maximize network resource utilization; in summary, the present invention solves the problems of jamming and inefficiency caused by traditional fixed slicing through the coordinated optimization of video content understanding and network status, significantly improves transmission robustness and user experience, and is particularly suitable for high-dynamic videos (such as live broadcasts, online meetings) and unstable network environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below with reference to the accompanying drawings.
[0018] Figure 1 It is a flow chart of a data transmission method based on a network router of the present invention. DETAILED DESCRIPTION
[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] See also Figure 1 As shown, the present invention is a data transmission method based on a network router, comprising the following steps: Step S1: The router obtains a video stream to be transmitted, obtains text content and a time sequence of the video stream, wherein the time sequence is a playback time period of the video stream, and divides the time sequence into a number of time nodes; aligns the text content with the time sequence, establishes a text function, and obtains text-free frames of the video stream according to the text function; It can be understood that by extracting the text content (such as subtitles and titles) in the video and the time point of its appearance, each text character is associated with a specific node (such as a millisecond-level timestamp) on the video timeline; As a preferred embodiment of the present invention, the process of establishing the text function includes: Numbering each time node, obtaining all Chinese characters in the text content, and obtaining the number of the time node corresponding to each Chinese character when it appears in the video stream according to the time sequence; setting an existence coefficient, if a Chinese character appears at any numbered time node, then the existence coefficient of the time node is recorded as 1; otherwise, the existence coefficient of the time node is recorded as 0; A coordinate system is established with the number as the horizontal coordinate and the existence coefficient as the vertical coordinate; each numbered time node and its corresponding existence coefficient are converted into coordinate points of corresponding positions on the coordinate system, and each coordinate point is connected with a broken line to obtain a text function; It can be understood that a text function is established: using the time node number as the horizontal coordinate and the presence or absence of text (0 or 1) as the vertical coordinate, a discrete function curve is generated to quantify the distribution of text in the video; It is worth noting that if there are repeated Chinese characters in the text content, that is, if a Chinese character appears several times in the text content, then each time the Chinese character appears, the time series number corresponding to the occurrence is obtained and recorded; In a preferred embodiment of the present invention, the process of obtaining the text-free frame of the video stream according to the text function includes: In the text function, all time nodes with existence coefficients lower than 1 are obtained and recorded as text-free time nodes; the video stream is divided into a plurality of image frames, and all image frames corresponding to each text-free time node are obtained and recorded as text-free frames; It can be understood that, based on the time nodes where the coefficient in the text function is 0, the frames without text coverage in the video (i.e., the pictures are pure visual content without text interference) are located. These frames usually correspond to scene switches, picture transitions, or non-critical information paragraphs, and are suitable as slice boundary points. It is important to avoid slicing videos when important text (such as dialogues or instructions) appears. This prevents the receiver from losing key information due to slicing. Prefer text-free frames as slicing points to ensure the continuity and integrity of the transmitted video content. Text-free frames typically have gradual visual changes (such as static backgrounds), resulting in smaller data volumes after slicing, making them suitable for dynamic allocation of network bandwidth. Step S2: Obtain the difference of the text-free frames, set a difference threshold, and sequentially select the text-free frames whose difference is lower than the difference threshold from all text-free frames, recording them as sliceable points; obtain a starting time, which is the time when the router starts transmitting the video stream; obtain a plurality of video slices based on the starting time and each sliceable point; and obtain the next video slice based on the video slice, thereby obtaining a plurality of slice combinations; As a preferred embodiment of the present invention, the process of obtaining the difference includes: Based on image recognition technology, image features of the text-free frame and the next text-free frame are obtained, and recorded as current image features and next image features respectively; feature vectors of the current image features and the next image features are obtained, and recorded as current feature vectors and next feature vectors respectively; and a cosine value of the angle between the current feature vector and the next feature vector is obtained, and recorded as the difference between the text-free frames; It can be understood that based on image feature extraction technology (such as CNN, SIFT, etc.), adjacent text-free frames are vectorized and the difference between the two frames is calculated by cosine similarity. A difference threshold is set to filter out frames with low difference (i.e., frames with smooth changes in image content) and mark them as sliceable points. In a preferred embodiment of the present invention, if the difference of the non-text frame is greater than or equal to the difference threshold, then continue to obtain the difference of the next non-text frame; As a preferred embodiment of the present invention, the process of obtaining the video slice includes: Obtaining a time node corresponding to the starting moment, recorded as the starting node, and obtaining a text-free time node corresponding to the sliceable point; intercepting a video segment from the video stream according to the starting node and the text-free time node, recorded as a video slice; In a preferred embodiment of the present invention, the process of obtaining the slice combination includes: For any video slice, take the text-free time node of the video slice as the new starting time, obtain all slicable points after the new starting time, record them as new slicable points, obtain several next video slices based on the new starting time and the new slicable points; combine the video slice with each next video slice in sequence to obtain several slice combinations; It can be understood that the video stream is cut into multiple video slices (logical segments) based on the starting time of the video stream and the time position of the sliceable points. Multiple groups of slice combinations are generated through recursive combination (current slice + next possible slice), providing candidate solutions for subsequent transmission priority evaluation. It should be noted that the total number of video slices n is obtained, and the total number of slice combinations m obtained according to the i-th video slice is obtained. i , then we finally get Slice combination; It should be noted that slicing at locations where the picture changes smoothly (low disparity) can reduce playback freezes caused by network fluctuations (making it easier for the receiving end to add frames or buffer); avoiding slicing during intense motion or complex scene switching reduces the risk of data loss; generating multiple sets of slice combinations to provide flexible options for dynamic rate adaptation (such as prioritizing transmission of short slices when bandwidth is insufficient); controlling the slice granularity through a disparity threshold to balance transmission efficiency and video quality; slicing only frames with small visual differences to avoid transmitting duplicate or similar content and save bandwidth resources; Step S3: obtaining the current transmission rate of the router, obtaining the priority of each slice combination according to the current transmission rate, and selecting the best slice combination according to the priority; slicing and transmitting the video stream according to the best slice combination; As a preferred embodiment of the present invention, the process of obtaining the priority includes: Obtaining the duration and data capacity of the video slice in the slice combination, and obtaining the duration t1 of the next video slice in the slice combination, and recording them as the next duration t2 and the next data capacity R2 respectively; setting a correction index K, if t1 ≥ R2 / v in the slice combination, where v is the current transmission rate, then the correction index K of the slice combination is 1; otherwise, the correction index K of the slice combination is 0; Obtaining the priority Y=K(t1+t2) of the slice combination according to the modified index; selecting the slice combination with the highest priority and recording it as the best slice combination; It should be noted that the correction index ensures that the slice data volume R2 can be transmitted in a timely manner at the current rate; the slice combination with the highest priority (i.e., the combination with the longest total duration and satisfying K=1) is preferentially selected to ensure transmission continuity. Based on the selected optimal combination, the video stream is dynamically sliced and transmitted to adapt to network fluctuations in real time; In a preferred embodiment of the present invention, after obtaining the optimal slice combination, the next video slice in the optimal slice combination is used as a new video slice, and all new next video slices of the new video slice are obtained again to obtain several new slice combinations; and so on, the slice transmission of the video stream is completed; It should be noted that rate-aware priority scheduling can avoid transmission congestion or slice accumulation due to insufficient bandwidth; long slices are transmitted when bandwidth is sufficient (to improve efficiency), and short slices are switched to when bandwidth is tight (to ensure smoothness); the buffering waiting time and the probability of freezing of video playback are reduced, which is especially suitable for scenarios with high real-time requirements (such as live broadcasts and video conferencing). By dynamically adjusting the slicing strategy, the continuity of image quality and transmission delay are balanced; when the network rate suddenly drops, a smaller slice combination is automatically selected to improve the transmission success rate.
[0021] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A data transmission method based on a network router, characterized in that: The following steps are involved: Step S1: Obtain a video stream, obtain text content and a time sequence of the video stream, wherein the time sequence is a playback time period of the video stream, and the time sequence is divided into a number of time nodes; align the text content with the time sequence, establish a text function, and obtain text-free frames of the video stream according to the text function; Step S2: Obtaining the difference of the text-free frames, setting a difference threshold, and sequentially selecting the text-free frames whose difference is lower than the difference threshold from all text-free frames, recording them as sliceable points; obtaining a starting time, and obtaining a plurality of video slices based on the starting time and each sliceable point; and obtaining the next video slice based on the video slice, thereby obtaining a plurality of slice combinations; Step S3: Obtain the current transmission rate of the router, obtain the priority of each slice combination according to the current transmission rate, and select the best slice combination according to the priority; and slice transmit the video stream according to the best slice combination.
2. A data transmission method based on a network router according to claim 1, characterized in that: In step S1, the process of establishing the text function includes: Numbering each time node, obtaining all Chinese characters in the text content, and obtaining the number of the time node corresponding to each Chinese character when it appears in the video stream according to the time sequence; setting an existence coefficient, if a Chinese character appears at any numbered time node, then the existence coefficient of the time node is recorded as 1; otherwise, the existence coefficient of the time node is recorded as 0; A coordinate system is established with the number as the horizontal coordinate and the existence coefficient as the vertical coordinate; the time nodes of each number and their corresponding existence coefficients are converted into coordinate points of corresponding positions on the coordinate system, and the coordinate points are connected with broken lines to obtain a text function.
3. A data transmission method based on a network router according to claim 2, characterized in that: In step S1, the process of obtaining the text-free frame of the video stream according to the text function includes: In the text function, all time nodes with existence coefficients lower than 1 are obtained and recorded as text-free time nodes; the video stream is divided into a number of image frames, and all image frames corresponding to each text-free time node are obtained and recorded as text-free frames.
4. The data transmission method based on a network router according to claim 1, characterized in that: In step S2, the starting time is the time when the router starts to transmit the video stream.
5. The data transmission method based on a network router according to claim 1, characterized in that: In step S2, the process of obtaining the difference degree includes: Based on image recognition technology, image features of the text-free frame and the next text-free frame are respectively obtained and recorded as current image features and next image features, respectively; feature vectors of the current image features and the next image features are respectively obtained and recorded as current feature vectors and next feature vectors, respectively; and a cosine value of the angle between the current feature vector and the next feature vector is obtained and recorded as the difference between the text-free frames.
6. The data transmission method based on a network router according to claim 3, characterized in that: In step S2, the process of obtaining the video slice includes: Obtain a time node corresponding to the starting moment, record it as the starting node, and obtain a text-free time node corresponding to the sliceable point; according to the starting node and the text-free time node, intercept a video segment in the video stream, record it as a video slice.
7. A data transmission method based on a network router according to claim 6, characterized in that: In step S2, the process of obtaining the slice combination includes: For any video slice, the text-free time node of the video slice is taken as the new starting moment, all slicable points after the new starting moment are obtained and recorded as new slicable points, and several next video slices are obtained according to the new starting moment and the new slicable points; the video slice and each next video slice are combined in pairs in sequence to obtain several slice combinations.
8. The data transmission method based on a network router according to claim 1, characterized in that: In step S3, the priority obtaining process includes: Obtaining the duration and data capacity of the video slice in the slice combination, and obtaining the duration t1 of the next video slice in the slice combination, and recording them as the next duration t2 and the next data capacity R2 respectively; setting a correction index K, if t1 ≥ R2 / v in the slice combination, where v is the current transmission rate, then the correction index K of the slice combination is 1; otherwise, the correction index K of the slice combination is 0; The priority Y=K(t1+t2) of the slice combination is obtained according to the correction index; and the slice combination with the highest priority is selected and recorded as the best slice combination.