CN116016606B - Sewage treatment operation and maintenance data efficient management system based on intelligent cloud - Google Patents

Sewage treatment operation and maintenance data efficient management system based on intelligent cloud Download PDF

Info

Publication number
CN116016606B
CN116016606B CN202310026043.6A CN202310026043A CN116016606B CN 116016606 B CN116016606 B CN 116016606B CN 202310026043 A CN202310026043 A CN 202310026043A CN 116016606 B CN116016606 B CN 116016606B
Authority
CN
China
Prior art keywords
data
layer
bit block
bit
binary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310026043.6A
Other languages
Chinese (zh)
Other versions
CN116016606A (en
Inventor
吴用
褚巍
周亚斌
程凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Focus Analysis And Test Technology Co ltd
Original Assignee
Anhui Focus Analysis And Test Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Focus Analysis And Test Technology Co ltd filed Critical Anhui Focus Analysis And Test Technology Co ltd
Priority to CN202310026043.6A priority Critical patent/CN116016606B/en
Publication of CN116016606A publication Critical patent/CN116016606A/en
Application granted granted Critical
Publication of CN116016606B publication Critical patent/CN116016606B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W10/00Technologies for wastewater treatment
    • Y02W10/10Biological treatment of water, waste water, or sewage

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application relates to the technical field of data processing, in particular to a sewage treatment operation and maintenance data efficient management system based on intelligent cloud, which comprises the following components: the data preprocessing module is used for acquiring binary codes of each piece of data to be stored in the sewage treatment process, dividing the binary codes to obtain bit blocks, and setting identifiers corresponding to the bit blocks according to the positions of the bit blocks; the data analysis module is used for constructing a binary coding table; obtaining the corresponding merging necessity of each layer according to the data type of each layer of bit block; merging layers to be merged according to merging necessity to obtain a preferred binary coding table; and the compression storage module is used for determining the size of the primitive according to each layer of bit block in the optimized binary coding table, counting the run length according to the primitive size, performing run coding compression on all layers, and storing the data sequence obtained by compression. The application can carry out high-efficiency storage management on the sewage treatment operation data.

Description

Sewage treatment operation and maintenance data efficient management system based on intelligent cloud
Technical Field
The application relates to the technical field of data processing, in particular to a sewage treatment operation and maintenance data efficient management system based on intelligent cloud.
Background
The intelligent operation management system is an intelligent system which is realized by utilizing relevant data processing means through basic data in the operation process of intelligent acquisition equipment. Because the sewage treatment sites are more, data acquired by each site can be transmitted to the central processing system for data analysis, and basic data of equipment operation is reserved, a large amount of data is required to be stored in the process, so that the storage pressure of the system is increased, and the acquired data is required to be compressed and then stored. At present, when data is compressed by using more commonly used run-length codes, the effect of compressing a plurality of continuous repeated data is higher, the compression effect of fewer continuous repeated data is poorer, and even the phenomenon of data expansion occurs.
Disclosure of Invention
In order to solve the technical problem that run-length encoding has poor compression effect on fewer continuous repeated data and further causes incapability of carrying out efficient storage management on operation and maintenance data, the application aims to provide a sewage treatment operation and maintenance data efficient management system based on intelligent cloud, and the adopted technical scheme is as follows:
the data preprocessing module is used for binary conversion of each piece of data to be stored in the sewage treatment process to obtain binary codes of each piece of data to be stored, dividing the binary codes by using a set length to obtain at least two bit blocks, and setting identifiers corresponding to the bit blocks according to the positions of the bit blocks;
the data analysis module is used for placing bit blocks and identifiers corresponding to binary codes of data to be stored in different layers to construct a binary code table; obtaining the corresponding merging necessity of each layer according to the data type of each layer of bit block; merging layers to be merged according to merging necessity to obtain a preferred binary coding table;
and the compression storage module is used for determining the size of the primitive according to each layer of bit block in the optimized binary coding table, counting the run length according to the primitive size, performing run coding compression on all layers, and storing the data sequence obtained by compression.
Preferably, the determining the primitive size according to each layer of bit block in the preferred binary encoding table is specifically:
in the preferred binary coding table, the layers after merging are marked as merging layers, the layers which are not merged are marked as independent layers, and the layers where the identifiers are located are marked as identifier layers; for the merging layer, taking the coded data length of the bit block as the primitive size; for the independent layer and the identifier layer, a preset fixed length is taken as a primitive size.
Preferably, the setting the identifier corresponding to the bit block according to the position of the bit block specifically includes:
marking any bit block as a target bit block, and setting an identifier of the target bit block as a first numerical value if the bit block still exists behind the target bit block in binary coding of the target bit block; if there is no bit block after the target bit block, the identifier of the target bit block is set to a second value.
Preferably, the method for acquiring the merging necessity specifically comprises the following steps:
counting the occurrence times of each type of bit block for any layer of bit blocks, recording the bit block corresponding to the type with the largest occurrence times as a selected bit block, calculating the average value of the occurrence times of all other types of bit blocks except the selected bit block, and calculating the difference value between the occurrence times of the selected bit block and the average value, wherein the ratio between the difference value and the occurrence times of the selected bit block is the merging necessity corresponding to the layer.
Preferably, the placing the bit block and the identifier corresponding to the binary code of the data to be stored in different layers, and constructing a binary code table, includes:
arranging bit blocks corresponding to binary codes of data to be stored according to a coding sequence, placing a first bit block in a first layer bit layer in the arrangement sequence corresponding to each data to be stored, placing an identifier corresponding to the first bit block in a first layer identifier layer, placing a second bit block in a second bit layer in the arrangement sequence corresponding to each data to be stored, placing an identifier corresponding to the second bit block in a second layer identifier layer, and the like until all bit blocks and identifiers are placed, so as to obtain a binary code table.
Preferably, the merging the layers to be merged according to the merging necessity to obtain a preferred binary coding table, including:
and when the merging necessity is greater than or equal to a preset merging threshold, merging the bit block of the corresponding layer with the bit block of the upper layer to obtain a preferred binary coding table.
Preferably, the performing run-length coding compression on all layers according to the primitive size statistics is specifically:
for any layer, counting the number of continuous occurrence times of elements to obtain run length, and performing run coding compression on the layer by using the run length; splicing the compressed data of each layer according to a set sequence, adding a mark symbol at a splicing position to obtain spliced data, wherein the spliced data is obtained by performing run-length coding compression on all layers.
Preferably, the compressed storage module further comprises:
the data decompression unit is used for restoring the stored data into run-length encoded data of different layers when decompressing the stored data, and respectively decoding the run-length encoded data of different layers to obtain a preferred binary encoding table;
for any data to be decompressed, the position sequence number of the data to be decompressed is obtained and recorded as a target position sequence number, in the layer where the bit block of the first layer of the preferred binary coding table is located, the bit block corresponding to the target position sequence number is obtained, the identifier of the bit block corresponding to the target position sequence number is obtained, if the value of the identifier is a first numerical value, the bit block corresponding to the target position sequence number and the identifier corresponding to the bit block are obtained in the layer where the bit block of the second layer is located, and the like, until the value of the identifier corresponding to the bit block is a second numerical value, all the bit blocks are spliced to obtain binary codes corresponding to the data to be decompressed, and the binary codes are converted into decimal numbers to obtain decompressed data corresponding to the data to be decompressed.
The embodiment of the application has at least the following beneficial effects:
according to the application, each piece of data to be stored in the sewage treatment process is converted into the binary code, when the binary code data is used for data storage in the follow-up process, errors are not prone to occur in data transmission and processing, the binary code is divided to obtain bit blocks, identifiers are set according to the positions of the bit blocks, the data redundancy degree is low, after the data are split, each part is analyzed, and the identifiers are used for representing the placement condition of the positions of the bit blocks; the bit blocks and the identifiers are placed in a layered mode to obtain a binary code table, similarity among data types of each layer of bit blocks is analyzed to obtain merging necessity of each layer, layers to be merged are merged to obtain a preferable binary code table, the sizes of elements are determined according to each layer of bit blocks in the preferable binary code table, the sizes of elements continuously appearing in statistics in run-length coding are changed, the original continuously repeated elements are enabled to be fewer, the continuously appearing times are increased, and then the data compression rate of data corresponding to a run-length coding algorithm is improved; and finally, performing run-length coding compression on all layers according to the primitive size statistics, and storing a data sequence obtained by compression, so that the run-length coding has a good compression effect on fewer continuous repeated data, and further, the sewage treatment operation and data can be efficiently stored and managed.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system block diagram of a sewage treatment operation and maintenance data efficient management system based on a smart cloud.
Detailed Description
In order to further describe the technical means and effects adopted by the application to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the intelligent cloud-based efficient management system for sewage treatment operation and maintenance data according to the application, which is provided by the application, with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
The application provides a specific scheme of an intelligent cloud-based sewage treatment operation and maintenance data efficient management system, which is specifically described below with reference to the accompanying drawings.
Examples:
referring to fig. 1, a system block diagram of a system for efficient management of operation and maintenance data of sewage treatment based on smart cloud according to an embodiment of the present application is shown, where the system includes: the system comprises a data preprocessing module, a data analysis module and a compression storage module.
The data preprocessing module is used for binary converting each piece of data to be stored in the sewage treatment process to obtain binary codes of each piece of data to be stored, dividing the binary codes by using a set length to obtain at least two bit blocks, and setting identifiers corresponding to the bit blocks according to the positions of the bit blocks.
Firstly, operation data of corresponding equipment in the sewage treatment process, such as various data in the sewage index detection process, including PH value, chloride content, ammonia nitrogen content and the like, are collected. The collected operation data is used as data to be stored, most of the collected data is not positive integers, the collected data is usually floating point data, namely the collected data has decimal parts, and the computer system is usually based on binary numbers when the data are stored and the like, so that when the data to be stored are compressed, floating point data in the data to be stored are required to be converted into integer data, and binary conversion is carried out on the integer data, so that binary codes of each data to be stored are obtained. The conversion of floating point data into integer data is known in the art, and will not be described in detail herein.
It should be noted that, there is a certain difference between the data to be stored, that is, the redundancy degree of the data is low, and if the data is compressed by using run-length encoding, the data will expand. The analysis shows that the data to be stored have certain similarity although different. For example, for the data to be stored 364, 366 and 367, these three data to be stored cannot be compressed by run-length encoding, but after being converted into binary codes, namely 364 (101101100), 366 (101101110) and 367 (10101111), the first 7 bits of the binary codes of the data to be stored can be found to be the same, and if the same parts are put together, the compression rate of the data can be greatly increased. Based on this, the binary code of the data to be stored can be split and placed first.
In this embodiment, the operation data of the corresponding device during the operation of the collected sewage treatment process is time-series data, so the data to be stored is time-series data, the data to be stored forms a time-series data sequence, and the binary codes of the data to be stored form a binary code sequence. For example, the time series data sequence isThe corresponding binary coding sequence is +.>Time series data sequence->The medium element is the data to be stored, the binary coding sequence +.>The medium elements are binary encodings of the data to be stored.
Then, the binary code of the data to be stored is divided into code segments by using the set length, each code segment is marked as a bit block, wherein the value of the set length is 2 in the embodiment, and an implementer can set according to actual situations. For example, the binary code of the data 364 to be stored is 101101100, and the binary code is divided into code segments with length of 2 to obtain bit blocks, that is, two values are sequentially taken from the first value of the binary code to the rear until the splitting is completed, so that the bit blocks are respectively 10, 11, 01, 10 and 0.
Since the length of the binary code of the data to be stored 364 is 9, when the set length is used for dividing, the last bit block has only one number, so the length of the last bit block needs to be added with a symbol to be complemented to be the same as the length of other bit blocks, even if the length of the last bit block is 2. In this embodiment, a space is represented by x, and the length of a bit block is further complemented. The binary code of the final data to be stored 364 is 101101100, and the bit blocks are 10, 11, 01, 10 and 0, respectively.
And finally, dividing the binary codes of all the data to be stored by using the set length to obtain corresponding bit blocks, wherein the number of the bit blocks after division is more because of more data to be stored, and setting identifiers corresponding to the bit blocks according to the positions of the bit blocks when the bit blocks obtained after division are placed so as to accurately obtain the complete binary codes, wherein the identifiers can represent whether other bit blocks exist in the part of the bit blocks corresponding to the identifiers after the positions of the bit blocks in the binary codes so as to judge whether the binary codes are completely extracted.
Specifically, any bit block is marked as a target bit block, and in the binary code of the target bit block, if the bit block still exists behind the target bit block, the identifier of the target bit block is set as a first numerical value; if there is no bit block after the target bit block, the identifier of the target bit block is set to a second value. In this embodiment, the first value is 1, the second value is 0, and the practitioner can set the values according to the actual situation.
For example, for the binary code 101101100 of the data to be stored 364, the bit blocks are 10, 11, 01, 10 and 0, respectively. The bit block 10 is noted as a target bit block, and in binary encoding, the target bit block 10 is followed by the bit block 11, so the identifier corresponding to the target bit block 10 is set to 1. The bit block 0 is marked as a target bit block, and in binary encoding, no bit block exists after the target bit block 0, so that an identifier corresponding to the target bit block 0 is set to 0.
As shown in Table 1, time series data sequenceBinary codes of the data to be stored, bit blocks and identifiers corresponding to the bit blocks, wherein n represents the total number of the data to be stored in the time sequence data sequence.
TABLE 1
The data analysis module is used for placing bit blocks and identifiers corresponding to binary codes of data to be stored in different layers to construct a binary code table; obtaining the corresponding merging necessity of each layer according to the data type of each layer of bit block; and merging layers to be merged according to merging necessity to obtain a preferred binary coding table.
Firstly, in order to facilitate subsequent analysis, bit blocks and identifiers corresponding to binary codes of data to be stored are required to be placed in different layers, specifically, the bit blocks corresponding to the binary codes of the data to be stored are arranged according to a coding sequence, a first bit block in the arrangement sequence corresponding to each data to be stored is placed in a first layer bit layer, an identifier corresponding to the first bit block is placed in a first layer identifier layer, a second bit block in the arrangement sequence corresponding to each data to be stored is placed in a second bit layer, an identifier corresponding to the second bit block is placed in a second layer identifier layer, and the like until all the bit blocks and identifiers are placed, and a binary coding table is obtained.
For example, the result of arranging the bit blocks corresponding to the binary codes of the data 364 to be stored according to the coding sequence is 10, 11, 01, 10 and 0, the first bit block in the arrangement sequence is 10, the bit block 10 is placed in the first bit layer, and the identifier 1 corresponding to the first bit block 10 is placed in the first identifier layer. The second bit block in the arrangement sequence is 11, the bit block 11 is placed in the second bit layer, the identifier 1 corresponding to the second bit block 11 is placed in the second identifier layer, and so on until all bit blocks and identifiers are placed, and the obtained binary code table is shown in table 2.
TABLE 2
In table 2, A1 represents a first layer of bits, B1 represents a first layer of identifiers, A2 represents a second layer of bits, B2 represents a second layer of identifiers, A3 represents a third layer of bits, B3 represents a third layer of identifiers, A4 represents a fourth layer of bits, B4 represents a fourth layer of identifiers, A5 represents a fifth layer of bits, and B5 represents a fifth layer of identifiers.
Then, in the binary coding table, the data is split into bit blocks and identifiers corresponding to the bit blocks, so that the data volume during the compression of the data in the binary coding table is increased, and the bit blocks which can be combined by analyzing the relation between the split data, so that the layering effect is ensured, and the final compression rate is higher.
In the example of the embodiment of the application, the first 7 digits of the binary codes of the data to be stored are the same, if the first 7 digits are used as a bit block, the same binary code digits can be placed on the same layer, and the number of identifiers can be greatly reduced. For the data 364 to be stored, there are 5 bit blocks corresponding to the identifiers, and if the first 7 bits of the binary code of the data 364 to be stored are combined into one bit block, and the last two bits form one bit block, the combined bit blocks and identifiers have two layering effects, but the number of identifiers is reduced, and the corresponding data volume in final compression is reduced.
Based on this, in order to achieve a larger compression rate, it is necessary to increase the number of identifiers as little as possible, so the number of identifiers can be reduced by merging the initially split bit blocks. For any layer of bit blocks, the more the number of times of occurrence of the bit blocks of the same type is, the higher the similarity of the layer of bit blocks is, and the combination of the layer of bit blocks and other layers of bit blocks is beneficial to reducing the number of identifiers.
And obtaining the corresponding merging necessity of each layer according to the data type of each layer of bit block, specifically, counting the occurrence times of each type of bit block for any layer of bit block, marking the bit block corresponding to the type with the largest occurrence times as a selected bit block, calculating the average value of the occurrence times of all other types of bit blocks except the selected bit block, and calculating the difference value between the occurrence times of the selected bit block and the average value, wherein the ratio between the difference value and the occurrence times of the selected bit block is the merging necessity corresponding to the layer.
In this embodiment, the number of occurrences of all types of bit blocks is arranged in order from small to large, if the bit blocks share L types, the number of occurrences of the bit block of the L th type is the type with the largest number of occurrences, i.e., the bit block of the L th type is the selected bit block, and then the merging necessity is expressed as:
wherein, the liquid crystal display device comprises a liquid crystal display device,indicating the merging necessity corresponding to the layer u bit block,/->Representing the maximum number of occurrences of the bit block type, i.e. the number of occurrences of the selected bit block,/-, for example>Indicating the number of occurrences of the first type bit block and L indicating the total number of type categories of bit blocks.
The average value representing the number of occurrences of all types of bit blocks except the selected bit block reflects the equalization of the number of occurrences of all types of bit blocks except the most-occurring type of bit block.The larger the difference is, the larger the number of the types with the largest occurrence number is, and the higher the similarity among the bit blocks in the current layer is, the larger the corresponding merging necessity value is, and the larger the merging necessity degree of the bit blocks in the current layer and the bit blocks in the other layers is.
In the present embodiment, use is made ofAnd->Such that the range of values of the combining necessity lies in (0, 1)]When the larger the merging necessity is, the closer to 1, the greater the similarity between the bit blocks of the current layer is, and the greater the merging necessity degree between the bit blocks of the current layer and the bit blocks of other layers is. When the smaller the merging necessity is, the closer to 0, the smaller the similarity between the bit blocks of the current layer is, and the smaller the merging necessity degree between the bit blocks of the current layer and the bit blocks of other layers is.
Setting a merge threshold, in this embodiment, the value of the merge threshold is 0.85, when the merge necessity is greater than or equal to the merge threshold, which indicates that the greater the similarity between the bit blocks of the corresponding layer, the more the merging is needed to reduce the number of identifiers, so that the bit blocks of the corresponding layer and the bit blocks of the previous layer are merged to obtain the preferred binary coding table.
In the example of the embodiment of the present application, as shown in table 2, the bit blocks of the A2 layer are 11, the bit blocks of the A3 layer are 01, and at this time, the values of the merging necessity corresponding to the A2 layer and the A3 layer are 1, so that the A2 layer and the A3 layer are merged and then merged with the A1 layer, at this time, the original five-layer bit layer is changed into three-layer bit layer, and the corresponding identifier has three layers, as shown in table 3.
TABLE 3 Table 3
It should be noted that, in the above example, the second bits of the bit blocks of the A5 layer are spaces, and the first bit of each bit block of the A5 layer may be merged into the previous layer, and since the splitting of the bit blocks in this embodiment uses the length 2 as a parameter, the merging of the one-bit binary number of the A5 layer into the A4 layer needs to be performed, and the merging of the first bit into the previous layer of the A4 layer is performed, and the binary coding table after the merging is shown in table 4.
TABLE 4 Table 4
Table 4 is a preferred binary encoding table,representing the first bit layer of the binary coding table,/i>Representing the first identifier layer of the binary coding table,/i>Representing the second bit layer in the binary coding table,/i>Representing a second layer identifier layer in the binary encoding table.
And the compression storage module is used for determining the size of the primitive according to each layer of bit block in the optimized binary coding table, counting the run length according to the primitive size, performing run coding compression on all layers, and storing the coded data sequence obtained by compression.
Firstly, it should be noted that, in the conventional run-length encoding implementation, the current data element and the number of times that the element continuously appears are used to replace the continuously appearing data portion in the character string, and the longer character string can be represented by a count value added to the shorter character string by using a run-length algorithm, so that the compression of the original data is realized.
However, the run-length encoding has poor compression effect on less continuous repeated data, so that the embodiment changes the size of elements which appear continuously by the run-length encoding statistics, and when the run-length encoding is utilized to compress the data, the original continuous repeated less elements are enabled to appear continuously more times, and the data compression rate of the data corresponding to the run-length encoding algorithm is improved.
For example, for the binary code 101101100 of the data to be stored 364, the compression of the binary code using conventional run-length coding is less effective. The first 7 bits of binary codes of the data 364, 366, 367 and 364 to be stored are the same, that is, the first 7 bits have larger similarity in numerical values, when the binary codes of the data 364, 366, 367 and 364 to be stored are compressed by using run-length codes, the numerical values of the first 7 bits can be used as an element, the number of continuous occurrence times of the element is counted, so that the compression of a plurality of data can be realized, and meanwhile, the compression rate is increased.
Based on the above, determining the primitive size according to each layer of bit block in the preferred binary coding table, marking the layers after combination as combined layers, marking the layers not combined as independent layers, and marking the layer where the identifier is located as an identifier layer; for the merging layer, taking the coded data length of the bit block as the primitive size; for the independent layer and the identifier layer, a preset fixed length is taken as a primitive size.
The preferred binary coding table comprises a layer where the bit block is located and a layer where the identifier is located, and the effect of compressing the layer where the bit block is located is poor when each layer of data is compressed by using the traditional run-length coding. The layers of the bit block comprise a layer after data combination and a layer without data combination, the layer after combination is marked as a combination layer, and the layer without combination is marked as an independent layer.
The data of the bit blocks in the merging layer have larger similarity, the size of the primitive of the run code is determined according to the length of the bit blocks in the merging layer, and the run length is counted according to the primitive size, so that the compression rate of the data is reduced. For example, in Table 4The layers are combined layers, and are added with->The length of the bit block of the layer is 7, the primitive size of the run-length code is 7, i.e. one bit block is taken as one element, p ∈ ->The number of successive occurrences of each element of the layer was counted, in Table 4 +.>The data after layer compression is (1011011, m), m representing the number of consecutive occurrences of element 1011011.
Because the length of the bit block in the independent layer is shorter and the bit block data is irregular, the independent layer is compressed by adopting the traditional run-length coding. In Table 4, althoughThe layers are obtained by combining, but +.>The length of each bit block in the layer is the same as the initial set length and is shorter, so for +.>The layers are also compressed using conventional run-length coding. I.e. for the length of the bit block and the initial set lengthThe merging layers with the same degree are compressed by adopting the traditional run-length coding. Meanwhile, the identifier layer only contains one numerical value, so that the identifier layer is compressed by adopting the traditional run-length coding.
For any layer, counting the number of continuous occurrences of elements to obtain run length, and performing run code compression on the layer by using the run length to perform compression processing on all layers in a preferred binary code table.
Further, after compressing the layer where the bit block is located and the identifier layer by using the run-length encoding algorithm, each layer needs to be spliced according to a set sequence, and a mark symbol is added at a splicing position to obtain spliced data, wherein the spliced data is obtained by performing run-length encoding compression on all the layers.
The setting sequence is a first bit layer, a first identifier layer, a second bit layer, a second identifier layer, …, a kth bit layer and a kth identifier layer, k is the total number of bit layers, and the identifiers and the bit blocks are in one-to-one correspondence, so k also represents the total number of the identifiers. Therefore, the first bit layer and the first identifier layer are spliced, a mark symbol is added between the first bit layer and the first identifier layer, the mark symbol is "+" in the embodiment, and an implementer can set according to actual situations. And splicing the first bit layer with the first identifier layer, splicing with the second bit layer, and the like until all the layers are spliced to obtain spliced data, wherein the spliced data is obtained by performing run-length coding compression on all the layers. And further, the compressed data sequence is stored, so that efficient storage management of the operation and maintenance data of sewage treatment can be realized.
The data decompression unit is used for restoring the stored data into run-length encoded data of different layers when decompressing the stored data, and respectively decoding the run-length encoded data of different layers to obtain a preferred binary encoding table; for any data to be decompressed, the position sequence number of the data to be decompressed is obtained and recorded as a target position sequence number, in the layer where the bit block of the first layer of the preferred binary coding table is located, the bit block corresponding to the target position sequence number is obtained, the identifier of the bit block corresponding to the target position sequence number is obtained, if the value of the identifier is a first numerical value, the bit block corresponding to the target position sequence number and the identifier corresponding to the bit block are obtained in the layer where the bit block of the second layer is located, and the like, until the value of the identifier corresponding to the bit block is a second numerical value, all the bit blocks are spliced to obtain binary codes corresponding to the data to be decompressed, and the binary codes are converted into decimal numbers to obtain decompressed data corresponding to the data to be decompressed.
Specifically, when decompressing stored data, the stored data needs to be restored to a multi-level form, and then the data is decompressed. The data stored in the system are restored into the run-length coding data of different layers by using the mark symbols, the run-length coding data of different layers are respectively decoded to obtain a preferable binary coding table, and decompressed data can be obtained by using the preferable binary coding.
For example, decoding the third data to be decompressed, that is, the position number of the data to be decompressed is third, the third is marked as the target position number, the bit block corresponding to the third data to be decompressed is found in the first layer bit layer, that is, the third bit block in the first layer bit layer is 1011011, the identifier corresponding to the third data to be decompressed in the first layer identifier layer is 1, which indicates that the bit block still exists after the bit block, so that the bit block corresponding to the third data to be decompressed is found in the second layer bit layer, that is, the third bit block in the second layer bit layer is 11, the identifier corresponding to the third data in the second layer identifier layer is 0, which indicates that no bit block exists after the bit block 11, at this time, the binary encoding of the third data obtained by decoding is 101101111, which corresponds to the decimal number 367, and the decoding is successful.
At this time, the problems that the similar but different data compression rates of the traditional run-length coding are small and the data expansion exists are solved, and the compression rate of the data is greatly increased. Meanwhile, the decompression operation can be directly carried out from the data needing to be decompressed, so that the decompression efficiency of the data is greatly improved.
It should be noted that, in one example of the present embodiment, the lengths of the binary codes of the respective data to be stored in the time-series data sequence are equal, and as another example, the time-series data sequence isThe corresponding binary coding sequence isI.e. the binary coded lengths of the data to be stored are not identical.
The binary code of the data to be stored is divided into code segments with the length of 2 to obtain bit blocks, specifically, the binary code of the data to be stored 4 is 100, the bit blocks obtained by dividing the binary code into the code segments with the length of 2 are respectively 10 and 0, and the length of the last bit block is less than 2, so that symbols are added to fill the length of the bit block, namely, space is represented by using a space, and then the length of the bit block is filled. The binary code of the final data to be stored 4 is 100, and the bit blocks are 10 and 0 respectively.
As shown in Table 5Binary code of each data to be stored, bit block, and identifier corresponding to the bit block.
TABLE 5
The result of arranging the bit blocks corresponding to the binary codes of the data 4 to be stored according to the coding sequence is 10 and 0, the first bit block in the arrangement sequence is 10, the bit block 10 is placed in the first layer bit layer, and the identifier 1 corresponding to the first bit block 10 is placed in the first layer identifier layer. The second bit block in the arrangement sequence is 0, the bit block 0 is placed in the second layer bit layer, the identifier 0 corresponding to the second bit block 0 is placed in the second layer identifier layer, and the like until all the bit blocks and identifiers are placed, and the obtained binary coding table is shown in table 6.
TABLE 6
In table 6, A1 represents a first-layer bit layer, B1 represents a first-layer identifier layer, A2 represents a second-layer bit layer, B2 represents a second-layer identifier layer, A3 represents a third-layer bit layer, and B3 represents a third-layer identifier layer.
Further, at time of time sequence data sequenceThe method for decompressing the data to be stored after compressing and storing is that, for example, decoding the third data, the bit block corresponding to the third data is found to be 10 in the first layer bit layer, the identifier corresponding to the third data is found to be 1 in the second layer identifier layer, the bit block still exists after the bit block 10, in table 6, the identifiers corresponding to the two bit blocks exist in the first layer identifier layer, the bit block does not exist after the two bit blocks, so the number of the bit blocks of the second layer bit layer is two less than that of the first layer bit layer. Two identifiers are 1 in the identifiers of the first three bit blocks of the first identifier layer, so that the bit block corresponding to the third data in the second bit layer is the second bit block 10, the identifier corresponding to the bit block 10 is 0, and the bit block 10 is not present after the bit block 10, so that the binary code of the third data is 1010, the corresponding decimal number is 10, and the decoding is successful.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application and are intended to be included within the scope of the application.

Claims (7)

1. Sewage treatment operation and maintenance data high-efficiency management system based on wisdom cloud, characterized in that, this system includes:
the data preprocessing module is used for binary conversion of each piece of data to be stored in the sewage treatment process to obtain binary codes of each piece of data to be stored, dividing the binary codes by using a set length to obtain at least two bit blocks, and setting identifiers corresponding to the bit blocks according to the positions of the bit blocks;
the data analysis module is used for placing bit blocks and identifiers corresponding to binary codes of data to be stored in different layers to construct a binary code table; obtaining the corresponding merging necessity of each layer according to the data type of each layer of bit block; merging layers to be merged according to merging necessity to obtain a preferred binary coding table;
the compression storage module is used for determining the size of the primitive according to each layer of bit blocks in the optimized binary coding table, counting the run length according to the primitive size, performing run coding compression on all layers, and storing a data sequence obtained by compression;
the method for acquiring the merging necessity comprises the following steps:
counting the occurrence times of each type of bit block for any layer of bit blocks, recording the bit block corresponding to the type with the largest occurrence times as a selected bit block, calculating the average value of the occurrence times of all other types of bit blocks except the selected bit block, and calculating the difference value between the occurrence times of the selected bit block and the average value, wherein the ratio between the difference value and the occurrence times of the selected bit block is the merging necessity corresponding to the layer.
2. The efficient management system for sewage treatment operation and maintenance data based on intelligent cloud as claimed in claim 1, wherein the determining the primitive size according to each layer of bit block in the preferred binary encoding table is specifically as follows:
in the preferred binary coding table, the layers after merging are marked as merging layers, the layers which are not merged are marked as independent layers, and the layers where the identifiers are located are marked as identifier layers; for the merging layer, taking the coded data length of the bit block as the primitive size; for the independent layer and the identifier layer, a preset fixed length is taken as a primitive size.
3. The efficient management system for sewage treatment operation and maintenance data based on intelligent cloud as claimed in claim 1, wherein the identifier corresponding to the bit block is set according to the position of the bit block specifically comprises:
marking any bit block as a target bit block, and setting an identifier of the target bit block as a first numerical value if the bit block still exists behind the target bit block in binary coding of the target bit block; if there is no bit block after the target bit block, the identifier of the target bit block is set to a second value.
4. The efficient management system for sewage treatment operation and maintenance data based on intelligent cloud as claimed in claim 1, wherein the placing the bit blocks and identifiers corresponding to the binary codes of the data to be stored in different layers, and constructing the binary code table, comprises:
arranging bit blocks corresponding to binary codes of data to be stored according to a coding sequence, placing a first bit block in a first layer bit layer in the arrangement sequence corresponding to each data to be stored, placing an identifier corresponding to the first bit block in a first layer identifier layer, placing a second bit block in a second bit layer in the arrangement sequence corresponding to each data to be stored, placing an identifier corresponding to the second bit block in a second layer identifier layer, and the like until all bit blocks and identifiers are placed, so as to obtain a binary code table.
5. The efficient management system for sewage treatment operation and maintenance data based on intelligent cloud as claimed in claim 1, wherein the merging of the layers to be merged according to the merging necessity to obtain the preferred binary coding table comprises:
and when the merging necessity is greater than or equal to a preset merging threshold, merging the bit block of the corresponding layer with the bit block of the upper layer to obtain a preferred binary coding table.
6. The efficient management system for sewage treatment operation and maintenance data based on intelligent cloud as claimed in claim 1, wherein said performing run-length coding compression on all layers according to primitive size statistics is specifically as follows:
for any layer, counting the number of continuous occurrence times of elements to obtain run length, and performing run coding compression on the layer by using the run length; splicing the compressed data of each layer according to a set sequence, adding a mark symbol at a splicing position to obtain spliced data, wherein the spliced data is obtained by performing run-length coding compression on all layers.
7. The intelligent cloud-based sewage treatment operation and maintenance data efficient management system according to claim 3, wherein the compressed storage module further comprises:
the data decompression unit is used for restoring the stored data into run-length encoded data of different layers when decompressing the stored data, and respectively decoding the run-length encoded data of different layers to obtain a preferred binary encoding table;
for any data to be decompressed, the position sequence number of the data to be decompressed is obtained and recorded as a target position sequence number, in the layer where the bit block of the first layer of the preferred binary coding table is located, the bit block corresponding to the target position sequence number is obtained, the identifier of the bit block corresponding to the target position sequence number is obtained, if the value of the identifier is a first numerical value, the bit block corresponding to the target position sequence number and the identifier corresponding to the bit block are obtained in the layer where the bit block of the second layer is located, and the like, until the value of the identifier corresponding to the bit block is a second numerical value, all the bit blocks are spliced to obtain binary codes corresponding to the data to be decompressed, and the binary codes are converted into decimal numbers to obtain decompressed data corresponding to the data to be decompressed.
CN202310026043.6A 2023-01-09 2023-01-09 Sewage treatment operation and maintenance data efficient management system based on intelligent cloud Active CN116016606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310026043.6A CN116016606B (en) 2023-01-09 2023-01-09 Sewage treatment operation and maintenance data efficient management system based on intelligent cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310026043.6A CN116016606B (en) 2023-01-09 2023-01-09 Sewage treatment operation and maintenance data efficient management system based on intelligent cloud

Publications (2)

Publication Number Publication Date
CN116016606A CN116016606A (en) 2023-04-25
CN116016606B true CN116016606B (en) 2023-08-18

Family

ID=86026621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310026043.6A Active CN116016606B (en) 2023-01-09 2023-01-09 Sewage treatment operation and maintenance data efficient management system based on intelligent cloud

Country Status (1)

Country Link
CN (1) CN116016606B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303374B (en) * 2023-05-22 2023-08-29 深圳市维度数据科技股份有限公司 Multi-dimensional report data optimization compression method based on SQL database
CN117040542B (en) * 2023-10-08 2024-01-12 广东佰林电气设备厂有限公司 Intelligent comprehensive distribution box energy consumption data processing method
CN117097906B (en) * 2023-10-20 2023-12-26 河北天英软件科技有限公司 Method and system for efficiently utilizing regional medical resources

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123777A (en) * 2016-11-30 2018-06-05 华为技术有限公司 A kind of coding mode determines method and device
CN110198171A (en) * 2018-03-15 2019-09-03 腾讯科技(深圳)有限公司 Data compression method, device, computer-readable medium and electronic equipment
WO2021060758A1 (en) * 2019-09-24 2021-04-01 심인보 Lossless data compression device and method therefor
CN115150201A (en) * 2022-09-02 2022-10-04 南通市艺龙科技有限公司 Remote encryption transmission method for cloud computing data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019865B (en) * 2017-09-08 2021-01-26 北京京东尚科信息技术有限公司 Mass image processing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123777A (en) * 2016-11-30 2018-06-05 华为技术有限公司 A kind of coding mode determines method and device
CN110198171A (en) * 2018-03-15 2019-09-03 腾讯科技(深圳)有限公司 Data compression method, device, computer-readable medium and electronic equipment
WO2021060758A1 (en) * 2019-09-24 2021-04-01 심인보 Lossless data compression device and method therefor
CN115150201A (en) * 2022-09-02 2022-10-04 南通市艺龙科技有限公司 Remote encryption transmission method for cloud computing data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
J. Senecal ; M. Duchaineau ; K.I. Joy.Length-limited variable-to-variable length codes for high-performance entropy coding.IEEE.2004,全文. *

Also Published As

Publication number Publication date
CN116016606A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN116016606B (en) Sewage treatment operation and maintenance data efficient management system based on intelligent cloud
CN100517979C (en) Data compression and decompression method
CN103067022B (en) A kind of integer data lossless compression method, decompression method and device
CN112953550B (en) Data compression method, electronic device and storage medium
CN116303374B (en) Multi-dimensional report data optimization compression method based on SQL database
CN108768403A (en) Lossless data compression, decompressing method based on LZW and LZW encoders, decoder
CN109871362A (en) A kind of data compression method towards streaming time series data
WO2019080670A1 (en) Gene sequencing data compression method and decompression method, system, and computer readable medium
CN113868206A (en) Data compression method, decompression method, device and storage medium
CN110518917A (en) LZW data compression method and system based on Huffman coding
CN115955513B (en) Data optimization transmission method for Internet of things
CN104125475B (en) Multi-dimensional quantum data compressing and uncompressing method and apparatus
CN101751897A (en) Lookup table compression and decompression method and relevant device thereof
US6748520B1 (en) System and method for compressing and decompressing a binary code image
CN117177100B (en) Intelligent AR polarized data transmission method
CN116805537B (en) Data processing method for heart-lung rehabilitation management system
CN113612483A (en) Industrial real-time data lossless coding compression method
KR101023536B1 (en) Lossless data compression method
CN109698703B (en) Gene sequencing data decompression method, system and computer readable medium
CN103746704A (en) Chip testing data transmission method based on dual-run-length alternative coding
CN115913248A (en) Live broadcast software development data intelligent management system
CN109660809A (en) Based on the decoded colmv data lossless compression method of inter and system
CN115567058A (en) Time sequence data lossy compression method combining prediction and coding
US10931303B1 (en) Data processing system
CN117155408B (en) Efficient transmission method for production data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230731

Address after: Floor 102, 401 and 6, Building 3, Hefei Innovation Center, No. 168 Jiulong Road, Economic and Technological Development Zone, Hefei City, Anhui Province, 230000

Applicant after: Anhui focus analysis and Test Technology Co.,Ltd.

Address before: 230000 building 3, Hefei innovation center, No. 168, Jiulong Road, Hefei Economic and Technological Development Zone, Anhui Province

Applicant before: ANHUI WANXIN ENVIRONMENTAL TECHNOLOGY CO.,LTD.

GR01 Patent grant
GR01 Patent grant