CN111669616B - Encoding and decoding method and device and computer storage medium - Google Patents

Encoding and decoding method and device and computer storage medium Download PDF

Info

Publication number
CN111669616B
CN111669616B CN202010581656.2A CN202010581656A CN111669616B CN 111669616 B CN111669616 B CN 111669616B CN 202010581656 A CN202010581656 A CN 202010581656A CN 111669616 B CN111669616 B CN 111669616B
Authority
CN
China
Prior art keywords
character string
string
date
preset
decoding
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
CN202010581656.2A
Other languages
Chinese (zh)
Other versions
CN111669616A (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.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System 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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN202010581656.2A priority Critical patent/CN111669616B/en
Publication of CN111669616A publication Critical patent/CN111669616A/en
Application granted granted Critical
Publication of CN111669616B publication Critical patent/CN111669616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Abstract

The invention provides a coding and decoding method, a coding and decoding device and a computer storage medium, relates to the technical field of data compression, and solves the problem of low effective utilization rate of a storage space of an identity verification system. The method comprises the steps of obtaining a character string to be coded; the character string to be coded comprises a first character string used for representing a date; coding the first character string according to a first preset coding rule to obtain a second character string; and the length of the second character string is smaller than that of the first character string.

Description

Encoding and decoding method and device and computer storage medium
Technical Field
The present invention relates to the field of data compression technologies, and in particular, to a coding and decoding method, device, and computer storage medium.
Background
Currently, most identity authentication systems store the identification number of each registered user, and can identify the validity of the account to be logged in by using the stored identification number.
As is well known, the identification number of China comprises 18 digits, namely, 36 characters are occupied. When the identity verification system stores a large number of identity card numbers, a large amount of storage space is occupied, and the effective utilization rate of the storage space is reduced.
Disclosure of Invention
The invention provides a coding and decoding method, a coding and decoding device and a computer storage medium, which solve the problem of low effective utilization rate of a storage space of an identity verification system.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method of encoding. After the first character string used for representing the date is acquired, the first character string is coded according to a first preset coding rule to obtain a second character string (the length of the second character string is smaller than that of the first character string).
It can be seen that, for the character string to be encoded including the character string indicating the date (i.e. the first character string), the encoding method provided by the present invention can directly encode the first character string, and the length of the second character string obtained after encoding is smaller than the length of the first character string. Therefore, in the actual storage process, the second character string is stored instead of the first character string, so that the occupied storage space is smaller, and the effective utilization rate of the storage space can be improved.
Optionally, the character string to be encoded related to the invention can be an identification number, and the encoding method provided by the invention can be suitable for an identity verification system. In combination with the above description, in such a scenario, the encoding method provided by the present invention can effectively improve the effective utilization of the storage space of the authentication system.
In addition, in a scene that the character string to be coded is the identification card number, the coding method provided by the invention codes the first character string which represents the date in the identification card number, so that the coded identification card number is not the original identification card number. Therefore, even if the coded identity card number is leaked, the safety of data can be ensured to a certain extent.
In a possible design manner, the method of "encoding the first character string according to the first preset encoding rule to obtain the second character string" includes: a time difference between the date represented by the first character string and a preset date is calculated. A second string representing the time difference is determined.
In a possible design manner, the character string to be encoded further includes other characters except the first character string, and in this case, the encoding method provided in the embodiment of the present invention further includes: a third string is determined. Wherein the third character string includes the second character string and other characters except the first character string. And coding the third character string according to a second preset coding rule, and determining a fourth character string. And the length of the fourth character string is smaller than that of the third character string. Alternatively, a third string is determined. Wherein the third character string includes the second character string and other characters except the first character string. And carrying out reverse order arrangement on the third character string to determine a fifth character string. Alternatively, a third string is determined. Wherein the third character string includes the second character string and other characters except the first character string. And carrying out reverse order arrangement on the third character string to determine a fifth character string. And coding the fifth character string according to a second preset coding rule to determine a sixth character string. Wherein the length of the sixth character string is smaller than the length of the fifth character string. Alternatively, a third string is determined. Wherein the third character string includes the second character string and other characters except the first character string. And coding the third character string according to a second preset coding rule, and determining a fourth character string. And the fourth character string is arranged in a reverse order to determine a seventh character string.
In a possible design, the "second predetermined encoding rule" is a conversion from a first binary system to a second binary system; wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
In a possible design manner, the character string to be encoded further includes other characters except the first character string, and the other characters except the first character string include check bits, in this case, the encoding method provided in the embodiment of the present invention further includes: the check bits in the second string are discarded. The check bit is calculated by other characters except the check bit in the character string to be coded.
In a second aspect, the present invention provides a decoding method. And after the eighth character string used for representing the date is acquired, decoding the eighth character string according to a first preset decoding rule to obtain a ninth character string (the length of the eighth character string is smaller than that of the ninth character string).
It can be seen that, for the character string to be decoded encoded according to the encoding method provided by the first aspect, the first character string is encoded by the encoding method provided by the first aspect, and the length of the obtained second character string is smaller than that of the first character string. Therefore, the character string to be coded is not the original character string to be coded in the actual transmission process, and the safety of data can be ensured to a certain extent.
Optionally, the character string to be decoded related to the invention can be an identification number, and the decoding method provided by the invention can be suitable for an identity verification system. In combination with the above description, in such a scenario, the encoding method provided by the present invention can ensure the security of the transmission of the id card number in the identity verification system.
In addition, in a scene that the character string to be decoded is the identification number, the first character string is encoded by the encoding method provided by the first aspect, so that the identification number including the second character string is obtained. Therefore, the identification number actually transmitted is not the original identification number. Thus, even if the identification number including the second character string is leaked, the security of the data can be ensured to some extent.
In a possible design, the method of "decoding the eighth character string according to the first preset decoding rule to obtain the ninth character string" determines the specified date according to the preset date and the date represented by the eighth character string. A ninth character string representing a specified date is determined.
In a possible design manner, the method for obtaining the character string to be decoded includes: an encoded string is received. And decoding the coded character string according to a second preset decoding rule, and determining the character string to be decoded. Wherein, the length of the coded character string is less than that of the character string to be decoded. Alternatively, an encoded string is received. And carrying out reverse order arrangement on the coded character strings, and determining character strings to be decoded. Alternatively, an encoded string is received. And decoding the coded character string according to a second preset decoding rule to determine a first cross character string. And performing reverse-narrative arrangement on the tenth character string to determine the character string to be decoded. Wherein the length of the encoded string is less than the length of the second string. Alternatively, an encoded string is received. And carrying out reverse order arrangement on the coded character strings to determine an eleventh character string. And decoding the eleventh character string according to a second preset decoding rule to determine the character string to be decoded. And the length of the eleventh character string is less than that of the character string to be decoded.
In a possible design, the "second predetermined decoding rule" includes converting the second binary system into the first binary system; wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
In a possible design manner, the ninth string does not include a check bit, and the decoding method provided in the embodiment of the present invention further includes: determining a check bit according to characters in the ninth character string; determining a twelfth character string; wherein the twelfth string includes a ninth string and a check bit.
In a third aspect, the present invention provides a coding apparatus comprising modules for performing the coding method of the first aspect or any one of the possible design manners of the first aspect.
Specifically, the encoding device includes: an acquisition unit and a processing unit. The acquiring unit is used for acquiring the character string to be coded. The character string to be coded comprises a first character string used for representing a date; the processing unit is configured to encode the first character string acquired by the acquisition unit according to a first preset encoding rule to obtain a second character string. Wherein the length of the second character string is smaller than the length of the first character string.
In a possible design, the processing unit is specifically configured to calculate a time difference between a date represented by the first character string acquired by the acquisition unit and a preset date. The processing unit is specifically configured to determine a second character string used for representing the time difference.
In a possible design, the character string to be encoded further includes other characters except the first character string, and the processing unit is further configured to determine a third character string. Wherein the third character string includes the second character string and other characters except the first character string. The processing unit is further configured to encode the third character string according to a second preset encoding rule, and determine a fourth character string. And the length of the fourth character string is smaller than that of the third character string. Alternatively, the first and second electrodes may be,
the processing unit is further configured to determine a third string. Wherein the third character string includes the second character string and other characters except the first character string. And carrying out reverse order arrangement on the third character string to determine a fifth character string. Or, the processing unit is further configured to determine a third string. Wherein the third character string includes the second character string and other characters except the first character string. The processing unit is further configured to perform reverse order arrangement on the third character string to determine a fifth character string. The processing unit is further configured to encode the fifth character string according to a second preset encoding rule, and determine a sixth character string. Wherein the length of the sixth character string is smaller than the length of the fifth character string. Or, the processing unit is further configured to determine a third string. Wherein the third character string includes the second character string and other characters except the first character string. The processing unit is further configured to encode the third character string according to a second preset encoding rule, and determine a fourth character string. The processing unit is further configured to perform reverse order arrangement on the fourth character string to determine a seventh character string.
In a possible design, the processing unit is further configured to encode the fourth character string according to a second preset encoding rule, and determine a fifth character string. Wherein the length of the fifth character string is smaller than the length of the fourth character string. Or, the processing unit is further configured to perform reverse order arrangement on the fourth character string to determine a sixth character string. Or, the processing unit is further configured to perform reverse order arrangement on the fourth character string to determine the sixth character string. The processing unit is further configured to encode the sixth character string according to a second preset encoding rule, and determine a seventh character string. Wherein the length of the seventh character string is smaller than the length of the sixth character string.
In a possible design manner, the second preset encoding rule is that the first system is converted into the second system; wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
In a possible design, the character string to be encoded further includes other characters except the first character string, the other characters except the first character string include check bits, and the processing unit is further configured to discard the check bits in the second character string. The check bit is calculated by other characters except the check bit in the character string to be coded.
In a fourth aspect, the present invention provides a decoding apparatus comprising modules for performing the decoding method of the second aspect or any of the possible designs of the second aspect.
Specifically, the decoding apparatus includes: an acquisition unit and a processing unit. The acquiring unit is used for acquiring the character string to be decoded. Wherein, the character string to be decoded comprises an eighth character string used for representing the date at the specified position. The processing unit is configured to decode the eighth character string acquired by the acquisition unit according to a first preset decoding rule to obtain a ninth character string. Wherein the length of the ninth character string is greater than the length of the eighth character string.
In a possible design, the processing unit is specifically configured to determine the specified date according to a preset date and a date indicated by the eighth character string acquired by the acquisition unit. The processing unit is specifically configured to determine a ninth character string indicating a specified date.
In a possible design, the obtaining unit is specifically configured to receive an encoded character string. The processing unit is specifically configured to decode the encoded character string acquired by the acquisition unit according to a second preset decoding rule, and determine a character string to be decoded. Wherein, the length of the coded character string is less than that of the character string to be decoded. Or, the acquiring unit is specifically configured to receive the encoded character string. The processing unit is specifically configured to perform reverse order arrangement on the encoded character strings acquired by the acquisition unit, and determine character strings to be decoded. Or, the acquiring unit is specifically configured to receive an encoded character string. The processing unit is specifically configured to decode the encoded character string acquired by the acquisition unit according to a second preset decoding rule, and determine a second cross character string. The processing unit is specifically configured to perform reverse arrangement on the second cross character string and determine a character string to be decoded. Wherein the length of the encoded string is less than the length of the second string. Or, the acquiring unit is specifically configured to receive an encoded character string. The processing unit is specifically configured to perform reverse order arrangement on the encoded character strings acquired by the acquisition unit, and determine an eleventh character string. The processing unit is specifically configured to decode the eleventh character string according to a second preset decoding rule, and determine a character string to be decoded. And the length of the eleventh character string is less than that of the character string to be decoded.
In a possible design, the second predetermined decoding rule includes converting the second bin into the first bin; wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
In a possible design, the character string to be encoded further includes other characters except for the eighth character string, and the processing unit is further configured to determine the twelfth character string when the other characters do not include the check bit. Wherein the twelfth character string includes a ninth character string and other characters. The processing unit is further configured to determine a check bit according to a character in the twelfth string. The processing unit is further configured to determine a thirteenth string. Wherein the thirteenth string includes a twelfth string and a check bit.
In a fifth aspect, the present invention provides an encoding apparatus comprising a memory and a processor. The memory is coupled to the processor. The memory is for storing computer program code comprising computer instructions. When the computer instructions are executed by a processor, the encoding apparatus performs the encoding method as described in the first aspect and any one of its possible designs.
In a sixth aspect, the present invention provides a computer-readable storage medium comprising instructions. When run on a computer, the instructions cause the computer to perform the encoding method as provided in the first aspect above.
In a seventh aspect, the present invention provides a computer program product for causing a computer to perform the encoding method according to the first aspect when the computer program product runs on the computer.
In an eighth aspect, the present invention provides a decoding apparatus comprising a memory and a processor. The memory is coupled to the processor. The memory is for storing computer program code comprising computer instructions. When the computer instructions are executed by a processor, the decoding apparatus performs the decoding method according to the second aspect and any one of its possible designs.
In a ninth aspect, the present invention provides a computer-readable storage medium comprising instructions. When the instructions are run on a computer, the instructions cause the computer to perform the decoding method as provided in the second aspect above.
In a tenth aspect, the present invention provides a computer program product, which when run on a computer, causes the computer to perform the decoding method according to the second aspect.
It should be noted that all or part of the above computer instructions may be stored on the first computer readable storage medium. The first computer readable storage medium may be packaged with the processor of the encoding apparatus, or may be packaged separately from the processor of the encoding apparatus, which is not limited in the present invention.
It should be noted that the computer instructions may be stored in whole or in part on a second computer readable storage medium. The second computer readable storage medium may be packaged with the processor of the decoding apparatus, or may be packaged separately from the processor of the decoding apparatus, which is not limited in the present invention.
For the description of the third, fifth, sixth and seventh aspects of the present invention, reference may be made to the detailed description of the first aspect; in addition, for the beneficial effects described in the third aspect, the fifth aspect, the sixth aspect and the seventh aspect, reference may be made to beneficial effect analysis of the first aspect, and details are not repeated here.
For the description of the fourth, eighth, ninth and tenth aspects of the present invention, reference may be made to the detailed description of the first aspect; in addition, for the beneficial effects described in the fourth aspect, the eighth aspect, the ninth aspect and the tenth aspect, reference may be made to the beneficial effect analysis of the second aspect, and details are not repeated here.
In the present invention, the names of the above-mentioned encoding device and decoding device do not limit the devices or functional modules themselves, and in actual implementation, these devices or functional modules may appear by other names. Insofar as the functions of the respective devices or functional blocks are similar to those of the present invention, they are within the scope of the claims of the present invention and their equivalents.
These and other aspects of the invention will be more readily apparent from the following description.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a coding/decoding system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an encoding and decoding apparatus according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 4 is a second flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 5 is a third flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 6 is a fourth flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 7 is a fifth flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 8 is a sixth flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 9 is a seventh flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 10 is an eighth flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 11 is a flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 12 is a second flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 13 is a third flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 14 is a fourth flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 15 is a fifth flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 16 is a sixth flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 17 is a seventh flowchart illustrating a decoding method according to an embodiment of the present invention;
FIG. 18 is a flowchart illustrating an eighth embodiment of a decoding method according to the present invention;
FIG. 19 is a diagram illustrating an exemplary structure of an encoding apparatus according to an embodiment of the present invention;
FIG. 20 is a second schematic diagram of an encoding apparatus according to an embodiment of the present invention;
FIG. 21 is a block diagram of a computer program product for an encoding method according to an embodiment of the present invention;
FIG. 22 is a block diagram of a decoding apparatus according to an embodiment of the present invention;
fig. 23 is a second schematic structural diagram of a decoding device according to an embodiment of the present invention;
fig. 24 is a schematic structural diagram of a computer program product for providing a decoding method according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in 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.
For the convenience of clearly describing the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", and the like are used to distinguish the same items or similar items with basically the same functions and actions, and those skilled in the art can understand that the words "first", "second", and the like do not limit the quantity and execution order.
In order to facilitate understanding of the present invention, the following description explains the related terms to which the present invention relates.
Identification number: the identification card is composed of eighteen digits, the 1 st digit to the 2 nd digit in the 18 digits represent province codes, the 3 rd digit to the 4 th digit represent city codes, the 5 th digit to the 6 th digit represent county codes, the 7 th digit to the 14 th digit represent the year, month and day of life, the 15 th digit to the 17 th digit represent sequence numbers compiled after birth in the same regional range, and the 18 th digit is a check digit for checking the correctness of the identification card.
Carrying out scale: the method represents a carry counting system and is an artificially defined counting method with a carry system.
Carrying out binary conversion: the representation converts a number in one binary representation to a number in another binary representation.
Sixty quaternary: a representation method for representing binary data based on sixty-four printable characters is shown. The sexagesimal character sequence is shown in table 1.
TABLE 1
Figure BDA0002553406500000091
Figure BDA0002553406500000101
And (3) reverse order arrangement: indicating that the order of a string of text characters is reversed completely. Illustratively, when the format of the character string to be encoded or the character string to be decoded is ABCDEFG, the character string to be encoded or the character string to be decoded is arranged in a reverse order, and the format of the character string to be encoded or the character string to be decoded after the reverse order arrangement is GFEDCBA.
The embodiment of the invention provides a method, which is applied to a coding and decoding system shown in figure 1. The encoding and decoding system comprises an encoding device 10 and a decoding device 20, wherein the encoding device 10 can be used for encoding a character string A1 to be encoded to generate a corresponding target character string B1. The decoding device 20 may be configured to decode the character string B1 to be decoded generated by the encoding device 10 to generate a corresponding character string A1 to be encoded.
The encoding apparatus 10 and the decoding apparatus 20 may be realized by another implementation form, for example, by using a general-purpose digital processor system, such as the encoding and decoding apparatus 30 shown in fig. 2, and the encoding and decoding apparatus 30 may be a part of the encoding apparatus 10 or a part of the decoding apparatus 20.
The codec device 30 may be applied to the encoding side or the decoding side. The codec device 30 includes a processor 1001 and a memory 1002. The processor 1001 is coupled to the memory 1002 (e.g., via the bus 1004). Optionally, the codec device 10 may further include a transceiver 1003, and the transceiver 1003 is connected to the processor 1001 and the memory 1002 for receiving/transmitting data.
The Memory 1002 may be a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), or a portable Read-Only Memory (CD-ROM). The memory 1002 is used for storing relevant program codes and video data.
The processor 1001 may be one or more Central Processing Units (CPUs), and in the case where the processor 1001 is one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The processor 1001 is configured to read the program codes stored in the memory 1002 and execute the operations of any one of the embodiments corresponding to fig. 3 or fig. 11 and various possible embodiments thereof.
The problem that when the identity authentication system stores a large number of identity card numbers, a large amount of storage space is occupied, and the effective utilization rate of the storage space is reduced is solved. The embodiment of the invention provides an encoding method, when a character to be encoded is used for representing an identity card number, a first character string representing a date in the identity card number can be encoded into a third character string with smaller length by the encoding method provided by the invention, so that the storage space of the identity card number is reduced, the effective utilization rate of the storage space of an identity verification system is improved, and the specific implementation process is as follows:
the encoding method provided by the embodiment of the present invention is described below with reference to the schematic diagram of the encoding and decoding system shown in fig. 1, taking the encoding apparatus 10 as an encoder as an example.
As shown in fig. 3, the encoding method includes the following steps S11 and S12:
s11, the encoder acquires a character string to be encoded. The character string to be coded comprises a first character string used for representing a date.
In the embodiment of the present invention, the character string to be encoded may be a character string containing only digital information, or may be a character string containing digital information. The format of the first character string can be 'day, month and year'; alternatively, month, day, year; or year, month, day.
Illustratively, taking the first string occupies 8 bytes to represent the date, and the date represented by the first string is 1, 2 and 1980, if the format of the first string is day, month and year, the first string is 02011980. If the format of the first string is month, day, and year, the first string is 01021980. If the format of the first string is year, month, day, the first string is 19800102.
And S12, the encoder encodes the first character string according to a first preset encoding rule to obtain a second character string. Wherein the length of the second character string is smaller than the length of the first character string.
In the embodiment of the invention, when a character string to be encoded, which comprises a first character string representing a date, is acquired, the first character string is encoded to obtain a second character string which is shorter than the first character string. Therefore, in the actual storage process, the second character string is stored instead of the first character string, so that the occupied storage space is smaller, and the effective utilization rate of the storage space can be improved.
In one possible implementation manner, in conjunction with fig. 3, as shown in fig. 4, the step S12 described above can be specifically implemented by the step S120 and the step S121 described below.
S120, the encoder calculates the time difference between the date represented by the first character string and the preset date.
In an embodiment of the present invention, a unit of measurement of a time difference between the date represented by the first character string and the preset date may be any one of a number of years, a number of months, a number of days, a number of hours, a number of minutes, and a number of seconds; wherein, the conversion process among years, months, days, hours, minutes and seconds satisfies that 1 year =12 months =365 days =365 × 4 and =365 × 24 × 60 minutes =365 × 24 × 60 × 60 seconds.
S121, the encoder determines a second character string used for representing the time difference.
In an embodiment of the present invention, the date represented by the first character string may be earlier than a preset date. Alternatively, the date represented by the first character string is later than a preset date. If the preset date is 1820, 1, and the date represented by the first character string is 1990, 3, 7, the date represented by the first character string is later than the preset date. Alternatively, the preset date is 1820, 1 month and 1 day, and if the date represented by the first character string is 1810, 3 months and 7 days, the date represented by the first character string is earlier than the preset date.
In one embodiment, the encoder and decoder may have a predetermined date agreed upon in advance. In this case, the preset date needs to be earlier than the date represented by any of the first character strings, or the preset date needs to be later than the date represented by any of the first character strings, so that when the encoder transmits the encoded character string to be encoded (also referred to as the character string to be decoded) to the decoder, the decoder can know whether the preset date plus the time difference is equal to the date represented by the first character string, or whether the preset date minus the time difference is equal to the date represented by the first character string.
Illustratively, with the preset date of 1820, month 1 and day 1, and the character string to be encoded being used to represent the identification number, and the identification number of 110101199003075437, and the unit of measurement of the time difference being days, it is known that the first character string is 19900307, and the time difference between the date represented by the first character string (month 3 and day 7 of 1990) and the preset date (month 1 and day 1 of 1820) is 62157 days. Thus, the third string used by the encoder to represent the time difference is 62157.
In another embodiment, when the encoder includes a plurality of preset dates, and the decoder does not know which preset date the encoder uses, the encoder sends information carrying the used preset date to the decoder after encoding the character string to be encoded, so that the decoder can know which preset date to use for decoding. In this case, when the encoder determines that the date represented by the first character string is earlier than the currently selected preset date, the encoder needs to determine whether there is a preset date earlier than the date represented by the first character string. If so, any preset date which is earlier than the date represented by the first character string is selected as the currently selected preset date, so that when the encoder sends the encoded character string to be encoded (also called the character string to be decoded) to the decoder, the decoder can know that the preset date plus the time difference is equal to the date represented by the first character string. Alternatively, when the encoder determines that the date represented by the first character string is later than the currently selected preset date, the encoder needs to determine whether there is a preset date that is later than the date represented by the first character string. If so, any preset date later than the date represented by the first character string is selected as the currently selected preset date, so that when the encoder transmits the encoded character string to be encoded (also called the character string to be decoded) to the decoder, the decoder can know that the preset date minus the time difference is equal to the date represented by the first character string.
Illustratively, taking 3 preset dates (1820 year 1 month 1 day, 1920 year 1 month 1 day and 2020 year 1 month 1 day, respectively) included in the encoder as an example, when the decoder and the encoder agree in advance that the preset date is earlier than the date represented by any one of the first character strings, if the date represented by the first character string is 1955 year 1 month 1 day, the encoder may select any one of 1820 year 1 month 1 day and 1920 year 1 month 1 day as the preset date, so that the decoder, upon receiving the character string to be decoded transmitted by the encoder, may know that the preset date plus the time difference is equal to the date represented by the first character string. Alternatively, for example, when the encoder includes 3 preset dates (1820 year 1 month 1 day, 1920 year 1 month 1 day, and 2020 year 1 month 1 day, respectively), when the decoder and the encoder have agreed in advance that the preset date is later than the date indicated by any one of the first character strings, if the date indicated by the first character string is 1855 year 1 month 1 day, the encoder may select any one of the 1920 year 1 month 1 day and the 2020 year 1 month 1 day as the preset date, so that when the decoder receives the character string to be decoded transmitted by the encoder, it can know that the preset date minus the time difference is equal to the date indicated by the first character string.
In another embodiment, the encoder and decoder have previously agreed upon the relationship between the preset date and time difference, such as: when the encoder determines that the date represented by the first character string is later than the preset date, the encoder transmits the encoded character string to be encoded (also called character string to be decoded) to the first decoder. After receiving the character string to be decoded, the first decoder determines the date represented by the first character string by adding the time difference on the basis of the preset date. Or when the encoder determines that the date represented by the first character string is earlier than the preset date, the encoder sends the character string to be decoded to the second decoder. And after receiving the character string to be decoded, the second decoder subtracts the time difference on the basis of the preset date to determine the date represented by the first character string.
It should be noted that, the functions implemented by the first decoder and the second decoder can be implemented by two units of one decoder, and compared with two decoders corresponding to one encoder, the total number of deployed decoders can be reduced, and the operation cost can be reduced.
Illustratively, the preset date is 1820, 1, and the date represented by the first character string is 1990, 3, 7, since the date represented by the first character string is later than the preset date. Thus, the encoder sends the string to be decoded to the first decoder. Therefore, after receiving the character string to be decoded, the first decoder determines the date represented by the first character string by adding the time difference to the preset date. Alternatively, taking the preset date as 1/2020 and the date represented by the first character string as 3/7/1990 as an example, the date represented by the first character string is earlier than the preset date. Thus, the encoder sends the string to be decoded to the second decoder. Thus, the second decoder determines the date represented by the first string by subtracting the time difference from the preset date after receiving the string to be decoded.
In the embodiment of the present invention, the encoder determines the second character string used for representing the time difference by calculating the time difference between the date represented by the first character string and the preset date (the length of the second character string is smaller than that of the first character string). Therefore, in the actual storage process, the second character string is stored instead of the first character string, so that the occupied storage space is smaller, and the effective utilization rate of the storage space can be improved.
In a possible implementation manner, when the character string to be encoded further includes other characters besides the first character string, in this case, as shown in fig. 5 in conjunction with fig. 3, the encoding method provided by the embodiment of the present invention further includes S14 and S15.
And S14, the encoder determines a third character string. Wherein the third character string includes the second character string and other characters except the first character string.
S15, the encoder encodes the third character string according to a second preset encoding rule, and determines a fourth character string. And the length of the fourth character string is smaller than that of the third character string.
Illustratively, when the character string to be encoded is an identification number with check bits, and the identification number is 110101199003075437, the first character string in the character string to be encoded is 19900307, and the characters except the first character string are 110101 and 5437.
Or, when the character string to be encoded is the identification number without check bits and the identification number is 11010119900307543, the first character string in the character string to be encoded is 19900307 at this time, and the other characters except the first character string are 110101 and 543.
In this embodiment of the present invention, the binary system corresponding to the third string may be an octal system, a decimal system, a hexadecimal system, a thirty-two system, or a sixty-four system.
Illustratively, when the decimal system corresponding to the third character string is the decimal system, the third character string is 110101621575437, and the second preset encoding rule is decimal to hexadecimal, the third character string is encoded according to the second preset encoding rule, and the fourth character string is determined to be 6423080b0f0d.
When the decimal system corresponding to the third character string is the decimal system, the fourth character string is 110101621575437, and the second preset encoding rule is decimal system conversion to the thirty-two decimal system, the third character string is encoded according to the second preset encoding rule, and the fourth character string is determined to be 344c40m3od.
In the embodiment of the invention, because the length of the fourth character string is smaller than that of the third character string, the actually stored fourth character string can occupy smaller storage space, and the utilization rate of the storage space is improved. In addition, when the fourth character string represents the identity card number, because the length of the actually stored fourth character string is smaller than that of the original identity card number, a smaller storage space can be occupied, and the problems that when the identity verification system stores a large number of identity card numbers, a large amount of storage space is occupied, and the effective utilization rate of the storage space is reduced are solved.
In a possible implementation manner, when the character string to be encoded further includes other characters besides the first character string, in this case, as shown in fig. 6 in conjunction with fig. 3, the encoding method provided by the embodiment of the present invention further includes S14 and S16.
And S14, the encoder determines a third character string. Wherein the third character string includes the second character string and other characters except the first character string.
And S16, the encoder performs reverse order arrangement on the third character string to determine a fifth character string.
Illustratively, taking the third string as 110101621575437 as an example, the fourth string is arranged in a reverse order, and the fifth string is determined as 734575126101011.
In the embodiment of the invention, when the third character string is used for representing the identification card number, the fourth character string obtained at the moment is also used for representing the identification card number. In practical application, the number segments of the corresponding stored identification numbers of different servers are different (e.g. 1101016215750001-110101621579001), and because the identification numbers of people on the same birthday are too close to each other in the same area, the identification numbers of people on the same birthday are easy to store in the same storage space in the same area in the practical storage process, and the data accumulation phenomenon is easy to occur. Based on this, the encoding method provided by the embodiment of the present invention may enable data to be uniformly distributed in the data interval as much as possible by arranging the third character strings in a reverse order. The identity card numbers of people in the same area and on the same birthday are prevented from being stored in the same storage space, but can be stored in different storage spaces, and therefore the effective utilization rate of the storage spaces is improved.
In a possible implementation manner, when the character string to be encoded further includes other characters besides the first character string, in this case, as shown in fig. 7 in conjunction with fig. 3, the encoding method provided by the embodiment of the present invention further includes S14, S16, and S17.
And S14, the encoder determines a third character string. Wherein the third character string includes the second character string and other characters except the first character string.
And S16, the encoder performs reverse order arrangement on the third character string to determine a fifth character string.
And S17, the encoder encodes the fifth character string according to a second preset encoding rule and determines a sixth character string. Wherein the length of the sixth character string is smaller than the length of the fifth character string.
Illustratively, the third character string represents the identity card number without check bits, the identity card number without check bits is 11010162157543, the second preset encoding rule is decimal conversion into sixty-four system, the third character string is 11010162157543 is arranged in a reverse order, and the fifth character string is determined to be 34575126101011. And encoding the fifth character string 34575126101011 according to a second preset encoding rule, and determining the sixth character string to be 520ooZi.
In the embodiment of the invention, the third character string is arranged in the reverse order, so that the data can be uniformly distributed in the data interval as much as possible, and meanwhile, the length of the sixth character string is smaller than that of the fifth character string. Therefore, the actually stored sixth character string can occupy smaller storage space, and the utilization rate of the storage space is improved. The problem of when the authentication system stores a large amount of ID card numbers, can occupy a large amount of storage space, reduced the effective utilization ratio of storage space is solved.
In a possible implementation manner, when the character string to be encoded further includes other characters besides the first character string, in this case, as shown in fig. 8 in conjunction with fig. 3, the encoding method provided by the embodiment of the present invention further includes S14, S15, and S18.
And S14, the encoder determines a third character string. Wherein the third character string includes the second character string and other characters except the first character string.
And S15, the encoder encodes the third character string according to a second preset encoding rule and determines a fourth character string.
And S18, the encoder performs reverse order arrangement on the fourth character string to determine a seventh character string.
Illustratively, the third character string represents the identity card number without check bits, the identity card number without check bits is 11010162157543, the second preset encoding rule is decimal conversion into thirty-two system, the third character string 11010162157543 is encoded according to the second preset encoding rule, and the fourth character string is determined to be a0e0crpv7. The fourth character string is arranged in reverse order, and the seventh character string is determined to be 7vprc0e0a.
In the embodiment of the invention, because the length of the fourth character string is smaller than that of the third character string, the actually stored fourth character string can occupy smaller storage space, and the utilization rate of the storage space is improved. In addition, when the fourth character string represents the identity card number, because the length of the actually stored fourth character string is smaller than that of the original identity card number, a smaller storage space can be occupied, and the problems that when the identity verification system stores a large number of identity card numbers, a large amount of storage space is occupied and the effective utilization rate of the storage space is reduced are solved.
In one possible implementation manner, the second preset encoding rule is that the first system is converted into the second system. Wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
In the embodiment of the invention, the designated content is represented by adopting the first binary system before being coded, and because the length of the character string for representing the designated content by adopting the first binary system is greater than that of the character string for representing the designated content by adopting the second binary system, the designated content is represented by adopting the second binary system in order to reduce the storage space occupied by the designated content. Therefore, the designated content can occupy smaller storage space in the actual storage process, and the utilization rate of the storage space is improved.
In a possible implementation manner, when the character string to be encoded further includes other characters except the first character string, and the other characters except the first character string include check bits, in this case, as shown in fig. 9 in conjunction with fig. 3, the encoding method provided in the embodiment of the present invention further includes S19.
And S19, discarding the check bit in the second character string by the encoder. The check bit is calculated through other characters except the check bit in the character string to be coded.
Illustratively, taking the identification number as 110101199003075437, the preset date as 1 month and 1 day of 1820 year, and the metering unit of the time difference as the number of days, the check digit of the identification number is abandoned, and the identification number without the check digit is determined as 11010119900307543. The first character string in the identity card number without check digits is 19900307, the time difference between the date (3/7/1990) represented by the first character string and the preset date (1/1820) is 62157 days, and the second character string is determined to be 62157. Therefore, the third string including the second string is 11010162157543.
In the embodiment of the invention, the check bit can be calculated by other characters in the character to be coded, so that the check bit can be discarded in the actual storage process, the storage space occupied by the character string to be coded is further saved, and the utilization rate of the storage space is improved. The problem of when the authentication system stores a large amount of ID card numbers, can occupy a large amount of storage space, reduced the effective utilization ratio of storage space is solved.
Illustratively, as shown in fig. 10, when the character to be encoded is used to represent the identification number, the identification number is 110101199003075437, the preset date is 1820 year, 1 month and 1 day, the metering unit of the time difference is days, the corresponding scale of the fourth character string is decimal, the second preset encoding rule is decimal conversion to sixty-four scale, and the encoder acquires the identification number 110101199003075437, the first character string in the identification number is 19900307, and the other characters except the first character string are 110101 and 5437. Firstly, the encoder discards check bits in the identity card number 110101199003075437 to obtain the identity card number 11010119900307543 without the check bits (at this time, the first character string in the identity card number is 19900307, and the other characters except the first character string are 110101 and 543; then, the encoder determines that the time difference between the date (3 and 7 days in 1990) represented by the first character string and the preset date (1 and 1 day in 1820) is 62157 days, determines that the second character string is 62157; then, the encoder determines that the third character string containing the second character string is 11010162157543; then, the encoder performs reverse arrangement on the third character string 11010162157543, determines that the fifth character string is 345726101011. Finally, the encoder encodes the fifth character string 2615726101011 according to the second preset encoding rule, determines that the sixth character string is 1105126101011, thereby reducing the usage of the identity card number in terms of the storage space 520, and solving the problem of high storage utilization rate of the storage space of the identity card number.
The decoding method provided by the embodiment of the present invention is described below with reference to the schematic diagram of the encoding and decoding system shown in fig. 1, taking the decoding apparatus 20 as a decoder as an example.
As shown in fig. 11, the decoding method includes the following steps S21 and S22:
s21, the decoder acquires the character string to be decoded. Wherein, the character string to be decoded comprises an eighth character string used for representing the date at the specified position.
In the embodiment of the invention, when the character string to be decoded is the ID number and the ID number comprises check bits (namely the 18-bit ID number), the appointed position is the position except the first 6 bits and the last 4 bits of the ID number. When there is no check bit (i.e. 17-bit id number) in the string to be decoded, the designated position is a position other than the first 6 bits and the last 3 bits of the id number.
And S22, decoding the eighth character string by the decoder according to a first preset decoding rule to obtain a ninth character string. Wherein the length of the ninth character string is greater than the length of the eighth character string.
In the embodiment of the present invention, for the character string to be decoded that is encoded according to the encoding method provided in the embodiment of the present invention, the second character string with a length smaller than that of the first character string is obtained after the first character string is encoded. Therefore, in the actual storage process, the second character string is stored instead of the first character string, so that the occupied storage space is smaller, and the effective utilization rate of the storage space can be improved.
In one possible implementation, as shown in fig. 12 in conjunction with fig. 11, the step S22 can be specifically implemented by the step S220 and the step S221 described below.
S220, the decoder determines the appointed date according to the preset date and the date represented by the eighth character string.
In one embodiment, the decoder and the encoder have previously defined preset dates, and the preset dates are earlier than any one of the defined dates or later than any one of the defined dates. Therefore, the decoder, upon receiving the character string to be decoded transmitted from the encoder, can know whether the preset date plus the date represented by the eighth character string (equivalent to the time difference on the encoder side) is equal to the specified date (equivalent to the date represented by the first character string on the encoder side), or whether the preset date minus the date represented by the eighth character string is equal to the preset date.
Illustratively, when the preset date is earlier than any one of the specified dates, and the preset date is 1/1820, the unit of the date represented by the eighth string is the number of days, and the number of days 62157 of the date represented by the eighth string is determined, from the preset date and the date represented by the eighth string, the specified date is 3/7/1990. Alternatively, when the preset date is later than any one of the specified dates, and the preset date is 1990 3, 7, and the unit of the date represented by the eighth string is the number of days, and the number of days 62157 of the date represented by the eighth string is used, the specified date is 1820 year 1, and 1, from the preset date and the date represented by the eighth string. In the embodiment of the present invention, the measurement unit of the time difference in S220 is described in the same manner as the measurement unit of the date represented by the eighth character string in S120, and is not described herein again.
In the embodiment of the invention, the appointed date can be earlier than the preset date or later than the preset date. Therefore, whether the specified date is earlier than the preset date can be determined according to the rule agreed in advance, so that the obtained preset date is ensured to be the correct date.
S221, the decoder determines a ninth character string indicating the specified date.
Illustratively, when the preset date is 1820 year 1 month 1 day, the character string to be encoded is used to represent the identification number, the character string to be decoded includes a check digit, the identification number is 110101621575437, and the measurement unit of the date represented by the eighth character string is days, the eighth character string is 62157, and the date corresponding to 62157 days between 1820 year 1 month 1 day is determined to be 1990 year 3 month 7 days, that is, the ninth character string is 19907. Thus, the encoder determines the original string to be 110101199003075437.
In the embodiment of the invention, in order to obtain the original identification number, the decoder can determine the ninth character string for indicating the appointed date according to the eighth character string indicating the date in the character string to be decoded indicating the identification number and the preset date. Because the identification card number is coded according to the coding method provided by the embodiment of the invention, the actually transmitted identification card number is not the original identification card number, and the data security can be ensured to a certain extent.
In one possible implementation manner, as shown in fig. 13 in conjunction with fig. 11, the step S21 can be specifically implemented by the steps S210 and S211 described below.
S210, the decoder receives the coded character string.
S211, the decoder decodes the coded character string according to a second preset decoding rule and determines a character string to be decoded. Wherein, the length of the coded character string is less than that of the character string to be decoded.
In an embodiment of the present invention, the binary system corresponding to the encoded character string may be an octal system, a decimal system, a hexadecimal system, a thirty-two system, or a sixty-four system, and the second preset decoding rule may be a conversion from a high binary system to a low binary system, where the high binary system is a relatively low binary system, and when the high binary system is the sixty-four system, the high binary system may be the octal system, the decimal system, the hexadecimal system, or the thirty-two system; where the high is hexadecimal, that high may be octal or decimal.
Illustratively, when the coded character string corresponds to hexadecimal, the coded character string is 6423080b0f0d, and the second preset decoding rule is hexadecimal to decimal, the character string to be decoded is determined to be 110101621575437.
When the binary system corresponding to the coded character string is thirty-two, the coded character string is 344c40m3od, and the second preset decoding rule is that when the thirty-two is converted into decimal system, the character string to be decoded is 110101621575437.
In the embodiment of the invention, the encoder encodes the character string to be encoded according to the second preset encoding rule to obtain the character string to be decoded, and even if the character string to be decoded is leaked, the leaked character string to be decoded is not the original character string to be encoded, so that the safety of data transmission is ensured.
In one possible implementation manner, as shown in fig. 14 in conjunction with fig. 11, the step S21 can be specifically implemented by the steps S210 and S212 described below.
S210, the decoder receives the coded character string.
S212, the encoder carries out reverse order arrangement on the coded character strings and determines character strings to be decoded.
Illustratively, taking the example that the encoded character string represents the identification number, and the encoded character string is 734575126101011, the encoded character string is arranged in a reverse order, and the character string to be decoded is determined to be 110101621575437.
In the embodiment of the invention, in order to prevent the data accumulation phenomenon, the encoder performs reverse order arrangement on the target character string so as to obtain the character string to be decoded, so that the data can be uniformly distributed in the data interval as much as possible. When the character string to be decoded is the ID card number, even if the character string to be decoded leaks, the leaked ID card number is not the original ID card number, so that the safety of data transmission is ensured.
In one possible implementation manner, as shown in fig. 15 in conjunction with fig. 11, the step S21 described above can be specifically implemented by the steps S210, S213, and S214 described below.
S210, the decoder receives the coded character string.
S213, the decoder decodes the coded character string according to a second preset decoding rule to determine a first cross character string.
S214, the tenth character string is subjected to reverse description arrangement by a decoder, and the character string to be decoded is determined. Wherein the length of the encoded string is less than the length of the second string;
illustratively, taking the encoded character string as 520ooZi and the second predetermined encoding rule as sixty-four to decimal, the encoded character string 520ooZi is decoded according to the second predetermined decoding rule, and the cross character string is determined to be 34575126101011. And (4) arranging the first cross string 34575126101011 in a reverse order, and determining the character string to be decoded to be 11010162157543.
In the embodiment of the invention, the encoder encodes the character string to be encoded according to the second preset encoding rule and arranges the tenth character string in a reverse order, so that the character string to be encoded is obtained, and data can be uniformly distributed in the data interval as much as possible. Even if the character string to be decoded is leaked, the leaked character string to be decoded is not the original character string to be coded, so that the safety of data transmission is ensured.
In one possible implementation, as shown in fig. 16 in conjunction with fig. 11, the step S21 described above can be specifically implemented by the steps S210, S213, and S216 described below.
S210, the decoder receives the coded character string.
S215, the decoder carries out reverse order arrangement on the coded character strings and determines an eleventh character string.
S216, the decoder decodes the eleventh character string according to a second preset decoding rule and determines the character string to be decoded. And the length of the eleventh character string is less than that of the character string to be decoded.
Illustratively, taking the coded character string as 7vprc0e0a and the second preset coding rule as thirty-two binary conversion to decimal, the eleventh character string is determined as a0e0crpv7 according to the reverse order arrangement of the coded character string 7vprc0e0a. And decoding the eleventh character string a0e0crpv7 according to a second preset decoding rule, and determining the character string to be decoded to be 11010162157543.
In the embodiment of the invention, the encoder encodes the character string to be encoded according to a second preset encoding rule, and arranges the tenth character string in a reverse order, so as to obtain the character string to be decoded. Even if the character string to be decoded is leaked, the leaked character string to be decoded is not the original character string to be coded, so that the safety of data transmission is ensured.
In one possible implementation, the second preset decoding rule includes a conversion of the second bin into the first bin. Wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
In the embodiment of the present invention, the second preset decoding rule is similar to the description of the first binary system and the second binary system in the second preset encoding rule, and details are not repeated here.
In a possible implementation manner, the character string to be encoded further includes other characters except for the eighth character string, and when the other characters do not include the check bit, in this case, as shown in fig. 17 in conjunction with fig. 11, the encoding method provided in the embodiment of the present invention further includes S23, S24, and S25.
And S23, determining the twelfth character string by the decoder. Wherein the twelfth character string includes a ninth character string and other characters.
And S24, determining a check bit according to characters in the twelfth character string.
And S25, determining a thirteenth character string. Wherein the thirteenth string includes a twelfth string and a check bit.
In the embodiment of the invention, when the twelfth character string represents the identity card number without the check digit, the verification code rule is set as the identity card verification code rule. The identity card verification code rule meets the following conditions:
1. each of the 17-bit numbers of the identification number not including the check bit is multiplied by a different coefficient. Wherein, the coefficients from the first digit to the seventeenth digit are: 7. 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2.
Illustratively, when the identification number without check bits is 11010119900307543, from left to right, the coefficient of the first bit 1 is 7, the coefficient of the second bit 1 is 9, the coefficient of the third bit 0 is 10, the coefficient of the fourth bit 1 is 5, the coefficient of the fifth bit 0 is 8, the coefficient of the sixth bit 1 is 4, the coefficient of the seventh bit 1 is 2, the coefficient of the eighth bit 9 is 1, the coefficient of the ninth bit 9 is 6, the coefficient of the tenth bit 0 is 3, the coefficient of the eleventh bit 0 is 7, the coefficient of the twelfth bit 3 is 9, the coefficient of the thirteenth bit 0 is 10, the coefficient of the fourteenth bit 7 is 5, the coefficient of the fifteenth bit 5 is 8, the coefficient of the sixteenth bit 4 is 4, and the coefficient of the seventeenth bit 3 is 2.
2. The total number is determined by multiplying each of the 17 digits by the corresponding coefficient of the digit, and summing the product.
For example, when the identification number without check position is 11010119900307543, the total number is 1 × 7+1 × 9+0 × 10+1 × 5+0 × 8+1 × 4+1 × 2+9 × 1+9 × 6+0 × 3+0 × 7+3 × 9+0 × 10+7 × 5+ 4 × 4+3 × 2+ is equal to 214.
3. The sum of the total is divided by 11 to see what the remainder is.
For example, taking the total number as 214 as an example, the remainder is 5.
4. The check bit is 7 by querying the predetermined table according to the remainder. Wherein the preset table is shown in table 2.
TABLE 2
Remainder 0 1 2 3 4 5 6 7 8 9 10
Check bit 1 0 X 9 8 7 6 5 4 3 2
Therefore, when the identification number not containing the check bit is 11010119900307543, the original identification number is 110101199003075437.
In the embodiment of the invention, the encoder discards the check bit in the identity card number. Therefore, even if the identity card number without the check bit is leaked, the safety of data transmission is ensured because the leaked identity card number is not the original identity card number.
Illustratively, as shown in fig. 18, taking that an encoded character string is used to represent an identity card number without check bits, and the identity card number is 520ooZi, and a preset date is 1820 years, 1 month and 1 day, and a measurement unit of a date represented by an eighth character string is a number of days, and a corresponding system of the encoded character string is sixty-four system, and a second preset decoding rule is that sixty-four system is converted into decimal system, when the decoder acquires the encoded character string 520ooZi, the decoder firstly decodes the encoded character string 520ooZi according to the second preset decoding rule, and determines that the cross character string is 34575126101011. Then, the decoder performs reverse arrangement on the cross string 34575126101011, and determines that the string to be decoded is 11010162157543 (the eighth string represents 62157). Then, the decoder determines the specified date of 62157 days from the preset date (1820, 1), 1990, 3, 7 days, and 19900307. Then, the decoder determines the twelfth string as 11010119900307543. Finally, the decoder determines that the check bit of the twelfth character string is 7 according to the identity card check code rule and the twelfth character string 11010119900307543, and the identity card number with the check bit is 110101199003075437. The encoding method provided by the embodiment of the invention correspondingly encodes the original identity card number and generates the target character string for representing the original identity card number, even if the target character string is leaked, the leaked encoded identity card number is not the original identity card number, so that the safety of data transmission is ensured.
The above description mainly introduces the solutions provided by the embodiments of the present invention from the perspective of methods. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the invention is capable of being implemented as hardware or a combination of hardware and computer software in connection with the exemplary elements and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments of the present invention, the encoding apparatus or the decoding apparatus may be divided into functional modules according to the above method examples, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only one logic function division, and another division manner may be available in actual implementation.
Fig. 19 is a schematic structural diagram of an encoding apparatus 10 according to an embodiment of the present invention. The encoding device 10 is used for acquiring a character string to be encoded; and coding the first character string according to a first preset coding rule to determine a second character string. The encoding device 10 may include an acquisition unit 101 and a processing unit 102.
An obtaining unit 101 is configured to obtain a character string to be encoded. For example, in conjunction with fig. 3, the acquisition unit 101 may be configured to perform S11.
The processing unit 102 is configured to encode the first character string acquired by the acquiring unit 101 according to a first preset encoding rule to obtain a second character string. For example, in conjunction with fig. 3, processing unit 102 may be used to perform S12. In conjunction with fig. 4, processing unit 102 may be configured to perform S120 and S121. In connection with fig. 5, processing unit 102 may be configured to perform S14 and S15. In conjunction with fig. 6, processing unit 102 may be configured to perform S14 and S16. In connection with fig. 7, the processing unit 102 may be configured to perform S14, S16, and S17. In connection with fig. 8, processing unit 102 may be configured to perform S14, S15, and S18. In conjunction with fig. 9, the processing unit 102 may be configured to execute S19.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and the function thereof is not described herein again.
Of course, the encoding apparatus 10 provided in the embodiment of the present invention includes, but is not limited to, the above modules, for example, the encoding apparatus 10 may further include the storage unit 103. The storage unit 103 may be used to store the program code of the write encoding apparatus 10, and may also be used to store data generated by the write encoding apparatus 10 during operation, such as data in a write request.
Fig. 20 is a schematic structural diagram of an encoding apparatus 10 according to an embodiment of the present invention, and as shown in fig. 20, the encoding apparatus 10 may include: at least one processor 51, a memory 52, a communication interface 53 and a communication bus 54.
The following describes each component of the coding device 10 in detail with reference to fig. 20:
the processor 51 is a control center of the encoding apparatus 10, and may be a single processor or a collective term for a plurality of processing elements. For example, the processor 51 is a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention, such as: one or more DSPs, or one or more Field Programmable Gate Arrays (FPGAs).
In a particular implementation, processor 51 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 20, as one embodiment. Also, as an embodiment, the encoding apparatus 10 may include a plurality of processors, such as the processor 51 and the processor 55 shown in fig. 20. Each of these processors may be a Single-core processor (Single-CPU) or a Multi-core processor (Multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The Memory 52 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 52 may be self-contained and coupled to the processor 51 via a communication bus 54. The memory 52 may also be integrated with the processor 51.
In particular implementations, memory 52 is used to store data and software programs that implement the present invention. The processor 51 may perform various functions of the air conditioner by running or executing software programs stored in the memory 52 and calling data stored in the memory 52.
The communication interface 53 is a device such as any transceiver, and is used for communicating with other devices or communication Networks, such as a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), a terminal, and a cloud. The communication interface 53 may include a receiving unit implementing a receiving function and a transmitting unit implementing a transmitting function.
The communication bus 54 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 20, but that does not indicate only one bus or one type of bus.
As an example, in conjunction with fig. 19, the acquisition unit 101 in the encoding apparatus 10 implements the same function as the communication interface 53 in fig. 20, the processing unit 102 implements the same function as the processor 51 in fig. 20, and the storage unit 103 implements the same function as the memory 52 in fig. 20.
Another embodiment of the present invention further provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the method shown in the above method embodiment.
In some embodiments, the disclosed methods may be implemented as computer program instructions encoded on a computer-readable storage medium in a machine-readable format or encoded on other non-transitory media or articles of manufacture.
FIG. 21 schematically illustrates a conceptual partial view of a computer program product comprising a computer program for executing a computer process on a computing device provided by an embodiment of the invention.
In one embodiment, the computer program product is provided using a signal bearing medium 410. The signal bearing medium 410 may include one or more program instructions that, when executed by one or more processors, may provide the functions or portions of the functions described above with respect to fig. 3. Thus, for example, referring to the embodiment shown in fig. 3, one or more features of S11 and S12 may be undertaken by one or more instructions associated with the signal bearing medium 410. Further, the program instructions in FIG. 21 also describe example instructions.
In some examples, signal bearing medium 410 may include a computer readable medium 411, such as, but not limited to, a hard disk drive, a Compact Disc (CD), a Digital Video Disc (DVD), a digital tape, a memory, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In some implementations, the signal bearing medium 410 may comprise a computer recordable medium 412 such as, but not limited to, a memory, a read/write (R/W) CD, a R/W DVD, and the like.
In some implementations, the signal bearing medium 410 may include a communication medium 413, such as, but not limited to, a digital and/or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link, a wireless communication link, etc.).
The signal bearing medium 410 may be communicated by a wireless form of communication medium 413, such as a wireless communication medium conforming to the IEEE802.41 standard or other transmission protocol. The one or more program instructions may be, for example, computer-executable instructions or logic-implementing instructions.
In some examples, a data writing apparatus, such as that described with respect to fig. 21, may be configured to provide various operations, functions, or actions in response to one or more program instructions via the computer-readable medium 411, the computer-recordable medium 412, and/or the communication medium 413.
Fig. 22 is a schematic structural diagram of a decoding apparatus 20 according to an embodiment of the present invention. The decoding device 20 is used for acquiring a character string to be decoded; and decoding the eighth character string according to a first preset decoding rule to determine a ninth character string. The decoding apparatus 20 may include an acquisition unit 201 and a processing unit 202.
An obtaining unit 201, configured to obtain a string to be decoded. For example, in conjunction with fig. 11, the acquisition unit 201 may be configured to perform S21.
The processing unit 202 is configured to decode the eighth character string acquired by the acquiring unit 101 according to a first preset decoding rule to obtain a ninth character string. For example, in connection with fig. 11, processing unit 202 may be configured to perform S22. In connection with fig. 12, the processing unit 202 may be configured to perform S220 and S221. In connection with fig. 13, processing unit 202 may be configured to perform S210 and S211. In conjunction with fig. 14, the processing unit 202 may be configured to perform S210 and S212. In connection with fig. 15, the processing unit 202 may be configured to perform S210, S213, and S214. In connection with fig. 16, processing unit 202 may be configured to perform S210, S215, and S216. In connection with fig. 17, processing unit 202 may be configured to perform S23, S24, and S25.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and the function thereof is not described herein again.
Of course, the decoding apparatus 20 provided in the embodiment of the present invention includes, but is not limited to, the above modules, for example, the decoding apparatus 20 may further include the storage unit 203. The storage unit 203 may be used to store the program code of the write decoding apparatus 20, and may also be used to store data generated by the write decoding apparatus 20 during operation, such as data in a write request.
Fig. 23 is a schematic structural diagram of a decoding apparatus 20 according to an embodiment of the present invention, and as shown in fig. 23, the decoding apparatus 20 may include: at least one processor 61, a memory 62, a communication interface 63, and a communication bus 64.
The following specifically describes each component of the decoding apparatus 20 with reference to fig. 23:
the processor 61 is a control center of the decoding apparatus 20, and may be a single processor or a collective term for a plurality of processing elements. For example, the processor 61 is a Central Processing Unit (CPU), or may be an Application Specific Integrated Circuit (ASIC), or may be one or more Integrated circuits configured to implement embodiments of the present invention, such as: one or more DSPs, or one or more Field Programmable Gate Arrays (FPGAs).
In a particular implementation, processor 61 may include one or more CPUs, such as CPU0 and CPU1 shown in fig. 23, as one embodiment. Also, as an embodiment, the decoding apparatus 20 may include a plurality of processors, such as the processor 61 and the processor 65 shown in fig. 23. Each of these processors may be a Single-core processor (Single-CPU) or a Multi-core processor (Multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The Memory 62 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 62 may be self-contained and coupled to the processor 61 via a communication bus 64. The memory 62 may also be integrated with the processor 61.
In a particular implementation, the memory 62 is used to store data and software programs that implement the present invention. The processor 61 may perform various functions of the air conditioner by running or executing software programs stored in the memory 62 and calling data stored in the memory 62.
The communication interface 63 is a device such as any transceiver, and is used for communicating with other devices or communication Networks, such as a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), a terminal, and a cloud. The communication interface 63 may include a receiving unit implementing a receiving function and a transmitting unit implementing a transmitting function.
The communication bus 64 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 23, but it is not intended that there be only one bus or one type of bus.
As an example, in connection with fig. 22, the acquiring unit 201 in the decoding apparatus 20 implements the same function as the communication interface 63 in fig. 23, the processing unit 202 implements the same function as the processor 61 in fig. 23, and the storage unit 203 implements the same function as the memory 62 in fig. 23.
Another embodiment of the present invention further provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the method shown in the above method embodiment.
In some embodiments, the disclosed methods may be implemented as computer program instructions encoded on a computer-readable storage medium in a machine-readable format or encoded on other non-transitory media or articles of manufacture.
FIG. 24 schematically illustrates a conceptual partial view of a computer program product comprising a computer program for executing a computer process on a computing device provided by an embodiment of the invention.
In one embodiment, the computer program product is provided using a signal bearing medium 510. The signal bearing medium 510 may include one or more program instructions that, when executed by one or more processors, may provide the functions or portions of the functions described above with respect to fig. 10. Thus, for example, referring to the embodiment illustrated in fig. 11, one or more features of S21 and S22 may be undertaken by one or more instructions associated with the signal bearing medium 510. Further, the program instructions in FIG. 24 also describe example instructions.
In some examples, signal bearing medium 510 may comprise a computer readable medium 511, such as, but not limited to, a hard disk drive, a Compact Disc (CD), a Digital Video Disc (DVD), a digital tape, a memory, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In some embodiments, the signal bearing medium 510 may comprise a computer recordable medium 512 such as, but not limited to, a memory, a read/write (R/W) CD, a R/W DVD, and the like.
In some implementations, the signal bearing medium 510 may include a communication medium 513, such as, but not limited to, a digital and/or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link, a wireless communication link, etc.).
The signal bearing medium 510 may be conveyed by a wireless form of communication medium 513 (e.g., a wireless communication medium that complies with the IEEE802.41 standard or other transmission protocol). The one or more program instructions may be, for example, computer-executable instructions or logic-implementing instructions.
In some examples, a data writing device, such as that described with respect to fig. 24, may be configured to provide various operations, functions, or actions in response to one or more program instructions via the computer-readable medium 511, the computer-recordable medium 512, and/or the communication medium 513.
Through the description of the foregoing embodiments, it will be clear to those skilled in the art that, for convenience and simplicity of description, only the division of the functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the apparatus may be divided into different functional modules to complete all or part of the above described functions.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be essentially or partially contributed to by the prior art, or all or part of the technical solution may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (13)

1. A method of encoding, comprising:
acquiring a character string to be coded; the character string to be coded comprises a first character string used for representing a date, and the character string to be coded is used for representing an identification number;
coding the first character string according to a first preset coding rule to obtain a second character string; wherein the length of the second string is less than the length of the first string;
determining a third string; wherein the third character string includes the second character string and other characters except the first character string; discarding the check bits of the ID card number, and then performing reverse arrangement on the third character string to determine a fifth character string; coding the fifth character string according to a second preset coding rule, and determining a sixth character string; wherein the length of the sixth character string is smaller than the length of the fifth character string.
2. The encoding method according to claim 1, wherein said encoding the first character string according to a first predetermined encoding rule to obtain a second character string comprises:
calculating a time difference between a date represented by the first character string and a preset date;
a second string representing the time difference is determined.
3. The encoding method according to claim 1, wherein the second predetermined encoding rule is a first binary to second binary conversion; wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
4. A method of decoding, comprising:
receiving an encoded string; decoding the coded character string according to a second preset decoding rule to determine an eighth character string; carrying out reverse order arrangement on the eighth character string to determine a character string to be decoded; the length of the coded character string is smaller than that of the eighth character string, the character string to be decoded is used for representing an identity card number, and the character string to be decoded comprises a ninth character string which is used for representing a date at a specified position;
decoding the ninth character string according to a first preset decoding rule to obtain a first cross character string; wherein the length of the tenth string is greater than the length of the ninth string; determining a twelfth character string; wherein the twelfth character string includes a ninth character string and other characters; determining a check digit and a thirteenth character string according to characters in the twelfth character string; wherein the thirteenth string includes a twelfth string and a check bit.
5. The decoding method according to claim 4, wherein the decoding the eighth string according to the first preset decoding rule to obtain a ninth string comprises:
determining a designated date according to a preset date and the date represented by the eighth character string;
a ninth string representing the specified date is determined.
6. The decoding method according to claim 4, wherein the second preset decoding rule comprises a second bin to first bin conversion; wherein, for the character string representing the designated content, the length of the character string representing the designated content in the first binary system is larger than the length of the character string representing the designated content in the second binary system.
7. An encoding apparatus, comprising:
the acquiring unit is used for acquiring a character string to be coded; the character string to be coded comprises a first character string used for representing a date, and the character string to be coded is used for representing an identification number;
the processing unit is used for coding the first character string acquired by the acquisition unit according to a first preset coding rule to acquire a second character string; wherein the length of the second string is less than the length of the first string;
the processing unit is further configured to determine a third string; wherein the third character string includes the second character string and other characters except the first character string; discarding the check bits of the ID card number, and then performing reverse arrangement on the third character string to determine a fifth character string; coding the fifth character string according to a second preset coding rule, and determining a sixth character string; wherein the length of the sixth character string is smaller than the length of the fifth character string.
8. The encoding device according to claim 7, wherein the processing unit is specifically configured to calculate a time difference between a date represented by the first character string acquired by the acquisition unit and a preset date;
the processing unit is specifically configured to determine a second character string used for representing the time difference.
9. A decoding apparatus, comprising:
an acquisition unit for receiving an encoded character string;
the processing unit is used for decoding the coded character string according to a second preset decoding rule and determining an eighth character string; performing reverse arrangement on the eighth character string to determine a character string to be decoded; the length of the coded character string is smaller than that of the eighth character string, the character string to be decoded is used for representing an identity card number, and the character string to be decoded comprises a ninth character string which is used for representing a date at a specified position;
the processing unit is used for decoding the ninth character string acquired by the acquisition unit according to a first preset decoding rule to obtain a first cross character string; wherein the length of the tenth string is greater than the length of the ninth string; determining a twelfth character string; wherein the twelfth character string includes a ninth character string and other characters; determining a check digit and a thirteenth character string according to characters in the twelfth character string; wherein the thirteenth string includes a twelfth string and a check bit.
10. The decoding device according to claim 9, wherein the processing unit is specifically configured to determine a specified date according to a preset date and a date represented by the eighth string;
the processing unit is specifically configured to determine a ninth character string used for representing the specified date.
11. An encoding apparatus comprising a memory and a processor; the memory and the processor are coupled; the memory for storing computer program code, the computer program code comprising computer instructions; the encoding apparatus, when the processor executes the computer instructions, performs the encoding method of any one of claims 1-3.
12. A decoding apparatus, comprising: a memory and a processor; the memory and the processor are coupled; the memory for storing computer program code, the computer program code comprising computer instructions; the decoding apparatus performs the decoding method according to any one of claims 4 to 6 when the processor executes the computer instructions.
13. A computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the encoding method of any one of claims 1 to 3 or to perform the decoding method of any one of claims 4 to 6.
CN202010581656.2A 2020-06-23 2020-06-23 Encoding and decoding method and device and computer storage medium Active CN111669616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010581656.2A CN111669616B (en) 2020-06-23 2020-06-23 Encoding and decoding method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010581656.2A CN111669616B (en) 2020-06-23 2020-06-23 Encoding and decoding method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN111669616A CN111669616A (en) 2020-09-15
CN111669616B true CN111669616B (en) 2022-11-04

Family

ID=72389568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010581656.2A Active CN111669616B (en) 2020-06-23 2020-06-23 Encoding and decoding method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN111669616B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102194256A (en) * 2011-02-23 2011-09-21 上海博路信息技术有限公司 Ticketing system based on bar code and identity card detection
WO2012098543A2 (en) * 2011-01-18 2012-07-26 Fortress Gb Ltd. System and method for computerized negotiations based on coded integrity
CN104111932A (en) * 2013-04-17 2014-10-22 北京启明星辰信息技术股份有限公司 Recognition method and device of ID (identity) card numbers
CN104899520A (en) * 2015-06-08 2015-09-09 深圳市华傲数据技术有限公司 Masking and reverse masking methods of 15-digit identity card number
CN106357412A (en) * 2016-10-14 2017-01-25 国政通科技股份有限公司 Method, device and system for verifying identity information
WO2017179785A1 (en) * 2016-04-14 2017-10-19 (주)시옷 Method and system for authenticating electronic device
CN108154044A (en) * 2016-12-05 2018-06-12 广东精点数据科技股份有限公司 A kind of ID card No. desensitization method and device being combined based on random and displacement

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090738A (en) * 2014-06-09 2014-10-08 中国建设银行股份有限公司 Serial number conversion method and device
CN105656626B (en) * 2016-03-28 2018-10-19 陈剑辉 Reverse recombination encryption method
CN106126486B (en) * 2016-06-30 2019-03-08 童晓冲 Temporal information coding method, encoded radio search method, coding/decoding method and device
CN109359276A (en) * 2018-09-29 2019-02-19 上海中商网络股份有限公司 A kind of anti-fake code generating method, device, equipment and storage medium
CN110046331A (en) * 2019-03-20 2019-07-23 北京品友互动信息技术股份公司 Data-encoding scheme and device, storage medium, electronic device
CN112152631B (en) * 2019-06-28 2023-08-15 杭州海康威视数字技术股份有限公司 Method and device for encoding and decoding variable-length time string

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012098543A2 (en) * 2011-01-18 2012-07-26 Fortress Gb Ltd. System and method for computerized negotiations based on coded integrity
CN102194256A (en) * 2011-02-23 2011-09-21 上海博路信息技术有限公司 Ticketing system based on bar code and identity card detection
CN104111932A (en) * 2013-04-17 2014-10-22 北京启明星辰信息技术股份有限公司 Recognition method and device of ID (identity) card numbers
CN104899520A (en) * 2015-06-08 2015-09-09 深圳市华傲数据技术有限公司 Masking and reverse masking methods of 15-digit identity card number
WO2017179785A1 (en) * 2016-04-14 2017-10-19 (주)시옷 Method and system for authenticating electronic device
CN106357412A (en) * 2016-10-14 2017-01-25 国政通科技股份有限公司 Method, device and system for verifying identity information
CN108154044A (en) * 2016-12-05 2018-06-12 广东精点数据科技股份有限公司 A kind of ID card No. desensitization method and device being combined based on random and displacement

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《1857-2013-IEEE Standard for Adcanced Audio and video coding》;IEEE;《Data communication networks Character sets and informantion coding》;20130704;全文 *
《对公民身份证号编码的探讨及其应用研究》;郭晓军;《价值工程》;20071018(第10期);全文 *

Also Published As

Publication number Publication date
CN111669616A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN113676190A (en) Polar code encoding method and device
CN109981111A (en) A kind of method, apparatus and storage electronic equipment of data compression coding
CN105407356B (en) The real-time JPEG2000 coding/decoding methods of high speed
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
CN112333186A (en) Data communication method, device, equipment and storage medium
CN111669616B (en) Encoding and decoding method and device and computer storage medium
US9088297B2 (en) High throughput decoding of variable length data symbols
CN111815445A (en) Method and related device for reconstructing market data
CN111538923A (en) Information source determining method and device and electronic equipment
CN112152631B (en) Method and device for encoding and decoding variable-length time string
CN111866902B (en) Resource utilization rate evaluation method and device
CN110209598B (en) Cache memory, data read-write control method and system
CN112203322A (en) Statistical method and device for channel resource utilization rate
CN114422608B (en) Data transmission method, device and equipment
CN114490547A (en) Data compression method, device, equipment and medium
CN110401458B (en) Data check coding method and system
CN110348554B (en) Digital information encoding and decoding method and device, electronic equipment and storage medium
CN112820343A (en) Data protection method and device, computer equipment and storage medium
CN111384974B (en) Confidence quantization method, device and decoder for multi-system LDPC code
CN110990665B (en) Data processing method, device, system, electronic equipment and storage medium
CN111046416A (en) Big health data management platform based on block chain
CN116880778B (en) User privacy protection method based on regenerative coding and distributed storage
CN114338736B (en) Data transmission management system, method and computer device of Internet of things equipment
CN112702068B (en) Method, device, equipment and storage medium for processing coded data
CN116049032B (en) Data scheduling method, device and equipment based on ray tracing 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