A method for real-time spectrum data compression and recovery based on character encoding
By employing a character-encoding-based real-time spectrum data compression method, utilizing a representative spectrum library and similarity matching, the problem of massive data storage and transmission pressure in radio spectrum data processing is solved, achieving efficient data compression and recovery, and applicable to signal characteristics of different monitoring frequency bands.
Patent Information
- Application Number
- CN202111487404.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-12-07
AI Technical Summary
Existing technologies for radio spectrum data processing suffer from problems such as high demand for massive data storage, high storage space requirements, high data transmission pressure, high data distortion rate, and the reduction of some highly similar pattern sequences, resulting in data loss and low processing efficiency.
A real-time spectrum data compression method based on character encoding is adopted. The spectrum data is converted into a string through two character encodings. A representative spectrum library is used for similarity matching and storage. Tag characters are used to replace the signal spectrum for storage. During transmission, only the tag characters or the signal spectrum string are sent. During recovery, character decoding is performed to restore the spectrum data.
It effectively reduces data storage, improves processing efficiency, reduces network transmission pressure, reduces data redundancy, ensures data accuracy and integrity, and adapts to the signal characteristics of different monitoring frequency bands.
Smart Images

Figure CN114221663B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent processing technology for radio electromagnetic spectrum data, specifically a method for real-time spectrum data compression and recovery based on character encoding. Background Art
[0002] In the field of radio monitoring, radio spectrum data is a crucial support for reflecting the occupancy status of various frequency bands and the business needs of different industries. It is also an important basis for spectrum data mining, frequency band security management, anomaly investigation, and application monitoring platform management. Therefore, the storage of radio spectrum data has become a vital part of the monitoring process. With the increasing business demands of various radio frequency bands, large-scale collection of radio spectrum data is unavoidable. However, the data collected from multiple stations over long periods and across wide frequency bands is massive, placing increasingly high demands on storage space. This massive amount of spectrum data poses a significant challenge to the time efficiency of real-time analysis and information extraction. Furthermore, the transmission of massive amounts of data also puts heavy pressure on network transmission. Considering these issues, there is an urgent need for a spectrum data processing method to compress and store massive amounts of data. Currently, lossy compression algorithms are generally used for storing radio spectrum data. The compression ratio of these algorithms is directly proportional to the data distortion rate; a higher compression ratio means more severe data distortion. Moreover, these algorithms do not perform fine-grained classification and compression of signals and noise within the spectrum object. The inventors have made significant improvements to overcome the shortcomings of existing technologies.
[0003] In invention patent 201810753478.X, the inventors proposed a scheme for calculating the minimum similarity coefficient of spectrum data. In this process, it is necessary to divide the spectrum data into intervals, calculate the mean and variance, and obtain the normal distribution function and histogram. For real-time spectrum data of floating point type, a lot of time costs are required when performing the calculation, and the execution efficiency of the compression process is low.
[0004] In invention patent 201810488543.0, the inventors proposed a scheme for clustering analysis of several component segment spectral data. The resulting K cluster centers are subjected to pairwise similarity reduction processing. That is, during the processing, the pattern sequences in the pattern set are dynamically reduced. Between pairs, the patterns that are more representative of the monitoring data are retained. However, there is still a possibility that some highly similar pattern sequences will be reduced. This dynamic pattern reduction scheme reduces the characteristic pattern sequences in the pattern set to a certain extent, resulting in the loss of some highly usable data. Summary of the Invention
[0005] The purpose of this invention is to provide a method for real-time spectrum data compression and recovery based on character encoding, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for real-time spectrum data compression and recovery based on character encoding, comprising the following steps: Step 1, acquiring the spectrum of each signal within the monitoring frequency band; Step 2, performing a first character encoding to convert the signal spectrum data into a string; Step 3, performing string similarity matching between the signal spectrum and the representative spectrum; Step 4, based on the similarity matching result, performing a second character encoding to convert the representative spectrum number into a tag character, and storing the tag character or the signal spectrum and the tag character; Step 5, recovering the spectrum data;
[0007] In step one above, the signal spectrum within each signal bandwidth is collected from the real-time spectrum data;
[0008] In step two above, the spectrum data corresponding to each signal spectrum obtained in step one is first character encoded to convert the spectrum data into a string;
[0009] In step three above, during the real-time compression and storage of spectrum data, the signal spectrum string obtained in step two is matched with the representative spectrum string in the corresponding representative spectrum library for similarity.
[0010] In step four above, during real-time compression and storage, based on the similarity matching results from step three, if similar, a second character encoding is performed. This converts the number of the representative spectrum in the representative spectrum library into the corresponding tag character, and stores the tag character instead of directly storing the signal spectrum to achieve compressed storage. Otherwise, a signal spectrum is added to the representative spectrum library as a new representative spectrum, and the number of the new representative spectrum is encoded a second time, and the encoded tag character is stored. Similarly, during real-time compressed transmission, if the signal spectrum matches the representative spectrum, the sender only sends the tag; otherwise, the sender sends the signal spectrum string and the tag.
[0011] In step five above, during the restoration of spectrum data, the stored representative spectrum label is first decoded to obtain the representative spectrum number. Then, the corresponding representative spectrum string is retrieved from the representative spectrum library using the number. Finally, the string is decoded a second time to restore it to the specific signal spectrum data.
[0012] Preferably, in step one, all signal bandwidths in the monitoring frequency band are used as prior conditions, and the spectrum data of each signal in the real-time frequency sweep data are collected separately according to the bandwidth range of each signal.
[0013] Preferably, in step one, the collected monitoring frequency band data is floating-point data. When performing the first character encoding of the spectrum data, it is necessary to use continuous integer data to map to characters. Therefore, when collecting data, the decimal point of the floating-point data needs to be shifted to the right by a fixed number of places according to the specific precision to obtain the corresponding integer data.
[0014] Preferably, in step two, the specific method of the first character encoding is as follows: First, using the integer data, a character encoding method is adopted to map the converted spectrum data level values one by one into characters, and then the signal spectrum level values are converted into signal spectrum strings. These characters converted from level values have the characteristics of unique identification and continuity.
[0015] Preferably, in step three, the specific method for similarity matching is as follows:
[0016] 1) Adaptively obtain matching parameters based on signal bandwidth. , ;
[0017] 2) Compare each character of the signal spectrum string with the representative spectrum string in the representative spectrum library in turn, and calculate the absolute value of the difference between the two characters at the corresponding positions. ;
[0018] 3) When the two characters are the same, that is... A value of 0 indicates that the two characters matched successfully;
[0019] 4) If the two characters are different, Less than or equal to the set first threshold If the two characters at that position match successfully, then the number of successfully matched frequency points within the first threshold is counted. ,like Greater than the first threshold and less than or equal to the set second threshold If the two characters at that position are still considered to match successfully, the number of frequency points that meet this condition will be counted. ,like If the value is greater than the second threshold, it directly indicates that the two strings are not similar, and step 5 is skipped.
[0020] 5) After completing the frequency comparison of all characters in the string, if the number of frequency points of each character in the string satisfies the first and second thresholds... , Each less than or equal to the matching parameter , If the two strings are similar, then they are not similar; otherwise, they are not similar.
[0021] In the above matching algorithm, the first threshold The second threshold represents the allowed difference between corresponding frequency points of two spectrum data points that are successfully matched. This represents the maximum allowable difference between corresponding frequency points. Since the signal spectrum fluctuates to varying degrees during transmission, the first threshold aims to control the data deviation of frequency points with smaller fluctuations during similarity matching. However, there are occasional cases where a few frequency points are significantly affected, resulting in larger data deviations. Therefore, a second threshold is set to control the maximum allowable data deviation.
[0022] Due to the different signal bandwidths in different monitoring frequency bands, the number of frequency points in the signal spectrum that meet the first and second thresholds also needs to be adjusted. Based on extensive experimental experience, the number of frequency points in the signal spectrum that meet the first threshold is determined to be... The number of frequency points that meet the second threshold, accounting for approximately 70% of the signal bandwidth. It accounts for approximately 40% of the signal bandwidth and adaptively acquires matching parameters before performing the string comparison mentioned above. , .
[0023] Preferably, in step four, the specific method for performing a second character encoding on the number in the representative spectrum library is as follows: select a character encoding method to map the integer number data of the representative spectrum in the representative spectrum library one by one into characters.
[0024] Preferably, in step five, based on the stored representative spectrum tags, the tags are first decoded in the first character, with the decoding method corresponding to the second character encoding method. The tag characters are converted into integer numbers using the corresponding encoding method, and then the corresponding representative spectrum string is retrieved from the representative spectrum library using the number. Finally, the string is decoded in the second character, with the decoding method corresponding to the first encoding method. Each character is mapped in reverse to specific signal spectrum data using the corresponding encoding method.
[0025] Compared with the prior art, the present invention has the following beneficial effects: The present invention converts all data into characters for storage through two character encodings, thereby reducing the data capacity in terms of data storage format. Furthermore, it uses one frame to represent the spectrum instead of several frames of signal spectra that are extremely similar to the representative spectrum, which reduces a large amount of data redundancy in the process of collecting and monitoring frequency band data, and greatly reduces the amount of data stored. Attached Figure Description
[0026] Figure 1 This is a flowchart of the method of the present invention;
[0027] Figure 2 This is a flowchart of the similarity matching process in step three of this embodiment of the invention;
[0028] Figure 3This is a schematic diagram illustrating the data mismatch between the signal spectrum and the representative spectrum in an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram illustrating the data adaptation between the signal spectrum and the representative spectrum in an embodiment of the present invention;
[0030] Figure 5 This is a schematic diagram illustrating the first and second thresholds in an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of several representative spectra in a representative spectrum library corresponding to a certain signal in an embodiment of the present invention;
[0032] Figure 7 This is a schematic diagram of the original spectrum data, compressed and recovered data, and error data before and after recovery for the 87-108MHz frequency band in an embodiment of the present invention.
[0033] Figure 8 This is a schematic diagram of the original spectrum data, compressed and recovered data, and error data of the signal before and after recovery in the 357-378MHz frequency band in an embodiment of the present invention.
[0034] Figure 9 This is a schematic diagram of the original spectrum data, compressed and recovered data, and error data of the signal before and after recovery in the 403-424MHz frequency band in an embodiment of the present invention.
[0035] Figure 10 This is a schematic diagram of the original spectrum data, compressed and recovered data, and error data of the signal before and after recovery in the 475-496MHz frequency band in an embodiment of the present invention.
[0036] Figure 11 This is a schematic diagram of the original spectrum data, compressed and recovered data, and error data of the signal before and after recovery in the 858-879MHz frequency band in an embodiment of the present invention.
[0037] Figure 12 This is a schematic diagram of the original spectrum data of the 930-960MHz frequency band, the compressed and recovered data, and the error data of the signal before and after recovery in an embodiment of the present invention;
[0038] Table 1 is a data table of suggested values for matching parameters in the embodiments of the present invention;
[0039] Table 2 shows the compression results of different data volumes under the 87-108MHz test frequency band in this embodiment of the invention, with the first and second thresholds being 2 and 3 respectively.
[0040] Table 3 shows the results of different compression accuracies using the same data volume (5.99GB) in the 403-424MHz test frequency band in this embodiment of the invention.
[0041] Table 4 shows the data compression rate, mean root mean square error, and standardized root mean square error of the data under different monitoring frequency bands in the embodiments of the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Please see Figure 1-12 Tables 1-4 illustrate an embodiment of the present invention: a method for real-time spectrum data compression and recovery based on character encoding, such as... Figure 1 As shown, the process includes the following steps: Step 1, acquiring the spectrum of each signal within the monitoring frequency band; Step 2, performing the first character encoding to convert the signal spectrum data into a string; Step 3, performing string similarity matching between the signal spectrum and the representative spectrum; Step 4, based on the similarity matching result, performing the second character encoding to convert the representative spectrum number into a tag character, and storing the tag character or the signal spectrum and tag character; Step 5, recovering the spectrum data.
[0044] In step one above, the signal spectrum within each signal bandwidth is collected from the real-time spectrum data. In this implementation, the EM100 device receives the radio signals in real time, generates data packets from the received radio signals, and sends them to a regular PC via LAN. The PC communicates with the EM100 device based on the SCPI communication protocol. After receiving the data packets, it parses them according to the protocol to obtain the frequency and spectrum data values of the radio signals. Data compression is performed on several monitoring frequency bands, namely: 87-108MHz, 357-378MHz, 403-424MHz. The frequency bands are 475-496MHz, 858-879MHz, and 930-960MHz, with a step size of 25kHz. The bandwidth of all signals in each monitoring band is given as a priori condition. Based on the bandwidth range of each signal, the spectrum data of each signal in the real-time frequency sweep data is acquired in parallel. The acquired monitoring band data is floating-point data. When performing the first character encoding of the spectrum data, it is necessary to map continuous integer data to characters. Therefore, when acquiring data, the decimal point of the floating-point data needs to be shifted to the right by a fixed number of bits according to the specific precision to obtain the corresponding integer data.
[0045] In step two above, the spectrum data corresponding to each signal spectrum obtained in step one is firstly character-encoded to convert the spectrum data into a string. The specific method of the first character encoding is as follows: based on the integer spectrum data obtained in step one, the data range [a, b] of the spectrum data under the monitoring frequency band is calculated by the maximum and minimum values of the real-time spectrum data. Normalization is performed on it, and the minimum value 'a' of the data range is subtracted from all integer data to control the data range of the spectrum data within [0, ba]. Then, a character encoding method is used to map the converted spectrum data level values one by one into characters, thereby converting the signal spectrum level data into a signal spectrum string. These characters have the characteristics of unique identification and continuity.
[0046] This embodiment takes real-time spectrum data with a level value range of [-10, 40] as an example. The ASCII character set is used as the encoding character set. Since the level data for the first character encoding must be greater than or equal to 0 and be an integer, when processing the real-time data, the minimum value of the spectrum range, -10, needs to be subtracted from all data. The calculated real-time data level value range is [0, 50]. Since control characters can interfere with data processing, the first 32 control characters of ASCII encoding need to be excluded. Therefore, the 50 characters after the 32nd character of ASCII encoding are selected as the conversion characters in this embodiment. That is, the frequency value range of the spectrum data that can be encoded for the first time after processing is [32, 82].
[0047] In step three above, during the real-time compression and storage of spectrum data, before processing the first frame of data, the representative spectrum library corresponding to the signal is empty. When processing the first frame of real-time spectrum data, the signal spectrum at each signal location is not compared string by string; the signal spectrum is directly stored as the first representative spectrum in the representative spectrum library at that location. After the first frame of data is processed, the representative spectrum databases at each signal location are no longer empty. The signal spectrum is then matched with the representative spectra in the representative spectrum library based on similarity. Since both the signal spectrum and the representative spectrum are spectral segments within a certain signal range of the monitoring frequency band, the lengths of the two spectrum strings are the same, and both represent the bandwidth of the signal. Figure 2 As shown, the signal spectrum Compare with the representative spectrum string in the corresponding representative spectrum library Similarity matching is performed, where, Indicates the first frequency band in the signal band Each signal spectrum Indicates the first The spectrum of the signal corresponds to the first signal in the spectrum library. The specific method for similarity matching, using 1 representative spectrum, is as follows:
[0048] 1) Adaptively obtain matching parameters based on signal bandwidth. , In this embodiment, the first and second thresholds are set to 2 and 3 respectively, and the frequency matching parameters are obtained based on the signal spectrum bandwidth. , They are 7 and 4 respectively;
[0049] 2) Calculate the signal spectrum With representative spectrum An array of absolute values of the differences between all corresponding characters in a string. ; Calculate the deviation effect of the frame data before and after restoration, the corresponding signal region difference range is within the first and second threshold range, and the error values of the two calculated spectrum data are all within the allowable range;
[0050] 3) Traverse the difference array ,right Perform the following processes sequentially to determine whether the corresponding characters match successfully;
[0051] 4) When If the match is successful, it means that the character was matched successfully.
[0052] 5) When At that time, if Less than or equal to the first threshold If the two characters at that position match successfully, then the number of successfully matched frequency points within the first threshold is counted. The calculation method is as follows:
[0053] (1)
[0054] (2)
[0055] like Greater than the first threshold And less than or equal to the second threshold If the two characters at that position are still considered to match successfully, the number of frequency points that meet this condition will be counted. The calculation method is as follows:
[0056] (3)
[0057] (4)
[0058] like Greater than the second threshold, such as Figure 3 As shown, this indicates that the two strings are not similar, and step (6) is ignored;
[0059] 6) Complete the above steps After processing the difference data, the number of frequency points of each character in the string that satisfy the above two conditions is determined. , Each less than or equal to the matching parameter , ,like Figure 4 As shown, if the two strings are similar, then the two strings are not similar; otherwise, the two strings are not similar.
[0060] Among them, such as Figure 5 As shown, the first threshold The second threshold represents the allowed difference between corresponding frequency points of two spectrum data points that are successfully matched. This represents the maximum allowable difference between corresponding frequency points. Since the signal spectrum fluctuates to varying degrees during transmission, the first threshold aims to control the data deviation of frequency points with smaller fluctuations during similarity matching. However, there are occasional cases where a few frequency points are significantly affected, leading to larger data deviations. Therefore, a second threshold is set to control the maximum allowable data deviation. Values greater than the second threshold directly indicate a mismatch between the two strings.
[0061] Due to the different signal bandwidths in different monitoring frequency bands, the number of frequency points in the signal spectrum that meet the first and second thresholds also needs to be adjusted. Based on extensive experimental experience, the number of frequency points in the signal spectrum that meet the first threshold is determined to be... The number of frequency points that meet the second threshold, accounting for approximately 70% of the signal bandwidth. Occupying approximately 40% of the signal bandwidth, matching parameters need to be adaptively obtained before performing the string comparisons described above. , For the matching parameters of different monitoring frequency bands, the recommended values are given in Table 1 in this embodiment;
[0062] In step four above, based on the similarity matching result of step three, if a match is found, the label of the representative spectrum in the representative spectrum library is subjected to a second character encoding. That is, a character encoding method is selected to map the integer number data of the representative spectrum in the representative spectrum library to characters one by one to obtain its label character. Taking UTF-8 encoding as an example, if the number of a certain representative spectrum in the representative spectrum library is "65", the number value is mapped to the corresponding character 'A' in UTF-8 encoding, and the label character 'A' is directly stored to replace the stored signal spectrum data to achieve compressed storage. Otherwise, the signal spectrum is added to the representative spectrum library as a new representative spectrum, and the number of the new representative spectrum is subjected to a second character encoding to obtain the label character and stored. Based on this, the signal library TABLE_FPS at each signal position can be established.
[0063] In step five above, during spectrum data restoration, based on the stored representative spectrum tags, a first character decoding is performed. The decoding method corresponds to the second character encoding method. The tag characters are converted into integer numbers using the corresponding encoding method. Then, this number is used to retrieve the corresponding representative spectrum string from the representative spectrum database TABLE_TYPICAL. Figure 6 The image shows the spectrum diagram of several representative spectrum strings extracted from a certain representative spectrum library. Finally, the string is decoded a second time. Similarly, the decoding method corresponds to the first encoding method. Each character is mapped back to the specific signal spectrum data using the corresponding encoding method.
[0064] The compressed data can be restored using the following three resources: the representative spectrum library TABLE_TYPICA established in step four, the bandwidth data table of each signal in the monitoring frequency band with known prior conditions TABLE_STEP, and the signal library TABLE_FPS which sequentially stores the representative spectrum label characters of all signal positions in each frame of real-time spectrum during signal spectrum processing. The specific steps are as follows:
[0065] 1) Using the representative spectrum label strings corresponding to all signal positions in a tuple of the signal library TABLE_FPS, perform the first decoding using the corresponding encoding method. The decoding method corresponds to the second character encoding method, thus obtaining the representative label number in the representative spectrum library corresponding to all signal positions.
[0066] 2) Using the representative spectrum number value, search in the corresponding representative spectrum library to obtain the representative spectrum string at the corresponding signal position;
[0067] 3) Corresponding to the first character encoding, the representative spectrum string is decoded into signal spectrum data using the corresponding character encoding scheme, completing the second character decoding;
[0068] 4) Using the known bandwidth data table TABLE_STEP for each signal in the monitoring frequency band, and ignoring noise, restore all signal frequency bands in the same way as described above. Then, assemble all the restored spectrum data into a frame of spectrum data according to the corresponding signal frequency band range.
[0069] 5) Utilize the continuity of the timestamps of each frame of data storage in TABLE_FPS to recover a frame of data or data within a certain time period using the above method according to the specific data recovery requirements;
[0070] Results Analysis: Data analysis was performed on different monitoring frequency bands, such as... Figure 7-12The images show the original spectrum, the recovered signal spectrum after data compression, and a scatter plot of the difference between the two spectra after experimental processing of the signal frequencies of 87-108MHz, 357-378MHz, 403-424MHz, 475-496MHz, 858-879MHz, and 930-960MHz. A comparison of the real-time spectrum data and the spectrum data recovered using representative spectra demonstrates that the data restoration within the signal frequency range is highly accurate and can meet the requirements of various engineering applications.
[0071] The formulas for calculating the compression ratio before and after the experiment are:
[0072] (5)
[0073] Where CR represents the data compression ratio. This indicates the size of each file after compression. This indicates the size of the spectrum data acquired in real time;
[0074] Mean square error PRD The calculation formula is:
[0075] (6)
[0076] in It is the value of a single data point in the original spectrum. It is the value of a single data point in the compressed spectrum. It is the number of frequency points within the spectrum of a single signal;
[0077] The formula for calculating the standardized root mean square error (SRD) is:
[0078] (7)
[0079] in It is the value of the original data point at a single frequency. It is the average value of the original data from a single frequency point. It is the value of a single data point in a compressed spectrum. It is the number of frequency points within the spectrum of a single signal, while the average PRD and average SRD are the average values of the PRD and SRD of all spectrum data;
[0080] Based on the same monitoring frequency band and controlling the same similarity matching parameters, as shown in Table 2, in the 87-108MHz monitoring frequency band, the first and second thresholds are 2 and 3, respectively; adaptive matching parameters... , The values are 7 and 4 respectively. As the amount of compressed data increases, the difference in compression ratio is small. Therefore, it can be seen that the compression ratio of this invention is independent of the size of the processed spectral data.
[0081] Based on the same monitoring frequency band, the amount of data to be compressed is kept constant (5.99GB). The first and second thresholds are different, as shown in Table 3. In the 403-424MHz test frequency band, as the threshold gradually increases, the compression rate shows a slow decreasing trend. This indicates that the difference in the spectrum data is kept within a small range and is less sensitive to changes in the first and second thresholds, but there is still a gradual decreasing trend.
[0082] Based on different monitoring frequency bands, according to the signal bandwidth information shown in Table 1 and the compression rate shown in Table 4, and combined with the fact that the present invention only processes the signal data, it can be seen that: the larger the proportion of the signal in the monitoring frequency band, the more data needs to be matched for similarity, the higher the compression rate, and the higher the PRD and SRD. The compression rate is directly proportional to the proportion of the signal bandwidth in the monitoring frequency band.
[0083] Depending on the monitoring frequency band, the bandwidth of the signal also varies. The larger the signal bandwidth, the larger the amount of data in the signal that needs to be processed, the higher the compression ratio, and the higher the corresponding PRD and SRD.
[0084] Without considering noise, performing characterization and similarity spectrum clustering on the signal spectrum data can significantly reduce the amount of data while ensuring data accuracy. This approach has yielded good experimental results across various monitoring frequency bands.
[0085] Based on the above, the advantages of this invention are as follows: After acquiring real-time spectrum data, this invention first normalizes the floating-point level values into integer data, and then maps them one by one to the corresponding characters through character encoding. Essentially, it shifts the processing of floating-point data to the processing of strings, thus improving the insufficient processing efficiency of invention 201810753478.X. Compared with invention 201810488543.0, this invention dynamically counts the successfully matched signal spectra in the storage of representative spectra. The greater the number of successful matches with a signal spectrum, the greater its weight as a representative. Obviously, this invention performs better in dynamically reducing the number of representatives. This invention also has the following advantages:
[0086] 1. During the data acquisition and processing phase, threads corresponding to the data volume are started for parallel processing of all signal spectra in the monitoring frequency band, which improves processing efficiency compared to calculating the entire frequency band.
[0087] 2. This invention performs character encoding twice, converting all signal spectra in the spectrum data frame into strings for processing, and simultaneously converting all the number values representing all the spectrum library into tag characters for storage, thereby reducing the amount of data to be stored from the perspective of spectrum data storage format; it completely replaces the redundant and crude storage method that requires processing every numeric character, data symbol, decimal point, and separator between frequency band data in the original spectrum data storage process.
[0088] 3. In this invention, all floating-point or integer data that requires calculation and processing is converted into characters, which simplifies the data calculation method and reduces the data processing time; it avoids the problem of insufficient efficiency in real-time compression processing.
[0089] 4. Clustering was used in the monitoring frequency band, with representative spectra replacing the spectra of several frames of signals that were extremely similar to it; this took advantage of the high stability of spectral data in the same frequency band; and avoided storing a large amount of redundant data.
[0090] 5. When performing similarity matching between the signal spectrum and the representative spectrum, multiple parameters are used to take into account the different fluctuation ranges of the signal, comprehensively reflecting the similarity between the two strings; and this matching scheme is adaptively applicable to various other service channels based on the signal characteristics of the monitoring frequency band.
[0091] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for real-time spectrum data compression and recovery based on character encoding, comprising the following steps: Step 1: Acquire the spectrum of each signal within the monitoring frequency band; Step 2: Perform the first character encoding to convert the signal spectrum data into a string; Step 3: Perform string similarity matching between the signal spectrum and the representative spectrum; Step 4: Based on the similarity matching result, perform the second character encoding to convert the representative spectrum number into a tag character, and store the tag character or the signal spectrum and tag character; Step 5: Recover the spectrum data; Its characteristic is: In step one above, the signal spectrum within each signal bandwidth range of the real-time spectrum data is acquired; in parallel, subsequent operations are performed on each signal spectrum in a frame of spectrum data: In step two above, the spectrum data corresponding to each signal spectrum obtained in step one is first character encoded to convert the signal spectrum level data into a string; In step three above, during the real-time compression and storage of spectrum data, the signal spectrum string obtained in step two is matched with the representative spectrum string in the corresponding representative spectrum library for similarity. In step four above, during real-time compression and storage, based on the similarity matching result from step three, if a match is found, a second character encoding is performed. This converts the number of the representative spectrum in the representative spectrum library into the corresponding tag character, and stores the tag character instead of directly storing the signal spectrum to achieve compressed storage. Otherwise, a signal spectrum is added to the representative spectrum library as a new representative spectrum, and the number of the new representative spectrum is encoded a second time, and the encoded tag character is stored. Similarly, during real-time compressed transmission, if the signal spectrum matches the representative spectrum, the sender only sends the tag; otherwise, the sender sends both the signal spectrum string and the tag. In step five above, during spectrum data recovery, based on the stored representative spectrum tags, the tag characters are first decoded to obtain the representative spectrum number. Then, the corresponding representative spectrum string is retrieved from the representative spectrum library using this number. Finally, the string is decoded a second time to restore it to the specific signal spectrum data.
2. The method for real-time spectrum data compression and recovery based on character encoding according to claim 1, characterized in that: In step one, all signal bandwidths in the monitoring frequency band are used as prior conditions, and the spectrum data of each signal in the real-time frequency sweep data are collected separately according to the bandwidth range of each signal.
3. The method for real-time spectrum data compression and recovery based on character encoding according to claim 1, characterized in that: In step one, the collected monitoring frequency band data is floating-point data. When performing the first character encoding of the spectrum data, it is necessary to use continuous integer data to map to characters. Therefore, when collecting data, the decimal point of the floating-point data needs to be shifted to the right by a fixed number of places according to the specific precision to obtain the corresponding integer data.
4. The method for real-time spectrum data compression and recovery based on character encoding according to claim 3, characterized in that: In step two, the specific method of the first character encoding is as follows: First, using the integer data, a character encoding method is adopted to map the converted spectrum data level values one by one into characters, and then the signal spectrum level values are converted into signal spectrum strings. These characters converted from level values have the characteristics of unique identification and continuity.
5. The method for real-time spectrum data compression and recovery based on character encoding according to claim 1, characterized in that: In step three, the specific method for similarity matching is as follows: 1) Adaptively obtain matching parameters based on signal bandwidth. , ; 2) Compare each character of the signal spectrum string with the representative spectrum string in the representative spectrum library in turn, and calculate the absolute value of the difference between the two characters at the corresponding positions. ; 3) When the two characters are the same, that is... A value of 0 indicates that the two characters matched successfully; 4) If the two characters are different, Less than or equal to the set first threshold If the two characters at that position match successfully, then the number of successfully matched frequency points within the first threshold is counted. ,like Greater than the first threshold and less than or equal to the set second threshold If the two characters at that position are still considered to match successfully, the number of frequency points that meet this condition will be counted. ,like If the value is greater than the second threshold, it directly indicates that the two strings are not similar, and step 5 is skipped. 5) After completing the frequency comparison of all characters in the string, if the number of frequency points of each character in the string satisfies the first and second thresholds... , Each less than or equal to the matching parameter , If the two strings are similar, then they are not similar; otherwise, they are not similar. In the above matching algorithm, the first threshold The second threshold represents the allowed difference between corresponding frequency points of two spectrum data points that are successfully matched. This represents the maximum allowable difference between corresponding frequency points. Since the signal spectrum fluctuates to varying degrees during transmission, the first threshold aims to control the data deviation of frequency points with smaller fluctuations during similarity matching. However, there are occasional cases where a few frequency points are significantly affected, resulting in larger data deviations. Therefore, a second threshold is set to control the maximum allowable data deviation. Due to the different signal bandwidths in different monitoring frequency bands, the number of frequency points in the signal spectrum that meet the first and second thresholds also needs to be adjusted. Based on extensive experimental experience, the number of frequency points in the signal spectrum that meet the first threshold is determined to be... The number of frequency points that meet the second threshold, accounting for approximately 70% of the signal bandwidth. It accounts for approximately 40% of the signal bandwidth. Before performing the string comparison mentioned above, it will adaptively obtain matching parameters. , .
6. The method for real-time spectrum data compression and recovery based on character encoding according to claim 1, characterized in that: In step four, the specific method for performing a second character encoding on the number in the representative spectrum library is as follows: select a character encoding method to map the integer number data of the representative spectrum in the representative spectrum library one by one into characters.
7. The method for real-time spectrum data compression and recovery based on character encoding according to claim 1, characterized in that: In step five, based on the stored representative spectrum tags, the first character decoding is performed, with the decoding method corresponding to the second character encoding method. The tag characters are converted into integer numbers using the corresponding encoding method, and then the corresponding representative spectrum string is retrieved from the representative spectrum library using this number. Finally, the string is decoded a second time, similarly with the decoding method corresponding to the first encoding method. Each character is mapped inversely to specific signal spectrum data using the corresponding encoding method.
Citation Information
Patent Citations
Time sequence mode sequence extraction method in radio spectrum monitoring data and storage method of radio spectrum monitoring data
CN108830162A
An adaptive real-time spectrum data compression method and system
CN108990108A
Text similarity identification method and device based on information interaction, equipment and medium
CN112989815A
Information matching method and device, electronic equipment and storage medium
CN113094559A