Data encryption storage method and system for gas detector

By synchronous processing of the detection data packets of the gas detector and function obfuscated storage, the problem of low read and write efficiency caused by separate data storage and independent encryption is solved, and efficient and secure data storage and positioning is achieved.

CN120162012AActive Publication Date: 2025-06-17SHENZHEN EXSAF ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510651572.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-06-17
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

The detection data generated by the gas detector during the detection process is usually stored separately and encrypted independently, resulting in the need to decrypt the entire data during reading, affecting the data reading and writing efficiency.

Method used

By synchronizing the multiple gas detector data packets within the same time period, the randomly generated functions are used to change the data storage order, and the data of multiple gas detectors are mixed and stored together to achieve encryption, and the required data can be quickly positioned by setting the head data and tail data.

Benefits of technology

It greatly improves the storage and positioning efficiency of data, reduces the requirements for computing power, and realizes secure encrypted storage of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162012A_ABST
    Figure CN120162012A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of data storage, and particularly relates to a data encryption storage method and system for gas detectors, and the method comprises the steps: obtaining the detection data of each gas detector according to a preset time interval, and obtaining a plurality of gas detector data packets; acquiring the data volume of each gas detector data packet, performing normalization processing, and constructing a first function; integrating the data packets of the gas detector, and outputting a storage sequence to obtain tail data; acquiring identity identification data, performing data conversion on the first function, and forming head data in combination with the identity identification data. According to the method, the data storage sequence is changed through the randomly generated function, the data of the plurality of gas detectors are mixed and stored together to realize encryption, and the required data can be quickly positioned by setting the head data and the tail data, so that the data storage and positioning efficiency is greatly improved, and the requirement on the computing power is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data storage, and particularly relates to a data encryption storage method and system for gas detectors. Background Art

[0002] A gas detector is a device used to detect the concentration of one or more gases in the environment. It converts the gas concentration into an electrical signal through a sensor, thereby achieving precise monitoring of the leakage or presence of specific gases. This device is widely used in industrial safety, environmental protection, and home security fields, and can timely warn of the presence of toxic and harmful gases, protecting the lives of personnel and environmental health. Gas detectors can detect various gases including but not limited to carbon monoxide, carbon dioxide, methane, oxygen, etc., and are of great significance for preventing accidents and ensuring production safety.

[0003] During the detection process, a gas detector will continuously generate a large amount of detection data. The detection data is generally stored separately and encrypted independently. When reading, the entire data needs to be decrypted, which affects the data reading and writing efficiency. Summary of the Invention

[0004] The purpose of the present invention is to provide a data encryption storage method for gas detectors, aiming to solve the problem that the detection data is generally stored separately and encrypted independently, and when reading, the entire data needs to be decrypted, which affects the data reading and writing efficiency.

[0005] The present invention is implemented as follows. A data encryption storage method for gas detectors, the method includes: Obtain the detection data of each gas detector at a preset time interval to obtain multiple gas detector data packets; Obtain the data volume of each gas detector data packet, perform normalization processing, and construct a first function according to the normalization processing result; Integrate the gas detector data packets, and output the storage order of the data in the gas detector data packet through the first function to obtain tail data; Obtain the identity identification data of the tail data, perform data conversion on the first function, combine the identity identification data to form head data, and jointly store the head data and the tail data.

[0006] Preferably, the step of obtaining the data volume of each gas detector data packet, performing normalization processing, and constructing a first function specifically includes: Read each gas detector data packet one by one and identify the data volume contained therein; Obtain the detection parameters of each gas detector, determine the detection range according to the historical data of the gas detector, perform normalization processing on each data volume according to the detection range, and obtain the normalization processing result; Determine the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, and perform function fitting according to the normalized data volume sequence to obtain the first function.

[0007] Preferably, the step of integrating and processing the gas detector data packet, outputting the storage order of the data in the gas detector data packet through the first function, and obtaining the tail data specifically includes: Stitch the gas detection data packets in a preset order. When stitching, divide all gas detector data packets into data blocks of a preset size, and the data block is the smallest data unit for storage this time; Determine the number of each smallest data unit, use the number of the smallest data unit as the independent variable, import it into the first function, and output a numerical string; Each time, retrieve a preset number of storage units from the physical storage space, determine the storage unit corresponding to the current smallest data unit according to the numerical string, and perform storage to obtain the tail data.

[0008] Preferably, the step of obtaining the identity identification data of the tail data, performing data conversion on the first function, combining the identity identification data to form the head data, and jointly storing the head data and the tail data specifically includes: Obtain the identity identification data of the tail data and the corresponding first function, convert the first function into a binary string of a preset length, and then convert it into a decimal string; Construct a second function by combining multiple groups of decimal strings, use the decimal string corresponding to the first function as the independent variable, and generate the hidden data corresponding to the first function; Combine the hidden data with the identity identification data to obtain the head data. After integrating the head data and the tail data, perform storage. The identity identification data is used to determine the identity of the corresponding tail data.

[0009] Preferably, the identity identification data at least includes the acquisition time interval corresponding to the gas detector data packet.

[0010] Another object of the present invention is to provide a data encryption storage system for a gas detector, and the system includes: A data acquisition module, configured to acquire the detection data of each gas detector at a preset time interval to obtain a plurality of gas detector data packets; A function construction module, configured to acquire the data volume of each gas detector data packet, perform normalization processing, and construct a first function according to the normalization processing result; The tail data generation module is used to integrate and process the gas detector data packets, and output the storage order of the data in the gas detector data packets through the first function to obtain the tail data; The head data generation module is used to obtain the identity identification data of the tail data, perform data conversion on the first function, form the head data in combination with the identity identification data, and jointly store the head data and the tail data.

[0011] Preferably, the function construction module includes: The data volume extraction unit is used to read each gas detector data packet one by one and identify the data volume contained therein; The normalization processing unit is used to obtain the detection parameters of each gas detector, determine the detection range according to the historical data of the gas detector, and perform normalization processing on each data volume according to the detection range to obtain the normalization processing result; The function fitting unit is used to determine the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, and perform function fitting according to the normalized data volume sequence to obtain the first function.

[0012] Preferably, the tail data generation module includes: The data splicing unit is used to splice the gas detection data packets in a preset order. When splicing, all gas detector data packets are divided into data blocks of a preset size, and the data block is the smallest data unit for storage this time; The data calculation unit is used to determine the number of each smallest data unit, use the number of the smallest data unit as the independent variable, import it into the first function, and output a numerical string; The tail data storage unit is used to fetch a preset number of storage units from the physical storage space each time, determine the storage unit corresponding to the current smallest data unit according to the numerical string, and perform storage to obtain the tail data.

[0013] Preferably, the head data generation module includes: The data conversion unit is used to obtain the identity identification data of the tail data and the corresponding first function, convert the first function into a binary string of a preset length, and then convert it into a decimal string; The function hiding unit is used to construct a second function by combining multiple groups of decimal strings, use the decimal string corresponding to the first function as the independent variable, and generate the hidden data corresponding to the first function; The data integration unit is used to combine the hidden data with the identity identification data to obtain the head data. After the head data and the tail data are integrated, they are stored. The identity identification data is used to determine the identity of the corresponding tail data.

[0014] Preferably, the identity identification data at least includes the acquisition time interval corresponding to the gas detector data packet.

[0015] A data encryption storage method for a gas detector provided by the present invention synchronizes multiple gas detector data packets within the same time period, changes the data storage order through a randomly generated function, mixes and stores the data of multiple gas detectors together to achieve encryption, and can quickly locate the required data by setting the header data and the tail data, greatly improving the data storage and location efficiency, and having low requirements for computing power. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flowchart of a data encryption storage method for a gas detector provided by an embodiment of the present invention; Figure 2 is a flowchart of the steps of obtaining the data volume of each gas detector data packet, performing normalization processing, and constructing a first function according to the normalization processing result provided by an embodiment of the present invention; Figure 3 is a flowchart of the steps of integrating and processing the gas detector data packet, outputting the storage order of the data in the gas detector data packet through the first function, and obtaining the tail data provided by an embodiment of the present invention; Figure 4 is a flowchart of the steps of obtaining the identity identification data of the tail data, performing data conversion on the first function, forming the header data in combination with the identity identification data, and jointly storing the header data and the tail data provided by an embodiment of the present invention; Figure 5 is an architecture diagram of a data encryption storage system for a gas detector provided by an embodiment of the present invention; Figure 6 is an architecture diagram of a function construction module provided by an embodiment of the present invention; Figure 7 is an architecture diagram of a tail data generation module provided by an embodiment of the present invention; Figure 8 is an architecture diagram of a header data generation module provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0018] As Figure 1 shown, it is a flowchart of a data encryption storage method for a gas detector provided by an embodiment of the present invention, and the method includes: S100. Obtain the detection data of each gas detector at preset time intervals to obtain multiple gas detector data packets.

[0019] In this step, obtain the detection data of each gas detector at preset time intervals. The number of gas detectors can be multiple. By setting multiple and various gas detectors, multiple gases can be detected simultaneously and multiple locations can be detected. Each gas detector will generate a corresponding gas detector data packet. The gas detector data packets are temporarily stored in the gas detector. The acquisition device collects data at preset time intervals, and the acquisition device packs the data from one gas detector together to obtain multiple gas detector data packets.

[0020] S200. Obtain the data volume of each gas detector data packet, perform normalization processing, and construct a first function based on the normalization processing result.

[0021] In this step, obtain the data volume of each gas detector data packet. Since the detection frequencies of each gas detector are different and the data types obtained by detection are different, this results in different data volumes in each gas detector data packet within the same time period. For the convenience of processing, the data volume of the gas detector data packet is subjected to normalization processing, and it is sorted into values within a specified range, such as processed into values within the range A - B. Determine the number of the gas detector data packet, and construct a data volume coordinate based on this number and the data volume in the corresponding normalization processing result. Using the data volume coordinate as the data source, adopt the method of data coordinate fitting to form the first function corresponding to the above data volume coordinate. Since the data collected by the gas detector within the same time period is different and the data volume will also vary, the data volume coordinate changes randomly, and the obtained first function also changes randomly.

[0022] S300. Integrate and process the gas detector data packets, and output the storage order of the data in the gas detector data packets through the first function to obtain the tail data.

[0023] In this step, integrate and process the gas detector data packets, splice the gas detection data packets to integrate them into a whole, and then split the gas detector data packets into multiple data blocks. Each data block is a minimum data unit. After obtaining the first function, number the data blocks to determine the number of each data block. Use the number of the data block as the input and import it into the first function. Each data block will correspond to a data result, and process the data result according to a preset rule to determine the position of each data block in the storage space, thereby completing the storage of all gas detection data packets in this batch and obtaining the tail data.

[0024] S400 acquires the identity identification data of the tail data, performs data conversion on the first function, combines the identity identification data to form the head data, and jointly stores the head data and the tail data.

[0025] In this step, the identity identification data of the tail data is acquired, and an identity identification data is set for each tail data. The identity identification data is used to determine the identity of the tail data. The identity identification data at least includes the acquisition time interval corresponding to the gas detector data packet, and may also include additional identity data such as the model and location of the gas detector. To ensure data security, data conversion is performed on the first function. By constructing a second function, the second function takes the identity identification data as the independent variable, and its output result is the converted first function. The converted first function is combined with the identity identification data to obtain the head data. The head data and the tail data are integrated and stored, that is, the storage of this batch of gas detector data packets is completed. An independent database is established to store the second function and the corresponding identity identification data. When the identity identification data is updated or the second function is updated, the corresponding independent database is synchronously updated; when the data in the tail data needs to be used, the head data is located with the identity identification data as the retrieval source, the tail data is determined according to the head data, the corresponding second function is retrieved from the independent database, the first function is restored through the second function, and the storage order of the data blocks is determined according to the first function and the numbers of all data blocks, so as to restore the data whole formed by splicing multiple gas detector data packets, thereby obtaining multiple gas detector data packets.

[0026] As Figure 2 shown, as a preferred embodiment of the present invention, the step of acquiring the data amounts of the respective gas detector data packets, performing normalization processing, and constructing the first function according to the normalization processing result specifically includes: S201 reads each gas detector data packet one by one and identifies the data amount contained therein.

[0027] In this embodiment, each gas detector data packet is read one by one. The data contained in the gas detector data packets of the same batch comes from the same time period. Due to the different models and gas concentrations of the gas detectors, different data amounts will be included, and the data amounts are statistically counted.

[0028] S202 acquires the detection parameters of each gas detector, determines the detection range according to the historical data of the gas detector, and performs normalization processing on each data amount according to the detection range to obtain the normalization processing result.

[0029] In this embodiment, the detection parameters of each gas detector are obtained. The detection ranges of each gas detector are different. For example, the maximum detection concentration of gas detector a is M1, and the minimum detection concentration is M2. Then the data detected by it are all within the above range. However, since the concentration of the gas to be detected may only fluctuate within a relatively small range, such as fluctuating between M3 and M4, where M1 < M3 < M4 < M2, the historical data of the gas detector are retrieved, and the concentration fluctuation range of the current gas is determined according to the historical data of the gas detector. The maximum data volume and the minimum data volume in the historical data are extracted, and taking the maximum data volume and the minimum data volume as the upper and lower limits, normalization processing is performed to unify the data volume of each gas detector data packet within the range from n1 to n2. For example, the maximum data volume is n1, and the minimum data volume is n2. After the data volume n is normalized, it is (n - n2) / (n1 - n2).

[0030] S203. Determine the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, and perform function fitting according to the normalized data volume sequence to obtain the first function.

[0031] In this embodiment, determine the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, determine the number of each gas detector data packet, and the normalized data volume corresponding to the gas detector data packet, construct a normalized data volume sequence, extract the number and the corresponding normalized data volume, construct a data volume coordinate, and perform fitting on the data volume coordinate to obtain the first function.

[0032] As Figure 3 shown, as a preferred embodiment of the present invention, the step of integrating and processing the gas detector data packet, outputting the storage order of the data in the gas detector data packet through the first function, and obtaining the tail data specifically includes: S301. Stitch the gas detection data packets in a preset order. When stitching, divide all gas detector data packets into data blocks of a preset size, and the data block is the smallest data unit for storage this time.

[0033] In this embodiment, stitch the gas detection data packets in a preset order, disassemble the gas detection data packets, divide each gas detection data packet into data blocks of the same size, and write the independent number of each data block in each data block to determine the gas detector data packet to which each data block belongs.

[0034] S302. Determine the number of each smallest data unit, use the number of the smallest data unit as the independent variable, import it into the first function, and output a numerical string.

[0035] In this embodiment, the numbers of each minimum data unit are determined. Specifically, the number of the data block is extracted and regarded as the independent variable. The first function outputs the corresponding calculation result according to the independent variable, and regards the calculation result as a string, that is, a numerical string is obtained.

[0036] S303. Each time a preset number of storage units are retrieved from the physical storage space, the storage unit corresponding to the current minimum data unit is determined according to the numerical string and stored to obtain the tail data.

[0037] In this embodiment, each time a preset number of storage units are retrieved from the physical storage space. The storage units are used to store the minimum data units. According to the total number of the minimum data units, the corresponding physical storage space of a corresponding size is retrieved. Similarly, the physical storage space is divided into the same number of storage units and continuously numbered. A preset number of characters are intercepted from the head of the numerical string, for example, two characters are intercepted. And in this process, according to the number order of the storage units, a preset number of storage units without stored data are selected from the physical storage space. If the number of intercepted characters is d, and the largest number corresponding to d decimal characters is D, then the number of retrieved storage units is D + 1. When retrieving the storage units, the number of the first storage unit is 0, starting from zero, and the number increases by 1 each time. If the currently numbered storage unit is in an un-stored state, it is retrieved until the number of retrieved storage units reaches the preset value. The storage position of the database is determined according to the intercepted characters. For example, if the intercepted characters are 78, then from the D + 1 storage units retrieved this time, the 78th storage unit is selected, and the data block is stored in this storage unit. Accordingly, the storage positions of all data blocks are determined. After all data blocks are stored, the data blocks are connected as a whole to obtain the tail data.

[0038] As Figure 4 shown, as a preferred embodiment of the present invention, the steps of obtaining the identity identification data of the tail data, performing data conversion on the first function, forming the head data in combination with the identity identification data, and jointly storing the head data and the tail data specifically include: S401. Obtain the identity identification data of the tail data and the corresponding first function, convert the first function into a binary string with a preset length, and then convert it into a decimal string.

[0039] In this step, obtain the identity identification data of the tail data and the corresponding first function. The identity identification data is used to determine the data content included in this part of the tail data, which can be characterized by a time value, indicating the time range to which the data included in the current tail data belongs. It can also include data such as gas type and detector type for subsequent retrieval. Convert the first function into a binary string of a preset length. If the length of the binary string after conversion does not reach the preset length, add 0s in front of the binary string until the overall length reaches the preset length, and then convert it into a decimal string.

[0040] S402. Combine multiple groups of decimal strings to construct a second function. Use the decimal string corresponding to the first function as the independent variable to generate the hidden data corresponding to the first function.

[0041] In this step, combine multiple groups of decimal strings to construct a second function. When storing data, multiple batches of gas detection data packets can be processed together. For example, within one hour, the acquisition device conducts 10 data acquisitions and obtains ten batches of gas detector data packets. The acquisition time corresponding to the same batch is the same. Then, each batch of gas detector data packets will correspond to a first function and thus a corresponding decimal string. Construct a string coordinate according to the batch order. The abscissa of the string coordinate is the batch number, and the ordinate is the decimal string. Obtain the corresponding second function through fitting. These ten batches of gas detection data packets share the current second function. The fitting tool can be data analysis tools such as matlab. If the number of batches is small, decimal strings can be randomly generated to obtain the second function. Import the decimal string corresponding to the first function into the second function to obtain the calculated value, which is the hidden data corresponding to the first function.

[0042] S403. Combine the hidden data with the identity identification data to obtain the header data. After integrating the header data and the tail data, store them. The identity identification data is used to determine the identity of the corresponding tail data.

[0043] In this step, the hidden data is combined with the identity identification data to obtain the header data. The hidden data is essentially the first function. With the first function, the gas detection data packet contained in the tail data can be decrypted. The header data contains the identity identification data, which is convenient for retrieval. Therefore, when a certain data needs to be retrieved, it can be retrieved through the header data first. After confirmation, the corresponding second function is retrieved, and the inverse function of the second function is calculated. According to the hidden data in the header data and the inverse function of the second function, the decimal string corresponding to the first function is calculated and restored to binary data, that is, the first function is obtained. After obtaining the first function, according to the number of data blocks contained in the tail data, the arrangement order of the data blocks can be determined, so as to restore the gas detector data packet. If the gas detector data packet is modified, it will affect the first function and the second function during the next storage process, realizing the update of the first function and the second function.

[0044] As Figure 5 shown, a data encryption storage system for a gas detector provided by an embodiment of the present invention includes: A data acquisition module 100, configured to acquire the detection data of each gas detector at a preset time interval to obtain a plurality of gas detector data packets.

[0045] In this step, the data acquisition module 100 acquires the detection data of each gas detector at a preset time interval. The number of gas detectors can be multiple. By setting multiple and various gas detectors, multiple gases can be detected simultaneously and multiple positions can be detected. Each gas detector will generate a corresponding gas detector data packet. The gas detector data packets are temporarily stored in the gas detector. The data is collected by the collection device at a preset time interval. The collection device packs the data from one gas detector together to obtain a plurality of gas detector data packets.

[0046] A function construction module 200, configured to obtain the data volume of each gas detector data packet, perform normalization processing, and construct a first function according to the normalization processing result.

[0047] In this step, the function construction module 200 obtains the data volume of each gas detector data packet. Since the detection frequencies of the gas detectors are different and the data types obtained by detection are different, the data volumes of the gas detector data packets are different within the same time period. For the convenience of processing, the data volumes of the gas detector data packets are normalized and sorted into values within a specified range, such as values within the range A - B. The numbers of the gas detector data packets are determined, and based on the numbers and the data volumes in the corresponding normalized processing results, data volume coordinates are constructed. Using the data volume coordinates as the data source and adopting the method of data coordinate fitting, the first function corresponding to the above data volume coordinates is formed. Since the data collected by the gas detectors within the same time period is different and the data volumes will also vary, the data volume coordinates change randomly, and the obtained first function also changes randomly.

[0048] The tail data generation module 300 is used to perform integration processing on the gas detector data packets, and outputs the storage order of the data in the gas detector data packets through the first function to obtain the tail data.

[0049] In this step, the tail data generation module 300 performs integration processing on the gas detector data packets, splices the gas detection data packets to integrate them into a whole, and then splits the gas detector data packets into multiple data blocks. Each data block is a minimum data unit. After obtaining the first function, the data blocks are numbered to determine the number of each data block. Using the number of the data block as the input, it is imported into the first function. Each data block will correspond to a data result, and the data results are processed according to a preset rule to determine the position of each data block in the storage space, thereby completing the storage of all gas detection data packets in this batch and obtaining the tail data.

[0050] The head data generation module 400 is used to obtain the identity identification data of the tail data, perform data conversion on the first function, combine the identity identification data to form the head data, and jointly store the head data and the tail data.

[0051] In this step, the header data generation module 400 obtains the identity identification data of the tail data, sets an identity identification data for each piece of tail data. The identity identification data is used to determine the identity of the tail data. The identity identification data at least includes the acquisition time interval corresponding to the gas detector data packet, and may also include additional identity data such as the model and location of the gas detector. To ensure data security, data conversion is performed on the first function. By constructing a second function, the second function takes the identity identification data as the independent variable, and its output result is the converted first function. The converted first function is combined with the identity identification data to obtain the header data. The header data is integrated with the tail data and stored, thus completing the storage of this batch of gas detector data packets. An independent database is established to store the second function and the corresponding identity identification data. When the identity identification data is updated or the second function is updated, the corresponding independent database is synchronously updated; when the data in the tail data needs to be used, the header data is located with the identity identification data as the retrieval source, the tail data is determined according to the header data, the corresponding second function is retrieved from the independent database, the first function is restored through the second function, and the storage order of the data blocks is determined according to the first function and the numbers of all data blocks, so as to restore the data whole formed by splicing multiple gas detector data packets, thereby obtaining multiple gas detector data packets.

[0052] As Figure 6 shown, as a preferred embodiment of the present invention, the function construction module 200 includes: The data volume extraction unit 201 is configured to read each gas detector data packet one by one and identify the data volume contained therein.

[0053] In this module, the data volume extraction unit 201 reads each gas detector data packet one by one. The data contained in the gas detector data packets of the same batch comes from the same time period. Due to different models and gas concentrations of the gas detectors, different data volumes will be included, and the data volumes are statistically analyzed.

[0054] The normalization processing unit 202 is configured to obtain the detection parameters of each gas detector, determine the detection range according to the historical data of the gas detector, and perform normalization processing on each data volume according to the detection range to obtain the normalization processing result.

[0055] In this module, the normalization processing unit 202 obtains the detection parameters of each gas detector. The detection ranges of each gas detector are different. For example, the maximum detection concentration of gas detector a is M1, and the minimum detection concentration is M2. Then the data detected by it are all within the above range. However, since the concentration of the gas to be detected may only fluctuate within a relatively small range, such as fluctuating between M3 and M4, where M1 < M3 < M4 < M2, the historical data of the gas detector is retrieved, and the concentration fluctuation range of the current gas is determined according to the historical data of the gas detector. The maximum data volume and the minimum data volume in the historical data are extracted. Using the maximum data volume and the minimum data volume as the upper and lower limits, normalization processing is performed to unify the data volume of each gas detector data packet within the range from n1 to n2. For example, the maximum data volume is n1, and the minimum data volume is n2. After the data volume n is normalized, it is (n - n2) / (n1 - n2).

[0056] The function fitting unit 203 is configured to determine the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, and perform function fitting according to the normalized data volume sequence to obtain the first function.

[0057] In this module, the function fitting unit 203 determines the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, determines the number of each gas detector data packet, and the normalized data volume corresponding to the gas detector data packet, constructs a normalized data volume sequence, extracts the number and the corresponding normalized data volume, constructs a data volume coordinate, and performs fitting on the data volume coordinate to obtain the first function.

[0058] As Figure 7 shown, as a preferred embodiment of the present invention, the tail data generation module 300 includes: The data splicing unit 301 is configured to splice the gas detection data packets in a preset order. When splicing, all gas detector data packets are divided into data blocks of a preset size, and the data block is the smallest data unit for storage this time.

[0059] In this module, the data splicing unit 301 splices the gas detection data packets in a preset order, disassembles the gas detection data packets, divides each gas detection data packet into data blocks of the same size, and writes the independent number of each data block in each data block to determine the gas detector data packet to which each data block belongs.

[0060] The data calculation unit 302 is configured to determine the number of each smallest data unit, use the number of the smallest data unit as the independent variable, import it into the first function, and output a numerical string.

[0061] In this module, the data calculation unit 302 determines the number of each minimum data unit. Specifically, it extracts the number of the data block, regards it as an independent variable, and the first function outputs the corresponding calculation result according to the independent variable. The calculation result is regarded as a string, that is, a numerical string is obtained.

[0062] The tail data storage unit 303 is used to retrieve a preset number of storage units from the physical storage space each time, determine the storage unit corresponding to the current minimum data unit according to the numerical string, and perform storage to obtain the tail data.

[0063] In this module, the tail data storage unit 303 retrieves a preset number of storage units from the physical storage space each time. The storage units are used to store the minimum data units. According to the total number of the minimum data units, the corresponding physical storage space of the corresponding size is retrieved. Similarly, the physical storage space is divided into the same number of storage units and continuously numbered. A preset number of characters are intercepted from the head of the numerical string, such as intercepting two characters. During this process, a preset number of storage units without stored data are selected from the physical storage space in the order of the storage unit numbers. If the number of intercepted characters is d, and the largest number corresponding to d decimal characters is D, then the number of retrieved storage units is D + 1. When retrieving the storage units, the number of the first storage unit is 0, starting from zero, and the number increases by 1 each time. If the currently numbered storage unit is in an un-stored state, it is retrieved until the number of retrieved storage units reaches the preset value. The storage position of the database is determined according to the intercepted characters. For example, if the intercepted characters are 78, then from the D + 1 storage units retrieved this time, the 78th storage unit is selected, and the data block is stored in this storage unit. Accordingly, the storage positions of all data blocks are determined. After storing all the data blocks, the data blocks are connected as a whole to obtain the tail data.

[0064] As Figure 8 shown, as a preferred embodiment of the present invention, the head data generation module 400 includes: The data conversion unit 401 is used to obtain the identity identification data of the tail data and the corresponding first function, convert the first function into a binary string of a preset length, and then convert it into a decimal string.

[0065] In this module, the data conversion unit 401 obtains the identity identification data of the tail data and the corresponding first function. The identity identification data is used to determine the data content included in this part of the tail data, which can be characterized by a time value, indicating the time range to which the data included in the current tail data belongs, and can also include data such as gas type and detector type for subsequent retrieval. The first function is converted into a binary string of a preset length. If the length of the binary string after conversion does not reach the preset length, 0s are added in front of the binary string until the overall length reaches the preset length, and then it is converted into a decimal string.

[0066] The function hiding unit 402 is used to construct a second function by combining multiple groups of decimal strings, taking the decimal string corresponding to the first function as the independent variable to generate the hidden data corresponding to the first function.

[0067] In this module, the function hiding unit 402 constructs a second function by combining multiple groups of decimal strings. When storing data, multiple batches of gas detection data packets can be processed together. For example, within one hour, the acquisition device performs 10 data acquisitions, obtaining ten batches of gas detector data packets. The acquisition time corresponding to the same batch is the same. Then, each batch of gas detector data packets will correspond to a first function and thus a corresponding decimal string. The string coordinates are constructed in the order of batches. The abscissa of the string coordinates is the batch number, and the ordinate is the decimal string. The corresponding second function is obtained by fitting. These ten batches of gas detection data packets share the current second function; the fitting tool can be a data analysis tool such as matlab. If the number of batches is small, the second function can be obtained by randomly generating decimal strings. The decimal string corresponding to the first function is imported into the second function to obtain the calculated value, which is the hidden data corresponding to the first function.

[0068] The data integration unit 403 is used to combine the hidden data with the identity identification data to obtain the header data. After the header data and the tail data are integrated, they are stored. The identity identification data is used to determine the identity of the corresponding tail data.

[0069] In this module, the data integration unit 403 combines the hidden data with the identity identification data to obtain the header data. The hidden data is essentially the first function. With the first function, the gas detection data packet contained in the tail data can be decrypted. The header data contains the identity identification data, which facilitates retrieval. Therefore, when retrieving a certain data, the header data can be used for retrieval first. After confirmation, the corresponding second function is retrieved, the inverse function of the second function is calculated, and the decimal string corresponding to the first function is calculated based on the hidden data in the header data and the inverse function of the second function, and then it is restored to binary data, that is, the first function is obtained. After obtaining the first function, according to the number of data blocks contained in the tail data, the arrangement order of the data blocks can be determined, and thus the gas detector data packet can be restored. If the gas detector data packet is modified, it will affect the first function and the second function during the next storage process, realizing the update of the first function and the second function.

[0070] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data encryption storage method for a gas detector, characterized in that: The method comprises: Acquire detection data of each gas detector at a preset time interval to obtain multiple gas detector data packets; Obtaining the data volume of each gas detector data packet, performing normalization processing, and constructing a first function according to the normalization processing result; The gas detector data packet is integrated and processed, and the storage order of the data in the gas detector data packet is output through the first function to obtain the tail data; The identity data of the tail data is obtained, data conversion is performed on the first function, the head data is formed in combination with the identity data, and the head data and the tail data are jointly stored.

2. The data encryption storage method for a gas detector according to claim 1, characterized in that: The step of obtaining the data volume of each gas detector data packet, performing normalization processing, and constructing the first function according to the normalization processing result specifically includes: Read each gas detector data packet one by one to identify the amount of data contained therein; Acquire detection parameters of each gas detector, determine the detection range according to historical data of the gas detector, perform normalization processing on each data amount according to the detection range, and obtain a normalization processing result; A normalized data volume sequence corresponding to each gas detector data packet is determined according to the normalized processing result, and a function fitting is performed according to the normalized data volume sequence to obtain a first function.

3. The data encryption storage method for a gas detector according to claim 1, characterized in that: The step of integrating the gas detector data packet and outputting the storage order of the data in the gas detector data packet through the first function to obtain the tail data specifically includes: The gas detection data packets are spliced ​​in a preset order. When splicing, all gas detector data packets are divided into data blocks of a preset size, and the data block is the smallest data unit to be stored this time; Determine the number of each minimum data unit, use the number of the minimum data unit as an independent variable, import it into the first function, and output a numerical string; Each time, a preset number of storage units are called out from the physical storage space, and the storage unit corresponding to the current minimum data unit is determined according to the numerical character string, and stored to obtain the tail data.

4. The data encryption storage method for a gas detector according to claim 1, characterized in that: The steps of obtaining the identity data of the tail data, performing data conversion on the first function, combining the identity data to form the header data, and jointly storing the header data and the tail data specifically include: Obtaining the identity data of the tail data and the corresponding first function, converting the first function into a binary string of a preset length, and then converting the binary string into a decimal string; Combining multiple groups of decimal character strings to construct a second function, taking the decimal character strings corresponding to the first function as independent variables, and generating hidden data corresponding to the first function; The hidden data is combined with the identity data to obtain the header data, and the header data is integrated with the tail data and then stored. The identity data is used to determine the identity of the corresponding tail data.

5. The data encryption storage method for a gas detector according to claim 1, characterized in that: The identification data at least includes a collection time interval corresponding to the gas detector data packet.

6. A data encryption storage system for a gas detector, characterized in that: The system comprises: A data acquisition module is used to acquire detection data of each gas detector at a preset time interval to obtain multiple gas detector data packets; A function construction module, used for obtaining the data volume of each gas detector data packet, performing normalization processing, and constructing a first function according to the normalization processing result; The tail data generating module is used to integrate and process the gas detector data packet, and output the storage order of the data in the gas detector data packet through the first function to obtain the tail data; The header data generation module is used to obtain the identity data of the tail data, perform data conversion on the first function, form the header data in combination with the identity data, and jointly store the header data and the tail data.

7. The data encryption storage system for gas detectors according to claim 6, characterized in that: The function building block includes: A data volume extraction unit is used to read each gas detector data packet one by one and identify the amount of data contained therein; A normalization processing unit is used to obtain detection parameters of each gas detector, determine the detection range according to the historical data of the gas detector, and perform normalization processing on each data amount according to the detection range to obtain a normalization processing result; The function fitting unit is used to determine the normalized data volume sequence corresponding to each gas detector data packet according to the normalization processing result, and perform function fitting according to the normalized data volume sequence to obtain a first function.

8. The data encryption storage system for gas detectors according to claim 6, characterized in that: The tail data generation module comprises: A data splicing unit is used to splice gas detection data packets according to a preset order. When splicing, all gas detector data packets are divided into data blocks of a preset size. The data block is the smallest data unit to be stored this time. A data calculation unit, used for determining the number of each minimum data unit, taking the number of the minimum data unit as an independent variable, importing it into the first function, and outputting a numerical string; The tail data storage unit is used to call out a preset number of storage units from the physical storage space each time, determine the storage unit corresponding to the current minimum data unit according to the numerical string, and store it to obtain the tail data.

9. The data encryption storage system for gas detectors according to claim 6, characterized in that: The header data generation module comprises: A data conversion unit, used to obtain the identity identification data of the tail data and the corresponding first function, and convert the first function into a binary string of a preset length, and then convert the binary string into a decimal string; A function hiding unit, used to construct a second function by combining multiple groups of decimal character strings, taking the decimal character string corresponding to the first function as an independent variable, and generating hidden data corresponding to the first function; The data integration unit is used to combine the hidden data with the identity data to obtain the header data. The header data and the tail data are integrated and then stored. The identity data is used to determine the identity of the corresponding tail data.

10. The data encryption storage system for gas detectors according to claim 6, characterized in that: The identification data at least includes a collection time interval corresponding to the gas detector data packet.

Citation Information

Patent Citations

  • Lightweight data storage device and method suitable for graph block chain

    CN113641664A

  • Data storage method and device and storage medium

    CN114969803A

  • Security data management system based on space-time encryption

    CN118395469A

  • System and method for multi-stream data write

    US20170371585A1

  • Systems and Methods for Privacy-Reserving Data Hiding

    US20220045858A1