Infrared signal storage method and device and computing equipment

By performing regular search and length compression of the original infrared signal data, and encrypting the compressed data, the problems of low storage efficiency and insufficient security in the existing technology are solved, and efficient and secure storage effects are achieved.

CN119906434AActive Publication Date: 2025-04-29SHENZHEN QIANHAI EVOC ASIA-PACIFIC ELECTRONIC EQUIP TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411975873.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The prior art is inefficient when storing infrared signals, occupies a lot of storage space, and lacks security, especially how to effectively compress, encrypt and store these signals when the amount of data increases has become a challenge.

Method used

By obtaining the original infrared signal data, performing regular searches and compressing lengths according to the search results, obtaining the compressed data, and then encrypting the compressed data to obtain the encrypted and compressed infrared signal data for storage.

Benefits of technology

It effectively reduces the storage space requirements of data, improves storage efficiency, ensures data security, and reduces system resource overhead and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906434A_ABST
    Figure CN119906434A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of data processing, and discloses an infrared signal storage method and device and computing equipment, and the method comprises the steps: obtaining original infrared signal data; performing regular search on the original infrared signal data and performing length compression according to a regular search result to obtain compressed data; and carrying out encryption processing on the compressed data to obtain encrypted and compressed infrared signal data, and storing the encrypted and compressed infrared signal data. By means of the mode, the data storage space requirement can be effectively reduced, the storage efficiency is improved, and the method and device are suitable for application scenes where large-scale signal data are stored.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a storage method, device and computing equipment for infrared signals. Background Art

[0002] With the rapid development of the Internet of Things, smart devices, and remote control technology, infrared signals are increasingly used in device control and data transmission. Due to the advantages of low transmission power consumption, low cost, and no electromagnetic interference, infrared signals have become a key communication method for many smart home and telemedicine devices. However, the transmission and storage of infrared signals face challenges, especially as the amount of data increases, how to effectively compress, encrypt, and store these signals becomes particularly important.

[0003] In the prior art, see Figure 1 , based on the infrared circuit to collect and receive the infrared signal emitted by the infrared remote control, and statistically record the signal data of all infrared signals. The microcontroller unit (MCU) obtains all infrared signals and directly stores all the original infrared signal data to the storage chip, which leads to low efficiency when storing a large amount of data, and the MCU requires more storage space, and the cost of replacing a large-capacity MCU is higher. In addition, the received infrared signal data is stored locally, which is easy to be obtained and lacks security. Summary of the invention

[0004] In view of the above problems, the embodiments of the present invention provide a method, an apparatus and a computing device for storing infrared signals, which overcome the above problems or at least partially solve the above problems.

[0005] According to one aspect of an embodiment of the present invention, a method for storing infrared signals is provided, the method comprising: obtaining original infrared signal data; performing a regularity search on the original infrared signal data and performing length compression according to the regularity search result to obtain compressed data; encrypting the compressed data to obtain encrypted and compressed infrared signal data, and storing the encrypted and compressed infrared signal data.

[0006] In an optional manner, a regularity search is performed on the original infrared signal data and length compression is performed based on the regularity search result to obtain compressed data, including: a preset regularity search is performed on the original infrared signal data, and a first compression method is applied to the length of the regular original infrared signal data to obtain compressed data; if data that conforms to the preset regularity is not found in the original infrared signal data, a second compression method is applied to the length of the original infrared signal data to obtain compressed data.

[0007] In an optional manner, a preset regularity search is performed on the original infrared signal data, and a first compression method is applied to perform length compression on the regular original infrared signal data to obtain compressed data, including: dividing the original infrared signal data by a preset value to obtain infrared signal data after the carrier is removed; searching for bit0bit1 from the infrared signal data after the carrier is removed; if bit0bit1 is found, traversing the infrared signal data after the carrier is removed to search for bit0bit1 and applying bit0bit1 to the infrared signal data after the carrier is removed to perform data compression to obtain compressed data; if bit0bit1 is not found, it is determined that the compression of the original infrared signal data by the first compression method has failed.

[0008] In an optional manner, the infrared signal data after the carrier is removed is traversed to search for bit0bit1 and bit0bit1 is applied to the infrared signal data after the carrier is removed for data compression to obtain compressed data, including: determining whether the infrared signal data after the carrier is removed is completely traversed; if the infrared signal data after the carrier is removed is not completely traversed, determining whether it is applicable to compress the eight-bit data into one byte through bit0bit1, and if applicable, performing pre-compression processing on the infrared signal data after the carrier is removed, otherwise storing the compressed data; if the infrared signal data after the carrier is removed is completely traversed, determining whether to use bit0bit1 for data compression; if bit0bit1 is used to compress the infrared signal data after the carrier is removed, applying bit0bit1 for data compression to obtain compressed data; otherwise determining that the first compression method has failed to compress the original infrared signal data.

[0009] In an optional manner, the infrared signal data after the carrier is removed is processed before compression, including: determining whether the infrared signal data after the carrier is removed is greater than 255; if so, adding 00 before the infrared signal data after the carrier is removed, otherwise keeping the infrared signal data after the carrier is removed unchanged; adding ffff and data length to the header of the infrared signal data after the carrier is removed to obtain integrated infrared signal data, and storing the integrated infrared signal data.

[0010] In an optional manner, searching for bit0bit1 from infrared signal data after the carrier wave is removed includes: defining a first string, the first string being bit0[0], bit0[1], bit1[0], bit1[1]; traversing the infrared signal data after the carrier wave is removed, combining every two digits, and determining whether a difference between two consecutive combinations is within 7; if so, determining whether bit0[0] and bit0[1] exist in the two combinations; otherwise, continuing to search for the first string; if bit0[0] and bit0[1] exist, continuing to determine whether bit1[0] and bit1[1] exist in the two combinations; if bit0[0] If bit0[0] and bit1[1] do not exist, the first two digits of the two combinations are recorded in bit0[0] and bit0[1], and then the search for the first string continues. If bit1[0] and bit1[1] exist, subtract bit0[0] and bit0[1] or bit1[0] and bit1[1] from the combination of the first two digits of the two combinations. If the difference is less than 7, take the average of the two combinations and update it to bit0[0] and bit0[1] or bit1[0] and bit1[1]. If bit1[0] and bit1[1] do not exist, the first two digits of the two combinations are recorded in bit1[0] and bit1[1].

[0011] In an optional manner, a second compression method is applied to perform length compression on the original infrared signal data to obtain compressed data, including: defining a global variable, and dividing the original infrared signal data by a preset value to obtain the infrared signal data after the carrier is removed; traversing the infrared signal data after the carrier is removed, and determining whether all the infrared signal data after the carrier is removed has been traversed; if all the infrared signal data after the carrier is removed has not been traversed, determining whether the currently traversed data is greater than 255; if the currently traversed data is greater than 255, adding 00 before the currently traversed data, otherwise saving the currently traversed data; returning to the step of determining whether all the infrared signal data after the carrier is removed has been traversed; if all the infrared signal data after the carrier is removed has been traversed, compressed data is obtained.

[0012] According to another aspect of an embodiment of the present invention, a storage device for infrared signals is provided, the device comprising: a data acquisition unit, used to acquire original infrared signal data; a data compression unit, used to search for regularities in the original infrared signal data and perform length compression based on the regularity search results to obtain compressed data; an encryption storage unit, used to encrypt the compressed data to obtain encrypted and compressed infrared signal data, and store the encrypted and compressed infrared signal data.

[0013] According to another aspect of an embodiment of the present invention, a computing device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the steps of the above-mentioned infrared signal storage method.

[0014] According to another aspect of the embodiments of the present invention, a computer storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to execute the steps of the infrared signal storage method described above.

[0015] The embodiment of the present invention obtains original infrared signal data; performs a regularity search on the original infrared signal data and performs length compression according to the regularity search result to obtain compressed data; performs encryption processing on the compressed data to obtain encrypted and compressed infrared signal data, and stores the encrypted and compressed infrared signal data. The original infrared signal data can be effectively compressed and the storage space occupied can be reduced, thereby ensuring efficient and secure storage and reducing system resource overhead and cost.

[0016] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0018] Figure 1 A schematic diagram of an infrared signal storage method in the prior art is shown;

[0019] Figure 2 A schematic diagram showing a flow chart of a method for storing infrared signals provided by an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of the process of the first compression method zip01 provided in an embodiment of the present invention is shown;

[0021] Figure 4 A schematic diagram of searching bit0bit1 from infrared signal data after carrier wave removal provided by an embodiment of the present invention is shown;

[0022] Figure 5A schematic diagram of the process of the second compression method zip02 provided in an embodiment of the present invention is shown;

[0023] Figure 6 A schematic diagram of a method for storing infrared signals provided by an embodiment of the present invention is shown;

[0024] Figure 7 A schematic diagram showing the structure of a storage device for infrared signals provided by an embodiment of the present invention is shown;

[0025] Figure 8 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0026] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0027] Figure 2 FIG. 1 is a flow chart of a method for storing infrared signals provided by an embodiment of the present invention. The method for storing infrared signals is applied to a server, such as Figure 2 As shown, the storage method of the infrared signal includes:

[0028] Step S11: Acquire original infrared signal data.

[0029] In an embodiment of the present invention, the server includes an infrared circuit for receiving raw infrared signal data, which can be used for IoT, smart devices, and remote control, such as key communications for smart homes and remote medical devices. The present application uses an infrared circuit to collect and receive raw infrared signal data emitted by an infrared remote controller.

[0030] Step S12: searching for a regularity on the original infrared signal data and performing length compression according to the regularity search result to obtain compressed data.

[0031] In an embodiment of the present invention, a preset regularity search is performed on the original infrared signal data, and the first compression method is applied to length compress the regular original infrared signal data to obtain compressed data. Optionally, the original infrared signal data is divided by a preset value to obtain infrared signal data after the carrier is removed; and bit0bit1 is searched from the infrared signal data after the carrier is removed. If bit0bit1 is found, the infrared signal data after the carrier is removed is traversed to search for bit0bit1 and bit0bit1 is applied to the infrared signal data after the carrier is removed to perform data compression to obtain compressed data. Specifically, it is determined whether the infrared signal data after the carrier is removed is traversed completely; if the infrared signal data after the carrier is removed is not traversed completely, it is determined whether it is applicable to compress the eight-bit data into one byte through bit0bit1, if applicable, the infrared signal data after the carrier is removed is processed before compression, otherwise the compressed data is stored; if the infrared signal data after the carrier is removed is traversed completely, it is determined whether bit0bit1 is used for data compression; if bit0bit1 is used for data compression, bit0bit1 is applied to compress the infrared signal data after the carrier is removed to obtain compressed data; otherwise, it is determined that the application of the first compression method to compress the original infrared signal data fails. If bit0bit1 is not found, it is determined that the application of the first compression method to compress the original infrared signal data fails.

[0032] Among them, when processing the infrared signal data after removing the carrier before compression, determine whether the infrared signal data after removing the carrier is greater than 255; if so, add 00 before the infrared signal data after removing the carrier, otherwise keep the infrared signal data after removing the carrier unchanged; add ffff and data length to the header of the infrared signal data after removing the carrier to obtain integrated infrared signal data, and store the integrated infrared signal data.

[0033] The format of the first compression method zip01 is shown in Table 1.

[0034] Table 1 Format of the first compression method zip01

[0035] Flags Carrier frequency bit0 bit1 Infrared code 1byte 1byte 2byte 2byte N

[0036] The first compression method can effectively compress regular infrared waveform data into bytes, such as infrared waveforms based on the NEC (Nippon Electric Company) protocol. The NEC protocol is a commonly used infrared remote control protocol used to control various consumer electronic devices and defines the encoding method of the time series of infrared signals. For more specific processes of the first compression method zip01, see Figure 3 ,include:

[0037] Step 100: Start.

[0038] Step 101: Define a global variable char A

[1024] .

[0039] Step 102: Divide the original infrared signal data by 26.3 (data*38 / 1000) and store it in the memory.

[0040] The carrier frequency of the original infrared signal data is 38KHz. The original infrared signal data is divided by 26.3*38 / 1000 to obtain the infrared signal data after removing the carrier. At the same time, it can also reduce the storage amount, reduce the storage space requirement for data, and improve storage efficiency.

[0041] Step 103: Find bit0bit1.

[0042] Step 104: Determine whether bit0bit1 is found. If yes, go to step 106, otherwise go to step 105.

[0043] Step 105: Determine that the first compression method fails. Then jump to step 116.

[0044] Step 106: Traverse the data.

[0045] Step 107: Determine whether all data have been traversed. If yes, jump to step 114, otherwise, execute step 108.

[0046] Step 108: Determine whether the eight-digit number can be compressed into one byte through bit0bit1. If yes, jump to step 110, otherwise, go to step 109.

[0047] Step 109: Store the compressed data in A. Then return to step 107.

[0048] Step 110: Determine whether the data is greater than 255. If so, jump to step 112, otherwise, execute step 111.

[0049] Step 111: Then return to step 113.

[0050] Step 112: Add 00 before the data.

[0051] Step 113: Add ffff and data length to the data header, and finally store the integrated data into A.

[0052] Step 114: Determine whether to use bit0 and bit1 for data compression. If yes, execute step 115; otherwise, return to execute step 105.

[0053] Step 115: Get compressed data.

[0054] Step 116: End.

[0055] When searching for bit0bit1 in the infrared signal data after removing the carrier, first define the first string, which is bit0[0], bit0[1], bit1[0], bit1[1]. Then traverse the infrared signal data after removing the carrier, combine every two digits, and determine whether the difference between two consecutive combinations is within 7. If so, determine whether bit0[0] and bit0[1] exist in the two combinations; otherwise, continue to search for the first string; if bit0[0] and bit0[1] exist, continue to determine whether bit1[0] and bit1[1] exist in the two combinations; if bit0[0] and bit0[1] do not exist, record the first two digits in the two combinations into bit0[0] and bit0[1]. 0[1], and then continue to search for the first string; if bit1[0] and bit1[1] exist, subtract the first two digits of the two combinations from bit0[0] and bit0[1] or bit1[0] and bit1[1], and if the difference is less than 7, take the average of the two combinations and update them to bit0[0] and bit0[1] or bit1[0] and bit1[1]; if bit1[0] and bit1[1] do not exist, record the first two digits of the two combinations to bit1[0] and bit1[1]. For details, see Figure 4 ,include:

[0056] Step 200: Start.

[0057] Step 201: Define char bit0[0], bit0[1], bit1[0], bit1[1].

[0058] Step 202: traverse the data.

[0059] Step 203: Determine whether all data have been traversed. If yes, jump to step 210, otherwise, execute step 204.

[0060] Step 204: for each two-digit combination, determine whether the difference between the two combinations is within 7. If yes, execute step 205, otherwise return to execute step 203.

[0061] Step 205: Determine whether bit0[0], bit0[1] exist. If yes, go to step 207, otherwise go to step 206.

[0062] Step 206: Record the first two digits into bit0[0] and bit0[1]. Then return to step 203.

[0063] Step 207: Determine whether bit1[0], bit1[1] exist. If yes, go to step 208, otherwise go to step 209.

[0064] Step 208: The combination of the two digits minus bit0[0], bit0[1] or bit1[0], bit1[1]; the difference is within 7. The average of these two combinations covers bit0[0], bit0[1] or bit1[0], bit1[1].

[0065] Step 209: Record the first two digits into bit1[0] and bit1[1]. Then return to step 203.

[0066] Step 210: Determine whether bit0[0], bit0[1] bit1[0], bit1[1] exists. If yes, execute step 211; otherwise, jump to execute step 212.

[0067] Step 211: Return that the first compression method is successful.

[0068] Step 212: Return to the first compression method failure.

[0069] Step 213: End.

[0070] The following example illustrates the first compression method: Let the original infrared waveform data be:

[0071] 3419 1709 394 394 394 394 394 1341 394 394 394 394 1341 394 394 394 394 394 1341 394 394 394 394 1341 394 394 394 394 394 394 394 1341 394 394 394 394 394 394 394 1341 394 394 394 394 394 394 394 1341 394 394 394 394 394 394 394 1341 394 394 394 394 394 394 394 394 394 394 394 394 1341 394 394 394 394 394 1341 394 1341 394 394 394 1341 394 394 394 1341 394 394 1341 394 394 394 1341 394 394 394 60490.

[0072] Divide the original infrared waveform data by 26.3 to get the following data:

[0073] 130 65 15 15 15 15 15 51 15 15 15 51 15 15 15 51 15 15 15 51 15 15 15 15 51 15 15 15 15 15 51 15 15 15 15 15 15 51 15 15 15 15 15 15 51 15 15 15 15 15 15 51 15 15 15 15 15 51 15 15 15 15 15 51 15 15 15 15 15 51 15 15 15 15 15 51 15 15 15 15 51 15 15 15 51 15 15 15 2300.

[0074] The data compressed by the first compression method zip01 is:

[0075] 01260F0F0F33ffff0282412AA222825A9Affff040F0008FC.

[0076] In the embodiment of the present invention, the second compression method zip02 directly records and retains the original infrared signal data. When the first compression method zip01 cannot be implemented, the second compression method zip02 is used to compress the original infrared signal data. The format of the second compression method zip02 is shown in Table 2.

[0077] Table 2 Format of the second compression method zip02

[0078] Flags Carrier frequency Infrared code 1byte 1byte N

[0079] If no data conforming to the preset rules is found in the original infrared signal data, it is determined that the compression of the original infrared signal data by the first compression method has failed, and the second compression method is applied to length compress the original infrared signal data to obtain compressed data. Optionally, a global variable is defined, and the original infrared signal data is divided by a preset value to obtain the infrared signal data after the carrier is removed; the infrared signal data after the carrier is removed is traversed, and it is determined whether all the infrared signal data after the carrier is removed is traversed; if all the infrared signal data after the carrier is removed is not traversed, it is determined whether the currently traversed data is greater than 255; if the currently traversed data is greater than 255, 00 is added before the currently traversed data, otherwise the currently traversed data is saved; return to the step of determining whether all the infrared signal data after the carrier is removed is traversed; if all the infrared signal data after the carrier is removed is traversed, compressed data is obtained. The second compression method zip02 directly records and retains the original infrared signal data. For more specific processes, see Figure 5 ,include:

[0080] Step 300: Start.

[0081] Step 311: Define a global variable char A

[1024] .

[0082] Step 312: Divide the data by 26.3 (data*38 / 1000) and store it in the memory.

[0083] Step 313: traverse the data.

[0084] Step 314: Determine whether all data have been traversed. If yes, jump to step 318, otherwise, execute step 315.

[0085] Step 315: Determine whether data>255. If yes, execute step 316, otherwise execute step 317.

[0086] Step 316: Add 00 before the data and save it in A.

[0087] Step 317: The original data is saved to A.

[0088] Step 318: Get compressed data.

[0089] Step 319: End.

[0090] The following example illustrates the second compression method: Let the original infrared waveform data be:

[0091] 9000 4500 550 550 550 550 550 550 550 550 550 1500 550 1500 550 1500 550 1500.

[0092] The original timing is divided by 26.3 to get the following data:

[0093] 342 171 21 21 21 21 21 21 21 21 57 21 57 21 57 21 57 21 57.

[0094] Considering the composition of the second compression method zip02: flag bit + carrier frequency + infrared code, the data compressed by the second compression method zip02 is:

[0095] Flag: 01

[0096] Carrier frequency: 0x26

[0097] Infrared code: 000156AB1515151515151515153915391539153915391539

[0098] The infrared compression code obtained by the second compression method zip02 is: 0126000156AB151515151515151515153915391539153915391539.

[0099] Step S13: encrypting the compressed data to obtain encrypted and compressed infrared signal data, and storing the encrypted and compressed infrared signal data.

[0100] In an embodiment of the present invention, AES128 encryption and Base64 encoding can be applied to the compressed data encryption processing method. Advanced Encryption Standard (AES) is a symmetric key encryption algorithm used to protect electronic data. AES128 uses ECB-pkcs7padding, where ECB represents the electronic codebook mode and pkcs7padding represents the padding mode. Base64 encodes binary data into text and is commonly used for data transmission and storage to improve compatibility.

[0101] The embodiment of the present invention combines the first compression method zip01 and the second compression method zip02 with two compression schemes as well as AES encryption and Base64 encoding to compress and encrypt the original infrared signal data for storage. By efficiently compressing the original infrared signal data, the storage space occupied is reduced, and AES encryption is used to ensure data security. Finally, Base64 encoding is used to facilitate text storage and transmission, which is suitable for the safe storage, transmission and management of the original infrared signal data. For detailed process, see Figure 6 ,include:

[0102] Step 400: Start.

[0103] Step 401: Acquire original infrared signal data.

[0104] Step 402: zip01 compresses the infrared source code.

[0105] Step 403: Determine whether zip01 is compressed successfully. If yes, execute step 405, otherwise execute step 404.

[0106] Step 404: zip02 compresses the infrared source code. Then execute step 405.

[0107] Step 405: AES128 (ECB-pkcs7padding) encryption.

[0108] Step 406: Base64 encoding.

[0109] Step 407: compress and encrypt the infrared signal.

[0110] Step 408: The infrared signal compression encryption code is stored locally.

[0111] Step 409: End.

[0112] The embodiment of the present invention compresses the redundant information in the infrared signal by using two compression methods. By compressing and encoding the infrared signal containing more redundant information, the compression rate can reach 30%-50%, which effectively reduces the storage space requirement of the data and improves the storage efficiency. It is suitable for application scenarios of storing large-scale signal data.

[0113] The embodiment of the present invention uses the AES128 (ECB-pkcs7padding) encryption algorithm to encrypt data to ensure the confidentiality and integrity of data stored in infrared signals. The AES algorithm, with its wide application and security, can resist common attack methods, such as man-in-the-middle attacks and brute force cracking. The probability of infrared signals encrypted using 128-bit AES being cracked is extremely low, which basically meets the requirements of high-security application scenarios. Compared with simple encryption methods, it has a qualitative improvement in security.

[0114] The embodiments of the present invention reduce the total amount of data to be processed, thereby performing efficient storage and reducing the amount of calculation, thereby increasing the efficiency of data processing and storage. In low-power real-time embedded devices, reducing the amount of data and processing time means that input signals can be responded to more quickly, the system throughput can be improved, and real-time requirements can be met.

[0115] The embodiments of the present invention store data by compressing the data length, which significantly reduces the usage rate of storage devices, especially in systems that record signals for a long time. Compared with uncompressed data, the storage cost of the embodiments of the present invention is reduced by about 20% on average, thereby extending the service life of the storage device. In addition, the optimized encryption algorithm consumes less computing resources and is suitable for power-sensitive devices such as Internet of Things terminals, smart home devices, etc.

[0116] In summary, the embodiments of the present invention obtain original infrared signal data; perform a regularity search on the original infrared signal data and perform length compression according to the regularity search result to obtain compressed data; encrypt the compressed data to obtain encrypted and compressed infrared signal data, and store the encrypted and compressed infrared signal data. This can effectively reduce the storage space requirement for data, improve storage efficiency, and is suitable for application scenarios that store large-scale signal data.

[0117] Figure 7 FIG. 2 is a schematic diagram showing the structure of a storage device for infrared signals according to an embodiment of the present invention. Figure 7 As shown, the infrared signal storage device includes: a data acquisition unit 701, a data compression unit 702 and an encryption storage unit 703. Among them:

[0118] The data acquisition unit 701 is used to acquire the original infrared signal data;

[0119] The data compression unit 702 is used to search for regularities in the original infrared signal data and perform length compression according to the regularity search results to obtain compressed data;

[0120] The encryption storage unit 703 is used to encrypt the compressed data to obtain encrypted and compressed infrared signal data, and store the encrypted and compressed infrared signal data.

[0121] The embodiment of the present invention obtains original infrared signal data; performs a regularity search on the original infrared signal data and performs length compression according to the regularity search result to obtain compressed data; encrypts the compressed data to obtain encrypted and compressed infrared signal data, and stores the encrypted and compressed infrared signal data. This can effectively reduce the storage space requirement for data, improve storage efficiency, and is suitable for application scenarios where large-scale signal data is stored.

[0122] An embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the infrared signal storage method in any of the above method embodiments.

[0123] The executable instructions may be specifically used to cause the processor to perform the following operations:

[0124] Obtain raw infrared signal data;

[0125] Searching for regularities in the original infrared signal data and compressing the length of the data according to the regularity search results to obtain compressed data;

[0126] The compressed data is encrypted to obtain encrypted and compressed infrared signal data, and the encrypted and compressed infrared signal data is stored.

[0127] The embodiment of the present invention obtains original infrared signal data; performs a regularity search on the original infrared signal data and performs length compression according to the regularity search result to obtain compressed data; encrypts the compressed data to obtain encrypted and compressed infrared signal data, and stores the encrypted and compressed infrared signal data. This can effectively reduce the storage space requirement for data, improve storage efficiency, and is suitable for application scenarios where large-scale signal data is stored.

[0128] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the infrared signal storage method in any of the above method embodiments.

[0129] The executable instructions may be specifically used to cause the processor to perform the following operations:

[0130] Obtain raw infrared signal data;

[0131] Searching for regularities in the original infrared signal data and compressing the length of the data according to the regularity search results to obtain compressed data;

[0132] The compressed data is encrypted to obtain encrypted and compressed infrared signal data, and the encrypted and compressed infrared signal data is stored.

[0133] The embodiment of the present invention obtains original infrared signal data; performs a regularity search on the original infrared signal data and performs length compression according to the regularity search result to obtain compressed data; encrypts the compressed data to obtain encrypted and compressed infrared signal data, and stores the encrypted and compressed infrared signal data. This can effectively reduce the storage space requirement for data, improve storage efficiency, and is suitable for application scenarios where large-scale signal data is stored.

[0134] Figure 8 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the device.

[0135] like Figure 8As shown, the computing device may include: a processor (processor) 802 , a communication interface (Communications Interface) 804 , a memory (memory) 806 , and a communication bus 808 .

[0136] The processor 802, the communication interface 804, and the memory 806 communicate with each other via a communication bus 808. The communication interface 804 is used to communicate with other devices such as a client or other server network elements. The processor 802 is used to execute a program 810, which can specifically execute the relevant steps in the above-mentioned infrared signal storage method embodiment.

[0137] Specifically, the program 810 may include program codes, which include computer operation instructions.

[0138] The processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0139] The memory 806 is used to store the program 810. The memory 806 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0140] The program 810 may be specifically configured to enable the processor 802 to perform the following operations:

[0141] Obtain raw infrared signal data;

[0142] Searching for regularities in the original infrared signal data and compressing the length of the data according to the regularity search results to obtain compressed data;

[0143] The compressed data is encrypted to obtain encrypted and compressed infrared signal data, and the encrypted and compressed infrared signal data is stored.

[0144] The embodiment of the present invention obtains original infrared signal data; performs a regularity search on the original infrared signal data and performs length compression according to the regularity search result to obtain compressed data; encrypts the compressed data to obtain encrypted and compressed infrared signal data, and stores the encrypted and compressed infrared signal data. This can effectively reduce the storage space requirement for data, improve storage efficiency, and is suitable for application scenarios where large-scale signal data is stored.

[0145] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description made to specific languages ​​above is for disclosing the best mode of the present invention.

[0146] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0147] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than those expressly recited in each claim.

[0148] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0149] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A method for storing infrared signals, characterized in that: The method comprises: Get raw infrared signal data; Searching for a regularity on the original infrared signal data and compressing the length of the data according to the regularity search result to obtain compressed data; The compressed data is encrypted to obtain encrypted and compressed infrared signal data, and the encrypted and compressed infrared signal data is stored.

2. The method according to claim 1, characterized in that The step of searching for a rule on the original infrared signal data and compressing the length of the original infrared signal data according to the rule search result to obtain compressed data includes: Searching for a preset regularity on the original infrared signal data, and applying a first compression method to length compress the regular original infrared signal data to obtain the compressed data; If no data conforming to the preset rule is found in the original infrared signal data, a second compression method is applied to perform length compression on the original infrared signal data to obtain the compressed data.

3. The method according to claim 2, characterized in that The searching of the original infrared signal data for a preset rule and applying a first compression method to length compress the regular original infrared signal data to obtain the compressed data includes: Dividing the original infrared signal data by a preset value to obtain infrared signal data after removing the carrier; Search bit0bit1 from the infrared signal data after removing the carrier; If bit0bit1 is found, traverse the infrared signal data after the carrier is removed to find bit0bit1 and apply bit0bit1 to the infrared signal data after the carrier is removed to perform data compression to obtain the compressed data; If bit0bit1 is not found, it is determined that the compression of the original infrared signal data by applying the first compression method fails.

4. The method according to claim 3, characterized in that The traversing the infrared signal data after the carrier is removed to search for bit0bit1 and applying bit0bit1 to the infrared signal data after the carrier is removed to perform data compression to obtain the compressed data, includes: Determining whether the infrared signal data after the carrier wave is removed has been traversed; If the infrared signal data after the carrier is removed has not been traversed, determine whether it is applicable to compress the eight-bit data into one byte through bit0bit1, if applicable, perform pre-compression processing on the infrared signal data after the carrier is removed, otherwise store the compressed data; If the infrared signal data after removing the carrier is traversed, it is determined whether to use bit0bit1 for data compression; If bit0bit1 is used for data compression, bit0bit1 is applied to compress the infrared signal data after the carrier is removed to obtain the compressed data; otherwise, it is determined that the application of the first compression method to compress the original infrared signal data fails.

5. The method according to claim 4, characterized in that The processing of the infrared signal data after the carrier wave is removed before compression includes: Determine whether the infrared signal data after the carrier is removed is greater than 255; if so, add 00 before the infrared signal data after the carrier is removed, otherwise keep the infrared signal data after the carrier is removed unchanged; Add ffff and data length to the infrared signal data header after removing the carrier to obtain integrated infrared signal data, and store the integrated infrared signal data.

6. The method according to claim 3, characterized in that The searching bit0bit1 from the infrared signal data after the carrier wave is removed includes: Define a first string, the first string is bit0[0], bit0[1], bit1[0], bit1[1]; Traverse the infrared signal data after removing the carrier, combine every two digits, and determine whether the difference between two consecutive combinations is within 7. If so, determine whether bit0[0] and bit0[1] exist in the two combinations; otherwise, continue to search for the first string; If bit0[0] and bit0[1] exist, then continue to determine whether bit1[0] and bit1[1] exist in the two combinations; If bit0[0] and bit0[1] do not exist, the first two digits in the two combinations are recorded in bit0[0] and bit0[1], and then the first string is searched continuously; If bit1[0] and bit1[1] exist, subtract bit0[0] and bit0[1] or bit1[0] and bit1[1] from the first two digits of the two combinations. If the difference is less than 7, take the average of the two combinations and update to bit0[0] and bit0[1] or bit1[0] and bit1[1]; If bit1[0] and bit1[1] do not exist, the first two digits in the two combinations are recorded in bit1[0] and bit1[1].

7. The method according to claim 2, characterized in that The applying the second compression method to compress the length of the original infrared signal data to obtain the compressed data includes: A global variable is defined, and the original infrared signal data is divided by a preset value to obtain the infrared signal data after the carrier is removed; Traversing the infrared signal data after the carrier is removed, and determining whether all the infrared signal data after the carrier is removed has been traversed; If all the infrared signal data after removing the carrier wave have not been traversed, it is determined whether the currently traversed data is greater than 255; If the currently traversed data is greater than 255, add 00 before the currently traversed data, otherwise save the currently traversed data; Return to the step of determining whether all the infrared signal data after the carrier wave is removed has been traversed; If all the infrared signal data after the carrier wave is removed are traversed, the compressed data is obtained.

8. A storage device for infrared signal compression and encryption, characterized in that: The device comprises: A data acquisition unit, used for acquiring raw infrared signal data; A data compression unit, used for searching the original infrared signal data for a regularity and performing length compression according to the regularity search result to obtain compressed data; The encryption storage unit is used to encrypt the compressed data to obtain encrypted and compressed infrared signal data, and store the encrypted and compressed infrared signal data.

9. A computing device, characterized in that include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the steps of the infrared signal storage method according to any one of claims 1-7.

10. A computer storage medium, characterized in that: The storage medium stores at least one executable instruction, and the executable instruction enables the processor to execute the steps of the infrared signal storage method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Data compression method, device and equipment and computer readable storage medium

    CN111262587A

  • Infrared code compression method and device, intelligent equipment and storage medium

    CN116505952A

  • Data compression method and device, computer equipment, storage medium and program product

    CN118199654A

  • Method and system for compressing and encrypting data

    US20120288088A1

  • Fuzzy logic method for an indirect measure of a physical signal to be monitored, and corresponding measuring device

    US6165131A