The invention generally relates to encoding and decoding data, and more specifically, to a method of encoding and decoding a table of data elements on a matrix code symbol.
Nowadays, matrix code symbols such as, barcodes are printed on various magazines, books, advertisement hoardings, and newspapers. These matrix code symbols provide additional information to users regarding magazines or books. Conventional barcodes such as, a one-dimensional barcode is configured as a single row of bars having varying thickness. The one-dimensional barcode is readable along a single axis. Upon reading the one-dimensional barcode, the row of bars may be decoded to represent data such as, textual information. However, the one-dimensional barcode has small storage capacity due to number of bars and spaces used by the barcode to represent the textual information such as, numerals.
In order to store more amount of data, two-dimensional barcodes may be used. The two-dimensional barcodes are also known as matrix code symbols. A two-dimensional barcode includes a grid or a matrix of black and white pixels, representing binary “0s” and “1s”. Further, the amount of data stored by the two-dimensional barcode is more than the amount of data stored by the one-dimensional barcode. However, the two-dimensional barcode may consume a significant amount of space for representing the data.
Therefore, there is a need for a method of encoding and decoding data on a matrix code symbol that reduces the amount of space required for representing the data on the matrix code symbol.
The accompanying figures, where like reference numerals refer to identical or functionally similar elements throughout the separate views and which together with the detailed description below are incorporated in and form part of the specification, serve to further illustrate various embodiments and to explain various principles and advantages all in accordance with the present invention.
Skilled artisans will appreciate that elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions of some of the elements in the figures may be exaggerated relative to other elements to help to improve understanding of embodiments of the present invention.
Before describing in detail embodiments that are in accordance with the present invention, it should be observed that the embodiments reside primarily in combinations of method steps and apparatus components related to a method of encoding and decoding data on a matrix code symbol. Accordingly, the apparatus components and method steps have been represented where appropriate by conventional symbols in the drawings, showing only those specific details that are pertinent to understanding the embodiments of the present invention so as not to obscure the disclosure with details that will be readily apparent to those of ordinary skill in the art having the benefit of the description herein.
Explanation provided in the detailed description section, includes procedures, steps, logic blocks, processing, and other symbolic representations of operations on data bits within a computer memory. A procedure, computer-executed step, logic block, process, etc., is here, and generally, conceived to be a self-consistent sequence of steps or instructions leading to a desired result. The steps described herein require physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated in a computer system. Further for ease of description, these signals are referred as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be noted, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely labels applied to these quantities for ease of description. Unless specifically stated otherwise as apparent from the following explanation, it is appreciated that throughout the present invention, explanation utilizing terms such as “receiving”, “converting”, “encoding”, “extracting”, “creating”, “adding”, “retrieving”, “detecting”, “identifying”, “generating”, “decoding” or the like, refer to the actions and processes performed by a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
By way of example, and not limitation, computer-usable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data.
Various embodiments of the invention provide a computer implemented method of encoding and decoding data on a matrix code symbol. A first aspect of the invention is to provide a computer implemented method of encoding data on the matrix code symbol. The method includes receiving the data in a form of a table of data elements. A data element of the table of data elements includes one or more characters. The one or more characters may include, but are not limited to, an alphabet, a numeral, a special character, and an alpha-numeric character. The table of data elements includes one or more rows of data elements. The table of data elements also includes one or more columns of data elements. The method further includes converting the table of data elements into a string of characters. Thereafter, the string of characters is encoded on the matrix code symbol.
A second aspect of the invention is to provide a computer implemented method of decoding data from a matrix code symbol. A string of characters is initially retrieved from the matrix code symbol. The string of characters is then converted into a table of data elements representing the data.
In order to encode the table of data elements, encoder 102 may use one or more character encoding schemes. Examples of the one or more character encoding schemes include, but are not limited to, the American Standard Code for Information Interchange (ASCII), Unicode, Morse code, ECC200 ASCII encoding, and ISO-8859-1 scheme. Thus, encoder 102 encodes the table of data elements and stores it on matrix code symbol 104 using the one or more character encoding schemes. In order to store the encoded table of data elements on matrix code symbol 104, the encoded table of data elements may be transformed into a format that can be graphically encoded on matrix code symbol 104. For example, the encoded data is transformed to “0”s and “1”s to store it on matrix code symbol 104.
Decoder 106 is configured to retrieve the table of data elements by decoding the encoded table of data elements stored on matrix code symbol 104. Examples of decoder 106 may include, but is not limited to, a device, a circuit, a software program, a scanner, a data matrix reader, and an algorithm. Decoder 106 uses a character decoding scheme corresponding to the one or more character encoding schemes used by encoder 102 to retrieve the table of data elements.
As shown in
In an embodiment, each data element may be extracted from the table of data elements on a row-by-row basis. For example, each data element is extracted from Table 1 on a row-by-row basis in the following order:
Alternatively, each data element may be extracted from the table of data elements on a column-by-column basis. For example, each data element is extracted from Table 1 on a column-by-column basis in the following order:
Once each data element is extracted from the table of data elements, a string of characters is created from the set of extracted data elements at step 404. The string of characters is created by adding an identifier associated with each extracted data element to the set of extracted data elements. The identifier represents a location of each data element in the table of data elements. For example, an identifier “11” is added to an extracted data element “Day/Time” which may be represented as “11 Day/Time”. Identifier “11” indicates that data element “Day/Time” is extracted from first row and first column of Table 1. Similarly, identifiers “12”, “13”, “21”, “22”, “23”, “31”, “32”, and “33” are added to extracted data elements “8-10”, “10-12”, “Saturday”, “Study”, “Lab”, “Sunday”, “Study”, and “Lab” respectively.
While creating the string of characters, one or more special characters may also be added to each data element of the set of extracted data elements. The one or more special characters may include, but are not limited to, “\”, “*”, “̂”, and “&”. It will be evident to a person skilled in the art that any other special characters may be added while creating the string of characters. The one or more special characters are added to each extracted data element for indicating the beginning of each extracted data element. In an embodiment, the one or more special characters may be added at the beginning of each extracted data element. In this case, the one or more special characters may act as a delimiter for each extracted data element. For example, two special characters “\\” are added at the beginning of extracted data elements “Day/Time”, “8-10”, “10-12”, “Saturday”, “Study”, “Lab”, “Sunday”, “Study”, and “Lab”. In addition, the one or more special characters may be added at the end of the first extracted data element. The addition of the one or more special characters at the end of the first extracted data element indicates a beginning of a table of data elements. For example, a special character “̂” is added at the end of the last extracted data element “Lab”. By adding identifiers and one or more special characters to each extracted data element of Table 1, a string of characters is created in the following form:
\\11 Day/Time \\12 8-10 \\13 10-12 \\21 Saturday \\22 Study \\23 Lab \\31 Sunday \\32 Study \\33 Lab ̂
Alternatively, the one or more special characters such as, a special character “̂” may be added at the beginning of the last extracted data element. The addition of the one or more special characters at the beginning of the last extracted data element indicates the end of a table of data elements. In a scenario, the one or more special characters may be added both at the beginning of the first extracted data element and at the end of the last extracted data element.
In another embodiment, an identifier “R” is added to an extracted data element “Day/Time” which is represented as “R Day/Time”. Identifier “R” indicates that data element “Day/Time” is extracted from first row of Table 1. Further, an identifier “C” may be added to an extracted data element “8-10” which is represented as “C 8-10”. Identifier “C” indicates that data element “8-10” is extracted from a second column of Table 1. Further, a special character “̂” may also be added at the beginning of each extracted data element of Table 1. In this case, special character “̂” may act as a delimiter for each extracted data element of Table 1. In another embodiment, a combination of an identifier and a special character such as “̂E” may be added at the end of the last extracted data element “Lab” which indicates the end of table of data elements. By adding identifiers and a special character to each extracted data element of Table 1, a string of characters is created in the following form:
̂R Day/Time ̂C 8-10 ̂C 10-12 ̂R Saturday ̂C Study ̂C Lab ̂R Sunday ̂C Study ̂C Lab ̂E
In an embodiment, a table of data elements in which the data elements may be multi-lingual. In such a case, one or more rows of the table of data elements may be in Arabic and one or more columns of the data elements may be in English. Further, each data element is extracted from the table of data elements to obtain a set of extracted data elements. Once data elements are extracted, a string of characters is created from the set of extracted data elements. The string of characters is created by adding an identifier associated with each extracted data element to the set of extracted data elements. While creating the string of characters, one or more special characters are also added to each data element of the set of extracted data elements.
Upon creating the string of characters, the string of characters is encoded on the matrix code symbol as explained in conjunction with
The data encoded on a matrix code symbol needs to be retrieved, so the data is decoded from the matrix code symbol.
As shown in
\\11 Day/Time \\12 8-10 \\13 10-12 \\21 Saturday \\22 Study \\23 Lab \\31 Sunday \\32 Study \\33 Lab ̂
In this case, two special characters “\\” are detected at the beginning of data element “Day/Time”. The one or more special characters detected at the beginning of the string of characters indicate a beginning of the string of characters. Alternatively, the one or more special characters may be detected at the end of the string of characters. In this case, the one or more special characters indicate the end of the string of characters. For example, a special character “̂” detected at the end of the string of characters shown above, indicates an end of the table of data elements corresponding to the string of characters. In an embodiment, the one or more special characters may be detected both at the beginning of the string of characters and at the end of the string of characters.
Further, one or more identifiers are identified from the string of characters at step 604. An identifier of the one or more identifiers indicates a location of a corresponding data element in the table of data elements. For example, an identifier “11” is identified from the string of characters which indicates a location of data element “Day/Time”. The identifier “11” indicates a first row and a first column of the table of data elements.
Once the one or more identifiers are identified, one or more data elements are extracted from the string of characters at step 606. For example, data elements extracted from the string of characters are “Day/Time”, “8-10”, “10-12”, “Saturday”, “Study”, “Lab”, “Sunday”, “Study”, and “Lab”. Thereafter, at step 608, the table of data elements is generated using the one or more extracted data elements and identifiers associated with each extracted data element. For example, a table of data elements is generated as shown in Table 2.
After receiving the table of data elements to be encoded, the table of data elements may be saved in memory 702. The table of data elements is retrieved from memory 702 by processor 704. Further, processor 704 converts the table of data elements into a string of characters. In order to convert the table of data elements into the string of characters, processor 704 extracts each data element of the table of data elements to obtain a set of extracted data elements. In an embodiment, each data element may be extracted from the table of data elements on a row-by-row basis. In another embodiment, each data element may be extracted from the table of data elements on a column-by-column basis. Upon obtaining the set of extracted data elements, processor 704 adds an identifier associated with each extracted data element to the set of extracted data elements. The identifier associated with each data element represents a location of each data element in the table of data elements. This is explained in conjunction with
Further, processor 704 adds one or more special characters associated with each extracted data element to the set of extracted data elements. The one or more special characters may include, but are not limited to, “\”, “*”, “̂”, and “&”. It will be evident to a person skilled in the art that any other special characters may be added while creating the string of characters. The one or more special characters are added to each data element for indicating the beginning of the each extracted data element. The one or more special characters may act as a delimiter for each extracted data element. In an embodiment, one or more special characters may be added at the beginning of each extracted data element. The one or more special characters thus added indicate a beginning of a table of data elements. Alternatively, the one or more special characters may be added at the end of the last extracted data element. The one or more special characters added in this case indicate the end of a table of data elements. In an alternate embodiment, the one or more special characters may be added both at the beginning of the first extracted data element and at the end of the last extracted data element.
Upon adding identifiers associated with each extracted data element of the set of extracted data elements and adding the one or more special characters to the set of extracted data elements, processor 704 creates a string of characters. The string of characters created by processor 704 is saved in memory 702. Thereafter, processor 704 encodes the string of characters on the matrix code symbol. Processor 704 may use a character encoding scheme for encoding the string of characters on the matrix code symbol. Examples of the one or more character encoding schemes may include, but are not limited to, the American Standard Code for Information Interchange (ASCII), Unicode, Morse code, ECC200 ASCII encoding, and ISO-8859-1 scheme.
In an embodiment, a table of data elements is encoded into a string of characters using an encoder. Upon encoding the table of data elements into the string of characters, encoder 700 encodes the string of characters on the matrix code symbol.
In an embodiment, the one or more special characters may be detected at the beginning of each data element of the string of characters. In addition, the one or more special characters may be detected at the beginning of the string of characters. The detected one or more special characters indicate a beginning of the string of characters. Alternatively, the one or more special characters may be detected at the end of the string of characters. The one or more special characters thus detected indicate the end of the string of characters. In a scenario, the one or more special characters may be detected both at the beginning of the string of characters and at the end of the string of characters.
Upon detecting the one or more special characters, processor 804 identifies one or more identifiers from the string of characters. An identifier of the one or more identifiers indicates a location of a corresponding data element in the table of data elements. Further, processor 804 extracts one or more data elements from the string of characters. Thereafter, processor 804 generates a table of data elements using the one or more data elements extracted from the string of characters and identifiers associated with each data element of the one or more data elements. The table of data elements generated by processor 804 is stored in memory 802.
In an embodiment, a string of characters is decoded from a matrix code symbol using a decoder 800. Upon decoding the string of characters from the matrix code symbol, decoder 800 decodes a table of data elements from the string of characters.
Various embodiments of the method described herein facilitate in encoding and decoding data represented as a table of data elements on a matrix code symbol. The method includes converting the table of data elements into a string of characters and encoding the string of characters on the matrix code symbol. The string of characters includes one or more special characters as delimiters. Storing of the data in the form of the string of characters in the matrix code symbol facilitates in increasing capacity of storing data on the matrix code symbol.
Those skilled in the art will realize that the above recognized advantages and other advantages described herein are merely exemplary and are not meant to be a complete rendering of all of the advantages of the various embodiments of the present invention.
In the foregoing specification, specific embodiments of the present invention have been described. However, one of ordinary skill in the art appreciates that various modifications and changes can be made without departing from the scope of the present invention as set forth in the claims below. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present invention. The benefits, advantages, solutions to problems, and any element(s) that may cause any benefit, advantage, or solution to occur or become more pronounced are not to be construed as critical, required, or essential features or elements of any or all of the claims. The present invention is defined solely by the appended claims including any amendments made during the pendency of this application and all equivalents of those claims as issued.