WO2023246190A1 - 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
WO2023246190A1
WO2023246190A1 PCT/CN2023/081397 CN2023081397W WO2023246190A1 WO 2023246190 A1 WO2023246190 A1 WO 2023246190A1 CN 2023081397 W CN2023081397 W CN 2023081397W WO 2023246190 A1 WO2023246190 A1 WO 2023246190A1
Authority
WO
WIPO (PCT)
Prior art keywords
compression
target
data stream
control information
target data
Prior art date
Application number
PCT/CN2023/081397
Other languages
French (fr)
Chinese (zh)
Inventor
林宁
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023246190A1 publication Critical patent/WO2023246190A1/en

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

Definitions

  • Embodiments of the present application provide a data stream compression method, network equipment, and storage media.
  • Figure 1 is a flow chart of a data stream compression method provided by an embodiment of the present application.
  • Figure 3 is a flow chart for determining target compression parameters according to network health provided by another embodiment of the present application.
  • Figure 5 is a flow chart for determining target compression parameters according to compression requirements provided by another embodiment of the present application.
  • Figure 6 is a flow chart for adjusting target compression parameters according to network health according to another embodiment of the present application.
  • Figure 7 is a flow chart for inserting compression control information provided by another embodiment of the present application.
  • Step S110 Obtain the target data stream, and add compression control information to the target data stream according to the preset policy.
  • the compression control information carries the target compression parameters of the target data stream.
  • target data stream in this embodiment may be a video data stream, an audio data stream, and other data streams that need to be compressed. This embodiment does not limit the specific type of the data stream.
  • the settings of the preset policy can be determined according to the capabilities of the specific device.
  • the network device can sense the transmission performance of the transmission network or the current resource utilization.
  • compression control information can be generated based on this, so that after obtaining the target data stream, variable compression ratio compression of the target data stream can also be achieved.
  • the amount of compression control information can be arbitrary and can be determined according to user needs or preset policies. After obtaining the compression control information, it is added to the target data stream, so that when compressing the target data stream, the compression control information can be used Adjust the compression ratio so that after obtaining the target data stream, the compression ratio can be flexibly adjusted to improve the flexibility of data stream compression.
  • the compression control information can be any type of data, such as a control message or control frame of the data flow.
  • the cost of adding the compression control information to the target data flow can be determined according to the specific type of the compression control information, such as compression Control information is a control packet, which can be inserted into the egress queue or ingress queue of the forwarded data flow, or the destination can be modified.
  • compression Control information is a control packet, which can be inserted into the egress queue or ingress queue of the forwarded data flow, or the destination can be modified.
  • the target data flow can carry compression control information.
  • the compression ratio is adjusted each time the compression control information is detected, for example, according to the initial compression ratio
  • the parameters of the compression module will be adjusted according to the compression ratio recorded in the compression control information until the compression control information is obtained next time.
  • Step S210 Determine at least one target compression parameter according to the preset policy.
  • the target compression parameter takes the compression ratio as an example.
  • a compression control information can be generated and inserted into the target data stream, so that the compression module can perform subsequent processing based on the compression ratio after obtaining the compression control information.
  • step S210 of the embodiment shown in Figure 2 also includes but is not limited to the following steps S310-S340.
  • Step S320 Determine at least one target time, where the target time is the starting transmission time of the target data stream and/or a time determined according to a preset time interval after the starting transmission time.
  • Step S330 Determine the path evaluation results of the target transmission path at each target time.
  • the path evaluation results represent the health of the target transmission path.
  • Step S340 According to the path evaluation results, target compression parameters corresponding to each target time are determined from preset optional compression parameters.
  • the preset time interval can be adjusted according to timing requirements, for example, every 1 second, or every 10 seconds. This embodiment does not place too many restrictions on the evaluation frequency of the path evaluation results.
  • the target transmission path of the target data flow is known to the network device.
  • path evaluation The results can be comprehensively evaluated based on one or more of the quality of service (QOS) settings such as port bandwidth, congestion level, packet loss rate, optical module transmission length, speed limit or integer of the target transmission path.
  • QOS quality of service
  • the health level reflected by the above indicators can reflect the network status of the target transmission path, so that the compression ratio determined based on the path evaluation results can be reduced when the health level is high, making the data quality of the target data stream higher, and when the health level is high, the compression ratio can be reduced.
  • the degree for example, the bandwidth of the transmission network is degraded
  • the compression ratio is increased to make the data volume of the target data stream smaller, reduce the transmission pressure on the transmission network, and thereby improve the transmission effect.
  • the target time can be determined through any rules, and is obtained once when the target data stream starts to be transmitted to ensure that the compression module can obtain the compression ratio and perform compression processing. After that, the target time can be determined according to the preset time interval.
  • the target transmission path is periodically evaluated, and the compression ratio is adjusted in time when the health of the target transmission path changes. This can not only achieve a variable compression ratio, but also enable the compression ratio to reflect the health of the target transmission path, effectively improving the compression rate.
  • a compression algorithm with a compression ratio of 0 to 10 is preset in the network device.
  • the optional score of the path evaluation result is from 0 to 100. The higher the score, the higher the health level of the target.
  • the path evaluation result is 100 points, then the transmission network is in good condition and can meet the transmission of a large amount of data.
  • the level 0 compression ratio can be used, that is, the target data stream is not compressed and forwarded directly to Transmission network; when the bandwidth of the transmission network deteriorates at the 3rd second, the path evaluation result is 50 points, determine the target compression parameter to be level 5, generate the corresponding compression control information and insert it into the target data stream, and perform data compression with a level 5 compression ratio; When the bandwidth degradation at the 5th second is improved and the path evaluation result rises to 80 points, the target compression parameter is determined to be level 2, the corresponding compression control information is generated and inserted into the target data stream, and the data is compressed with a level 2 compression ratio.
  • step S210 of the embodiment shown in Figure 2 also includes but is not limited to the following steps S410, S420, and S430.
  • Step S410 Determine the data content type of the target data stream.
  • Step S420 Determine at least one target time, where the target time is the start transmission time of the target data stream and/or the time when the data content type of the target data stream changes.
  • Step S430 Determine the target compression parameters from the preset optional compression parameters according to the data content type of the target data stream at the target time.
  • the preset policy can also flexibly adjust the compression ratio according to the content type of the target data.
  • the data content type varies according to the target data stream.
  • the data content type can be video content, such as pictures with rich image information, blank pictures, pictures with a lot of text, etc.
  • the sensitivity to the depth of compression is different. For example, for a picture with rich image information, the greater the compression ratio, the lower the clarity. For a blank picture, no matter whether deep compression or shallow compression is used, it will not affect the content of the picture. , the data volume of the target data stream can be reduced through deep compression.
  • the mapping relationship between the data content type and the target compression parameters can be adjusted according to actual needs, and there are no restrictions here.
  • the first target compression parameter can be determined according to the data content type at the initial transmission moment of the target data stream, and is different from the preset time interval in the embodiment shown in Figure 3 Differently, since this embodiment identifies the picture content, the time when the data content type changes can be used as the target time, so that the same type of data can be compressed using an appropriate compression ratio.
  • the first frame of the video stream is a blank picture.
  • the first item The compression parameter is the compression ratio corresponding to the blank picture until the next target moment. For example, if it is detected that the next frame is a picture frame with rich image information, a lower compression ratio is selected to insert into the target data stream, so that the target data stream is Reduce the level of compression one frame to ensure the clarity meets user needs.
  • step S210 of the embodiment shown in FIG. 2 also includes but is not limited to the following steps S510, S520, and S530.
  • Step S510 Obtain at least one compression requirement information carried by the target data stream.
  • the compression requirement information includes a compression degree and a compression time period.
  • Step S520 Determine the starting time of each compression time period as the target time.
  • Step S530 Determine the target compression parameters from the preset optional compression parameters according to the compression degree of the target data stream at the target time.
  • the specific form of the compression degree varies according to the target data stream.
  • the compression degree can be lossless, high-definition, standard definition, etc.; the compression time period can be selected according to actual needs, for example, in The compression requirement from 0 to n seconds is lossless compression, and the compression requirement from n+1 to n+m seconds is SD compression, where n is a natural number and m is a natural number greater than 1.
  • the compression requirement information can be achieved. Active control of target data stream compression improves data compression flexibility.
  • the starting time of the compression time period can be used as the target time, so that the compression module can adjust the compression ratio for compression at the target time.
  • the way the compression module adjusts the compression ratio can refer to Figure 3 or The description of the embodiment in Figure 4 will not be repeated here.
  • step S430 of the embodiment shown in FIG. 4 or step S530 of the embodiment shown in FIG. 5 is executed, the following steps S610 and S620 are included but are not limited to.
  • Step S610 Determine the path evaluation results of the target transmission path at each target time.
  • the path evaluation results represent the health of the target transmission path.
  • Step S620 Adjust the target compression parameters according to the path evaluation results.
  • the network device can sense the health of the transmission network. After determining the compression ratio based on the compression requirement information or the content type information, the network device can further evaluate the results based on the path of the target transmission path. Adjust the compression ratio so that the data stream compression strategy can take into account both user needs and the network conditions of the transmission network, effectively improving the transmission effect of the target data stream.
  • the data content type is text and images
  • the determined compression ratio is level 5
  • the health of the target transmission path is evaluated and the path evaluation result is 80 points.
  • the transmission network has a certain impact on the transmission. For performance reasons, one level can be added to the 5-level compression ratio, and the target data stream can be compressed with a 6-level compression ratio to reduce the load on the transmission network and effectively improve the transmission effect and the rationality of network resource utilization.
  • step S120 of the embodiment shown in FIG. 1 also includes but is not limited to the following steps S710 and S720.
  • Step S710 At each target time, when the target compression parameters are obtained, compression control information is generated according to the target compression parameters.
  • Step S820 Compress the target data stream through the compression module.
  • Step S830 Forward the data compressed by the compression module to the transmission network through the forwarding module.
  • the compression module detects compression control information during the reception of the target data stream, it updates the current compression parameters according to the detected compression control information. .
  • the first network device may be a common forwarding device such as a switch or router.
  • This embodiment does not limit the specific type of the network device.
  • network devices usually include a forwarding module to implement data flow forwarding.
  • the data flow carrying compression control information can be forwarded to the compression module through the forwarding module. Compression. After the compression module completes the compression, it sends the compressed data stream to the forwarding device and then forwards it to the target transmission path.
  • the specific hardware types of the compression module and forwarding module are not limited here, as long as they can realize the corresponding functions.
  • the forwarding module after the forwarding module obtains the target data stream, it forwards 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 obtaining the target data stream and executes it directly. Subsequent forwarding operations; after first obtaining the compression control information that controls shallow compression according to the preset strategy, insert the compression control information into the current position of the target data stream, so that the target data stream is shallowly compressed after recognition by the compression module; After the setting strategy first obtains the compression control information that controls deep compression, it inserts the compression control information into the current position of the target data stream, so that the compression module performs deep compression on the target data stream after recognition.
  • 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, compresses the target data stream according to the compression control information, and forwards the compressed data to the transmission network.
  • Step S1010 The first forwarding module forwards the target data flow carrying the compression control information to the second forwarding module, so that the second forwarding module forwards the target data flow to the compression module, and compresses the target data flow through the compression module.
  • the data compressed by the compression module is forwarded to the transmission network through the second forwarding module.
  • the compression module detects compression control information during the reception of the target data stream, it updates the current compression parameters according to the detected compression control information.
  • the compression parameter takes the compression ratio as an example, the level is from 0 to 10, and the target data stream is a video stream with a duration of 10 seconds. For example.
  • Step S1210 During the video stream delivery process, the network device evaluates the health level of the export information of this video stream every 1 second.
  • the initial health level is 100 points, drops to 50 points at the 3rd second, and recovers at the 8th second. to 80 minutes.
  • Step S1220 The network device determines the score calculated from the health level collected from the outlet, inserts a compression control frame requiring a compression ratio of level 5 at the third second, and inserts a compression control frame requiring a compression ratio of level 2 at the 8th second. .
  • Step S1230 the video stream is forwarded to the compression module in the network device.
  • the compression module compresses the video stream according to the inserted compression control frame. Among them, 0 to 3 seconds are uncompressed, 5 to 8 seconds use level 5 compression, and 8 seconds to 10 seconds using level 2 compression.
  • Step S1240 Forward the compressed data stream to the target transmission path through the forwarding module.
  • Step S1310 during the video stream transmission process, the device presets monitoring conditions to monitor the lossless requirement of the content information of this video stream.
  • the initial compression requirement is lossless, and the video stream begins to deliver a large amount of blank screen information at the 3rd second. A large amount of text information can be transmitted in 8 seconds.
  • Step S1320 The network device determines the video content collected under the monitoring conditions. At the 3rd second, a compression control frame requiring a compression ratio of level 5 is inserted into the video stream. At the 8th second, a compression control frame requiring a compression ratio of level 2 is inserted. Compress control frames.
  • 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. No compression is used for 0 to 3 seconds, and level 5 compression is used for 5 to 8 seconds. 8 to 10 seconds using level 2 compression.
  • Step S1340 The compressed data flow is forwarded normally through the network device forwarding module.
  • Step S1410 The first network device determines a target time for inserting a compression control frame based on network health conditions or video content information, and inserts a compression control frame.
  • Step S1430 The first network device transmits the information through the tunnel to the second network device that can perform compression processing.
  • Step S1450 The forwarding module of the second network device forwards the compressed data stream to the target transmission path.
  • the method proposed in this solution can enable network equipment to transmit a data flow by checking the health of the target transmission path. degree, or the content information of this data stream, insert compression control information into the data stream, and control different compression ratios for the same data stream. And it can be compressed at the local end, or sent to a remote end with compression capabilities for compression processing through tunneling or forwarding and other technologies.
  • this processing method when the same data stream is transmitted over the network, it can be transmitted with different compression rate changes as needed, effectively improving the utilization of the network, improving the intelligent capabilities of the overall network, and improving users' understanding of the entire network. Experiential perception of transmission effects.
  • the network device 1500 includes: a memory 1510, a processor 1520, and a computer program stored on the memory 1510 and executable on the processor 1520.
  • the processor 1520 and the memory 1510 may be connected through a bus or other means.
  • an embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are executed by a processor or controller, for example, by the above-mentioned Execution by a processor in the network device embodiment can cause the above-mentioned processor to perform the data stream compression method in the above embodiment, for example, perform the above-described method steps S110 to step S120 in Figure 1 and the method steps in Figure 2 S210 to step S220, method steps S310 to step S340 in Fig. 3, method steps S410 to step S430 in Fig. 4, method steps S510 to step S530 in Fig. 5, method steps S610 to step S620 in Fig. 6, Fig.
  • Method steps S710 to step S720 in Figure 7 Method steps S810 to step S830 in Figure 8
  • method step S1010 in Figure 10 method steps S1210 to step S1240 in Figure 12
  • method steps S1310 to step S1340 in Figure 13 method steps S1410 to S1450 in Figure 14.
  • Embodiments of the present application include: obtaining a target data stream, adding compression control information to the target data stream according to a preset policy, where the compression control information carries target compression parameters of the target data stream; according to the compression control information Compress the target data stream, and forward the compressed data to the transmission network.
  • the compression parameters can be adjusted by adding compression control information in the target data flow, which effectively improves the flexibility of data compression. It not only makes the compression method of the target data flow more in line with user needs, but also benefits Improve the transmission resource utilization of the transmission network, thereby improving the transmission effect of the compressed data stream.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store the desired information and that can be accessed by a computer.
  • 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 may include any information delivery media .

Landscapes

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

Abstract

Provided in the present application are a data stream compression method, a network device and a storage medium. The data stream compression method comprises: 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 a target compression parameter for the target data stream; and compressing the target data stream according to the compression control information, and forwarding compressed data to a transmission network.

Description

数据流压缩方法、网络设备、存储介质Data stream compression method, network equipment, storage media
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为202210724307.0、申请日为2022年6月24日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on a Chinese patent application with application number 202210724307.0 and a filing date of June 24, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
技术领域Technical field
本申请涉及但不限于数据压缩技术领域,尤其涉及一种数据流压缩方法、网络设备、存储介质。This application relates to but is not limited to the field of data compression technology, and in particular, to a data stream compression method, network equipment, and storage media.
背景技术Background technique
在视频业务等涉及数据流的业务中,通常会将数据流进行压缩后传输,以提高数据的传输效率。目前,数据流的压缩主要由数据侧设备完成,数据侧设备只能根据配置好的压缩参数对整个数据流进行压缩,并且在获取到数据流之后无法调整压缩参数,例如对于视频业务,通常预先为每种视频清晰度配置好的对应压缩参数,数据侧设备只能根据选好的清晰度所对应的压缩参数对整个视频数据流进行压缩,再将压缩好的数据流通过网络设备转发到传输网络进行传输,数据压缩的灵活性较低。In businesses involving data streams such as video services, the data streams are usually compressed and transmitted to improve data transmission efficiency. At present, the compression of data streams is mainly completed by data-side equipment. The data-side equipment can only compress the entire data stream according to the configured compression parameters, and cannot adjust the compression parameters after obtaining the data stream. For example, for video services, usually in advance Corresponding compression parameters are configured for each video definition. The data-side device can only compress the entire video data stream according to the compression parameters corresponding to the selected definition, and then forward the compressed data stream to the transmission through the network device. For transmission over the network, the flexibility of data compression is low.
发明内容Contents of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
本申请实施例提供了一种数据流压缩方法、网络设备、存储介质。Embodiments of the present application provide a data stream compression method, network equipment, and storage media.
第一方面,本申请实施例提供了一种数据流压缩方法,包括:获取目标数据流,根据预置策略在所述目标数据流中增加压缩控制信息,所述压缩控制信息携带有所述目标数据流的目标压缩参数;根据所述压缩控制信息压缩所述目标数据流,将压缩后的数据转发至传输网络。In a first aspect, embodiments of the present application provide a data stream compression method, which includes: obtaining a target data stream, adding compression control information to the target data stream according to a preset policy, and the compression control information carries the target data stream. Target compression parameters of the data stream; compress the target data stream according to the compression control information, and forward the compressed data to the transmission network.
第二方面,本申请实施例提供了一种网络设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述的数据流压缩方法。In a second aspect, embodiments of the present application provide a network device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following is implemented: A data stream compression method as described in one aspect.
第三方面,本申请实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行如第一方面所述的数据流压缩方法。In a third aspect, embodiments of the present application provide a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to execute the data stream compression method as described in the first aspect.
附图说明Description of the drawings
图1是本申请一个实施例提供的数据流压缩方法的流程图;Figure 1 is a flow chart of a data stream compression method provided by an embodiment of the present application;
图2是本申请另一个实施例提供的网络设备应用数据流压缩方法的流程图;Figure 2 is a flow chart of a network device application data stream compression method provided by another embodiment of the present application;
图3是本申请另一个实施例提供的根据网络健康程度确定目标压缩参数的流程图;Figure 3 is a flow chart for determining target compression parameters according to network health provided by another embodiment of the present application;
图4是本申请另一个实施例提供的根据数据流内容确定目标压缩参数的流程图;Figure 4 is a flow chart for determining target compression parameters according to data stream content provided by another embodiment of the present application;
图5是本申请另一个实施例提供的根据压缩需求确定目标压缩参数的流程图;Figure 5 is a flow chart for determining target compression parameters according to compression requirements provided by another embodiment of the present application;
图6是本申请另一个实施例提供的根据网络健康程度调整目标压缩参数的流程图;Figure 6 is a flow chart for adjusting target compression parameters according to network health according to another embodiment of the present application;
图7是本申请另一个实施例提供的***压缩控制信息的流程图;Figure 7 is a flow chart for inserting compression control information provided by another embodiment of the present application;
图8是本申请另一个实施例提供的网络设备本地进行压缩处理的流程图;Figure 8 is a flow chart of local compression processing by a network device provided by another embodiment of the present application;
图9是本申请另一个实施例提供的网络设备本地进行压缩处理的示意图; Figure 9 is a schematic diagram of a network device performing local compression processing provided by another embodiment of the present application;
图10是本申请另一个实施例提供的远端进行压缩处理的流程图;Figure 10 is a flow chart of remote compression processing provided by another embodiment of the present application;
图11是本申请另一个实施例提供的远端进行压缩处理的示意图;Figure 11 is a schematic diagram of remote compression processing provided by another embodiment of the present application;
图12是本申请另一个实施例提供的示例一的流程图;Figure 12 is a flow chart of Example 1 provided by another embodiment of the present application;
图13是本申请另一个实施例提供的示例二的流程图;Figure 13 is a flow chart of Example 2 provided by another embodiment of the present application;
图14是本申请另一个实施例提供的示例三的流程图;Figure 14 is a flow chart of Example 3 provided by another embodiment of the present application;
图15是本申请另一个实施例提供的网络设备的装置图。Figure 15 is a device diagram of a network device provided by another embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书、权利要求书或上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the device schematic diagram and the logical sequence is shown in the flow chart, in some cases, the modules can be divided into different modules in the device or the order in the flow chart can be executed. The steps shown or described. The terms "first", "second", etc. in the description, claims or the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
本申请提供了一种数据流压缩方法、网络设备、存储介质,数据流压缩方法包括:获取目标数据流;根据预置策略在所述目标数据流中增加压缩控制信息,所述压缩控制信息携带有所述目标数据流的目标压缩参数;根据所述压缩控制信息压缩所述目标数据流,将压缩后的数据转发至传输网络。根据本实施例的技术方案,在获取到目标数据流之后,能够通过在目标数据流中增加压缩控制信息的方式实现压缩参数可调整,有效提高了数据压缩的灵活性,不仅能使目标数据流的压缩方式更加符合用户需求,也有利于提高传输网络的传输资源利用率,从而提高压缩后的数据流的传输效果。This application provides a data stream compression method, network equipment, and storage media. The data stream compression method includes: obtaining a target data stream; adding compression control information to the target data stream according to a preset policy, and the compression control information carries There are target compression parameters of the target data stream; the target data stream is compressed according to the compression control information, and the compressed data is forwarded to the transmission network. According to the technical solution of this embodiment, after obtaining the target data stream, the compression parameters can be adjusted by adding compression control information to the target data stream, effectively improving the flexibility of data compression and not only making the target data stream The compression method is more in line with user needs and is also conducive to improving the transmission resource utilization of the transmission network, thereby improving the transmission effect of the compressed data stream.
以下结合附图,对本申请各实施例的技术方案进行进一步说明。The technical solutions of each embodiment of the present application will be further described below with reference to the accompanying drawings.
如图1所示,图1是本申请一个实施例提供的一种数据流压缩方法的流程图,包括但不限于有步骤S110和步骤S120。As shown in Figure 1, Figure 1 is a flow chart of a data stream compression method provided by an embodiment of the present application, including but not limited to step S110 and step S120.
步骤S110,获取目标数据流,根据预置策略在目标数据流中增加压缩控制信息,压缩控制信息携带有目标数据流的目标压缩参数。Step S110: Obtain the target data stream, and add compression control information to the target data stream according to the preset policy. The compression control information carries the target compression parameters of the target data stream.
步骤S120,根据压缩控制信息压缩目标数据流,将压缩后的数据转发至传输网络。Step S120: Compress the target data stream according to the compression control information, and forward the compressed data to the transmission network.
需要说明的是,本实施例的目标数据流可以是视频数据流、音频数据流等需要进行压缩处理的数据流,本实施例对数据流的具体类型不作限定。It should be noted that the target data stream in this embodiment may be a video data stream, an audio data stream, and other data streams that need to be compressed. This embodiment does not limit the specific type of the data stream.
需要说明的是,目标压缩参数可以是压缩比等参数,本实施例对压缩参数的具体类型不作限定,为了叙述简便,后续以压缩比为例进行说明,这并不是对本实施例作出的限定。It should be noted that the target compression parameter may be a compression ratio or other parameters. This embodiment does not limit the specific type of the compression parameter. For simplicity of description, the compression ratio will be used as an example for explanation. This is not a limitation of this embodiment.
值得注意的是,预置策略的设置可以根据具体的设备的能力确定,例如,通过网络设备执行本实施例的技术方案时,基于网络设备可以感知到传输网络的传输性能或者当前的资源利用率,可以以此为依据生成压缩控制信息,从而在获取到目标数据流之后,还能够实现目标数据流的可变压缩比压缩。It is worth noting that the settings of the preset policy can be determined according to the capabilities of the specific device. For example, when the technical solution of this embodiment is implemented through the network device, the network device can sense the transmission performance of the transmission network or the current resource utilization. , compression control information can be generated based on this, so that after obtaining the target data stream, variable compression ratio compression of the target data stream can also be achieved.
值得注意的是,压缩控制信息的数量可以是任意,根据用户需求或者预置策略确定即可,在获取到压缩控制信息之后增加到目标数据流,使得在压缩目标数据流时能够根据压缩控制信息调整压缩比,从而在获取到目标数据流之后能够实现压缩比的灵活调整,提高数据流压缩的灵活性。It is worth noting that the amount of compression control information can be arbitrary and can be determined according to user needs or preset policies. After obtaining the compression control information, it is added to the target data stream, so that when compressing the target data stream, the compression control information can be used Adjust the compression ratio so that after obtaining the target data stream, the compression ratio can be flexibly adjusted to improve the flexibility of data stream compression.
值得注意的是,压缩控制信息可以是任意类型的数据,例如数据流的控制报文或者控制帧,将压缩控制信息增加到目标数据流的昂视可以根据压缩控制信息的具体类型确定,例如压缩控制信息为控制报文,可以***到转发的数据流的出口队列或者入口队列,或者修改目 标数据流的报文中头部字段信息等方式,能够使得目标数据流携带压缩控制信息即可。It is worth noting that the compression control information can be any type of data, such as a control message or control frame of the data flow. The cost of adding the compression control information to the target data flow can be determined according to the specific type of the compression control information, such as compression Control information is a control packet, which can be inserted into the egress queue or ingress queue of the forwarded data flow, or the destination can be modified. By using header field information in the packets marking the data flow, the target data flow can carry compression control information.
需要说明的是,压缩控制信息根据上述方式***到目标数据流之后,在通过设备的压缩模块对目标数据流进行压缩时,每当检测到压缩控制信息调整一次压缩比,例如在根据初始压缩比进行压缩的过程中,检测到目标数据流的下一帧为控制帧,携带有压缩控制信息,则根据该压缩控制信息中记载的压缩比调整压缩模块的参数,直至下一次获取到压缩控制信息为止,基于上述压缩方式,能够通过在目标数据流不同位置增加压缩控制信息实现灵活压缩,提高数据压缩的灵活性和可控性。It should be noted that after the compression control information is inserted into the target data stream according to the above method, when the target data stream is compressed through the compression module of the device, the compression ratio is adjusted each time the compression control information is detected, for example, according to the initial compression ratio During the compression process, if it is detected that the next frame of the target data stream is a control frame and carries compression control information, the parameters of the compression module will be adjusted according to the compression ratio recorded in the compression control information until the compression control information is obtained next time. So far, based on the above compression method, flexible compression can be achieved by adding compression control information at different positions of the target data stream, thereby improving the flexibility and controllability of data compression.
另外,在一实施例中,数据流压缩方法应用于第一网络设备,参照图2,图1所示实施例的步骤S110还包括但不限于有以下步骤S210、S220。In addition, in one embodiment, the data stream compression method is applied to the first network device. Referring to Figure 2, step S110 of the embodiment shown in Figure 1 also includes but is not limited to the following steps S210 and S220.
步骤S210,根据预置策略确定至少一个目标压缩参数。Step S210: Determine at least one target compression parameter according to the preset policy.
步骤S220,根据各个目标压缩参数生成对应的压缩控制信息,将至少一个压缩控制信息增加至目标数据流。Step S220: Generate corresponding compression control information according to each target compression parameter, and add at least one piece of compression control information to the target data stream.
需要说明的是,数据侧设备不与传输网络直接连接,通常无法感知到传输网络的传输性能或者资源使用情况,即使是通过网络设备获取到上述信息,由于信息的传递和解析需要耗费一定的时间,也很难确保能够及时在数据流的传递过程中***压缩控制信息,而网络设备直接传输网络连接,能够感知传输网络的情况变化,基于此,本实施例通过网络设备进行数据流压缩,使得网络设备不仅仅用作传输设备,而是能够确定目标压缩参数、生成压缩控制信息并***目标数据流、以及对携带有压缩控制信息的目标数据流进行压缩处理,能够让预置策略的参考依据更加多样化,不仅能根据用户需求、数据流内容,还可以根据传输网络的网络状况进行压缩比的灵活调整,有利于提高传输网络资源的利用率。It should be noted that the data side equipment is not directly connected to the transmission network, and usually cannot perceive the transmission performance or resource usage of the transmission network. Even if the above information is obtained through the network equipment, it takes a certain amount of time to transmit and parse the information. , it is also difficult to ensure that compression control information can be inserted in the transmission process of the data stream in a timely manner, and the network device directly transmits the network connection and can sense changes in the transmission network. Based on this, this embodiment performs data stream compression through the network device, so that Network equipment is not only used as a transmission device, but can determine target compression parameters, generate compression control information and insert it into the target data stream, and compress the target data stream carrying compression control information, which can provide a reference basis for preset policies. More diversified, the compression ratio can be flexibly adjusted not only according to user needs and data flow content, but also according to the network conditions of the transmission network, which is beneficial to improving the utilization of transmission network resources.
需要说明的是,目标压缩参数以压缩比为例,可以在获取到一个压缩比之后生成一个压缩控制信息并***目标数据流,使得压缩模块在获取到压缩控制信息之后根据该压缩比进行后续的数据压缩,并在获取到下一个压缩比之后再次调整压缩模块的运行参数,从而实现可变压缩比,有效提高数据压缩的灵活性。It should be noted that the target compression parameter takes the compression ratio as an example. After obtaining a compression ratio, a compression control information can be generated and inserted into the target data stream, so that the compression module can perform subsequent processing based on the compression ratio after obtaining the compression control information. Data compression, and after obtaining the next compression ratio, adjust the operating parameters of the compression module again to achieve variable compression ratio and effectively improve the flexibility of data compression.
另外,在一实施例中,参照图3,图2所示实施例的步骤S210还包括但不限于有以下步骤S310-S340。In addition, in an embodiment, referring to Figure 3, step S210 of the embodiment shown in Figure 2 also includes but is not limited to the following steps S310-S340.
步骤S310,确定目标数据流的目标传输路径。Step S310: Determine the target transmission path of the target data stream.
步骤S320,确定至少一个目标时刻,目标时刻为目标数据流的起始传输时刻和/或在起始传输时刻之后根据预设时间间隔确定的时刻。Step S320: Determine at least one target time, where the target time is the starting transmission time of the target data stream and/or a time determined according to a preset time interval after the starting transmission time.
步骤S330,在各个目标时刻确定目标传输路径的路径评估结果,路径评估结果表征目标传输路径的健康程度。Step S330: Determine the path evaluation results of the target transmission path at each target time. The path evaluation results represent the health of the target transmission path.
步骤S340,根据路径评估结果,从预设的可选压缩参数中确定各个目标时刻所对应的目标压缩参数。Step S340: According to the path evaluation results, target compression parameters corresponding to each target time are determined from preset optional compression parameters.
需要说明的是,根据上述实施例的描述,网络设备可以感知传输网络的健康程度,并根据以健康程度为预置策略的依据进行压缩比的灵活调整,以实现目标数据流的可变压缩比压缩。It should be noted that according to the description of the above embodiments, the network device can sense the health of the transmission network and flexibly adjust the compression ratio based on the health degree as the preset policy to achieve a variable compression ratio of the target data stream. compression.
需要说明的是,预设时间间隔可以根据时机需求调整,例如每隔1秒,或者每隔10秒,本实施例对路径评估结果的评估频率不作过多限定。It should be noted that the preset time interval can be adjusted according to timing requirements, for example, every 1 second, or every 10 seconds. This embodiment does not place too many restrictions on the evaluation frequency of the path evaluation results.
需要说明的是,目标数据流的目标传输路径对于网络设备是可知的,基于此,路径评估 结果可以根据目标传输路径的端口带宽、拥塞程度、丢包率、光模块传输长度、限速或者整型等服务质量(Quality of Service,QOS)设置等信息中的一项或者多项进行综合评定,通过上述指标所体现的健康程度,能够反映目标传输路径的网络状况,使得根据路径评估结果确定的压缩比能够在健康程度高时减少压缩比,使得目标数据流的数据质量更高,在健康程度低(例如传输网络的带宽劣化)时增加压缩比,使得目标数据流的数据量更小,减少传输网络的传输压力,从而提高传输效果。It should be noted that the target transmission path of the target data flow is known to the network device. Based on this, path evaluation The results can be comprehensively evaluated based on one or more of the quality of service (QOS) settings such as port bandwidth, congestion level, packet loss rate, optical module transmission length, speed limit or integer of the target transmission path. , the health level reflected by the above indicators can reflect the network status of the target transmission path, so that the compression ratio determined based on the path evaluation results can be reduced when the health level is high, making the data quality of the target data stream higher, and when the health level is high, the compression ratio can be reduced. When the degree is low (for example, the bandwidth of the transmission network is degraded), the compression ratio is increased to make the data volume of the target data stream smaller, reduce the transmission pressure on the transmission network, and thereby improve the transmission effect.
需要说明的是,由于目标数据流的传递过程在时间维度上是持续的,因此可以通过确定多个目标时刻,在每一个目标时刻对压缩比进行一次调整,使得压缩后的数据传输能够更加合理地利用传输网络的资源和性能。可以理解的是,目标时刻的确定可以通过任意规则,在目标数据流开始传输的时刻先获取一次,以确保压缩模块能够获取到压缩比执行压缩处理,在此之后,可以根据预设时间间隔对目标传输路径进行周期性评估,在目标传输路径的健康程度发生变化时及时调整压缩比,既能实现可变压缩比,又使压缩比能够反映出目标传输路径的健康程度,有效提高压缩后的数据在目标传输路径的传输效果和资源利用率。It should be noted that since the transmission process of the target data stream is continuous in the time dimension, multiple target moments can be determined and the compression ratio can be adjusted at each target moment to make the compressed data transmission more reasonable. Make optimal use of the resources and performance of the transmission network. It can be understood that the target time can be determined through any rules, and is obtained once when the target data stream starts to be transmitted to ensure that the compression module can obtain the compression ratio and perform compression processing. After that, the target time can be determined according to the preset time interval. The target transmission path is periodically evaluated, and the compression ratio is adjusted in time when the health of the target transmission path changes. This can not only achieve a variable compression ratio, but also enable the compression ratio to reflect the health of the target transmission path, effectively improving the compression rate. The transmission effect and resource utilization of data on the target transmission path.
例如,在网络设备中预先设置0至10级压缩比的压缩算法,级数越高压缩比越大,路径评估结果的可选分数为0至100分,分数越高健康程度越高,在目标数据流开始传递时,路径评估结果为100分,则传输网络的传输状况较好,能够满足较大数据量的传输,因此可以采用0级压缩比,即不对目标数据流进行压缩,直接转发到传输网络;当第3秒由于传输网络的带宽劣化,路径评估结果为50分,确定目标压缩参数为5级,生成对应的压缩控制信息并***目标数据流,以5级压缩比进行数据压缩;当第5秒带宽劣化得到改善,路径评估结果上升到80分,确定目标压缩参数为2级,生成对应的压缩控制信息并***目标数据流,以2级压缩比进行数据压缩。For example, a compression algorithm with a compression ratio of 0 to 10 is preset in the network device. The higher the level, the greater the compression ratio. The optional score of the path evaluation result is from 0 to 100. The higher the score, the higher the health level of the target. When the data stream starts to be transmitted, the path evaluation result is 100 points, then the transmission network is in good condition and can meet the transmission of a large amount of data. Therefore, the level 0 compression ratio can be used, that is, the target data stream is not compressed and forwarded directly to Transmission network; when the bandwidth of the transmission network deteriorates at the 3rd second, the path evaluation result is 50 points, determine the target compression parameter to be level 5, generate the corresponding compression control information and insert it into the target data stream, and perform data compression with a level 5 compression ratio; When the bandwidth degradation at the 5th second is improved and the path evaluation result rises to 80 points, the target compression parameter is determined to be level 2, the corresponding compression control information is generated and inserted into the target data stream, and the data is compressed with a level 2 compression ratio.
另外,在一实施例中,参照图4,图2所示实施例的步骤S210还包括但不限于有以下步骤S410、S420、S430。In addition, in one embodiment, referring to Figure 4, step S210 of the embodiment shown in Figure 2 also includes but is not limited to the following steps S410, S420, and S430.
步骤S410,确定目标数据流的数据内容类型。Step S410: Determine the data content type of the target data stream.
步骤S420,确定至少一个目标时刻,目标时刻为目标数据流的起始传输时刻和/或目标数据流的数据内容类型发生变更的时刻。Step S420: Determine at least one target time, where the target time is the start transmission time of the target data stream and/or the time when the data content type of the target data stream changes.
步骤S430,根据目标数据流在目标时刻的数据内容类型,从预设的可选压缩参数中确定目标压缩参数。Step S430: Determine the target compression parameters from the preset optional compression parameters according to the data content type of the target data stream at the target time.
需要说明的是,除了图3所示实施例方案,预置策略还可以根据目标数据的内容类型实现压缩比的灵活调整。数据内容类型根据目标数据流的不同而不同,例如对于视频数据量,数据内容类型可以是视频内容,例如图像信息较为丰富的画面、空白画面、大量文字的画面等,对于不同的数据内容类型,对压缩的深浅的敏感度不同,例如对于图像信息较为丰富的画面,压缩比越大,清晰度越低,而对于空白画面,无论采用深压缩或者浅压缩,都不会对画面的内容造成影响,可以通过深压缩以减少目标数据流的数据量,数据内容类型与目标压缩参数之间的映射关系可以根据实际需求调整,在此不多做限定。It should be noted that, in addition to the embodiment shown in Figure 3, the preset policy can also flexibly adjust the compression ratio according to the content type of the target data. The data content type varies according to the target data stream. For example, for the amount of video data, the data content type can be video content, such as pictures with rich image information, blank pictures, pictures with a lot of text, etc. For different data content types, The sensitivity to the depth of compression is different. For example, for a picture with rich image information, the greater the compression ratio, the lower the clarity. For a blank picture, no matter whether deep compression or shallow compression is used, it will not affect the content of the picture. , the data volume of the target data stream can be reduced through deep compression. The mapping relationship between the data content type and the target compression parameters can be adjusted according to actual needs, and there are no restrictions here.
需要说明的是,与上述图3所示的实施例相同,首个目标压缩参数可以根据目标数据流的起始传输时刻的数据内容类型进行确定,与图3所示实施例的预设时间间隔不同,本实施例由于是识别画面内容,因此可以将数据内容类型发生变更的时刻作为目标时刻,使得对同一类型的数据能够采用合适的压缩比进行压缩,例如视频流的第一帧为空白画面,则首个目 标压缩参数为与空白画面所对应的压缩比,直到下一个目标时刻,例如检测到下一帧为图像信息较为丰富的画面帧,选取更低的压缩比***目标数据流,使得目标数据流在下一帧降低压缩程度,确保清晰度能够满足用户需求。It should be noted that, same as the embodiment shown in Figure 3 above, the first target compression parameter can be determined according to the data content type at the initial transmission moment of the target data stream, and is different from the preset time interval in the embodiment shown in Figure 3 Differently, since this embodiment identifies the picture content, the time when the data content type changes can be used as the target time, so that the same type of data can be compressed using an appropriate compression ratio. For example, the first frame of the video stream is a blank picture. , then the first item The compression parameter is the compression ratio corresponding to the blank picture until the next target moment. For example, if it is detected that the next frame is a picture frame with rich image information, a lower compression ratio is selected to insert into the target data stream, so that the target data stream is Reduce the level of compression one frame to ensure the clarity meets user needs.
另外,在一实施例中,参照图5,图2所示实施例的步骤S210还包括但不限于有以下步骤S510、S520、S530。In addition, in one embodiment, referring to FIG. 5 , step S210 of the embodiment shown in FIG. 2 also includes but is not limited to the following steps S510, S520, and S530.
步骤S510,获取目标数据流所携带的至少一个压缩需求信息,压缩需求信息包括压缩程度和压缩时间段。Step S510: Obtain at least one compression requirement information carried by the target data stream. The compression requirement information includes a compression degree and a compression time period.
步骤S520,将各个压缩时间段的起始时刻确定为目标时刻。Step S520: Determine the starting time of each compression time period as the target time.
步骤S530,根据目标数据流在目标时刻的压缩程度,从预设的可选压缩参数中确定目标压缩参数。Step S530: Determine the target compression parameters from the preset optional compression parameters according to the compression degree of the target data stream at the target time.
需要说明的是,压缩程度的具体形式根据目标数据流的不同而不同,例如对于视频流或者音频流,压缩程度可以是无损、高清、标清等形式;压缩时间段可以根据实际需求选取,例如在0至n秒的压缩需求为无损压缩,在n+1至n+m秒的压缩需求为标清压缩,其中,n为自然数,m为大于1的自然数,通过压缩需求信息的配置,能够实现对目标数据流压缩的主动控制,提高数据压缩的灵活性。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 can be lossless, high-definition, standard definition, etc.; the compression time period can be selected according to actual needs, for example, in The compression requirement from 0 to n seconds is lossless compression, and the compression requirement from n+1 to n+m seconds is SD compression, where n is a natural number and m is a natural number greater than 1. By configuring the compression requirement information, the compression requirement can be achieved. Active control of target data stream compression improves data compression flexibility.
值得注意的是,在确定压缩时间段之后,可以将压缩时间段的起始时刻作为目标时刻,使得压缩模块可以在目标时刻调整压缩比进行压缩,压缩模块调整压缩比的方式可以参考图3或者图4实施例的叙述,在此不重复赘述。It is worth noting that after determining the compression time period, the starting time of the compression time period can be used as the target time, so that the compression module can adjust the compression ratio for compression at the target time. The way the compression module adjusts the compression ratio can refer to Figure 3 or The description of the embodiment in Figure 4 will not be repeated here.
另外,在一实施例中,参照图6,在执行完图4所示实施例的步骤S430或者图5所示实施例的步骤S530之后,还包括但不限于有以下步骤S610、S620。In addition, in one embodiment, referring to FIG. 6 , after step S430 of the embodiment shown in FIG. 4 or step S530 of the embodiment shown in FIG. 5 is executed, the following steps S610 and S620 are included but are not limited to.
步骤S610,在各个目标时刻确定目标传输路径的路径评估结果,路径评估结果表征目标传输路径的健康程度。Step S610: Determine the path evaluation results of the target transmission path at each target time. The path evaluation results represent the health of the target transmission path.
步骤S620,根据路径评估结果调整目标压缩参数。Step S620: Adjust the target compression parameters according to the path evaluation results.
需要说明的是,根据图3所示实施例的描述,网络设备能够感知传输网络的健康程度,在根据压缩需求信息或者内容类型信息确定压缩比之后,还可以进一步根据目标传输路径的路径评估结果调整压缩比,使得数据流的压缩策略能够同时兼顾用户需求和传输网络的网络状况,有效提高目标数据流的传输效果。It should be noted that according to the description of the embodiment shown in Figure 3, the network device can sense the health of the transmission network. After determining the compression ratio based on the compression requirement information or the content type information, the network device can further evaluate the results based on the path of the target transmission path. Adjust the compression ratio so that the data stream compression strategy can take into account both user needs and the network conditions of the transmission network, effectively improving the transmission effect of the target data stream.
例如,在根据图4所示实施例的方式,数据内容类型为文字图像,确定的压缩比为5级,对目标传输路径进行健康程度评价得到路径评估结果为80分,传输网络存在一定影响传输性能的因素,则可以在5级压缩比的情况下增加一级,以6级压缩比进行目标数据流的压缩,减少传输网络的负荷,有效提高传输效果和网络资源利用的合理性。For example, in the embodiment shown in Figure 4, the data content type is text and images, the determined compression ratio is level 5, and the health of the target transmission path is evaluated and the path evaluation result is 80 points. The transmission network has a certain impact on the transmission. For performance reasons, one level can be added to the 5-level compression ratio, and the target data stream can be compressed with a 6-level compression ratio to reduce the load on the transmission network and effectively improve the transmission effect and the rationality of network resource utilization.
值得注意的是,是否结合图3至图5所示实施例的方案可以根据实际需求在目标数据流中设置,例如通过修改目标数据流的配置信息,使得在确定目标压缩参数时同时考虑数据内容类型和路径评估结果,也可以只考虑路径评估结果,根据实际需求调整即可。It is worth noting that whether the solution combined with the embodiments shown in Figures 3 to 5 can be set in the target data stream according to actual needs, for example, by modifying the configuration information of the target data stream, so that the data content is also considered when determining the target compression parameters. Type and path evaluation results can also be considered only and the path evaluation results can be adjusted according to actual needs.
另外,在一实施例中,参照图7,图1所示实施例的步骤S120还包括但不限于有以下步骤S710、S720。In addition, in one embodiment, referring to FIG. 7 , step S120 of the embodiment shown in FIG. 1 also includes but is not limited to the following steps S710 and S720.
步骤S710,在每一个目标时刻,当获取到目标压缩参数,根据目标压缩参数生成压缩控制信息。Step S710: At each target time, when the target compression parameters are obtained, compression control information is generated according to the target compression parameters.
步骤S720,将压缩控制信息***目标数据流的当前位置。 Step S720: Insert the compression control information into the current position of the target data stream.
需要说明的是,压缩控制信息可以是控制帧或者控制报文,当压缩控制信息为携带有目标压缩参数的控制帧,可以将控制帧***目标数据流的当前位置;当压缩控制信息为携带有压缩参数的控制报文,将控制报文***目标数据流的出口队列或者入口队列,也可以根据压缩控制信息修改目标数据流当前的控制报文,以使当前的控制报文携带有目标压缩参数;上述压缩控制信息的类型仅为本实施例的示例,也可以采用其他的信息类型,能够使得目标数据流携带有目标压缩参数即可。It should be noted that the compression control information can be a control frame or a control message. When the compression control information is a control frame carrying target compression parameters, the control frame can be inserted into the current position of the target data stream; when the compression control information is a control frame carrying target compression parameters, To compress the control packet of parameters, insert the control packet into the egress queue or ingress queue of the target data flow. You can also modify the current control packet of the target data flow according to the compression control information so that the current control packet carries the target compression parameters. ; The above types of compression control information are only examples of this embodiment, and other information types can also be used to enable the target data stream to carry target compression parameters.
需要说明的是,目标数据流可以由网络设备的转发模块转发到压缩模块,压缩后返回转发模块转发至传输网络,因此,为了确保压缩控制信息的可用性,可以在每获取到一个压缩控制信息后将其***目标数据流的当前位置,使得压缩模块在解析目标数据流的过程中识别出该压缩控制信息,从而在压缩过程中实现的压缩比的可变,提高数据流压缩的灵活性。It should be noted that the target data flow can be forwarded by the forwarding module of the network device to the compression module, and after compression, it is returned to the forwarding module and forwarded to the transmission network. Therefore, in order to ensure the availability of the compression control information, the target data stream can be forwarded to the transmission network after each piece of compression control information is obtained. Insert it into the current position of the target data stream, so that the compression module can identify the compression control information during the process of parsing the target data stream, thereby achieving variable compression ratio during the compression process and improving the flexibility of data stream compression.
另外,在一实施例中,第一网络设备包括压缩模块和转发模块,参照图8,图1所示实施例的步骤S120还包括但不限于有以下步骤S810、S820、S830。In addition, in one embodiment, the first network device includes a compression module and a forwarding module. Referring to Figure 8, step S120 of the embodiment shown in Figure 1 also includes but is not limited to the following steps S810, S820, and S830.
步骤S810,通过转发模块将携带有压缩控制信息的目标数据流转发至压缩模块。Step S810: The target data stream carrying the compression control information is forwarded to the compression module through the forwarding module.
步骤S820,通过压缩模块压缩目标数据流。Step S820: Compress the target data stream through the compression module.
步骤S830,将压缩模块压缩得到的数据通过转发模块转发至传输网络,其中,当压缩模块在目标数据流的接收过程中检测到压缩控制信息,根据所检测到的压缩控制信息更新当前的压缩参数。Step S830: Forward the data compressed by the compression module to the transmission network through the forwarding module. When the compression module detects compression control information during the reception of the target data stream, it updates the current compression parameters according to the detected compression control information. .
需要说明的是,第一网络设备可以是常见的交换机或路由器等转发设备,本实施例对网络设备的具体类型不作限定。可以理解的是,网络设备通常包括转发模块,以实现数据流的转发,在第一网络设备同时具备压缩模块的基础上,可以通过转发模块将携带有压缩控制信息的数据流转发至压缩模块进行压缩,压缩模块完成压缩后将压缩完成的数据流发送至转发设备,再转发到目标传输路径,压缩模块和转发模块的具体硬件类型在此不多做限定,能够实现相应功能即可。It should be noted that the first network device may be a common forwarding device such as a switch or router. This embodiment does not limit the specific type of the network device. It can be understood that network devices usually include a forwarding module to implement data flow forwarding. On the basis that the first network device also has a compression module, the data flow carrying compression control information can be forwarded to the compression module through the forwarding module. Compression. After the compression module completes the compression, it sends the compressed data stream to the forwarding device and then forwards it to the target transmission path. The specific hardware types of the compression module and forwarding module are not limited here, as long as they can realize the corresponding functions.
例如,参照图9,在转发模块获取到目标数据流后,将目标数据流转发至压缩模块进行压缩,以初始压缩比为0为例,压缩模块获取到目标数据流之后不进行压缩,直接执行后续转发操作;在根据预置策略先得到控制浅压缩的压缩控制信息之后,将该压缩控制信息***至目标数据流的当前位置,使得压缩模块识别之后对目标数据流进行浅压缩;在根据预置策略先得到控制深压缩的压缩控制信息之后,将该压缩控制信息***至目标数据流的当前位置,使得压缩模块识别之后对目标数据流进行深压缩。For example, referring to Figure 9, after the forwarding module obtains the target data stream, it forwards 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 obtaining the target data stream and executes it directly. Subsequent forwarding operations; after first obtaining the compression control information that controls shallow compression according to the preset strategy, insert the compression control information into the current position of the target data stream, so that the target data stream is shallowly compressed after recognition by the compression module; After the setting strategy first obtains the compression control information that controls deep compression, it inserts the compression control information into the current position of the target data stream, so that the compression module performs deep compression on the target data stream after recognition.
另外,在一实施例中,第一网络设备与第二网络设备通信连接,第二网络设备包括压缩模块,第一网络设备包括第一转发模块,第一网络设备与第二网络设备通信连接,第二网络设备包括压缩模块和第二转发模块,第一转发模块与第二转发模块通信连接,根据压缩控制信息压缩目标数据流,将压缩后的数据转发至传输网络,参照图10,图1所示实施例的步骤S120还包括但不限于有以下步骤:In addition, in one 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, compresses the target data stream according to the compression control information, and forwards the compressed data to the transmission network. Refer to Figure 10 and Figure 1 Step S120 of the illustrated embodiment also includes but is not limited to the following steps:
步骤S1010,通过第一转发模块,将携带有压缩控制信息的目标数据流转发至第二转发模块,以使第二转发模块将目标数据流转发至压缩模块,通过压缩模块压缩目标数据流,将压缩模块压缩得到的数据通过第二转发模块转发至传输网络,其中,当压缩模块在目标数据流的接收过程中检测到压缩控制信息,根据所检测到的压缩控制信息更新当前的压缩参数。Step S1010: The first forwarding module forwards the target data flow carrying the compression control information to the second forwarding module, so that the second forwarding module forwards the target data flow to the compression module, and compresses the target data flow through the compression module. The data compressed by the compression module is forwarded to the transmission network through the second forwarding module. When the compression module detects compression control information during the reception of the target data stream, it updates the current compression parameters according to the detected compression control information.
需要说明的是,当第一网络设备不包括压缩模块,可以通过与其通信连接且具备压缩模 块的第二网络设备进行压缩,第一转发模块向第二转发模块发送目标数据流,可以通过隧道传递的方式实现,使得压缩控制信息对于隧道的中间节点均不可见,避免传递过程中丢失压缩控制信息。隧道传递可以通过常见通用路由封装(Generic Routing Encapsulation,GRE)、虚拟扩展局域网(Virtual Extensible Local Area Network,VXLAN)、多协议标签交换(Multi-Protocol Label Switching,MPLS)等隧道技术实现,本实施例对隧道技术不作限定。It should be noted that when the first network device does not include a compression module, it can be connected through communication and has a compression module. The second network device of the block performs compression, and the first forwarding module sends the target data stream to the second forwarding module. This can be achieved through tunnel transmission, so that the compression control information is invisible to the intermediate nodes of the tunnel, avoiding the loss of compression during the transmission process. control information. Tunnel delivery can be implemented through common tunneling technologies such as Generic Routing Encapsulation (GRE), Virtual Extensible Local Area Network (VXLAN), and Multi-Protocol Label Switching (MPLS). In this embodiment There are no restrictions on tunneling technology.
例如,如图11所示,第一转发模块获取到目标数据流之后,将目标数据流添加到隧道头部,并通过隧道传递至第二转发模块,在第二转发模块中弹出隧道头部,从而获取到目标数据流,根据目标数据流中携带的压缩控制信息进行压缩的方式可以参考上述实施例的描述,在此不重复赘述。值得注意的是,在第二网络模块完成压缩之后,可以直接将压缩后的数据量转发至目标传输路径,减少网络设备之间的数据流传递,提高传输效率。For example, as shown in Figure 11, after the first forwarding module obtains the target data flow, it adds the target data flow to the tunnel header and passes it to the second forwarding module through the tunnel. The tunnel header pops up in the second forwarding module. Thus, the target data stream is obtained, and the compression method is performed according to the compression control information carried in the target data stream. Reference can be made to the description of the above embodiments, which will not be repeated here. It is worth noting that after the second network module completes the compression, the compressed data volume can be directly forwarded to the target transmission path, reducing data flow transfer between network devices and improving transmission efficiency.
为了更好说明本申请的技术方案,以下提出3个具体示例,在下述3个示例中,压缩参数以压缩比为例,等级为0至10级,目标数据流以时长为10秒的视频流为例。In order to better illustrate the technical solution of this application, three specific examples are provided below. In the following three examples, the compression parameter takes the compression ratio as an example, the level is from 0 to 10, and the target data stream is a video stream with a duration of 10 seconds. For example.
示例一:在本示例中,网络设备以图9所示的网络设备为例,即网络设备本身具备压缩模块,预置策略为根据路径评估结果确定压缩比,路径评估结果的范围为0至100分,预设时间间隔为1秒,以第3秒和第8秒时传输网络的健康程度发生改变为例,参照图12,本示例包括但不限于有以下步骤S1210-S1240。Example 1: In this example, the network device shown in Figure 9 is used as an example. That is, the network device itself has a compression module. The preset policy is to determine the compression ratio based on the path evaluation results. The path evaluation results range from 0 to 100. minutes, and the preset time interval is 1 second. Take the health level of the transmission network changing at the 3rd second and the 8th second as an example. Refer to Figure 12. This example includes but is not limited to the following steps S1210-S1240.
步骤S1210,视频流传递的过程中,网络设备每隔1秒评估此视频流的出口信息的健康程度,其中,初始的健康程度为100分,在第3秒下降到50分,第8秒恢复到80分。Step S1210: During the video stream delivery process, the network device evaluates the health level of the export information of this video stream every 1 second. The initial health level is 100 points, drops to 50 points at the 3rd second, and recovers at the 8th second. to 80 minutes.
步骤S1220,网络设备判断从出口采集的健康程度计算的分数,在第三秒***一个需要压缩比为5级的压缩控制帧,在第8秒时***一个需要压缩比为2级的压缩控制帧。Step S1220: The network device determines the score calculated from the health level collected from the outlet, inserts a compression control frame requiring a compression ratio of level 5 at the third second, and inserts a compression control frame requiring a compression ratio of level 2 at the 8th second. .
步骤S1230,视频流在网络设备中被转发到压缩模块,压缩模块根据***的压缩控制帧对视频流进行压缩处理,其中,0至3秒为不压缩,5至8秒使用5级压缩,8至10秒使用2级压缩。Step S1230, the video stream is forwarded to the compression module in the network device. The compression module compresses the video stream according to the inserted compression control frame. Among them, 0 to 3 seconds are uncompressed, 5 to 8 seconds use level 5 compression, and 8 seconds to 10 seconds using level 2 compression.
步骤S1240,将压缩后的数据流通过转发模块转发至目标传输路径。Step S1240: Forward the compressed data stream to the target transmission path through the forwarding module.
示例二:在本示例中,网络设备以图9所示的网络设备为例,即网络设备本身具备压缩模块,预置策略为根据视频内容和压缩需求进行压缩选择,在第3秒和第8秒时传输网络的健康程度发生改变为例,参照图13,本示例包括但不限于有以下步骤S1310-S1340。Example 2: In this example, the network device shown in Figure 9 is used as an example. That is, the network device itself has a compression module, and the preset strategy is to select compression based on the video content and compression requirements. At the 3rd and 8th seconds As an example, the health level of the transmission network changes every second. Referring to Figure 13, this example includes but is not limited to the following steps S1310-S1340.
步骤S1310,视频流传递的过程中,设备预置监控条件,监控此视频流的内容信息的无损需求程度,初始的压缩需求为无损,视频流在第3秒时开始传递大量空白画面信息,第8秒传递大量文字信息。Step S1310, during the video stream transmission process, the device presets monitoring conditions to monitor the lossless requirement of the content information of this video stream. The initial compression requirement is lossless, and the video stream begins to deliver a large amount of blank screen information at the 3rd second. A large amount of text information can be transmitted in 8 seconds.
步骤S1320,网络设备判定监控条件采集的视频内容情况,在第3秒时,对视频流***一个需要压缩比为5级的压缩控制帧,第8秒时,***一个需要压缩比为2级的压缩控制帧。Step S1320: The network device determines the video content collected under the monitoring conditions. At the 3rd second, a compression control frame requiring a compression ratio of level 5 is inserted into the video stream. At the 8th second, a compression control frame requiring a compression ratio of level 2 is inserted. Compress control frames.
步骤S1330,视频流在网络设备中被转发到压缩模块中,压缩模块根据***的压缩控制帧对视频流进行相应的压缩处理,0至3秒为不压缩,5至8秒使用5级压缩,8至10秒使用2级压缩。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. No compression is used for 0 to 3 seconds, and level 5 compression is used for 5 to 8 seconds. 8 to 10 seconds using level 2 compression.
步骤S1340,压缩后的数据流通过网络设备转发模块正常进行转发。Step S1340: The compressed data flow is forwarded normally through the network device forwarding module.
示例三:在本示例中,参考图11所示的结构,第一网络设备本身不具备压缩模块,第二网络设备具备压缩模块,参照图14,本示例包括但不限于有以下步骤S1410-S1450。 Example 3: In this example, referring to the structure shown in Figure 11, the first network device itself does not have a compression module, and the second network device has a compression module. Referring to Figure 14, this example includes but is not limited to the following steps S1410-S1450 .
步骤S1410,第一网络设备根据网络健康情况或者视频内容信息确定***压缩控制帧的目标时刻,并***压缩控制帧。Step S1410: The first network device determines a target time for inserting a compression control frame based on network health conditions or video content information, and inserts a compression control frame.
步骤S1420,第一网络设备将视频流添加隧道头部。Step S1420: The first network device adds a tunnel header to the video stream.
步骤S1430,第一网络设备通过隧道传递到可进行压缩处理的第二网络设备。Step S1430: The first network device transmits the information through the tunnel to the second network device that can perform compression processing.
步骤S1440,第二网络设备终结隧道传递,并将隧道中封装的视频流进行按照***的压缩控制帧进行相应的压缩处理。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.
步骤S1450,第二网络设备的转发模块将压缩后的数据流转发至目标传输路径。Step S1450: The forwarding module of the second network device forwards the compressed data stream to the target transmission path.
由以上的3个示例可见,与一般的网络设备对数据流报文压缩的转发机制相比,本方案提出的方法,可以使得网络设备在传输一个数据流时,可以通过对目标传输路径的健康程度,或者此数据流的内容信息,在数据流中***压缩控制信息,对同一个数据流进行不同的压缩比的控制。并且可以在本端具备压缩能力,或者通过隧道或转发等技术发送到具备压缩能力的远端进行压缩处理。通过这样的处理方法,使得同一个数据流在网络传输的时候,可以按需进行不同的压缩率变化的传递,有效的提升网络的利用率,提升整体网络的智能化能力,提升用户对于全网传输效果的体验感知。From the above three examples, it can be seen that compared with the forwarding mechanism of general network equipment to compress data flow messages, the method proposed in this solution can enable network equipment to transmit a data flow by checking the health of the target transmission path. degree, or the content information of this data stream, insert compression control information into the data stream, and control different compression ratios for the same data stream. And it can be compressed at the local end, or sent to a remote end with compression capabilities for compression processing through tunneling or forwarding and other technologies. Through this processing method, when the same data stream is transmitted over the network, it can be transmitted with different compression rate changes as needed, effectively improving the utilization of the network, improving the intelligent capabilities of the overall network, and improving users' understanding of the entire network. Experiential perception of transmission effects.
另外,参照图15,本申请的一个实施例还提供了一种网络设备,该网络设备1500包括:存储器1510、处理器1520及存储在存储器1510上并可在处理器1520上运行的计算机程序。In addition, referring to Figure 15, an embodiment of the present application also provides a network device. The network device 1500 includes: a memory 1510, a processor 1520, and a computer program stored on the memory 1510 and executable on the processor 1520.
处理器1520和存储器1510可以通过总线或者其他方式连接。The processor 1520 and the memory 1510 may be connected through a bus or other means.
实现上述实施例的数据流压缩方法所需的非暂态软件程序以及指令存储在存储器1510中,当被处理器1520执行时,执行上述实施例中的数据流压缩方法,例如,执行以上描述的图1中的方法步骤S110至步骤S120、图2中的方法步骤S210至步骤S220、图3中的方法步骤S310至步骤S340、图4中的方法步骤S410至步骤S430、图5中的方法步骤S510至步骤S530、图6中的方法步骤S610至步骤S620、图7中的方法步骤S710至步骤S720、图8中的方法步骤S810至步骤S830、图10中的方法步骤S1010、图12中的方法步骤S1210至步骤S1240、图13中的方法步骤S1310至步骤S1340、图14中的方法步骤S1410至步骤S1450。The non-transitory software programs and instructions required to implement the data stream compression method of the above embodiment are stored in the memory 1510. When executed by the processor 1520, the data stream compression method in the above embodiment is executed, for example, the above described The method steps S110 to S120 in Figure 1 , the method steps S210 to S220 in Figure 2 , the method steps S310 to S340 in Figure 3 , the method steps S410 to S430 in Figure 4 , the method steps in Figure 5 S510 to step S530, method steps S610 to step S620 in Fig. 6, method steps S710 to step S720 in Fig. 7, method steps S810 to step S830 in Fig. 8, method step S1010 in Fig. 10, method step S1010 in Fig. 12 Method steps S1210 to step S1240, method steps S1310 to step S1340 in FIG. 13 , and method steps S1410 to step S1450 in FIG. 14 .
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分别到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be separated into multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
此外,本申请的一个实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器或控制器执行,例如,被上述网络设备实施例中的一个处理器执行,可使得上述处理器执行上述实施例中的数据流压缩方法,例如,执行以上描述的图1中的方法步骤S110至步骤S120、图2中的方法步骤S210至步骤S220、图3中的方法步骤S310至步骤S340、图4中的方法步骤S410至步骤S430、图5中的方法步骤S510至步骤S530、图6中的方法步骤S610至步骤S620、图7中的方法步骤S710至步骤S720、图8中的方法步骤S810至步骤S830、图10中的方法步骤S1010、图12中的方法步骤S1210至步骤S1240、图13中的方法步骤S1310至步骤S1340、图14中的方法步骤S1410至步骤S1450。In addition, an embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are executed by a processor or controller, for example, by the above-mentioned Execution by a processor in the network device embodiment can cause the above-mentioned processor to perform the data stream compression method in the above embodiment, for example, perform the above-described method steps S110 to step S120 in Figure 1 and the method steps in Figure 2 S210 to step S220, method steps S310 to step S340 in Fig. 3, method steps S410 to step S430 in Fig. 4, method steps S510 to step S530 in Fig. 5, method steps S610 to step S620 in Fig. 6, Fig. Method steps S710 to step S720 in Figure 7, method steps S810 to step S830 in Figure 8, method step S1010 in Figure 10, method steps S1210 to step S1240 in Figure 12, method steps S1310 to step S1340 in Figure 13 , method steps S1410 to S1450 in Figure 14.
本申请实施例包括:获取目标数据流,根据预置策略在所述目标数据流中增加压缩控制信息,所述压缩控制信息携带有所述目标数据流的目标压缩参数;根据所述压缩控制信息压缩所述目标数据流,将压缩后的数据转发至传输网络。根据本实施例的技术方案,在获取到 目标数据流之后,能够通过在目标数据流中增加压缩控制信息的方式实现压缩参数可调整,有效提高了数据压缩的灵活性,不仅能使目标数据流的压缩方式更加符合用户需求,也有利于提高传输网络的传输资源利用率,从而提高压缩后的数据流的传输效果。Embodiments of the present application include: obtaining a target data stream, adding compression control information to the target data stream according to a preset policy, where the compression control information carries target compression parameters of the target data stream; according to the compression control information Compress the target data stream, and forward the compressed data to the transmission network. According to the technical solution of this embodiment, after obtaining After the target data flow, the compression parameters can be adjusted by adding compression control information in the target data flow, which effectively improves the flexibility of data compression. It not only makes the compression method of the target data flow more in line with user needs, but also benefits Improve the transmission resource utilization of the transmission network, thereby improving the transmission effect of the compressed data stream.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、***可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分别在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be respectively on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. removable, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store the desired information and that can be accessed by a computer. Additionally, it is known to those of ordinary skill in the art that 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 may include any information delivery media .
以上是对本申请的一些实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请范围的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。 The above is a detailed description of some implementations of the present application, but the present application is not limited to the above-mentioned implementations. Those skilled in the art can also make various equivalent modifications or substitutions without departing from the scope of the present application. These equivalents All modifications or substitutions are included in the scope defined by the claims of this application.

Claims (11)

  1. 一种数据流压缩方法,包括:A data stream compression method, including:
    获取目标数据流,根据预置策略在所述目标数据流中增加压缩控制信息,所述压缩控制信息携带有所述目标数据流的目标压缩参数;Obtain the target data stream, and add compression control information to the target data stream according to a preset policy, where the compression control information carries target compression parameters of the target data stream;
    根据所述压缩控制信息压缩所述目标数据流,将压缩后的数据转发至传输网络。The target data stream is compressed according to the compression control information, and the compressed data is forwarded to the transmission network.
  2. 根据权利要求1所述的方法,其中,所述方法应用于第一网络设备,所述根据预置策略在所述目标数据流中增加压缩控制信息,包括:The method according to claim 1, wherein the method is applied to a first network device, and adding compression control information to the target data stream according to a preset policy includes:
    根据所述预置策略确定至少一个所述目标压缩参数;Determine at least one of the target compression parameters according to the preset strategy;
    根据各个所述目标压缩参数生成对应的所述压缩控制信息,将至少一个所述压缩控制信息增加至所述目标数据流。The corresponding compression control information is generated according to each of the target compression parameters, and at least one of the compression control information is added to the target data stream.
  3. 根据权利要求2所述的方法,其中,所述根据所述预置策略确定至少一个目标压缩参数,包括:The method of claim 2, wherein determining at least one target compression parameter according to the preset strategy includes:
    确定所述目标数据流的目标传输路径;Determine the target transmission path of the target data stream;
    确定至少一个目标时刻,所述目标时刻为所述目标数据流的起始传输时刻和/或在所述起始传输时刻之后根据预设时间间隔确定的时刻;Determine at least one target time, the target time being the starting transmission time of the target data stream and/or a time determined according to a preset time interval after the starting transmission time;
    在各个所述目标时刻确定所述目标传输路径的路径评估结果,所述路径评估结果表征所述目标传输路径的健康程度;Determine the path evaluation result of the target transmission path at each of the target times, and the path evaluation result represents the health of the target transmission path;
    根据所述路径评估结果,从预设的可选压缩参数中确定各个所述目标时刻所对应的所述目标压缩参数。According to the path evaluation result, the target compression parameters corresponding to each of the target moments are determined from preset optional compression parameters.
  4. 根据权利要求2所述的方法,其中,所述根据所述预置策略确定至少一个目标压缩参数,包括:The method of claim 2, wherein determining at least one target compression parameter according to the preset strategy includes:
    确定所述目标数据流的数据内容类型;Determine the data content type of the target data stream;
    确定至少一个目标时刻,所述目标时刻为所述目标数据流的起始传输时刻和/或所述目标数据流的所述数据内容类型发生变更的时刻;Determine at least one target time, where the target time is the starting transmission time of the target data stream and/or the time when the data content type of the target data stream changes;
    根据所述目标数据流在所述目标时刻的所述数据内容类型,从预设的可选压缩参数中确定目标压缩参数。Target compression parameters are determined from preset optional compression parameters according to the data content type of the target data stream at the target time.
  5. 根据权利要求2所述的方法,其中,所述根据所述预置策略确定至少一个目标压缩参数,包括:The method of claim 2, wherein determining at least one target compression parameter according to the preset strategy includes:
    获取所述目标数据流所携带的至少一个压缩需求信息,所述压缩需求信息包括压缩程度和压缩时间段;Obtain at least one compression requirement information carried by the target data stream, where the compression requirement information includes a compression degree and a compression time period;
    将各个所述压缩时间段的起始时刻确定为目标时刻;Determine the starting time of each compression time period as the target time;
    根据所述目标数据流在所述目标时刻的所述压缩程度,从预设的可选压缩参数中确定目标压缩参数。According to the compression degree of the target data stream at the target time, a target compression parameter is determined from preset optional compression parameters.
  6. 根据权利要求4或5所述的方法,其中,在所述从预设的可选压缩参数中确定目标压缩参数之后,所述方法还包括:The method according to claim 4 or 5, wherein after determining the target compression parameters from the preset optional compression parameters, the method further includes:
    在各个所述目标时刻确定所述目标传输路径的路径评估结果,所述路径评估结果表征所述目标传输路径的健康程度;Determine the path evaluation result of the target transmission path at each of the target times, and the path evaluation result represents the health of the target transmission path;
    根据所述路径评估结果调整所述目标压缩参数。 The target compression parameters are adjusted according to the path evaluation results.
  7. 根据权利要求3至5任意一项所述的方法,其中,所述根据各个所述目标压缩参数生成对应的所述压缩控制信息,将至少一个所述压缩控制信息增加至所述目标数据流,包括:The method according to any one of claims 3 to 5, wherein the corresponding compression control information is generated according to each target compression parameter, and at least one of the compression control information is added to the target data stream, include:
    在每一个所述目标时刻,当获取到所述目标压缩参数,根据所述目标压缩参数生成所述压缩控制信息;At each target time, when the target compression parameter is obtained, the compression control information is generated according to the target compression parameter;
    将所述压缩控制信息***所述目标数据流的当前位置。The compression control information is inserted into the current position of the target data stream.
  8. 根据权利要求1所述的方法,其中,所述方法应用于第一网络设备,所述第一网络设备包括压缩模块和转发模块,所述根据所述压缩控制信息压缩所述目标数据流,将压缩后的数据转发至传输网络,包括:The method according to claim 1, wherein the method is applied to a first network device, the first network device includes a compression module and a forwarding module, and the target data stream is compressed according to the compression control information to The compressed data is forwarded to the transmission network, including:
    通过转发模块将携带有所述压缩控制信息的所述目标数据流转发至所述压缩模块;Forward the target data stream carrying the compression control information to the compression module through the forwarding module;
    通过所述压缩模块压缩所述目标数据流;Compress the target data stream through the compression module;
    将所述压缩模块压缩得到的数据通过所述转发模块转发至所述传输网络,其中,当所述压缩模块在所述目标数据流的接收过程中检测到所述压缩控制信息,根据所检测到的所述压缩控制信息更新当前的压缩参数。The data compressed by the compression module is forwarded to the transmission network through the forwarding module, wherein when the compression module detects the compression control information during the reception of the target data stream, the data is forwarded according to the detected The compression control information updates the current compression parameters.
  9. 根据权利要求1所述的方法,其中,所述方法应用于第一网络设备,所述第一网络设备包括第一转发模块,所述第一网络设备与第二网络设备通信连接,所述第二网络设备包括压缩模块和第二转发模块,所述第一转发模块与所述第二转发模块通信连接,所述根据所述压缩控制信息压缩所述目标数据流,将压缩后的数据转发至传输网络,包括:The method according to claim 1, wherein the method is applied to a first network device, the first network device includes a first forwarding module, the first network device is communicatively connected to a second network device, and the first network device is communicatively connected to a 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. The target data stream is compressed according to the compression control information and the compressed data is forwarded to Transport network, including:
    通过所述第一转发模块,将携带有所述压缩控制信息的所述目标数据流转发至所述第二转发模块,以使所述第二转发模块将所述目标数据流转发至所述压缩模块,通过所述压缩模块压缩所述目标数据流,将所述压缩模块压缩得到的数据通过所述第二转发模块转发至所述传输网络,其中,当所述压缩模块在所述目标数据流的接收过程中检测到所述压缩控制信息,根据所检测到的所述压缩控制信息更新当前的压缩参数。Through the first forwarding module, the target data flow carrying the compression control information is forwarded to the second forwarding module, so that the second forwarding module forwards the target data flow to the compression module, compress the target data stream through the compression module, and forward the data compressed by the compression module to the transmission network through the second forwarding module, wherein when the compression module is in the target data stream The compression control information is detected during the reception process, and the current compression parameters are updated according to the detected compression control information.
  10. 一种网络设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至9任意一项所述的数据流压缩方法。A network device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the implementation of any one of claims 1 to 9 is achieved. The data stream compression method described above.
  11. 一种计算机可读存储介质,存储有计算机可执行指令,其中,所述计算机可执行指令用于执行如权利要求1至9中任意一项所述的数据流压缩方法。 A computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are used to execute the data stream compression method according to any one of claims 1 to 9.
PCT/CN2023/081397 2022-06-24 2023-03-14 Data stream compression method, network device and storage medium WO2023246190A1 (en)

Applications Claiming Priority (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
CN202210724307.0 2022-06-24

Publications (1)

Publication Number Publication Date
WO2023246190A1 true WO2023246190A1 (en) 2023-12-28

Family

ID=89245045

Family Applications (1)

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

Country Status (2)

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

Citations (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
CN103813171A (en) * 2014-01-17 2014-05-21 西安空间无线电技术研究所 Method of improving compression ratio of existing data compression method
US20180286420A1 (en) * 2017-03-31 2018-10-04 Cirrus Logic International Semiconductor Ltd. Methods and apparatus for buffering and compression of data
CN111865326A (en) * 2020-07-14 2020-10-30 北京灵汐科技有限公司 Data compression method, device, equipment and storage medium

Patent Citations (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
CN103813171A (en) * 2014-01-17 2014-05-21 西安空间无线电技术研究所 Method of improving compression ratio of existing data compression method
US20180286420A1 (en) * 2017-03-31 2018-10-04 Cirrus Logic International Semiconductor Ltd. Methods and apparatus for buffering and compression of data
CN111865326A (en) * 2020-07-14 2020-10-30 北京灵汐科技有限公司 Data compression method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN117319318A (en) 2023-12-29

Similar Documents

Publication Publication Date Title
US11546399B2 (en) Method and apparatus for providing a low latency transmission system using adjustable buffers
US10686704B2 (en) Method and apparatus for providing a low latency transmission system using adaptive buffering estimation
WO2022247550A1 (en) Data retransmission processing method and apparatus, computer device, and storage medium
US10516712B2 (en) Streaming media data transmission method, client and server
EP3917097A1 (en) Bier-based bidirectional forwarding detection session creation method, bfir, bfer, system, and storage medium
US11425051B2 (en) Flow control method and system, and device
CN110474721B (en) Video data transmission method, device and computer readable storage medium
US11489836B2 (en) Method, apparatus, and system for collecting access control list
WO2018108093A1 (en) Congestion control method and apparatus, and computer storage medium
KR102107514B1 (en) Method and apparatus for managing dynamic que in broadcasting system
US20120092988A1 (en) Method, apparatus, and system for judging path congestion
CN111211936B (en) Data processing method and device based on network state
CN114363739B (en) Service application method and device based on optical service unit
CN111224889A (en) Data transmission method and device
WO2023246190A1 (en) Data stream compression method, network device and storage medium
CN106790576B (en) interactive desktop synchronization method
EP3579517A1 (en) Multicast service processing method and access device
CN109982080A (en) A kind of method of transmission of video, storage medium, robot and control system
CN108632163B (en) Data packet transmission method, boundary router and core router
CN114157727B (en) Application method and device of TCP acceleration in OSU
US9917726B2 (en) Method and apparatus for bundling multiple logger events
US11973814B2 (en) Method and controller for audio and/or video content delivery
CN109889442B (en) Ethernet interface link aggregation method, electronic equipment and storage medium
WO2024066652A1 (en) Data transmission method and apparatus, computer readable medium, and electronic device
CN110149496B (en) Control method and device for video network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23825848

Country of ref document: EP

Kind code of ref document: A1