[go: up one dir, main page]

CN114782559A - Frequency spectrum data compression method and device based on image DCT (discrete cosine transform) - Google Patents

Frequency spectrum data compression method and device based on image DCT (discrete cosine transform) Download PDF

Info

Publication number
CN114782559A
CN114782559A CN202210385884.1A CN202210385884A CN114782559A CN 114782559 A CN114782559 A CN 114782559A CN 202210385884 A CN202210385884 A CN 202210385884A CN 114782559 A CN114782559 A CN 114782559A
Authority
CN
China
Prior art keywords
spectral data
discrete cosine
data compression
image
image dct
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210385884.1A
Other languages
Chinese (zh)
Inventor
刘红杰
郭健
张政
陈鹏
洪卫军
赵光焰
崔睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJNG KNOWLEDGEABLE POWERISE TECHNOLOGY DEVELOPMENT CO LTD
Beijing Boshi Guanglian Technology Co ltd
Original Assignee
BEIJNG KNOWLEDGEABLE POWERISE TECHNOLOGY DEVELOPMENT CO LTD
Beijing Boshi Guanglian Technology Co ltd
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 BEIJNG KNOWLEDGEABLE POWERISE TECHNOLOGY DEVELOPMENT CO LTD, Beijing Boshi Guanglian Technology Co ltd filed Critical BEIJNG KNOWLEDGEABLE POWERISE TECHNOLOGY DEVELOPMENT CO LTD
Priority to CN202210385884.1A priority Critical patent/CN114782559A/en
Publication of CN114782559A publication Critical patent/CN114782559A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application provides a frequency spectrum data compression method and device based on image DCT (discrete cosine transformation), wherein the method comprises the following steps: equally dividing the received frequency spectrum data at the same time into three groups of frequency parts, respectively mapping to R, G, B three channels according to the signal intensity and splicing into an RGB picture; performing discrete cosine transformation on the RGB picture, and predicting errors under different compression ratios by the feature matrix subjected to the discrete cosine transformation according to a neural network until the errors are within a set acceptable range; the method and the device can effectively improve the compression storage capacity of the monitoring spectrum data.

Description

基于图像DCT变换的频谱数据压缩方法及装置Spectral data compression method and device based on image DCT transform

技术领域technical field

本申请涉及无线电监测领域,具体涉及一种基于图像DCT变换的频谱数据压缩方法及装置。The present application relates to the field of radio monitoring, and in particular, to a method and device for compressing spectral data based on image DCT transform.

背景技术Background technique

近些年,随着无线电频谱监测设备设施建设快速发展,无线电频谱监测网络规模越来越大,固定站、移动站、可搬移站等设备数量急速增加。站台设备数量的增加,使无线电频谱监测扫描、测量以及定位工作的开展更加方便快捷,使用无线信号监测设备开展工作的过程中,随之产生了类型多样的海量无线电频谱监测数据,如何快捷有效的存储这些数据以用作日后分析的工作显得十分重要。In recent years, with the rapid development of the construction of radio spectrum monitoring equipment and facilities, the scale of the radio spectrum monitoring network has become larger and larger, and the number of fixed stations, mobile stations, transportable stations and other equipment has increased rapidly. The increase in the number of station equipment has made the development of radio spectrum monitoring scanning, measurement and positioning more convenient and efficient. In the process of using wireless signal monitoring equipment to carry out work, various types of massive radio spectrum monitoring data are generated. How to quickly and effectively It is important to store this data for later analysis.

经实测数据显示,在40MHz实时带宽下,频谱数据采集量大小约3GB/小时,长时间、多设备的采集工作必然会生成大量的频谱数据。然而监测设备的存储能力存在上限,长时间的频谱监测采集将给其存储能力带来极大的挑战,所以如何进行频谱数据压缩,提升监测系统的数据存储能力是亟待解决的问题。The measured data shows that at a real-time bandwidth of 40MHz, the amount of spectrum data collected is about 3GB/hour, and a long-term, multi-device collection will inevitably generate a large amount of spectrum data. However, the storage capacity of monitoring equipment has an upper limit, and long-term spectrum monitoring and collection will bring great challenges to its storage capacity. Therefore, how to compress the spectrum data and improve the data storage capacity of the monitoring system is an urgent problem to be solved.

数据压缩是指在不丢失有用信息的前提下,缩减数据量以减少存储空间,提高传输、存储和处理效率,或按照一定的算法对数据进行重新组织,减少数据的冗余和存储的空间的一种技术。Data compression refers to reducing the amount of data to reduce storage space, improving transmission, storage and processing efficiency, or reorganizing data according to certain algorithms to reduce data redundancy and storage space without losing useful information. a technology.

数据压缩的主要作用是减少数据传输或转移过程中的数据量,待记录、传输的数据存在冗余度,既某些数据在可预见的位置上出现,这部分冗余数据可通过数据压缩处理后除去或减少;同时,相邻数据中间存在的相关性、频谱数据有一定的规律性与周期性等等,因此可以用某些变换尽可能去掉相关冗余。The main function of data compression is to reduce the amount of data in the process of data transmission or transfer. There is redundancy in the data to be recorded and transmitted, that is, some data appear in predictable locations, and this part of redundant data can be processed through data compression. At the same time, the correlation between adjacent data and the spectral data have certain regularity and periodicity, so some transformations can be used to remove the correlation redundancy as much as possible.

在压缩数据完整性层面上可以把压缩技术分为有损压缩和无损压缩两类。顾名思义,有损压缩是指压缩数据解压缩出来后和原数据是不一样的,具体差异依据算法不同表现各异,而无损压缩就是说压缩数据解压缩出来是和原数据百分百相同的。另外,有损压缩因为抛弃了一些不重要的内容,所以在压缩率上是比无损压缩要更低一些的,也因为二者各有各的优势,所以应用的场景也是不同的。At the level of compressed data integrity, compression techniques can be divided into two categories: lossy compression and lossless compression. As the name implies, lossy compression means that the compressed data is different from the original data after decompression, and the specific differences vary depending on the algorithm, while lossless compression means that the decompressed data is 100% the same as the original data. In addition, lossy compression has a lower compression rate than lossless compression because it discards some unimportant content, and because both have their own advantages, the application scenarios are also different.

发明内容SUMMARY OF THE INVENTION

针对现有技术中的问题,本申请提供一种基于图像DCT变换的频谱数据压缩方法及装置,能够有效提升对监测频谱数据的压缩存储能力。In view of the problems in the prior art, the present application provides a spectral data compression method and device based on image DCT transformation, which can effectively improve the compression and storage capability of monitoring spectral data.

为了解决上述问题中的至少一个,本申请提供以下技术方案:In order to solve at least one of the above problems, the present application provides the following technical solutions:

第一方面,本申请提供一种基于图像DCT变换的频谱数据压缩方法,包括:In a first aspect, the present application provides a spectral data compression method based on image DCT transformation, including:

将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;Divide the spectrum data received at the same time into three groups of frequency parts, and map them to the R, G, and B channels according to the signal strength, and form an RGB picture;

对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。The discrete cosine transform is performed on the RGB picture, and the feature matrix after the discrete cosine transform predicts the error under different compression rates according to the neural network, until the error is within the set acceptable range.

进一步地,所述将同一时刻的接收到的频谱数据等分成三组频率部分,包括:Further, dividing the received spectrum data at the same time into three groups of frequency parts, including:

将接收到频谱数据表示为二维数组并数据归一化处理到0-255区间范围内并取整,其中,横轴方向为频率、纵轴方向为时间,行数取列数的1/3向上取整;The received spectrum data is represented as a two-dimensional array, and the data is normalized to the range of 0-255 and rounded up. The horizontal axis is frequency, the vertical axis is time, and the number of rows is 1/3 of the number of columns. Rounded up;

若列数为3的整倍数,则直接三等分,若列数不可被三整除,则在右侧补全零列直至满足列数为3的整数倍。If the number of columns is an integer multiple of 3, it is directly divided into three equal parts. If the number of columns is not divisible by three, zero columns are filled on the right side until the number of columns is an integer multiple of 3.

进一步地,所述将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片,包括:Further, the spectrum data received at the same time is divided into three groups of frequency parts, and according to the signal strength, they are respectively mapped to the R, G, and B channels and assembled into an RGB picture, including:

对等分成三组频率部分在首行添加标记行,原数据列为255,添加的全零列为0;Divide the frequency parts into three groups equally and add a marked row in the first row, the original data column is 255, and the added all zero column is 0;

将扩充后的数组按列三等分,将三等分后的三个矩阵分别按数值大小映射到R、G、B的幅值并拼成一张RGB图片,其中,将左一矩阵对应到第一维R通道,左二矩阵对应到第二维G通道,最右侧矩阵对应到第三维B通道。Divide the expanded array into three equal columns, map the three matrixes after three equal divisions to the magnitudes of R, G, and B according to their numerical values, and form an RGB picture, in which the left matrix corresponds to the first matrix. The one-dimensional R channel, the left second matrix corresponds to the second-dimensional G channel, and the rightmost matrix corresponds to the third-dimensional B channel.

进一步地,所述经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内,包括:Further, the feature matrix after the discrete cosine transform predicts the error under different compression rates according to the neural network, until the error is within the set acceptable range, including:

通过预先训练好的机器学习模型选择特定的阈值对特征值进行筛选;Select a specific threshold to filter feature values through a pre-trained machine learning model;

按在[0.01,19.51]范围内按照0.5步进的长度遍历所有阈值,分别将待压缩图片的长、宽、阈值输入训练好的机器学习模型,输出图像质量预测值并根据需求动态选择压缩率,直至误差在设定可接受范围内。Traverse all thresholds in the range of [0.01, 19.51] according to the length of 0.5 steps, input the length, width and threshold of the image to be compressed into the trained machine learning model, output the image quality prediction value and dynamically select the compression rate according to the demand , until the error is within the set acceptable range.

第二方面,本申请提供一种基于图像DCT变换的频谱数据压缩装置,包括:In a second aspect, the present application provides a spectral data compression device based on image DCT transformation, comprising:

RGB映射模块,用于将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;The RGB mapping module is used to divide the spectrum data received at the same time into three groups of frequency parts, and map them to the R, G, and B channels according to the signal strength, and form an RGB picture;

数据压缩模块,用于对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。The data compression module is used to perform discrete cosine transform on the RGB picture, and the feature matrix after the discrete cosine transform predicts the error under different compression rates according to the neural network, until the error is within the set acceptable range.

第三方面,本申请提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现所述的基于图像DCT变换的频谱数据压缩方法的步骤。In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, the processor implements the image-based DCT transformation when the processor executes the program The steps of the spectral data compression method.

第四方面,本申请提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现所述的基于图像DCT变换的频谱数据压缩方法的步骤。In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the method for compressing spectral data based on image DCT transform.

第五方面,本申请提供一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现所述的基于图像DCT变换的频谱数据压缩方法的步骤。In a fifth aspect, the present application provides a computer program product, comprising a computer program/instruction, when the computer program/instruction is executed by a processor, the steps of the method for compressing spectral data based on image DCT transform are implemented.

由上述技术方案可知,本申请提供一种基于图像DCT变换的频谱数据压缩方法及装置,通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。It can be seen from the above technical solutions that the present application provides a method and device for compressing spectral data based on image DCT transformation. By adopting the RGB three-channel aliasing method, the compression rate is improved without causing excessive data recovery error loss. This can effectively improve the compression storage capability of the monitoring spectrum data.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are For some embodiments of the present application, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本申请实施例中的基于图像DCT变换的频谱数据压缩方法的流程示意图之一;FIG. 1 is one of the schematic flowcharts of the spectral data compression method based on image DCT transform in an embodiment of the application;

图2为本申请实施例中的基于图像DCT变换的频谱数据压缩方法的流程示意图之二;FIG. 2 is the second schematic flowchart of the spectral data compression method based on image DCT transform in the embodiment of the application;

图3为本申请实施例中的基于图像DCT变换的频谱数据压缩方法的流程示意图之三;3 is a third schematic flowchart of a method for compressing spectral data based on image DCT transform in an embodiment of the application;

图4为本申请实施例中的基于图像DCT变换的频谱数据压缩方法的流程示意图之四;4 is a fourth schematic flowchart of a method for compressing spectral data based on image DCT transform in an embodiment of the present application;

图5为本申请实施例中的基于图像DCT变换的频谱数据压缩装置的结构图;5 is a structural diagram of an apparatus for compressing spectral data based on image DCT transform in an embodiment of the present application;

图6为本申请一具体实施例中经过归一化处理的频谱数据通过灰度图显示出来的示意图;6 is a schematic diagram of normalized spectral data displayed by a grayscale image in a specific embodiment of the application;

图7为本申请一具体实施例中将频谱数据灰度图频率三等分后映射到R、G、B三通道中的示意图;FIG. 7 is a schematic diagram of mapping the frequency of a grayscale image of spectral data into three channels after three equal divisions into three channels of R, G, and B in a specific embodiment of the application;

图8为本申请一具体实施例中将三通道拼接成一张RGB图片的示意图;8 is a schematic diagram of splicing three channels into an RGB picture in a specific embodiment of the application;

图9为本申请实施例中的电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device in an embodiment of the present application.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本申请技术方案中对数据的获取、存储、使用、处理等均符合国家法律法规的相关规定。The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

考虑到现有技术中存在的问题,本申请提供一种基于图像DCT变换的频谱数据压缩方法及装置,通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。Considering the problems existing in the prior art, the present application provides a spectral data compression method and device based on image DCT transformation. By adopting the RGB three-channel aliasing method, the compression rate is improved without causing too much extra data. The error loss is recovered, thereby effectively improving the compression and storage capacity of the monitoring spectrum data.

为了能够有效提升对监测频谱数据的压缩存储能力,本申请提供一种基于图像DCT变换的频谱数据压缩方法的实施例,参见图1,所述基于图像DCT变换的频谱数据压缩方法具体包含有如下内容:In order to effectively improve the ability to compress and store monitoring spectral data, the present application provides an embodiment of a spectral data compression method based on image DCT transformation. Referring to FIG. 1 , the spectral data compression method based on image DCT transformation specifically includes the following: content:

步骤S101:将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;Step S101: Divide the spectrum data received at the same time into three groups of frequency parts equally, and map them to the R, G, and B channels respectively according to the signal strength and form an RGB picture;

具体步骤如下:Specific steps are as follows:

1.将收到频谱数据表示为二维数组,横轴方向为频率、纵轴方向为时间,并数据归一化处理到0-255区间范围内,并取整;行数取列数的1/3向上取整。1. Represent the received spectrum data as a two-dimensional array, the horizontal axis is frequency, the vertical axis is time, and the data is normalized to the range of 0-255, and rounded up; the number of rows is 1 of the number of columns /3 is rounded up.

Figure BDA0003593660630000051
Figure BDA0003593660630000051

2.若列数为3的整倍数,可直接三等分;若列数不可被三整除,在右侧补全零列直至满足列数为3的整数倍。2. If the number of columns is an integer multiple of 3, it can be directly divided into three equal parts; if the number of columns is not divisible by three, zero columns are filled on the right side until the number of columns is an integer multiple of 3.

3.在首行添加标记行,原数据列为255,添加的全零列为0。3. Add a marked row in the first row, the original data column is 255, and the added all zero column is 0.

Figure BDA0003593660630000052
Figure BDA0003593660630000052

4.将扩充后的数组按列三等分:4. Divide the expanded array into thirds by column:

Figure BDA0003593660630000053
Figure BDA0003593660630000053

5.将三个矩阵分别按数值大小映射到R、G、B的幅值:5. Map the three matrices to the magnitudes of R, G, and B according to their numerical values:

Figure BDA0003593660630000054
Figure BDA0003593660630000054

将左一矩阵对应到第一维R通道,左二矩阵对应到第二维G通道,最右侧矩阵对应到第三维B通道:数据归一化的方式计算

Figure BDA0003593660630000055
此时数据为0-255之间的数目,可直接取整并对应到RGB通道的色彩强度。The left matrix corresponds to the first-dimensional R channel, the left second matrix corresponds to the second-dimensional G channel, and the rightmost matrix corresponds to the third-dimensional B channel: calculated by data normalization
Figure BDA0003593660630000055
At this time, the data is a number between 0-255, which can be directly rounded and corresponding to the color intensity of the RGB channel.

步骤S102:对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。Step S102 : Perform discrete cosine transform on the RGB picture, and predict the error under different compression rates on the feature matrix after the discrete cosine transform according to the neural network, until the error is within a predetermined acceptable range.

1.再合成一张RGB图片,使用DCT变换,DCT变换原理如下:1. Synthesize another RGB image and use DCT transformation. The principle of DCT transformation is as follows:

Figure BDA0003593660630000061
Figure BDA0003593660630000061

Figure BDA0003593660630000062
Figure BDA0003593660630000062

2.通过预先训练好的机器学习模型选择特定的阈值对特征值进行筛选。按在[0.01,19.51]范围内按照0.5步进的长度遍历所有阈值,分别将待压缩图片的长、宽、阈值输入训练好的机器学习模型,可输出图像质量预测值,可根据需求动态选择压缩率。图像质量评估采用的

Figure BDA0003593660630000063
2. Select a specific threshold to filter the feature values through the pre-trained machine learning model. Traverse all thresholds in the range of [0.01, 19.51] according to the length of 0.5 steps, respectively input the length, width and threshold of the image to be compressed into the trained machine learning model, which can output the image quality prediction value, which can be dynamically selected according to demand Compression ratio. image quality assessment
Figure BDA0003593660630000063

3.在满足数据可接受误差范围内尽可能的提高压缩率。3. Improve the compression rate as much as possible within the acceptable error range of the data.

从上述描述可知,本申请实施例提供的基于图像DCT变换的频谱数据压缩方法,能够通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。It can be seen from the above description that the spectral data compression method based on image DCT transform provided by the embodiment of the present application can improve the compression rate by adopting the RGB three-channel aliasing method, and does not cause too much additional data recovery error loss. This can effectively improve the compressed storage capability of monitoring spectrum data.

在本申请的基于图像DCT变换的频谱数据压缩方法的一实施例中,参见图2,还可以具体包含如下内容:In an embodiment of the spectral data compression method based on image DCT transform of the present application, referring to FIG. 2 , the following content may also be specifically included:

步骤S201:将接收到频谱数据表示为二维数组并数据归一化处理到0-255区间范围内并取整,其中,横轴方向为频率、纵轴方向为时间,行数取列数的1/3向上取整;Step S201: Represent the received spectrum data as a two-dimensional array and normalize the data to the range of 0-255 and round it to an integer, wherein the horizontal axis is frequency, the vertical axis is time, and the number of rows is the number of columns. 1/3 rounded up;

步骤S202:若列数为3的整倍数,则直接三等分,若列数不可被三整除,则在右侧补全零列直至满足列数为3的整数倍。Step S202 : if the number of columns is an integer multiple of 3, directly divide into three equal parts; if the number of columns is not divisible by three, then fill in zero columns on the right side until the number of columns is an integer multiple of 3.

在本申请的基于图像DCT变换的频谱数据压缩方法的一实施例中,参见图3,还可以具体包含如下内容:In an embodiment of the spectral data compression method based on image DCT transform of the present application, referring to FIG. 3 , the following content may also be specifically included:

步骤S301:对等分成三组频率部分在首行添加标记行,原数据列为255,添加的全零列为0;Step S301: equally divided into three groups of frequency parts, add a marked row in the first row, the original data column is 255, and the added all-zero column is 0;

步骤S302:将扩充后的数组按列三等分,将三等分后的三个矩阵分别按数值大小映射到R、G、B的幅值并拼成一张RGB图片,其中,将左一矩阵对应到第一维R通道,左二矩阵对应到第二维G通道,最右侧矩阵对应到第三维B通道。Step S302: Divide the expanded array into thirds by column, map the three matrices after the trisection to the magnitudes of R, G, and B respectively according to their numerical values, and form an RGB picture, wherein the left matrix Corresponding to the first dimension R channel, the left second matrix corresponds to the second dimension G channel, and the rightmost matrix corresponds to the third dimension B channel.

在本申请的基于图像DCT变换的频谱数据压缩方法的一实施例中,参见图4,还可以具体包含如下内容:In an embodiment of the spectral data compression method based on image DCT transform of the present application, referring to FIG. 4 , the following content may also be specifically included:

步骤S401:通过预先训练好的机器学习模型选择特定的阈值对特征值进行筛选;Step S401: select a specific threshold to screen the feature value through a pre-trained machine learning model;

步骤S402:按在[0.01,19.51]范围内按照0.5步进的长度遍历所有阈值,分别将待压缩图片的长、宽、阈值输入训练好的机器学习模型,输出图像质量预测值并根据需求动态选择压缩率,直至误差在设定可接受范围内。Step S402: Traverse all thresholds in the range of [0.01, 19.51] with a length of 0.5 steps, input the length, width and threshold of the image to be compressed into the trained machine learning model, output the image quality prediction value and dynamically according to the demand Choose a compression ratio until the error is within the set acceptable range.

为了能够有效提升对监测频谱数据的压缩存储能力,本申请提供一种用于实现所述基于图像DCT变换的频谱数据压缩方法的全部或部分内容的基于图像DCT变换的频谱数据压缩装置的实施例,参见图5,所述基于图像DCT变换的频谱数据压缩装置具体包含有如下内容:In order to effectively improve the ability to compress and store monitoring spectral data, the present application provides an embodiment of an image DCT-based spectral data compression apparatus for implementing all or part of the image DCT-based spectral data compression method 5, the spectral data compression device based on image DCT transformation specifically includes the following contents:

RGB映射模块10,用于将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;The RGB mapping module 10 is used to equally divide the spectrum data received at the same moment into three groups of frequency parts, and map to three channels of R, G, and B respectively according to the signal strength, and make up an RGB picture;

数据压缩模块20,用于对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。The data compression module 20 is configured to perform discrete cosine transform on the RGB picture, and the feature matrix after the discrete cosine transform predicts the error under different compression rates according to the neural network until the error is within a predetermined acceptable range.

从上述描述可知,本申请实施例提供的基于图像DCT变换的频谱数据压缩装置,能够通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。It can be seen from the above description that the spectral data compression device based on image DCT transform provided by the embodiment of the present application can improve the compression rate by adopting the RGB three-channel aliasing method, and does not cause too much additional data recovery error loss. This can effectively improve the compressed storage capability of monitoring spectrum data.

为了更进一步说明本方案,本申请还提供一种应用上述基于图像DCT变换的频谱数据压缩装置实现基于图像DCT变换的频谱数据压缩方法的具体应用实例,参见图6至图8,具体包含有如下内容:In order to further illustrate this solution, the present application also provides a specific application example of applying the above-mentioned spectral data compression device based on image DCT transformation to realize the spectral data compression method based on image DCT transformation, see FIG. 6 to FIG. content:

具体步骤如下:Specific steps are as follows:

4.将收到频谱数据表示为二维数组,横轴方向为频率、纵轴方向为时间,并数据归一化处理到0-255区间范围内,并取整;行数取列数的1/3向上取整。4. Represent the received spectrum data as a two-dimensional array, the horizontal axis is frequency, the vertical axis is time, and the data is normalized to the range of 0-255, and rounded; the number of rows is 1 of the number of columns /3 is rounded up.

Figure BDA0003593660630000071
Figure BDA0003593660630000071

5.若列数为3的整倍数,可直接三等分;若列数不可被三整除,在右侧补全零列直至满足列数为3的整数倍。5. If the number of columns is an integer multiple of 3, it can be directly divided into three equal parts; if the number of columns is not divisible by three, fill in zero columns on the right side until the number of columns is an integer multiple of 3.

6.在首行添加标记行,原数据列为255,添加的全零列为0。6. Add a marked row in the first row, the original data column is 255, and the added all zero column is 0.

Figure BDA0003593660630000081
Figure BDA0003593660630000081

7.将扩充后的数组按列三等分:7. Divide the expanded array into thirds by column:

Figure BDA0003593660630000082
Figure BDA0003593660630000082

8.将三个矩阵分别按数值大小映射到R、G、B的幅值:8. Map the three matrices to the magnitudes of R, G, and B according to their numerical values:

Figure BDA0003593660630000083
Figure BDA0003593660630000083

9.将左一矩阵对应到第一维R通道,左二矩阵对应到第二维G通道,最右侧矩阵对应到第三维B通道:数据归一化的方式计算

Figure BDA0003593660630000084
此时数据为0-255之间的数目,可直接取整并对应到RGB通道的色彩强度。9. The left matrix corresponds to the first-dimensional R channel, the left second matrix corresponds to the second-dimensional G channel, and the rightmost matrix corresponds to the third-dimensional B channel: calculated by data normalization
Figure BDA0003593660630000084
At this time, the data is a number between 0-255, which can be directly rounded and corresponding to the color intensity of the RGB channel.

10.再合成一张RGB图片,使用DCT变换,DCT变换原理如下:10. Synthesize another RGB image and use DCT transformation. The principle of DCT transformation is as follows:

Figure BDA0003593660630000085
Figure BDA0003593660630000085

Figure BDA0003593660630000086
Figure BDA0003593660630000086

11.通过预先训练好的机器学习模型选择特定的阈值对特征值进行筛选。按在[0.01,19.51]范围内按照0.5步进的长度遍历所有阈值,分别将待压缩图片的长、宽、阈值输入训练好的机器学习模型,可输出图像质量预测值,可根据需求动态选择压缩率。图像质量评估采用的

Figure BDA0003593660630000087
11. Select a specific threshold to filter the feature values through the pre-trained machine learning model. Traverse all thresholds in the range of [0.01, 19.51] according to the length of 0.5 steps, respectively input the length, width and threshold of the image to be compressed into the trained machine learning model, which can output the image quality prediction value, which can be dynamically selected according to demand Compression ratio. image quality assessment
Figure BDA0003593660630000087

12.在满足数据可接受误差范围内尽可能的提高压缩率。12. Improve the compression rate as much as possible within the acceptable error range of the data.

解压缩过程:将压缩后的数据按JPEG恢复后,分离RGB三通道的颜色数据,并按顺序拼接成单通道的二维数组,恢复成频谱数据。Decompression process: After the compressed data is restored by JPEG, the color data of the RGB three channels is separated, and spliced into a single-channel two-dimensional array in sequence, and restored into spectrum data.

Figure BDA0003593660630000091
Figure BDA0003593660630000091

Figure BDA0003593660630000092
Figure BDA0003593660630000092

从硬件层面来说,为了能够有效提升对监测频谱数据的压缩存储能力,本申请提供一种用于实现所述基于图像DCT变换的频谱数据压缩方法中的全部或部分内容的电子设备的实施例,所述电子设备具体包含有如下内容:From the perspective of hardware, in order to effectively improve the compression and storage capacity of monitoring spectrum data, the present application provides an embodiment of an electronic device for implementing all or part of the spectrum data compression method based on image DCT transform , the electronic equipment specifically includes the following contents:

处理器(processor)、存储器(memory)、通信接口(Communications Interface)和总线;其中,所述处理器、存储器、通信接口通过所述总线完成相互间的通信;所述通信接口用于实现基于图像DCT变换的频谱数据压缩装置与核心业务系统、用户终端以及相关数据库等相关设备之间的信息传输;该逻辑控制器可以是台式计算机、平板电脑及移动终端等,本实施例不限于此。在本实施例中,该逻辑控制器可以参照实施例中的基于图像DCT变换的频谱数据压缩方法的实施例,以及基于图像DCT变换的频谱数据压缩装置的实施例进行实施,其内容被合并于此,重复之处不再赘述。a processor, a memory, a Communications Interface and a bus; wherein the processor, the memory, and the communication interface complete communication with each other through the bus; the communication interface is used to implement image-based Information transmission between the spectral data compression device of DCT transformation and related equipment such as core service systems, user terminals, and related databases; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, etc., and this embodiment is not limited thereto. In this embodiment, the logic controller may be implemented with reference to the embodiment of the spectral data compression method based on image DCT transformation and the embodiment of the spectral data compression device based on image DCT transformation in the embodiments, and the contents of which are incorporated in Therefore, the repetition will not be repeated here.

可以理解的是,所述用户终端可以包括智能手机、平板电子设备、网络机顶盒、便携式计算机、台式电脑、个人数字助理(PDA)、车载设备、智能穿戴设备等。其中,所述智能穿戴设备可以包括智能眼镜、智能手表、智能手环等。It can be understood that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, and the like. Wherein, the smart wearable device may include smart glasses, smart watches, smart bracelets, and the like.

在实际应用中,基于图像DCT变换的频谱数据压缩方法的部分可以在如上述内容所述的电子设备侧执行,也可以所有的操作都在所述客户端设备中完成。具体可以根据所述客户端设备的处理能力,以及用户使用场景的限制等进行选择。本申请对此不作限定。若所有的操作都在所述客户端设备中完成,所述客户端设备还可以包括处理器。In practical applications, part of the spectral data compression method based on image DCT transformation may be performed on the side of the electronic device as described above, or all operations may be completed in the client device. Specifically, the selection can be made according to the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are performed in the client device, the client device may also include a processor.

上述的客户端设备可以具有通信模块(即通信单元),可以与远程的服务器进行通信连接,实现与所述服务器的数据传输。所述服务器可以包括任务调度中心一侧的服务器,其他的实施场景中也可以包括中间平台的服务器,例如与任务调度中心服务器有通信链接的第三方服务器平台的服务器。所述的服务器可以包括单台计算机设备,也可以包括多个服务器组成的服务器集群,或者分布式装置的服务器结构。The above-mentioned client device may have a communication module (ie, a communication unit), which may be communicatively connected with a remote server to realize data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster composed of multiple servers, or a server structure of a distributed device.

图9为本申请实施例的电子设备9600的系统构成的示意框图。如图9所示,该电子设备9600可以包括中央处理器9100和存储器9140;存储器9140耦合到中央处理器9100。值得注意的是,该图9是示例性的;还可以使用其他类型的结构,来补充或代替该结构,以实现电信功能或其他功能。FIG. 9 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in FIG. 9 , the electronic device 9600 may include a central processing unit 9100 and a memory 9140 ; the memory 9140 is coupled to the central processing unit 9100 . Notably, this FIG. 9 is exemplary; other types of structures may be used in addition to or in place of this structure to implement telecommunication functions or other functions.

一实施例中,基于图像DCT变换的频谱数据压缩方法功能可以被集成到中央处理器9100中。其中,中央处理器9100可以被配置为进行如下控制:In one embodiment, the function of the spectral data compression method based on image DCT transform may be integrated into the central processing unit 9100 . Wherein, the central processing unit 9100 can be configured to perform the following controls:

步骤S101:将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;Step S101: Divide the spectrum data received at the same time into three groups of frequency parts equally, and map them to the R, G, and B channels respectively according to the signal strength and form an RGB picture;

步骤S102:对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。Step S102 : Perform discrete cosine transform on the RGB picture, and predict the error under different compression rates on the feature matrix after the discrete cosine transform according to the neural network, until the error is within a predetermined acceptable range.

从上述描述可知,本申请实施例提供的电子设备,通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。It can be seen from the above description that the electronic device provided by the embodiment of the present application improves the compression rate by adopting the RGB three-channel aliasing method, and does not cause excessive data recovery error loss, thereby effectively improving the monitoring of spectrum data. compression storage capacity.

在另一个实施方式中,基于图像DCT变换的频谱数据压缩装置可以与中央处理器9100分开配置,例如可以将基于图像DCT变换的频谱数据压缩装置配置为与中央处理器9100连接的芯片,通过中央处理器的控制来实现基于图像DCT变换的频谱数据压缩方法功能。In another embodiment, the spectral data compression device based on image DCT transformation can be configured separately from the central processing unit 9100, for example, the spectral data compression device based on image DCT transformation can be configured as a chip connected to the central processing unit 9100, through the central processing unit 9100. The control of the processor realizes the function of the spectral data compression method based on the image DCT transform.

如图9所示,该电子设备9600还可以包括:通信模块9110、输入单元9120、音频处理器9130、显示器9160、电源9170。值得注意的是,电子设备9600也并不是必须要包括图9中所示的所有部件;此外,电子设备9600还可以包括图9中没有示出的部件,可以参考现有技术。As shown in FIG. 9 , the electronic device 9600 may further include: a communication module 9110 , an input unit 9120 , an audio processor 9130 , a display 9160 , and a power supply 9170 . It is worth noting that the electronic device 9600 does not necessarily include all the components shown in FIG. 9 ; in addition, the electronic device 9600 may also include components not shown in FIG. 9 , and reference may be made to the prior art.

如图9所示,中央处理器9100有时也称为控制器或操作控件,可以包括微处理器或其他处理器装置和/或逻辑装置,该中央处理器9100接收输入并控制电子设备9600的各个部件的操作。As shown in FIG. 9 , a central processing unit 9100 , sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, and the central processing unit 9100 receives input and controls various aspects of the electronic device 9600 component operation.

其中,存储器9140,例如可以是缓存器、闪存、硬驱、可移动介质、易失性存储器、非易失性存储器或其它合适装置中的一种或更多种。可储存上述与失败有关的信息,此外还可存储执行有关信息的程序。并且中央处理器9100可执行该存储器9140存储的该程序,以实现信息存储或处理等。The memory 9140, for example, may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure can be stored, and a program executing the related information can also be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing.

输入单元9120向中央处理器9100提供输入。该输入单元9120例如为按键或触摸输入装置。电源9170用于向电子设备9600提供电力。显示器9160用于进行图像和文字等显示对象的显示。该显示器例如可为LCD显示器,但并不限于此。The input unit 9120 provides input to the central processing unit 9100 . The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600 . The display 9160 is used for displaying display objects such as images and characters. The display can be, for example, but not limited to, an LCD display.

该存储器9140可以是固态存储器,例如,只读存储器(ROM)、随机存取存储器(RAM)、SIM卡等。还可以是这样的存储器,其即使在断电时也保存信息,可被选择性地擦除且设有更多数据,该存储器的示例有时被称为EPROM等。存储器9140还可以是某种其它类型的装置。存储器9140包括缓冲存储器9141(有时被称为缓冲器)。存储器9140可以包括应用/功能存储部9142,该应用/功能存储部9142用于存储应用程序和功能程序或用于通过中央处理器9100执行电子设备9600的操作的流程。The memory 9140 may be solid state memory such as read only memory (ROM), random access memory (RAM), SIM card, and the like. There may also be memories that retain information even when powered off, selectively erased and provided with more data, examples of which are sometimes referred to as EPROMs or the like. Memory 9140 may also be some other type of device. Memory 9140 includes buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage part 9142 for storing application programs and function programs or for performing operations of the electronic device 9600 through the central processing unit 9100 .

存储器9140还可以包括数据存储部9143,该数据存储部9143用于存储数据,例如联系人、数字数据、图片、声音和/或任何其他由电子设备使用的数据。存储器9140的驱动程序存储部9144可以包括电子设备的用于通信功能和/或用于执行电子设备的其他功能(如消息传送应用、通讯录应用等)的各种驱动程序。The memory 9140 may also include data storage 9143 for storing data such as contacts, digital data, pictures, sounds and/or any other data used by the electronic device. The driver storage section 9144 of the memory 9140 may include various drivers of the electronic device for communication functions and/or for executing other functions of the electronic device (eg, a messaging application, a contact book application, etc.).

通信模块9110即为经由天线9111发送和接收信号的发送机/接收机9110。通信模块(发送机/接收机)9110耦合到中央处理器9100,以提供输入信号和接收输出信号,这可以和常规移动通信终端的情况相同。The communication module 9110 is the transmitter/receiver 9110 that transmits and receives signals via the antenna 9111 . A communication module (transmitter/receiver) 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, as may be the case with conventional mobile communication terminals.

基于不同的通信技术,在同一电子设备中,可以设置有多个通信模块9110,如蜂窝网络模块、蓝牙模块和/或无线局域网模块等。通信模块(发送机/接收机)9110还经由音频处理器9130耦合到扬声器9131和麦克风9132,以经由扬声器9131提供音频输出,并接收来自麦克风9132的音频输入,从而实现通常的电信功能。音频处理器9130可以包括任何合适的缓冲器、解码器、放大器等。另外,音频处理器9130还耦合到中央处理器9100,从而使得可以通过麦克风9132能够在本机上录音,且使得可以通过扬声器9131来播放本机上存储的声音。Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module, and/or a wireless local area network module. The communication module (transmitter/receiver) 9110 is also coupled to the speaker 9131 and the microphone 9132 via the audio processor 9130 to provide audio output via the speaker 9131 and to receive audio input from the microphone 9132 for general telecommunication functions. Audio processor 9130 may include any suitable buffers, decoders, amplifiers, and the like. In addition, the audio processor 9130 is also coupled to the central processing unit 9100, thereby enabling recording on the local unit through the microphone 9132, and enabling playback of the sound stored on the local unit through the speaker 9131.

本申请的实施例还提供能够实现上述实施例中的执行主体为服务器或客户端的基于图像DCT变换的频谱数据压缩方法中全部步骤的一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中的执行主体为服务器或客户端的基于图像DCT变换的频谱数据压缩方法的全部步骤,例如,所述处理器执行所述计算机程序时实现下述步骤:The embodiments of the present application also provide a computer-readable storage medium capable of implementing all steps in the image DCT-transform-based spectral data compression method in the above-mentioned embodiments, where the execution body is a server or a client, and the computer-readable storage medium is stored on the computer-readable storage medium. A computer program is stored, and when the computer program is executed by the processor, it realizes all the steps of the image DCT transform-based spectral data compression method in the above-mentioned embodiment where the execution body is a server or a client. For example, the processor executes the computer program. When implementing the following steps:

步骤S101:将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;Step S101: Divide the spectrum data received at the same time into three groups of frequency parts equally, and map them to the R, G, and B channels respectively according to the signal strength and form an RGB picture;

步骤S102:对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。Step S102 : Perform discrete cosine transform on the RGB picture, and predict the error under different compression rates on the feature matrix after the discrete cosine transform according to the neural network, until the error is within a predetermined acceptable range.

从上述描述可知,本申请实施例提供的计算机可读存储介质,通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。It can be seen from the above description that the computer-readable storage medium provided by the embodiment of the present application improves the compression rate by adopting the RGB three-channel aliasing method, and does not cause excessive data recovery error loss, thereby effectively improving the data recovery. Monitor the compressed storage capacity of spectrum data.

本申请的实施例还提供能够实现上述实施例中的执行主体为服务器或客户端的基于图像DCT变换的频谱数据压缩方法中全部步骤的一种计算机程序产品,该计算机程序/指令被处理器执行时实现所述的基于图像DCT变换的频谱数据压缩方法的步骤,例如,所述计算机程序/指令实现下述步骤:The embodiments of the present application also provide a computer program product capable of implementing all the steps in the method for compressing spectral data based on image DCT transform in which the execution body is the server or the client in the foregoing embodiments. When the computer program/instruction is executed by the processor The steps of implementing the method for compressing spectral data based on image DCT transformation, for example, the computer program/instruction implements the following steps:

步骤S101:将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;Step S101: Divide the spectrum data received at the same time into three groups of frequency parts equally, and map them to the R, G, and B channels respectively according to the signal strength and form an RGB picture;

步骤S102:对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。Step S102 : Perform discrete cosine transform on the RGB picture, and predict the error under different compression rates on the feature matrix after the discrete cosine transform according to the neural network, until the error is within a predetermined acceptable range.

从上述描述可知,本申请实施例提供的计算机程序产品,通过采用RGB三通道混叠的方式,提升了压缩率,且没有过多造成额外的数据恢复误差损失,由此能够有效提升对监测频谱数据的压缩存储能力。It can be seen from the above description that the computer program product provided by the embodiment of the present application improves the compression rate by adopting the RGB three-channel aliasing method, and does not cause excessive data recovery error loss, thereby effectively improving the monitoring frequency spectrum. Compression storage capacity of data.

本领域内的技术人员应明白,本发明的实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (apparatus), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

本发明中应用了具体实施例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。In the present invention, the principles and implementations of the present invention are described by using specific embodiments, and the descriptions of the above embodiments are only used to help understand the method and the core idea of the present invention; The idea of the invention will have changes in the specific implementation and application scope. To sum up, the content of this specification should not be construed as a limitation to the present invention.

Claims (8)

1.一种基于图像DCT变换的频谱数据压缩方法,其特征在于,所述方法包括:1. a spectral data compression method based on image DCT transformation, is characterized in that, described method comprises: 将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;Divide the spectrum data received at the same time into three groups of frequency parts, and map them to the R, G, and B channels according to the signal strength, and form an RGB picture; 对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。The discrete cosine transform is performed on the RGB picture, and the feature matrix after the discrete cosine transform predicts the error under different compression rates according to the neural network, until the error is within the set acceptable range. 2.根据权利要求1所述的基于图像DCT变换的频谱数据压缩方法,其特征在于,所述将同一时刻的接收到的频谱数据等分成三组频率部分,包括:2. The spectral data compression method based on image DCT transformation according to claim 1, wherein the received spectral data at the same moment is equally divided into three groups of frequency parts, comprising: 将接收到频谱数据表示为二维数组并数据归一化处理到0-255区间范围内并取整,其中,横轴方向为频率、纵轴方向为时间,行数取列数的1/3向上取整;The received spectrum data is represented as a two-dimensional array, and the data is normalized to the range of 0-255 and rounded up. The horizontal axis is frequency, the vertical axis is time, and the number of rows is 1/3 of the number of columns. Rounded up; 若列数为3的整倍数,则直接三等分,若列数不可被三整除,则在右侧补全零列直至满足列数为3的整数倍。If the number of columns is an integer multiple of 3, it is directly divided into three equal parts. If the number of columns is not divisible by three, zero columns are filled on the right side until the number of columns is an integer multiple of 3. 3.根据权利要求1所述的基于图像DCT变换的频谱数据压缩方法,其特征在于,所述将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片,包括:3. the spectral data compression method based on image DCT transformation according to claim 1, is characterized in that, the described spectral data received at the same moment is equally divided into three groups of frequency parts, and is mapped to R, G and B three channels are combined into a RGB picture, including: 对等分成三组频率部分在首行添加标记行,原数据列为255,添加的全零列为0;Divide the frequency parts into three groups equally and add a marked row in the first row, the original data column is 255, and the added all zero column is 0; 将扩充后的数组按列三等分,将三等分后的三个矩阵分别按数值大小映射到R、G、B的幅值并拼成一张RGB图片,其中,将左一矩阵对应到第一维R通道,左二矩阵对应到第二维G通道,最右侧矩阵对应到第三维B通道。Divide the expanded array into three equal columns, map the three matrixes after three equal divisions to the magnitudes of R, G, and B according to their numerical values, and form an RGB picture, in which the left matrix corresponds to the first matrix. The one-dimensional R channel, the left second matrix corresponds to the second-dimensional G channel, and the rightmost matrix corresponds to the third-dimensional B channel. 4.根据权利要求1所述的基于图像DCT变换的频谱数据压缩方法,其特征在于,所述经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内,包括:4. The spectral data compression method based on image DCT transform according to claim 1, is characterized in that, the described feature matrix after described discrete cosine transform predicts the error under different compression ratios according to neural network, until the error is in the setting. within acceptable limits, including: 通过预先训练好的机器学习模型选择特定的阈值对特征值进行筛选;Select a specific threshold to filter feature values through a pre-trained machine learning model; 按在[0.01,19.51]范围内按照0.5步进的长度遍历所有阈值,分别将待压缩图片的长、宽、阈值输入训练好的机器学习模型,输出图像质量预测值并根据需求动态选择压缩率,直至误差在设定可接受范围内。Traverse all thresholds in the range of [0.01, 19.51] according to the length of 0.5 steps, input the length, width and threshold of the image to be compressed into the trained machine learning model, output the image quality prediction value and dynamically select the compression rate according to the demand , until the error is within the set acceptable range. 5.一种基于图像DCT变换的频谱数据压缩装置,其特征在于,包括:5. A spectral data compression device based on image DCT transformation, characterized in that, comprising: RGB映射模块,用于将同一时刻的接收到的频谱数据等分成三组频率部分,并根据信号强度分别映射到R、G、B三通道并拼成一张RGB图片;The RGB mapping module is used to divide the spectrum data received at the same time into three groups of frequency parts, and map them to the R, G, and B channels according to the signal strength, and form an RGB picture; 数据压缩模块,用于对所述RGB图片进行离散余弦变换,经所述离散余弦变换后的特征矩阵根据神经网络预测不同压缩率下的误差,直至误差在设定可接受范围内。The data compression module is used to perform discrete cosine transform on the RGB picture, and the feature matrix after the discrete cosine transform predicts the error under different compression rates according to the neural network, until the error is within the set acceptable range. 6.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现权利要求1至4任一项所述的基于图像DCT变换的频谱数据压缩方法的步骤。6. An electronic device, comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements any one of claims 1 to 4 when the processor executes the program The steps of the spectral data compression method based on image DCT transform. 7.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至4任一项所述的基于图像DCT变换的频谱数据压缩方法的步骤。7. A computer-readable storage medium on which a computer program is stored, wherein the computer program realizes the spectral data compression method based on image DCT transform according to any one of claims 1 to 4 when the computer program is executed by the processor A step of. 8.一种计算机程序产品,包括计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现权利要求1至4任一项所述的基于图像DCT变换的频谱数据压缩方法的步骤。8. A computer program product comprising a computer program/instruction, characterized in that, when the computer program/instruction is executed by the processor, a method for realizing the spectral data compression method based on the image DCT transform of any one of claims 1 to 4 is realized. step.
CN202210385884.1A 2022-04-13 2022-04-13 Frequency spectrum data compression method and device based on image DCT (discrete cosine transform) Pending CN114782559A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210385884.1A CN114782559A (en) 2022-04-13 2022-04-13 Frequency spectrum data compression method and device based on image DCT (discrete cosine transform)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210385884.1A CN114782559A (en) 2022-04-13 2022-04-13 Frequency spectrum data compression method and device based on image DCT (discrete cosine transform)

Publications (1)

Publication Number Publication Date
CN114782559A true CN114782559A (en) 2022-07-22

Family

ID=82429062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210385884.1A Pending CN114782559A (en) 2022-04-13 2022-04-13 Frequency spectrum data compression method and device based on image DCT (discrete cosine transform)

Country Status (1)

Country Link
CN (1) CN114782559A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001318140A (en) * 2000-05-11 2001-11-16 Hitachi Ltd Signal processing method
CN103631582A (en) * 2013-11-06 2014-03-12 西安理邦科学仪器有限公司 Graph drawing method and system based on WPF technology
DE102014101307A1 (en) * 2014-02-03 2015-08-06 Osram Opto Semiconductors Gmbh Coding method for data compression of power spectra of an optoelectronic device and decoding method
CN106355625A (en) * 2016-08-31 2017-01-25 甘宗平 A Single-polarization SAR False Color Image Generation Method
CN106612436A (en) * 2016-01-28 2017-05-03 四川用联信息技术有限公司 Visual perception correction image compression method based on DCT transform
US20200400730A1 (en) * 2018-03-06 2020-12-24 Xi'an Daheng Tiancheng It Co., Ltd. Frequency spectrum monitoring data structured representation method, and data processing method and compression method
CN112750426A (en) * 2021-02-01 2021-05-04 福州大学 Mobile terminal voice analysis system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001318140A (en) * 2000-05-11 2001-11-16 Hitachi Ltd Signal processing method
CN103631582A (en) * 2013-11-06 2014-03-12 西安理邦科学仪器有限公司 Graph drawing method and system based on WPF technology
DE102014101307A1 (en) * 2014-02-03 2015-08-06 Osram Opto Semiconductors Gmbh Coding method for data compression of power spectra of an optoelectronic device and decoding method
CN106612436A (en) * 2016-01-28 2017-05-03 四川用联信息技术有限公司 Visual perception correction image compression method based on DCT transform
CN106355625A (en) * 2016-08-31 2017-01-25 甘宗平 A Single-polarization SAR False Color Image Generation Method
US20200400730A1 (en) * 2018-03-06 2020-12-24 Xi'an Daheng Tiancheng It Co., Ltd. Frequency spectrum monitoring data structured representation method, and data processing method and compression method
CN112750426A (en) * 2021-02-01 2021-05-04 福州大学 Mobile terminal voice analysis system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姚军财;: "一种基于DFT的数字图像压缩算法", 陕西理工学院学报(自然科学版), vol. 28, no. 03, 15 June 2012 (2012-06-15), pages 22 - 26 *

Similar Documents

Publication Publication Date Title
CN102857751B (en) Video encoding and decoding methods and device
CN110677649B (en) Artifact removing method based on machine learning, artifact removing model training method and device
CN102246165A (en) Method and apparatus for representing and identifying feature descriptors utilizing a compressed histogram of gradients
CN114501029B (en) Image encoding method, image decoding method, image encoding device, image decoding device, computer device, and storage medium
CN110189385B (en) Model training and picture compression, decompression method, device, medium and electronic equipment
CN111385576A (en) Video coding method and device, mobile terminal and storage medium
US20190158834A1 (en) Apparatus and method for encoding video
CN117095685B (en) Concurrent department platform terminal equipment and control method thereof
US9997132B2 (en) Data transmission method, data transmission system and portable display device of transmitting compressed data
WO2021022686A1 (en) Video compression method and apparatus, and terminal device
US20250356866A1 (en) Audio encoding and decoding method and apparatus, and electronic device
CN114782559A (en) Frequency spectrum data compression method and device based on image DCT (discrete cosine transform)
EP3550842A1 (en) Image filtering method, apparatus and device
WO2023169303A1 (en) Encoding and decoding method and apparatus, device, storage medium, and computer program product
CN114663239A (en) Abnormal transaction early warning method and device
CN114339252B (en) Data compression method and device
CN112116617A (en) Irregular object shadow detection method and device
CN115063494A (en) Mars image compression method and device, computer equipment and storage medium
CN109800869B (en) Data compression method and related device
CN118413239A (en) Sewage pump online fault prediction method, system, electronic equipment and storage medium
CN114648442A (en) Image style migration method and device
CN114387765A (en) Vehicle refueling data early warning method and device
US9602835B2 (en) Difference images and difference image strips
CN112035557A (en) Transaction log report display method and device
CN119854524B (en) Image compression performance optimization methods, apparatus, equipment, storage media, and computer program products based on EZW.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination