CN117319318A - Data stream compression method, network device and storage medium - Google Patents

Data stream compression method, network device and storage medium Download PDF

Info

Publication number
CN117319318A
CN117319318A CN202210724307.0A CN202210724307A CN117319318A CN 117319318 A CN117319318 A CN 117319318A CN 202210724307 A CN202210724307 A CN 202210724307A CN 117319318 A CN117319318 A CN 117319318A
Authority
CN
China
Prior art keywords
compression
target
data stream
control information
target data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210724307.0A
Other languages
Chinese (zh)
Inventor
林宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202210724307.0A priority Critical patent/CN117319318A/en
Priority to PCT/CN2023/081397 priority patent/WO2023246190A1/en
Publication of CN117319318A publication Critical patent/CN117319318A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/38Flow control; Congestion control by adapting coding or compression rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data stream compression method, network equipment and a storage medium, wherein the data stream compression method comprises the following steps: acquiring a target data stream, and adding compression control information into the target data stream according to a preset strategy, wherein the compression control information carries target compression parameters of the target data stream; and compressing the target data stream according to the compression control information, and forwarding the compressed data to a transmission network. According to the technical scheme of the embodiment, after the target data stream is acquired, the compression parameters can be adjusted by adding the compression control information into the target data stream, so that the flexibility of data compression is effectively improved, the compression mode of the target data stream can be more in line with the requirements of users, the utilization rate of transmission resources of a transmission network is favorably improved, and the transmission effect of the compressed data stream is improved.

Description

Data stream compression method, network device and storage medium
Technical Field
The present invention relates to, but not limited to, the field of data compression technologies, and in particular, to a data stream compression method, a network device, and a storage medium.
Background
In video services and other services involving data streams, the data streams are generally compressed and transmitted, so as to improve the data transmission efficiency. At present, the compression of the data stream is mainly completed by the data side device, the data side device can only compress the whole data stream according to the configured compression parameters, and the compression parameters cannot be adjusted after the data stream is acquired, for example, for video services, the data side device can only compress the whole video data stream according to the compression parameters corresponding to the selected definition, and then forward the compressed data stream to a transmission network for transmission, so that the flexibility of data compression is low.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the invention provides a data stream compression method, network equipment and a storage medium, which can improve the flexibility of data stream compression and the transmission effect of data streams.
In a first aspect, an embodiment of the present invention provides a data stream compression method, including:
acquiring a target data stream, and adding compression control information into the target data stream according to a preset strategy, wherein the compression control information carries target compression parameters of the target data stream;
and compressing the target data stream according to the compression control information, and forwarding the compressed data to a transmission network.
In a second aspect, an embodiment of the present invention provides a network device, including:
a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data stream compression method according to the first aspect when executing the computer program.
In a third aspect, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the data stream compression method according to the first aspect.
The embodiment of the invention comprises the following steps: acquiring a target data stream, and adding compression control information into the target data stream according to a preset strategy, wherein the compression control information carries target compression parameters of the target data stream; and compressing the target data stream according to the compression control information, and forwarding the compressed data to a transmission network. According to the technical scheme of the embodiment, after the target data stream is acquired, the compression parameters can be adjusted by adding the compression control information into the target data stream, so that the flexibility of data compression is effectively improved, the compression mode of the target data stream can be more in line with the requirements of users, the utilization rate of transmission resources of a transmission network is favorably improved, and the transmission effect of the compressed data stream is improved.
Drawings
FIG. 1 is a flow chart of a data stream compression method provided by one embodiment of the present invention;
fig. 2 is a flowchart of a method for compressing an application data stream of a network device according to another embodiment of the present invention;
FIG. 3 is a flow chart for determining target compression parameters based on network health according to another embodiment of the present invention;
FIG. 4 is a flow chart for determining target compression parameters based on data stream content according to another embodiment of the present invention;
FIG. 5 is a flow chart for determining target compression parameters based on compression requirements according to another embodiment of the present invention;
FIG. 6 is a flow chart for adjusting target compression parameters based on network health according to another embodiment of the present invention;
FIG. 7 is a flow chart for inserting compression control information provided by another embodiment of the present invention;
FIG. 8 is a flow chart of a compression process performed locally by a network device according to another embodiment of the present invention;
FIG. 9 is a schematic diagram of a compression process performed locally by a network device according to another embodiment of the present invention;
FIG. 10 is a flow chart of a compression process performed at a remote end provided in another embodiment of the present invention;
FIG. 11 is a schematic diagram of compression processing at a remote end provided in accordance with another embodiment of the present invention;
FIG. 12 is a flow chart of an example one provided by another embodiment of the present invention;
FIG. 13 is a flow chart of an example two provided by another embodiment of the present invention;
FIG. 14 is a flowchart of an example III provided by another embodiment of the present invention;
fig. 15 is an apparatus diagram of a network device according to another embodiment of the present invention.
Detailed Description
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description, in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The invention provides a data stream compression method, network equipment and a storage medium, wherein the data stream compression method comprises the following steps: acquiring a target data stream; adding compression control information in the target data stream according to a preset strategy, wherein the compression control information carries target compression parameters of the target data stream; and compressing the target data stream according to the compression control information, and forwarding the compressed data to a transmission network. According to the technical scheme of the embodiment, after the target data stream is acquired, the compression parameters can be adjusted by adding the compression control information into the target data stream, so that the flexibility of data compression is effectively improved, the compression mode of the target data stream can be more in line with the requirements of users, the utilization rate of transmission resources of a transmission network is favorably improved, and the transmission effect of the compressed data stream is improved.
The technical scheme of each embodiment of the invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, fig. 1 is a flowchart of a data stream compression method according to an embodiment of the present invention, including but not limited to step S110 and step S120.
Step S110, a target data stream is obtained, compression control information is added into the target data stream according to a preset strategy, and the compression control information carries target compression parameters of the target data stream;
step S120, compressing the target data stream according to the compression control information, and forwarding the compressed data to the transmission network.
It should be noted that, the target data stream in this embodiment may be a data stream requiring compression processing, such as a video data stream and an audio data stream, and the specific type of the data stream is not limited in this embodiment.
The target compression parameter may be a compression ratio or the like, and the specific type of the compression parameter is not limited in this embodiment, and the compression ratio is used as an example for convenience in description, which is not limited in this embodiment.
It should be noted that, the setting of the preset policy may be determined according to the capability of a specific device, for example, when the technical solution of the embodiment is executed by the network device, based on which the network device may sense the transmission performance of the transmission network or the current resource utilization, compression control information may be generated based on the transmission performance or the current resource utilization, so that after the target data stream is acquired, variable compression of the target data stream may also be implemented.
It should be noted that the number of the compression control information may be arbitrary, and may be determined according to a user requirement or a preset policy, and then the compression control information is added to the target data stream after the compression control information is acquired, so that the compression ratio can be adjusted according to the compression control information when the target data stream is compressed, and thus flexible adjustment of the compression ratio can be achieved after the target data stream is acquired, and flexibility of data stream compression is improved.
It should be noted that the compression control information may be any type of data, such as a control packet or a control frame of a data stream, and the method of adding the compression control information to the target data stream may be determined according to a specific type of the compression control information, for example, the compression control information is a control packet, may be inserted into an egress queue or an ingress queue of the forwarded data stream, or modified in a header field information in a packet of the target data stream, or may enable the target data stream to carry the compression control information.
After the compression control information is inserted into the target data stream according to the above manner, when the target data stream is compressed by the compression module of the device, each time the compression control information is detected to adjust the compression ratio once, for example, in the process of compressing according to the initial compression ratio, the next frame of the target data stream is detected to be the control frame and carries the compression control information, the parameters of the compression module are adjusted according to the compression ratio recorded in the compression control information until the compression control information is acquired next time, based on the above compression manner, flexible compression can be realized by adding the compression control information at different positions of the target data stream, and the flexibility and controllability of data compression are improved.
In addition, in an embodiment, the data stream compression method is applied to the first network device, and referring to fig. 2, step S110 of the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:
step S210, determining at least one target compression parameter according to a preset strategy;
step S220, corresponding compression control information is generated according to each target compression parameter, and at least one compression control information is added to the target data stream.
It should be noted that, the data side device is not directly connected with the transmission network, and is generally unable to perceive the transmission performance or resource usage situation of the transmission network, even if the information is obtained through the network device, because the transmission and analysis of the information need to consume a certain time, it is difficult to ensure that the compression control information can be inserted in the transmission process of the data stream in time, and the network device directly transmits the network connection, so that the situation change of the transmission network can be perceived, based on this embodiment, the network device compresses the data stream through the network device, so that the network device not only can be used as the transmission device, but also can determine the target compression parameters, generate the compression control information and insert the target data stream, and compress the target data stream carrying the compression control information, so that the reference of the preset strategy can be more diversified, not only can flexibly adjust the compression ratio according to the user requirement and the content of the data stream, but also can be beneficial to improving the utilization rate of the transmission network resource.
It should be noted that, taking the compression ratio as an example, the target compression parameter may generate a compression control information after acquiring a compression ratio and insert the compression control information into the target data stream, so that the compression module performs subsequent data compression according to the compression ratio after acquiring the compression control information, and adjusts the operation parameter of the compression module again after acquiring the next compression ratio, thereby realizing a variable compression ratio and effectively improving the flexibility of data compression.
In addition, referring to fig. 3, in an embodiment, step S210 of the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:
step S310, determining a target transmission path of a target data stream;
step S320, determining at least one target time, wherein the target time is the initial transmission time of the target data stream and/or the time determined according to the preset time interval after the initial transmission time;
step S330, determining a path evaluation result of the target transmission path at each target moment, wherein the path evaluation result represents the health degree of the target transmission path;
step S340, determining target compression parameters corresponding to each target moment from preset optional compression parameters according to the path evaluation result.
It should be noted that, according to the description of the above embodiment, the network device may sense the health degree of the transmission network, and flexibly adjust the compression ratio according to the basis of the health degree as a preset policy, so as to implement variable compression ratio compression of the target data stream.
It should be noted that, the preset time interval may be adjusted according to the timing requirement, for example, every 1 second, or every 10 seconds, and the evaluation frequency of the path evaluation result is not limited too much in this embodiment.
It should be noted that, the target transmission path of the target data stream is known to the network device, based on this, the path evaluation result may be comprehensively evaluated according to one or more of the port bandwidth, congestion degree, packet loss rate, optical module transmission length, speed limit or shaping service quality (Quality of Service, QOS) setting and other information of the target transmission path, and the health degree reflected by the above-mentioned index may reflect the network condition of the target transmission path, so that the compression ratio determined according to the path evaluation result may be reduced when the health degree is high, so that the data quality of the target data stream is higher, and the compression ratio may be increased when the health degree is low (e.g. the bandwidth of the transmission network is degraded), so that the data amount of the target data stream is smaller, and the transmission pressure of the transmission network is reduced, thereby improving the transmission effect.
It should be noted that, since the delivery process of the target data stream is continuous in the time dimension, the compression ratio can be adjusted once at each target time by determining multiple target times, so that the resources and performances of the transmission network can be more reasonably utilized by the compressed data transmission. It can be understood that the determination of the target time can be obtained once at the time when the target data stream starts to be transmitted through any rule, so as to ensure that the compression module can obtain the compression ratio to execute compression processing, after that, the target transmission path can be periodically evaluated according to a preset time interval, and the compression ratio can be timely adjusted when the health degree of the target transmission path changes, so that the variable compression ratio can be realized, the health degree of the target transmission path can be reflected by the compression ratio, and the transmission effect and the resource utilization rate of the compressed data in the target transmission path can be effectively improved.
For example, a compression algorithm with 0-10 stages of compression ratios is preset in the network equipment, the higher the stage number is, the larger the compression ratio is, the optional score of the path evaluation result is 0-100 minutes, the higher the score is, the higher the health degree is, when the target data stream starts to be transmitted, the path evaluation result is 100 minutes, the transmission condition of the transmission network is good, and the transmission of larger data volume can be satisfied, so that the 0-stage compression ratio can be adopted, namely the target data stream is not compressed and is directly forwarded to the transmission network; when the bandwidth of the transmission network is degraded in the 3 rd second, the path evaluation result is 50 minutes, the target compression parameter is determined to be 5 stages, corresponding compression control information is generated and inserted into the target data stream, and data compression is performed at a 5-stage compression ratio; when the bandwidth degradation of the 5 th second is improved, the path evaluation result is increased to 80 minutes, the target compression parameter is determined to be 2 stages, corresponding compression control information is generated and inserted into the target data stream, and data compression is performed at a 2-stage compression ratio.
In addition, referring to fig. 4, in an embodiment, step S210 of the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:
step S410, determining the data content type of the target data stream;
step S420, determining at least one target time, wherein the target time is the initial transmission time of the target data stream and/or the time when the data content type of the target data stream is changed;
in step S430, a target compression parameter is determined from preset optional compression parameters according to the data content type of the target data stream at the target time.
It should be noted that, in addition to the embodiment shown in fig. 3, the preset policy may also implement flexible adjustment of the compression ratio according to the content type of the target data. The data content types are different according to different target data streams, for example, for video data volume, the data content types can be video content, for example, pictures with rich image information, blank pictures, pictures with a large amount of characters and the like, for different data content types, the sensitivity to the depth of compression is different, for example, for pictures with rich image information, the larger the compression ratio is, the lower the definition is, for blank pictures, no influence is caused to the content of the pictures, no matter the deep compression or the shallow compression is adopted, the data volume of the target data stream can be reduced through the deep compression, and the mapping relation between the data content types and the target compression parameters can be adjusted according to actual requirements, so that the mapping relation is not limited.
It should be noted that, in the embodiment shown in fig. 3, the first target compression parameter may be determined according to the data content type of the initial transmission time of the target data stream, unlike the preset time interval in the embodiment shown in fig. 3, in this embodiment, the time when the data content type is changed is taken as the target time, so that the data of the same type can be compressed by adopting a suitable compression ratio, for example, the first frame of the video stream is a blank picture, the first target compression parameter is the compression ratio corresponding to the blank picture, until the next target time, for example, the next frame is detected to be a picture frame with rich image information, and a lower compression ratio is selected to be inserted into the target data stream, so that the compression degree of the target data stream is reduced in the next frame, and the definition is ensured to meet the user requirement.
In addition, referring to fig. 5, in an embodiment, step S210 of the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:
step S510, obtaining at least one compression requirement information carried by a target data stream, wherein the compression requirement information comprises a compression degree and a compression time period;
step S520, determining the starting time of each compression time period as a target time;
in step S530, a target compression parameter is determined from preset optional compression parameters according to the compression degree of the target data stream at the target time.
It should be noted that the specific form of the compression degree varies according to the target data stream, for example, for a video stream or an audio stream, the compression degree may be lossless, high definition, standard definition, and the like; the compression time period can be selected according to actual requirements, for example, the compression requirement is lossless compression in 0 to n seconds, the compression requirement is standard definition compression in n+1 to n+m seconds, wherein n is a natural number, m is a natural number greater than 1, active control on compression of a target data stream can be achieved through configuration of compression requirement information, and flexibility of data compression is improved.
It should be noted that, after the compression period is determined, the starting time of the compression period may be taken as the target time, so that the compression module may adjust the compression ratio at the target time to compress, and the manner in which the compression module adjusts the compression ratio may refer to the description of the embodiment of fig. 3 or fig. 4, which is not repeated herein.
In addition, in an embodiment, referring to fig. 6, after performing step S430 of the embodiment shown in fig. 4 or step S530 of the embodiment shown in fig. 5, the following steps are included, but not limited to:
step S610, determining path evaluation results of the target transmission path at each target moment, wherein the path evaluation results represent the health degree of the target transmission path;
step S620, adjusting the target compression parameters according to the path evaluation result.
It should be noted that, according to the description of the embodiment shown in fig. 3, the network device can sense the health degree of the transmission network, and after determining the compression ratio according to the compression requirement information or the content type information, the compression ratio can be further adjusted according to the path evaluation result of the target transmission path, so that the compression policy of the data stream can consider both the user requirement and the network condition of the transmission network, and the transmission effect of the target data stream is effectively improved.
For example, in the manner according to the embodiment shown in fig. 4, the data content type is a text image, the determined compression ratio is 5 levels, the health degree evaluation is performed on the target transmission path to obtain a path evaluation result of 80 minutes, and if the transmission network has a factor affecting the transmission performance, one level can be increased under the condition of 5 levels of compression ratio, and the compression of the target data stream is performed at 6 levels of compression ratio, so that the load of the transmission network is reduced, and the transmission effect and the rationality of network resource utilization are effectively improved.
It should be noted that, whether the schemes of the embodiments shown in fig. 3 to 5 are combined may be set in the target data stream according to the actual requirement, for example, by modifying the configuration information of the target data stream, so that the data content type and the path evaluation result are considered at the same time when determining the target compression parameter, or only the path evaluation result may be considered, and the scheme may be adjusted according to the actual requirement.
In addition, referring to fig. 7, in an embodiment, step S120 of the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:
step S710, when the target compression parameters are obtained at each target moment, generating compression control information according to the target compression parameters;
in step S720, the compression control information is inserted into the current position of the target data stream.
It should be noted that, the compression control information may be a control frame or a control message, and when the compression control information is a control frame carrying a target compression parameter, the control frame may be inserted into the current position of the target data stream; when the compression control information is a control message carrying compression parameters, inserting the control message into an outlet queue or an inlet queue of the target data stream, and modifying the current control message of the target data stream according to the compression control information so that the current control message carries the target compression parameters; the types of compression control information are merely examples of the present embodiment, and other information types may be adopted, so that the target data stream may carry the target compression parameters.
It should be noted that, the target data stream may be forwarded to the compression module by the forwarding module of the network device, and then compressed and returned to the forwarding module for forwarding to the transmission network, so, in order to ensure availability of compression control information, the target data stream may be inserted into a current position of the target data stream after each time of obtaining the compression control information, so that the compression module identifies the compression control information in a process of parsing the target data stream, thereby realizing variable compression ratio in a compression process and improving flexibility of data stream compression.
In addition, in an embodiment, the first network device includes a compression module and a forwarding module, and referring to fig. 8, step S120 of the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:
step S810, forwarding the target data stream carrying the compression control information to a compression module through a forwarding module;
step S820, compressing the target data stream by a compression module;
and step S830, forwarding the data compressed by the compression module to a transmission network through a forwarding module, wherein when the compression module detects compression control information in the receiving process of the target data stream, the current compression parameters are updated according to the detected compression control information.
It should be noted that, the first network device may be a forwarding device such as a common switch or a router, and the specific type of the network device is not limited in this embodiment. It may be understood that, the network device generally includes a forwarding module to implement forwarding of a data stream, on the basis that the first network device has a compression module at the same time, the data stream carrying compression control information may be forwarded to the compression module by using the forwarding module to compress, after the compression module completes compression, the compressed data stream is sent to the forwarding device and then forwarded to the target transmission path, and specific hardware types of the compression module and the forwarding module are not limited herein, so that corresponding functions may be implemented.
For example, referring to fig. 9, after the forwarding module acquires the target data stream, forwarding the target data stream to the compression module for compression, taking the initial compression ratio as 0 as an example, the compression module does not perform compression after acquiring the target data stream, and directly executing the subsequent forwarding operation; after compression control information for controlling shallow compression is obtained according to a preset strategy, the compression control information is inserted into the current position of the target data stream, so that the target data stream is shallow compressed after being identified by the compression module; after compression control information for controlling deep compression is obtained according to a preset strategy, the compression control information is inserted into the current position of the target data stream, so that the target data stream is subjected to deep compression after the compression module is identified.
In addition, in an embodiment, the first network device is communicatively connected to the second network device, the second network device includes a compression module, the first network device includes a first forwarding module, the first network device is communicatively connected to the second network device, the second network device includes a compression module and a second forwarding module, the first forwarding module is communicatively connected to the second forwarding module, and compresses the target data stream according to the compression control information, and forwards the compressed data to the transmission network, referring to fig. 10, step S120 of the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:
and step S1010, forwarding the target data stream carrying the compression control information to a second forwarding module through a first forwarding module, so that the second forwarding module forwards the target data stream to a compression module, compressing the target data stream through the compression module, and forwarding the data compressed by the compression module to a transmission network through the second forwarding module, wherein when the compression module detects the compression control information in the receiving process of the target data stream, the current compression parameters are updated according to the detected compression control information.
It should be noted that, when the first network device does not include the compression module, the first forwarding module may compress the second network device that is in communication connection with the first network device and has the compression module, and the first forwarding module sends the target data stream to the second forwarding module, which may be implemented by a tunnel transmission manner, so that the compression control information is invisible to the intermediate node of the tunnel, and loss of the compression control information in the transmission process is avoided. Tunneling may be implemented through common general routing encapsulation (Generic Routing Encapsulation, GRE), virtual extended local area network (Virtual Extensible Local Area Network, VXLAN), multiprotocol label switching (Multi-Protocol Label Switching, MPLS), and other tunneling techniques, which are not limited in this embodiment.
For example, as shown in fig. 11, after the first forwarding module acquires the target data stream, the target data stream is added to the tunnel header, and is transferred to the second forwarding module through the tunnel, and the tunnel header is popped up in the second forwarding module, so that the target data stream is acquired, and the compression is performed according to the compression control information carried in the target data stream. Notably, after the second network module completes compression, the compressed data volume can be directly forwarded to the target transmission path, so that data flow transmission between network devices is reduced, and transmission efficiency is improved.
In order to better illustrate the technical solution of the present invention, 3 specific examples are set forth below, and in the following 3 examples, the compression parameter is exemplified by a compression ratio, the level is 0 to 10, and the target data stream is exemplified by a video stream with a duration of 10 seconds.
Example one: in this example, the network device takes the network device shown in fig. 9 as an example, that is, the network device itself has a compression module, the preset policy is to determine the compression ratio according to the path evaluation result, the range of the path evaluation result is 0 to 100 minutes, the preset time interval is 1 second, and the health degree of the transmission network changes at the 3 rd second and the 8 th second, and referring to fig. 12, this example includes, but is not limited to, the following steps:
step S1210, during the video stream transmission process, the network device evaluates the health degree of the exit information of the video stream every 1 second, wherein the initial health degree is 100 minutes, the initial health degree is reduced to 50 minutes in the 3 rd second, and the initial health degree is restored to 80 minutes in the 8 th second;
step S1220, the network device determines the score calculated from the health degree collected from the outlet, inserts a compression control frame with a required compression ratio of 5 stages in the third second, and inserts a compression control frame with a required compression ratio of 2 stages in the 8 th second;
step S1230, the video stream is forwarded to the compression module in the network device, and the compression module performs compression processing on the video stream according to the inserted compression control frame, wherein 0 to 3 seconds is not compressed, 5 to 8 seconds is used for 5-stage compression, and 8 to 10 seconds is used for 2-stage compression;
in step S1240, the compressed data stream is forwarded to the target transmission path through the forwarding module.
Example two: in this example, the network device is taken as an example of the network device shown in fig. 9, that is, the network device itself is provided with a compression module, the preset policy is to perform compression selection according to video content and compression requirements, and the health degree of the transmission network is changed at the 3 rd second and the 8 th second, and referring to fig. 13, this example includes, but is not limited to, the following steps:
step S1310, in the process of video stream transmission, the equipment presets monitoring conditions, monitors the lossless demand degree of the content information of the video stream, the initial compression demand is lossless, the video stream starts to transmit a large amount of blank picture information in the 3 rd second, and the video stream transmits a large amount of text information in the 8 th second;
step S1320, the network device judges the condition of the video content collected by the monitoring condition, and inserts a compression control frame with a required compression ratio of 5 stages into the video stream at the 3 rd second, and inserts a compression control frame with a required compression ratio of 2 stages at the 8 th second;
step S1330, the video stream is forwarded to the compression module in the network device, the compression module performs corresponding compression processing on the video stream according to the inserted compression control frame, the video stream is not compressed for 0 to 3 seconds, 5 to 8 seconds uses 5-level compression, and 8 to 10 seconds uses 2-level compression;
in step S1340, the compressed data stream is forwarded normally by the network device forwarding module.
Example three: in this example, referring to the structure shown in fig. 11, the first network device itself does not have a compression module, and the second network device has a compression module, and referring to fig. 14, this example includes, but is not limited to, the following steps:
step S1410, the first network device determines a target time for inserting the compressed control frame according to the network health condition or the video content information, and inserts the compressed control frame;
step S1420, the first network device adds the video stream to the tunnel header;
step S1430, the first network device is transferred to the second network device capable of compression processing through the tunnel;
step S1440, the second network device terminates the tunnel transmission, and performs corresponding compression processing on the video stream encapsulated in the tunnel according to the inserted compression control frame;
in step S1450, the forwarding module of the second network device forwards the compressed data stream to the target transmission path.
As can be seen from the above 3 examples, compared with the forwarding mechanism of the general network device for compressing the data stream message, the method provided by the present invention can enable the network device to insert compression control information into the data stream by inserting compression control information into the data stream to control different compression ratios of the same data stream through the health degree of a target transmission path or the content information of the data stream when the network device transmits the data stream. And the system can be provided with compression capability at the local end or sent to a far end with compression capability for compression processing through techniques such as tunneling or forwarding. By the processing method, when the same data stream is transmitted through the network, different compression rate changes can be transmitted according to the requirement, the utilization rate of the network is effectively improved, the intelligent capability of the whole network is improved, and the experience perception of a user on the whole network transmission effect is improved.
In addition, referring to fig. 15, an embodiment of the present invention further provides a network device, the network device 1500 including: memory 1510, processor 1520, and computer programs stored on memory 1510 and executable on processor 1520.
The processor 1520 and the memory 1510 may be connected by a bus or other means.
The non-transitory software programs and instructions required to implement the data stream compression method of the above embodiments are stored in the memory 1510, and when executed by the processor 1520, the data stream compression method of the above embodiments is performed, for example, the method steps S110 to S120 in fig. 1, the method steps S210 to S220 in fig. 2, the method steps S310 to S340 in fig. 3, the method steps S410 to S430 in fig. 4, the method steps S510 to S530 in fig. 5, the method steps S610 to S620 in fig. 6, the method steps S710 to S720 in fig. 7, the method steps S810 to S830 in fig. 8, the method steps S1210 to S1240 in fig. 12, the method steps S1310 to S1340 in fig. 13, and the method steps S1410 to S1450 in fig. 14 described above are performed.
The above described embodiments of the apparatus are only illustrative, wherein the units described as separate components may or may not be physically separate, i.e. may be located in one place, or may be separately onto a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or a controller, for example, by a processor in the above network device embodiment, which may cause the processor to perform the data stream compression method in the above embodiment, for example, the method steps S110 to S120 in fig. 1, the method steps S210 to S220 in fig. 2, the method steps S310 to S340 in fig. 3, the method steps S410 to S430 in fig. 4, the method steps S510 to S530 in fig. 5, the method steps S610 to S620 in fig. 6, the method steps S710 to S720 in fig. 7, the method steps S810 to S830 in fig. 8, the method steps S1010 in fig. 10, the method steps S1210 to S1240 in fig. 12, the method steps S1340 to S1450 in fig. 13, and the method steps S1410 in fig. 12, which are described above. Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media), respectively. The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
While the preferred embodiment of the present invention has been described in detail, the present invention is not limited to the above embodiment, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present invention, and these equivalent modifications and substitutions are intended to be included in the scope of the present invention as defined in the appended claims.

Claims (11)

1. A data stream compression method, comprising:
acquiring a target data stream, and adding compression control information into the target data stream according to a preset strategy, wherein the compression control information carries target compression parameters of the target data stream;
and compressing the target data stream according to the compression control information, and forwarding the compressed data to a transmission network.
2. The method of claim 1, applied to a first network device, wherein the adding compression control information to the target data stream according to a preset policy comprises:
determining at least one target compression parameter according to the preset strategy;
and generating corresponding compression control information according to each target compression parameter, and adding at least one piece of compression control information to the target data stream.
3. The method of claim 2, wherein said determining at least one target compression parameter according to said preset strategy comprises:
determining a target transmission path of the target data stream;
determining at least one target time, wherein the target time is the initial transmission time of the target data stream and/or the time determined according to a preset time interval after the initial transmission time;
determining a path evaluation result of the target transmission path at each target moment, wherein the path evaluation result represents the health degree of the target transmission path;
and determining the target compression parameters corresponding to the target moments from preset optional compression parameters according to the path evaluation result.
4. The method of claim 2, wherein said determining at least one target compression parameter according to said preset strategy comprises:
determining a data content type of the target data stream;
determining at least one target time, wherein the target time is the initial transmission time of the target data stream and/or the time when the data content type of the target data stream is changed;
and determining a target compression parameter from preset optional compression parameters according to the data content type of the target data stream at the target moment.
5. The method of claim 2, wherein said determining at least one target compression parameter according to said preset strategy comprises:
acquiring at least one piece of compression requirement information carried by the target data stream, wherein the compression requirement information comprises a compression degree and a compression time period;
determining the starting time of each compression time period as a target time;
and determining a target compression parameter from preset optional compression parameters according to the compression degree of the target data stream at the target moment.
6. The method according to claim 4 or 5, wherein after said determining a target compression parameter from preset selectable compression parameters, the method further comprises:
determining a path evaluation result of the target transmission path at each target moment, wherein the path evaluation result represents the health degree of the target transmission path;
and adjusting the target compression parameter according to the path evaluation result.
7. The method of any one of claims 3 to 5, wherein said generating the corresponding compression control information from each of the target compression parameters, adding at least one of the compression control information to the target data stream, comprises:
when the target compression parameters are acquired at each target moment, generating the compression control information according to the target compression parameters;
and inserting the compression control information into the current position of the target data stream.
8. The method of claim 1, applied to a first network device, the first network device comprising a compression module and a forwarding module, the compressing the target data stream according to the compression control information, forwarding the compressed data to a transmission network, comprising:
forwarding the target data stream carrying the compression control information to the compression module through a forwarding module;
compressing the target data stream by the compression module;
and forwarding the data compressed by the compression module to the transmission network through the forwarding module, wherein when the compression module detects the compression control information in the receiving process of the target data stream, the current compression parameters are updated according to the detected compression control information.
9. The method of claim 1, applied to a first network device, the first network device including a first forwarding module, the first network device communicatively coupled to a second network device, the second network device including a compression module and a second forwarding module, the first forwarding module communicatively coupled to the second forwarding module, the compressing the target data stream according to the compression control information, forwarding the compressed data to a transport network, comprising:
and forwarding the target data stream carrying the compression control information to the second forwarding module through the first forwarding module, so that the second forwarding module forwards the target data stream to the compression module, compressing the target data stream through the compression module, and forwarding the data obtained by compression of the compression module to the transmission network through the second forwarding module, wherein when the compression module detects the compression control information in the receiving process of the target data stream, the current compression parameters are updated according to the detected compression control information.
10. A network device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the data stream compression method according to any one of claims 1 to 9 when executing the computer program.
11. A computer readable storage medium storing computer executable instructions for performing the data stream compression method according to any one of claims 1 to 9.
CN202210724307.0A 2022-06-24 2022-06-24 Data stream compression method, network device and storage medium Pending CN117319318A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210724307.0A CN117319318A (en) 2022-06-24 2022-06-24 Data stream compression method, network device and storage medium
PCT/CN2023/081397 WO2023246190A1 (en) 2022-06-24 2023-03-14 Data stream compression method, network device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210724307.0A CN117319318A (en) 2022-06-24 2022-06-24 Data stream compression method, network device and storage medium

Publications (1)

Publication Number Publication Date
CN117319318A true CN117319318A (en) 2023-12-29

Family

ID=89245045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210724307.0A Pending CN117319318A (en) 2022-06-24 2022-06-24 Data stream compression method, network device and storage medium

Country Status (2)

Country Link
CN (1) CN117319318A (en)
WO (1) WO2023246190A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459616A (en) * 2009-01-04 2009-06-17 成都市华为赛门铁克科技有限公司 Method, customer terminal and access system for network access
CN103813171B (en) * 2014-01-17 2017-04-19 西安空间无线电技术研究所 Method of improving compression ratio of existing data compression method
GB2561036A (en) * 2017-03-31 2018-10-03 Cirrus Logic Int Semiconductor Ltd Methods and apparatus for buffering and compression of data
CN111865326B (en) * 2020-07-14 2023-06-23 北京灵汐科技有限公司 Data compression method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2023246190A1 (en) 2023-12-28

Similar Documents

Publication Publication Date Title
CN104394486B (en) A kind of video stream processing method and device based on cloud desktop
US10764610B2 (en) Media user client, a media user agent and respective methods performed thereby for providing media from a media server to the media user client
US10110650B2 (en) Client side stream switching
US10516712B2 (en) Streaming media data transmission method, client and server
US8594184B2 (en) Method and apparatus for controlling video-audio data playing
EP1720318A1 (en) Apparatus and method for transmitting a multimedia data stream
US11863841B2 (en) Video playing control method and system
EP3207686B1 (en) Adaptive bit rates during broadcast transmission in distributed content delivery networks
CN109428864B (en) Method and device for improving quality of nginx-rtmp pull flow service
CN114584833A (en) Audio and video processing method and device and storage medium
CN106791910A (en) Frame of video processing method and processing device
CN114466194A (en) Video coding adjusting method and device, storage medium and electronic equipment
US20060031564A1 (en) Methods and systems for streaming data at increasing transmission rates
ur Rahman et al. A novel adaptive logic for dynamic adaptive streaming over HTTP
Rahman et al. SABA: Segment and buffer aware rate adaptation algorithm for streaming over HTTP
CN117319318A (en) Data stream compression method, network device and storage medium
CN113542909A (en) Video processing method and device, electronic equipment and computer storage medium
CN114979091B (en) Data transmission method, related device, equipment and storage medium
US11087071B2 (en) Self-compressed YANG model
US11973814B2 (en) Method and controller for audio and/or video content delivery
WO2023246203A1 (en) Network data processing method and apparatus, and computer readable storage medium
US11997366B2 (en) Method and apparatus for processing adaptive multi-view streaming
CN116366141B (en) Method, device and storage medium for transmitting telemetry application data to information sink process
Yi et al. Prefetching-based Adaptive Video Streaming Strategy on Edge Computing
CN114157727B (en) Application method and device of TCP acceleration in OSU

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication