CN113592514A - Information encoding method, information decoding method and device - Google Patents

Information encoding method, information decoding method and device Download PDF

Info

Publication number
CN113592514A
CN113592514A CN202110874661.7A CN202110874661A CN113592514A CN 113592514 A CN113592514 A CN 113592514A CN 202110874661 A CN202110874661 A CN 202110874661A CN 113592514 A CN113592514 A CN 113592514A
Authority
CN
China
Prior art keywords
matrix
information
target
conversion
transposed
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.)
Pending
Application number
CN202110874661.7A
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.)
Shanghai Institute of Technology
Original Assignee
Shanghai Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Institute of Technology filed Critical Shanghai Institute of Technology
Priority to CN202110874661.7A priority Critical patent/CN113592514A/en
Publication of CN113592514A publication Critical patent/CN113592514A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/70Type of the data to be coded, other than image and sound
    • H03M7/705Unicode

Landscapes

  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses an information encoding method, an information decoding method and a device, comprising the following steps: s110: receiving information to be coded, wherein the information to be coded comprises a code containing N digits with the numerical value range of 1-9; s120: converting N-bit digits in the information to be coded into N conversion matrixes by utilizing the corresponding relation between the conversion matrixes and the digits 0-9, and combining the N conversion matrixes into an information matrix; the transformation matrix adopts 10 matrixes which respectively correspond to 0-9; s130: acquiring a transposed matrix of the information matrix, and superposing the information matrix and the transposed matrix to obtain a target matrix; s140: and respectively coding each element value in the target matrix to form a planar matrix mapping bitmap, and obtaining the target code of the information to be coded. The invention converts the information in a matrix form, combines the information into an information matrix according to a certain rule, combines elements in the information matrix according to a certain transportation rule to obtain a target matrix for mapping a plane lattice, and uses the plane lattice as a coding identifier of the information.

Description

Information encoding method, information decoding method and device
Technical Field
The present invention relates to the field of information encryption technologies, and in particular, to an information encoding method, an information decoding method, and an apparatus.
Background
With the continuous development of economy, the consumption level of residents is continuously improved, and the quality requirement of circulating commodities is higher and higher. However, there are still a large number of counterfeits in the current consumer market, and these counterfeits suffer from a large number of safety and quality problems, not only impairing the consumer's interests, but also compromising the brand public praise of the enterprise. On the other hand, in the circulation process of the commodities, due to the fact that logistics transportation abrasion or artificial damage and the like cause the loss of commodity labels, the commodity labels need to be traced and restored. Therefore, the commodity outer package label printing technology which is convenient, efficient, strong in damage resistance, high in anti-counterfeiting performance and easy to trace is particularly important.
The commodity tracing scheme in the current market comprises the following steps: radio frequency identification technology; (II) a two-dimensional code technology and a laser anti-counterfeiting technology; (III) error correction matrix code based on discretization; and (IV) dot matrix codes. Wherein the radio frequency identification technology has the advantages of pollution resistance and durability, but is not suitable for the fast-moving goods industry with thin profit due to high cost. The two-dimensional code technology and the laser anti-counterfeiting technology have low cost, but do not have the functions of anti-damage and anti-interference and cannot deal with artificial destructive behaviors.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present application provide an information encoding method, an information decoding method, and an information decoding device, where information is converted in a matrix form, and then combined with a certain rule to form an information matrix, elements in the information matrix are combined with a certain transportation rule to obtain a target matrix for mapping a planar lattice, and the planar lattice is used as an encoding identifier of the information.
In a first aspect, the present application provides an information encoding and decoding method, including:
s110: receiving information to be coded, wherein the information to be coded comprises a code containing N digits with the numerical value range of 1-9;
s120: converting N-bit digits in the information to be coded into N conversion matrixes by using the corresponding relation between the conversion matrixes and the digits 0-9, and combining the N conversion matrixes into an information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9;
s130: acquiring a transposed matrix of the information matrix, and superposing the information matrix and the transposed matrix thereof to obtain a target matrix;
s140: and respectively coding each element value in the target matrix to form a planar matrix mapping bitmap, and obtaining the target code of the information to be coded.
Further, the conversion matrix in the step S120 adopts a third-order matrix.
Further, the matrix elements in the third-order matrix have at most one 1, and the rest are 0.
Further, before the step S130, the method further includes, before the step of superimposing the information matrix with the transpose thereof:
and storing the corresponding relation between the conversion matrix and the information matrix, and decoding the target code through the corresponding relation.
Further, in step S140, the method for separately encoding each element value in the target matrix includes:
converting the element with the value of 1 in the target matrix into a first object;
converting the element with the value of 2 in the target matrix into a second object;
and converting the element with the value of 0 in the target matrix into a blank area.
In a second aspect, the present application provides an information decoding method adapted to the information encoding method of the first aspect, the method comprising the steps of:
s210: acquiring the distribution condition of a dot matrix in a plane matrix mapping dot matrix diagram through an image recognition tool, and restoring a target matrix;
s220: judging whether the matrix mapping map is damaged or not through the restored target matrix,
when the target matrix obtained by the reduction is not damaged, the step S230 is performed; when the target matrix obtained by reduction is damaged, restoring the damaged target matrix based on the target matrix being a symmetric matrix, and then entering step S230;
s230: disassembling the target matrix through a preset inverse matrix operation rule, and restoring to obtain an information matrix and a transposed information matrix;
s240: restoring to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by calling a preset information matrix arrangement combination rule; using the corresponding rule of the conversion matrix and the decimal number to restore and obtain an information number sequence and a transposed information number sequence;
s250: and distinguishing the information digital sequence and the transposed information digital sequence by a digital identification technology to obtain the decoded information.
In a third aspect, the present application provides an information encoding apparatus, which employs the method of the first aspect, including: an information receiving unit, a matrix converting unit, a matrix superposing unit and a matrix coding unit,
the information receiving unit is configured to receive information to be coded, and the information to be coded comprises a code containing N digits with the numerical value range of 1-9;
the matrix conversion unit is configured to convert N-bit digits in the information to be coded into N conversion matrixes by using the corresponding relation between the conversion matrixes and the digits 0-9, and combine the N conversion matrixes into one information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9;
the matrix superposition unit is configured to obtain a transposed matrix of the information matrix, and superpose the information matrix and the transposed matrix thereof to obtain a target matrix;
the matrix coding unit is configured to code each element value in the target matrix respectively to form a planar matrix mapping bitmap, and obtain a target code of the information to be coded.
In a fourth aspect, the present application provides an information decoding apparatus, which employs the method of the first aspect, including: the device comprises a matrix restoration module, a damage judgment module, a matrix disassembly module, a sequence restoration module and a digital identification module;
the matrix reduction module is configured to obtain the distribution condition of the dot matrix in the plane matrix mapping dot matrix diagram through an image recognition tool, and reduce the target matrix;
the damage judging module is configured to judge whether the matrix mapping chart is damaged or not through the restored target matrix, and when the restored target matrix is not damaged, the matrix mapping chart is directly input into the matrix disassembling module; when the target matrix obtained by reduction is damaged, the damaged target matrix is restored based on the target matrix being a symmetric matrix, and then the restored target matrix is input to a matrix disassembling module;
the matrix disassembling module is configured to disassemble the target matrix through a preset inverse matrix operation rule, and restore the target matrix to obtain an information matrix and a transposed information matrix;
the sequence reduction module is configured to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by reducing a preset information matrix arrangement combination rule; restoring to obtain an information digit sequence and a transposed information digit sequence by utilizing a corresponding rule of the conversion matrix and the decimal digits;
the digital identification module is configured to distinguish the information digital sequence from the transposed information digital sequence by a digital identification technology to obtain decoded information.
In a fifth aspect, the present application provides a computer storage medium having computer program code stored thereon, which, when run on a computing device, performs the method of the first or second aspect.
In a sixth aspect, the present application provides a computing device comprising:
a processor;
a memory storing computer program code;
the computer program code, when executed by the processor, causes the computing device to perform the method of the first or second aspect.
The technical solutions provided in the embodiments of the present application have at least the following technical effects:
1, the information coding technology provided by the invention has the characteristics of low complexity and high reducibility.
2, the information coding technology provided by the invention can be applied to the coding and labeling of the commodity identity information, and in the circulation process, the commodity identity information can be obtained through specific reverse decoding, and because the coding and the decoding are separated into different processes, the coding information can be recovered even if the coding information is damaged, and the coding safety and the traceability are more facilitated.
3, the invention uses two-dimensional matrix mapping dot matrix to represent the target code, thereby being more beneficial to the real-time decoding processing of the image.
Drawings
Fig. 1 is a flowchart of an information encoding method according to an embodiment of the present application;
FIG. 2 is a diagram of a target matrix and matrix mapped dot matrix according to an embodiment of the present application;
fig. 3 is a flowchart of an information decoding method according to a second embodiment of the present application;
fig. 4 is a block diagram of an information encoding apparatus according to a third embodiment of the present application;
fig. 5 is a block diagram of an information decoding apparatus according to a fourth embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to a fifth embodiment of the present application;
fig. 7 is a mapping dot diagram with year of production provided in example five of the present application.
Detailed Description
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and specific embodiments.
The terms "first" and "second", and the like in the description, claims, and drawings of the present application are used solely to distinguish between different objects and not to describe a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. Such as a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In this application, "at least one" means one or more, "a plurality" means two or more, "at least two" means two or three and three or more, "and/or" for describing an association relationship of associated objects, which means that there may be three relationships, for example, "a and/or B" may mean: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one item(s) below" or similar expressions refer to any combination of these items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b," a and c, "" b and c, "or" a and b and c.
Example one
Referring to fig. 1-2, an embodiment of the present application provides an information encoding method, including:
step S110: receiving information to be coded, wherein the information to be coded comprises codes containing N digits with the numerical value range of 1-9.
The information coding method in the embodiment can be applied to commodity information and is arranged on a commodity outer package. For example, the information about the spraying required for the outer package of the commodity is distributed as follows:
(1) production line sequence number: 0109;
(2) and (3) commodity batch code: 6089;
(3) the production date is as follows: 20210330, respectively;
then the numerical code of the commodity information of the outer package of the commodity is: 2021033001096089.
step S120: converting N-bit numbers in the information to be coded into N conversion matrixes by utilizing the corresponding relation between the conversion matrixes and the numbers 0-9, and combining the N conversion matrixes into an information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9.
The conversion matrix in the step S120 is a third-order matrix. Preferably, the matrix elements in the third order matrix have at most one 1, and the rest are 0.
In this step, the obtained numerical codes of the commodity information are filled into the basic information matrix line by line, 10 sets of third-order matrices M1, M2, M3, M4, M5, M6, M7, M8, M9, M10 are randomly generated,
the M matrix generated in this step includes the following:
Figure BDA0003189924140000061
Figure BDA0003189924140000071
as can be seen, the third order matrix in this step is randomly corresponding to decimal digits 0 to 9, and the rule of correspondence is 10! And generating a plurality of sets of current random corresponding rule information according to the random corresponding rule.
In the corresponding rule, decimal numbers 0-9 respectively correspond to a third-order matrix, wherein one set of corresponding rule can be expressed as follows:
1 corresponds to M1; 2 corresponds to M2; 3 corresponds to M3; 4 corresponds to M4; 5 corresponds to M5; 6 corresponds to M6; 7 corresponds to M7; 8 corresponds to M8; 9 corresponds to M9; 0 corresponds to M10.
The matrix M is associated with the commodity information, which in this example is digitally encoded as: 2021033001096089, the matrix arrangement order of the correspondence rule is: M2M10M2M1M10M3M 10M1M10M9M6M10M8M 9;
arranging the three-order matrix according to a certain combination sequence, wherein the combination sequence from left to right and from top to bottom is selected as follows:
the resulting information matrix is:
Figure BDA0003189924140000072
expressed using a third order matrix as follows:
Figure BDA0003189924140000073
therefore, the embodiment can be known that the conversion matrix is utilized, the optimized three-order matrix randomly corresponds to the digital information, so that the digital information has a plurality of sets of flexibly-converted corresponding rules and is not easy to crack, and the coded information can be decoded only by a specific decoding rule, so that the coded information is not easy to crack.
Step S130: and acquiring a transposed matrix of the information matrix, and superposing the information matrix and the transposed matrix thereof to obtain a target matrix.
Further, the definition of the transpose matrix is to convert the rows of the matrix a into corresponding columns, and the obtained new matrix is called as the transpose matrix of a, and is denoted as AT or a ', so that the first column of the matrix a is used as the first row of the transpose matrix AT or a ', and the first row of the matrix a is used as the first column of the transpose matrix AT or a '. The definition of matrix superposition, which may also be referred to as matrix addition, refers to the operation of adding together corresponding elements of two matrices.
In this step, the transposed matrix of the commodity information matrix in step S120 is acquired,
the information matrix is:
Figure BDA0003189924140000081
transposed matrix
Figure BDA0003189924140000082
Expressed as a third order matrix:
Figure BDA0003189924140000083
in this step, the information matrix A and the transposed matrix are combinedATSuperposition, by matrix operation A + ATB, get the target matrix:
Figure BDA0003189924140000084
the target matrix B is represented by a third order matrix as follows:
Figure BDA0003189924140000091
in step S130, before the information matrix is superimposed with its transpose, the method further includes: and storing the corresponding relation between the conversion matrix and the information matrix, and decoding the target code through the corresponding relation.
Therefore, based on the superposition of the information matrix and the transposed matrix thereof, the embodiment forms symmetrical target coding information based on the symmetrical matrix data in the target matrix, thereby overcoming the defect that the whole set of information of the commodity cannot be acquired due to the loss of part of coding information in the target coding information data.
Step S140: and respectively coding each element value in the target matrix to form a plane matrix mapping dot matrix diagram to obtain the target code of the information to be coded.
In step S140, the method for separately encoding each element value in the target matrix includes:
converting the element with the value of 1 in the target matrix into a first object; converting the element with the value of 2 in the target matrix into a second object; and converting the element with the value of 0 in the target matrix into a blank area. The first object and the second object in this embodiment may be represented by different shapes of graphics, for example, the first object may be rectangular and the second object may be circular. The various figures are not limited to these, and plants and animals can be represented.
Example two
Referring to fig. 3, the present embodiment provides an information decoding method based on an information encoding method of the embodiment. The method comprises the following steps:
step S210: and acquiring the distribution condition of the dot matrix in the plane matrix mapping dot matrix diagram through an image recognition tool, and restoring the target matrix.
In the step, the distribution condition of the dot matrix in the plane matrix mapping dot matrix chart on the outer package of the commodity is obtained through scanning of an image recognition tool.
Step S220: judging whether the matrix mapping map is damaged or not through the restored target matrix,
when the target matrix obtained by the restoration is not damaged, the step S230 is performed; when the target matrix obtained by the restoration is damaged, the damaged target matrix is restored based on that the target matrix is a symmetric matrix, and then the process proceeds to step S230.
Step S230: and disassembling the target matrix through a preset inverse matrix operation rule, and restoring to obtain an information matrix and a transposed information matrix.
Step S240: restoring to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by calling a preset information matrix arrangement combination rule; and restoring to obtain the information digit sequence and the transposed information digit sequence by utilizing the corresponding rule of the conversion matrix and the decimal digits.
Step S250: and distinguishing the information digital sequence and the transposed information digital sequence by a digital identification technology to obtain decoded information, and further obtaining commodity information after the decoded information is obtained. It can be seen that the decoding process of steps S210-S250 in this embodiment is the reverse process of encoding.
EXAMPLE III
Referring to fig. 4, an information encoding apparatus according to an embodiment of the present application is provided, based on the information encoding method in the first embodiment. The device includes:
the information receiving unit is configured to receive information to be coded, and the information to be coded comprises codes containing N digits with the value range of 1-9.
The matrix conversion unit is configured to convert N digits in the information to be coded into N conversion matrixes by using the corresponding relation between the conversion matrixes and the digits 0-9, and combine the N conversion matrixes into one information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9.
And the matrix superposition unit is configured to acquire a transposed matrix of the information matrix, and superpose the information matrix and the transposed matrix thereof to obtain a target matrix.
And the matrix coding unit is configured to code each element value in the target matrix to obtain the target code of the information to be coded.
Further, the information encoding apparatus in this embodiment further includes a storage relationship unit configured to store a correspondence relationship between the N conversion matrices and the information matrix, where the correspondence relationship is used to decode the target code; an auxiliary unit for distinguishing the information matrix from a transposed information matrix.
Example four
Referring to fig. 5, an embodiment of the present application provides an information decoding apparatus, which employs the information decoding method in the second embodiment, and the apparatus includes: the device comprises a matrix restoration module, a damage judgment module, a matrix disassembly module, a sequence restoration module and a digital identification module.
The matrix reduction module is configured to obtain the distribution condition of the dot matrix in the plane matrix mapping dot matrix diagram through an image recognition tool, and reduce the target matrix;
the damage judging module is configured to judge whether the matrix mapping chart is damaged or not through the restored target matrix, and when the restored target matrix is not damaged, the matrix mapping chart is directly input into the matrix disassembling module; when the target matrix obtained by reduction is damaged, the damaged target matrix is restored based on the target matrix being a symmetric matrix, and then the restored target matrix is input to a matrix disassembling module;
the matrix disassembling module is configured to disassemble the target matrix through a preset inverse matrix operation rule, and restore the target matrix to obtain an information matrix and a transposed information matrix;
the sequence reduction module is configured to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by reducing a preset information matrix arrangement combination rule; restoring to obtain an information digit sequence and a transposed information digit sequence by utilizing a corresponding rule of the conversion matrix and the decimal digits;
the digital identification module is configured to distinguish the information digital sequence from the transposed information digital sequence by a digital identification technology to obtain decoded information.
EXAMPLE five
Referring to fig. 6-7, based on the third embodiment and the fourth embodiment, the embodiment of the present application provides an information encoding and decoding system for encoding and decoding the outer package of a commodity, the system includes a server, an information encoding device, and an information decoding device, and the server is wirelessly connected with the information encoding device and the information decoding device respectively.
The information coding device is used for generating an information matrix and transmitting related information to the server through the network, wherein the related information comprises a conversion rule of the conversion matrix and a corresponding rule of the information matrix.
The information decoding device is used for identifying the plane dot matrix image and transmitting relevant information to the server through network transmission, and the relevant information comprises an identification image and commodity information, such as a production year number; the server calls the program instruction stored in the computer to restore the commodity information.
The information encoding device and the information decoding device are further described.
An embodiment of the present application provides a computer storage medium, which stores computer program code, and when the computer program code runs on a computing device, causes the computing device to execute the method according to the first embodiment or the second embodiment.
An embodiment of the present application provides a computing device, including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of embodiment one or embodiment two.
It should be understood that the division of the units of the apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. For example, the above units may be processing elements which are set up separately, or may be implemented by integrating the same chip, or may be stored in a storage element of the controller in the form of program codes, and a certain processing element of the processor calls and executes the functions of the above units. In addition, the units can be integrated together or independently realized. The processing element may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the method or the units above may be implemented by integrated logic circuits of hardware or instructions in the form of software in a processor element. The processing element may be a general purpose processor, such as a CPU, or one or more integrated circuits configured to implement the above method, such as: one or more application-specific integrated circuits (ASICs), or one or more microprocessors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc.
Referring to fig. 6, a schematic structural diagram of a terminal device according to an embodiment of the present application is shown. As shown in fig. 6, the electronic device 50 includes a processor 501, a memory 502, a display 503, and a communication interface 504; the processor 501, memory 502, display 503 and communication interface 504 are interconnected by a bus 505. The electronic device in fig. 6 may be the apparatus for encoding information in the foregoing embodiments.
The memory 502 includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a compact read-only memory (CDROM), and the memory 502 is used for related instructions and data. The communication interface 504 is used for receiving and transmitting data. The processor 501 may be one or more Central Processing Units (CPUs), and in the case that the processor 501 is one CPU, the CPU may be a single-core CPU or a multi-core CPU.
In an embodiment of the present application, there is provided another computer readable storage medium storing a computer program which, when executed by a processor, implements: s110: receiving information to be coded, wherein the information to be coded comprises a code containing N digits with the numerical value range of 1-9; s120: converting N-bit digits in the information to be coded into N conversion matrixes by using the corresponding relation between the conversion matrixes and the digits 0-9, and combining the N conversion matrixes into an information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9; s130: acquiring a transposed matrix of the information matrix, and superposing the information matrix and the transposed matrix thereof to obtain a target matrix; s140: and respectively coding each element value in the target matrix to form a plane matrix mapping dot matrix diagram to obtain the target code of the information to be coded.
Alternatively, the computer program when executed by a processor implements: s210: acquiring the distribution condition of a lattice in a plane matrix mapping lattice map through an image recognition tool, and restoring a target matrix; s220: judging whether the matrix mapping map is damaged or not through the restored target matrix, and entering step S230 when the restored target matrix is not damaged; when the target matrix obtained by reduction is damaged, based on the target matrix being a symmetric matrix, restoring the damaged target matrix, and then entering step S230; s230: disassembling the target matrix according to a preset inverse matrix operation rule, and restoring to obtain an information matrix and a transposed information matrix; s240: restoring to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by calling a preset information matrix arrangement combination rule; using the corresponding rule of the conversion matrix and the decimal number to restore to obtain an information number sequence and a transposed information number sequence; s250: and distinguishing the information digital sequence and the transposed information digital sequence by a digital identification technology to obtain the decoded information.
Finally, referring to fig. 7, fig. 7 is a mapping dot diagram with year of production provided by the embodiment of the present application. As shown in fig. 7, the number is the year of the product production, and is used for system distinguishing the product information from the product transposition information to prevent misreading of the information caused by the product transposition information.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is intended to include such modifications and variations.

Claims (10)

1. An information encoding and decoding method, characterized in that the method comprises the steps of:
s110: receiving information to be coded, wherein the information to be coded comprises a code containing N digits with the numerical value range of 1-9;
s120: converting N-bit digits in the information to be coded into N conversion matrixes by using the corresponding relation between the conversion matrixes and the digits 0-9, and combining the N conversion matrixes into an information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9;
s130: acquiring a transposed matrix of the information matrix, and superposing the information matrix and the transposed matrix thereof to obtain a target matrix;
s140: and respectively coding each element value in the target matrix to form a planar matrix mapping bitmap, and obtaining the target code of the information to be coded.
2. The information encoding method of claim 1, wherein the conversion matrix in the step S120 employs a third-order matrix.
3. The information encoding method of claim 2, wherein at most one matrix element in the third-order matrix is 1, and the others are 0.
4. The information encoding method of claim 1, wherein before the step S130 of superimposing the information matrix with its transpose, further comprising:
and storing the corresponding relation between the conversion matrix and the information matrix, and decoding the target code through the corresponding relation.
5. The information encoding method according to any one of claims 1 to 3, wherein the step S140 of separately encoding each element value in the target matrix comprises:
converting the element with the value of 1 in the target matrix into a first object;
converting the element with the value of 2 in the target matrix into a second object;
and converting the element with the value of 0 in the target matrix into a blank area.
6. An information decoding method adapted to the information encoding method of any one of claims 1 to 5, the method comprising the steps of:
s210: acquiring the distribution condition of a dot matrix in a plane matrix mapping dot matrix diagram through an image recognition tool, and restoring a target matrix;
s220: judging whether the matrix mapping map is damaged or not through the restored target matrix, and entering step S230 when the restored target matrix is not damaged; when the target matrix obtained by reduction is damaged, restoring the damaged target matrix based on the target matrix being a symmetric matrix, and then entering step S230;
s230: disassembling the target matrix through a preset inverse matrix operation rule, and restoring to obtain an information matrix and a transposed information matrix;
s240: restoring to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by calling a preset information matrix arrangement combination rule; restoring to obtain an information digit sequence and a transposed information digit sequence by utilizing a corresponding rule of the conversion matrix and the decimal digits;
s250: and distinguishing the information digital sequence and the transposed information digital sequence by a digital identification technology to obtain the decoded information.
7. An information encoding apparatus, characterized in that the method of any one of claims 1 to 5 is employed, comprising: an information receiving unit, a matrix converting unit, a matrix superposing unit and a matrix coding unit,
the information receiving unit is configured to receive information to be coded, and the information to be coded comprises a code containing N digits with the numerical value range of 1-9;
the matrix conversion unit is configured to convert N-bit digits in the information to be coded into N conversion matrixes by using the corresponding relation between the conversion matrixes and the digits 0-9, and combine the N conversion matrixes into one information matrix; the conversion matrix adopts 10 matrixes which respectively correspond to 0-9;
the matrix superposition unit is configured to obtain a transposed matrix of the information matrix, and superpose the information matrix and the transposed matrix thereof to obtain a target matrix;
the matrix coding unit is configured to code each element value in the target matrix respectively to form a planar matrix mapping bitmap, and obtain a target code of the information to be coded.
8. An information decoding apparatus employing the method of claim 6, comprising: the device comprises a matrix restoration module, a damage judgment module, a matrix disassembly module, a sequence restoration module and a digital identification module;
the matrix reduction module is configured to obtain the distribution condition of the dot matrix in the plane matrix mapping dot matrix diagram through an image recognition tool, and reduce the target matrix;
the damage judging module is configured to judge whether the matrix mapping chart is damaged or not through the restored target matrix, and when the restored target matrix is not damaged, the matrix mapping chart is directly input into the matrix disassembling module; when the target matrix obtained by reduction is damaged, the damaged target matrix is restored based on the target matrix being a symmetric matrix, and then the restored target matrix is input to a matrix disassembling module;
the matrix disassembling module is configured to disassemble the target matrix through a preset inverse matrix operation rule, and restore the target matrix to obtain an information matrix and a transposed information matrix;
the sequence reduction module is configured to obtain a conversion matrix sequence of the information matrix and a conversion matrix sequence of the transposed information matrix by reduction by calling a preset information matrix arrangement combination rule; restoring to obtain an information digit sequence and a transposed information digit sequence by utilizing a corresponding rule of the conversion matrix and the decimal digits;
the digital identification module is configured to distinguish the information digital sequence from the transposed information digital sequence by a digital identification technology to obtain decoded information.
9. A computer storage medium having computer program code stored thereon which, when run on a computing device, performs the method of any of claims 1-6.
10. A computing device, comprising:
a processor;
a memory storing computer program code;
the computer program code, when executed by the processor, causes the computing device to perform the method of any of claims 1-6.
CN202110874661.7A 2021-07-30 2021-07-30 Information encoding method, information decoding method and device Pending CN113592514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110874661.7A CN113592514A (en) 2021-07-30 2021-07-30 Information encoding method, information decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110874661.7A CN113592514A (en) 2021-07-30 2021-07-30 Information encoding method, information decoding method and device

Publications (1)

Publication Number Publication Date
CN113592514A true CN113592514A (en) 2021-11-02

Family

ID=78252966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110874661.7A Pending CN113592514A (en) 2021-07-30 2021-07-30 Information encoding method, information decoding method and device

Country Status (1)

Country Link
CN (1) CN113592514A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101086761A (en) * 2006-06-08 2007-12-12 姜晓航 Efficient information lattice image and its generation and decoding method
CN104751342A (en) * 2015-04-21 2015-07-01 张川 Commodity information coding and decoding method for tracking commodities
CN112688696A (en) * 2021-03-22 2021-04-20 广州慧睿思通科技股份有限公司 Method, apparatus, device and storage medium for finite field coding and decoding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101086761A (en) * 2006-06-08 2007-12-12 姜晓航 Efficient information lattice image and its generation and decoding method
CN104751342A (en) * 2015-04-21 2015-07-01 张川 Commodity information coding and decoding method for tracking commodities
CN112688696A (en) * 2021-03-22 2021-04-20 广州慧睿思通科技股份有限公司 Method, apparatus, device and storage medium for finite field coding and decoding

Similar Documents

Publication Publication Date Title
US9996780B2 (en) Specific bar code and forming method of the same
CN103400174B (en) The coded method of a kind of Quick Response Code, coding/decoding method and system
CN111814962A (en) Method and device for acquiring parameters of recognition model, electronic equipment and storage medium
CN104346640A (en) Two dimensional code and method of creating same
CN108073966B (en) Conversion method of two-dimensional code and hole array code
CA3045391C (en) Method for detection and recognition of long-range high-density visual markers
CN109784956B (en) Agricultural product tracing method based on block chain technology
CN114241499A (en) Table picture identification method, device and equipment and readable storage medium
CN104915698B (en) Chemical producting safety information quick search and complete period tracking digital labelling system
CN112016617A (en) Fine-grained classification method and device and computer-readable storage medium
CN109886059B (en) QR code image detection method based on width learning
CN113592514A (en) Information encoding method, information decoding method and device
CN114021596A (en) Bar code identification method and device based on deep learning
CN110348554B (en) Digital information encoding and decoding method and device, electronic equipment and storage medium
CN109919277B (en) Enciphered colour triangular code coding and decoding method for commodity external package
CN201741328U (en) Product label
CN116630712A (en) Information classification method and device based on modal combination, electronic equipment and medium
CN114610854A (en) Intelligent question and answer method, device, equipment and storage medium
CN115700590A (en) Commodity information representation method and system based on dot matrix image and application thereof
CN111783787B (en) Method and device for recognizing image characters and electronic equipment
CN108280502B (en) QR code capacity improving method and terminal
CN114417998A (en) Data feature mapping method, device, equipment and storage medium
CN113706019A (en) Service capability analysis method, device, equipment and medium based on multidimensional data
CN112561893A (en) Picture matching method and device, electronic equipment and storage medium
CN112016270A (en) Chinese-sensible code logistics information coding method, device and equipment

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