CN111490984B - Network data coding and encryption algorithm thereof - Google Patents

Network data coding and encryption algorithm thereof Download PDF

Info

Publication number
CN111490984B
CN111490984B CN202010258815.5A CN202010258815A CN111490984B CN 111490984 B CN111490984 B CN 111490984B CN 202010258815 A CN202010258815 A CN 202010258815A CN 111490984 B CN111490984 B CN 111490984B
Authority
CN
China
Prior art keywords
data
private
coding table
bits
ascll
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
CN202010258815.5A
Other languages
Chinese (zh)
Other versions
CN111490984A (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.)
Shanghai Kuanchuang International Culture Technology Co ltd
Original Assignee
Shanghai Kuanchuang International Culture 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 Shanghai Kuanchuang International Culture Technology Co ltd filed Critical Shanghai Kuanchuang International Culture Technology Co ltd
Priority to CN202010258815.5A priority Critical patent/CN111490984B/en
Publication of CN111490984A publication Critical patent/CN111490984A/en
Application granted granted Critical
Publication of CN111490984B publication Critical patent/CN111490984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Abstract

The invention discloses a network data coding and encrypting method, which at least comprises the following steps: a data sending end creates a private coding table and determines data bits and segmentation codes of the coding table; during transmission, compressing original data to be transmitted, and reserving effective data in the transmitted data; mapping the effective data to a private coding table, and segmenting the effective data through segmentation codes of the private coding table; and the data receiving end decodes the recoded data after receiving the recoded data and remaps the recoded data into original data. The beneficial effects are as follows: the private code table can be compatible with ASCLL codes to ensure the universality of the technical scheme of the invention and can be compatible with the current common data communication protocol mode; optimizing protocol data coding, compressing data, reducing data transmission quantity and reducing transmission pressure of a processor; encrypting the data while compressing the data; the principle is simple and reliable, can be realized in multiple languages, and can be simultaneously applied to high-end processor equipment and low-end processor equipment.

Description

Network data coding and encryption algorithm thereof
Technical Field
The invention discloses a computer data compression and encryption technology, and particularly relates to a network data coding and encryption algorithm thereof.
Background
Data compression technology, that is, technology for representing signals by using minimum numbers; the basic process of the encryption algorithm is to process the original plaintext file or data according to a certain algorithm to make the original plaintext file or data become an unreadable segment of code, which is generally called as "ciphertext", so that the original content can be displayed only after a corresponding key is input, and the purpose of protecting the data from being stolen and read by an illegal person is achieved through the way. Current data compression and encryption algorithms are well-established, but have a number of problems, such as: most of the current algorithms are complex in calculation and have high requirements on the performance of hardware; the data volume increases after encryption; currently, the compression algorithm and the encryption algorithm are independent, so that the operation cost is increased, and based on the problems, the existing compression and encryption algorithms are difficult to operate on a low-end processor or operate at high efficiency, so that the response capability of the embedded component is greatly influenced.
In addition, the technical scheme in the current market pursues multiple application scenarios and multi-language access, so that the corresponding algorithm is increasingly bloated in size and increasingly complex in calculation, the current data format is mostly sent in protocols such as JSON and XML, the content is sent in a Key-Value form, readability is enhanced, but the data size and the complexity of a processing program are greatly increased. These increasingly complex algorithms can only be applied to high-end processors, and low-end single-chip chips are difficult to use. And the compression and encryption of the current algorithm are separated, the program needs to be processed twice, and the compression and encryption are performed once, so that the processing time and the calculation complexity are greatly increased.
Therefore, in view of the defects of the prior art, those skilled in the art are devoted to developing a network data encoding and its encryption algorithm to achieve simultaneous data compression and encryption, and reduce the amount of transmitted data, so that the network data encoding and its encryption algorithm can be applied to high-end processor devices and low-end processor devices.
Disclosure of Invention
The present invention aims to provide a network data encoding and its encryption algorithm, based on the network data encoding and its encryption method, the present invention aims to implement simultaneous data compression and encryption, reduce the amount of data to be transmitted, and can be implemented in multiple languages, and simultaneously applied to high-end processor devices and low-end processor devices, so as to solve the above problems in the prior art.
The purpose of the invention is realized by the following technical scheme:
a network data coding and encrypting method at least comprises the following steps:
step 1: a data sending end creates a private coding table and determines data bits and segmentation codes of the coding table;
step 2: during transmission, compressing original data to be transmitted, and reserving effective data in the transmitted data;
step 3: mapping the effective data in Step2 to the private coding table created in Step1, and partitioning the effective data through the partition codes of the private coding table;
step 4: the data receiving end receives the data re-encoded in Step3, decodes the data, and re-maps the data to the original data.
Further, in Step1, the private code sheet is created by using the same eight bits to express 128 characters with reference to the standard ASCLL (American Standard code for information exchange, Latin letter-based set of computer code systems, mainly used for displaying modern English and other Western European languages, being the most common standard for information exchange, and being equivalent to the international standard ISO/IEC 646).
Further, in the private coding table, the last seven bits (bit 1-7 bits) of the eight bits represent data characters, and the first bit (bit0 bit) divides the code to express the continuity of the data.
Furthermore, the number and the types of the characters of the private coding table are the same as those of the ASCLL table of the original data referred by the private coding table, and in order to increase the difficulty of data cracking, the same set of corresponding tables of the scrambled characters and the indexes are used for encrypting the communication data at the data sending end and the data receiving end of program communication.
Furthermore, each data communication transmission is a different private code table.
Furthermore, the Byte (Byte, a measurement unit used in computer information technology to measure storage capacity, 1Byte ═ 8bit) split codes of the same data are represented by the same data, and the split code of the Byte of the next data is the inverse value of the split code of the previous data.
Further, when Step2 compresses data, since both the data sending end and the data receiving end of the program communication are defined, there is data known in both the programs of the data sending end and the data receiving end, the data known by both the ends of the program communication do not need to be transmitted repeatedly, and the data unknown by both the ends of the program communication are transmitted as effective data for transmission.
Further, the private code sheet may be compatible with the ASCLL code sheet.
Based on the above network data encoding and encrypting method, the present invention also provides a computer readable storage medium in which a program is stored, which when executed can perform the above network data encoding and encrypting method.
By implementing the network data coding and the encryption method thereof, the following beneficial effects are achieved:
1. the private coding table created by the technical scheme can be compatible with ASCLL coding, so that the universality of the technical scheme can be ensured, and the current common data communication protocol mode can be compatible;
2. the technical scheme of the invention optimizes protocol data coding, compresses data, adopts a data compression mode for removing known data at two ends of program communication and reserving other data during transmission, reduces data transmission quantity and reduces the transmission pressure of a processor;
3. the technical scheme of the invention encrypts data while compressing the data, and realizes the data compression and encryption functions by one-time calculation;
4. the technical scheme of the invention has simple and reliable principle, can be realized in multiple languages, and can be simultaneously applied to high-end processor equipment and low-end processor equipment.
Drawings
FIG. 1 is a standard ASCLL table in an embodiment of the present invention;
FIG. 2 is a private code sheet created by an embodiment of the present invention;
FIG. 3 is a table of data compression and encryption comparisons according to an embodiment of the present invention;
FIG. 4 is a table of valid data and segmented codes according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A network data coding and encrypting method at least comprises the following steps:
step 1: a data sending end creates a private coding table and determines data bits and segmentation codes of the coding table;
step 2: during transmission, compressing original data to be transmitted, and reserving effective data in the transmitted data;
step 3: mapping the effective data in Step2 to the private coding table created in Step1, and partitioning the effective data through the partition codes of the private coding table;
step 4: the data receiving end receives the data re-encoded in Step3, decodes the data, and re-maps the data to the original data.
Based on the above steps, the following examples are used for specific explanation.
Fig. 1 is a current general standard ascil table that expresses 128 characters by eight bits, where the first 7 bits (bit0-6 bits) express data and the last bit (bit 7 bits) is used as parity. The technical solution of this embodiment is to use the standard ascil table in fig. 1 as reference for adjustment, and use the last seven bits (bit 1-7 bits) to represent ascil characters, and the first bit (bit0 bit) to divide the code to express the continuity of data, as shown in fig. 2.
The number and type of characters of the new private coding table are the same as the ASCLL of the original data referred by the new private coding table, and in order to increase the difficulty of data cracking, the same set of corresponding tables of scrambled characters and indexes are used for encrypting the communication data at the data sending end and the data receiving end of program communication. It should be noted that the private code table can only be used in the communication system, and the private code table needs to be regenerated when another item is used.
As shown in fig. 3, currently, the format of data is mostly sent in protocols such as JSON, XML and the like, and the content is sent in a Key-Value form, in data transmission, since both ends of a communication protocol are defined, the "Key" data in the data belongs to data known by both end programs, repeated transmission is not required, and the "Value" data unknown by both end programs is encoded as effective data for data transmission. Wherein the data is partitioned using a partitioning code.
As shown in fig. 4, the Byte (Byte, a unit of measurement used in computer information technology to measure storage capacity, and 1Byte ═ 8bit) of the same data is represented by the same data, and the Byte of the next data is the inverse of the previous data.
And the data receiving end decodes the recoded data after receiving the recoded data and remaps the recoded data into original data.
In order to enable the private code table in the technical scheme to be efficiently applied to the current mature technical framework, the private code table in the technical scheme is designed to be compatible with the ASCLL code table, that is, the data in the ASCLL table of the original data is shifted to a new private code table by one bit to the left, such as:
byte date=0b01010101;
date=date<<1;
transcoding can be done for 32 bits of data by:
byte[]bs=new byte[4];
byte a=(byte)(number>>24);
byte b=(byte)((number&0xff0000)>>16);
byte c=(byte)((number&0xff00)>>8);
byte d=(byte)(number&0xff);
bs[0]=a;bs[1]=b;bs[2]=c;bs[3]=d;
for(int i in bs)
{
Bs[i]=Bs[i]<<1;
the data compression and data encryption processes are the same as the functions of realizing data compression and encryption through the BYTE BYTE coding and remapping mode described above, and redundant description is not repeated here.
It is to be understood that unless otherwise defined, technical or scientific terms used herein have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any uses or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the present invention is not limited to the structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (4)

1. A network data coding and its encryption method is characterized by at least comprising the following steps: step 1: a data sending end creates a private coding table and determines data bits and segmentation codes of the coding table; step 2: during transmission, compressing original data to be transmitted, and reserving effective data in the transmitted data; step 3: mapping the effective data in Step2 to the private coding table created in Step1, and partitioning the effective data through the partition codes of the private coding table; step 4: the data receiving end receives the data recoded in Step3, decodes the data and remaps the data to original data; in Step1, standard ASCLL table is used as reference to adjust, the last seven bits are used to represent ASCLL characters, the first bit split code is used to express the continuity of data, the number and type of characters in the new private coding table are the same as the ASCLL of the original data to which the characters refer, in order to increase the difficulty of data cracking, the same set of corresponding tables of disordered characters and indexes are used at the data sending end and the data receiving end of program communication to encrypt the communication data, the private coding table can only be used in the communication system, when the other item is used, the private coding table needs to be regenerated, when the format of the current data is sent in JSON and XML protocols, the content is sent in the form of Key-Value, in the transmission data, because the two ends of the communication protocol are already defined, the 'Key' data in the data belongs to the data which are known by the programs at the two ends and do not need to be transmitted repeatedly, the 'Value' data which are unknown by the programs at the two ends are used as effective data for data transmission to encode, the data is divided by using the division codes, the division codes of the Byte of the same data are represented by the same data, the division code of the Byte of the next data is the inverted value of the division code of the previous data, the data receiving end receives the recoded data, decodes the recoded data and remaps the recoded data into the original data, the private coding table is designed to be compatible with an ASCLL coding table, and the data in the ASCLL table of the original data is shifted to the left by one bit and then is switched into a new private coding table.
2. The method for encoding and encrypting data according to claim 1, wherein the private code table is created in Step 1by using the same eight bits to express 128 characters with reference to the standard ASCLL table.
3. The network data encoding and encrypting method of claim 2, wherein in the private code table, the last seven bits (bit 1-7 bits) of the eight bits represent data characters, and the first bit (bit0 bit) is a partition code to express the continuity of the data.
4. A computer-readable storage medium in which a program is stored, wherein the program is executed to perform the network data encoding and encryption method of any one of the preceding claims 1 to 3.
CN202010258815.5A 2020-04-03 2020-04-03 Network data coding and encryption algorithm thereof Active CN111490984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010258815.5A CN111490984B (en) 2020-04-03 2020-04-03 Network data coding and encryption algorithm thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010258815.5A CN111490984B (en) 2020-04-03 2020-04-03 Network data coding and encryption algorithm thereof

Publications (2)

Publication Number Publication Date
CN111490984A CN111490984A (en) 2020-08-04
CN111490984B true CN111490984B (en) 2022-03-29

Family

ID=71812500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010258815.5A Active CN111490984B (en) 2020-04-03 2020-04-03 Network data coding and encryption algorithm thereof

Country Status (1)

Country Link
CN (1) CN111490984B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788051A (en) * 2021-01-25 2021-05-11 高新兴讯美科技股份有限公司 Https dynamic encryption transmission method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1531209A (en) * 2003-03-11 2004-09-22 佳能株式会社 Coding method and coder, computer programm and memory medium
CN1863302A (en) * 2005-11-03 2006-11-15 华为技术有限公司 Multimedia communication method and terminal thereof
KR20080045701A (en) * 2005-10-05 2008-05-23 엘지전자 주식회사 Method and apparatus for signal processing and encoding and decoding method, and apparatus therefor
CN105868194A (en) * 2015-01-19 2016-08-17 阿里巴巴集团控股有限公司 Methods and devices for text data compression and decompression
WO2018082286A1 (en) * 2016-11-04 2018-05-11 深圳国人通信股份有限公司 Encoding and decoding method and apparatus for serial communication system based on serdes technology
CN109257048A (en) * 2013-04-08 2019-01-22 索尼公司 Method, data deciphering device and the video receiver of decoding data value sequence

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1531209A (en) * 2003-03-11 2004-09-22 佳能株式会社 Coding method and coder, computer programm and memory medium
KR20080045701A (en) * 2005-10-05 2008-05-23 엘지전자 주식회사 Method and apparatus for signal processing and encoding and decoding method, and apparatus therefor
CN1863302A (en) * 2005-11-03 2006-11-15 华为技术有限公司 Multimedia communication method and terminal thereof
CN109257048A (en) * 2013-04-08 2019-01-22 索尼公司 Method, data deciphering device and the video receiver of decoding data value sequence
CN105868194A (en) * 2015-01-19 2016-08-17 阿里巴巴集团控股有限公司 Methods and devices for text data compression and decompression
WO2018082286A1 (en) * 2016-11-04 2018-05-11 深圳国人通信股份有限公司 Encoding and decoding method and apparatus for serial communication system based on serdes technology

Also Published As

Publication number Publication date
CN111490984A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN111683069B (en) Customized communication protocol and service method based on netty framework
CN111967244B (en) FAST protocol decoding method, device and equipment based on FPGA
CN109167645B (en) Data structure for physical layer encapsulation, data structure generating apparatus and method thereof
WO2017193821A1 (en) Cloud desktop image processing method, server, client and computer storage medium
CN103534968B (en) The coding of a kind of ethernet physical layer, coding/decoding method and device
US8924591B2 (en) Method and device for data segmentation in data compression
US8688621B2 (en) Systems and methods for information compression
JP2002027023A (en) Device and method for wireless data transmitting/ receiving
JP2016519527A (en) Method and apparatus for compressing packet header
WO2019227831A1 (en) Coding method, device, and readable storage medium
WO2015027755A1 (en) Physical layer coding/decoding method and apparatus thereof
CN102821275A (en) Data compression method, data compression device, data decompression method and data decompression device
CN111857550A (en) Method, apparatus and computer readable medium for data deduplication
CN105052040A (en) System and method for multi-stream compression and decompression
CN111490984B (en) Network data coding and encryption algorithm thereof
CN103368582A (en) Data coding and decoding method and device
CN110334066A (en) A kind of Gzip decompression method, apparatus and system based on FPGA
CN1675842B (en) Method and apparatus arithmetic coding, and related decoding method
US7580358B2 (en) Bidirectional communication control apparatus, terminal apparatus, and bidirectional communication control method
CN107688439B (en) The generation method and device of onrelevant compression blocks based on Deflate
EP3360331A1 (en) Mpeg transport frame synchronization
CN113259621B (en) Cloud conference step-by-step recording method and system
CN101489052A (en) Subtitle data processing method and apparatus
JP4043073B2 (en) Outline video signal decoding method and outline video signal decoding apparatus
CN113051024B (en) Virtual machine live migration method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant