CN115358362A - Garbage classification two-dimensional code generation method based on chaotic encryption - Google Patents

Garbage classification two-dimensional code generation method based on chaotic encryption Download PDF

Info

Publication number
CN115358362A
CN115358362A CN202210505513.2A CN202210505513A CN115358362A CN 115358362 A CN115358362 A CN 115358362A CN 202210505513 A CN202210505513 A CN 202210505513A CN 115358362 A CN115358362 A CN 115358362A
Authority
CN
China
Prior art keywords
binary
sequence
code
garbage classification
switch
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
CN202210505513.2A
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 CN202210505513.2A priority Critical patent/CN115358362A/en
Publication of CN115358362A publication Critical patent/CN115358362A/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
    • 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/06046Constructional details
    • 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

Abstract

The invention discloses a chaotic encryption-based garbage classification two-dimensional code generation method, which comprises the following steps of: extracting an identity display code and a hidden code from the identity code of the garbage bag, and performing numerical data, binary conversion and combination operation to obtain a combined binary sequence B; a chaos sequence Y obtained by chaos mapping iteration is utilized to perform descending sorting on a position change rule before and after the chaos sequence Y, and the binary sequence B is turned over and scrambled; and calculating a recombination rule parameter k _ switch by using the chaotic signal, sequentially grouping and recombining the scrambled sequence B according to the k _ switch, and adjusting the k _ switch in real time along with the recombined binary grouping sequence by a chaotic iteration value so as to generate a garbage classification number, and combining to generate the garbage classification two-dimensional code. The method for generating the garbage classification two-dimensional code based on the chaotic 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

Chaotic encryption-based garbage classification two-dimensional code generation method
Technical Field
The invention belongs to the technical field of garbage classification, and particularly relates to a garbage classification two-dimensional code generation method based on chaotic 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 not buried by 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 terminal disposal to the whole process 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 lacks the constraint of related laws, and has corresponding laws as support compared with the garbage classification implementation of foreign developed countries; secondly, economic stimulation and reward are lacked, garbage classification knowledge is lacked, environmental protection consciousness is insufficient, and 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 invention aims to: the invention aims to solve the defects in the prior art and provides a chaotic encryption-based garbage classification two-dimensional code generation method, which comprises the steps of extracting an identity display code and a hidden code from a garbage bag identity code, calculating to obtain an initial value, a parameter, an extraction starting position and an extraction interval number of a chaotic system by depending on the identity display code and the hidden code, generating a chaotic signal sequence by chaotic mapping, converting and combining the garbage bag identity hidden code into a combined binary sequence B, turning the combined binary sequence B back and forth and scrambling the combined binary sequence B, calculating a recombination rule parameter k _ switch by using the chaotic signal, and sequentially grouping and recombining the scrambled sequence B according to the k _ switch adjusted in real time to generate a garbage classification number so as to generate a garbage classification two-dimensional code by combination. The method for generating the garbage classification two-dimensional code based on the chaotic 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 method for generating a garbage classification two-dimensional code based on chaotic 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 For provinces and cities, 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 telephones, 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 BDA0003635787750000021
Simultaneously, the identity hidden codes are converted into numerical data one by one to obtain corresponding numerical sequences
Figure BDA0003635787750000022
Finally, the element P2 in the numerical sequence P2 i One by one, converting the binary sequences into binary sequences PB { i }, and combining the binary sequences PB { i }, thereby obtaining a combined binary sequence
Figure BDA0003635787750000023
Figure BDA0003635787750000024
Wherein
Figure BDA0003635787750000025
The identity code of the garbage bag is coded by double bytes in a GB2312 character set, and the code value of ASCLL belongs to the field of 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 BDA0003635787750000026
And is
Figure BDA0003635787750000027
The length of the numerical sequence P2 is
Figure BDA0003635787750000028
And is provided with
Figure BDA0003635787750000029
The length of the combined binary sequence B is
Figure BDA00036357877500000210
And is
Figure BDA00036357877500000211
(2) Chaotic 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, such that
Figure BDA00036357877500000212
Then
x 1 =α+mod(α-kp,1-α), (1)
μ=β+mod(β+kp,4-β), (2)
Figure BDA00036357877500000213
n=7+mod(m,37), (4)
Wherein the content of the first and second substances,
Figure BDA00036357877500000214
represents the number of binary '1' contained in the combined binary sequence B,
Figure BDA00036357877500000215
representing the number of binary '0's in the combined binary sequence B, function
Figure BDA00036357877500000216
Expressed as not more than (-alpha + beta + kp). Times.10 15 The outer key satisfies a e (0, 1), e (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 BDA0003635787750000031
x k+1 =μ·x k ·(1-x k ) (5)
obtaining a chaotic signal sequence
Figure BDA0003635787750000032
M-th element from sequence XThe elements are sequentially spaced by n elements to take 1 element to form the length of
Figure BDA0003635787750000033
Of the chaotic signal sequence
Figure BDA0003635787750000034
Finally, the binary sequence B is turned over front and back, the chaotic signal sequence Y is sorted in a descending order, and the turned binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain the scrambled binary sequence
Figure BDA0003635787750000035
Figure BDA0003635787750000036
(3) Binary sequence
Figure BDA0003635787750000037
Grouping and recombining of
First, the scrambled binary sequence is decoded
Figure BDA0003635787750000038
End of (3) adding
Figure BDA0003635787750000039
The binary bit '1' is then grouped by 5 elements in the forward direction from beginning to end to obtain a grouped binary sequence, which is expressed as BF {1}, BF {2},. Once, BF { j },. Once, BF { t-1}, BF { t }, and
Figure BDA00036357877500000310
wherein j =1, 2.., t, wherein
Figure BDA00036357877500000311
Function(s)
Figure BDA00036357877500000312
Is expressed as not less than
Figure BDA00036357877500000313
The smallest integer of (a) is,
then, each binary packet sequence BF { j } is subjected to the following reassembly operation in sequence:
s0: let j =1 and, if the number of the segments is greater than the threshold,
Figure BDA00036357877500000314
and reorganize the rule parameters
Figure BDA00036357877500000315
S1: the value of the parameter k _ switch is judged,
if k _ switch =0, a binary "001" is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357877500000316
If k _ switch =1, the binary packet sequence BF { j } is flipped front-to-back and a binary "001" is added at its head end, denoted as
Figure BDA00036357877500000317
If k _ switch =2, a binary "010" is added to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357877500000318
If k _ switch =3, the binary packet sequence BF { j } is flipped front-to-back and a binary "010" is added at its head end, denoted as
Figure BDA00036357877500000319
If k _ switch =4, a binary '0' is added after the 1 st bit of the binary packet sequence BF { j } and a binary '01' is added at the head end, denoted as
Figure BDA00036357877500000320
If k _ switch =5, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 1 st bit and a binary '01' at the head end, denoted as
Figure BDA00036357877500000321
If k _ switch =6, a binary '0' is added after the 2 nd bit of the binary packet sequence BF { j } and a binary '01' is added at the head end, denoted as
Figure BDA0003635787750000041
If k _ switch =7, 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 '01' at the head end, denoted as
Figure BDA0003635787750000042
If k _ switch =8, a binary '0' is added after the 3 rd bit and a binary '01' is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635787750000043
If k _ switch =9, 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 '01' at the head end, denoted as
Figure BDA0003635787750000044
If k _ switch =10, a binary '0' is added after the 4 th bit of the binary packet sequence BF { j } and a binary '01' is added to the head end, denoted as
Figure BDA0003635787750000045
If k _ switch =11, the binary packet sequence BF { j } is flipped back and forthRotate and add a binary '0' after its 4 th bit and a binary '01' at the head end, denoted as
Figure BDA0003635787750000046
If k _ switch =12, a binary '0' is appended to the tail end and a binary '01' is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635787750000047
If k _ switch =13, 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 '01' at the head end, denoted as
Figure BDA0003635787750000048
If k _ switch =14, a binary '1' is added after the 1 st bit of the binary packet sequence BF { j } and a binary '0' is added to the head end and a binary '0' to the tail end, expressed as
Figure BDA0003635787750000049
If k _ switch =15, the binary packet sequence BF { j } is flipped front and back and the 1 st bit thereof is followed by a binary '1' and the head end is followed by a binary '0' and the tail end is followed by a binary '0', denoted as
Figure BDA00036357877500000410
S2: binary sequence using bin2dec () function
Figure BDA00036357877500000411
Conversion into numerical data
Figure BDA00036357877500000412
And updates the chaotic signal
Figure BDA00036357877500000413
Meanwhile, carrying out single iteration according to Logistic chaotic mapping shown in formula (5) to obtain z j+1 Calculating
Figure BDA00036357877500000414
Let j = j +1, then judge the magnitude of j, if j is less than or equal to t, go to step S1, otherwise go to step S3,
s3: ending the reassembly operation of the binary packet sequence to obtain a reassembled binary packet sequence, denoted as
Figure BDA00036357877500000415
And a sequence of values
Figure BDA00036357877500000416
(4) Transcoding
Sequence the values using the char (. Circle.) function
Figure BDA00036357877500000417
Where the middle elements are converted one by one into ASCII code values belonging to [32,126 ]]To obtain a character sequence C = { C = { (C) 1 ,C 2 ,...,C t-1 ,C t The step (S) is that the garbage bag is classified into a garbage classification number, wherein the length of the character sequence C is t, and the garbage bag identity display code (S) is displayed 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 the chaos encryption-based garbage classification two-dimensional code generation method for converting the identity display codes into numerical data one by one means that the identity display codes belong to the ASCII code value [32,126 ] by adopting a unicode2native () function one by one]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 BDA0003635787750000051
Further, the step (1) of the chaos encryption-based garbage classification two-dimensional code generation method for converting the identity hidden codes into numerical data one by one means that the identity hidden codes belong to the ASCII code value [32,126 ] by adopting a unicode2native () function one by one]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 BDA0003635787750000052
Further, in the method for generating the garbage classification two-dimensional code based on chaotic encryption, in the step (1), the element P2 in the numerical value sequence P2 is used i One-by-one conversion into binary sequences PB { i }, which means adopting dec2bin (P2) i 8) function of P2 i Elements > 128 are converted into an 8-bit binary sequence PB { i }; using dec2bin (P2) i 7) function of P2 i The < 128 element is converted to the 7-bit binary sequence PB { i }.
Further, the garbage classification two-dimensional code generation method based on chaotic encryption is characterized in that the identity of the garbage bag is displayed in a code (S) in the step (4) 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, which is expressed as S by adopting a combination mode of inserting and connecting the garbage bag identity display code and the garbage classification number 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n C 1 ,C 2 ,...,C t-1 ,C t S k+L+p+n+1 S k+L+p+n+2 In which S is 1 S 2 ...S k 、S k+L+p+1 S k+L+p+2 ...S k+L+p+n 、C 1 ,C 2 ,...,C t-1 ,C t And S k+L+p+n+1 S k+L+p+n+2 The English spaces are mutually spaced.
Has the beneficial effects that: the invention is based onCalculating to obtain an initial value, parameters, an extraction starting position and extraction interval numbers of the chaotic system by relying on the identity display codes and the hidden codes, generating chaotic signal sequences by chaotic mapping, carrying out front-back overturning and scrambling on a combined binary sequence B formed by converting and combining the hidden codes of the identity of the garbage bag, calculating a recombination rule parameter k _ switch by using the chaotic signal, and carrying out scrambling on the scrambled sequence according to the k _ switch adjusted in real time
Figure BDA0003635787750000053
The garbage classification two-dimensional code generation method based on chaotic 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 property.
Drawings
FIG. 1 is a schematic diagram of a process for generating a two-dimensional code for garbage classification based on chaotic encryption according to the present invention;
fig. 2 is a schematic diagram of a two-dimensional code for garbage classification according to the present invention, which includes a "recyclable" blue background mark.
Detailed Description
As shown in fig. 1, a method for generating a garbage classification two-dimensional code based on chaotic 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 For provinces and cities, 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 telephones, S k+L+p+1 S k+L+p+2 ...S k+L+p+n To makeCode 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 conversion to belong the ASCII code value to 32,126 by using a unicode2native () function]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 BDA0003635787750000061
Simultaneously, the identity hiding code adopts unicode2native () function to belong the ASCII code value to [32,126 ] character by character]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 BDA0003635787750000062
Finally, the element P2 in the numerical sequence P2 i One by one into a binary sequence PB { i }, i.e. using dec2bin (P2) i 8) function of P2 i Elements > 128 are converted into an 8-bit binary sequence PB { i } or into dec2bin (P2) i 7) function of P2 i The < 128 elements are converted to 7-bit binary sequences PB { i }, and the binary sequences PB { i } are combined to obtain a combined binary sequence
Figure BDA0003635787750000063
Wherein
Figure BDA0003635787750000064
Chinese character and AS in which the identity code of the garbage bag is encoded by double bytes in GB2312 character setCLL 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 BDA0003635787750000065
And is
Figure BDA0003635787750000066
The length of the numerical sequence P2 is
Figure BDA0003635787750000067
And is
Figure BDA0003635787750000068
The length of the combined binary sequence B is
Figure BDA0003635787750000069
And is
Figure BDA00036357877500000610
(2) Chaotic scrambling of binary sequence B
Firstly, an initial value x of Logistic chaotic mapping is respectively calculated and obtained by utilizing a binary system 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 BDA00036357877500000611
Then
x 1 =α+mod(α-kp,1-α),
μ=β+mod(β+kp,4-β),
Figure BDA0003635787750000071
n=7+mod(m,37),
Wherein the content of the first and second substances,
Figure BDA0003635787750000072
representing combined binaryThe sequence B contains the number of binary '1's,
Figure BDA0003635787750000073
representing the number of binary '0's in the combined binary sequence B, function
Figure BDA0003635787750000074
Expressed as not more than (-alpha + beta + kp). Times.10 15 The outer key satisfies a e (0, 1), e (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 iteration,
Figure BDA0003635787750000075
x k+1 =μ·x k ·(1-x k )
obtaining a chaotic signal sequence
Figure BDA0003635787750000076
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 BDA0003635787750000077
Chaotic signal sequence of (1)
Figure BDA0003635787750000078
Finally, the binary sequence B is turned over front and back, the chaotic signal sequence Y is sorted in a descending order, and the turned binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain the scrambled binary sequence
Figure BDA0003635787750000079
Figure BDA00036357877500000710
(3) Binary sequence
Figure BDA00036357877500000711
Grouping and reassembling of
Firstly, the scrambled binary sequence is processed
Figure BDA00036357877500000712
End of (3) adding
Figure BDA00036357877500000713
The binary bit '1' is then grouped by 5 elements in the forward direction from beginning to end to obtain a grouped binary sequence, which is expressed as BF {1}, BF {2},. Once, BF { j },. Once, BF { t-1}, BF { t }, and
Figure BDA00036357877500000714
wherein j =1, 2.. T, wherein
Figure BDA00036357877500000715
Function(s)
Figure BDA00036357877500000716
Is expressed as not less than
Figure BDA00036357877500000717
Is the smallest integer of (a) or (b),
then, each binary packet sequence BF { j } is subjected to the following reassembly operations in turn:
s0: let j =1 and let it be,
Figure BDA00036357877500000718
and reorganize the rule parameters
Figure BDA00036357877500000719
S1: the value of the parameter k _ switch is judged,
if k _ switch =0, a binary "001" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357877500000720
If k _ switch =1, the binary packet sequence BF { j } is flipped front-to-back and a binary "001" is added at its head end, denoted as
Figure BDA00036357877500000721
If k _ switch =2, a binary "010" is added to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635787750000081
If k _ switch =3, the binary packet sequence BF { j } is flipped front-to-back and a binary "010" is added at its head end, denoted as
Figure BDA0003635787750000082
If k _ switch =4, a binary '0' is added after the 1 st bit of the binary packet sequence BF { j } and a binary '01' is added to the head end, denoted as
Figure BDA0003635787750000083
If k _ switch =5, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 1 st bit and a binary '01' at the head end, denoted as
Figure BDA0003635787750000084
If k _ switch =6, a binary '0' is added after the 2 nd bit of the binary packet sequence BF { j } and a binary '01' is added at the head end, denoted as
Figure BDA0003635787750000085
If k _ switch =7, the binary packet sequence BF { j } is flipped front and back, and a binary '0' is added after its 2 nd bit and a binary '01' is added at the head end,is shown as
Figure BDA0003635787750000086
If k _ switch =8, a binary '0' is added after the 3 rd bit and a binary '01' is added at the head end of the binary packet sequence BF { j }, denoted as
Figure BDA0003635787750000087
If k _ switch =9, 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 '01' at the head end, denoted as
Figure BDA0003635787750000088
If k _ switch =10, a binary '0' is added after the 4 th bit of the binary packet sequence BF { j } and a binary '01' is added at the head end, denoted as
Figure BDA0003635787750000089
If k _ switch =11, the binary packet sequence BF { j } is flipped front and back and added with a binary '0' after its 4 th bit and a binary '01' at the head end, denoted as
Figure BDA00036357877500000810
If k _ switch =12, a binary '0' is appended to the tail end and a binary '01' is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure BDA00036357877500000811
If k _ switch =13, 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 '01' at the head end, denoted as
Figure BDA00036357877500000812
If k _ sSwitch =14, then add binary '1' after bit 1 of the binary packet sequence BF { j } and add binary '0' at the head end and binary '0' at the tail end, expressed as
Figure BDA00036357877500000813
If k _ switch =15, the binary packet sequence BF { j } is flipped front and back and the 1 st bit thereof is added with binary '1' and the head end is added with binary '0' and the tail end is added with binary '0', denoted as
Figure BDA00036357877500000814
S2: using the bin2dec () function, i.e.
Figure BDA00036357877500000815
Will binary sequence
Figure BDA00036357877500000816
Conversion into numerical data
Figure BDA00036357877500000817
And updates the chaotic signal
Figure BDA0003635787750000091
Meanwhile, carrying out single iteration according to Logistic chaotic mapping shown in formula (5) to obtain z j+1 Calculating
Figure BDA0003635787750000092
Let j = j +1, then judge the magnitude of j, if j is less than or equal to t, go to step S1, otherwise go to step S3,
s3: ending the reassembly operation of the binary packet sequence to obtain a reassembled binary packet sequence, denoted as
Figure BDA0003635787750000093
And a sequence of values
Figure BDA0003635787750000094
(4) Transcoding
Sequence the values using the char (. Circle.) function
Figure BDA0003635787750000095
The medium elements are converted one by one into ASCII code values using a char () function to belong to [32,126 ]]Is displayed on the display screen, the visible characters of (2), obtain the character sequence C = { C = { (C) 1 ,C 2 ,...,C t-1 ,C t The step (S) is that the garbage bag is classified into a garbage classification number, wherein the length of the character sequence C is t, and the garbage bag identity display code (S) is displayed 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, denoted S 1 S 2 ...S k S k+L+p+ 1 S k+L+p+2 ...S k+L+p+n C 1 ,C 2 ,...,C t-1 ,C t S k+L+p+n+1 S k+L+p+n+2 In which S is 1 S 2 ...S k 、S k+L+p+1 S k+L+p+ 2 ...S k+L+p+n 、C 1 ,C 2 ,...,C t-1 ,C t And S k+L+p+n+1 S k+L+p+n+2 The English space intervals are mutually used, so that a garbage classification Code is generated, and then a QR Code, namely a garbage classification two-dimensional Code, is generated.
The invention is further illustrated by the following specific examples:
example 1
According to the method for generating the garbage classification two-dimensional code based on the chaotic 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 (Jiangsu province-Nantong city-Haima region 2022-01-01) and an identity hiding code (Zhongnan city-12 # 1X 01 Li Qian 123456789) from the identity codes of the garbage bags, converting the identity display codes into numerical data by adopting a unicode2native () function one by one, obtaining a corresponding numerical value 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, 45,48,49,32,48,49}, and simultaneously converting the identity hiding code into numerical data by using a unicode2native () function one by one, and obtaining a corresponding numerical value 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 }, wherein the length of the numerical value sequence P1 is the length of the numerical value sequence P1
Figure BDA0003635787750000096
The length of the numerical sequence P2 is
Figure BDA0003635787750000097
Finally, the element P2 in the numerical sequence P2 i Converting the binary sequences PB { i } into binary sequences PB { i } one by one, and combining the binary sequences PB { i } to obtain a combined binary sequence B = { B = } 1 ,B 2 ,...,B 249 ,B 250 <xnotran> } = {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,0,1,1,0,0,1,1,1,1,0,0,0,1,1,1,0,1,0,1,1,0,1,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0,1,0,1,0,1,0,0,1,1,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,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,0,0,0,1,1,1,1,0,1,1,1,1,1,1,0,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,0,0,1,1,0,1,1,0,1,0,0,0,1,1,0,1,0,1,0,1,1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0}, </xnotran>
Figure BDA0003635787750000101
Figure BDA0003635787750000102
(2) Chaotic scrambling of binary sequence B
Firstly, an initial value x of the Logistic chaotic mapping is calculated and obtained by using a binary sequence B converted from a numerical sequence P1 and a numerical sequence P2, and external keys α =0.12345 and β =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 BDA0003635787750000103
Then
x 1 =0.12345+mod(0.12345-0.691620249423299,1-0.12345)=0.431829750576701,
μ=3.75+mod(3.75+0.691620249423299,0.25)=3.941620249423298,
Figure BDA0003635787750000104
n=7+mod(452,37)=15,
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 kth iteration, k =1,2,., +15 × (249)
x k+1 =μ·x k ·(1-x k )
Obtaining a chaotic signal sequence X = { X = 1 ,x 2 ,...,x 4188 1 element at 15 elements in sequence from the 452 th element in the sequence X to form a chaotic signal sequence Y = { Y } of length 250 1 ,Y 2 ,...,Y 249 ,Y 250 },
Finally, the binary sequence B is turned over front and back, 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 the scrambled binary sequence
Figure BDA0003635787750000105
Figure BDA0003635787750000106
Figure BDA0003635787750000107
Figure BDA0003635787750000108
Figure BDA0003635787750000109
(3) Binary sequence
Figure BDA00036357877500001010
Grouping and recombining of
First, the scrambled binary sequence is decoded
Figure BDA00036357877500001011
Then the elements are sequentially grouped in the forward direction from head to tail by taking 5 elements as a unit to obtain a grouped binary sequence, BF {1} = {1,0, 1}, BF {2} = {0, 1,0,1}, \8230, BF {25} = {1,0, 1}, 823000, BF 49, BF 50, 0,1,0, BF 1, etc. are used as the basis for the test samples to be tested, and the test samples are obtained by the method,
then, each binary grouping sequence BF { i } is recombined in sequence, so as to obtain a recombined binary grouping sequence
Figure BDA0003635787750000111
Figure BDA0003635787750000112
And a sequence of values
Figure BDA0003635787750000113
Figure BDA0003635787750000114
Figure BDA0003635787750000115
(4) Transcoding
Sequence of values
Figure BDA0003635787750000116
Element by element conversion to ASCII code values belonging to [32,126 ]]The method obtains the visible characters of the garbage classification number "jhLAgJJXc 5| V6XAAHY4j [ FylS $ tL [ R \ Slwm \ x @ qRVALX" AdC ", and adopts a combination mode of insertion connection between the garbage bag identity display Code (Jiangsu province-Nantong city-Hainan region 2022-01-01) and the garbage classification number to generate the garbage classification Code as" Jiangsu province-Nantong city-Hainan region 2022-01-01jLAgJJXc5 electricity V6XAAHY4j FylS $ tL R \\ wSlm \\ x @ qALRVX' AdC 01", and then generates Code, namely the garbage classification two-dimensional Code, as shown in FIG. 2.
Example 2
According to the chaos encryption-based garbage classification two-dimensional code generation method, 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 slightly changes: "Gongsu province-Nantong city-Haimen district 2022-01-01"; or "Jiangsu province-Nantong city-Hai Ming district 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 two-dimensional code generation method based on chaotic encryption disclosed by the patent has sensitivity to 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 garbage classification two-dimensional code when information of province and city area or code making year, month and day in garbage bag identity display code is slightly changed
Figure BDA0003635787750000117
Figure BDA0003635787750000121
Example 3
According to the method for generating the garbage classification two-dimensional code based on the chaotic encryption, the identity hidden code, the external key and the garbage classification two-dimensional code generating steps of a certain garbage bag are similar to those of the specific embodiments 1 and 2, and only fine garbage bags of the garbage bag identity code ("south Shi-12 Shi-01 Li 01 Shi 123456789-2022-01-01" in Jiangsu province-Nantong city-Haima region, or "south Shi-12 Shi 1 Shi 01 Li 01 Shi 123456789-2022-01-01" in the Gongsu province-Nantong city-Haima region, or "south Shi-12 Shi 01 Shi 123456789-20201" in Jiangsu province-Nantong city-Haima region, or "south Shi-12 Shi 01 Shi-123456789" in south Shi-Shi city-Hai city region, or "south Shi-12 Shi 01 Shi-Shi 01 Shi 3": "02"; or "03"; or "04", 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 two-dimensional code generation method based on chaotic encryption has sensitivity to the garbage classification color information in the garbage bag identity information.
Table 2 generation result of garbage classification two-dimensional code when garbage classification color information is slightly changed
Figure BDA0003635787750000131
Figure BDA0003635787750000141
Figure BDA0003635787750000151
Example 4
According to the method for generating the garbage classification two-dimensional code based on the chaotic encryption, the identity display code, the external key and the garbage classification two-dimensional code generating steps of a certain garbage bag are similar to those of the specific embodiments 1 and 2, and only the fine garbage bag information of the garbage bag ("south Shi-12 Shi-01 Shi-123456789-2022-01-01" in the south Shi-Nantong city-Haima region, or only the fine garbage bag information of south Shi-12 Shi-01 Shi 456789-2022-01-01 "in the south Shisu province-Nantong city-Haima region, or only the fine garbage bag information of south Shi-12 Shi-01" in the south Shi-Nantong city-Haima-123456789: "Zhongnan Shicheng-12 #1 # 01 li qiang 123456789"; or "central south city-12 #1 # 81 plum strong 123456789"; or "central south city-12 #1 # 01 li qiang 123450789", and the generation results of the two-dimensional codes 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, the garbage classification two-dimensional code generation method based on chaotic encryption provided by the patent has sensitivity to a hidden part (namely, the 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 BDA0003635787750000161
Figure BDA0003635787750000171
Figure BDA0003635787750000181
Example 5
According to the method for generating the garbage classification two-dimensional code based on the chaotic encryption, the identity code (the identity display code and the hidden code) of a certain garbage bag and the generation step of the garbage classification two-dimensional code thereof are similar to those of the specific examples 1 and 2, and only a single external fine secret key of the garbage bag ("the south Shih-12 Shih-01 Shih 123456789-01-01" in the south world of Jiangsu province-Nantong city-Haima region, or a single external fine secret key of the south Shih-12 Shih-01 Shih 123456789-2022-01-01 "in the south Shih-Nantong city of England, or a single external fine secret key of the south Shih-12 Shih-01 Shih 456789-2029" in the south Shih-1 Shih-01 "in the south China-Haimah city of Jiangsu city: α =0.123450000000001; or β =3.750000000000001, and the generation result of the garbage classification code is shown in table 4. As can be seen from the following table: once the external secret key changes slightly, namely 'milli-centimetre missing', the generated two-dimensional code for garbage classification is 'thousand miles away', so that the method for generating the two-dimensional code for garbage classification based on chaotic encryption provided by the patent has secret key sensitivity.
Table 4 generation result of garbage classification two-dimensional code when external key is slightly changed
Figure BDA0003635787750000191
Figure BDA0003635787750000201
As can be seen from the analysis of the foregoing specific embodiments 1-5, the garbage classification code generated by the garbage classification code generation method provided by the present patent is not only closely related to an external secret key, but also depends on the garbage bag identity information (i.e., the garbage bag identity display code, and the garbage bag identity hidden code).
Although the present invention has been described with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the present invention.

Claims (5)

1. A method for generating a garbage classification two-dimensional code based on chaotic 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 Are garbage classification color information, are 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 pairsCorresponding numerical sequence
Figure FDA0003635787740000011
Simultaneously, the identity hidden codes are converted into numerical data one by one to obtain corresponding numerical sequences
Figure FDA0003635787740000012
Finally, the element P2 in the numerical sequence P2 i One by one, converting the binary sequences into binary sequences PB { i }, and combining the binary sequences PB { i }, thereby obtaining a combined binary sequence
Figure FDA0003635787740000013
Figure FDA0003635787740000014
Wherein
Figure FDA0003635787740000015
The identity code of the garbage bag is a double-byte coded Chinese character 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 FDA0003635787740000016
And is
Figure FDA0003635787740000017
The length of the numerical sequence P2 is
Figure FDA0003635787740000018
The length of the combined binary sequence B is
Figure FDA0003635787740000019
(2) Chaotic scrambling of binary sequence B
Firstly, using the numerical sequence P1 and the numerical sequence P2The converted 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 FDA00036357877400000110
Then
x 1 =α+mod(α-kp,1-α), (1)
μ=β+mod(β+kp,4-β), (2)
Figure FDA00036357877400000111
n=7+mod(m,37), (4)
Wherein the content of the first and second substances,
Figure FDA0003635787740000021
represents the number of binary '1' contained in the combined binary sequence B,
Figure FDA0003635787740000022
represents the number of binary '0' in the combined binary sequence B, function
Figure FDA0003635787740000023
Expressed as not more than (-alpha + beta + kp). Times.10 15 The outer key satisfies a e (0, 1), ss e (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 FDA0003635787740000024
x k+1 =μ·x k ·(1-x k ) (5)
obtaining a chaotic signal sequence
Figure FDA0003635787740000025
Sequentially taking 1 element from the m-th element in the sequence X at intervals of n elements to form a sequence with the length of
Figure FDA0003635787740000026
Chaotic signal sequence of (1)
Figure FDA0003635787740000027
Finally, the binary sequence B is turned over front and back, the chaotic signal sequence Y is sorted in a descending order, and the turned binary sequence B is scrambled according to the position change scrambling rule before and after the chaotic signal sequence Y is sorted to obtain the scrambled binary sequence
Figure FDA0003635787740000028
Figure FDA0003635787740000029
(3) Binary sequence
Figure FDA00036357877400000210
Grouping and recombining of
Firstly, the scrambled binary sequence is processed
Figure FDA00036357877400000211
End of (3) adding
Figure FDA00036357877400000212
A binary bit '1', in which the elements are sequentially grouped by 5 elements in the forward direction from the beginning to the end to obtain a grouped binary sequence, which is represented as BF {1}, BF {2},. BF { j },. BF { t-1}, BF { t }, and
Figure FDA00036357877400000213
wherein j =1, 2.., t, wherein
Figure FDA00036357877400000214
Function(s)
Figure FDA00036357877400000215
Is expressed as being not less than
Figure FDA00036357877400000216
Is the smallest integer of (a) or (b),
then, each binary packet sequence BF { j } is subjected to the following reassembly operations in turn:
s0: let j =1 and, if the number of the segments is greater than the threshold,
Figure FDA00036357877400000217
and reorganize the rule parameters
Figure FDA00036357877400000218
S1: the value of the parameter k _ switch is judged,
if k _ switch =0, a binary "001" is added at the head end of the binary packet sequence BF { j }, denoted as
Figure FDA00036357877400000219
If k _ switch =1, the binary packet sequence BF { j } is flipped front-to-back and a binary "001" is added at its head end, denoted as
Figure FDA00036357877400000220
If k _ switch =2, a binary "010" is added to the head end of the binary packet sequence BF { j }, denoted as
Figure FDA00036357877400000221
If k _ switch =3, the binary packet sequence BF { j } is flipped front-to-back and a binary "010" is added at its head end, denoted as
Figure FDA0003635787740000031
If k _ switch =4, a binary '0' is added after the 1 st bit of the binary packet sequence BF { j } and a binary '01' is added at the head end, denoted as
Figure FDA0003635787740000032
If k _ switch =5, the binary packet sequence BF { j } is flipped front-to-back and added with a binary '0' after its 1 st bit and a binary '01' at the head-end, denoted as
Figure FDA0003635787740000033
If k _ switch =6, a binary '0' is added after the 2 nd bit of the binary packet sequence BF { j } and a binary '01' is added at the head end, denoted as
Figure FDA0003635787740000034
If k _ switch =7, 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 '01' at the head end, denoted as
Figure FDA0003635787740000035
If k _ switch =8, a binary '0' is added after the 3 rd bit and a binary '01' is added at the head end of the binary packet sequence BF { j }, denoted as
Figure FDA0003635787740000036
If k _ switch =9, 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 '0' at the head end"01" is represented by
Figure FDA0003635787740000037
If k _ switch =10, a binary '0' is added after the 4 th bit of the binary packet sequence BF { j } and a binary '01' is added to the head end, denoted as
Figure FDA0003635787740000038
If k _ switch =11, the binary packet sequence BF { j } is flipped front-to-back and is added with a binary '0' after its 4 th bit and a binary '01' at the head-end, denoted as
Figure FDA0003635787740000039
If k _ switch =12, a binary '0' is appended to the tail end and a binary '01' is appended to the head end of the binary packet sequence BF { j }, denoted as
Figure FDA00036357877400000310
If k _ switch =13, the binary packet sequence BF { j } is flipped front and back and a binary '0' is appended to its tail end and a binary '01' is appended to the head end, denoted as
Figure FDA00036357877400000311
If k _ switch =14, a binary '1' is added after the 1 st bit of the binary packet sequence BF { j } and a binary '0' is added to the head end and a binary '0' to the tail end, denoted as
Figure FDA00036357877400000312
If k _ switch =15, the binary packet sequence BF { j } is flipped front and back and the 1 st bit thereof is followed by a binary '1' and the head end is followed by a binary '0' and the tail end is followed by a binary '0', denoted as
Figure FDA00036357877400000313
S2: binary sequence using bin2dec () function
Figure FDA00036357877400000314
Conversion into numerical data
Figure FDA00036357877400000315
And updates the chaotic signal
Figure FDA00036357877400000316
Meanwhile, carrying out single iteration according to Logistic chaotic mapping shown in formula (5) to obtain z j+1 Calculating
Figure FDA00036357877400000317
Let j = j +1, then judge the magnitude of j, if j is less than or equal to t, go to step S1, otherwise go to step S3,
s3: ending the reassembly operation of the binary packet sequence to obtain a reassembled binary packet sequence, denoted as
Figure FDA0003635787740000041
And a sequence of values
Figure FDA0003635787740000042
(4) Transcoding
Using char (·) function, sequence the values
Figure FDA0003635787740000043
Where the elements are converted one by one into ASCII code values belonging to [32,126 ]]To obtain a character sequence C = { C = { (C) 1 ,C 2 ,...,C t-1 ,C t The step (S) is that the garbage bag is classified into a garbage classification number, wherein the length of the character sequence C is t, and the garbage bag identity display code (S) is displayed 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 the garbage classification two-dimensional code based on the chaotic encryption according to claim 1, characterized in that: 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 belong the ASCII code value 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 FDA0003635787740000044
3. The method for generating the garbage classification two-dimensional code based on the chaotic encryption, according to claim 1, is characterized in that: the step (1) of converting the identity hiding code into numerical data one by one means that the identity hiding 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 FDA0003635787740000045
4. The method for generating the garbage classification two-dimensional code based on the chaotic encryption according to claim 1, characterized in that: the step (1) is to combine the elements P2 in the numerical sequence P2 i One-by-one conversion into the binary sequence PB { i }, which means adopting dec2bin (P2) i 8) function of P2 i Elements > 128 are converted into an 8-bit binary sequence PB { i }; using dec2bin (P2) i 7) function of P2 i The < 128 element is converted to the 7-bit binary sequence PB { i }.
5. The method for generating the garbage classification two-dimensional code based on the chaotic encryption, according to claim 1, is characterized in that: displaying the identity of the garbage bag in the step (4) to be coded (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, which is expressed as S by adopting a combination mode of inserting and connecting the garbage bag identity display code and the garbage classification number 1 S 2 ...S k S k+L+p+1 S k+L+p+2 ...S k+L+p+n C 1 ,C 2 ,...,C t-1 ,C t S k+L+p+n+ 1 S k+L+p+n+2 In which S is 1 S 2 ...S k 、S k+L+p+1 S k+L+p+2 ...S k+L+p+n 、C 1 ,C 2 ,...,C t-1 ,C t And S k+L+p+n+1 S k+L+p+n+2 The English spaces are mutually used for spacing.
CN202210505513.2A 2022-05-10 2022-05-10 Garbage classification two-dimensional code generation method based on chaotic encryption Withdrawn CN115358362A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210505513.2A CN115358362A (en) 2022-05-10 2022-05-10 Garbage classification two-dimensional code generation method based on chaotic encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210505513.2A CN115358362A (en) 2022-05-10 2022-05-10 Garbage classification two-dimensional code generation method based on chaotic encryption

Publications (1)

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

Family

ID=84030224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210505513.2A Withdrawn CN115358362A (en) 2022-05-10 2022-05-10 Garbage classification two-dimensional code generation method based on chaotic encryption

Country Status (1)

Country Link
CN (1) CN115358362A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159251A (en) * 2021-04-07 2021-07-23 张琴 Strong-encryption anti-counterfeiting anti-channel conflict commodity code and manufacturing method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113159251A (en) * 2021-04-07 2021-07-23 张琴 Strong-encryption anti-counterfeiting anti-channel conflict commodity code and manufacturing method thereof

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
CN115358362A (en) Garbage classification two-dimensional code generation method based on chaotic encryption
CN100369039C (en) Method for protecting data base data copyright by digital watermark technology and application thereof
CN109977371B (en) Method for generating character type garbage classification code
CN110011783A (en) A kind of encryption and decryption method of Chinese character
CN109657769A (en) A kind of two-dimensional barcode information hidden method run-length coding based
CN108418683A (en) A kind of carrier-free text steganography method based on feature of Chinese characters structure
CN101673282A (en) Automatic positioning system method of electronic map
CN114997353A (en) Garbage classification two-dimensional code generation method based on block encryption
CN115358361A (en) Garbage classification code generation method based on combined encryption
CN114881189A (en) Garbage classification two-dimensional code generation method based on different combination modes
CN104376307A (en) Fingerprint image information coding method
CN109981246A (en) A kind of encryption method and decryption method of character string
CN112183698B (en) Chinese character garbage classification two-dimensional code generation method
CN112183697B (en) Garbage classification two-dimensional code batch generation method
CN1744011A (en) Method for realizing tibetan language input, display and short-message reception and transmission by hand-held electronic terminal
CN114239918B (en) Mobile compression equipment patrol optimizing method based on E2SFCA reachability analysis
Dinan et al. Site selection of a waste incineration plant using integrated fuzzy-ANP and weighted sum-ANP in Qazvin Province, Iran
CN107147088A (en) The control guard method of the isolated island containing distributed power distribution network based on big-dipper satellite
CN1094607C (en) Intelligent phoneme-shape code input method and application thereof
CN111854548A (en) UID code feature extraction method for electronic detonator
CN110276706A (en) It is a kind of on demand matched accurate poverty alleviation information publicity system is disclosed
CN110912563A (en) Data compression optimization method for power battery

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