CN115358361A - Garbage classification code generation method based on combined encryption - Google Patents

Garbage classification code generation method based on combined encryption Download PDF

Info

Publication number
CN115358361A
CN115358361A CN202210505409.3A CN202210505409A CN115358361A CN 115358361 A CN115358361 A CN 115358361A CN 202210505409 A CN202210505409 A CN 202210505409A CN 115358361 A CN115358361 A CN 115358361A
Authority
CN
China
Prior art keywords
binary
sequence
code
switch
identity
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.)
Withdrawn
Application number
CN202210505409.3A
Other languages
Chinese (zh)
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.)
Nantong Textile Vocational Technology College
Original Assignee
Nantong Textile Vocational Technology College
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 Nantong Textile Vocational Technology College filed Critical Nantong Textile Vocational Technology College
Priority to CN202210505409.3A priority Critical patent/CN115358361A/en
Publication of CN115358361A publication Critical patent/CN115358361A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a garbage classification two-dimensional code generation method based on combined encryption, which comprises the following steps: extracting an identity display code and a hidden code from the identity code of the garbage bag, and performing numerical data, binary conversion and integration operation to obtain an integrated binary sequence B; scrambling the binary sequence B by using a position change rule of the chaotic sequence Y obtained by chaotic mapping iteration before and after descending sorting; sequentially grouping the scrambled binary sequences in the forward direction by taking 4 elements as units, calculating a combination rule parameter k _ switch by using chaotic signals, and carrying out scrambling on the scrambled sequences according to the k _ switch adjusted in real time
Figure DDA0003635759360000011
Sequentially performing combination operation to generate garbage classification number, and combining to generate garbageAnd forming a garbage classification two-dimensional code. The method for generating the garbage classification two-dimensional code based on the combined encryption is simple and feasible, has strong safety and is not easy to crack, and the generated garbage classification code has uniqueness, safety and garbage classification guiding performance.

Description

Garbage classification code generation method based on combined encryption
Technical Field
The invention belongs to the technical field of garbage classification, and particularly relates to a garbage classification code generation method based on combined encryption.
Background
With the rapid development of economy and the acceleration of urbanization process, the annual output of domestic garbage in cities and towns in China currently exceeds billions of tons, which accounts for about 20% of the total garbage output in the world, and the domestic garbage is increased at a speed of 8% -9% every year, and many cities face a severe situation of 'surrounding garbage'. Meanwhile, the landfill sites in many places are saturated in places where the periphery of cities is buried without garbage. In the situation of increasing garbage yield and environmental deterioration, how to realize garbage resource utilization to the maximum extent, reduce garbage disposal amount and improve living environment quality through garbage classification management is one of the urgent problems commonly concerned by countries in the world at present. Domestic research and technical applications on the classification of domestic waste began in the end of the 80's 20 th century, with an initial focus on the end disposal of waste. In the later 90 s, the classification management of the household garbage gradually extends from the tail end treatment to the whole process direction, and develops from a single treatment mode to a comprehensive treatment system. Although the trash can is printed with labels of recyclable trash and non-recyclable trash, the trash can still be seen even on the road side until now, but the trash can still be classified and thrown into the trash only rarely. The root can be summarized into the following reasons: firstly, the method is lack of related law constraints, and has corresponding laws as supports compared with the implementation of garbage classification in foreign developed countries; secondly, economic stimulation and reward are lacked, garbage classification knowledge is lacked, the environment protection consciousness is insufficient, and the activity participation enthusiasm is not high; thirdly, various problems that the infrastructure of the garbage recycling station is too crude, the garbage recycling and transporting process is too extensive, the worries of residents about the exposure of personal private information of garbage bags are negative or even unwilling to participate and the like are gradually revealed, and obviously, the implementation of urban garbage classification in China faces many difficulties and challenges. In order to solve the above problems, it is urgent to develop a safe and reliable method for generating garbage classification codes, so as to ensure generation of garbage classification codes with "uniqueness, safety and garbage classification guidance" from the source, and promote effective development of garbage classification work.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to solve the defects in the prior art and provides a garbage classification code generation method based on combined encryptionBinary sequence
Figure BDA0003635759340000011
Sequentially and forwardly grouping by taking 4 elements as units, calculating a combination rule parameter k _ switch by using the chaotic signal, and carrying out sequence adjustment according to the k _ switch adjusted in real time
Figure BDA0003635759340000012
And sequentially carrying out combination operation to generate a garbage classification number, and further combining to generate a garbage classification two-dimensional code. The method for generating the garbage classification two-dimensional code based on the combined encryption is simple and feasible, has strong safety and is not easy to crack, and the generated garbage classification code has uniqueness, safety and garbage classification guiding performance.
The technical scheme is as follows: a garbage classification code generation method based on combined encryption comprises the following steps:
(1) Transcoding
Firstly, the identity information of a certain garbage bag is coded to generate a unique character type garbage bag identity code which is expressed as S 1 S 2 ...S k S k+1 S k+2 ...S k+L S k+L+1 S k+L+2 ...S k+L+p S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 In which S is 1 S 2 ...S k Is a city area, S k+1 S k+2 ...S k+L To a specific residential address, S k+L+1 S k+L+2 ...S k+L+p For contacts and contact phones, S k+L+p+1 S k+L+p+2 ...S k+L+p+n To code date, S k+L+p+n+1 S k+L+p+n+2 The color information of garbage classification is separated by English space characters,
then, an identity display code S is extracted from the identity code of the garbage bag 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+ n S k+L+p+n+1 S k+L+p+n+2 And identity hiding code S k+1 S k+2 ...S k+L S k+L+1 S k+L+2 ...S k+L+p And converting the ID display code into numerical data one by one to obtain corresponding numerical sequence
Figure BDA0003635759340000021
Simultaneously, the identity hidden codes are converted into numerical data one by one to obtain corresponding numerical sequences
Figure BDA0003635759340000022
Finally, the element P2 in the numerical sequence P2 i Converting the binary sequences PB { i } into 8-bit binary sequences PB { i } one by one, and integrating the binary sequences PB { i } to obtain an integrated binary sequence
Figure BDA0003635759340000023
Figure BDA0003635759340000024
Wherein
Figure BDA0003635759340000025
The identity code of the garbage bag is a Chinese character coded by double bytes in a GB2312 character set and an ASCLL code value E [32,126 ∈ ]]The length of the identity code of the garbage bag is k + L + P + n +6, and the length of the numerical sequence P1 is
Figure BDA0003635759340000026
And is
Figure BDA0003635759340000027
The length of the numerical sequence P2 is
Figure BDA0003635759340000028
And is
Figure BDA0003635759340000029
The length of the integrated binary sequence B is
Figure BDA00036357593400000210
(2) Scrambling of binary sequence B
Firstly, an initial value x of Logistic chaotic mapping is respectively calculated and obtained by utilizing a binary sequence B converted from a numerical sequence P1 and a numerical sequence P2, and external keys alpha and beta according to the following formulas (1) to (4) 1 A parameter mu, an extraction start position m, and an extraction interval number n,
Figure BDA00036357593400000211
x is then 1 =α+mod(α-SP,1-α), (1)
μ=β+mod(β+SP,4-β), (2)
Figure BDA00036357593400000212
n=13+mod(m,47), (4)
Wherein the content of the first and second substances,
Figure BDA00036357593400000213
representing the number of binary bits '1' contained in the binary sequence B,
Figure BDA00036357593400000214
representing the number of binary bits '0' in the binary sequence B, function
Figure BDA00036357593400000215
Expressed as not more than (-alpha + beta + SP). Times.10 15 The external key satisfies a ∈ (0,1), β ∈ (3.57,4),
then, the initial value x mapped by chaos 1 And a parameter mu, iterating the Logistic chaotic mapping shown in the following formula (5), wherein k represents iteration times and x k+1 Represents the chaotic signal obtained by the k-th iteration,
Figure BDA0003635759340000031
x k+1 =μ·x k ·(1-x k ) (5)
obtaining a chaotic signal sequence
Figure BDA0003635759340000032
Taking 1 element from the m-th element in the sequence X at intervals of n elements in sequence to form the length of the m-th element
Figure BDA0003635759340000033
Of the chaotic signal sequence
Figure BDA0003635759340000034
Finally, the chaotic signal sequence Y is sorted in a descending order, and the binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain a scrambled binary sequence
Figure BDA0003635759340000035
(3) Binary sequence
Figure BDA0003635759340000036
Combined encryption of
First, a binary sequence is divided into
Figure BDA0003635759340000037
The middle elements are sequentially and positively grouped by taking 4 elements as a unit from head to tail to obtain a grouped binary sequence which is expressed as
Figure BDA0003635759340000038
And is
Figure BDA0003635759340000039
Figure BDA00036357593400000310
Wherein
Figure BDA00036357593400000311
Then, each binary packet sequence BF { j } is sequentially subjected to the following combination operations:
s0: let j =1 and, if the number of the segments is greater than the threshold,
Figure BDA00036357593400000312
and combining the rule parameters
Figure BDA00036357593400000313
S1: the value of the parameter k _ switch is judged,
if k _ switch =0, a binary "1011" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357593400000314
If k _ switch =1, a binary "1100" is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357593400000315
If k _ switch =2, a binary '0' is added after the 2 nd bit of the binary packet sequence BF { j } and a binary '110' is added at the head end, denoted as
Figure BDA00036357593400000316
If k _ switch =3, a binary '0' is added after the 3 rd bit of the binary packet sequence BF { j } and a binary '110' is added at the head end, denoted as
Figure BDA00036357593400000317
If k _ switch =4, a binary '0' is added to the tail end and a binary '110' is added to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357593400000318
If k _ switch =5, the binary "00" is added after the 1 st bit and the binary "11" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357593400000319
If k _ switch =6, the binary "00" is added after the 2 nd bit and the binary "11" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000041
If k _ switch =7, a binary "1110" is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000042
If k _ switch =8, the binary packet sequence BF { j } is flipped front and back and a binary "1011" is added at its head end, denoted as
Figure BDA0003635759340000043
If k _ switch =9, the binary packet sequence BF { j } is flipped front and back and a binary "1100" is appended to its head end, denoted as
Figure BDA0003635759340000044
If k _ switch =10, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 2 nd bit and a binary '110' at the head end, denoted as
Figure BDA0003635759340000045
If k _ switch =11, the binary packet sequence BF { j } is flipped front-to-back and is added with a binary '0' after its 3 rd bit and a binary '110' at the head end, denoted as
Figure BDA0003635759340000046
If k _ switch =12, the binary packet sequence BF { j } is flipped front and back and is appended with a binary '0' at its tail end and a binary '110' at the head end, denoted as
Figure BDA0003635759340000047
If k _ switch =13, the binary packet sequence BF { j } is flipped front and back and the 1 st bit thereof is followed by a binary "00" and the head end is followed by a binary "11", denoted as
Figure BDA0003635759340000048
If k _ switch =14, the binary packet sequence BF { j } is flipped front and back and added with the binary "00" after its 2 nd bit and the binary "11" at the head end, denoted as
Figure BDA0003635759340000049
If k _ switch =15, the binary packet sequence BF { j } is flipped front and back and a binary "1110" is added at its head end, denoted as
Figure BDA00036357593400000410
S2: combining the binary into a sequence using a bin2dec () function
Figure BDA00036357593400000411
Conversion into numerical data
Figure BDA00036357593400000412
And updates the chaotic signal
Figure BDA00036357593400000413
Meanwhile, carrying out single iteration according to Logistic chaotic mapping shown in formula (5) to obtain z j+1 Calculating the parameters
Figure BDA00036357593400000414
Let j = j +1, then judge the size of j, if
Figure BDA00036357593400000415
Then step S1 is carried out, otherwise step S3 is carried out,
s3: ending the combining operation of the binary grouped sequence to obtain a binary combined sequence represented as
Figure BDA00036357593400000416
And a sequence of values
Figure BDA00036357593400000417
Figure BDA00036357593400000418
(4) Transcoding
Sequence of values
Figure BDA0003635759340000051
Converting the Chinese elements into Chinese characters to obtain a character sequence
Figure BDA0003635759340000052
I.e. the garbage classification number, wherein the length of the character sequence C is
Figure BDA0003635759340000053
And displays the identity of the garbage bag with a code (S) 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 ) And combining the Code with the garbage classification number to generate a garbage classification Code, and then generating a QR Code, namely a garbage classification two-dimensional Code.
Further, the step (1) of converting the identity display code into numerical data one by one in the method for generating the garbage classification code based on the combined encryption means that the identity display code adopts a unicode2native () function to belong the ASCII code value to [32,126 [ ], one by one]Converts the visible characters into single numerical data, or double-byte codes in GB2312 character setConverting the Chinese characters into two numerical data to obtain corresponding numerical sequence
Figure BDA0003635759340000054
Further, the step (1) of converting the identity hiding code into numerical data one by one in the garbage classification code generation method based on the combined encryption means that the identity hiding code adopts a unicode2native () function to belong the ASCII code value to [32,126 ]]Converting the visible characters into single numerical data, or converting the double-byte coded Chinese characters in GB2312 character set into two numerical data, thereby obtaining corresponding numerical sequences
Figure BDA0003635759340000055
Furthermore, in the method for generating the garbage classification code based on the combined encryption, the element P2 in the numerical value sequence P2 is generated in the step (1) i The conversion into the binary sequence PB { i } of 8 bits one by one means that dec2bin (P2) is adopted i 8) function P2 i Elements > 128 are converted into an 8-bit binary sequence PB { i }; using dec2bin (P2) i 7) function of P2 i The element < 128 is converted to a 7-bit binary sequence PB { i } and the end of PB { i } is added with binary '1', i.e. PB { i } = [ PB { i }, '1']。
Further, the method for generating the garbage classification code based on the combination encryption comprises the step (4) of sequencing the numerical values
Figure BDA0003635759340000056
Conversion of Chinese elements into Chinese characters, meaning a sequence of numerical values
Figure BDA0003635759340000057
Two adjacent elements in the group of 1 adopt native2unicode (·) functions in sequence, namely
Figure BDA0003635759340000058
Obtaining Chinese character sequence
Figure BDA0003635759340000059
Further, the garbage bag identity display code (S) in the step (4) of the garbage classification code generation method based on combined encryption 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 ) The garbage classification code is generated by combining the garbage classification number and a garbage bag identity display code, which is expressed as the combination mode of inserting and connecting the garbage bag identity display code and the garbage classification number
Figure BDA00036357593400000510
Wherein S 1 S 2 ...S k 、S k+L+p+1 S k+L+p+2 ...S k+L+p+n
Figure BDA00036357593400000511
And S k+L+p+n+1 S k+L+p+n+2 The English spaces are mutually spaced.
Has the advantages that: the method calculates the initial value and parameter, the extraction starting position and the extraction interval of the chaotic system by relying on the identity display code and the hidden code, generates a chaotic signal sequence by utilizing chaotic mapping, scrambles a binary sequence B formed by converting the hidden code of the identity of the garbage bag and binary integration, and scrambles the scrambled binary sequence B
Figure BDA00036357593400000512
Sequentially and forwardly grouping by taking 4 elements as units, calculating a combination rule parameter k _ switch by using the chaotic signal, and carrying out sequence adjustment according to the k _ switch adjusted in real time
Figure BDA00036357593400000513
And sequentially carrying out combination operation so as to generate a garbage classification number, and further combining to generate a garbage classification two-dimensional code. The method for generating the garbage classification two-dimensional code based on the combined encryption is simple and feasible, has strong safety and is not easy to crack, and the generated garbage classification code has uniqueness, safety and garbage classification guiding performance.
Drawings
FIG. 1 is a schematic diagram illustrating a garbage classification code generation process based on combinatorial encryption according to the present invention;
fig. 2 is a schematic diagram of a garbage classification two-dimensional code of the present invention, which includes a "recyclable" blue background mark in the middle.
Detailed Description
As shown in fig. 1, a method for generating a garbage classification code based on combined encryption includes the following steps:
(1) Transcoding
Firstly, the identity information of a certain garbage bag is coded to generate a unique character type garbage bag identity code which is expressed as S 1 S 2 ...S k S k+1 S k+2 ...S k+L S k+L+1 S k+L+2 ...S k+L+p S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 In which S is 1 S 2 ...S k Is a city area, S k+1 S k+2 ...S k+L To a specific residential address, S k+L+1 S k+L+2 ...S k+L+p For contacts and contact phones, S k+L+p+1 S k+L+p+2 ...S k+L+p+n To code date, S k+L+p+n+1 S k+L+p+n+2 The color information of garbage classification is separated by English space characters,
then, an identity display code S is extracted from the identity code of the garbage bag 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+ n S k+L+p+n+1 S k+L+p+n+2 And identity hiding code S k+1 S k+2 ...S k+L S k+L+1 S k+L+2 ...S k+L+p And the identity display code is subjected to character-by-character adoption of unicode2native () function to belong the ASCII code value to 32,126]Converting the visible characters into single numerical data, or converting the double-byte coded Chinese characters in GB2312 character set into two numerical data to obtain corresponding numerical sequences
Figure BDA0003635759340000061
Simultaneously, the identity hiding code adopts unicode2native () function to lead the ASCII code value to belong to 32,126]Converting the visible characters into single numerical data, or converting double-byte coded Chinese characters in GB2312 character set into two numerical data to obtain corresponding numerical sequence
Figure BDA0003635759340000062
Finally, dec2bin (P2) is used i 8) function of P2 i Elements > 128 are converted into an 8-bit binary sequence PB { i }, or dec2bin (P2 bin) is used i 7) function of P2 i The element < 128 is converted to a 7-bit binary sequence PB { i } and the end of PB { i } is added with binary '1', i.e. PB { i } = [ PB { i }, '1']And integrating the binary sequence PB { i } to obtain an integrated binary sequence
Figure BDA0003635759340000063
Wherein
Figure BDA0003635759340000064
The identity code of the garbage bag is a Chinese character coded by double bytes in a GB2312 character set and an ASCLL code value E [32,126 ∈ ]]The length of the identity code of the garbage bag is k + L + P + n +6, and the length of the numerical sequence P1 is
Figure BDA0003635759340000065
And is
Figure BDA0003635759340000066
The length of the numerical sequence P2 is
Figure BDA0003635759340000067
And is
Figure BDA0003635759340000068
The length of the integrated binary sequence B is
Figure BDA0003635759340000071
(2) Scrambling of binary sequence B
Firstly, an initial value x of Logistic chaotic mapping is respectively calculated and obtained by utilizing a binary sequence B converted from a numerical sequence P1 and a numerical sequence P2, and external keys alpha and beta according to the following formula 1 A parameter mu, an extraction start position m, and an extraction interval number n, such that
Figure BDA0003635759340000072
X is then 1 =α+mod(α-SP,1-α),
μ=β+mod(β+SP,4-β),
Figure BDA0003635759340000073
n=13+mod(m,47),
Wherein the content of the first and second substances,
Figure BDA0003635759340000074
represents the number of binary bits '1' contained in the binary sequence B,
Figure BDA0003635759340000075
representing the number of binary bits '0' in the binary sequence B, function
Figure BDA0003635759340000076
Expressed as not more than (-alpha + beta + SP). Times.10 15 The external key satisfies a ∈ (0,1), β ∈ (3.57,4),
then, the initial value x mapped by chaos 1 And a parameter mu, iterating the Logistic chaotic mapping shown in the following formula, wherein k represents iteration times and x k+1 Represents the chaotic signal obtained by the k-th iteration,
Figure BDA0003635759340000077
x k+1 =μ×x k ×(1-x k )
obtaining a chaotic signal sequence
Figure BDA0003635759340000078
Taking 1 element from the m-th element in the sequence X at intervals of n elements in sequence to form the length of the m-th element
Figure BDA0003635759340000079
Of the chaotic signal sequence
Figure BDA00036357593400000710
Finally, the chaotic signal sequence Y is sorted in a descending order, and the binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain a scrambled binary sequence
Figure BDA00036357593400000711
(3) Binary sequence
Figure BDA00036357593400000712
Combined encryption of
First, a binary sequence is divided into
Figure BDA00036357593400000713
The middle elements are sequentially grouped by taking 4 elements as a unit in the forward direction from the head to the tail to obtain a grouped binary sequence which is expressed as
Figure BDA00036357593400000714
And is
Figure BDA00036357593400000715
Figure BDA00036357593400000716
Wherein
Figure BDA00036357593400000717
Then, each binary packet sequence BF { j } is sequentially subjected to the following combination operations:
s0: let j =1 and, if the number of the segments is greater than the threshold,
Figure BDA00036357593400000718
and combining the rule parameters
Figure BDA00036357593400000719
S1: the value of the parameter k _ switch is judged,
if k _ switch =0, a binary "1011" is added to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000081
If k _ switch =1, a binary "1100" is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000082
If k _ switch =2, a binary '0' is added after the 2 nd bit of the binary packet sequence BF { j } and a binary '110' is added at the head end, denoted as
Figure BDA0003635759340000083
If k _ switch =3, a binary '0' is added after the 3 rd bit of the binary packet sequence BF { j } and a binary '110' is added at the head end, denoted as
Figure BDA0003635759340000084
If k _ switch =4, a binary '0' is added to the tail end and a binary '110' is added to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000085
If k _ switch =5, the binary "00" is added after the 1 st bit and the binary "11" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000086
If k _ switch =6, the binary "00" is added after the 2 nd bit and the binary "11" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000087
If k _ switch =7, a binary "1110" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635759340000088
If k _ switch =8, the binary packet sequence BF { j } is flipped front-to-back and a binary "1011" is added at its head end, denoted as
Figure BDA0003635759340000089
If k _ switch =9, the binary packet sequence BF { j } is flipped front and back and a binary "1100" is appended to its head end, denoted as
Figure BDA00036357593400000810
If k _ switch =10, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 2 nd bit and a binary '110' at the head end, denoted as
Figure BDA00036357593400000811
If k _ switch =11, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 3 rd bit and a binary '110' at the head end, denoted as
Figure BDA00036357593400000812
If k _ switch =12, the binary packet sequence BF { j } is flipped front and back and is appended with a binary '0' at its tail end and a binary '110' at the head end, denoted as
Figure BDA00036357593400000813
If k _ switch =13, the binary packet sequence BF { j } is flipped front-to-back and the 1 st bit thereof is appended with a binary "00" and the head end is appended with a binary "11", denoted as
Figure BDA00036357593400000814
If k _ switch =14, the binary packet sequence BF { j } is flipped front-to-back and is added with a binary "00" after its 2 nd bit and a binary "11" at the head end, denoted as
Figure BDA0003635759340000091
If k _ switch =15, the binary packet sequence BF { j } is flipped front-to-back and a binary "1110" is appended to its head end, denoted as k _ switch =15
Figure BDA0003635759340000092
S2: combining the binary into a sequence using a bin2dec () function
Figure BDA0003635759340000093
Conversion into numerical data
Figure BDA0003635759340000094
And updates the chaotic signal
Figure BDA0003635759340000095
Meanwhile, carrying out single iteration according to Logistic chaotic mapping shown in formula (5) to obtain z j+1 Calculating the parameters
Figure BDA0003635759340000096
Let j = j +1, then judge the size of j, if
Figure BDA0003635759340000097
Go to step S1, otherwise go toIn a step S3, the step of the method is that,
s3: the combining operation of the binary grouped sequence is ended, thereby obtaining a binary combined sequence which is expressed as
Figure BDA0003635759340000098
And a sequence of values
Figure BDA0003635759340000099
Figure BDA00036357593400000910
(4) Transcoding
Sequence of values
Figure BDA00036357593400000911
Two adjacent elements in the group of 1 adopt native2unicode (·) functions in sequence, namely
Figure BDA00036357593400000912
Obtaining Chinese character sequence
Figure BDA00036357593400000913
I.e. the garbage classification number, wherein the length of the character sequence C is
Figure BDA00036357593400000914
And displays the identity of the garbage bag with a code (S) 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 ) Combined with garbage classification number and expressed as
Figure BDA00036357593400000915
Wherein S 1 S 2 ...S k 、S k+L+p+1 S k+L+p+2 ...S k+L+p+n
Figure BDA00036357593400000916
And S k+L+p+n+1 S k+L+p+n+2 Are mutually spaced by English blank space, thereby generating garbage classification code, and thenAnd generating QR Code, namely the two-dimensional Code of the garbage classification.
The invention is further illustrated by the following specific examples:
example 1
According to the method for generating the garbage classification code based on the combined encryption, the steps are as follows:
(1) Transcoding
Firstly, encoding the identity information of a certain garbage bag to generate a unique character type garbage bag identity code, namely 'south China city-12 #1 # 01 plum strong 123456789 # 2022-01-01' in Jiangsu province-Nantong city-Hamen region, wherein the length is k + L + p + n +6 + 11+13+14+10+6=54 ', wherein' Jiangsu province-Nantong city-Chongchuan city 'is a province region,' south China city-12 #1 '01' is a specific living address, 'plum strong 123456789' is a contact and a contact phone, '2022-01-01' is a code making month, and '01' is garbage classification color information (for example, blue recoverable garbage);
then, respectively extracting an identity display code (2022-01-01) and an identity hiding code (Zhongnan city-12 # -1 # -01 li: "strong 123456789 ″) from the garbage bag identity codes, converting the identity display code into numerical data one by adopting a unicode2native () function to obtain a corresponding numerical sequence P1= {189,173,203,213,202,161,45,196,207,205,168,202,208,45,186,163,195,197,199,248,32,50,48,50,50,45,48,49,45,48,49,32,48,49}, and simultaneously converting the identity hiding code into the numerical data one by adopting a unicode2native () function to obtain a corresponding numerical sequence P2= {214,208,196,207,202,192,42,179,199,45,49,50,35,49,42,48,49,32,192,238,42,199,191,49,50,51,52,53,54,55,56,57,42,42}, wherein the length of the numerical sequence P1 is 214,208,196,207,202,192,42,179,199,45,49,50,35,49,42,48,49,32,192,238,42,199,191,49,50,51,52,53,54,55,56,57,42,42}, and the length of the numerical sequence P1 is
Figure BDA0003635759340000101
The length of the numerical sequence P2 is
Figure BDA0003635759340000102
Finally, the element P2 in the numerical sequence P2 i One by one into an 8-bit binary sequence PB { i }, and taking the binary sequence PB { i } into the sequenceRow integration, resulting in an integrated binary sequence B = { B = { (B) } 1 ,B 2 ,...,B 271 ,B 272 }={1,1,0,1,0,1,1,0,1,1,0,1,0,0,0,0,1,1,0,0,0,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,0,1,1,0,0,1,1,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,1,1,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,1,1,1,0,0,1,0,1,0,1,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,1,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0,1,1,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,1,0,1,0,1,1,0,1,1,1,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1};
(2) Scrambling of binary sequence B
Firstly, an initial value x of the Logistic chaotic map is calculated and obtained by using a binary sequence B converted from a numerical sequence P1 and a numerical sequence P2, and external keys alpha =0.12345 and beta =3.75 according to the following formulas 1 A parameter mu, an extraction start position m, and an extraction interval number n,
order to
Figure BDA0003635759340000103
Then
x 1 =0.12345+mod(0.12345-0.449272815743945,1-0.12345)=0.674177184256056,
μ=3.75+mod(3.75+0.449272815743945,0.25)=3.949272815743944,
Figure BDA0003635759340000104
n=13+mod(673,47)=28,
Then, the initial value x mapped by chaos 1 And a parameter mu, iterating the Logistic chaotic mapping shown in the following formula, wherein k represents iteration times and x k+1 Represents the chaotic signal obtained from the k iteration, k =1,2,. +, 452+15 × (249)
x k+1 =μ×x k ×(1-x k )
Obtaining a chaotic signal sequence X = { X = 1 ,x 2 ,...,x 8262 And 1 element is taken out of 28 elements in sequence from 673 th element in the sequence X to form a chaotic signal sequence Y with the length of 272 = { Y = 1 ,Y 2 ,...,Y 271 ,Y 272 },
Finally, the chaotic signal sequence Y is sorted in a descending order, and the binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain a scrambled binary sequence
Figure BDA0003635759340000111
Figure BDA0003635759340000112
(3) Binary sequence
Figure BDA0003635759340000113
Combined encryption of
First, the scrambled binary sequence is decoded
Figure BDA0003635759340000114
The middle elements are sequentially grouped by taking 4 elements as a unit in the forward direction from the head to the tail, so that a grouped binary sequence is obtained, and BF {1} = {1,0,0,0}, BF {2} = {0,0,0,0},. Rightwards, BF {33} = {1,1,1,1}, BF {34} = {0,1,1,0},. Rightwards, BF {67} = {1,0,1,0}, BF {68} = {1,1,1,1}, and BF {68}, wherein the number of the elements is equal to the number of the elements in the sequence, and the sequence is a binary sequence after being grouped, and BF {1} = {1,0,0,0},. 3242 },. 4},. 1,0,1,0, and BF {68},
then, each binary grouping sequence BF { i } is recombined in sequence, so as to obtain a recombined binary grouping sequence
Figure BDA0003635759340000115
Figure BDA0003635759340000116
And a sequence of values
Figure BDA0003635759340000117
(4) Transcoding
Sequence of values
Figure BDA0003635759340000118
Converted into Chinese character characters to obtain garbage classification Code 'Lin Rong Nang Ming Yi's huge payment concubine of an emperor ruing tear Mi carving treatment tra Ying an Teng extend protection, and adopts insertion connection combination mode for garbage bag identity display Code (Jiangsu province-Nantong city-Haimen district 2022-01-01) and garbage classification Code, the generation of the garbage classification Code is "Jiangsu province-Nantong city-Haimen area 2022-01-01 Lin Rong Nana can be as Yi Pan payment concubine of an emperor lucky tear Mi carving treatment tra Ying extend protection Bi Rong coma 01", then the generation of QR Code, namely the garbage classification two-dimensional Code, is shown in fig. 2.
Example 2
According to the method for generating the garbage classification code based on the combined encryption, the steps of generating the identity hidden code, the external secret key and the garbage classification two-dimensional code of a certain garbage bag are similar to those of the specific embodiment 1, and only the information of provincial and urban areas or code making year, month and day in the identity display code of a certain garbage bag is slightly changed: "Gong Su Sheng-Nantong city-Haimen region 2022-01-01"; or "Jiangsu province-Nantong city-Hai Di 2022-01-01"; or "jiangsu province-south city-haimen region 2022-01-11", the generation result of the garbage classification (two-dimensional) code is shown in table 1. As can be seen from the following table: the garbage classification number of the garbage bag can be greatly changed due to slight change of the identity display code (provincial and urban areas or code making year, month and day) in the garbage bag identity code, so that the garbage classification code generation method based on combined encryption disclosed by the patent has sensitivity to the information of the provincial and urban areas and the code making year, month and day in the garbage bag identity display code.
Table 1 generation result of two-dimensional code for garbage classification when information of provincial and urban areas or code-making year, month and day in display code of garbage bag identity is slightly changed
Figure BDA0003635759340000121
Example 3
According to the garbage classification code generation method based on the combined encryption, the steps of generating the identity hidden code, the external key and the garbage classification two-dimensional code of a certain garbage bag are similar to those of the specific embodiments 1 and 2, and only the color of the garbage bag is changed in the garbage bag identity code ("south Shih-12 Shih-01 Shih 123456789 × 2022-01-01" in the south world-Nantong city-Haima region of Jiangsu province), or "worker Su Sheng-south Tong city-Haimah region" south Shih-12 Shih 1 Shih-01 Shih 123456789 × 2022-01-01", or" south Shih-Nantong city-south China Hai region "south Shih 1 Shih 01 Shih 456789 &" Shih-20201 Shih-01 Shih garbage bag ": "02"; or "03"; or "04", and the generation result of the two-dimensional code for garbage classification is shown in table 2. The following table shows that the garbage classification two-dimensional code is changed greatly due to slight change of the garbage classification color information in the garbage bag identity code, and therefore, the garbage classification code generation method based on combined encryption has sensitivity to the garbage classification color information in the garbage bag identity information.
Table 2 generation result of two-dimensional code for garbage classification when garbage classification color information is changed slightly
Figure BDA0003635759340000131
Figure BDA0003635759340000141
Figure BDA0003635759340000151
Example 4
According to the garbage classification code generation method based on the combined encryption, the steps of generating the identity display code, the external key and the garbage classification two-dimensional code of a certain garbage bag are similar to those of the specific embodiments 1 and 2, and only the original garbage bag is hidden in the garbage bag identity code ("south world-12 #1 # 01 # plum 123456789 ″ -2022-01-01 ″), or" industrial Su Sheng-south china-haimen region "south world-12 #1 # plum 01 # 456789 ″ -2022-01-01 ″, or" south world-south city-south china-haimen region "south world-12 #1 # plum 01 # 456789 ″ -20201 # garbage bag identity information (" south world-12 # 456789 "# -01 # garbage bag": "Zhong Na shi cheng-12 #1 xi 01 li qiang 123456789"; or "central south city-12 #1 # 81 plum strong 123456789"; or "Zhongnan city-12 # -1 # 01 li qiang 123450789", the generation results of the two-dimensional code for garbage classification are shown in Table 3. As can be seen from the following table, a garbage classification two-dimensional code is greatly changed due to slight changes of an identity hidden code in a garbage bag identity code, and therefore, it can be seen that the garbage classification code generation method based on combined encryption provided by the patent has sensitivity to a hidden part (i.e., a garbage bag identity hidden code) in garbage bag identity information.
Table 3 generation result of two-dimensional code for garbage classification when garbage bag identity hidden code is changed slightly
Figure BDA0003635759340000161
Figure BDA0003635759340000171
Figure BDA0003635759340000181
Example 5
According to the method for generating garbage classification codes based on combined encryption, the identity codes (identity display codes and hidden codes) of certain garbage bags and the generation steps of the garbage classification two-dimensional codes thereof are similar to those of the specific embodiments 1 and 2, and only a single garbage bag identity code ("south Shi-12 Shi 01 Shi 1 Shi 01 Shi 123456789" in south China-Hai Men area of Jiangsu province, or "worker Su Sheng-south China-Hai Ming district south Shi-12 Shi 1 Shi 01 Shi 123456789" 2022-01-01 "or" south Shi-south China-Hai City-Hai district south China "Shi-12 Shi 1 Shi 01 Shi 456789" or "south Shi-south China Shi 1 Shi 01 Shi 456789" in south China: α =0.123450000000001; or β =3.750000000000001, and the result of generating the garbage classification code is shown in table 4. As can be seen from the following table: once the external key changes slightly, namely, the external key is lost in milli-centimetres, the generated two-dimensional code for garbage classification is 'bad in kilo-miles', and therefore it can be seen that the method for generating the garbage classification code based on the combined encryption provided by the patent has the key sensitivity.
TABLE 4 garbage classification two-dimensional code generation result when the external key is slightly changed
Figure BDA0003635759340000191
Figure BDA0003635759340000201
Figure BDA0003635759340000211
As can be seen from the analysis of the above specific embodiments 1-5, the garbage classification two-dimensional code generated by the garbage classification two-dimensional code generation method based on combined encryption provided by the present patent is not only closely related to an external secret key, but also depends on the identity information of the garbage bag (i.e. the garbage bag identity display code, the garbage bag identity hidden code), so that the garbage classification code generation method based on combined encryption provided by the present patent has strong security, so as to ensure that the generated garbage classification code has "uniqueness", security, and garbage classification guidance ".
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. A garbage classification code generation method based on combined encryption is characterized by comprising the following steps:
(1) Transcoding
Firstly, the identity information of a certain garbage bag is coded to generate a unique character type garbage bag identity code which is expressed as S 1 S 2 ...S k S k+1 S k+2 ...S k+L S k+L+1 S k+L+2 ...S k+L+p S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 In which S is 1 S 2 ...S k Is a city area, S k+1 S k+2 ...S k+L To a specific residential address, S k+L+1 S k+L+2 ...S k+L+p For contacts and contact phones, S k+L+p+1 S k+L+p+2 ...S k+L+p+n To code date, S k+L+p+n+1 S k+L+p+n+2 The color information of garbage classification is separated by English space characters,
then, an identity display code S is extracted from the identity code of the garbage bag 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+ 1 S k+L+p+n+2 And identity hiding code S k+1 S k+2 ...S k+L S k+L+1 S k+L+2 ...S k+L+p And converting the ID display code into numerical data one by one to obtain corresponding numerical sequence
Figure FDA0003635759330000011
Simultaneously, the identity hidden codes are converted into numerical data one by one to obtain corresponding numerical sequences
Figure FDA0003635759330000012
Finally, the element P2 in the numerical sequence P2 i Converting the binary sequences PB { i } into 8-bit binary sequences PB { i } one by one, and integrating the binary sequences PB { i } to obtain an integrated binary sequence
Figure FDA0003635759330000013
Figure FDA0003635759330000014
Wherein
Figure FDA0003635759330000015
The identity code of the garbage bag is a Chinese character coded by double bytes in a GB2312 character set and an ASCLL code value E [32,126 ∈ ]]The length of the identity code of the garbage bag is k + L + P + n +6, and the length of the numerical sequence P1 is
Figure FDA0003635759330000016
And is provided with
Figure FDA0003635759330000017
The length of the numerical sequence P2 is
Figure FDA0003635759330000018
And is provided with
Figure FDA0003635759330000019
The length of the integrated binary sequence B is
Figure FDA00036357593300000110
(2) Scrambling of binary sequence B
Firstly, the numerical sequence P2 is converted into a numerical sequence P1The binary sequence B and the external keys alpha and beta are respectively calculated according to the following formulas (1) to (4) to obtain an initial value x of the Logistic chaotic mapping 1 A parameter mu, an extraction start position m, and an extraction interval number n, such that
Figure FDA00036357593300000111
X is then 1 =α+mod(α-SP,1-α), (1)
μ=β+mod(β+SP,4-β), (2)
Figure FDA00036357593300000112
n=13+mod(m,47), (4)
Wherein the content of the first and second substances,
Figure FDA0003635759330000021
representing the number of binary bits '1' contained in the binary sequence B,
Figure FDA0003635759330000022
representing the number of binary bits '0' in the binary sequence B, function
Figure FDA0003635759330000023
Expressed as not more than (-alpha + beta + SP). Times.10 15 The external key satisfies a ∈ (0,1), β ∈ (3.57,4),
then, the initial value x mapped by chaos 1 And a parameter mu, iterating the Logistic chaotic mapping shown in the following formula (5), wherein k represents iteration times and x k+1 Represents the chaotic signal obtained by the k-th iteration,
Figure FDA0003635759330000024
x k+1 =μ·x k ·(1-x k ) (5)
obtaining a chaotic signal sequence
Figure FDA0003635759330000025
Taking 1 element from the m-th element in the sequence X at intervals of n elements in sequence to form the length of the m-th element
Figure FDA0003635759330000026
Of the chaotic signal sequence
Figure FDA0003635759330000027
Finally, the chaotic signal sequence Y is sorted in a descending order, and the binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain a scrambled binary sequence
Figure FDA0003635759330000028
(3) Binary sequence
Figure FDA0003635759330000029
Combined encryption of
First, a binary sequence is divided into
Figure FDA00036357593300000210
The middle elements are sequentially and positively grouped by taking 4 elements as a unit from head to tail to obtain a grouped binary sequence which is expressed as
Figure FDA00036357593300000211
And is
Figure FDA00036357593300000212
Figure FDA00036357593300000213
Wherein
Figure FDA00036357593300000214
Then, each binary packet sequence BF { j } is sequentially subjected to the following combination operations:
s0: let j =1 and let it be,
Figure FDA00036357593300000215
and combining the rule parameters
Figure FDA00036357593300000216
S1: the value of the parameter k _ switch is determined,
if k _ switch =0, a binary "1011" is added to the head end of the binary packet sequence BF { j }, denoted as
Figure FDA00036357593300000217
If k _ switch =1, a binary "1100" is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure FDA00036357593300000218
If k _ switch =2, a binary '0' is added after the 2 nd bit of the binary packet sequence BF { j } and a binary '110' is added at the head end, denoted as
Figure FDA00036357593300000219
If k _ switch =3, a binary '0' is added after the 3 rd bit of the binary packet sequence BF { j } and a binary '110' is added at the head end, denoted as
Figure FDA00036357593300000220
If k _ switch =4, a binary '0' is added to the tail end and a binary '110' is added to the head end of the binary packet sequence BF { j }, denoted as
Figure FDA00036357593300000221
If k _ switch =5, the binary "00" is added after the 1 st bit and the binary "11" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure FDA0003635759330000031
If k _ switch =6, the binary "00" is added after the 2 nd bit and the binary "11" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure FDA0003635759330000032
If k _ switch =7, a binary "1110" is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure FDA0003635759330000033
If k _ switch =8, the binary packet sequence BF { j } is flipped front and back and a binary "1011" is added at its head end, denoted as
Figure FDA0003635759330000034
If k _ switch =9, the binary packet sequence BF { j } is flipped front and back and a binary "1100" is appended to its head end, denoted as
Figure FDA0003635759330000035
If k _ switch =10, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 2 nd bit and a binary '110' at the head end, denoted as
Figure FDA0003635759330000036
If k _ switch =11, the binary packet sequence BF { j } is flipped front-to-back and added with binary 'after its 3 rd bit'0' and the head end is added with binary ' 110 ', denoted as
Figure FDA0003635759330000037
If k _ switch =12, the binary packet sequence BF { j } is flipped front and back and a binary '0' is added at its tail end and a binary '110' is added at the head end, denoted as
Figure FDA0003635759330000038
If k _ switch =13, the binary packet sequence BF { j } is flipped front-to-back and the 1 st bit thereof is appended with a binary "00" and the head end is appended with a binary "11", denoted as
Figure FDA0003635759330000039
If k _ switch =14, the binary packet sequence BF { j } is flipped front and back and added with the binary "00" after its 2 nd bit and the binary "11" at the head end, denoted as
Figure FDA00036357593300000310
If k _ switch =15, the binary packet sequence BF { j } is flipped front-to-back and a binary "1110" is appended to its head end, denoted as k _ switch =15
Figure FDA00036357593300000311
S2: combining the binary sequences using a bin2dec () function
Figure FDA00036357593300000312
Conversion into numerical data
Figure FDA00036357593300000313
And updates the chaotic signal
Figure FDA00036357593300000314
Meanwhile, carrying out single iteration according to Logistic chaotic mapping shown in formula (5) to obtain z j+1 Calculating the parameters
Figure FDA00036357593300000315
Let j = j +1, then judge the size of j, if
Figure FDA00036357593300000316
Then step S1 is carried out, otherwise step S3 is carried out,
s3: the combining operation of the binary grouped sequence is ended, thereby obtaining a binary combined sequence which is expressed as
Figure FDA00036357593300000317
And a sequence of values
Figure FDA00036357593300000318
Figure FDA0003635759330000041
(4) Transcoding
Sequence of values
Figure FDA0003635759330000042
Converting the medium elements into Chinese characters to obtain Chinese character sequence
Figure FDA0003635759330000043
I.e. the garbage classification number, wherein the length of the Chinese character sequence C is
Figure FDA0003635759330000044
And displays the identity of the garbage bag with a code (S) 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 ) And combining the Code with the garbage classification number to generate a garbage classification Code, and then generating a QR Code, namely a garbage classification two-dimensional Code.
2. The method for generating spam classification codes based on combination encryption according to claim 1, wherein: the step (1) of converting the identity display code into numerical data one by one means that the identity display code adopts a unicode2native () function to enable the ASCII code value to belong to [32,126 ]]Converting the visible characters into single numerical data, or converting double-byte coded Chinese characters in GB2312 character set into two numerical data, thereby obtaining corresponding numerical sequence
Figure FDA0003635759330000045
3. The method for generating spam classification codes based on combination encryption according to claim 1, wherein: the step (1) of converting the identity hiding code into numerical data one by one means that the identity hiding code adopts unicode2native () function to enable the ASCII code value to belong to 32,126]Converting the visible characters into single numerical data, or converting double-byte coded Chinese characters in GB2312 character set into two numerical data, thereby obtaining corresponding numerical sequence
Figure FDA0003635759330000046
4. The method for generating spam classification codes based on combination encryption according to claim 1, wherein: the step (1) is to combine the elements P2 in the numerical sequence P2 i The conversion into the binary sequence PB { i } of 8 bits one by one means that dec2bin (P2) is adopted i 8) function of P2 i Elements > 128 are converted to an 8-bit binary sequence PB { i }; using dec2bin (P2) i 7) function of P2 i The element < 128 is converted to a 7-bit binary sequence PB { i } and the end of PB { i } is added with binary '1', i.e. PB { i } = [ PB { i }, '1']。
5. The garbage classification code generator based on combined encryption of claim 1The method is characterized in that: the numerical sequence in step (4)
Figure FDA0003635759330000047
Conversion of Chinese elements into Chinese characters, meaning a sequence of numerical values
Figure FDA0003635759330000048
Two adjacent elements in the group of 1 adopt native2unicode (·) functions in sequence, namely
Figure FDA0003635759330000049
Obtaining Chinese character sequence
Figure FDA00036357593300000410
6. The method for generating spam classification codes based on combination encryption according to claim 1, wherein: the identity of the garbage bag is displayed in the step (4) (S) 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n S k+L+p+n+1 S k+L+p+n+2 ) The garbage classification code is generated by combining the garbage classification number and a garbage bag identity display code, which is expressed as the combination mode of inserting and connecting the garbage bag identity display code and the garbage classification number
Figure FDA00036357593300000411
Wherein S 1 S 2 …S k 、S k+L+p+1 S k+L+p+2 …S k+L+p+n
Figure FDA00036357593300000412
And S k+L+p+n+1 S k+L+p+n+2 The English spaces are mutually spaced.
CN202210505409.3A 2022-05-10 2022-05-10 Garbage classification code generation method based on combined encryption Withdrawn CN115358361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210505409.3A CN115358361A (en) 2022-05-10 2022-05-10 Garbage classification code generation method based on combined encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210505409.3A CN115358361A (en) 2022-05-10 2022-05-10 Garbage classification code generation method based on combined encryption

Publications (1)

Publication Number Publication Date
CN115358361A true CN115358361A (en) 2022-11-18

Family

ID=84030707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210505409.3A Withdrawn CN115358361A (en) 2022-05-10 2022-05-10 Garbage classification code generation method based on combined encryption

Country Status (1)

Country Link
CN (1) CN115358361A (en)

Similar Documents

Publication Publication Date Title
CN110033066B (en) Method for generating color garbage classification two-dimensional code
CN112116046B (en) Garbage classification two-dimensional code generation method based on layered encryption
CN109933755B (en) Method for generating garbage classification code
CN100518064C (en) Credit sign accidental streakline generating method
Lifset et al. Where has all the copper gone: The stocks and flows project, part 1
CN109977371B (en) Method for generating character type garbage classification code
CN115358362A (en) Garbage classification two-dimensional code generation method based on chaotic encryption
CN115358361A (en) Garbage classification code generation method based on combined encryption
CN109981245A (en) A kind of encryption and decryption method of character string
CN115455248A (en) Urban carbon emission monitoring method based on data analysis
CN114997353A (en) Garbage classification two-dimensional code generation method based on block encryption
CN112183698B (en) Chinese character garbage classification two-dimensional code generation method
CN114881189A (en) Garbage classification two-dimensional code generation method based on different combination modes
CN112183697B (en) Garbage classification two-dimensional code batch generation method
CN102509058B (en) Point type GIS vector data disguise and recovery method based on redundant bit replacement
CN101727677A (en) Method for mutual conversion between two-dimensional view and three--dimensional view in mine model
CN114239918B (en) Mobile compression equipment patrol optimizing method based on E2SFCA reachability analysis
CN101997954A (en) Encryption and decryption accessory for communication terminal
CN101762265A (en) Method of interconversion between two-dimensional drawing and three-dimensional model in mine model
CN114707165A (en) Character string encryption method based on hierarchical scrambling
CN102254126A (en) Robust-based natural language Hash domain spread spectrum watermarking coding algorithm for
CN112260822B (en) Structured digital watermark encryption method and device
Wang Study on sustainable utilization strategy of the mining wastelands
CN116562897B (en) Anti-counterfeiting traceability system and method based on cloud computing
Abdurashidovich Special Issue On Environmental Management In The Small-Scale Mining Industry

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20221118