CN111368023A - A Safe Representation Method for Matrix Text Data Storage - Google Patents
A Safe Representation Method for Matrix Text Data Storage Download PDFInfo
- Publication number
- CN111368023A CN111368023A CN202010233470.8A CN202010233470A CN111368023A CN 111368023 A CN111368023 A CN 111368023A CN 202010233470 A CN202010233470 A CN 202010233470A CN 111368023 A CN111368023 A CN 111368023A
- Authority
- CN
- China
- Prior art keywords
- matrix
- data
- channel
- binary
- binary byte
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 66
- 238000000034 method Methods 0.000 title claims description 24
- 238000013500 data storage Methods 0.000 title description 2
- 230000010365 information processing Effects 0.000 claims abstract description 4
- 238000003672 processing method Methods 0.000 claims abstract description 3
- 238000012800 visualization Methods 0.000 claims description 4
- 230000009191 jumping Effects 0.000 claims 1
- 230000000007 visual effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000007794 visualization technique Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/31—Indexing; Data structures therefor; Storage structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明是一种使用多通道矩阵存储和表达文本数据的信息处理方法,生成一个[X,Y]大小的、N个通道的矩阵,其中X是行数,Y是列数,N是通道数,该矩阵形状是{X,Y,N},二进制字节数据容量是X*Y*N,其中X*Y*N≥原数据二进制字节序列长度,将原数据二进制字节序列按照特定规则存储到特定位置、特定通道上,存储规则可以灵活设置,具有安全、便捷的特点。The present invention is an information processing method for storing and expressing text data by using a multi-channel matrix, generating a matrix of [X, Y] size with N channels, where X is the number of rows, Y is the number of columns, and N is the number of channels , the matrix shape is {X,Y,N}, the binary byte data capacity is X*Y*N, where X*Y*N ≥ the length of the original data binary byte sequence, the original data binary byte sequence according to specific rules It is stored in a specific location and on a specific channel, and the storage rules can be flexibly set, which is safe and convenient.
Description
技术领域technical field
本发明是一种安全的、使用多通道矩阵存储和表达文本数据的信息处理方法,属于计算机信息处理领域。The invention is a safe information processing method for storing and expressing text data by using a multi-channel matrix, and belongs to the field of computer information processing.
背景技术Background technique
目前现有的计算机文本数据的存储和表达方法,是使用特定字符集,编码成一定的二进制字节序列,然后存储到计算机文本文件中,本发明与当前现有技术文本数据存储和表达方法不同,是首先生成一个{X,Y}大小的、N个通道的矩阵,其中X是行数,Y是列数,N是通道数,该矩阵形状是{X,Y,N},二进制字节数据容量是X*Y*N,在矩阵的每个(x,y)位置上,都可以存储N个字节,其中0≤x<X且0≤y <Y,将二进制字节数据按照特定算法存储到该矩阵中,这样的存储是安全的,方便互联网传递的,而且,当N为3时,还可以把文本数据表达为RGB图像,这样的存储和表达方法,与现有技术显著不同。The current method for storing and expressing computer text data is to use a specific character set, encode it into a certain binary byte sequence, and then store it in a computer text file. The present invention is different from the current prior art text data storage and expression method. , is to first generate a matrix of {X,Y} size with N channels, where X is the number of rows, Y is the number of columns, N is the number of channels, the matrix shape is {X,Y,N}, binary bytes The data capacity is X*Y*N. At each (x,y) position of the matrix, N bytes can be stored, where 0≤x<X and 0≤y<Y, the binary byte data is specified according to the specific The algorithm is stored in the matrix, which is safe and convenient for Internet transmission. Moreover, when N is 3, the text data can also be expressed as RGB images. Such a storage and expression method is significantly different from the existing technology. .
发明内容SUMMARY OF THE INVENTION
按照如下步骤,将文本数据表达为矩阵并存储成文件,S1:将文本数据使用特定字符集编码成二进制字节序列,并计算该二进制字节序列的长度为L;S2:生成一个{X,Y}大小的、N个通道的矩阵,该矩阵要求X*Y*N≥L;S3:设置数据存储到矩阵特定位置的规则,也就是二进制字节序列位置p对应到矩阵特定位置(x,y)的规则;S4:设置数据存储到矩阵中特定位置的特定通道的规则,也就是二进制序列位置p对应到矩阵特定位置(x,y)的某个通道内规则,因为该矩阵有N个通道,所以每个(x,y)位置上能存储N个二进制字节数据,所以在这N个通道上能设置不同的规则;S5:按照S3、S4的规则,把二进制字节序列存储到矩阵内;S6:设置矩阵数据存储为磁盘文件的规则,该规则要能清晰表达矩阵行数、列数、通道数量以及矩阵和磁盘文件二级制序列之间的对应关系;S7:按照S6的规则将数据存储到磁盘文件。According to the following steps, express the text data as a matrix and store it as a file, S1: encode the text data into a binary byte sequence using a specific character set, and calculate the length of the binary byte sequence as L; S2: generate a {X, Y}-sized, N-channel matrix, the matrix requires X*Y*N≥L; S3: Set the rules for storing data to a specific position of the matrix, that is, the position p of the binary byte sequence corresponds to a specific position of the matrix (x, y); S4: Set the rules for storing data to a specific channel in a specific position in the matrix, that is, the binary sequence position p corresponds to a certain channel rule in a specific position (x, y) of the matrix, because the matrix has N channel, so each (x, y) position can store N binary byte data, so different rules can be set on these N channels; S5: According to the rules of S3 and S4, store the binary byte sequence to Inside the matrix; S6: Set the rules for storing matrix data as disk files, which must be able to clearly express the number of rows, columns, channels, and the correspondence between the matrix and the secondary sequence of disk files; S7: According to S6 Rules store data to disk files.
作为【0003】的改进,【0003】的S2可以生成为一个生成一个{X,Y}大小的、N个通道的矩阵,该矩阵要求X*Y*N≥(L+3),其中L为原始数据二进制字节序列的长度,矩阵中多出的这3个位置,期中2个用于存储原始数据编码时所用的字符集类型,另1个用于标记该字符集是否存储在了矩阵中;作为进一步扩展改进,【0003】的S2可以生成一个 {X,Y}大小的、N个通道的矩阵,该矩阵要求X*Y*N≥(L+z) ,其中L为原始数据二进制字节序列的长度,矩阵中多出z个位置,用以做各种标记。As an improvement of [0003], S2 of [0003] can be generated as a matrix of N channels of size {X,Y}, which requires X*Y*N≥(L+3), where L is The length of the binary byte sequence of the original data, these three extra positions in the matrix, two of them are used to store the character set type used in the encoding of the original data, and the other one is used to mark whether the character set is stored in the matrix. ; As a further extension and improvement, S2 of [0003] can generate a matrix of {X,Y} size and N channels, which requires X*Y*N≥(L+z), where L is the original data binary word The length of the section sequence, there are z positions in the matrix for various markings.
按照如下步骤,将【0003】矩阵文件数据进行还原,S1:读取【0003】S7所存储的文件为二进制字节序列;S2:按照【0003】S6的文件存储规则,反向还原为{X,Y}大小的、N个通道的矩阵;S3:按照【0003】S4、S3的规则,从矩阵内读出二进制字节数据并还原为原始的二进制字节序列;S4:按照【0004】规则读取出已存储的字符集类型和其他标记,如果未存储字符集或其他标记标记,则在下一步S5中用默认值进行处理;S5:如果S4读取出字符集类型,则将S3的二进制序列按照该字符集解码为文本数据,如果S4未读取出字符集类型,则按照默认字符集将S3的二进制序列解码为文本数据,如果S4中还读取出了其他标记,则按照标记的规则进行处理。According to the following steps, restore the [0003] matrix file data, S1: read the file stored in [0003] S7 as a binary byte sequence; S2: According to the file storage rules of [0003] S6, reverse restore to {X , Y}-sized matrix with N channels; S3: According to the rules of [0003] S4 and S3, read binary byte data from the matrix and restore it to the original binary byte sequence; S4: According to the rules of [0004] Read the stored character set type and other marks. If the character set or other marks are not stored, use the default value to process in the next step S5; S5: If the character set type is read out by S4, the binary value of S3 The sequence is decoded into text data according to the character set. If S4 does not read the character set type, the binary sequence of S3 is decoded into text data according to the default character set. If other marks are also read in S4, according to the mark. rules are processed.
可以通过以下方式之一或多种对数据进行加密,以下步骤没有严格顺序,S1:【0003】的S3规则不同,则存储的结果不同,可以设置一定算法跳跃式存储到矩阵特定位置,不了解该规则时,数据就无法还原;S2:【0003】的S4规则不同,则存储的结果不同,可以设置一定算法跳跃式存储到矩阵特定通道上,不按照索引号顺序存储,这样不了解该规则时,数据就无法还原;S3:【0003】的S6的规则不同,则存储的结果不同,可以设置特定规则存储成公众不了解的文件格式,这里的文件格式是指文件内容格式,不仅仅指文件扩展名,不了解该规则时,数据就无法还原。The data can be encrypted by one or more of the following methods. The following steps are not in strict order. If the S3 rules of S1:[0003] are different, the results of the storage will be different. When this rule is used, the data cannot be restored; if the S4 rule of S2: [0003] is different, the stored result will be different. You can set a certain algorithm to jump and store it on a specific channel of the matrix, and not store it in the order of the index number, so you don’t understand the rule. If the rules of S6 are different in S3: [0003], the results of storage will be different. You can set specific rules and store them in a file format that the public does not understand. The file format here refers to the file content format, not only refers to file extension, data cannot be restored without knowing this rule.
特别介绍一种3通道文本数据彩色可视化存储方法:将【0003】的S2的通道N设置为3;将【0003】的S6的规则设置为图像格式,其他参照【0003】、【0004】、【0005】、【0006】对数据进行存储和读取,这样就能将文本数据表达为一种安全的彩色图像格式。In particular, a 3-channel text data color visualization storage method is introduced: set the channel N of S2 of [0003] to 3; set the rule of S6 of [0003] to the image format, other refer to [0003], [0004], [ 0005], [0006] store and read the data, so that the text data can be expressed in a safe color image format.
特别介绍一种1通道文本数据灰度可视化存储方法:将【0003】的S2的通道N设置为1;将【0003】的S6的规则设置为图像格式,其他参照【0003】、【0004】、【0005】、【0006】对数据进行存储和读取,这样就能将文本数据表达为一种安全的灰度图像格式。In particular, a grayscale visual storage method of 1-channel text data is introduced: set the channel N of S2 of [0003] to 1; set the rule of S6 of [0003] to the image format, other refer to [0003], [0004], [0005], [0006] Data are stored and read so that textual data can be expressed in a secure grayscale image format.
非文本数据,也可以按照本发明规则存储和还原,存储时在【0003】S1中把原始非文本源数据转成二进制序列即可,其他步骤不变;还原时在【0005】的S5步骤中不是把二进制数据还原成文本数据,而是还原成原始的非文本数据即可。Non-text data can also be stored and restored according to the rules of the present invention. When storing, the original non-text source data can be converted into a binary sequence in [0003] S1, and other steps remain unchanged; when restoring, in [0005] Step S5 Instead of restoring binary data to text data, restore it to original non-text data.
附图说明Description of drawings
为便于理解,本发明附属了以下附图,附图说明如下:图1是文本数据3通道不同规则可视化表达的示例图。For ease of understanding, the present invention is attached with the following drawings, and the descriptions of the drawings are as follows: FIG. 1 is an example diagram of the visual expression of different rules of three channels of text data.
具体实施方式Detailed ways
在本实施例中,以3通道可视化方式为示例说明本发明的具体实施方法之一。In this embodiment, a 3-channel visualization method is used as an example to illustrate one of the specific implementation methods of the present invention.
开发框架使用OpenCV,开发语言使用C++。The development framework uses OpenCV, and the development language uses C++.
准备一段文本数据,在本实施例中,文本数据为"Hello China.You'll be bettertomorrow! You will become stronger!Let us go!",该字符串长度为75,将该字符串重复连接100次,长度变成7500。Prepare a piece of text data, in this embodiment, the text data is "Hello China. You'll be bettertomorrow! You will become stronger! Let us go!", the length of the string is 75, and the string is repeated 100 times , the length becomes 7500.
按照如下步骤,将文本数据表达为3通道矩阵,S1:将【0013】文本数据使用ASCII字符集编码成二进制字节序列,并计算该二进制字节序列的长度为7500;S2:生成一个[50,50]大小的、3个通道的矩阵;S3:设置数据存储到矩阵特定位置的规则,此处规则是按行、列索引号自然顺序存储;S4:设置数据存储到矩阵特定位置的各通道的规则,此处是按照通道号0、1、2自然顺序存储;S5:按照S3、S4的规则,把二进制字节序列存储到矩阵内;S6:设置矩阵数据存储为磁盘文件的规则,此处规则为JPEG图像格式;S7:按照S6的规则将数据存储到磁盘文件,此时【0013】中的文本数据表达为附图1的图像(1)。According to the following steps, express the text data as a 3-channel matrix, S1: encode the [0013] text data into a binary byte sequence using the ASCII character set, and calculate the length of the binary byte sequence as 7500; S2: generate a [50 ,50] size, 3-channel matrix; S3: Set the rules for storing data to a specific position of the matrix, where the rules are stored in the natural order of row and column index numbers; S4: Set the data to be stored in each channel of the specific position of the matrix The rules of , here are stored in the natural order of
改变【0014】S4的通道规则,此处是按照通道号0、2、1顺序存储,其他不变,此时【0013】中的文本数据表达为附图1的图像(2);改变【0014】S4的通道规则,此处是按照通道号1、0、2顺序存储,其他不变,此时【0013】中的文本数据表达为附图1的图像(3);改变【0014】S4的通道规则,此处是按照通道号1、2、0顺序存储,其他不变,此时【0013】中的文本数据表达为附图1的图像(4);改变【0014】S4的通道规则,此处是按照通道号2、0、1顺序存储,其他不变,此时【0013】中的文本数据表达为附图1的图像(5);改变【0014】S4的通道规则,此处是按照通道号2、1、0顺序存储,其他不变,此时【0013】中的文本数据表达为附图1的图像(6);以上图像(1)-(6)均为3通道彩色图像,各不相同,这样就将文本数据表达为安全的多通道可视化矩阵数据,并且很安全,不知道规则无法还原成原始数据。Change the channel rules of [0014] S4, here are stored in the order of
按照如下步骤,将【0014】矩阵文件数据进行还原,S1:读取【0014】S7所存储的文件为二进制字节序列;S2:按照【0014】S6的文件存储规则,反向还原为{50,50}大小的、3个通道的矩阵;S3:按照【0014】S4、S3的规则,从矩阵内读出二进制字节数据并还原为原始的二进制字节序列;S4:因【0014】中未存储特定字符集格式,使用默认格式ASCII字符集将二进制数据欢迎为原始文本数据。According to the following steps, restore the [0014] matrix file data, S1: read the file stored in [0014] S7 as a binary byte sequence; S2: According to the file storage rules of [0014] S6, reverse restore to {50 ,50}-sized, 3-channel matrix; S3: According to the rules of [0014] S4, S3, read binary byte data from the matrix and restore it to the original binary byte sequence; S4: Because of [0014] No specific character set format is stored, binary data is welcomed as raw text data using the default format ASCII character set.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010233470.8A CN111368023A (en) | 2020-03-29 | 2020-03-29 | A Safe Representation Method for Matrix Text Data Storage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010233470.8A CN111368023A (en) | 2020-03-29 | 2020-03-29 | A Safe Representation Method for Matrix Text Data Storage |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111368023A true CN111368023A (en) | 2020-07-03 |
Family
ID=71209248
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010233470.8A Pending CN111368023A (en) | 2020-03-29 | 2020-03-29 | A Safe Representation Method for Matrix Text Data Storage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111368023A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1971537A (en) * | 2005-11-25 | 2007-05-30 | 杭州中天微系统有限公司 | Access method of matrix data and storage device of the matrix data |
US20170147674A1 (en) * | 2015-11-23 | 2017-05-25 | Ab Initio Technology Llc | Storing and retrieving data of a data cube |
CN108710702A (en) * | 2018-05-25 | 2018-10-26 | 吴卓航 | A method of data safety storage is realized based on frament reassembling technology |
CN109885572A (en) * | 2019-02-20 | 2019-06-14 | 哈尔滨工程大学 | A three-dimensional data encoding and storage method for massive marine environmental data management |
CN110019865A (en) * | 2017-09-08 | 2019-07-16 | 北京京东尚科信息技术有限公司 | Mass picture processing method, device, electronic equipment and storage medium |
CN110377561A (en) * | 2019-07-19 | 2019-10-25 | 深圳前海微众银行股份有限公司 | A kind of file management method and device |
CN110674324A (en) * | 2019-09-25 | 2020-01-10 | 上海眼控科技股份有限公司 | Radar data storage method and device, computer equipment and storage medium |
-
2020
- 2020-03-29 CN CN202010233470.8A patent/CN111368023A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1971537A (en) * | 2005-11-25 | 2007-05-30 | 杭州中天微系统有限公司 | Access method of matrix data and storage device of the matrix data |
US20170147674A1 (en) * | 2015-11-23 | 2017-05-25 | Ab Initio Technology Llc | Storing and retrieving data of a data cube |
CN110019865A (en) * | 2017-09-08 | 2019-07-16 | 北京京东尚科信息技术有限公司 | Mass picture processing method, device, electronic equipment and storage medium |
CN108710702A (en) * | 2018-05-25 | 2018-10-26 | 吴卓航 | A method of data safety storage is realized based on frament reassembling technology |
CN109885572A (en) * | 2019-02-20 | 2019-06-14 | 哈尔滨工程大学 | A three-dimensional data encoding and storage method for massive marine environmental data management |
CN110377561A (en) * | 2019-07-19 | 2019-10-25 | 深圳前海微众银行股份有限公司 | A kind of file management method and device |
CN110674324A (en) * | 2019-09-25 | 2020-01-10 | 上海眼控科技股份有限公司 | Radar data storage method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107301244B (en) | Method, apparatus, system and the trade mark memory of a kind of trade mark point card processing | |
JP4608221B2 (en) | DNA sequence encoding apparatus and method | |
CN107578452B (en) | JPEG image encryption method with compatible format and invariable size | |
CN102194081B (en) | Method for hiding natural language information | |
CN103543980B (en) | Method and device for processing digital data | |
CN112088378A (en) | Image hidden information detector | |
CN112948776A (en) | Digital watermark adding method and device, electronic equipment and storage medium | |
CN110704813A (en) | Character anti-piracy system based on character recoding | |
CN106651972B (en) | Binary image coding and decoding methods and devices | |
CN113222159B (en) | Quantum state determination method and device | |
CN104573781B (en) | A kind of Quick Response Code encoding and decoding method | |
CN111368023A (en) | A Safe Representation Method for Matrix Text Data Storage | |
CN114741712A (en) | Chinese character encryption method based on hierarchical scrambling | |
Lee | Reversible data hiding for DNA sequence using multilevel histogram shifting | |
RU2346332C2 (en) | Method and format of record for image compression | |
TW479219B (en) | Decoding keys, substitution data patterns, substitution flags or any other information needed to recover the original information is assembled with the modified information in a form that does not equal the forbidden data pattern | |
JP4124366B2 (en) | Method for embedding and extracting digital watermark | |
CN110111852A (en) | A kind of magnanimity DNA sequencing data lossless Fast Compression platform | |
JP4953145B2 (en) | Character string data compression apparatus and method, and character string data restoration apparatus and method | |
CN111966973A (en) | Copyright protection method and system based on picture pixel value steganography | |
KR102739945B1 (en) | A method and device for generating a pileup file from compressed domain genomic data | |
JP6511752B2 (en) | Encoding apparatus, encoding method, decoding apparatus, decoding method, and program | |
US12073172B2 (en) | Encoded string processing | |
CN110110540A (en) | A kind of information steganography method and device based on excel file | |
CN112887504B (en) | Information hiding method and extracting method based on overlapped Hamming codes |
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 |