CN108123721A - Coding method and device - Google Patents
Coding method and device Download PDFInfo
- Publication number
- CN108123721A CN108123721A CN201611073831.7A CN201611073831A CN108123721A CN 108123721 A CN108123721 A CN 108123721A CN 201611073831 A CN201611073831 A CN 201611073831A CN 108123721 A CN108123721 A CN 108123721A
- Authority
- CN
- China
- Prior art keywords
- character
- universal
- base
- length
- version
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/3084—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction using adaptive string matching, e.g. the Lempel-Ziv method
- H03M7/3088—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction using adaptive string matching, e.g. the Lempel-Ziv method employing the use of a dictionary, e.g. LZ78
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
A kind of coding method and device, the described method comprises the following steps:According to the multiple communication systems for being used for transmission data to be transmitted, the universal character that the multiple communication system can identify is obtained;At least a portion in the universal character is chosen as base character, mutually different code word is built based on the base character, to obtain a yard storehouse, different code words corresponds to different characters;The data to be transmitted is encoded using the code storehouse.The embodiment of the present invention can make recipient unambiguously correctly identify the character in the code word received, and then preserve the information received, so as to improve communication efficiency.
Description
Technical field
The present invention relates to the communications field, more particularly, to a kind of coding method and device.
Background technology
At present, each communication system is respectively provided with specific coding rule, such as mailing system is encoded using Base64, network address
Agreement is encoded using Http, and short message, will be each although binary system code encoding/decoding mode may be employed using mobile communication coding standard etc.
The code word of a system is converted to binary bit stream, and then carries out physical layer transmission to other systems, but have very much can by recipient
Character in the code word that receives can not can correctly be identified, cause communication failure.Specifically, multiple characters are in difference
In system there is different binary bit streams to correspond to therewith, and meaning of many characters in different system is different, causes
Recipient is when receiving the binary bit stream for carrying transmission information, it is possible to above-mentioned ambiguous character-recognition errors
And cause communication failure:Such as decoded in error is carried out to the instruction that wrong identification obtains, and then cause faulty operation;Or because of mistake
Obtained code word is misidentified not meet the preset rules of recipient and stop decoding.In these cases, recipient usually will not
Preserve paid-in information.
In the prior art, in order to recipient is made correctly to identify the character in code word, it is necessary to according to sender and recipient
Different coding standard, prepare in advance and send decoding storehouse, so that other side passes through volume after loading plug-in unit or the grand application of installation
Code conversion can correctly identify code word and smoothly decode.But if for transmitting every time, decoding storehouse is all sent simultaneously, then sternly
Weight waste bandwidth;If just sending decoding storehouse after waiting recipients that identification mistake occurs and causing communication failure, can waste for the first time
The transmission time and transfer resource of transmission, and reduce communication efficiency.
The content of the invention
The technical problem to be solved by the present invention is to provide a kind of coding method and devices, and recipient can be made unambiguously correct
It identifies the character in the code word received, and then preserves the information received, so as to improve communication efficiency.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of coding method, comprise the following steps:According to for
Multiple communication systems of data to be transmitted are transmitted, obtain the universal character that the multiple communication system can identify;Described in selection
At least a portion in universal character builds mutually different code word, to obtain as base character based on the base character
Code storehouse, different code words correspond to different characters;The data to be transmitted is encoded using the code storehouse.
Optionally, the universal character is selected from Arabic numerals and English upper and lower case letter.
Optionally, it is described to be included based on the mutually different code word of base character structure:Choose the base character structure
Into mutually different code word, each code word includes 3 base characters;Wherein, the sum of the base character is more than or equal to
41.
Optionally, the base character includes:1、2、3、4、5、6、7、8、9、B、D、F、G、H、J、K、M、P、Q、U、V、W、
X、Y、Z、b、d、f、g、h、j、k、m、p、q、u、v、w、x、y、z。
Optionally, being carried out coding to the data to be transmitted using the code storehouse is included:It will be in the data to be transmitted
Character replaces with corresponding code word, to generate one or more coded strings;It is chosen in the universal character described basic
At least one universal character beyond character is placed in as prefix character before each coded string.
Optionally, the coding method further includes:The base character and prefix character are chosen in the universal character
At least one universal character in addition, using as version character, and the version character be placed in the prefix character with it is described
Between coded string.
Optionally, it is provided with version number between the version character and the prefix character.
Optionally, the coding method further includes:Chosen in the universal character base character, prefix character and
At least one universal character beyond version character, using as length character, and the length character is placed in the version word
Between symbol and the coded string.
Optionally, the length of the coded string is provided between the length character and the version character.
Optionally, the coding method further includes:The base character and prefix character are chosen in the universal character
At least one universal character in addition, using as length character, and the length character be placed in the prefix character with it is described
Between coded string.
Optionally, the length of the coded string is provided between the length character and the prefix character.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of code device, including:Acquisition module, suitable for root
According to the multiple communication systems for being used for transmission data to be transmitted, the universal character that the multiple communication system can identify is obtained;Structure
Block is modeled, it is mutual based on base character structure suitable for choosing at least a portion in the universal character as base character
Different code word, to obtain a yard storehouse, different code words corresponds to different characters;Coding module, suitable for utilizing the code storehouse
The data to be transmitted is encoded.
Optionally, the universal character is selected from Arabic numerals and English upper and lower case letter.
Optionally, the structure module includes:Submodule is built, it is mutually different suitable for choosing the base character composition
Code word, each code word include 3 base characters;Wherein, the sum of the base character is more than or equal to 41.
Optionally, the base character includes:1、2、3、4、5、6、7、8、9、B、D、F、G、H、J、K、M、P、Q、U、V、W、
X、Y、Z、b、d、f、g、h、j、k、m、p、q、u、v、w、x、y、z。
Optionally, the coding module includes:Submodule is substituted, suitable for the character in the data to be transmitted is replaced with
Corresponding code word, to generate one or more coded strings;Prefix places submodule, suitable for being chosen in the universal character
At least one universal character beyond the base character as prefix character, and be placed in each coded string it
Before.
Optionally, the code device further includes:Version placement module, suitable for choosing the base in the universal character
At least one universal character beyond this character and prefix character, using as version character, and the version character is placed in institute
It states between prefix character and the coded string.
Optionally, it is provided with version number between the version character and the prefix character.
Optionally, the code device further includes:First length placement module, suitable for choosing institute in the universal character
At least one universal character beyond base character, prefix character and version character is stated, using as length character, and the length
Degree character is placed between the version character and the coded string.
Optionally, the length of the coded string is provided between the length character and the version character.
Optionally, the code device further includes:Second length placement module, suitable for choosing institute in the universal character
At least one universal character beyond base character and prefix character is stated, to be placed in as length character and the length character
Between the prefix character and the coded string.
Optionally, the length of the coded string is provided between the length character and the prefix character.
Compared with prior art, the technical solution of the embodiment of the present invention has the advantages that:
The embodiment of the present invention provides a kind of coding method, comprises the following steps:According to being used for transmission the more of data to be transmitted
A communication system obtains the universal character that the multiple communication system can identify;Choose at least one in the universal character
Part builds mutually different code word, to obtain a yard storehouse, different code words is corresponded to as base character based on the base character
In different characters;The data to be transmitted is encoded using the code storehouse.The embodiment of the present invention is using sender with connecing
The identifiable character structure codeword transmission information of debit, makes recipient unambiguously correctly identify the word in the code word received
Symbol, so cannot to codeword decoding in the case of still the character received can be preserved, without sender repeat
Information is sent, so as to improve communication efficiency.
Further, using the embodiment of the present invention, 41 base characters can be more than or equal to by selecting, so that in code storehouse
The state sum of the binary number of code word sum two bytes of covering, is replaced so as to fulfill the code word formed using minimum base character
Equal number of binary number is changed, further improves communication efficiency.
Further, the embodiment of the present invention is selected from the Arabic numerals and English upper and lower case letter of the multiple communication systems of compatibility
In the universal character taken, the most common character in the character and text easily mutually obscured is filtered out, obtains 41 preferred bases
This character, forms code word by it and can also reduce and be manually entered error rate.
Further, the embodiment of the present invention chooses the universal character conduct beyond the base character in the universal character
Prefix character, and be placed in before one or more coded strings, it can be used for the initial position for identifying coded string, into
And there is error of transmission, when at least one code word in the coded string such as obtained is imperfect code word, then it can skip
The coded string of mistake is received since the position of next prefix character.
Further, the embodiment of the present invention is chosen logical beyond the base character and prefix character in the universal character
It by the use of character as version character, and is placed between the prefix character and the coded string, for differentiating recipient
Different Encryption Algorithm versions or checking algorithm version improve the security and confidentiality of transmission.
Further, the embodiment of the present invention chooses the base character, prefix character and version word in the universal character
Universal character beyond symbol is placed in as length character between the version character and the coded string, makes reception
Side can be differentiated according to the length of the coded string received whether complete transmission, improve the integrality of transmission.
Description of the drawings
Fig. 1 is a kind of flow chart of coding method in the embodiment of the present invention;
Fig. 2 is a kind of flow chart of specific implementation of step S13 in Fig. 1;
Fig. 3 is a kind of structure diagram of code device in the embodiment of the present invention;
Fig. 4 is a kind of structure diagram of specific implementation of coding module 33 in Fig. 3.
Specific embodiment
As previously mentioned, each communication system is respectively provided with specific coding rule, recipient probably can not be to receiving
Code word in character correctly identified, cause communication failure.In the prior art, in order to recipient is made correctly to identify code word
In character, it is necessary to according to the different coding standard of sender and recipient, prepare in advance and send decoding storehouse, so that other side exists
After loading plug-in unit or the grand application of installation, it can correctly be identified by code conversion and smoothly decoded, still, if for each
Transmission all sends decoding storehouse, then serious waste bandwidth simultaneously;If after waiting recipients that identification mistake occurs and causing communication failure
Decoding storehouse is just sent, then can waste the transmission time transmitted for the first time and transfer resource, and reduce communication efficiency.
The present inventor the analysis found that, the key of the above problem is there is discrimination there are multiple between different system
The character of justice, when being built into code word and when being transmitted using above-mentioned character, the result that recipient identifies it often with transmission
Fang Butong, in order to avoid recipient is for ambiguous character-recognition errors, sender should use one's own side and recipient
The character being unambiguously identified builds code word to transmit information.For example, when recipient is Http systems, character is received
, can be as a kind of distinguished symbol of domain name after "/", and then dropping character "/" is filtered in decoding, cause what the character carried
Information can not be transmitted to recipient.In order to avoid the generation of above-mentioned mistake, sender should use other unambiguously characters to substitute
Character "/" builds code word, then is transmitted.
The embodiment of the present invention provides a kind of coding method, comprises the following steps:According to being used for transmission the more of data to be transmitted
A communication system obtains the universal character that the multiple communication system can identify;Choose at least one in the universal character
Part builds mutually different code word, to obtain a yard storehouse, different code words is corresponded to as base character based on the base character
In different characters;The data to be transmitted is encoded using the code storehouse.The embodiment of the present invention is using sender with connecing
The character structure codeword transmission information that debit can unambiguously identify, makes recipient unambiguously correctly identify the code word received
In character, and then cannot to codeword decoding in the case of still the character received can be preserved, without send
Fang Chongfu sends information, so as to improve communication efficiency.
It is understandable for above-mentioned purpose, feature and advantageous effect of the invention is enable to become apparent, below in conjunction with the accompanying drawings to this
The specific embodiment of invention is described in detail.
Fig. 1 is a kind of flow chart of coding method in the embodiment of the present invention, and the coding method can include step S11 extremely
S13:
Step S11:According to the multiple communication systems for being used for transmission data to be transmitted, the equal energy of the multiple communication system is obtained
The universal character of identification.
Step S12:At least a portion in the universal character is chosen as base character, based on the base character structure
Mutually different code word is built, to obtain a yard storehouse, different code words corresponds to different characters.
Step S13:The data to be transmitted is encoded using the code storehouse.
In the specific implementation of step S11, the equal universal character that can be identified of the multiple communication system, such as can be more
The coding mode that a communication system is converted to the universal character binary bit stream is identical, i.e., same universal character exists
There is identical binary bit stream, and the universal character is equal in the multiple communication system in the multiple communication system
It is not endowed with special meaning.
It specifically, can be according to the communication system belonging to the sender and recipient that are used for transmission data to be transmitted, two
Character intersection is chosen in the character set of a communication system, and then excludes identical characters in character intersection but there are different meanings
Situation, so as to obtain the universal character in above-mentioned two system.
It further, then can be described when needing to add in the 3rd communication system as sender or recipient
On the basis of character intersection, with reference to the character set of the 3rd communication system, the general words in three communication systems are further chosen
Symbol.
Preferably, can be based on common multiple communication systems, choose the multiple communication system can identify it is general
Character from regardless of which communication system sender and the recipient of transmission data to be transmitted belong to, can be used described general
The code word of character structure is transmitted, without choosing universal character again.It specifically, can be in printable ASCII words
It is chosen in symbol and meets all of network address coding rule, Quick Response Code coding rule, mail coding rule and short message encoding rule simultaneously
The intersection of code character, formation can adapt to be manually entered, print, the transmission of network address parameter, Quick Response Code coding, mail transmission and short
Believe the Unified coding character set of transmission.
Wherein, ASCII (American Standard Code for Information
Interchange, ASCII) it is single byte coded system most general now, use 7 binary bit streams (remaining 1
Binary system is 0) to represent English upper and lower case letter, Arabic numerals 0 to 9, punctuation mark and is used in Americanese
Special controlling character.
During being chosen to ascii character, English upper and lower case letter, Arabic numerals 0 to 9 can be considered each
The universal character that can be unambiguously identified in a communication system, i.e., the coding staff for any one character therein being passed through into sender
Formula is converted to binary bit stream, and after being transmitted to and belonging to the recipient of another communication system, the coding that recipient passes through one's own side
The binary bit stream received still can be converted to the character rather than other characters by mode, be known so as to fulfill correct
Not.
In the specific implementation of step S12, at least a portion in the universal character is chosen as base character, is based on
The base character builds mutually different code word, and to obtain a yard storehouse, different code words corresponds to different characters.
Wherein, for carrying the code word of information to be transmitted built by base character, and different code words corresponds to
Different characters.Specifically, code word can include a base character, can also include multiple base characters, code word and code word
Between be differentiable.
In specific implementation, the code word in code storehouse is converted into binary bit stream in order to realize, and then realizes physical layer
Transmission, should realize that code word covers the binary number of a byte or two bytes in coding, so that each binary number can
It is replaced with different code words.
It is understood that the base character that each code word includes cannot be very few, because the primary word that each code word includes
Fu Yue is few, and it is more to cover the required code word of identical content.Specifically, when the base character that each code word includes is one
When, it is necessary to 256 code words could cover the state sum of the binary number of a byte, i.e. the 256 of 8 bits kind state,
Further, it is necessary to 256*256=65536 code word could cover the binary number of two bytes state sum, i.e., 16 two
65536 kinds of states of system number.When the base character that each code word includes be two when, it is necessary to which 16 code words could cover a word
The state sum of the binary number of section is, it is necessary to which 256 code words could cover the state sum of the binary number of two bytes.When each
, it is necessary to which 7 code words can cover the state sum of the binary number of a byte, i.e. 7* when the base character that code word includes is three
7*7=343>256, it is necessary to which 41 code words can cover the state sum of the binary number of two bytes, i.e. 41*41*41=68921
>65536。
In specific implementation, can be based on each code word includes two base characters, to cover the binary number of a byte,
Or each code word includes the situation structure code word of three or more base characters.As previously mentioned, in order to realize in each communication system
It can unambiguously be identified in system, universal character is selected from English upper and lower case letter, Arabic numerals 0 to 9, totally 62 characters.I.e.
The optional scope of base character is 62 universal characters.
It is understood that the base character that each code word includes cannot be excessive, because the primary word that each code word includes
Fu Yue is more, and the occupied transfer resource of character for transmitting each data to be transmitted is more.
Preferably, it can use and be more than or equal to 41 mutually different code words of base characters structure, wherein each code word includes 3
A base character can cover the state sum of the binary number of two bytes.It is equivalent to and is covered using 1.5 base characters
The binary number of one byte, the transfer resource of occupancy will be less than in the case that each code word includes 2 base characters, using 2
A base character covers the binary number of a byte.
Using the embodiment of the present invention, 41 base characters can be more than or equal to by selecting, so that the code word in code storehouse is total
The state sum of the binary number of number two bytes of covering, is replaced identical so as to fulfill the code word formed using minimum base character
The binary number of number, further improves communication efficiency.
It is highly preferred that the general words chosen from the Arabic numerals and English upper and lower case letter of the multiple communication systems of compatibility
Fu Zhong filters out the most common character in the character and text easily mutually obscured, and obtains 41 preferred base characters, bag
It includes:1、2、3、4、5、6、7、8、9、B、D、F、G、H、J、K、M、P、Q、U、V、W、X、Y、Z、b、d、f、g、h、j、k、m、p、q、u、v、
w、x、y、z.It can be reduced using above-mentioned preferred base character composition code word and be manually entered error rate.
In the specific implementation of step S13, the data to be transmitted is encoded using the code storehouse.
With reference to Fig. 2, step S13 in Fig. 1 is further described below, using the code storehouse to the data to be transmitted
The step of being encoded can include step S21 to step S24.
Step S21:Character in data to be transmitted is replaced with into corresponding code word, to generate one or more code characters
String.
Step S22:Universal character is chosen as prefix character, and is placed in before each coded string.
Step S23:Universal character is chosen as version character, and is placed between prefix character and coded string.
Step S24:Universal character is chosen as length character, and is placed between version character and coded string.
In the specific implementation of step S21, the character in the data to be transmitted is replaced with into corresponding code word, with generation
One or more coded strings.By taking each code word includes 3 base characters as an example, if the character in data to be transmitted
For m, wherein, m is positive integer.Then the character in data to be transmitted will be replaced with the coded string for including m code word, i.e.,
Including 3m base character.The coded string can exist in the form of one or more.
In the specific implementation of step S22, chosen in the universal character at least one beyond the base character
Universal character, such as T as prefix character, and are placed in before coded string.Use the starting of T presentation code character strings
Position if the coded string is multiple, can have prefix character T before each coded string.
It is pointed out that can also T only be set before code segment character string or even only in first coded string
T is set before, to have the function that indicate the initial position of coded string.
The embodiment of the present invention chooses universal character beyond the base character as preceding asyllabia in the universal character
Symbol, and be placed in before one or more coded strings, it can be used for the initial position for identifying coded string, and then going out
Existing error of transmission when at least one code word in the coded string such as obtained is imperfect code word, then can skip mistake
Coded string is received since the position of next prefix character.Specifically, each code word in coded string includes
3 base characters, if the quantity of the base character included in the coded string cannot be divided exactly by 3, may determine that for
Error of transmission, at least one code word are imperfect code word.
In the specific implementation of step S23, chosen in the universal character beyond the base character and prefix character
At least one universal character, such as N, using as version character, and the version character is placed in the prefix character and institute
It states between coded string.The version information of N presentation code character strings is used, if the coded string is multiple, often
There can be N between a coded string and corresponding prefix character T.
It is pointed out that version word can also be set only between code segment character string and corresponding prefix character T
It accords with N or even version character N is set only between first coded string and corresponding prefix character T, to reach instruction coded word
Accord with the effect of the version information of string.
Wherein, the version information can include encryption mode or checking mode.It can be realized pair using encryption mode
The position of each character enhances the security of data transmission into line replacement in coded string.It can be to coding using checking mode
The data of character string transmission are corrected, and enhance the accuracy of data transmission.
Further, when version information is encryption mode, for example, there is two kinds of situations of encryption or no encryption, Ke Yishe
It is set to addition N and indicates encryption, do not add N expressions and do not encrypt.Similarly, when version information be checking mode, could be provided as
Addition N indicates verification, does not add N expressions and does not verify.
Further, when version information is more, only with a character representation it is not comprehensive enough when, the version character and institute
Version number can be provided between prefix character by stating.Digital, alphabetical or other symbolic indications may be employed in the version number, at this time
Version character N can be considered as the termination character of version number, and the information for representing between prefix character and version character is version
The related content of this number.For example, when version character representation encryption mode, adoptable Encryption Algorithm is numbered, is such as set
Symmetric encipherment algorithm is put as 01, rivest, shamir, adelman 02, then using symmetric encipherment algorithm when, the prefix character and coding
01N can be added between character string, during using rivest, shamir, adelman, can be added between the prefix character and coded string
Add 02N.When version character representation checking mode, adoptable Encryption Algorithm is numbered, it is a such as to set hash algorithm,
Setting parity arithmetic be b, then using hash algorithm when, aN can be added between the prefix character and coded string,
During using parity arithmetic, bN can be added between the prefix character and coded string.
It is pointed out that the embodiment of the present invention is not limited the selection of Encryption Algorithm and checking algorithm.
In specific implementation, it can indicate whether there is version number, each case before version character in advance with protocol mode
Lower version character and the meaning of version number, to ensure that sender is identical to the understanding of version character with recipient.
The embodiment of the present invention chooses the universal character beyond the base character and prefix character in the universal character
As version character, and it is placed between the prefix character and the coded string, it is different for differentiating recipient
Encryption Algorithm version or checking algorithm version improve the security and confidentiality of transmission.
In the specific implementation of step S24, the base character, prefix character and version are chosen in the universal character
At least one universal character beyond character, such as L, using as length character, and the length character is placed in the version
Between character and the coded string.The length of L presentation code character strings is used, if the coded string is multiple,
Then there can be L between each coded string and corresponding version character N.
It is pointed out that length word can also be set only between code segment character string and corresponding version character N
It accords with L or even length character L is set only between first coded string and corresponding version character N, to reach instruction coded word
Accord with the effect of the length of string.
Further, when the length of coded string is fixes or be not fixed, addition L presentation code words be could be provided as
The length of symbol string is fixation, such as each coded string is 300 code words;The length of L presentation code character strings is not added
To be not fixed.
Further, when the length change of coded string is more, can not only with a character representation it is not comprehensive enough when,
The length of the coded string can be provided between the length character and the version character.The version number can adopt
With digital, alphabetical or other symbolic indications, length character L can be considered as the termination character of length at this time, for representing version word
Information between symbol and length character is the related content of length.For example, when the length of coded string is 999, length word
999L can be added between symbol and the version character.
In the another of the embodiment of the present invention in the specific implementation, prefix character and length character can only be set, version is not provided with
This character, at this time length character can be placed between the prefix character and the coded string.Further, the length
The length of the coded string is also provided between character and the prefix character.
The embodiment of the present invention is chosen in the universal character beyond the base character, prefix character and version character
Universal character is placed in as length character between the version character and the coded string, allows recipient's root
According to the length of the coded string received differentiate whether complete transmission, improve the integrality of transmission.
Fig. 3 is a kind of structure diagram of code device in the embodiment of the present invention.The code device can include:It obtains
Module 31, structure module 32, coding module 33, version placement module 34, the first length placement module 35 and the second length are placed
Module 36.
Wherein, the acquisition module 31, suitable for according to being used for transmission multiple communication systems of data to be transmitted, described in acquisition
The universal character that multiple communication systems can identify.The structure module 32, suitable for choosing at least one in the universal character
Part builds mutually different code word, to obtain a yard storehouse, different code words is corresponded to as base character based on the base character
In different characters.The coding module 33, suitable for being encoded using the code storehouse to the data to be transmitted.The version
Placement module 34, suitable for choosing at least one general words beyond the base character and prefix character in the universal character
Symbol, using as version character, and the version character is placed between the prefix character and the coded string.Described
One length placement module 35, suitable for being chosen in the universal character beyond the base character, prefix character and version character
At least one universal character, using as length character, and the length character is placed in the version character and the coding
Between character string.The second length placement module 36, suitable for choosing the base character and prefix in the universal character
At least one universal character beyond character, to be placed in the prefix character and institute as length character and the length character
It states between coded string.
Further, the structure module 32 can include:Submodule (not shown) is built, suitable for choosing the primary word
Symbol forms mutually different code word, and each code word includes 3 base characters;Wherein, the sum of the base character is more than
Equal to 41.
With reference to Fig. 4, coding module 33 is further described below, the coding module 33 can include:Substitute son
Module 331 and prefix place submodule 332.Wherein, the replacement submodule 331, suitable for by the word in the data to be transmitted
Symbol replaces with corresponding code word, to generate one or more coded strings.The prefix places submodule 332, suitable in institute
It states and at least one universal character beyond the base character is chosen in universal character as prefix character, and be placed in each institute
Before stating coded string.
More detailed contents on the code device are incorporated by reference to Fig. 1 to Fig. 2 and with reference to previously for coding method
Associated description, details are not described herein again.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
Relevant hardware to be instructed to complete by program, which can be stored in computer readable storage medium, to store
Medium can include:ROM, RAM, disk or CD etc..
Although present disclosure is as above, present invention is not limited to this.Any those skilled in the art are not departing from this
It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
Subject to the scope of restriction.
Claims (22)
1. a kind of coding method, which is characterized in that comprise the following steps:
According to the multiple communication systems for being used for transmission data to be transmitted, the general words that the multiple communication system can identify are obtained
Symbol;
At least a portion in the universal character is chosen as base character, is built based on the base character mutually different
Code word, to obtain a yard storehouse, different code words corresponds to different characters;
The data to be transmitted is encoded using the code storehouse.
2. coding method according to claim 1, which is characterized in that the universal character is selected from Arabic numerals and English
Upper and lower case letter.
3. coding method according to claim 1, which is characterized in that described different based on base character structure
Code word include:
It chooses the base character and forms mutually different code word, each code word includes 3 base characters;
Wherein, the sum of the base character is more than or equal to 41.
4. coding method according to claim 3, which is characterized in that the base character includes:1、2、3、4、5、6、7、
8、9、B、D、F、G、H、J、K、M、P、Q、U、V、W、X、Y、Z、b、d、f、g、h、j、k、m、p、q、u、v、w、x、y、z。
5. coding method according to claim 1, which is characterized in that carried out using the code storehouse to the data to be transmitted
Coding includes:
Character in the data to be transmitted is replaced with into corresponding code word, to generate one or more coded strings;
At least one universal character beyond the base character is chosen in the universal character as prefix character, and is put
Before each coded string.
6. coding method according to claim 5, which is characterized in that further include:
At least one universal character beyond the base character and prefix character is chosen in the universal character, using as version
This character, and the version character is placed between the prefix character and the coded string.
7. coding method according to claim 6, which is characterized in that set between the version character and the prefix character
It is equipped with version number.
8. coding method according to claim 6, which is characterized in that further include:
At least one general words beyond the base character, prefix character and version character are chosen in the universal character
Symbol, using as length character, and the length character is placed between the version character and the coded string.
9. coding method according to claim 8, which is characterized in that set between the length character and the version character
It is equipped with the length of the coded string.
10. coding method according to claim 5, which is characterized in that further include:
At least one universal character beyond the base character and prefix character is chosen in the universal character, using as length
Character is spent, and the length character is placed between the prefix character and the coded string.
11. coding method according to claim 10, which is characterized in that between the length character and the prefix character
It is provided with the length of the coded string.
12. a kind of code device, which is characterized in that including:
Acquisition module, suitable for according to the multiple communication systems for being used for transmission data to be transmitted, it is equal to obtain the multiple communication system
The universal character that can be identified;
Module is built, suitable for choosing at least a portion in the universal character as base character, based on the base character
Mutually different code word is built, to obtain a yard storehouse, different code words corresponds to different characters;
Coding module, suitable for being encoded using the code storehouse to the data to be transmitted.
13. code device according to claim 12, which is characterized in that the universal character is selected from Arabic numerals and English
Literary upper and lower case letter.
14. code device according to claim 12, which is characterized in that the structure module includes:
Submodule is built, forms mutually different code word suitable for choosing the base character, each code word is described basic including 3
Character;
Wherein, the sum of the base character is more than or equal to 41.
15. code device according to claim 14, which is characterized in that the base character includes:1、2、3、4、5、6、
7、8、9、B、D、F、G、H、J、K、M、P、Q、U、V、W、X、Y、Z、b、d、f、g、h、j、k、m、p、q、u、v、w、x、y、z。
16. code device according to claim 12, which is characterized in that the coding module includes:
Submodule is substituted, suitable for the character in the data to be transmitted is replaced with corresponding code word, to generate one or more
Coded string;
Prefix places submodule, suitable for choosing at least one universal character beyond the base character in the universal character
As prefix character, and it is placed in before each coded string.
17. code device according to claim 16, which is characterized in that further include:
Version placement module, it is at least one beyond the base character and prefix character suitable for being chosen in the universal character
Universal character, using as version character, and the version character is placed between the prefix character and the coded string.
18. code device according to claim 17, which is characterized in that between the version character and the prefix character
It is provided with version number.
19. code device according to claim 17, which is characterized in that further include:
First length placement module, suitable for choosing the base character, prefix character and version character in the universal character
At least one universal character in addition, using as length character, and the length character be placed in the version character with it is described
Between coded string.
20. code device according to claim 19, which is characterized in that between the length character and the version character
It is provided with the length of the coded string.
21. code device according to claim 16, which is characterized in that further include:
Second length placement module, suitable for being chosen in the universal character beyond the base character and prefix character at least
One universal character, using as length character and the length character be placed in the prefix character and the coded string it
Between.
22. code device according to claim 21, which is characterized in that between the length character and the prefix character
It is provided with the length of the coded string.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611073831.7A CN108123721B (en) | 2016-11-29 | 2016-11-29 | Encoding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611073831.7A CN108123721B (en) | 2016-11-29 | 2016-11-29 | Encoding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108123721A true CN108123721A (en) | 2018-06-05 |
CN108123721B CN108123721B (en) | 2022-01-11 |
Family
ID=62226847
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611073831.7A Active CN108123721B (en) | 2016-11-29 | 2016-11-29 | Encoding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108123721B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110290146A (en) * | 2019-07-03 | 2019-09-27 | 北京达佳互联信息技术有限公司 | Share generation method, device, server and the storage medium of password |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110205091A1 (en) * | 2010-02-25 | 2011-08-25 | Canon Kabushiki Kaisha | Information processing apparatus and control method thereof, and storage medium |
US20120030375A1 (en) * | 2010-07-29 | 2012-02-02 | Sap Ag | Codepage-independent binary encoding method |
CN103092922A (en) * | 2012-12-28 | 2013-05-08 | 国家计算机网络与信息安全管理中心 | Post-coding automatic decoding method aiming at uniform resource locator (URL) comprising special characters |
CN104156373A (en) * | 2013-05-15 | 2014-11-19 | 宏碁股份有限公司 | Coding format detection method and device |
CN105450232A (en) * | 2014-08-28 | 2016-03-30 | 华为技术有限公司 | Encoding method, decoding method, encoding device and decoding device |
-
2016
- 2016-11-29 CN CN201611073831.7A patent/CN108123721B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110205091A1 (en) * | 2010-02-25 | 2011-08-25 | Canon Kabushiki Kaisha | Information processing apparatus and control method thereof, and storage medium |
US20120030375A1 (en) * | 2010-07-29 | 2012-02-02 | Sap Ag | Codepage-independent binary encoding method |
CN103092922A (en) * | 2012-12-28 | 2013-05-08 | 国家计算机网络与信息安全管理中心 | Post-coding automatic decoding method aiming at uniform resource locator (URL) comprising special characters |
CN104156373A (en) * | 2013-05-15 | 2014-11-19 | 宏碁股份有限公司 | Coding format detection method and device |
CN105450232A (en) * | 2014-08-28 | 2016-03-30 | 华为技术有限公司 | Encoding method, decoding method, encoding device and decoding device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110290146A (en) * | 2019-07-03 | 2019-09-27 | 北京达佳互联信息技术有限公司 | Share generation method, device, server and the storage medium of password |
CN110290146B (en) * | 2019-07-03 | 2021-10-08 | 北京达佳互联信息技术有限公司 | Method and device for generating shared password, server and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108123721B (en) | 2022-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11263416B2 (en) | Two-dimensional code generation and identification | |
CN101739400B (en) | Method and device for generating indexes and retrieval method and device | |
CN109617680B (en) | Encryption method, device, equipment and medium | |
EP1768299A2 (en) | Encryption method, cryptogram decoding method, encryptor, cryptogram decoder, transmission/reception system, and communication system | |
CN100576227C (en) | A kind of software encrypting registration piracy-preventing method | |
CN110224999A (en) | Information interacting method, device and storage medium | |
CN102782692A (en) | System, apparatus and method for encryption and decryption of data transmitted over a network | |
CN114124502B (en) | Message transmission method, device, equipment and medium | |
JPWO2009020143A1 (en) | Transmission system, method and program | |
CN114051006A (en) | Data transmission method, data transmission device, computer equipment and storage medium | |
CN108123721A (en) | Coding method and device | |
CN101742442A (en) | System and method for transmitting electronic certificate through short message | |
CN113517982B (en) | Password generation method, password execution method and terminal | |
CN104393988A (en) | Reversible data encryption method and device | |
CN108880793A (en) | Information trading method, apparatus and electronic equipment | |
US9203607B2 (en) | Keyless challenge and response system | |
CN105553676B (en) | With the Beidou serial port communication method of equipment authentication function and transmission, reception device | |
US20140362417A1 (en) | Method of pairing between a unique identifier of a device for digitizing documents and a user account identifier | |
CN114239779A (en) | Data transmission method, transmission system, acquisition equipment and receiving equipment | |
WO2012060653A2 (en) | Data transmission management method and system | |
CN114298006B (en) | Electronic bill generation method, system and storage device | |
CN101449544A (en) | Device for receiving messages, in particular within the framework of secure data exchanges, associated aircraft and method | |
CN117294429B (en) | Public resource transaction data encryption and decryption method, system and medium based on blockchain | |
CN107888328A (en) | Information processing method | |
CN114239027A (en) | Data encryption method and apparatus, data decryption method and apparatus, electronic device, and 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 |