Nothing Special   »   [go: up one dir, main page]

WO2023143264A1 - Data compression method and apparatus - Google Patents

Data compression method and apparatus Download PDF

Info

Publication number
WO2023143264A1
WO2023143264A1 PCT/CN2023/072668 CN2023072668W WO2023143264A1 WO 2023143264 A1 WO2023143264 A1 WO 2023143264A1 CN 2023072668 W CN2023072668 W CN 2023072668W WO 2023143264 A1 WO2023143264 A1 WO 2023143264A1
Authority
WO
WIPO (PCT)
Prior art keywords
compression
data items
data
strategy
network device
Prior art date
Application number
PCT/CN2023/072668
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 WO2023143264A1 publication Critical patent/WO2023143264A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Definitions

  • the present application relates to the field of computer networks, and more specifically, to a data compression method and device.
  • network devices such as distributed probes need to upload data to management devices such as cloud security centers.
  • management devices such as cloud security centers.
  • These data involve various aspects in the network scene, and the data volume is relatively large. Therefore, it is necessary to compress the data and transmit the compressed data, so as to reduce the bandwidth occupied by the interactive data.
  • the present application provides a data compression scheme, which uses the same compression strategy for multiple data items corresponding to multiple records, which can improve the compression rate and further reduce bandwidth occupation.
  • a data compression method is provided.
  • the method can be performed by a management device.
  • the management device receives the message from the first network device.
  • the message includes a plurality of first data items.
  • the correspondence between the plurality of first data items and the plurality of records is a one-to-one correspondence, and the plurality of first data items come from corresponding records respectively.
  • the management device determines a first compression strategy based on the plurality of first data items, and sends the first compression strategy to the first network device.
  • the management device can determine the compression strategy for the data items corresponding to multiple records, which can better reduce the redundancy between the corresponding data items, so that the compression rate is higher, which can make the compressed data occupy less space. Bandwidth saves costs.
  • the multiple first data items are compressed based on the second compression strategy, and the management device uses the second compression strategy to decompress the multiple first data items.
  • the management device can decompress the data items based on the compression policy, so that correct data items can be obtained.
  • the management device determines the second compression policy, and sends the second compression policy to the network device.
  • the management device receives the second compression strategy from the network device, and the second compression strategy is determined by the network device.
  • the management device determining the first compression policy based on the multiple first data items includes: when a condition is met, the management device determines the first compression policy based on the decompressed multiple first data items.
  • the condition includes: a time period elapsed after the management device determines the second compression policy reaches or exceeds a preset time period. In this way, the management device can periodically determine the compression policy, so as to update the compression policy.
  • the condition includes: the data types of the plurality of data items used to determine the second compression policy are different from the data types of the plurality of first data items, or the data types used to determine the second compression strategy
  • the distribution characteristics of the plurality of data items of the compression strategy are different from the distribution characteristics of the plurality of first data items.
  • the sending the first compression strategy by the management device to the first network device includes: when the first compression strategy is different from the second compression strategy, the management device sends the first compression strategy to the first network device . In this manner, when it is determined that the compression strategy changes, the re-determined compression strategy is sent to the network device, which can save signaling overhead, reduce bandwidth occupation, and reduce costs.
  • the first compression strategy includes a first compression algorithm and a first compression parameter
  • the second compression strategy includes a second compression algorithm and a second compression parameter
  • the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
  • the compression algorithm includes not only a single compression method, but also a combination of at least two different compression methods, which can achieve a greater compression ratio.
  • the management device sends the first compression strategy to the second network device, so that the second network device compresses multiple second data items based on the first compression strategy.
  • the data type of the plurality of second data items is the same as the data type of the plurality of first data items.
  • the compression strategy determined based on one network device can also be used for other network devices, avoiding resource occupation caused by separately determining the compression strategy for each network device, and thus realizing effective utilization of resources at the management device.
  • the management device may base on the data of other network devices having the same data type as the second network device. The data determines the compression strategy used by the second network device, so that the second network device can immediately compress the data based on the compression strategy to save bandwidth.
  • a data compression method is provided.
  • the method can be performed by a network device.
  • the network device sends a message to the management device, and receives the first compression policy from the management device.
  • the message includes multiple data items, and the corresponding relationship between the multiple data items and the multiple records is a one-to-one correspondence, and the multiple data items come from the corresponding records respectively.
  • a first compression strategy is determined based on a plurality of data items.
  • the network device compresses the data item using a second compression strategy, wherein the message includes the compressed data item.
  • the network device receives the second compression policy from the management device.
  • the network device determines the second compression policy, and sends the second compression policy to the management device.
  • the first compression strategy includes a first compression algorithm and a first compression parameter
  • the second compression strategy includes a second compression algorithm and a second compression parameter
  • the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
  • a data compression device in a third aspect of the present application, includes: a receiving module, a determining module and a sending module.
  • the receiving module is configured to receive messages from the first network device.
  • the message includes a plurality of first data items, the corresponding relationship between the plurality of first data items and the plurality of records is one-to-one correspondence, and the plurality of first data items come from corresponding records respectively.
  • the determining module is configured to determine a first compression strategy based on a plurality of first data items.
  • the sending module is configured to send the first compression policy to the first network device.
  • the multiple first data items are compressed based on the second compression strategy, and the device further A decompression module is included, configured to decompress the plurality of first data items using a second compression strategy.
  • the determination module is configured to: determine the first compression policy based on the decompressed plurality of first data items when the condition is met.
  • the condition includes: the elapsed time period after determining the second compression strategy reaches or exceeds a preset time period.
  • the condition includes: the data types of the multiple data items used to determine the second compression policy are different from the data types of the multiple first data items.
  • the condition includes: the distribution characteristics of the plurality of data items used to determine the second compression strategy are different from the distribution characteristics of the plurality of first data items.
  • the sending module is configured to: when the first compression strategy is different from the second compression strategy, send the first compression strategy to the first network device.
  • the first compression strategy includes a first compression algorithm and a first compression parameter
  • the second compression strategy includes a second compression algorithm and a second compression parameter
  • the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
  • the sending module is further configured to send the first compression strategy to the second network device, so that the second network device compresses the plurality of second data items based on the first compression strategy, and the plurality of first compression strategies
  • the data type of the second data item is the same as the data type of the plurality of first data items.
  • a data compression device in a fourth aspect of the present application, includes: a sending module and a receiving module.
  • the sending module is configured to send messages to the management device.
  • the message includes a plurality of data items, and the corresponding relationship between the plurality of data items and the plurality of records is one-to-one correspondence, and the plurality of data items come from corresponding records respectively.
  • the receiving module is configured to receive the first compression policy from the management device.
  • a first compression strategy is determined based on a plurality of data items.
  • the device further includes a compression module.
  • the compression module is configured to compress the data item using a second compression strategy, wherein the message includes the compressed data item.
  • the receiving module is further configured to receive the second compression policy from the management device.
  • the device further includes a determining module.
  • the determining module is configured to determine a second compression strategy.
  • the sending module is also configured to send the second compression policy to the management device.
  • the first compression strategy includes a first compression algorithm and a first compression parameter
  • the second compression strategy includes a second compression algorithm and a second compression parameter
  • the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
  • an electronic device in a fifth aspect of the present application, includes a processor and memory.
  • the memory stores instructions for execution by the processor.
  • the electronic device is made to implement the operation according to the method in the above first aspect or any implementation manner thereof, or implement the operation according to the method in the above second aspect or any implementation manner thereof.
  • a computer-readable storage medium is provided.
  • Computer-executable instructions are stored on the computer-readable storage medium.
  • the operation according to the method in the above first aspect or any implementation manner thereof may be realized, or the operation according to the method in the above second aspect or any implementation manner thereof shall be realized.
  • a chip or a chip system in a seventh aspect of the present application, includes a processing circuit configured to perform operations according to the method in the above first aspect or any implementation thereof, or implement operations according to the method in the above second aspect or any implementation thereof.
  • a computer program or computer program product is provided.
  • the computer program or computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions which, when executed, implement operations according to the method in the first aspect or any of its implementations above, Or implement the operations according to the method in the above second aspect or any implementation manner thereof.
  • FIG. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application
  • FIG. 2 shows a schematic diagram of multiple records of a network device provided by an embodiment of the present application
  • Fig. 3 shows the signaling interaction diagram of the data compression process provided by the embodiment of the present application
  • FIG. 4 shows a signaling interaction diagram of the data compression process provided by the embodiment of the present application
  • FIG. 5 shows a schematic diagram of a data packet provided by an embodiment of the present application
  • FIG. 6 shows a signaling interaction diagram of the data compression process provided by the embodiment of the present application.
  • FIG. 7 shows a schematic block diagram of a data compression device provided by an embodiment of the present application.
  • FIG. 8 shows a schematic block diagram of a data compression device provided by an embodiment of the present application.
  • Fig. 9 shows a schematic block diagram of an example device that can be used to implement the embodiments of the present application.
  • network devices such as distributed probes need to report various data, such as performance measurement data, operation logs, security event information, etc., to management devices such as cloud security centers.
  • Network devices measure and report a large amount of data, so there is a high demand for bandwidth.
  • the interaction cost between the network device and the management device is high; on the other hand, a large amount of data exchanged between the network device and the management device occupies more network resources, which may affect other services. Therefore, an effective solution is needed to compress the interaction data between devices.
  • the embodiment of the present application provides a data compression scheme, which uses the same compression strategy for the corresponding multiple data items in multiple records, and can fully consider the corresponding data items. Commonality, improve the compression rate, and thus reduce the required bandwidth and reduce costs.
  • FIG. 1 shows a schematic diagram of an application scenario 100 provided by an embodiment of the present application.
  • the application scenario 100 includes a management device 110 , a network device 121 , a network device 122 and a network device 123 .
  • the network device 121 , the network device 122 and the network device 123 may be collectively referred to as the network device 120 .
  • the "network device” in the embodiments of the present application may refer to a device that collects or measures data such as network security and network traffic in a computer network.
  • Network devices can be implemented in various forms, or network devices can also have other names, including but not limited to, gateway devices, routers, network edge devices, firewall devices, network security probe devices, network probes, network measurement devices , detection equipment, etc.
  • multiple network devices can belong to the same LAN, such as a campus network.
  • LAN such as a campus network.
  • network device 121 and network device 122 belong to the same campus network
  • network device 123 belongs to another campus network.
  • the "management device” in the embodiments of the present application may refer to a device that manages, summarizes and analyzes data such as network security and network traffic in a computer network.
  • the management device can be implemented in various forms, or the management device can also have Other titles include, but are not limited to, servers, network security servers, security cloud platforms, traffic control devices, control centers, centralized data centers, management nodes, etc.
  • the network device 120 may send data to the management device 110, for example, the data may include security logs, forensic files, traffic logs, operation logs, alarm logs, and the like.
  • various logs may be recorded text in a specific format. Multiple records can be included in various logs. Each record can correspond to a different moment. Alternatively, each record can correspond to a different source. For example, the first record is an alarm record from network interface one, and the second record is an alarm record from network interface two.
  • the network device 120 may obtain multiple records through measurement.
  • the network device 120 may measure periodically, for example, measure 150 records per second.
  • the network device 120 may periodically send the measured records to the management device 110, for example, once every second.
  • the network device 120 may send based on the number of records reaching a threshold, for example, send once every 200 records are measured. It can be understood that the network device 120 may also perform measurement and transmission based on other criteria, which will not be listed in this application.
  • the network device may also obtain multiple records in other ways.
  • the network device 121 is also connected to the network device 131 and the network device 132 (both not shown in the figure), the network device 121 can receive the data sent by the network device 131 and the network device 132, and generate multiple records based on the received data .
  • each record may correspond to a different network device.
  • the first record is a security event record from the network device 131
  • the second record is not from the security event record of the network device 132 .
  • FIG. 2 shows a schematic diagram of multiple records 200 of the network device 120 provided by the embodiment of the present application. For illustration, five records are listed in FIG. 2 , for example, one row belongs to one record.
  • each record can include multiple data items, and different data items in the same record can represent different meanings, for example, the meanings represented by multiple data items in the same record in Figure 2 are from left to right
  • metadata version metadata identifier (identifier, ID), source Internet Protocol (Internet Protocol, IP) address, destination IP address, source transmission port, destination transmission port, protocol ID, byte increase count, packet increase count, etc.
  • IP Internet Protocol
  • byte increase count packet increase count, etc.
  • each data item in the same record belongs to different data types, or optionally, some data items in the same record (such as the source IP address and destination IP address in Figure 2) belong to the same data type.
  • different records may include data items with the same meaning, for example, a column in Figure 2 indicates the same meaning. It can be understood that data items in the same column may correspond to the same field and may have the same data type.
  • the embodiment of the present application does not limit the transmission protocol between the network device 121 and the management device 110, for example, it may be a network configuration protocol (Network Configuration Protocol, NETCONF), a simple network management protocol (Simple Network Management Protocol, SNMP) , or a transmission mode determined through negotiation between the network device 121 and the management device 110 , and the like.
  • Network Configuration Protocol Network Configuration Protocol, NETCONF
  • simple network management protocol Simple Network Management Protocol
  • SNMP Simple Network Management Protocol
  • FIG. 1 Although three network devices are shown in FIG. 1 , the embodiments of the present application are not limited thereto, and in actual scenarios, more or fewer network devices may be included. As an illustration, the following embodiments mainly use the network device 121 as an example to illustrate the process of data compression. It can be understood that the embodiments of the present application are also applicable to other network devices. No more details in the text.
  • FIG. 3 shows a signaling interaction diagram of a data compression process 300 provided by an embodiment of the present application.
  • Process 300 involves management device 110 and network device 121 .
  • the network device 121 sends 310 a message to the management device 110, the message including a plurality of first data items.
  • the network device 121 may obtain multiple records through measurement, and each record includes multiple data items, for example, a first data item and a second data item.
  • the correspondence between the multiple first data items and the multiple records is a one-to-one correspondence. That is, the multiple first data items in the message respectively come from corresponding records.
  • the plurality of first data items can be understood as a column as shown in FIG. 2 . In other examples, multiple first data items may be understood as the same field in different records.
  • the message may include a plurality of uncompressed first data items.
  • the network device 121 may determine a second compression strategy, and may use the second compression strategy to compress multiple first data items.
  • the message includes a compressed plurality of first data items.
  • the second compression strategy may be determined by the network device 121 based on multiple first data items.
  • the network device 121 may also send the determined second compression policy to the management device 110 .
  • the second compression strategy may be predefined, for example, called a default compression strategy or a preset compression strategy.
  • the management device 110 may determine 302 the second compression policy, and send 304 the second compression policy to the network device 121 . Accordingly, network device 121 may compress 306 the plurality of first data items using the second compression strategy. It can be understood that the message includes a plurality of compressed first data items.
  • the management device 110 may determine the second compression strategy based on multiple previous data items, and the determination method is similar to the following method of determining the first compression strategy, which will not be repeated here.
  • the management device 110 may obtain 312 the plurality of first data items through decompression using the second compression strategy.
  • the management device 110 determines 320 a first compression strategy based on the plurality of first data items. Exemplarily, the management device 110 may determine the first compression policy based on the decompressed multiple first data items.
  • a compression strategy (such as a first compression strategy or a second compression strategy) may include a compression algorithm and a compression parameter.
  • the compression algorithm can include any of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding combined with entropy encoding, or difference encoding combined with entropy encoding the compression method.
  • the compression parameters correspond to the compression algorithms, and the compression parameters used by different compression algorithms are generally different.
  • the management device 110 may determine whether the preset condition is met, and may determine the first compression strategy when it is determined that the preset condition is met.
  • the preset condition may include that the time elapsed after the second compression policy is determined reaches or exceeds the preset time length.
  • the preset period of time may be referred to as an update period, and in this manner, the management device 110 can periodically update the compression policy.
  • the preset duration may be 1 second or other values.
  • the management device 110 may determine the first compression strategy based on multiple first data items in all or part of the messages received within the update period, so that the determined first compression strategy can be more accurate.
  • the preset condition may include that the data types of the multiple data items used to determine the second compression policy are different from the data types of the multiple first data items.
  • the data types of the plurality of data items used to determine the second compression strategy are integers (int), and the data types of the plurality of first data items are floating point types (float).
  • the management device 110 can update the compression policy when the data type changes, so that the used compression policy can be more associated with the type of the compressed data, and the compression rate can be improved.
  • the preset condition may include that the distribution characteristics of the multiple data items used to determine the second compression policy are different from multiple The distribution characteristics of the first data item.
  • the distribution characteristic of the plurality of data items used to determine the second compression strategy is sparse, that is, the number of empty data items among the plurality of data items here is large, while the distribution characteristic of the plurality of first data items is dense , that is, the number of data items that are empty among the plurality of first data items is small, wherein the large number may be greater than the first ratio threshold (such as 60%), and the small number may be smaller than the second ratio threshold (such as 20%) %), the second ratio threshold is less than or equal to the first ratio threshold.
  • the management device 110 can update the compression strategy when the distribution characteristics of the data change, so that the used compression strategy can be more associated with the distribution characteristics of the compressed data, and the compression rate can be improved.
  • the management device 110 may determine the first compression strategy based on data types, distribution characteristics, and the like of the multiple first data items. For example, the plurality of first data items are character strings and are distributed densely.
  • the first compression strategy includes a dictionary encoding compression manner.
  • the management device 110 may construct a neural network model to determine compression parameters of the first compression strategy, such as a dictionary.
  • the management device 110 sends 330 the first compression policy to the network device 121 .
  • the management device 110 sends the first compression policy. In this way, repeated sending of the same compression strategy can be avoided, resulting in waste of transmission resources.
  • the first compression strategy includes a first compression algorithm and first compression parameters
  • the second compression strategy includes a second compression algorithm and second compression parameters.
  • the difference between the first compression strategy and the second compression strategy may include that the first compression algorithm is different from the second compression algorithm, or may include that the first compression algorithm is the same as the second compression algorithm but that the first compression parameters are different from the second compression parameters, or It may include that the first compression algorithm is different from the second compression algorithm and that the first compression parameters are different from the second compression parameters.
  • the network device 121 can use the first compression strategy to compress subsequent data items, so that a greater compression rate can be achieved based on the characteristics of the data items in the case of lossless compression.
  • the first compression strategy can be determined by the management device 110 , so that the network device 121 can compress data items using the first compression strategy determined by the management device 110 .
  • This solution can make full use of the powerful processing capability of the management device 110, and use the same compression strategy for multiple data items of the same data type or multiple data items with the same distribution characteristics, which can improve the compression rate and reduce bandwidth occupation.
  • FIG. 4 shows a signaling interaction diagram of a data compression process 400 provided by an embodiment of the present application.
  • Process 400 involves management device 110 and network device 121 .
  • the network device 121 obtains more than 410 records through measurement.
  • the multiple records are N1 records, and N1 is a positive integer.
  • N1 is 25 or 200 or other values, which is not limited in the present application.
  • Each record can include multiple data items, each representing a different meaning.
  • multiple records may be represented in the form of a list, including rows and columns as shown in FIG. 2 , where a row represents one record, and the same column represents the same meaning.
  • the plurality of records may be obtained through measurements after the last message sent by the network device 121 . In some embodiments, the plurality of records may be measured by the network device 121 after startup and before sending a message.
  • the network device 121 sends 420 a first message to the management device 110, the first message including a plurality of records.
  • the management device 110 may receive the first message from the network device 121 .
  • the embodiment of the present application does not limit the specific format of the message sent by the network device 121 to the management device 110, for example, it may be a log (log) file, for example, it may be in csv format.
  • the network device 121 sends the first message to the management device 110 at time t0.
  • the network device 121 may send the uncompressed multiple records to the management device 110 through the first message.
  • the network device 121 may send an uncompressed first message when sending for the first time when it is just started.
  • a serialized data stream may be formed based on multiple records and sent to the management device 110 .
  • the network device 121 may use a pre-configured compression policy to form the first message by compressing multiple records.
  • the network device 121 uses a pre-configured compression strategy when sending for the first time when it is just started.
  • the pre-configured compression strategy may be pre-determined through negotiation between the network device 121 and the management device 110, or may be configured by the management device 110 to the network device 121, or may be based on a communication protocol between the network device 121 and the management device 110. Defined.
  • the compression algorithm included in the pre-configured compression policy may be, for example, static dictionary encoding or the like.
  • the compression parameters included in the pre-configured compression strategy are, for example, dictionaries.
  • the preconfigured compression strategy may also be called a general compression strategy or other names, which is not limited in this application.
  • the network device 121 may use the first compression strategy to form the first message by compressing multiple records.
  • the first compression policy may be the latest received by the network device 121 from the management device 110 before sending the first message.
  • the network device 121 receives the first compression policy from the management device 110 before sending for the first time at startup.
  • the network device 121 receives the first compression policy from the management device 110 after sending a message last time.
  • the network device 121 used the first compression strategy when sending a message last time.
  • the first message may also include an identifier of the first compression policy, such as a version number, a time stamp, and the like.
  • the first message is the first message about measured data that the network device 121 sends to the management device 110 after startup, then the first message includes uncompressed multiple records, or the first message includes a plurality of records compressed using a pre-configured compression strategy, or the first message includes a plurality of records compressed using a first compression strategy received after startup.
  • the network device 121 can periodically send a message to the management device 110, assuming that the sending period is dt, then it can be understood that the network device 121 can send a message to the management device 110 at t0+dt, t0+2*dt, ... , for example dt is equal to 1 second or some other value.
  • the management device 110 determines 430 a second compression strategy based at least on the first message, the second compression strategy comprising at least one compression algorithm.
  • the management device 110 may receive the After the first message after the network device 121 is powered on, the second compression policy is determined based on the first message.
  • the compression strategy may be determined periodically.
  • the second compression strategy may be determined based on messages (including the first message) received between time t0 and time t0+T.
  • the management device 110 may determine the compression strategy based on the period T.
  • the management device 110 may determine multiple records based on the first message, and determine the second compression policy based at least on the multiple records.
  • the first message includes multiple uncompressed records, then the management device 110 can read the multiple records in the first message.
  • the first message includes the plurality of records compressed, for example using a pre-configured compression strategy or a first compression strategy. Then the management device 110 can use the corresponding compression strategy to perform decompression to obtain multiple records.
  • each of the multiple records includes multiple data items, and different data items in the same record may represent different meanings. It may be assumed that the first message comprises N1 records, and eg each record comprises M1 data items.
  • the management device 110 may determine the second compression policy based on multiple messages (including the first message) received within the period T. For example, assuming that the number of multiple messages is K1, then K1*N1 records can optionally be determined based on the multiple messages.
  • the management device 110 may determine the second compression policy based on the N records.
  • the N records are N1 records in the first message, or the N records may be a collection of multiple records in multiple messages.
  • N records are represented as shown in Figure 2, that is, one record can be represented as one row, different rows belong to different records, and data items with the same meaning in different records can be set to In the same column, different columns represent different meanings.
  • the following describes an embodiment of determining a second compression policy in conjunction with multiple records as shown in FIG. 2 , but it should be understood that the embodiment of the present application may also be applied to other forms of records, which will not be listed here.
  • the management device 110 may divide the column data of N records into multiple groups based on the attributes of the data items in each column.
  • the attributes of a data item may include, but are not limited to: data type, sparseness of data distribution, range of values, and the like.
  • the data type may include an integer type (int), a floating point type (float), a character string (string), and the like.
  • the degree of sparseness of the data distribution can be determined based on whether there is a corresponding record that is NULL in the column, or the number of consecutive NULL records, and the like.
  • the range of the numerical value can be the difference between the maximum value and the minimum value of the value in the column, the difference between the maximum value and the minimum value of the absolute value of the value, etc.
  • FIG. 5 shows a simplified diagram of multiple records 500.
  • one row represents one record, and each record includes multiple columns: column A, column B, column C, . . . .
  • the data types of the data items in column A, column B, and column E are character strings
  • column A, column B, and column E can be divided into the same group, such as group 510 .
  • the data types of the data items in column C, column G and column H are integer, and the distribution of values is dense, then column C, column G and column H can be divided into the same group, such as group 520 .
  • the data types of the data items in column D and column F are integer, and the distribution of values is sparse, then column D and column F can be divided into the same group, such as group 530 .
  • the management device 110 may perform cluster analysis on the data items in each column, statistically learn the correlation between the columns, and divide the multiple columns into multiple groups based on the correlation.
  • the cluster analysis may adopt an unsupervised learning method, a supervised classification method, or a predefined classification method, etc., which is not limited in the present application. It can be understood that only one column may be included in a certain group, or multiple columns may be included in a certain group.
  • the management device 110 determines corresponding compression algorithms for each group. Accordingly, the compression parameters used by the compression algorithm can be determined.
  • the compression algorithm may include but not limited to: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and entropy encoding combined compression, or difference encoding Compression combined with entropy coding.
  • the first compression algorithm is determined for group 510
  • the second compression algorithm is determined for group 520
  • the third compression algorithm is determined for group 530, wherein the first compression algorithm, the second compression algorithm, the third Any two of the compression algorithms may be the same or different.
  • the first compression algorithm is a combination of dictionary coding and entropy coding
  • the second compression algorithm is a compression method of difference coding and entropy coding
  • the third compression algorithm is a run-length coding compression method.
  • the management device 110 may also determine compression parameters used by each compression algorithm.
  • the entropy coding table used in the entropy coding compression method can be determined, for example, the dictionary used in the dictionary coding compression method can be determined, for example, it can be determined Define the difference upper limit threshold used by the difference encoding compression method, and so on.
  • the entropy encoding table corresponding to the group 510 can be determined based on the occurrence probability of each character string in each column in the group 510 (ie, column A, column B, and column E).
  • the entropy encoding table corresponding to the group 520 can be determined based on the distribution probability of each number in each column of the group 520 (ie, column C, column G, and column H), etc.
  • the dictionary corresponding to the group 510 can be determined based on the frequency of occurrence of each character string in each column (i.e., column A, column B, and column E) in the group 510, for example, a neural network model (such as a stateful deep network model) can be used to determine Extract the high-frequency strings (also known as words in the dictionary) of the data items in each column to create different dictionaries for each column.
  • a neural network model such as a stateful deep network model
  • the neural network model used to extract high-frequency words may be obtained by multiple network devices 120 through federated learning and other methods. In this way, the strong computing capability of the management device 110 can be fully utilized, and the dictionary can be determined by the management device 110 , avoiding the waste of time and storage space resources caused by the network device 121 searching for matching algorithms.
  • the management device 110 may respectively construct a neural network model for each group, and determine a compression algorithm based on the constructed neural network model.
  • the neural network model in the embodiment of the present application may be obtained by the management device 110 instructing multiple network devices 120 through federated learning, incremental learning, migration learning, etc., so that more measurement data can be considered comprehensively, The speed of model construction is improved, and the difference in measurement data of each network device 120 can be fully considered, so that the obtained neural network model can be made more accurate.
  • the management device 110 can determine the compression strategy at the granularity of the columns.
  • the run-length encoding compression method can be used for sparsely distributed columns, and the compression method combining difference coding and entropy coding can be used for columns with frequent numerical changes.
  • Columns of string type can be compressed by combining dictionary encoding (such as static dictionary encoding and sliding window dictionary encoding) with entropy encoding, and so on. Compared with taking records (rows) as the granularity, it is possible to determine the corresponding compression strategy for the same type of data, thereby compressing the redundancy in the column direction and improving the compression rate.
  • the static dictionary encoding can adjust the compression effect by changing the size of the static dictionary, the arrangement order of high-frequency words in the dictionary, and the like.
  • the sliding window dictionary encoding can adjust the compression effect by changing the size of the sliding window. It should be noted that although some possible compression algorithms are listed above, the present application does not limit them. For example, compression algorithms may also include Huffman coding, arithmetic coding, interval coding, and the like. Exemplarily, the Huffman coding can construct a Huffman tree according to the frequency of symbols, and adjust the compression effect by rebuilding the Huffman tree.
  • the arithmetic coding can calculate the probability of the symbol string according to the probability of the symbol occurrence, obtain a parameter greater than 0 and less than 1, and recalculate the probability of the symbol string according to the probability of the symbol occurrence to adjust the compression effect.
  • Interval encoding can map a symbol string to a small interval in a large interval value according to the probability of symbol occurrence, and recalculate the symbol string probability according to the probability of symbol occurrence to adjust the compression effect.
  • various compression algorithms reference may be made to existing technologies, which will not be listed one by one in this application.
  • the management device 110 sends 440 the second compression policy to the network device 121 .
  • the management device 110 may also send the identifier of the second compression policy to the network device 121, such as the version number of the second compression policy, a timestamp, or a sequence obtained by scrambling the timestamp through a predefined hash sequence wait.
  • the second compression policy is sent.
  • the time-consuming time for the management device 110 to determine the second compression strategy can be ignored, and it can be assumed that the management device 110 determines and sends the second compression strategy almost simultaneously, For example, assume time t1.
  • the version number of the second compression policy is V1
  • the time stamp is t1.
  • the second compression strategy may include at least one compression algorithm.
  • the second compression strategy may include grouping methods and corresponding compression algorithms for each group, as shown in Table 1 below.
  • the network device 121 may receive the second compression policy from the management device 110 at time t1.
  • the network device 121 may use the second compression policy to compress 450 the data, and send 460 the second message to the management device 110 .
  • the management device 110 receives the second message from the network device 121 .
  • the network device 121 may divide the multi-column data items into multiple groups according to the second compression strategy, and perform compression using a corresponding compression algorithm for each group.
  • the second message may further include an identifier of the second compression policy (such as a version number V1), so that the management device 110 determines how to decompress.
  • an identifier of the second compression policy such as a version number V1
  • the network device 121 fails to receive the second compression policy sent by the management device 110 at time t1, then the message sent by the network device 121 to the management device 110 after time t1 is different from the first message sent by the aforementioned process 420 Similarly, to avoid repetition, details will not be repeated here.
  • the management device 110 after sending the second compression strategy, if it finds that the network device 121 does not use the second compression strategy for compression, it may resend the second compression strategy to the network device 121 after a retransmission time period. For example, assuming that the retransmission duration is T0, the second compression strategy may be retransmitted at time t1+T0.
  • the maximum number of retransmissions can be preset, such as nr, then after t1+nr*T0, even if the network device 121 still has not received the second compression policy, the management device 110 will not retransmit the second compression policy. Compression strategy.
  • the management device 110 may decompress 470 the second message based on the second compression policy.
  • the management device 110 determines 480 a third compression policy.
  • the management device 110 may determine whether the preset condition is met, and may determine the third compression strategy when it is determined that the preset condition is met. In this way, it is possible to update the compression strategy, specifically to update the second compression strategy to the third compression strategy, so as to better adapt to changes in the data measured by the network device 121 .
  • the preset time length (that is, T) may be referred to as a policy update period. In this way, the compression policy can be updated periodically, so that it can be ensured that the used compression policy corresponds to the data policyd by the network device 121 , and lossless compression of data can be realized.
  • the preset condition may include: the data type and/or distribution feature of each column of data items in the message from the network device 121 changes.
  • the data items in column D are of sparsely distributed integer type, if after time t0, the data items in column D become densely distributed and their values change more frequently.
  • the third compression strategy can be re-determined based on this. For example, if the data types and distribution characteristics of the data items in the remaining columns are basically unchanged, you can determine to regroup, divide column A, column B, and column E into one group, and divide column C, column D, column G, and column H is divided into one group, column F is divided into one group; and then the compression algorithm can be determined separately for each group. In this way, the compression strategy can be updated based on the change of the data item, so that the online serialization compression of the measured data by the network device 121 can guarantee performance and realize lossless compression.
  • the management device 110 determines the third compression policy
  • the management device 110 sends 490 the third compression policy to the network device 121 .
  • the management device 110 may also send the identifier of the third compression policy to the network device 121, such as the version number and time stamp of the third compression policy.
  • the version number of the third compression policy is V2
  • the time stamp is t2.
  • the transmission delay between the network device 121 and the management device 110 is not considered in the above embodiments, but in actual scenarios, there is a transmission delay between the two, for example, ⁇ t.
  • the network device 121 sends the first message at time t0, and accordingly the management device 110 receives the first message at time t0+ ⁇ t.
  • the transmission delays of other information between the network device 121 and the management device 110 are similar, and will not be described in detail here.
  • the management device 110 may respectively determine the compression policy of each network device. In this way, management device 110 is able to determine compression policies for individual network devices 120 .
  • the management device 110 can obtain local (for example, at the granularity of the campus LAN) or global (for example, all network devices 120 interacting with the management device 110) statistical information of the compression policy, for example, the compression policy of each version, determine the compression policy The neural network model used, the history of the compression strategy being used, etc.
  • management device 110 may send a compressed Strategy. For example, if the network device 122 starts between time t1 and t2, and the network device 122 and the network device 121 belong to the same local area network, the management device 110 can set the latest compression policy for the network device 121 (as mentioned above at time t1 to The determined second compression strategy) is sent to the network device 122.
  • the management device 110 may determine the correlation between the network device 122 and the network device 121, and when the correlation is greater than a correlation coefficient threshold (such as 80% or other values), the second compression strategy determined for the network device 121 sent to the network device 122, wherein the correlation may be determined based on device attributes, which may include but not limited to the IP address of the device, the physical address of the device, the historical data of the device, the type of the device, and the like.
  • a correlation coefficient threshold such as 80% or other values
  • the management device 110 may send the compression policy with the longest historical usage time to the network device 122 based on the statistical information. For example, the management device 110 may send the compression policy with the highest compression ratio to the network device 122 . In this way, a newly started network device (such as the network device 122 ) can perform data compression based on the instruction of the management device 110 , avoiding large bandwidth occupation caused by uncompressed data.
  • the management device in the embodiment of the present application determines the compression strategy based on the multiple data items corresponding to the multiple records, and the corresponding multiple data items have the same data type or the same distribution characteristics. Therefore, the management device is more able to Consider the redundancy between data items of the same data type or data items of the same distribution characteristics, so as to make the compression rate higher, which can make the compressed data occupy less bandwidth and save costs. Moreover, the management device can update the compression strategy based on the update period or based on the change of the data item, so as to ensure that the used compression strategy corresponds to the data item and ensure the lossless compression of the data.
  • Fig. 6 shows a signaling interaction diagram of a data compression process 600 according to some embodiments of the present application.
  • Process 600 involves management device 110 and network device 121 .
  • the network device 121 obtains more than 610 records through measurement.
  • the number of records is N1 records.
  • multiple records refer to the aforementioned process 410 in conjunction with FIG. 4 and the related description in conjunction with FIG. 2.
  • multiple records can be represented as multiple columns, and multiple data items in each column can have the same data type. For brevity, I won't go into details here.
  • the network device 121 determines 620 a first compression policy based on the plurality of records.
  • the first compression strategy may include a first compression algorithm method and the first compression parameter.
  • the network device 121 may divide multiple records into multiple groups at column granularity, and each group may include one or more columns. For each of the multiple groups, the network device 121 may separately determine a compression algorithm, for example, different groups may use different compression algorithms and/or compression parameters.
  • the process for the network device 121 to determine the first compression policy is similar to the process 430 for the management device 110 to determine the second compression policy described above in conjunction with FIG. Do not repeat.
  • the network device 121 compresses the plurality of records using a first compression strategy to generate 630 a first message.
  • the first message may include multiple compressed records, and the multiple records are compressed at the column granularity, that is, the same column in the multiple records is compressed using the same compression algorithm and compression parameters.
  • the network device 121 sends 642 the first message to the management device 110 .
  • the network device 121 sends 644 the first compression policy to the management device 110 .
  • the first message and the first compression policy may be carried in the same signaling and sent, or may be sent separately, which is not limited in this application.
  • the sent first compression policy may also include an identifier of the first compression policy, such as a version number, a time stamp, and the like.
  • the management device 110 uses the first compression policy to decompress 650 the first message to obtain multiple records.
  • the network device 121 may continue to perform data measurement, perform compression using the first compression strategy, and further send the compressed record to the management device 110 .
  • the network device 121 may perform sending according to a reporting period.
  • each sending may carry the identifier of the first compression policy used, so that the management device 110 can decompress successfully and correctly.
  • the network device 121 may determine 660 a second compression policy.
  • the network device 121 may determine the second compression strategy when it is determined that the preset condition is met.
  • the preset condition may be that the update duration is reached or exceeded, for example, the time elapsed after the first compression strategy is determined reaches or exceeds the update duration. That is to say, the network device 121 may periodically update the compression policy according to the update period.
  • the preset condition may be that the data type or distribution characteristics of the data items in the record have changed. For example, in multiple consecutive reporting periods, the data type or distribution feature of one or more columns of data items changes. That is, network device 121 may update the compression policy based on changes in characteristics of data items.
  • the network device 121 may determine the second compression policy based on each column of data items in multiple records in multiple reporting periods. For example, the second compression strategy may be determined based on the column data items in all or part of the records within the update duration after the first compression strategy is determined. It can be understood that the process of determining the second compression strategy is similar to the aforementioned process of determining the first compression strategy, and will not be described in detail here.
  • the network device 121 may use the second compression strategy to compress the records obtained by the subsequent measurement, and send the records to the management device 110 .
  • the network device 121 may also send the second compression policy to the management device 110, so that the management device 110 can successfully decompress.
  • the network device 121 can determine the compression strategy based on the same type of data items, so that a more accurate compression strategy can be obtained, so that the compression rate is greater, and thus bandwidth occupation can be reduced.
  • the above embodiments are described in conjunction with FIG. 4 and FIG. 6 in which the compression strategy is determined by the management device 110 and the compression strategy is determined by the network device 121, the above embodiments are not independent of each other, and they can also be Combine to get other examples.
  • the management device 110 may also send the The first compression policy or the second compression policy is sent to another network device 122 and so on.
  • the embodiments of the present application do not list various combinations.
  • Fig. 7 shows a schematic block diagram of an apparatus 700 provided by an embodiment of the present application.
  • Apparatus 700 may be implemented by software, hardware or a combination of both.
  • the apparatus 700 may be implemented as the management device 110 shown in FIG. 1 or as a chip in the management device 110 .
  • the apparatus 700 includes a receiving module 710 , a determining module 720 and a sending module 730 .
  • the device 700 may further include a decompression module 740 .
  • the receiving module 710 is configured to receive a message from the first network device, the message includes a plurality of first data items, the correspondence relationship between the plurality of first data items and the plurality of records is one-to-one correspondence, and the plurality of first data items are from to the corresponding record.
  • the determining module 720 is configured to determine a first compression strategy based on the plurality of first data items.
  • the sending module 730 is configured to send the first compression policy to the first network device.
  • the plurality of first data items are compressed based on a second compression strategy.
  • the decompression module 740 may be configured to decompress the plurality of first data items using a second compression strategy.
  • the determining module 720 may be configured to determine a first compression policy based on the decompressed multiple first data items when a condition is met.
  • the condition includes that the time elapsed after the second compression strategy is determined reaches or exceeds a preset time length.
  • the condition includes that the data types of the plurality of data items used to determine the second compression policy are different from the data types of the plurality of first data items.
  • the condition includes that the distribution characteristics of the plurality of data items used to determine the second compression policy are different from the distribution characteristics of the plurality of first data items.
  • the sending module 730 may be configured to send the first compression strategy to the first network device when the first compression strategy is different from the second compression strategy.
  • the first compression strategy includes a first compression algorithm and first compression parameters
  • the second compression strategy includes a second compression algorithm and second compression parameters.
  • the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary coding compression, difference coding compression, run-length coding compression, entropy coding compression, dictionary coding and entropy coding combined compression, or difference coding Compression combined with entropy coding.
  • the sending module 730 may also be configured to send the first compression strategy to the second network device, so that the second network device compresses multiple second data items based on the first compression strategy.
  • the data type of the plurality of second data items is the same as the data type of the plurality of first data items.
  • the apparatus 700 in FIG. 7 can be used to implement the processes described above in conjunction with the management device 110 in FIG. 3 to FIG. 6 , and details are not repeated here for the sake of brevity.
  • Fig. 8 shows a schematic block diagram of an apparatus 800 according to some embodiments of the present application.
  • Apparatus 800 may be implemented by software, hardware or a combination of both.
  • the apparatus 800 may be implemented as the network device 120 shown in FIG. 1 or as a chip in the network device 120 .
  • the device 800 includes a sending module 810 and a receiving module 820 .
  • the apparatus 800 may further include a compression module 830 and/or a determination module 840 .
  • the sending module 810 is configured to send a message to the management device, the message includes multiple data items, and the correspondence between the multiple data items and the multiple records is a one-to-one correspondence, and the multiple data items come from corresponding records.
  • the receiving module 820 is configured to receive a first compression strategy from the management device, the first compression strategy is determined based on a plurality of data items.
  • the apparatus 800 also includes a compression module 830 .
  • the compression module 830 is configured to compress the data item using a second compression strategy, wherein the message includes the compressed data item.
  • the receiving module 820 is further configured to receive the second compression policy from the management device.
  • the determining module 840 may be configured to determine the second compression policy
  • the sending module 810 is further configured to send the second compression policy to the management device.
  • the first compression strategy includes a first compression algorithm and first compression parameters
  • the second compression strategy includes a second compression algorithm and second compression parameters.
  • the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary coding compression, difference coding compression, run-length coding compression, entropy coding compression, dictionary coding and entropy coding combined compression, or difference coding Compression combined with entropy coding.
  • the apparatus 800 in FIG. 8 can be used to implement the various processes described above in conjunction with the network device 120 (including the network device 121 ) in FIGS. 3 to 6 , and details are not repeated here for brevity.
  • each functional unit in the disclosed embodiments can be integrated In one unit, it may exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • Fig. 9 shows a schematic block diagram of an example device 900 that may be used to implement embodiments of the present application.
  • the device 900 may be implemented as or included in the management device 110 or the network device 120 shown in FIG. 1 .
  • the device 900 includes a central processing unit (Central Processing Unit, CPU) 901, a read-only memory (Read-Only Memory, ROM) 902, and a random access memory (Random Access Memory, RAM) 903.
  • the CPU 901 can perform various appropriate actions and processes according to computer program instructions stored in the ROM 902 and/or RAM 903 or loaded from the storage unit 908 into the ROM 902 and/or RAM 903.
  • various programs and data necessary for the operation of the device 900 can also be stored.
  • the CPU 901 and the ROM 902 and/or RAM 903 are connected to each other via a bus 904.
  • An input/output (Input/Output, I/O) interface 905 is also connected to the bus 904 .
  • the I/O interface 905 includes: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc. ; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, and the like.
  • the communication unit 909 allows the device 900 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
  • CPU 901 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples that can be implemented include but are not limited to Graphics Processing Unit (Graphics Processing Unit, GPU), various dedicated artificial intelligence (Artificial Intelligence, AI) computing chips, various computing units that run machine learning model algorithms, digital signal Processor (Digital Signal Processor, DSP), and any appropriate processor, controller, microcontroller, etc., relative Accordingly, it can be called a computing unit.
  • the CPU 901 executes the various methods and processes described above. For example, in some embodiments, the processes described above may be implemented as a computer software program tangibly embodied on a computer-readable medium, such as storage unit 908 .
  • part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or RAM 903 and/or the communication unit 909 .
  • a computer program When a computer program is loaded into ROM 902 and/or RAM 903 and executed by CPU 901, one or more steps of the process described above may be performed.
  • the CPU 901 may be configured in any other suitable manner (for example, by means of firmware) to execute the processes described above.
  • the device 900 in FIG. 9 may be implemented as a computing device, or may be implemented as a chip or a chip system in the computing device, which is not limited by the embodiments of the present application.
  • Embodiments of the present application also provide a chip, which may include an input interface, an output interface, and a processing circuit.
  • a chip which may include an input interface, an output interface, and a processing circuit.
  • the interaction of signaling or data may be completed by the input interface and the output interface, and the generation and processing of signaling or data information may be completed by the processing circuit.
  • Embodiments of the present application also provide a chip system, including a processor, configured to support a computing device to implement the functions involved in any of the foregoing embodiments.
  • the system-on-a-chip may further include a memory for storing necessary program instructions and data, and when the processor runs the program instructions, the device installed with the system-on-a-chip can implement the program described in any of the above-mentioned embodiments.
  • the chip system may consist of one or more chips, and may also include chips and other discrete devices.
  • Embodiments of the present application further provide a processor, configured to be coupled with a memory, where instructions are stored in the memory, and when the processor executes the instructions, the processor executes the methods and functions involved in any of the foregoing embodiments.
  • Embodiments of the present application also provide a computer program product including instructions, which, when run on a computer, enable the computer to execute the methods and functions involved in any one of the above embodiments.
  • Embodiments of the present application also provide a computer-readable storage medium, on which computer instructions are stored, and when a processor executes the instructions, the processor is made to execute the methods and functions involved in any of the above embodiments.
  • the various embodiments of the present application may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software, which may be executed by a controller, microprocessor or other computing device. While various aspects of the embodiments of the present application are shown and described as block diagrams, flowcharts, or using some other pictorial representation, it should be understood that the blocks, devices, systems, techniques or methods described herein may be implemented as, without limitation, Exemplary, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof.
  • the present application also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium.
  • the computer program product comprises computer-executable instructions, eg included in program modules, which are executed in a device on a real or virtual processor of a target to perform the process/method as above with reference to the accompanying drawings.
  • program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • the functionality of the program modules may be combined or divided as desired among the program modules.
  • Machine-executable instructions for program modules may be executed within local or distributed devices. In a distributed device, program modules may be located in both local and remote storage media.
  • Computer program codes for implementing the methods of the present application may be written in one or more programming languages. These computer program codes can be provided to processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, so that when the program codes are executed by the computer or other programmable data processing devices, The functions/operations specified in are implemented.
  • the program code may reside entirely on the computer, partly on the computer, as a stand-alone software package, Execute partly on the computer and partly on the remote computer or entirely on the remote computer or server.
  • computer program code or related data may be carried by any suitable carrier, so that a device, apparatus or processor can perform the various processes and operations described above.
  • suitable carriers include signals, computer readable media, and the like.
  • signals may include electrical, optical, radio, sound, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
  • a computer readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device.
  • the computer readable medium may be a computer readable signal medium or a computer readable storage medium.
  • a computer readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of computer-readable storage media include electrical connections with one or more wires, portable computer diskettes, hard disks, random storage access memory (RAM), read-only memory (ROM), erasable programmable read-only Memory (Erasable Programmable Read-Only Memory, EPROM) or flash memory, optical storage device, magnetic storage device, or any suitable combination thereof.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a data compression method and apparatus. The method comprises: a management device receives a message from a first network device, the message comprising a plurality of first data items, the plurality of first data items having a one-to-one correspondence with on a plurality of records, and the plurality of first data items being respectively from the corresponding records; the management device determines a first compression policy on the basis of the plurality of first data items; and the management device sends the first compression policy to the first network device. In this way, in the embodiments of the present application, the management device can determine a compression policy for the data items corresponding to the plurality of records, and can better consider the redundancy among the plurality of data items corresponding thereto, so that the compression rate can be high, compressed data can occupy less bandwidth, and costs can be saved.

Description

数据压缩方法及装置Data compression method and device
本申请要求于2022年1月30日提交中国专利局,申请号为202210113903.5,发明名称为“数据压缩方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202210113903.5 and the title of the invention "Data Compression Method and Device" filed with the China Patent Office on January 30, 2022, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及计算机网络领域,更具体地,涉及一种数据压缩方法及装置。The present application relates to the field of computer networks, and more specifically, to a data compression method and device.
背景技术Background technique
在通信网络中,诸如分布式探针之类的网络设备需要向诸如云安全中心之类的管理设备上传数据。这些数据涉及网络场景中的各个方面,数据量较大。因此,需要将这些数据进行压缩处理,并传输压缩之后的数据,以降低交互数据对带宽的占用。In a communication network, network devices such as distributed probes need to upload data to management devices such as cloud security centers. These data involve various aspects in the network scene, and the data volume is relatively large. Therefore, it is necessary to compress the data and transmit the compressed data, so as to reduce the bandwidth occupied by the interactive data.
发明内容Contents of the invention
本申请提供了一种数据压缩的方案,针对多条记录对应的多个数据项使用相同的压缩策略,能够提升压缩率,进而减小带宽占用。The present application provides a data compression scheme, which uses the same compression strategy for multiple data items corresponding to multiple records, which can improve the compression rate and further reduce bandwidth occupation.
在本申请的第一方面,提供了一种数据压缩方法。该方法可以由管理设备执行。管理设备接收来自第一网络设备的消息。消息包括多个第一数据项。多个第一数据项与多条记录的对应关系为一一对应,多个第一数据项分别来自于对应的记录。管理设备基于多个第一数据项确定第一压缩策略,并向第一网络设备发送第一压缩策略。In a first aspect of the present application, a data compression method is provided. The method can be performed by a management device. The management device receives the message from the first network device. The message includes a plurality of first data items. The correspondence between the plurality of first data items and the plurality of records is a one-to-one correspondence, and the plurality of first data items come from corresponding records respectively. The management device determines a first compression strategy based on the plurality of first data items, and sends the first compression strategy to the first network device.
以此方式,管理设备能够针对多条记录对应的数据项来确定压缩策略,更能够对应的数据项之间的冗余,从而使得压缩率更高,这样能够使得压缩后的数据占用较小的带宽,节省成本。In this way, the management device can determine the compression strategy for the data items corresponding to multiple records, which can better reduce the redundancy between the corresponding data items, so that the compression rate is higher, which can make the compressed data occupy less space. Bandwidth saves costs.
在第一方面的一种实施方式中,多个第一数据项是基于第二压缩策略被压缩的,管理设备使用第二压缩策略对多个第一数据项进行解压。In an implementation manner of the first aspect, the multiple first data items are compressed based on the second compression strategy, and the management device uses the second compression strategy to decompress the multiple first data items.
以此方式,管理设备可以基于压缩策略对数据项进行解压,从而能够得到正确的数据项。In this way, the management device can decompress the data items based on the compression policy, so that correct data items can be obtained.
在第一方面的一种实施方式中,管理设备确定第二压缩策略,并向网络设备发送第二压缩策略。In an implementation manner of the first aspect, the management device determines the second compression policy, and sends the second compression policy to the network device.
在第一方面的一种实施方式中,管理设备接收来自网络设备的第二压缩策略,该第二压缩策略由网络设备确定。In an implementation manner of the first aspect, the management device receives the second compression strategy from the network device, and the second compression strategy is determined by the network device.
在第一方面的一种实施方式中,管理设备基于多个第一数据项确定第一压缩策略包括:当满足条件时,管理设备基于经解压的多个第一数据项确定第一压缩策略。In an implementation manner of the first aspect, the management device determining the first compression policy based on the multiple first data items includes: when a condition is met, the management device determines the first compression policy based on the decompressed multiple first data items.
在第一方面的一种实施方式中,条件包括:管理设备在确定第二压缩策略后所经过的时长达到或超过预设时长。以此方式,管理设备能够周期性地确定压缩策略,以实现对压缩策略的更新。In an implementation manner of the first aspect, the condition includes: a time period elapsed after the management device determines the second compression policy reaches or exceeds a preset time period. In this way, the management device can periodically determine the compression policy, so as to update the compression policy.
在第一方面的一种实施方式中,条件包括:用于确定第二压缩策略的多个数据项的数据类型与所述多个第一数据项的数据类型不同,或者,用于确定第二压缩策略的多个数据项的分布特征和多个第一数据项的分布特征不同。以此方式,管理设备能够在数据项的类型或分布特征发生变化时更新压缩策略,从而使得所使用的压缩策略能够适应于数据项的类型或分布特征,实现更大的压缩率。 In an implementation manner of the first aspect, the condition includes: the data types of the plurality of data items used to determine the second compression policy are different from the data types of the plurality of first data items, or the data types used to determine the second compression strategy The distribution characteristics of the plurality of data items of the compression strategy are different from the distribution characteristics of the plurality of first data items. In this way, the management device can update the compression strategy when the type or distribution characteristic of the data item changes, so that the used compression strategy can be adapted to the type or distribution characteristic of the data item, achieving a greater compression rate.
在第一方面的一种实施方式中,管理设备向第一网络设备发送第一压缩策略包括:当第一压缩策略与第二压缩策略不同时,管理设备向第一网络设备发送第一压缩策略。以此方式,在确定压缩策略发生变化时,再将重新确定的压缩策略发送到网络设备,这样能够节省信令开销,减小带宽的占用,降低成本。In an implementation manner of the first aspect, the sending the first compression strategy by the management device to the first network device includes: when the first compression strategy is different from the second compression strategy, the management device sends the first compression strategy to the first network device . In this manner, when it is determined that the compression strategy changes, the re-determined compression strategy is sent to the network device, which can save signaling overhead, reduce bandwidth occupation, and reduce costs.
在第一方面的一种实施方式中,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。In an implementation manner of the first aspect, the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second compression parameter.
在第一方面的一种实施方式中,第一压缩算法或第二压缩算法包括以下至少一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。In an implementation manner of the first aspect, the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
以此方式,压缩算法不仅包括单个压缩方式,还可以包括至少两个不同压缩方式的结合,这样能够实现更大的压缩率。In this way, the compression algorithm includes not only a single compression method, but also a combination of at least two different compression methods, which can achieve a greater compression ratio.
在第一方面的一种实施方式中,管理设备向第二网络设备发送第一压缩策略,以使得第二网络设备基于第一压缩策略压缩多个第二数据项。多个第二数据项的数据类型与多个第一数据项的数据类型相同。In an implementation manner of the first aspect, the management device sends the first compression strategy to the second network device, so that the second network device compresses multiple second data items based on the first compression strategy. The data type of the plurality of second data items is the same as the data type of the plurality of first data items.
以此方式,基于一个网络设备所确定的压缩策略还能够被用于其他的网络设备,避免针对每个网络设备分别确定压缩策略导致的资源占用,这样能够实现管理设备处的资源有效利用。以此方式,当管理设备处还未收集到第二网络设备的数据或未收集到足够的第二网络设备的数据时,管理设备可以基于与第二网络设备具有相同数据类型的其他网络设备的数据确定第二网络设备使用的压缩策略,以使得第二网络设备可以立即基于该压缩策略压缩数据,节省带宽。In this way, the compression strategy determined based on one network device can also be used for other network devices, avoiding resource occupation caused by separately determining the compression strategy for each network device, and thus realizing effective utilization of resources at the management device. In this way, when the data of the second network device has not been collected or enough data of the second network device has not been collected at the management device, the management device may base on the data of other network devices having the same data type as the second network device. The data determines the compression strategy used by the second network device, so that the second network device can immediately compress the data based on the compression strategy to save bandwidth.
在本申请的第二方面,提供了一种数据压缩方法。该方法可以由网络设备执行。网络设备向管理设备发送消息,并接收来自管理设备的第一压缩策略。消息包括多个数据项,多个数据项与多条记录的对应关系为一一对应,多个数据项分别来自于对应的记录。第一压缩策略是基于多个数据项被确定的。In a second aspect of the present application, a data compression method is provided. The method can be performed by a network device. The network device sends a message to the management device, and receives the first compression policy from the management device. The message includes multiple data items, and the corresponding relationship between the multiple data items and the multiple records is a one-to-one correspondence, and the multiple data items come from the corresponding records respectively. A first compression strategy is determined based on a plurality of data items.
在第二方面的一种实施方式中,网络设备使用第二压缩策略压缩数据项,其中消息包括经压缩的数据项。In an implementation form of the second aspect, the network device compresses the data item using a second compression strategy, wherein the message includes the compressed data item.
在第二方面的一种实施方式中,网络设备接收来自管理设备的第二压缩策略。In an implementation manner of the second aspect, the network device receives the second compression policy from the management device.
在第二方面的一种实施方式中,网络设备确定第二压缩策略,并向管理设备发送第二压缩策略。In an implementation manner of the second aspect, the network device determines the second compression policy, and sends the second compression policy to the management device.
在第二方面的一种实施方式中,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。In an implementation manner of the second aspect, the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second compression parameter.
在第二方面的一种实施方式中,第一压缩算法或第二压缩算法包括以下至少一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。In an implementation manner of the second aspect, the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
在本申请的第三方面,提供了一种数据压缩装置。该装置包括:接收模块、确定模块和发送模块。该接收模块被配置为接收来自第一网络设备的消息。消息包括多个第一数据项,多个第一数据项与多条记录的对应关系为一一对应,多个第一数据项分别来自于对应的记录。该确定模块被配置为基于多个第一数据项确定第一压缩策略。该发送模块被配置为向第一网络设备发送第一压缩策略。In a third aspect of the present application, a data compression device is provided. The device includes: a receiving module, a determining module and a sending module. The receiving module is configured to receive messages from the first network device. The message includes a plurality of first data items, the corresponding relationship between the plurality of first data items and the plurality of records is one-to-one correspondence, and the plurality of first data items come from corresponding records respectively. The determining module is configured to determine a first compression strategy based on a plurality of first data items. The sending module is configured to send the first compression policy to the first network device.
在第三方面的一种实施方式中,多个第一数据项是基于第二压缩策略被压缩的,装置还 包括解压模块,被配置为使用第二压缩策略对多个第一数据项进行解压。In an implementation manner of the third aspect, the multiple first data items are compressed based on the second compression strategy, and the device further A decompression module is included, configured to decompress the plurality of first data items using a second compression strategy.
在第三方面的一种实施方式中,确定模块被配置为:当满足条件时,基于经解压的多个第一数据项确定第一压缩策略。In an implementation manner of the third aspect, the determination module is configured to: determine the first compression policy based on the decompressed plurality of first data items when the condition is met.
在第三方面的一种实施方式中,条件包括:在确定第二压缩策略后所经过的时长达到或超过预设时长。In an implementation manner of the third aspect, the condition includes: the elapsed time period after determining the second compression strategy reaches or exceeds a preset time period.
在第三方面的一种实施方式中,条件包括:用于确定第二压缩策略的多个数据项的数据类型与所述多个第一数据项的数据类型不同。In an implementation manner of the third aspect, the condition includes: the data types of the multiple data items used to determine the second compression policy are different from the data types of the multiple first data items.
在第三方面的一种实施方式中,条件包括:用于确定第二压缩策略的多个数据项的分布特征和多个第一数据项的分布特征不同。In an implementation manner of the third aspect, the condition includes: the distribution characteristics of the plurality of data items used to determine the second compression strategy are different from the distribution characteristics of the plurality of first data items.
在第三方面的一种实施方式中,发送模块被配置为:当第一压缩策略与第二压缩策略不同时,向第一网络设备发送第一压缩策略。In an implementation manner of the third aspect, the sending module is configured to: when the first compression strategy is different from the second compression strategy, send the first compression strategy to the first network device.
在第三方面的一种实施方式中,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。In an implementation manner of the third aspect, the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second compression parameter.
在第三方面的一种实施方式中,第一压缩算法或第二压缩算法包括以下至少一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。In an implementation manner of the third aspect, the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
在第三方面的一种实施方式中,发送模块还被配置为向第二网络设备发送第一压缩策略,以使得第二网络设备基于第一压缩策略压缩多个第二数据项,多个第二数据项的数据类型与多个第一数据项的数据类型相同。In an implementation manner of the third aspect, the sending module is further configured to send the first compression strategy to the second network device, so that the second network device compresses the plurality of second data items based on the first compression strategy, and the plurality of first compression strategies The data type of the second data item is the same as the data type of the plurality of first data items.
在本申请的第四方面,提供了一种数据压缩装置。该装置包括:发送模块和接收模块。该发送模块被配置为向管理设备发送消息。消息包括与多个数据项,多个数据项与多条记录的对应关系为一一对应,多个数据项分别来自于对应的记录。该接收模块被配置为接收来自管理设备的第一压缩策略。第一压缩策略是基于多个数据项被确定的。In a fourth aspect of the present application, a data compression device is provided. The device includes: a sending module and a receiving module. The sending module is configured to send messages to the management device. The message includes a plurality of data items, and the corresponding relationship between the plurality of data items and the plurality of records is one-to-one correspondence, and the plurality of data items come from corresponding records respectively. The receiving module is configured to receive the first compression policy from the management device. A first compression strategy is determined based on a plurality of data items.
在第四方面的一种实施方式中,该装置还包括压缩模块。该压缩模块被配置为使用第二压缩策略压缩数据项,其中消息包括经压缩的数据项。In an embodiment of the fourth aspect, the device further includes a compression module. The compression module is configured to compress the data item using a second compression strategy, wherein the message includes the compressed data item.
在第四方面的一种实施方式中,接收模块还被配置为接收来自管理设备的第二压缩策略。In an implementation manner of the fourth aspect, the receiving module is further configured to receive the second compression policy from the management device.
在第四方面的一种实施方式中,该装置还包括确定模块。该确定模块被配置为确定第二压缩策略。该发送模块还被配置为向管理设备发送第二压缩策略。In an implementation manner of the fourth aspect, the device further includes a determining module. The determining module is configured to determine a second compression strategy. The sending module is also configured to send the second compression policy to the management device.
在第四方面的一种实施方式中,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。In an implementation manner of the fourth aspect, the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second compression parameter.
在第四方面的一种实施方式中,第一压缩算法或第二压缩算法包括以下至少一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。In an implementation manner of the fourth aspect, the first compression algorithm or the second compression algorithm includes at least one of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and A compression method combining entropy coding, or a compression method combining difference coding and entropy coding.
在本申请的第五方面,提供了一种电子设备。该电子设备包括处理器以及存储器。存储器上存储有由处理器执行的指令。当指令被处理器执行时使得该电子设备实现根据上述第一方面或其任一实施方式中的方法的操作,或者实现根据上述第二方面或其任一实施方式中的方法的操作。In a fifth aspect of the present application, an electronic device is provided. The electronic device includes a processor and memory. The memory stores instructions for execution by the processor. When the instruction is executed by the processor, the electronic device is made to implement the operation according to the method in the above first aspect or any implementation manner thereof, or implement the operation according to the method in the above second aspect or any implementation manner thereof.
在本申请的第六方面,提供了一种计算机可读存储介质。该计算机可读存储介质上存储有计算机可执行指令。该计算机可执行指令被处理器执行时实现根据上述第一方面或其任一实施方式中的方法的操作,,或者实现根据上述第二方面或其任一实施方式中的方法的操作。 In a sixth aspect of the present application, a computer-readable storage medium is provided. Computer-executable instructions are stored on the computer-readable storage medium. When the computer-executable instructions are executed by the processor, the operation according to the method in the above first aspect or any implementation manner thereof may be realized, or the operation according to the method in the above second aspect or any implementation manner thereof shall be realized.
在本申请的第七方面,提供了一种芯片或芯片系统。该芯片或芯片系统包括处理电路,被配置为执行根据上述第一方面或其任一实施方式中的方法的操作,或者实现根据上述第二方面或其任一实施方式中的方法的操作。In a seventh aspect of the present application, a chip or a chip system is provided. The chip or chip system includes a processing circuit configured to perform operations according to the method in the above first aspect or any implementation thereof, or implement operations according to the method in the above second aspect or any implementation thereof.
在本申请的第八方面,提供了一种计算机程序或计算机程序产品。该计算机程序或计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,计算机可执行指令在被执行时实现根据上述第一方面或其任一实施方式中的方法的操作,或者实现根据上述第二方面或其任一实施方式中的方法的操作。In an eighth aspect of the present application, a computer program or computer program product is provided. The computer program or computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions which, when executed, implement operations according to the method in the first aspect or any of its implementations above, Or implement the operations according to the method in the above second aspect or any implementation manner thereof.
附图说明Description of drawings
图1示出了本申请实施例提供的一种应用场景的示意图;FIG. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application;
图2示出了本申请实施例提供的网络设备的多条记录的示意图;FIG. 2 shows a schematic diagram of multiple records of a network device provided by an embodiment of the present application;
图3示出了本申请实施例提供的数据压缩过程的信令交互图;Fig. 3 shows the signaling interaction diagram of the data compression process provided by the embodiment of the present application;
图4示出了本申请实施例提供的数据压缩过程的信令交互图;FIG. 4 shows a signaling interaction diagram of the data compression process provided by the embodiment of the present application;
图5示出了本申请实施例提供的数据分组的示意图;FIG. 5 shows a schematic diagram of a data packet provided by an embodiment of the present application;
图6示出了本申请实施例提供的数据压缩过程的信令交互图;FIG. 6 shows a signaling interaction diagram of the data compression process provided by the embodiment of the present application;
图7示出了本申请实施例提供的数据压缩装置的示意框图;FIG. 7 shows a schematic block diagram of a data compression device provided by an embodiment of the present application;
图8示出了本申请实施例提供的数据压缩装置的示意框图;以及FIG. 8 shows a schematic block diagram of a data compression device provided by an embodiment of the present application; and
图9示出了可以用来实施本申请实施例的示例设备的示意框图。Fig. 9 shows a schematic block diagram of an example device that can be used to implement the embodiments of the present application.
具体实施方式Detailed ways
在通信网络中,诸如分布式探针之类的网络设备需要向诸如云安全中心之类的管理设备上报各种数据,例如,性能测量数据,运行日志,安全事件信息等。网络设备进行测量并上报的数据量很大,因此对于带宽的需求很高。这样一方面导致网络设备和管理设备之间的交互成本较高,另一方面网络设备和管理设备之间交互的大量数据占用了较多的网络资源,有可能影响其他业务。因此,需要一种有效地方案来压缩设备间的交互数据。In a communication network, network devices such as distributed probes need to report various data, such as performance measurement data, operation logs, security event information, etc., to management devices such as cloud security centers. Network devices measure and report a large amount of data, so there is a high demand for bandwidth. In this way, on the one hand, the interaction cost between the network device and the management device is high; on the other hand, a large amount of data exchanged between the network device and the management device occupies more network resources, which may affect other services. Therefore, an effective solution is needed to compress the interaction data between devices.
为了解决上述问题以及潜在的其他问题,本申请的实施例提供了一种数据压缩的方案,针对多条记录中的对应的多个数据项使用相同的压缩策略,能够充分考虑对应的数据项的共性,提升压缩率,进而能够减小所需的带宽,降低成本。In order to solve the above problems and other potential problems, the embodiment of the present application provides a data compression scheme, which uses the same compression strategy for the corresponding multiple data items in multiple records, and can fully consider the corresponding data items. Commonality, improve the compression rate, and thus reduce the required bandwidth and reduce costs.
图1示出了本申请实施例提供的一种应用场景100的示意图。该应用场景100包括管理设备110、网络设备121、网络设备122和网络设备123。为了简化描述,可以将网络设备121、网络设备122和网络设备123统称为网络设备120。FIG. 1 shows a schematic diagram of an application scenario 100 provided by an embodiment of the present application. The application scenario 100 includes a management device 110 , a network device 121 , a network device 122 and a network device 123 . To simplify the description, the network device 121 , the network device 122 and the network device 123 may be collectively referred to as the network device 120 .
本申请的实施例中的“网络设备”可以表示对计算机网络中网络安全、网络流量等数据进行采集或测量的设备。网络设备可以被实现为各种形式,或者网络设备也可以具有其他的称呼,包括但不限于,网关设备、路由器、网络边缘设备、防火墙设备、网络安全探针设备、网络探针、网络测量设备、探测设备等。The "network device" in the embodiments of the present application may refer to a device that collects or measures data such as network security and network traffic in a computer network. Network devices can be implemented in various forms, or network devices can also have other names, including but not limited to, gateway devices, routers, network edge devices, firewall devices, network security probe devices, network probes, network measurement devices , detection equipment, etc.
在一些场景中,多个网络设备可以属于同一个局域网,例如园区网络。举例而言,可以假设网络设备121和网络设备122属于同一个园区网络,并且可以假设网络设备123属于另一个园区网络。In some scenarios, multiple network devices can belong to the same LAN, such as a campus network. For example, it may be assumed that network device 121 and network device 122 belong to the same campus network, and it may be assumed that network device 123 belongs to another campus network.
本申请的实施例中的“管理设备”可以表示对计算机网络中的网络安全、网络流量等数据进行管理、汇总分析的设备。管理设备可以被实现为各种形式,或者管理设备也可以具有 其他的称呼,包括但不限于,服务器、网络安全服务器、安全云平台、流量控制设备、控制中心、集中数据中心、管理节点等。The "management device" in the embodiments of the present application may refer to a device that manages, summarizes and analyzes data such as network security and network traffic in a computer network. The management device can be implemented in various forms, or the management device can also have Other titles include, but are not limited to, servers, network security servers, security cloud platforms, traffic control devices, control centers, centralized data centers, management nodes, etc.
网络设备120可以向管理设备110发送数据,例如数据可以包括安全日志、取证文件、流量日志、运行日志、告警日志等。可选地,各种日志可以是采取特定格式的记录文本。各种日志中可以包括多条记录。每条记录可以对应不同的时刻。或者,每条记录可以对应不同的来源。例如,第一条记录为来源于网络接口一的告警记录,第二条记录为来源于网络接口二的告警记录。The network device 120 may send data to the management device 110, for example, the data may include security logs, forensic files, traffic logs, operation logs, alarm logs, and the like. Optionally, various logs may be recorded text in a specific format. Multiple records can be included in various logs. Each record can correspond to a different moment. Alternatively, each record can correspond to a different source. For example, the first record is an alarm record from network interface one, and the second record is an alarm record from network interface two.
示例性地,网络设备120可以通过测量得到多条记录。举例而言,网络设备120可以周期性地测量,例如每秒测量得到150条记录。举例而言,网络设备120可以周期性地将所测量的多条记录发送到管理设备110,例如每秒发送一次。举例而言,网络设备120可以基于记录的数量达到阈值而进行发送,例如每测得到200条记录发送一次。可理解,网络设备120也可以基于其他的准则进行测量和发送,本申请中不再罗列。Exemplarily, the network device 120 may obtain multiple records through measurement. For example, the network device 120 may measure periodically, for example, measure 150 records per second. For example, the network device 120 may periodically send the measured records to the management device 110, for example, once every second. For example, the network device 120 may send based on the number of records reaching a threshold, for example, send once every 200 records are measured. It can be understood that the network device 120 may also perform measurement and transmission based on other criteria, which will not be listed in this application.
示例性地,网络设备还可以通过其他方式得到多条记录。例如,网络设备121还连接有网络设备131和网络设备132(图中均未示出),网络设备121可以接收网络设备131和网络设备132发送的数据,并基于接收到的数据生成多条记录。例如,每条记录可以对应于不同的网络设备。例如,第一条记录为来源于网络设备131的安全事件记录,第二条记录未来源于网络设备132的安全事件记录。Exemplarily, the network device may also obtain multiple records in other ways. For example, the network device 121 is also connected to the network device 131 and the network device 132 (both not shown in the figure), the network device 121 can receive the data sent by the network device 131 and the network device 132, and generate multiple records based on the received data . For example, each record may correspond to a different network device. For example, the first record is a security event record from the network device 131 , and the second record is not from the security event record of the network device 132 .
图2示出了本申请实施例提供的网络设备120的多条记录200的一个示意图。作为示意,图2中列出了5条记录,例如一行属于一条记录。FIG. 2 shows a schematic diagram of multiple records 200 of the network device 120 provided by the embodiment of the present application. For illustration, five records are listed in FIG. 2 , for example, one row belongs to one record.
如图2所示,每条记录可以包括多个数据项,同一记录中的不同数据项可以表示不同的含义,例如图2中的同一记录中多个数据项所表示的含义从左到右依次为:元数据版本、元数据标识(identifier,ID)、源互联网协议(Internet Protocol,IP)地址、目的IP地址、源传输端口、目的传输端口、协议ID、字节增加计数、分组增加计数等。可理解,同一记录中至少两个数据项属于不同的数据类型,例如结合图2,元数据版本与元数据ID属于不同的数据类型,其中,元数据版本的数据类型为整数型,元数据ID的数据类型为字符型。As shown in Figure 2, each record can include multiple data items, and different data items in the same record can represent different meanings, for example, the meanings represented by multiple data items in the same record in Figure 2 are from left to right For: metadata version, metadata identifier (identifier, ID), source Internet Protocol (Internet Protocol, IP) address, destination IP address, source transmission port, destination transmission port, protocol ID, byte increase count, packet increase count, etc. . It can be understood that at least two data items in the same record belong to different data types. For example, referring to FIG. The data type of is character.
可选地,同一记录中的各个数据项都属于不同的数据类型,或者可选地,同一记录中的部分数据项(如图2中的源IP地址和目的IP地址)属于相同的数据类型。Optionally, each data item in the same record belongs to different data types, or optionally, some data items in the same record (such as the source IP address and destination IP address in Figure 2) belong to the same data type.
如图2所示,不同记录可以包括相同含义的数据项,例如图2中的一列表示相同的含义。可理解,同一列的数据项可以对应于相同的字段,可以具有相同的数据类型。As shown in Figure 2, different records may include data items with the same meaning, for example, a column in Figure 2 indicates the same meaning. It can be understood that data items in the same column may correspond to the same field and may have the same data type.
可理解,图2中示出的行和列的形式仅是示意,在实际场景中,可以通过将多条记录顺次连接形成多条记录,例如不同的记录通过特定的符号(例如&&等)进行分离等,例如不同的记录被置于不同的符号(例如{})内部等,同一个记录中的不同数据项可以通过不同的字段区分。本申请对此不限定。It can be understood that the form of rows and columns shown in FIG. 2 is only for illustration. In an actual scenario, multiple records can be formed by sequentially connecting multiple records, for example, different records are passed through specific symbols (such as &&, etc.) Separation, etc., for example, different records are placed inside different symbols (such as {}), etc., and different data items in the same record can be distinguished by different fields. This application is not limited to this.
应注意,本申请实施例对网络设备121与管理设备110之间的传输协议不做限定,例如可以是网络配置协议(Network Configuration Protocol,NETCONF)、简单网络管理协议(Simple Network Management Protocol,SNMP)、或网络设备121与管理设备110通过协商确定的传输方式等。It should be noted that the embodiment of the present application does not limit the transmission protocol between the network device 121 and the management device 110, for example, it may be a network configuration protocol (Network Configuration Protocol, NETCONF), a simple network management protocol (Simple Network Management Protocol, SNMP) , or a transmission mode determined through negotiation between the network device 121 and the management device 110 , and the like.
应注意,尽管在图1中示出了三个网络设备,但是本申请的实施例不限于此,在实际场景中,可以包括更多或更少数量的网络设备。作为示意,下面的实施例主要以网络设备121为例来阐述数据压缩的过程,可理解,本申请的实施例对于其余的网络设备也是适用的,本 文中不再赘述。It should be noted that although three network devices are shown in FIG. 1 , the embodiments of the present application are not limited thereto, and in actual scenarios, more or fewer network devices may be included. As an illustration, the following embodiments mainly use the network device 121 as an example to illustrate the process of data compression. It can be understood that the embodiments of the present application are also applicable to other network devices. No more details in the text.
图3示出了本申请的实施例提供的数据压缩过程300的信令交互图。过程300涉及管理设备110和网络设备121。FIG. 3 shows a signaling interaction diagram of a data compression process 300 provided by an embodiment of the present application. Process 300 involves management device 110 and network device 121 .
网络设备121向管理设备110发送310消息,该消息包括多个第一数据项。The network device 121 sends 310 a message to the management device 110, the message including a plurality of first data items.
示例性地,网络设备121可以通过测量得到多条记录,每条记录包括多个数据项,例如,第一数据项和第二数据项。多个第一数据项与多条记录的对应关系为一一对应。即,消息中的多个第一数据项分别来自于对应的记录。在一些示例中,多个第一数据项可以被理解为是如图2所示的一列。在另一些示例中,多个第一数据项可以被理解为不同记录中的同一字段。Exemplarily, the network device 121 may obtain multiple records through measurement, and each record includes multiple data items, for example, a first data item and a second data item. The correspondence between the multiple first data items and the multiple records is a one-to-one correspondence. That is, the multiple first data items in the message respectively come from corresponding records. In some examples, the plurality of first data items can be understood as a column as shown in FIG. 2 . In other examples, multiple first data items may be understood as the same field in different records.
可选地,在一些实施例中,消息中可以包括未经压缩的多个第一数据项。Optionally, in some embodiments, the message may include a plurality of uncompressed first data items.
可选地,在一些实施例中,网络设备121可以确定第二压缩策略,并且可以使用第二压缩策略压缩多个第一数据项。示例性地,消息包括经压缩的多个第一数据项。Optionally, in some embodiments, the network device 121 may determine a second compression strategy, and may use the second compression strategy to compress multiple first data items. Exemplarily, the message includes a compressed plurality of first data items.
举例而言,第二压缩策略可以是网络设备121基于多个第一数据项确定的。可选地,网络设备121还可以将所确定的第二压缩策略发送到管理设备110。For example, the second compression strategy may be determined by the network device 121 based on multiple first data items. Optionally, the network device 121 may also send the determined second compression policy to the management device 110 .
举例而言,第二压缩策略可以是预先定义的,例如称为默认压缩策略或预置压缩策略等。For example, the second compression strategy may be predefined, for example, called a default compression strategy or a preset compression strategy.
可选地,如图3所示,管理设备110可以确定302第二压缩策略,并且向网络设备121发送304第二压缩策略。相应地,网络设备121可以使用第二压缩策略压缩306多个第一数据项。可理解,消息中包括经压缩的多个第一数据项。示例性地,管理设备110可以基于先前的多个数据项来确定第二压缩策略,确定的方式与下面的确定第一压缩策略的方式类似,这里不再重复。Optionally, as shown in FIG. 3 , the management device 110 may determine 302 the second compression policy, and send 304 the second compression policy to the network device 121 . Accordingly, network device 121 may compress 306 the plurality of first data items using the second compression strategy. It can be understood that the message includes a plurality of compressed first data items. Exemplarily, the management device 110 may determine the second compression strategy based on multiple previous data items, and the determination method is similar to the following method of determining the first compression strategy, which will not be repeated here.
示例性地,如果消息包括经压缩的多个第一数据项,那么管理设备110可以使用第二压缩策略通过解压得到312多个第一数据项。Exemplarily, if the message includes a plurality of compressed first data items, the management device 110 may obtain 312 the plurality of first data items through decompression using the second compression strategy.
管理设备110基于多个第一数据项确定320第一压缩策略。示例性地,管理设备110可以基于经解压的多个第一数据项来确定第一压缩策略。The management device 110 determines 320 a first compression strategy based on the plurality of first data items. Exemplarily, the management device 110 may determine the first compression policy based on the decompressed multiple first data items.
本申请的实施例中,压缩策略(如第一压缩策略或第二压缩策略)可以包括压缩算法和压缩参数。压缩算法可以包括以下中的任一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。压缩参数与压缩算法对应,不同的压缩算法所使用的压缩参数一般不同。In the embodiment of the present application, a compression strategy (such as a first compression strategy or a second compression strategy) may include a compression algorithm and a compression parameter. The compression algorithm can include any of the following: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding combined with entropy encoding, or difference encoding combined with entropy encoding the compression method. The compression parameters correspond to the compression algorithms, and the compression parameters used by different compression algorithms are generally different.
在一些实施例中,管理设备110可以确定是否满足预设条件,并且可以在确定满足预设条件时,确定第一压缩策略。In some embodiments, the management device 110 may determine whether the preset condition is met, and may determine the first compression strategy when it is determined that the preset condition is met.
可选地,预设条件可以包括在确定第二压缩策略之后所经过的时长达到或超过预设时长。预设时长可以被称为更新周期,以此方式,管理设备110能够周期性地对压缩策略进行更新。作为一例,预设时长可以为1秒或其他值。作为一例,管理设备110可以基于在该更新周期内收到的全部或部分消息中的多个第一数据项来确定第一压缩策略,如此能够所确定的第一压缩策略更准确。Optionally, the preset condition may include that the time elapsed after the second compression policy is determined reaches or exceeds the preset time length. The preset period of time may be referred to as an update period, and in this manner, the management device 110 can periodically update the compression policy. As an example, the preset duration may be 1 second or other values. As an example, the management device 110 may determine the first compression strategy based on multiple first data items in all or part of the messages received within the update period, so that the determined first compression strategy can be more accurate.
可选地,预设条件可以包括用于确定第二压缩策略的多个数据项的数据类型不同于多个第一数据项的数据类型。例如,用于确定第二压缩策略的多个数据项的数据类型为整数型(int),而多个第一数据项的数据类型为浮点型(float)。以此方式,管理设备110能够在数据类型发生变化时更新压缩策略,从而能够使得被使用的压缩策略更能与被压缩的数据的类型关联,提升压缩率。Optionally, the preset condition may include that the data types of the multiple data items used to determine the second compression policy are different from the data types of the multiple first data items. For example, the data types of the plurality of data items used to determine the second compression strategy are integers (int), and the data types of the plurality of first data items are floating point types (float). In this way, the management device 110 can update the compression policy when the data type changes, so that the used compression policy can be more associated with the type of the compressed data, and the compression rate can be improved.
可选地,预设条件可以包括用于确定第二压缩策略的多个数据项的分布特征不同于多个 第一数据项的分布特征。例如,用于确定第二压缩策略的多个数据项的分布特征为稀疏,即这里的多个数据项中为空的数据项的数量较多,而多个第一数据项的分布特征为密集,即多个第一数据项中为空的数据项的数量较少,其中,数量较多可以是大于第一比例阈值(如60%),数量较少可以是小于第二比例阈值(如20%),第二比例阈值小于或等于第一比例阈值。以此方式,管理设备110能够在数据的分布特征发生变化时更新压缩策略,从而能够使得被使用的压缩策略更能和被压缩的数据的分布特征关联,提升压缩率。Optionally, the preset condition may include that the distribution characteristics of the multiple data items used to determine the second compression policy are different from multiple The distribution characteristics of the first data item. For example, the distribution characteristic of the plurality of data items used to determine the second compression strategy is sparse, that is, the number of empty data items among the plurality of data items here is large, while the distribution characteristic of the plurality of first data items is dense , that is, the number of data items that are empty among the plurality of first data items is small, wherein the large number may be greater than the first ratio threshold (such as 60%), and the small number may be smaller than the second ratio threshold (such as 20%) %), the second ratio threshold is less than or equal to the first ratio threshold. In this way, the management device 110 can update the compression strategy when the distribution characteristics of the data change, so that the used compression strategy can be more associated with the distribution characteristics of the compressed data, and the compression rate can be improved.
本申请的实施例中,管理设备110可以基于多个第一数据项的数据类型、分布特征等来确定第一压缩策略。举例而言,多个第一数据项为字符串型,且分布密集,可选地可以确定第一压缩策略包括字典编码压缩方式。可选地,管理设备110可以构建神经网络模型来确定该第一压缩策略的压缩参数,如字典等。In the embodiment of the present application, the management device 110 may determine the first compression strategy based on data types, distribution characteristics, and the like of the multiple first data items. For example, the plurality of first data items are character strings and are distributed densely. Optionally, it may be determined that the first compression strategy includes a dictionary encoding compression manner. Optionally, the management device 110 may construct a neural network model to determine compression parameters of the first compression strategy, such as a dictionary.
管理设备110向网络设备121发送330第一压缩策略。可选地,当第一压缩策略不同于第二压缩策略时,管理设备110发送该第一压缩策略。如此,能够避免对相同压缩策略的重复发送,造成对于传输资源的浪费。The management device 110 sends 330 the first compression policy to the network device 121 . Optionally, when the first compression policy is different from the second compression policy, the management device 110 sends the first compression policy. In this way, repeated sending of the same compression strategy can be avoided, resulting in waste of transmission resources.
示例性地,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。第一压缩策略与第二压缩策略不同可以包括第一压缩算法不同于第二压缩算法,或者可以包括第一压缩算法与第二压缩算法相同,但第一压缩参数不同于第二压缩参数,或者可以包括第一压缩算法不同于第二压缩算法且第一压缩参数不同于第二压缩参数。Exemplarily, the first compression strategy includes a first compression algorithm and first compression parameters, and the second compression strategy includes a second compression algorithm and second compression parameters. The difference between the first compression strategy and the second compression strategy may include that the first compression algorithm is different from the second compression algorithm, or may include that the first compression algorithm is the same as the second compression algorithm but that the first compression parameters are different from the second compression parameters, or It may include that the first compression algorithm is different from the second compression algorithm and that the first compression parameters are different from the second compression parameters.
可理解,在此之后,网络设备121能够使用第一压缩策略对后续的数据项进行压缩,这样能够在无损压缩的情况下基于数据项的特征实现更大的压缩率。It can be understood that after that, the network device 121 can use the first compression strategy to compress subsequent data items, so that a greater compression rate can be achieved based on the characteristics of the data items in the case of lossless compression.
以此方式,能够由管理设备110来确定第一压缩策略,从而网络设备121能够使用由管理设备110所确定第一压缩策略来压缩数据项。该方案能够充分利用管理设备110的强大处理能力,并且针对相同数据类型的多个数据项或者相同分布特征的多个数据项使用相同的压缩策略,能够提升压缩率,进而减小带宽占用。In this way, the first compression strategy can be determined by the management device 110 , so that the network device 121 can compress data items using the first compression strategy determined by the management device 110 . This solution can make full use of the powerful processing capability of the management device 110, and use the same compression strategy for multiple data items of the same data type or multiple data items with the same distribution characteristics, which can improve the compression rate and reduce bandwidth occupation.
下面将结合图4至图6描述本申请中更为详细的一些实施例。Some more detailed embodiments of the present application will be described below with reference to FIG. 4 to FIG. 6 .
图4示出了本申请的实施例提供的数据压缩过程400的信令交互图。过程400涉及管理设备110和网络设备121。FIG. 4 shows a signaling interaction diagram of a data compression process 400 provided by an embodiment of the present application. Process 400 involves management device 110 and network device 121 .
网络设备121通过测量得到410多条记录。作为示例,假设多条记录为N1条记录,N1为正整数。例如N1为25或200或其他值,本申请对此不限定。The network device 121 obtains more than 410 records through measurement. As an example, assume that the multiple records are N1 records, and N1 is a positive integer. For example, N1 is 25 or 200 or other values, which is not limited in the present application.
每条记录可以包括多个数据项,分别表示不同的含义。可选地,作为示意,可以将多条记录表示为列表的形式,如图2所示包括行和列,一行表示一条记录,且同一列表示相同的含义。Each record can include multiple data items, each representing a different meaning. Optionally, as an illustration, multiple records may be represented in the form of a list, including rows and columns as shown in FIG. 2 , where a row represents one record, and the same column represents the same meaning.
在一些实施例中,多条记录可以是在网络设备121上一次发送消息之后通过测量得到的。在一些实施例中,多条记录可以是网络设备121在启动之后且在发送消息之前通过测量得到的。In some embodiments, the plurality of records may be obtained through measurements after the last message sent by the network device 121 . In some embodiments, the plurality of records may be measured by the network device 121 after startup and before sending a message.
网络设备121向管理设备110发送420第一消息,该第一消息包括多条记录。相应地,管理设备110可以接收来自网络设备121的第一消息。The network device 121 sends 420 a first message to the management device 110, the first message including a plurality of records. Correspondingly, the management device 110 may receive the first message from the network device 121 .
本申请实施例对网络设备121向管理设备110发送的消息的具体格式不做限定,例如可以是日志(log)文件,例如可以是csv格式等。The embodiment of the present application does not limit the specific format of the message sent by the network device 121 to the management device 110, for example, it may be a log (log) file, for example, it may be in csv format.
举例而言可以假设网络设备121在t0时刻向管理设备110发送第一消息。 For example, it may be assumed that the network device 121 sends the first message to the management device 110 at time t0.
在一些实施例中,网络设备121可以将未经压缩的多条记录通过第一消息发送到管理设备110。例如,网络设备121在刚启动时的首次发送时,可以发送未经压缩的第一消息。例如可以基于多条记录形成序列化数据流,并发送到管理设备110。In some embodiments, the network device 121 may send the uncompressed multiple records to the management device 110 through the first message. For example, the network device 121 may send an uncompressed first message when sending for the first time when it is just started. For example, a serialized data stream may be formed based on multiple records and sent to the management device 110 .
在一些实施例中,网络设备121可以使用预配置的压缩策略,通过将多条记录进行压缩,以形成第一消息。例如,网络设备121在刚启动时的首次发送时,使用预配置的压缩策略。该预配置的压缩策略可以是网络设备121与管理设备110预先协商确定的,或者可以是管理设备110配置给网络设备121的,或者可以是基于网络设备121与管理设备110之间的通信协议预先定义的。预配置的压缩策略包括的压缩算法例如可以为静态字典编码等。相应地,预配置的压缩策略包括的压缩参数例如为字典。可选地,也可以将预配置的压缩策略称为通用压缩策略或其他名称,本申请对此不限定。In some embodiments, the network device 121 may use a pre-configured compression policy to form the first message by compressing multiple records. For example, the network device 121 uses a pre-configured compression strategy when sending for the first time when it is just started. The pre-configured compression strategy may be pre-determined through negotiation between the network device 121 and the management device 110, or may be configured by the management device 110 to the network device 121, or may be based on a communication protocol between the network device 121 and the management device 110. Defined. The compression algorithm included in the pre-configured compression policy may be, for example, static dictionary encoding or the like. Correspondingly, the compression parameters included in the pre-configured compression strategy are, for example, dictionaries. Optionally, the preconfigured compression strategy may also be called a general compression strategy or other names, which is not limited in this application.
在一些实施例中,网络设备121可以使用第一压缩策略,通过将多条记录进行压缩,以形成第一消息。示例性地,第一压缩策略可以是网络设备121在发送第一消息之前最新从管理设备110接收到的。例如,网络设备121在刚启动时的首次发送前,接收来自管理设备110的第一压缩策略。例如,网络设备121在上一次发送消息之后,接收来自管理设备110的第一压缩策略。例如,网络设备121在上一次发送消息时所使用的是第一压缩策略。可选地,第一消息还可以包括第一压缩策略的标识,例如版本号、时间戳等。In some embodiments, the network device 121 may use the first compression strategy to form the first message by compressing multiple records. Exemplarily, the first compression policy may be the latest received by the network device 121 from the management device 110 before sending the first message. For example, the network device 121 receives the first compression policy from the management device 110 before sending for the first time at startup. For example, the network device 121 receives the first compression policy from the management device 110 after sending a message last time. For example, the network device 121 used the first compression strategy when sending a message last time. Optionally, the first message may also include an identifier of the first compression policy, such as a version number, a time stamp, and the like.
作为一个简化示例,可以假设第一消息是网络设备121在启动之后向管理设备110发送的关于测量的数据的第一个消息,那么第一消息包括未经压缩的多条记录,或者第一消息包括使用预配置的压缩策略被压缩的多条记录,或者第一消息包括使用在启动后接收到的第一压缩策略被压缩的多条记录。As a simplified example, it may be assumed that the first message is the first message about measured data that the network device 121 sends to the management device 110 after startup, then the first message includes uncompressed multiple records, or the first message includes a plurality of records compressed using a pre-configured compression strategy, or the first message includes a plurality of records compressed using a first compression strategy received after startup.
示例性地,网络设备121可以周期性地向管理设备110发送消息,假设发送周期为dt,那么可理解,网络设备121可以在t0+dt、t0+2*dt、…向管理设备110发送消息,例如dt等于1秒或其他值。Exemplarily, the network device 121 can periodically send a message to the management device 110, assuming that the sending period is dt, then it can be understood that the network device 121 can send a message to the management device 110 at t0+dt, t0+2*dt, ... , for example dt is equal to 1 second or some other value.
管理设备110至少基于第一消息确定430第二压缩策略,第二压缩策略包括至少一个压缩算法。The management device 110 determines 430 a second compression strategy based at least on the first message, the second compression strategy comprising at least one compression algorithm.
可选地,在一些实施例中,考虑到多条记录未经压缩,或者考虑到第一消息所使用的压缩策略不是基于网络设备121的数据所确定的,那么管理设备110可以在收到来自网络设备121开机后的第一消息后,基于第一消息确定第二压缩策略。Optionally, in some embodiments, considering that multiple records are not compressed, or considering that the compression policy used by the first message is not determined based on the data of the network device 121, then the management device 110 may receive the After the first message after the network device 121 is powered on, the second compression policy is determined based on the first message.
可选地,在一些实施例中,考虑到多条记录可能的临时性/不准确性,也为了提高所确定的第二压缩策略的准确性,可以周期性地确定压缩策略。例如,可以基于时刻t0至时刻t0+T之间收到的消息(包括第一消息)来确定第二压缩策略。换句话说,管理设备110可以基于周期T来确定压缩策略。Optionally, in some embodiments, considering the possible temporality/inaccuracy of multiple records, and also to improve the accuracy of the determined second compression strategy, the compression strategy may be determined periodically. For example, the second compression strategy may be determined based on messages (including the first message) received between time t0 and time t0+T. In other words, the management device 110 may determine the compression strategy based on the period T.
示例性地,管理设备110可以基于第一消息确定多条记录,并至少基于多条记录来确定第二压缩策略。Exemplarily, the management device 110 may determine multiple records based on the first message, and determine the second compression policy based at least on the multiple records.
在一些实施例中,第一消息包括未经压缩的多条记录,那么管理设备110可以读取该第一消息中的多条记录。在一些实施例中,第一消息包括经压缩的多条记录,例如使用预配置的压缩策略或第一压缩策略。那么管理设备110可以使用对应的压缩策略进行解压,以得到多条记录。In some embodiments, the first message includes multiple uncompressed records, then the management device 110 can read the multiple records in the first message. In some embodiments, the first message includes the plurality of records compressed, for example using a pre-configured compression strategy or a first compression strategy. Then the management device 110 can use the corresponding compression strategy to perform decompression to obtain multiple records.
示例性地,多条记录中每条记录都包括多个数据项,同一条记录中的不同数据项可以表示不同的含义。可以假设第一消息包括N1条记录,并且例如每条记录包括M1个数据项。 Exemplarily, each of the multiple records includes multiple data items, and different data items in the same record may represent different meanings. It may be assumed that the first message comprises N1 records, and eg each record comprises M1 data items.
可选地,如果管理设备110基于周期T确定压缩策略,那么管理设备110可以基于在周期T内接收到的多个消息(包括第一消息)来确定第二压缩策略。例如,假设多个消息的数量为K1,那么可选地基于多个消息可以确定K1*N1条记录。Optionally, if the management device 110 determines the compression policy based on the period T, then the management device 110 may determine the second compression policy based on multiple messages (including the first message) received within the period T. For example, assuming that the number of multiple messages is K1, then K1*N1 records can optionally be determined based on the multiple messages.
本申请实施例中,管理设备110可以基于N条记录来确定第二压缩策略。例如N条记录为第一消息中的N1条记录,或者N条记录可以为多个消息中的多条记录的集合。In this embodiment of the present application, the management device 110 may determine the second compression policy based on the N records. For example, the N records are N1 records in the first message, or the N records may be a collection of multiple records in multiple messages.
为了简化描述,可以假设N条记录表示为如图2所示的形式,也就是说,可以将一条记录表示为一行,不同的行属于不同的记录,可以将不同记录中相同含义的数据项置于同一列中,不同的列表示不同的含义。下面结合如图2所示的多条记录来描述确定第二压缩策略的实施例,但是应理解,本申请的实施例也可以被应用于其他形式的记录,这里不再一一罗列。In order to simplify the description, it can be assumed that N records are represented as shown in Figure 2, that is, one record can be represented as one row, different rows belong to different records, and data items with the same meaning in different records can be set to In the same column, different columns represent different meanings. The following describes an embodiment of determining a second compression policy in conjunction with multiple records as shown in FIG. 2 , but it should be understood that the embodiment of the present application may also be applied to other forms of records, which will not be listed here.
示例性地,管理设备110可以基于各列中的数据项的属性将N条记录的列数据分为多组。数据项的属性可以包括但不限于:数据类型、数据分布的稀疏程度、数值的范围等。数据类型可以包括整数型(int)、浮点型(float)、字符串(string)等。数据分布的稀疏程度可以基于列中是否存在为空(NULL)的对应记录、或连续为空的记录的数量等来确定。数据项为数值时,数值的范围可以是列中数值的最大值与最小值之差,数值的绝对值的最大值与最小值之差等。Exemplarily, the management device 110 may divide the column data of N records into multiple groups based on the attributes of the data items in each column. The attributes of a data item may include, but are not limited to: data type, sparseness of data distribution, range of values, and the like. The data type may include an integer type (int), a floating point type (float), a character string (string), and the like. The degree of sparseness of the data distribution can be determined based on whether there is a corresponding record that is NULL in the column, or the number of consecutive NULL records, and the like. When the data item is a numerical value, the range of the numerical value can be the difference between the maximum value and the minimum value of the value in the column, the difference between the maximum value and the minimum value of the absolute value of the value, etc.
举例而言,图5示出了多条记录500的简化示意,在图5中一行表示一条记录,每条记录包括多列:列A、列B、列C、……。假设列A、列B和列E中的数据项的数据类型为字符串,则可以将列A、列B和列E划分为同一组,如组510。假设列C、列G和列H中的数据项的数据类型为整数型,且数值的分布密集,则可以将列C、列G和列H划分为同一组,如组520。假设列D和列F中的数据项的数据类型为整数型,且数值的分布稀疏,则可以将列D和列F划分为同一组,如组530。For example, FIG. 5 shows a simplified diagram of multiple records 500. In FIG. 5, one row represents one record, and each record includes multiple columns: column A, column B, column C, . . . . Assuming that the data types of the data items in column A, column B, and column E are character strings, column A, column B, and column E can be divided into the same group, such as group 510 . Assuming that the data types of the data items in column C, column G and column H are integer, and the distribution of values is dense, then column C, column G and column H can be divided into the same group, such as group 520 . Assuming that the data types of the data items in column D and column F are integer, and the distribution of values is sparse, then column D and column F can be divided into the same group, such as group 530 .
可选地,管理设备110可以通过对各列中的数据项进行聚类分析,统计学习各列之间的关联性,并基于关联性将多列分为多组。示例性地,聚类分析可以采用基于无监督的学习方法,也可以采用基于有监督的分类方法,也可以采用预先定义的分类方法等,本申请对此不限定。可理解,某个组中可以仅包括一列,或者某个组中可以包括多列。Optionally, the management device 110 may perform cluster analysis on the data items in each column, statistically learn the correlation between the columns, and divide the multiple columns into multiple groups based on the correlation. Exemplarily, the cluster analysis may adopt an unsupervised learning method, a supervised classification method, or a predefined classification method, etc., which is not limited in the present application. It can be understood that only one column may be included in a certain group, or multiple columns may be included in a certain group.
示例性地,管理设备110针对各个组,分别确定对应的压缩算法。相应地,可以确定压缩算法所使用的压缩参数。Exemplarily, the management device 110 determines corresponding compression algorithms for each group. Accordingly, the compression parameters used by the compression algorithm can be determined.
本申请的实施例中,压缩算法可以包括但不限于:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。In the embodiment of the present application, the compression algorithm may include but not limited to: dictionary encoding compression, difference encoding compression, run-length encoding compression, entropy encoding compression, dictionary encoding and entropy encoding combined compression, or difference encoding Compression combined with entropy coding.
举例而言,针对数值类的,如果数值变化频率较快,可以使用行程编码压缩方式;如果数值变化频率较慢,可以使用差值编码压缩方式。举例而言,针对字符串类的,可以使用字典编码压缩方式。应理解,该举例仅是示意,不构成对本申请的实施例的限制。For example, for numerical values, if the value changes frequently, run-length encoding compression can be used; if the value changes slowly, difference encoding compression can be used. For example, for strings, you can use dictionary encoding compression. It should be understood that this example is only for illustration, and does not constitute a limitation to the embodiment of the present application.
作为示例,结合图5,可以假设针对组510确定第一压缩算法,针对组520确定第二压缩算法,针对组530确定第三压缩算法,其中,第一压缩算法、第二压缩算法、第三压缩算法中任两个可以相同或不同。举例而言,假设第一压缩算法为字典编码与熵编码结合的压缩方式,假设第二压缩算法为差值编码与熵编码结合的压缩方式,假设第三压缩算法为行程编码压缩方式。As an example, with reference to FIG. 5 , it can be assumed that the first compression algorithm is determined for group 510, the second compression algorithm is determined for group 520, and the third compression algorithm is determined for group 530, wherein the first compression algorithm, the second compression algorithm, the third Any two of the compression algorithms may be the same or different. For example, it is assumed that the first compression algorithm is a combination of dictionary coding and entropy coding, the second compression algorithm is a compression method of difference coding and entropy coding, and the third compression algorithm is a run-length coding compression method.
可选地,管理设备110还可以确定各个压缩算法所使用的压缩参数。例如可以确定熵编码压缩方式所使用的熵编码表,例如可以确定字典编码压缩方式所使用的字典,例如可以确 定差值编码压缩方式所使用的差值上限阈值,等等。Optionally, the management device 110 may also determine compression parameters used by each compression algorithm. For example, the entropy coding table used in the entropy coding compression method can be determined, for example, the dictionary used in the dictionary coding compression method can be determined, for example, it can be determined Define the difference upper limit threshold used by the difference encoding compression method, and so on.
举例而言,结合图5,可以基于组510中各列(即列A、列B和列E)中各个字符串出现的概率等,来确定与组510对应的熵编码表。可以基于组520各列(即列C、列G和列H)中各个数字的分布概率等,来确定与组520对应的熵编码表。可以基于组510中各列(即列A、列B和列E)中各个字符串的出现频率等,确定与组510对应的字典,例如可以通过神经网络模型(例如有状态深度网络模型)来提取各列中数据项的高频的字符串(也称为字典中的单词),从而为各列分别创建不同的字典。可选地,用于提取高频单词的神经网络模型可以是由多个网络设备120通过联邦学习等方式得到的。如此,能够充分利用管理设备110的计算能力强的特点,由管理设备110来确定字典,避免网络设备121进行匹配算法搜索所造成的时间和存储空间的资源浪费。For example, referring to FIG. 5 , the entropy encoding table corresponding to the group 510 can be determined based on the occurrence probability of each character string in each column in the group 510 (ie, column A, column B, and column E). The entropy encoding table corresponding to the group 520 can be determined based on the distribution probability of each number in each column of the group 520 (ie, column C, column G, and column H), etc. The dictionary corresponding to the group 510 can be determined based on the frequency of occurrence of each character string in each column (i.e., column A, column B, and column E) in the group 510, for example, a neural network model (such as a stateful deep network model) can be used to determine Extract the high-frequency strings (also known as words in the dictionary) of the data items in each column to create different dictionaries for each column. Optionally, the neural network model used to extract high-frequency words may be obtained by multiple network devices 120 through federated learning and other methods. In this way, the strong computing capability of the management device 110 can be fully utilized, and the dictionary can be determined by the management device 110 , avoiding the waste of time and storage space resources caused by the network device 121 searching for matching algorithms.
在一些实施例中,管理设备110针对各个组,可以分别构建神经网络模型,并基于所构建的神经网络模型来确定压缩算法。示例性地,本申请的实施例中神经网络模型可以是由管理设备110指令多个网络设备120通过联邦学习、增量学习、迁移学习等方式得到的,这样能够综合考虑更多的测量数据,提高模型构建的速度,并且通过充分考虑各个网络设备120的测量数据的不同,能够使得得到的神经网络模型更加准确。In some embodiments, the management device 110 may respectively construct a neural network model for each group, and determine a compression algorithm based on the constructed neural network model. Exemplarily, the neural network model in the embodiment of the present application may be obtained by the management device 110 instructing multiple network devices 120 through federated learning, incremental learning, migration learning, etc., so that more measurement data can be considered comprehensively, The speed of model construction is improved, and the difference in measurement data of each network device 120 can be fully considered, so that the obtained neural network model can be made more accurate.
以此方式,管理设备110能够以列为粒度确定压缩策略,例如,针对稀疏分布的列可以采用行程编码压缩方式,针对数值变化频繁的列可以采用差值编码与熵编码结合的压缩方式,针对字符串类型的列可以采用字典编码(如静态字典编码与滑窗字典编码)与熵编码结合的压缩方式,等等。相比于以记录(行)为粒度而言,能够针对相同类型的数据确定对应的压缩策略,从而压缩列方向上的冗余度,提升压缩率。In this way, the management device 110 can determine the compression strategy at the granularity of the columns. For example, the run-length encoding compression method can be used for sparsely distributed columns, and the compression method combining difference coding and entropy coding can be used for columns with frequent numerical changes. Columns of string type can be compressed by combining dictionary encoding (such as static dictionary encoding and sliding window dictionary encoding) with entropy encoding, and so on. Compared with taking records (rows) as the granularity, it is possible to determine the corresponding compression strategy for the same type of data, thereby compressing the redundancy in the column direction and improving the compression rate.
示例性地,静态字典编码可以通过改变静态字典的大小、字典中高频词排列顺序等来调整压缩效果。示例性地,滑窗字典编码可以通过改变滑动窗口大小来调整压缩效果。应注意,尽管上面列出了一些可能的压缩算法,但是本申请对此不限定,例如压缩算法还可以包括哈夫曼编码方式、算术编码方式、区间编码方式等。示例性地,哈夫曼编码可以根据符号出现的频率来构建哈夫曼树,并通过重建哈夫曼树来调整压缩效果。其中算术编码可以根据符号出现的概率计算符号串的概率,得到一个大于0且小于1的参数,并根据符号出现的概率重新计算符号串概率来调整压缩效果。区间编码可以根据符号出现的概率把符号串映射到大区间数值中的一段小区间,并根据符号出现的概率重新计算符号串概率来调整压缩效果。关于各种压缩算法可以参照已有技术,本申请中不再一一罗列。Exemplarily, the static dictionary encoding can adjust the compression effect by changing the size of the static dictionary, the arrangement order of high-frequency words in the dictionary, and the like. Exemplarily, the sliding window dictionary encoding can adjust the compression effect by changing the size of the sliding window. It should be noted that although some possible compression algorithms are listed above, the present application does not limit them. For example, compression algorithms may also include Huffman coding, arithmetic coding, interval coding, and the like. Exemplarily, the Huffman coding can construct a Huffman tree according to the frequency of symbols, and adjust the compression effect by rebuilding the Huffman tree. The arithmetic coding can calculate the probability of the symbol string according to the probability of the symbol occurrence, obtain a parameter greater than 0 and less than 1, and recalculate the probability of the symbol string according to the probability of the symbol occurrence to adjust the compression effect. Interval encoding can map a symbol string to a small interval in a large interval value according to the probability of symbol occurrence, and recalculate the symbol string probability according to the probability of symbol occurrence to adjust the compression effect. Regarding various compression algorithms, reference may be made to existing technologies, which will not be listed one by one in this application.
管理设备110向网络设备121发送440第二压缩策略。可选地,管理设备110还可以向网络设备121发送该第二压缩策略的标识,例如第二压缩策略的版本号、时间戳、或将时间戳通过预先定义的哈希序列加扰后的序列等。可选地,在第二压缩策略不同于第一压缩策略时,发送该第二压缩策略。The management device 110 sends 440 the second compression policy to the network device 121 . Optionally, the management device 110 may also send the identifier of the second compression policy to the network device 121, such as the version number of the second compression policy, a timestamp, or a sequence obtained by scrambling the timestamp through a predefined hash sequence wait. Optionally, when the second compression policy is different from the first compression policy, the second compression policy is sent.
本申请的实施例中,考虑到管理设备110处的强大处理能力,可以忽略管理设备110确定第二压缩策略的耗时,可以假设管理设备110确定和发送第二压缩策略是几乎同时进行的,例如假设为时刻t1。In the embodiment of the present application, considering the powerful processing capability at the management device 110, the time-consuming time for the management device 110 to determine the second compression strategy can be ignored, and it can be assumed that the management device 110 determines and sends the second compression strategy almost simultaneously, For example, assume time t1.
作为示例,可以假设该第二压缩策略的版本号为V1,时间戳为t1。As an example, it may be assumed that the version number of the second compression policy is V1, and the time stamp is t1.
第二压缩策略可以包括至少一个压缩算法,参考图5,第二压缩策略可以包括分组方式以及各组对应的压缩算法,如下表1所示。The second compression strategy may include at least one compression algorithm. Referring to FIG. 5 , the second compression strategy may include grouping methods and corresponding compression algorithms for each group, as shown in Table 1 below.
表1:第二压缩策略
Table 1: Second Compression Strategy
相应地,可理解,网络设备121可以在时刻t1接收来自管理设备110的第二压缩策略。Correspondingly, it can be understood that the network device 121 may receive the second compression policy from the management device 110 at time t1.
示例性地,网络设备121在接收到第二压缩策略之后,可以使用第二压缩策略压缩450数据,并向管理设备110发送460第二消息。相应地,管理设备110接收来自网络设备121的第二消息。Exemplarily, after receiving the second compression policy, the network device 121 may use the second compression policy to compress 450 the data, and send 460 the second message to the management device 110 . Correspondingly, the management device 110 receives the second message from the network device 121 .
具体而言,网络设备121可以将多列数据项按照第二压缩策略分为多个组,并且针对每个组使用对应的压缩算法进行压缩。Specifically, the network device 121 may divide the multi-column data items into multiple groups according to the second compression strategy, and perform compression using a corresponding compression algorithm for each group.
可选地,第二消息还可以进一步包括第二压缩策略的标识(如版本号V1),以便管理设备110确定如何解压。以此方式,能够避免网络设备121和管理设备110处的最新版本的压缩策略不一致而导致的数据解压错误。Optionally, the second message may further include an identifier of the second compression policy (such as a version number V1), so that the management device 110 determines how to decompress. In this way, it is possible to avoid data decompression errors caused by the inconsistency of the latest versions of the compression policies at the network device 121 and the management device 110 .
可理解,如果网络设备121未能成功接收到由管理设备110在时刻t1发送的第二压缩策略,那么网络设备121在时刻t1之后向管理设备110发送的消息与前述过程420发送的第一消息类似,为避免重复,这里不再赘述。对于管理设备110而言,其在发送第二压缩策略之后,如果发现网络设备121未使用第二压缩策略进行压缩,那么可以在重发时长之后向网络设备121重发第二压缩策略。例如假设重发时长为T0,那么可以在时刻t1+T0重发第二压缩策略。可选地,可以预先设定最大重发次数,如nr,则在t1+nr*T0之后,即使网络设备121依然没有收到第二压缩策略,管理设备110也不会再重发该第二压缩策略。It can be understood that if the network device 121 fails to receive the second compression policy sent by the management device 110 at time t1, then the message sent by the network device 121 to the management device 110 after time t1 is different from the first message sent by the aforementioned process 420 Similarly, to avoid repetition, details will not be repeated here. For the management device 110, after sending the second compression strategy, if it finds that the network device 121 does not use the second compression strategy for compression, it may resend the second compression strategy to the network device 121 after a retransmission time period. For example, assuming that the retransmission duration is T0, the second compression strategy may be retransmitted at time t1+T0. Optionally, the maximum number of retransmissions can be preset, such as nr, then after t1+nr*T0, even if the network device 121 still has not received the second compression policy, the management device 110 will not retransmit the second compression policy. Compression strategy.
管理设备110可以基于第二压缩策略对第二消息进行解压470。The management device 110 may decompress 470 the second message based on the second compression policy.
管理设备110确定480第三压缩策略。示例性地,管理设备110可以确定是否满足预设条件,并且可以在确定满足预设条件时,确定第三压缩策略。以此方式,能够实现对于压缩策略的更新,具体地将第二压缩策略更新为第三压缩策略,从而更能够适应网络设备121所测量的数据的变化。The management device 110 determines 480 a third compression policy. Exemplarily, the management device 110 may determine whether the preset condition is met, and may determine the third compression strategy when it is determined that the preset condition is met. In this way, it is possible to update the compression strategy, specifically to update the second compression strategy to the third compression strategy, so as to better adapt to changes in the data measured by the network device 121 .
在一些实施例中,预设条件可以包括:在确定第二压缩策略之后所经过的时长达到或超多预设时长。举例而言,假设预设时长为T,那么如果当前时刻>=t1+T,则可以确定第三压缩策略。可选地,可以将预设时长(即T)称为策略更新周期。以此方式,能够周期性地更新压缩策略,如此能够确保所使用的压缩策略与网络设备121策略的数据相对应,进而能够实现对于数据的无损压缩。In some embodiments, the preset condition may include: the time elapsed after the second compression strategy is determined reaches or exceeds a preset time length. For example, assuming that the preset duration is T, then if the current moment>=t1+T, the third compression strategy may be determined. Optionally, the preset time length (that is, T) may be referred to as a policy update period. In this way, the compression policy can be updated periodically, so that it can be ensured that the used compression policy corresponds to the data policyd by the network device 121 , and lossless compression of data can be realized.
在一些实施例中,预设条件可以包括:来自网络设备121的消息中各列数据项的数据类型和/或分布特征发生了变化。例如,在图5的示例中,列D中的数据项为分布稀疏的整数型,如果在时刻t0之后,列D中的数据项变得分布密集、数值变化更频繁。那么可以基于此重新确定第三压缩策略。例如,如果其余列中的数据项的数据类型、分布特征等基本不变,可以确定重新分组,将列A、列B和列E划分为一组,将列C、列D、列G和列H划分为一组,将列F划分为一组;并且随后可以针对各个组分别确定压缩算法。以此方式,能够基于数据项的变化来更新压缩策略,从而使得网络设备121对于测量的数据的在线序列化压缩能够保证性能,实现无损压缩。In some embodiments, the preset condition may include: the data type and/or distribution feature of each column of data items in the message from the network device 121 changes. For example, in the example in FIG. 5 , the data items in column D are of sparsely distributed integer type, if after time t0, the data items in column D become densely distributed and their values change more frequently. Then the third compression strategy can be re-determined based on this. For example, if the data types and distribution characteristics of the data items in the remaining columns are basically unchanged, you can determine to regroup, divide column A, column B, and column E into one group, and divide column C, column D, column G, and column H is divided into one group, column F is divided into one group; and then the compression algorithm can be determined separately for each group. In this way, the compression strategy can be updated based on the change of the data item, so that the online serialization compression of the measured data by the network device 121 can guarantee performance and realize lossless compression.
可选地,管理设备110确定第三压缩策略的方式可以参照上述过程430中确定第二压缩策略的实施例,为了简洁,这里不再赘述。 Optionally, for the manner in which the management device 110 determines the third compression policy, reference may be made to the embodiment of determining the second compression policy in the above-mentioned process 430 , and details are not repeated here for brevity.
管理设备110向网络设备121发送490第三压缩策略。可选地,管理设备110还可以向网络设备121发送该第三压缩策略的标识,例如第三压缩策略的版本号、时间戳等。作为示例,可以假设该第三压缩策略的版本号为V2,时间戳为t2。The management device 110 sends 490 the third compression policy to the network device 121 . Optionally, the management device 110 may also send the identifier of the third compression policy to the network device 121, such as the version number and time stamp of the third compression policy. As an example, it may be assumed that the version number of the third compression policy is V2, and the time stamp is t2.
示例性地,在过程490之后的进一步过程与上述过程440之后的过程类似,本申请中不再重复。Exemplarily, the further process after process 490 is similar to the process after process 440 above, which will not be repeated in this application.
应注意的是,为了简化描述,在上述实施例中未考虑网络设备121与管理设备110之间的传输时延,但在实际场景中,两者之间存在传输时延,例如为△t。例如,网络设备121在时刻t0发送第一消息,相应地管理设备110在时刻t0+△t接收到第一消息。在网络设备121与管理设备110之间的其余信息的传输时延是类似的,这里不再详细阐述。It should be noted that, in order to simplify the description, the transmission delay between the network device 121 and the management device 110 is not considered in the above embodiments, but in actual scenarios, there is a transmission delay between the two, for example, Δt. For example, the network device 121 sends the first message at time t0, and accordingly the management device 110 receives the first message at time t0+Δt. The transmission delays of other information between the network device 121 and the management device 110 are similar, and will not be described in detail here.
可理解,尽管结合图4的过程400仅描述了针对网络设备121的数据压缩过程,但是该过程也同样地适用于其余的网络设备。例如,针对每个网络设备120,管理设备110都可以分别确定各个网络设备的压缩策略。以此方式,管理设备110能够确定针对各个网络设备120的压缩策略。相应地,管理设备110能够得到局部(如以园区局域网为粒度)或全局(如与管理设备110交互的所有网络设备120)的压缩策略的统计信息,例如,各个版本的压缩策略、确定压缩策略所使用的神经网络模型、压缩策略被使用的历史时长等。It can be understood that although the data compression process for the network device 121 is only described in connection with the process 400 in FIG. 4 , this process is also applicable to other network devices. For example, for each network device 120, the management device 110 may respectively determine the compression policy of each network device. In this way, management device 110 is able to determine compression policies for individual network devices 120 . Correspondingly, the management device 110 can obtain local (for example, at the granularity of the campus LAN) or global (for example, all network devices 120 interacting with the management device 110) statistical information of the compression policy, for example, the compression policy of each version, determine the compression policy The neural network model used, the history of the compression strategy being used, etc.
可选地,在一些实施例中,针对重启或上电启动的另一网络设备,以网络设备122为例,管理设备110在接收到来自网络设备122的消息之前,可以向网络设备122发送压缩策略。举例而言,如果网络设备122在时刻t1至t2之间启动,并且网络设备122与网络设备121属于同一局域网,管理设备110可以将针对网络设备121的最新压缩策略(如上所述的时刻t1所确定的第二压缩策略)发送到网络设备122。例如,管理设备110可以确定网络设备122与网络设备121之间的相关性,并在相关性大于相关系数阈值(如80%或其他值)时,将针对网络设备121所确定的第二压缩策略发送到网络设备122,其中可以基于设备属性来确定相关性,设备属性可以包括但不限于设备的IP地址、设备的物理地址、设备的历史数据、设备的类型等。Optionally, in some embodiments, for another network device restarted or powered on, taking network device 122 as an example, before receiving a message from network device 122, management device 110 may send a compressed Strategy. For example, if the network device 122 starts between time t1 and t2, and the network device 122 and the network device 121 belong to the same local area network, the management device 110 can set the latest compression policy for the network device 121 (as mentioned above at time t1 to The determined second compression strategy) is sent to the network device 122. For example, the management device 110 may determine the correlation between the network device 122 and the network device 121, and when the correlation is greater than a correlation coefficient threshold (such as 80% or other values), the second compression strategy determined for the network device 121 sent to the network device 122, wherein the correlation may be determined based on device attributes, which may include but not limited to the IP address of the device, the physical address of the device, the historical data of the device, the type of the device, and the like.
举例而言,管理设备110可以基于统计信息,将历史使用时长最长的压缩策略发送到网络设备122。举例而言,管理设备110可以将压缩率最高的压缩策略发送到网络设备122。以此方式,新启动的网络设备(如网络设备122)能够基于管理设备110的指示进行数据压缩,避免未压缩数据造成的大带宽占用。For example, the management device 110 may send the compression policy with the longest historical usage time to the network device 122 based on the statistical information. For example, the management device 110 may send the compression policy with the highest compression ratio to the network device 122 . In this way, a newly started network device (such as the network device 122 ) can perform data compression based on the instruction of the management device 110 , avoiding large bandwidth occupation caused by uncompressed data.
以此方式,本申请的实施例中的管理设备基于多条记录对应的多个数据项确定压缩策略,对应的多个数据项具有相同的数据类型或者相同的分布特征,因此,管理设备更能够考虑相同数据类型的数据项或者相同分布特征的数据项之间的冗余,从而使得压缩率更高,这样能够使得压缩后的数据占用较小的带宽,节省成本。并且,管理设备能够基于更新周期或基于数据项的变化来更新压缩策略,从而确保所使用的压缩策略与数据项对应,保证了对于数据的无损压缩。In this way, the management device in the embodiment of the present application determines the compression strategy based on the multiple data items corresponding to the multiple records, and the corresponding multiple data items have the same data type or the same distribution characteristics. Therefore, the management device is more able to Consider the redundancy between data items of the same data type or data items of the same distribution characteristics, so as to make the compression rate higher, which can make the compressed data occupy less bandwidth and save costs. Moreover, the management device can update the compression strategy based on the update period or based on the change of the data item, so as to ensure that the used compression strategy corresponds to the data item and ensure the lossless compression of the data.
图6示出了根据本申请的一些实施例的数据压缩过程600的信令交互图。过程600涉及管理设备110和网络设备121。Fig. 6 shows a signaling interaction diagram of a data compression process 600 according to some embodiments of the present application. Process 600 involves management device 110 and network device 121 .
网络设备121通过测量得到610多条记录。作为示例,假设多条记录为N1条记录。关于多条记录可以参照前述结合图4的过程410以及结合图2的相关描述,例如多条记录可以被表示为多列,每一列中的多个数据项可以具有相同的数据类型,为了简洁,这里不再赘述。The network device 121 obtains more than 610 records through measurement. As an example, assume that the number of records is N1 records. For multiple records, refer to the aforementioned process 410 in conjunction with FIG. 4 and the related description in conjunction with FIG. 2. For example, multiple records can be represented as multiple columns, and multiple data items in each column can have the same data type. For brevity, I won't go into details here.
网络设备121基于多条记录确定620第一压缩策略。第一压缩策略可以包括第一压缩算 法和第一压缩参数。The network device 121 determines 620 a first compression policy based on the plurality of records. The first compression strategy may include a first compression algorithm method and the first compression parameter.
示例性地,网络设备121可以将多条记录以列为粒度划分为多组,每组中可以包括一列或多列。针对多组中的每个组,网络设备121可以分别确定压缩算法,例如不同的组可以使用不同的压缩算法和/或压缩参数。Exemplarily, the network device 121 may divide multiple records into multiple groups at column granularity, and each group may include one or more columns. For each of the multiple groups, the network device 121 may separately determine a compression algorithm, for example, different groups may use different compression algorithms and/or compression parameters.
具体而言,网络设备121确定第一压缩策略的过程与上述结合图4所描述的由管理设备110确定第二压缩策略的过程430是类似的,因此可以参考前述实施例中的相关描述,这里不再重复。Specifically, the process for the network device 121 to determine the first compression policy is similar to the process 430 for the management device 110 to determine the second compression policy described above in conjunction with FIG. Do not repeat.
网络设备121使用第一压缩策略压缩多条记录,以生成630第一消息。第一消息可以包括经压缩的多条记录,并且多条记录是以列的粒度被压缩的,即多条记录中同一列使用相同的压缩算法和压缩参数被压缩。The network device 121 compresses the plurality of records using a first compression strategy to generate 630 a first message. The first message may include multiple compressed records, and the multiple records are compressed at the column granularity, that is, the same column in the multiple records is compressed using the same compression algorithm and compression parameters.
网络设备121向管理设备110发送642第一消息。网络设备121向管理设备110发送644第一压缩策略。The network device 121 sends 642 the first message to the management device 110 . The network device 121 sends 644 the first compression policy to the management device 110 .
可选地,第一消息和第一压缩策略可以被承载于同一信令中被发送,或者可以被分别发送,本申请对此不限定。可选地,在发送的第一压缩策略还可以包括该第一压缩策略的标识,例如版本号、时间戳等。Optionally, the first message and the first compression policy may be carried in the same signaling and sent, or may be sent separately, which is not limited in this application. Optionally, the sent first compression policy may also include an identifier of the first compression policy, such as a version number, a time stamp, and the like.
管理设备110使用第一压缩策略对第一消息进行解压650,以得到多条记录。The management device 110 uses the first compression policy to decompress 650 the first message to obtain multiple records.
可理解,网络设备121可以继续进行数据测量,使用第一压缩策略进行压缩,并进一步向管理设备110发送经压缩的记录。示例性地,网络设备121可以按照上报周期来执行发送。可选地,在每次发送时,可以携带所使用的第一压缩策略的标识,以便管理设备110成功且正确地解压。It can be understood that the network device 121 may continue to perform data measurement, perform compression using the first compression strategy, and further send the compressed record to the management device 110 . Exemplarily, the network device 121 may perform sending according to a reporting period. Optionally, each sending may carry the identifier of the first compression policy used, so that the management device 110 can decompress successfully and correctly.
可选地,如图6所示,网络设备121可以确定660第二压缩策略。在本申请的一些实施例中,网络设备121可以在确定满足预设条件时,确定第二压缩策略。Optionally, as shown in FIG. 6 , the network device 121 may determine 660 a second compression policy. In some embodiments of the present application, the network device 121 may determine the second compression strategy when it is determined that the preset condition is met.
作为一例,预设条件可以是达到或超过了更新时长,例如从确定第一压缩策略之后经过的时长达到或超过了更新时长。也就是说,网络设备121可以按照更新时长为周期,来周期性地更新压缩策略。As an example, the preset condition may be that the update duration is reached or exceeded, for example, the time elapsed after the first compression strategy is determined reaches or exceeds the update duration. That is to say, the network device 121 may periodically update the compression policy according to the update period.
作为另一例,预设条件可以是记录中的数据项的数据类型或分布特征发生了变化。例如,在连续多个上报周期中,一列或多列数据项的数据类型改变或者分布特征改变。也就是说,网络设备121可以基于数据项的特征变化来更新压缩策略。As another example, the preset condition may be that the data type or distribution characteristics of the data items in the record have changed. For example, in multiple consecutive reporting periods, the data type or distribution feature of one or more columns of data items changes. That is, network device 121 may update the compression policy based on changes in characteristics of data items.
在一些实施例中,网络设备121可以基于多个上报周期中的多条记录中的各列数据项来确定第二压缩策略。例如,可以基于在确定第一压缩策略之后的更新时长内的全部或部分记录中的各列数据项来确定第二压缩策略。可理解,确定第二压缩策略的过程类似于前述确定第一压缩策略的过程,这里不再详述。In some embodiments, the network device 121 may determine the second compression policy based on each column of data items in multiple records in multiple reporting periods. For example, the second compression strategy may be determined based on the column data items in all or part of the records within the update duration after the first compression strategy is determined. It can be understood that the process of determining the second compression strategy is similar to the aforementioned process of determining the first compression strategy, and will not be described in detail here.
示例性地,网络设备121可以使用第二压缩策略对后续测量得到的记录进行压缩,并发送到管理设备110。网络设备121还可以将第二压缩策略发送到管理设备110,以便管理设备110进行成功解压。Exemplarily, the network device 121 may use the second compression strategy to compress the records obtained by the subsequent measurement, and send the records to the management device 110 . The network device 121 may also send the second compression policy to the management device 110, so that the management device 110 can successfully decompress.
以此方式,本申请的实施例中能够由网络设备121来基于相同类型的数据项来确定压缩策略,这样能够得到更准确的压缩策略,使得压缩率更大,这样能够减少带宽占用。In this way, in the embodiment of the present application, the network device 121 can determine the compression strategy based on the same type of data items, so that a more accurate compression strategy can be obtained, so that the compression rate is greater, and thus bandwidth occupation can be reduced.
应注意的是,尽管上面分别结合图4和图6,描述了由管理设备110确定压缩策略和由网络设备121确定压缩策略的实施例,但是上面的实施例并不是彼此独立的,它们也可以结合以得到其他的实施例。例如在图6的过程600中,管理设备110也可以将来自网络设备121 的第一压缩策略或第二压缩策略发送到另一网络设备122等。本申请的实施例不再对各种结合进行罗列。It should be noted that although the above embodiments are described in conjunction with FIG. 4 and FIG. 6 in which the compression strategy is determined by the management device 110 and the compression strategy is determined by the network device 121, the above embodiments are not independent of each other, and they can also be Combine to get other examples. For example, in the process 600 of FIG. 6 , the management device 110 may also send the The first compression policy or the second compression policy is sent to another network device 122 and so on. The embodiments of the present application do not list various combinations.
应理解,在本申请的实施例中,“第一”,“第二”,“第三”等表述只是为了表示多个对象可能是不同的,但是同时不排除两个对象之间是相同的。“第一”,“第二”,“第三”等表述不应当解释为对本申请实施例的任何限制。It should be understood that in the embodiments of the present application, expressions such as "first", "second", and "third" are only used to indicate that multiple objects may be different, but at the same time, it does not rule out that the two objects are the same . Expressions such as "first", "second", and "third" should not be construed as limiting the embodiments of the present application.
还应理解,本申请的实施例中的方式、情况、类别以及实施例的划分仅是为了描述的方便,不应构成特别的限定,各种方式、类别、情况以及实施例中的特征在符合逻辑的情况下,可以相互结合。It should also be understood that the divisions of methods, situations, categories and embodiments in the embodiments of the present application are only for the convenience of description, and should not constitute special limitations. Logical cases can be combined with each other.
还应理解,上述内容只是为了帮助本领域技术人员更好地理解本申请的实施例,而不是要限制本申请的实施例的范围。本领域技术人员根据上述内容,可以进行各种修改或变化或组合等。这样的修改、变化或组合后的方案也在本申请的实施例的范围内。It should also be understood that the foregoing content is only intended to help those skilled in the art better understand the embodiments of the present application, and is not intended to limit the scope of the embodiments of the present application. Those skilled in the art may make various modifications or changes or combinations based on the above contents. Such modifications, changes or combined solutions are also within the scope of the embodiments of the present application.
还应理解,上述内容的描述着重于强调各个实施例之前的不同之处,相同或相似之处可以互相参考或借鉴,为了简洁,这里不再赘述。It should also be understood that the above description focuses on the differences between the various embodiments, and the same or similar points may refer to or learn from each other, and for the sake of brevity, details are not repeated here.
图7示出了本申请的实施例提供的装置700的示意框图。装置700可以通过软件、硬件或者两者结合的方式实现。在一些实施例中,装置700可以被实现为如图1所示的管理设备110或者被实现为管理设备110中的芯片。Fig. 7 shows a schematic block diagram of an apparatus 700 provided by an embodiment of the present application. Apparatus 700 may be implemented by software, hardware or a combination of both. In some embodiments, the apparatus 700 may be implemented as the management device 110 shown in FIG. 1 or as a chip in the management device 110 .
如图7所示,装置700包括接收模块710、确定模块720和发送模块730。可选地,装置700还可以包括解压模块740。As shown in FIG. 7 , the apparatus 700 includes a receiving module 710 , a determining module 720 and a sending module 730 . Optionally, the device 700 may further include a decompression module 740 .
接收模块710被配置为接收来自第一网络设备的消息,消息包括多个第一数据项,多个第一数据项与多条记录的对应关系为一一对应,多个第一数据项分别来自于对应的记录。确定模块720被配置为基于多个第一数据项确定第一压缩策略。发送模块730被配置为向第一网络设备发送第一压缩策略。The receiving module 710 is configured to receive a message from the first network device, the message includes a plurality of first data items, the correspondence relationship between the plurality of first data items and the plurality of records is one-to-one correspondence, and the plurality of first data items are from to the corresponding record. The determining module 720 is configured to determine a first compression strategy based on the plurality of first data items. The sending module 730 is configured to send the first compression policy to the first network device.
在一些实施例中,多个第一数据项是基于第二压缩策略被压缩的。解压模块740可以被配置为使用第二压缩策略对多个第一数据项进行解压。In some embodiments, the plurality of first data items are compressed based on a second compression strategy. The decompression module 740 may be configured to decompress the plurality of first data items using a second compression strategy.
示例性地,确定模块720可以被配置为当满足条件时,基于经解压的多个第一数据项确定第一压缩策略。可选地,条件包括在确定第二压缩策略后所经过的时长达到或超过预设时长。可选地,条件包括用于确定第二压缩策略的多个数据项的数据类型与所述多个第一数据项的数据类型不同。可选地,条件包括用于确定第二压缩策略的多个数据项的分布特征和多个第一数据项的分布特征不同。Exemplarily, the determining module 720 may be configured to determine a first compression policy based on the decompressed multiple first data items when a condition is met. Optionally, the condition includes that the time elapsed after the second compression strategy is determined reaches or exceeds a preset time length. Optionally, the condition includes that the data types of the plurality of data items used to determine the second compression policy are different from the data types of the plurality of first data items. Optionally, the condition includes that the distribution characteristics of the plurality of data items used to determine the second compression policy are different from the distribution characteristics of the plurality of first data items.
具体而言,发送模块730可以被配置为当第一压缩策略与第二压缩策略不同时,向第一网络设备发送第一压缩策略。Specifically, the sending module 730 may be configured to send the first compression strategy to the first network device when the first compression strategy is different from the second compression strategy.
在一些实施例中,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。第一压缩算法或第二压缩算法包括以下至少一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。In some embodiments, the first compression strategy includes a first compression algorithm and first compression parameters, and the second compression strategy includes a second compression algorithm and second compression parameters. The first compression algorithm or the second compression algorithm includes at least one of the following: dictionary coding compression, difference coding compression, run-length coding compression, entropy coding compression, dictionary coding and entropy coding combined compression, or difference coding Compression combined with entropy coding.
可选地,发送模块730还可以被配置为向第二网络设备发送第一压缩策略,以使得第二网络设备基于第一压缩策略压缩多个第二数据项。多个第二数据项的数据类型与多个第一数据项的数据类型相同。Optionally, the sending module 730 may also be configured to send the first compression strategy to the second network device, so that the second network device compresses multiple second data items based on the first compression strategy. The data type of the plurality of second data items is the same as the data type of the plurality of first data items.
图7的装置700能够用于实现上述结合图3至图6中由管理设备110所述的各个过程,为了简洁,这里不再赘述。 The apparatus 700 in FIG. 7 can be used to implement the processes described above in conjunction with the management device 110 in FIG. 3 to FIG. 6 , and details are not repeated here for the sake of brevity.
图8示出了根据本申请的一些实施例的装置800的示意框图。装置800可以通过软件、硬件或者两者结合的方式实现。在一些实施例中,装置800可以被实现为如图1所示的网络设备120或者被实现为网络设备120中的芯片。Fig. 8 shows a schematic block diagram of an apparatus 800 according to some embodiments of the present application. Apparatus 800 may be implemented by software, hardware or a combination of both. In some embodiments, the apparatus 800 may be implemented as the network device 120 shown in FIG. 1 or as a chip in the network device 120 .
如图8所示,装置800包括发送模块810和接收模块820。可选地,装置800还可以包括压缩模块830和/或确定模块840。As shown in FIG. 8 , the device 800 includes a sending module 810 and a receiving module 820 . Optionally, the apparatus 800 may further include a compression module 830 and/or a determination module 840 .
发送模块810被配置为向管理设备发送消息,消息包括与多个数据项,多个数据项与多条记录的对应关系为一一对应,多个数据项分别来自于对应的记录。接收模块820被配置为接收来自管理设备的第一压缩策略,第一压缩策略是基于多个数据项被确定的。The sending module 810 is configured to send a message to the management device, the message includes multiple data items, and the correspondence between the multiple data items and the multiple records is a one-to-one correspondence, and the multiple data items come from corresponding records. The receiving module 820 is configured to receive a first compression strategy from the management device, the first compression strategy is determined based on a plurality of data items.
在一些实施例中,装置800还包括压缩模块830。压缩模块830被配置为使用第二压缩策略压缩数据项,其中消息包括经压缩的数据项。In some embodiments, the apparatus 800 also includes a compression module 830 . The compression module 830 is configured to compress the data item using a second compression strategy, wherein the message includes the compressed data item.
可选地,接收模块820还被配置为接收来自管理设备的第二压缩策略。或者可选地,确定模块840可以被配置为确定第二压缩策略,发送模块810还被配置为向管理设备发送第二压缩策略。Optionally, the receiving module 820 is further configured to receive the second compression policy from the management device. Or optionally, the determining module 840 may be configured to determine the second compression policy, and the sending module 810 is further configured to send the second compression policy to the management device.
示例性地,第一压缩策略包括第一压缩算法和第一压缩参数,第二压缩策略包括第二压缩算法和第二压缩参数。第一压缩算法或第二压缩算法包括以下至少一项:字典编码压缩方式,差值编码压缩方式,行程编码压缩方式,熵编码压缩方式,字典编码与熵编码结合的压缩方式,或差值编码与熵编码结合的压缩方式。Exemplarily, the first compression strategy includes a first compression algorithm and first compression parameters, and the second compression strategy includes a second compression algorithm and second compression parameters. The first compression algorithm or the second compression algorithm includes at least one of the following: dictionary coding compression, difference coding compression, run-length coding compression, entropy coding compression, dictionary coding and entropy coding combined compression, or difference coding Compression combined with entropy coding.
图8的装置800能够用于实现上述结合图3至图6中由网络设备120(包括网络设备121)所述的各个过程,为了简洁,这里不再赘述。The apparatus 800 in FIG. 8 can be used to implement the various processes described above in conjunction with the network device 120 (including the network device 121 ) in FIGS. 3 to 6 , and details are not repeated here for brevity.
本申请的实施例中对模块或单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时也可以有另外的划分方式,另外,在公开的实施例中的各功能单元可以集成在一个单元中,也可以是单独物理存在,也可以两个或两个以上单元集成为一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。The division of modules or units in the embodiments of the present application is schematic, and it is only a logical function division. In actual implementation, there may be other division methods. In addition, each functional unit in the disclosed embodiments can be integrated In one unit, it may exist separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
图9示出了可以用来实施本申请的实施例的示例设备900的示意性框图。设备900可以被实现为或者被包括在图1所示的管理设备110或网络设备120中。Fig. 9 shows a schematic block diagram of an example device 900 that may be used to implement embodiments of the present application. The device 900 may be implemented as or included in the management device 110 or the network device 120 shown in FIG. 1 .
如图所示,设备900包括中央处理单元(Central Processing Unit,CPU)901、只读存储器(Read-Only Memory,ROM)902以及随机存取存储器(Random Access Memory,RAM)903。CPU 901可以根据存储在ROM 902和/或RAM 903中的计算机程序指令或者从存储单元908加载到ROM 902和/或RAM 903中的计算机程序指令,来执行各种适当的动作和处理。在ROM 902和/或RAM 903中,还可存储设备900操作所需的各种程序和数据。CPU 901和ROM 902和/或RAM 903通过总线904彼此相连。输入/输出(Input/Output,I/O)接口905也连接至总线904。As shown in the figure, the device 900 includes a central processing unit (Central Processing Unit, CPU) 901, a read-only memory (Read-Only Memory, ROM) 902, and a random access memory (Random Access Memory, RAM) 903. The CPU 901 can perform various appropriate actions and processes according to computer program instructions stored in the ROM 902 and/or RAM 903 or loaded from the storage unit 908 into the ROM 902 and/or RAM 903. In the ROM 902 and/or the RAM 903, various programs and data necessary for the operation of the device 900 can also be stored. The CPU 901 and the ROM 902 and/or RAM 903 are connected to each other via a bus 904. An input/output (Input/Output, I/O) interface 905 is also connected to the bus 904 .
设备900中的多个部件连接至I/O接口905,包括:输入单元906,例如键盘、鼠标等;输出单元907,例如各种类型的显示器、扬声器等;存储单元908,例如磁盘、光盘等;以及通信单元909,例如网卡、调制解调器、无线通信收发机等。通信单元909允许设备900通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 900 are connected to the I/O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc. ; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
CPU 901可以是各种具有处理和计算能力的通用和/或专用处理组件。可以被实现为的一些示例包括但不限于图形处理单元(Graphics Processing Unit,GPU)、各种专用的人工智能(Artificial Intelligence,AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(Digital Signal Processor,DSP)、以及任何适当的处理器、控制器、微控制器等,相 应地可以被称为计算单元。CPU 901执行上文所描述的各个方法和处理。例如,在一些实施例中,上文所描述的过程可被实现为计算机软件程序,其被有形地包含于计算机可读介质,例如存储单元908。在一些实施例中,计算机程序的部分或者全部可以经由ROM 902和/或RAM 903和/或通信单元909而被载入和/或安装到设备900上。当计算机程序加载到ROM 902和/或RAM 903并由CPU 901执行时,可以执行上文描述的过程的一个或多个步骤。备选地,在其他实施例中,CPU 901可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行上文所描述的过程。CPU 901 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples that can be implemented include but are not limited to Graphics Processing Unit (Graphics Processing Unit, GPU), various dedicated artificial intelligence (Artificial Intelligence, AI) computing chips, various computing units that run machine learning model algorithms, digital signal Processor (Digital Signal Processor, DSP), and any appropriate processor, controller, microcontroller, etc., relative Accordingly, it can be called a computing unit. The CPU 901 executes the various methods and processes described above. For example, in some embodiments, the processes described above may be implemented as a computer software program tangibly embodied on a computer-readable medium, such as storage unit 908 . In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or RAM 903 and/or the communication unit 909 . When a computer program is loaded into ROM 902 and/or RAM 903 and executed by CPU 901, one or more steps of the process described above may be performed. Alternatively, in other embodiments, the CPU 901 may be configured in any other suitable manner (for example, by means of firmware) to execute the processes described above.
示例性地,图9中的设备900可以被实现为计算设备,或者可以被实现为计算设备中的芯片或芯片系统,本申请的实施例对此不限定。Exemplarily, the device 900 in FIG. 9 may be implemented as a computing device, or may be implemented as a chip or a chip system in the computing device, which is not limited by the embodiments of the present application.
本申请的实施例还提供了一种芯片,该芯片可以包括输入接口、输出接口和处理电路。在本申请的实施例中,可以由输入接口和输出接口完成信令或数据的交互,由处理电路完成信令或数据信息的生成以及处理。Embodiments of the present application also provide a chip, which may include an input interface, an output interface, and a processing circuit. In the embodiment of the present application, the interaction of signaling or data may be completed by the input interface and the output interface, and the generation and processing of signaling or data information may be completed by the processing circuit.
本申请的实施例还提供了一种芯片系统,包括处理器,用于支持计算设备以实现上述任一实施例中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,用于存储必要的程序指令和数据,当处理器运行该程序指令时,使得安装该芯片系统的设备实现上述任一实施例中所涉及的方法。示例性地,该芯片系统可以由一个或多个芯片构成,也可以包含芯片和其他分立器件。Embodiments of the present application also provide a chip system, including a processor, configured to support a computing device to implement the functions involved in any of the foregoing embodiments. In a possible design, the system-on-a-chip may further include a memory for storing necessary program instructions and data, and when the processor runs the program instructions, the device installed with the system-on-a-chip can implement the program described in any of the above-mentioned embodiments. Methods. Exemplarily, the chip system may consist of one or more chips, and may also include chips and other discrete devices.
本申请的实施例还提供了一种处理器,用于与存储器耦合,存储器存储有指令,当处理器运行所述指令时,使得处理器执行上述任一实施例中涉及的方法和功能。Embodiments of the present application further provide a processor, configured to be coupled with a memory, where instructions are stored in the memory, and when the processor executes the instructions, the processor executes the methods and functions involved in any of the foregoing embodiments.
本申请的实施例还提供了一种包含指令的计算机程序产品,其在计算机上运行时,使得计算机执行上述各实施例中任一实施例中涉及的方法和功能。Embodiments of the present application also provide a computer program product including instructions, which, when run on a computer, enable the computer to execute the methods and functions involved in any one of the above embodiments.
本申请的实施例还提供了一种计算机可读存储介质,其上存储有计算机指令,当处理器运行所述指令时,使得处理器执行上述任一实施例中涉及的方法和功能。Embodiments of the present application also provide a computer-readable storage medium, on which computer instructions are stored, and when a processor executes the instructions, the processor is made to execute the methods and functions involved in any of the above embodiments.
通常,本申请的各种实施例可以以硬件或专用电路、软件、逻辑或其任何组合来实现。一些方面可以用硬件实现,而其他方面可以用固件或软件实现,其可以由控制器,微处理器或其他计算设备执行。虽然本申请的实施例的各个方面被示出并描述为框图,流程图或使用一些其他图示表示,但是应当理解,本文描述的框,装置、系统、技术或方法可以实现为,如非限制性示例,硬件、软件、固件、专用电路或逻辑、通用硬件或控制器或其他计算设备,或其某种组合。In general, the various embodiments of the present application may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software, which may be executed by a controller, microprocessor or other computing device. While various aspects of the embodiments of the present application are shown and described as block diagrams, flowcharts, or using some other pictorial representation, it should be understood that the blocks, devices, systems, techniques or methods described herein may be implemented as, without limitation, Exemplary, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof.
本申请还提供有形地存储在非暂时性计算机可读存储介质上的至少一个计算机程序产品。该计算机程序产品包括计算机可执行指令,例如包括在程序模块中的指令,其在目标的真实或虚拟处理器上的设备中执行,以执行如上参考附图的过程/方法。通常,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、库、对象、类、组件、数据结构等。在各种实施例中,可以根据需要在程序模块之间组合或分割程序模块的功能。用于程序模块的机器可执行指令可以在本地或分布式设备内执行。在分布式设备中,程序模块可以位于本地和远程存储介质中。The present application also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product comprises computer-executable instructions, eg included in program modules, which are executed in a device on a real or virtual processor of a target to perform the process/method as above with reference to the accompanying drawings. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In various embodiments, the functionality of the program modules may be combined or divided as desired among the program modules. Machine-executable instructions for program modules may be executed within local or distributed devices. In a distributed device, program modules may be located in both local and remote storage media.
用于实现本申请的方法的计算机程序代码可以用一种或多种编程语言编写。这些计算机程序代码可以提供给通用计算机、专用计算机或其他可编程的数据处理装置的处理器,使得程序代码在被计算机或其他可编程的数据处理装置执行的时候,引起在流程图和/或框图中规定的功能/操作被实施。程序代码可以完全在计算机上、部分在计算机上、作为独立的软件包、 部分在计算机上且部分在远程计算机上或完全在远程计算机或服务器上执行。Computer program codes for implementing the methods of the present application may be written in one or more programming languages. These computer program codes can be provided to processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, so that when the program codes are executed by the computer or other programmable data processing devices, The functions/operations specified in are implemented. The program code may reside entirely on the computer, partly on the computer, as a stand-alone software package, Execute partly on the computer and partly on the remote computer or entirely on the remote computer or server.
在本申请的上下文中,计算机程序代码或者相关数据可以由任意适当载体承载,以使得设备、装置或者处理器能够执行上文描述的各种处理和操作。载体的示例包括信号、计算机可读介质、等等。信号的示例可以包括电、光、无线电、声音或其它形式的传播信号,诸如载波、红外信号等。In the context of the present application, computer program code or related data may be carried by any suitable carrier, so that a device, apparatus or processor can perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like. Examples of signals may include electrical, optical, radio, sound, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
计算机可读介质可以是包含或存储用于或有关于指令执行系统、装置或设备的程序的任何有形介质。计算机可读介质可以是计算机可读信号介质或计算机可读存储介质。计算机可读介质可以包括但不限于电子的、磁的、光学的、电磁的、红外的或半导体系统、装置或设备,或其任意合适的组合。计算机可读存储介质的更详细示例包括带有一根或多根导线的电气连接、便携式计算机磁盘、硬盘、随机存储存取器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)或闪存、光存储设备、磁存储设备,或其任意合适的组合。A computer readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of computer-readable storage media include electrical connections with one or more wires, portable computer diskettes, hard disks, random storage access memory (RAM), read-only memory (ROM), erasable programmable read-only Memory (Erasable Programmable Read-Only Memory, EPROM) or flash memory, optical storage device, magnetic storage device, or any suitable combination thereof.
此外,尽管在附图中以特定顺序描述了本申请的方法的操作,但是这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。相反,流程图中描绘的步骤可以改变执行顺序。附加地或备选地,可以省略某些步骤,将多个步骤组合为一个步骤执行,和/或将一个步骤分解为多个步骤执行。还应当注意,根据本申请的两个或更多装置的特征和功能可以在一个装置中具体化。反之,上文描述的一个装置的特征和功能可以进一步划分为由多个装置来具体化。In addition, while operations of the methods of the present application are depicted in a particular order in the figures, this does not require or imply that operations must be performed in that particular order, or that all illustrated operations must be performed, to achieve desirable results. Conversely, the steps depicted in the flowcharts may be performed in an altered order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present application may be embodied in one device. Conversely, the features and functions of one device described above may be further divided to be embodied by a plurality of devices.
以上已经描述了本申请的各实现,上述说明是示例性的,并非穷尽的,并且也不限于所公开的各实现。在不偏离所说明的各实现的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在很好地解释各实现的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其他普通技术人员能理解本文公开的各个实现方式。 Various implementations of the present application have been described above, and the above description is exemplary, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The choice of terminology used herein is intended to well explain the principles of each implementation, practical applications or improvements to technologies in the market, or to enable other ordinary skilled persons in the technical field to understand the various implementations disclosed herein.

Claims (30)

  1. 一种数据压缩方法,其特征在于,包括:A data compression method, characterized in that, comprising:
    管理设备接收来自第一网络设备的消息,所述消息包括多个第一数据项,所述多个第一数据项与多条记录的对应关系为一一对应,所述多个第一数据项分别来自于对应的记录;The management device receives a message from the first network device, the message includes a plurality of first data items, the correspondence between the plurality of first data items and the plurality of records is a one-to-one correspondence, and the plurality of first data items respectively from the corresponding records;
    所述管理设备基于所述多个第一数据项确定第一压缩策略;以及the management device determines a first compression policy based on the plurality of first data items; and
    所述管理设备向所述第一网络设备发送所述第一压缩策略。The management device sends the first compression policy to the first network device.
  2. 根据权利要求1所述的方法,其特征在于,所述多个第一数据项是基于第二压缩策略被压缩的,所述方法还包括:The method according to claim 1, wherein the plurality of first data items are compressed based on a second compression strategy, the method further comprising:
    所述管理设备使用所述第二压缩策略对所述多个第一数据项进行解压。The management device uses the second compression strategy to decompress the plurality of first data items.
  3. 根据权利要求2所述的方法,其特征在于,所述管理设备基于所述多个第一数据项确定第一压缩策略包括:The method according to claim 2, wherein said management device determining a first compression policy based on said plurality of first data items comprises:
    当满足条件时,所述管理设备基于经解压的所述多个第一数据项确定所述第一压缩策略。When a condition is met, the management device determines the first compression strategy based on the decompressed plurality of first data items.
  4. 根据权利要求3所述的方法,其特征在于,所述条件包括:The method according to claim 3, wherein the conditions include:
    所述管理设备在确定所述第二压缩策略后所经过的时长达到或超过预设时长。The elapsed time period after the management device determines the second compression policy reaches or exceeds a preset time period.
  5. 根据权利要求3所述的方法,其特征在于,所述条件包括:The method according to claim 3, wherein the conditions include:
    用于确定所述第二压缩策略的多个数据项的数据类型与所述多个第一数据项的数据类型不同,或者,用于确定所述第二压缩策略的多个数据项的分布特征和所述多个第一数据项的分布特征不同。The data types of the plurality of data items used to determine the second compression strategy are different from the data types of the plurality of first data items, or, the distribution characteristics of the plurality of data items used to determine the second compression strategy It is different from the distribution characteristics of the plurality of first data items.
  6. 根据权利要求2至5中任一项所述的方法,其特征在于,所述管理设备向所述第一网络设备发送所述第一压缩策略包括:The method according to any one of claims 2 to 5, wherein the sending the first compression policy by the management device to the first network device comprises:
    当所述第一压缩策略与所述第二压缩策略不同时,所述管理设备向所述第一网络设备发送所述第一压缩策略。When the first compression policy is different from the second compression policy, the management device sends the first compression policy to the first network device.
  7. 根据权利要求2至6中任一项所述的方法,其特征在于,所述第一压缩策略包括第一压缩算法和第一压缩参数,所述第二压缩策略包括第二压缩算法和第二压缩参数。The method according to any one of claims 2 to 6, wherein the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second Compression parameters.
  8. 根据权利要求7所述的方法,其特征在于,所述第一压缩算法或所述第二压缩算法包括以下至少一项:The method according to claim 7, wherein the first compression algorithm or the second compression algorithm comprises at least one of the following:
    字典编码压缩方式,Dictionary encoding compression method,
    差值编码压缩方式,Difference encoding compression method,
    行程编码压缩方式,Run-length encoding compression method,
    熵编码压缩方式,Entropy coding compression method,
    字典编码与熵编码结合的压缩方式,或A combination of dictionary encoding and entropy encoding, or
    差值编码与熵编码结合的压缩方式。A compression method combining difference coding and entropy coding.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 8, further comprising:
    所述管理设备向第二网络设备发送所述第一压缩策略,以使得所述第二网络设备基于所述第一压缩策略压缩多个第二数据项,所述多个第二数据项的数据类型与所述多个第一数据项的数据类型相同。The management device sends the first compression strategy to the second network device, so that the second network device compresses a plurality of second data items based on the first compression strategy, and the data of the plurality of second data items The type is the same as the data type of the plurality of first data items.
  10. 一种数据压缩方法,其特征在于,包括:A data compression method, characterized in that, comprising:
    网络设备向管理设备发送消息,所述消息包括多个数据项,所述多个数据项与多条记录的对应关系为一一对应,所述多个数据项分别来自于对应的记录;以及 The network device sends a message to the management device, the message includes a plurality of data items, the correspondence relationship between the plurality of data items and the plurality of records is one-to-one correspondence, and the plurality of data items come from corresponding records respectively; and
    所述网络设备接收来自所述管理设备的第一压缩策略,所述第一压缩策略是基于所述多个数据项被确定的。The network device receives a first compression policy from the management device, the first compression policy being determined based on the plurality of data items.
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:The method according to claim 10, characterized in that the method further comprises:
    所述网络设备使用第二压缩策略压缩所述数据项,其中所述消息包括经压缩的所述数据项。The network device compresses the data item using a second compression strategy, wherein the message includes the compressed data item.
  12. 根据权利要求11所述的方法,其特征在于,还包括:The method according to claim 11, further comprising:
    所述网络设备接收来自所述管理设备的所述第二压缩策略。The network device receives the second compression policy from the management device.
  13. 根据权利要求11所述的方法,其特征在于,所述方法还包括:The method according to claim 11, characterized in that the method further comprises:
    所述网络设备确定所述第二压缩策略;以及the network device determines the second compression policy; and
    所述网络设备向所述管理设备发送所述第二压缩策略。The network device sends the second compression policy to the management device.
  14. 根据权利要求11至13中任一项所述的方法,其特征在于,所述第一压缩策略包括第一压缩算法和第一压缩参数,所述第二压缩策略包括第二压缩算法和第二压缩参数。The method according to any one of claims 11 to 13, wherein the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second Compression parameters.
  15. 一种数据压缩装置,其特征在于,包括:A data compression device is characterized in that it comprises:
    接收模块,被配置为接收来自第一网络设备的消息,所述消息包括多个第一数据项,所述多个第一数据项与多条记录的对应关系为一一对应,所述多个第一数据项分别来自于对应的记录;The receiving module is configured to receive a message from the first network device, the message includes a plurality of first data items, the correspondence between the plurality of first data items and the plurality of records is one-to-one correspondence, and the plurality of The first data items are respectively from the corresponding records;
    确定模块,被配置为基于所述多个第一数据项确定第一压缩策略;以及a determining module configured to determine a first compression strategy based on the plurality of first data items; and
    发送模块,被配置为向所述第一网络设备发送所述第一压缩策略。A sending module configured to send the first compression policy to the first network device.
  16. 根据权利要求15所述的装置,其特征在于,所述多个第一数据项是基于第二压缩策略被压缩的,所述装置还包括解压模块,被配置为使用所述第二压缩策略对所述多个第一数据项进行解压。The device according to claim 15, wherein the plurality of first data items are compressed based on a second compression strategy, and the device further comprises a decompression module configured to use the second compression strategy for The plurality of first data items are decompressed.
  17. 根据权利要求16所述的装置,其特征在于,所述确定模块被配置为:The device according to claim 16, wherein the determination module is configured to:
    当满足条件时,基于经解压的所述多个第一数据项确定所述第一压缩策略。When a condition is met, the first compression strategy is determined based on the decompressed plurality of first data items.
  18. 根据权利要求17所述的装置,其特征在于,所述条件包括:The apparatus of claim 17, wherein the conditions include:
    在确定所述第二压缩策略后所经过的时长达到或超过预设时长。The elapsed time period after determining the second compression policy reaches or exceeds a preset time period.
  19. 根据权利要求17所述的装置,其特征在于,所述条件包括:The apparatus of claim 17, wherein the conditions include:
    用于确定所述第二压缩策略的多个数据项的数据类型与所述多个第一数据项的数据类型不同,或者,用于确定所述第二压缩策略的多个数据项的分布特征和所述多个第一数据项的分布特征不同。The data types of the plurality of data items used to determine the second compression strategy are different from the data types of the plurality of first data items, or, the distribution characteristics of the plurality of data items used to determine the second compression strategy It is different from the distribution characteristics of the plurality of first data items.
  20. 根据权利要求16至19中任一项所述的装置,其特征在于,所述发送模块被配置为:The device according to any one of claims 16 to 19, wherein the sending module is configured to:
    当所述第一压缩策略与所述第二压缩策略不同时,向所述第一网络设备发送所述第一压缩策略。When the first compression policy is different from the second compression policy, sending the first compression policy to the first network device.
  21. 根据权利要求16至20中任一项所述的装置,其特征在于,所述第一压缩策略包括第一压缩算法和第一压缩参数,所述第二压缩策略包括第二压缩算法和第二压缩参数。The device according to any one of claims 16 to 20, wherein the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second Compression parameters.
  22. 根据权利要求15至21中任一项所述的装置,其特征在于,所述发送模块还被配置为向第二网络设备发送所述第一压缩策略,以使得所述第二网络设备基于所述第一压缩策略压缩多个第二数据项,所述多个第二数据项的数据类型与所述多个第一数据项的数据类型相同。The device according to any one of claims 15 to 21, wherein the sending module is further configured to send the first compression policy to a second network device, so that the second network device based on the The first compression strategy compresses a plurality of second data items, and the data type of the plurality of second data items is the same as the data type of the plurality of first data items.
  23. 一种数据压缩装置,其特征在于,包括:A data compression device is characterized in that it comprises:
    发送模块,被配置为向管理设备发送消息,所述消息包括多个数据项,所述多个数据项 与多条记录的对应关系为一一对应,所述多个数据项分别来自于对应的记录;以及The sending module is configured to send a message to the management device, the message includes a plurality of data items, and the plurality of data items The correspondence relationship with multiple records is one-to-one correspondence, and the multiple data items are respectively from corresponding records; and
    接收模块,被配置为接收来自所述管理设备的第一压缩策略,所述第一压缩策略是基于所述多个数据项被确定的。A receiving module configured to receive a first compression strategy from the management device, the first compression strategy is determined based on the plurality of data items.
  24. 根据权利要求23所述的装置,其特征在于,还包括:The device according to claim 23, further comprising:
    压缩模块,被配置为使用第二压缩策略压缩所述数据项,其中所述消息包括经压缩的所述数据项。A compression module configured to compress the data item using a second compression strategy, wherein the message includes the compressed data item.
  25. 根据权利要求24所述的装置,其特征在于,所述接收模块还被配置为接收来自所述管理设备的所述第二压缩策略。The apparatus according to claim 24, wherein the receiving module is further configured to receive the second compression policy from the management device.
  26. 根据权利要求24所述的方法,其特征在于,还包括确定模块,被配置为确定所述第二压缩策略;以及The method according to claim 24, further comprising a determination module configured to determine the second compression strategy; and
    所述发送模块还被配置为向所述管理设备发送所述第二压缩策略。The sending module is further configured to send the second compression policy to the management device.
  27. 根据权利要求24至26中任一项所述的装置,其特征在于,所述第一压缩策略包括第一压缩算法和第一压缩参数,所述第二压缩策略包括第二压缩算法和第二压缩参数。The device according to any one of claims 24 to 26, wherein the first compression strategy includes a first compression algorithm and a first compression parameter, and the second compression strategy includes a second compression algorithm and a second Compression parameters.
  28. 一种电子设备,包括处理器和存储器,所述存储器上存储有计算机指令,当所述指令由所述处理器运行时使得所述电子设备执行根据权利要求1至14中任一项所述的方法。An electronic device comprising a processor and a memory, on which computer instructions are stored, which when executed by the processor cause the electronic device to perform the method according to any one of claims 1 to 14 method.
  29. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现根据权利要求1至14中任一项所述的方法。A computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method according to any one of claims 1 to 14 is implemented.
  30. 一种计算机程序产品,所述计算机程序产品上包含计算机可执行指令,所述计算机可执行指令在被执行时实现根据权利要求1至14中任一项所述的方法。 A computer program product having embodied thereon computer executable instructions which, when executed, implement the method of any one of claims 1 to 14.
PCT/CN2023/072668 2022-01-30 2023-01-17 Data compression method and apparatus WO2023143264A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210113903.5 2022-01-30
CN202210113903.5A CN116567079A (en) 2022-01-30 2022-01-30 Data compression method and device

Publications (1)

Publication Number Publication Date
WO2023143264A1 true WO2023143264A1 (en) 2023-08-03

Family

ID=87470660

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/072668 WO2023143264A1 (en) 2022-01-30 2023-01-17 Data compression method and apparatus

Country Status (2)

Country Link
CN (1) CN116567079A (en)
WO (1) WO2023143264A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702708A (en) * 2023-08-04 2023-09-05 陕西交通电子工程科技有限公司 Road pavement construction data management system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932464B (en) * 2023-09-14 2023-11-28 中移(苏州)软件技术有限公司 Data processing method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645538A (en) * 2017-08-14 2018-01-30 阿里巴巴集团控股有限公司 The method and device and electronic equipment of dynamic compression dictionary are provided
US20200393968A1 (en) * 2019-06-13 2020-12-17 International Business Machines Corporation Data compression utilizing low-ratio compression and delayed high-ratio compression
CN112655183A (en) * 2019-03-29 2021-04-13 Oppo广东移动通信有限公司 Method and apparatus for wireless communication
CN113422838A (en) * 2021-07-12 2021-09-21 中国电信股份有限公司 Method and device for realizing data synchronization, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645538A (en) * 2017-08-14 2018-01-30 阿里巴巴集团控股有限公司 The method and device and electronic equipment of dynamic compression dictionary are provided
CN112655183A (en) * 2019-03-29 2021-04-13 Oppo广东移动通信有限公司 Method and apparatus for wireless communication
US20200393968A1 (en) * 2019-06-13 2020-12-17 International Business Machines Corporation Data compression utilizing low-ratio compression and delayed high-ratio compression
CN113422838A (en) * 2021-07-12 2021-09-21 中国电信股份有限公司 Method and device for realizing data synchronization, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702708A (en) * 2023-08-04 2023-09-05 陕西交通电子工程科技有限公司 Road pavement construction data management system
CN116702708B (en) * 2023-08-04 2023-11-03 陕西交通电子工程科技有限公司 Road pavement construction data management system

Also Published As

Publication number Publication date
CN116567079A (en) 2023-08-08

Similar Documents

Publication Publication Date Title
WO2023143264A1 (en) Data compression method and apparatus
US11424760B2 (en) System and method for data compaction and security with extended functionality
US11385794B2 (en) System and method for data compaction and security using multiple encoding algorithms
US12061794B2 (en) System and method for multiple pass data compaction utilizing delta encoding
US20240329836A1 (en) System and method for data compaction and encryption of anonymized data records
US20240168631A1 (en) System and method for data compaction with codebook statistical estimates
US20240088912A1 (en) System and method for encrypted data compaction
US20240020006A1 (en) System and method for compaction of floating-point numbers within a dataset
US20240364359A1 (en) Data compression with intrusion detection
US20240072825A1 (en) System and method for encrypted data compression
US20230283292A1 (en) System and method for data compaction and security with extended functionality
WO2023019712A1 (en) Zlib compression algorithm-based cloud computing resource manager communication delay optimization method
WO2023061180A1 (en) Multi frequency-based data sending method and apparatus, multi frequency-based data receiving method and apparatus, and device
US8065374B2 (en) Application-level lossless compression
US20240372563A1 (en) Event-driven data transmission using codebooks with protocol adaption
US11967974B2 (en) System and method for data compression with protocol adaptation
US12147667B2 (en) System and method for codebook management based on data source grouping
US11811428B2 (en) System and method for data compression using genomic encryption techniques
US20240377949A1 (en) System and method for codebook management based on data source grouping
US20240211133A1 (en) Medical imaging data compression utilizing codebooks
US12057861B2 (en) System and method for extracting data from a compressed and encrypted data stream
US20240248602A1 (en) System and method for codebook management based on data source grouping
US20230315288A1 (en) System and method for data compaction and security using multiple encoding algorithms with pre-coding and complexity estimation
WO2024173899A1 (en) System and method for data compression with intrusion detection

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: 23746146

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE