Patent Publication Number: US-2023142587-A1

Title: Method, device and system for storing, encoding and decoding information based on codes with error detection capacity

Description:
FIELD OF THE INVENTION 
     The present invention is comprised in the technical field corresponding to information encoding and decoding technologies and particularly in the field of massage transmission. More specifically, the invention relates to a device for storing information based on codes with error correction capacity, in which the information stored therein may vary dynamically, according to different physical/chemical parameters. 
     The invention is applicable in all those sectors where it is necessary to encode information that can vary dynamically (after encoding) for generating variations on the original message which can be identified as information, regardless the conditions in which it transmits the message. 
     BACKGROUND OF THE INVENTION 
     In recent years, the widespread adoption of communication technologies by society has led to an important breakthrough in mobile and sensor-based communications. More specifically, within sensor technologies it is common to use cameras for obtaining information in the form of images and/or video, as well as in the form of systems for viewing or for the computerised analysis of said information, provided under different visual information processing technologies (for example, in the form of matrix codes, 2D codes, text, photography/video analysis, etc.), and this is also currently highly integrated in society. 
     Within visual analysis technologies, the information in the form of data acquired by sensors (for example, cameras) must be processed by information encoding and decoding systems, wherein a plurality of devices are in charge of reading said encoding automatically. In the specific case of visual codes (for example, barcodes or QR or “Quick Response” codes), the information is encoded with visual patterns typically forming a matrix code. The visual information stored in said matrix code is captured by a camera and then stored in digital storage means, wherein said information corresponds with the reading of the visual information. In this situation, wherein there is no human intervention, it must be ensured that the information that is encoded is consistent with the information that is decoded, without losses being generated or distortion of information. In this context, if the decoding process is altered (for example, if the message has been corrupted), then the information that is decoded will not be truthful or correct. 
     There are also a number of lines of research that are extensively dedicated to error detection and correction for preserving the integrity of the decoded information and in recent years have provided various technical solutions for assuring the quality of the processed information, even when errors are produced in the visual information (for example, text corrections or corrections of images captured by the cameras). Therefore, in said technologies, decoding processes also capable of correcting the detected errors, re-establishing the information to a recognisable state. As an example, a word with no meaning in a particular text character recognition process can be “translated” to a word with meaning, close to the received word. 
     In general, visual information correction systems are fundamentally based on the concept of “distance” between the processed information with errors and the corresponding information without errors. Therefore, by means of the mentioned use of distances between information sequences, different protocols for acting on the information analysed by the system, such as detecting the errors occurred (for example, when the distance is greater than or equal to a preestablished threshold value), or correcting the mentioned errors (for example, by correcting the identified errors if the minimum distance is less than said threshold), can be established on a processed code. 
     In general, the probability of many errors occurring in a given information sequence (or “word”) in a code is much less than the probability of few errors occurring in the same word. This fact is generally used as an argument for using error detection and/or correction (for example, Reed-Solomon algorithms in the case of QR codes) for encoding new information, instead of for correcting the potential errors detected. In processes of this type, a number of documents mostly related to the use of matrix codes in error detection and/or correction systems, such as the patent applications ES 2257480 T3, US 7373581 B2, US 20120188442 A1, US 6685095 B2 or ES 2355423 T3, must be mentioned. 
     Although the mentioned visual information error correction technologies are generally aimed at replacing said errors with an encoding with meaning, no alternative techniques which provide enhanced information by utilising the presence of said errors in the processed information are known at present in the technical field. In this sense, it is desirable to find new methods for encoding which allow improved messages to be generated with respect to the known alternatives, based on the generation of errors in a controlled and interpretable manner on the encoded visual information. The present invention provides a solution to this need by means of a novel method for visual encoding information, as well as a system implementing said method. 
     BRIEF DESCRIPTION OF THE INVENTION 
     As described in the preceding section, the present invention is mainly based on utilising the information associated with errors dynamically caused on a code, said errors being considered useful information, such that are utilised the capacities for detecting and/or correcting said errors in a code for extending the valid words thereof, for encoding additional information. That is, the invention essentially proposes a method and a system for encoding information, incorporating same on a visual code, and decoding same, wherein instead of using error detection and correction for restoring the message to its original state, it is used at first for extending the set of valid words and thus being able to extend the interpretation of the message according to the errors which have deliberately damaged it. Enhanced information is thereby generated in said message, thereby enhancing the capacities and functionalities of the code used. 
     In this context, a first aspect of the present invention relates to a device for storing encoded visual information with error detection capacity, comprising at least two physical layers, one of which is permanent or invariable (for example, printed through unalterable (particularly, unerasable) means, such as for example permanent ink) and contains a visual code with error correction capacity, and at least one layer that is variable according to particular physical or chemical conditions and is superimposed on the permanent layer. The device thereby provides enhanced information coming from the decoding the information comprised in the two layers and encoded in a cooperative manner. 
     In a preferred embodiment of the invention, the static layer of the device can comprise any type of visual encoding registered on means in a permanent manner, such as printed text or QR code, a data matrix code or BIDI code, among others, such that the device is capable of storing information (which may or may not be encrypted) both in the static layer and through the interpretation of the errors generated on the static layer by the dynamic layer or layers. 
     Likewise, in a second aspect, the present invention relates to a method for manufacturing the mentioned device, and particularly to a method for creating the dynamic layers that are superimposed on the permanent or invariable layers. 
     A third aspect of the invention further relates to a method for reading or decoding the information contained in the device for storing encoded visual information corresponding to the first aspect of the invention. Said method for decoding can be applied as a rapid information reading/decoding system which is furthermore independent of light conditions, the reading position, etc., capable of revealing the information that may appear dynamically in the device of the first aspect of the invention. 
     In a fourth aspect, the invention relates to computer programs implementing either the method for creating dynamic layers or else the method for decoding of the second aspect of the invention. 
     A fifth aspect relates to the system capable of carrying out the method for decoding of the second aspect of the invention. 
     The preceding aspects of the invention are more specifically summarised in the set of claims attached to the present document. 
     The methods for encoding and decoding of the invention, as well as the device and system carrying out said methods, represent an improvement with respect to the systems and methods of the state of the art, by using the errors present in a visual code as useful information that can also be generated and encoded for subsequent decoding thereof. In practice, the invention, therefore, provides, among others, the following improvements:
     a) It allows the capacity of storing information in a device that is equivalent in size and appearance to a visual code to be enhanced. The known methods for decoding visual codes only allow the static or invariable information to be extracted (in very rigid and sometimes unreliable reading conditions) on the colour of the sensors. In the case of the present invention, it is possible to store additional information in the dynamic layers which are superimposed on the layer with static or invariable information.   b) The capacity of determining the presence or absence of an ink component corresponding to the presence of a chemical or biological element can be performed much more quickly in the method of the present invention, and the application of further image analysis for locating the areas that do or do not contain colour can be prevented.   c) By encoding the colour in a preferred embodiment of the invention, the method of decoding allows the error to be interpreted as a measurement of the variation in the reading due to light conditions and prevents having to use external lights. To that end, one of the physical layers of the device of the invention can comprise one or more regions coloured in an unalterable manner by way of colour control or reference for analysing the variation of the colour of another of the physical layers of the device. The proposed invention thereby allows the real colour reading to be ensured.   d) It can prevent the need to add special markers in the sensors to orient the reading by utilising the orientation providing visual codes, such as QR codes, for example.   

     Throughout the present description, there is provided a series of terms which will be interpreted as follows in the scope of the invention: 
     “Alphabet” is understood to mean a finite set of symbols  = {a 1 , ... , a q } wherein the number q is referred to as “root of   
     A “word” of length n is understood as a juxtaposition of n symbols: a = a i1 a i2  ... a in , a ik  ∈  The set of all the chains of length n (or “n-chains”) and by  the set of all the words that can be formed with the symbols of the alphabet  
     
       
         
           A 
         
       
     
     is referred to as  i.e.,  = ∪ n∈ℕ     
     Given an alphabet  with root q, a “q-ary code” on  is referred to as a subset,  of 
     
       
         
           
             A 
             * 
           
         
       
     
     
       
     
     The elements of C are called codewords (or datawords) or simply “words”. The “size”, M, of the code indicates the number of elements it contains, M = |C|. 
     If all the words of the code have fixed length n, C will be referred to as “block code” with parameters (n,M) or C is an “(n,M)-code”. If C is not a block code, then it is a code of variable length. 
     In the present invention, the term “code” refers to a set C, formed by words of length n, such that from q symbols, it is possible to obtain q n  different words. That is, given a code C, the quantity of words the code contains is denoted as M or |C|, and M ≤ q n  always. 
     When establishing communication between an emitter and a receiver, the purpose of any code is to allow the emission and reception of messages. In the context of the invention, the term “message” refers to a set of words of a code. 
     After emitting a word, it can be said that the word received “contains an error” when it differs by at least one symbol of the emitted word. Therefore, if two codewords differ by a distance d, d errors are needed to convert one to the other. A valid metric for measuring the distance between two words is the so-called “Hamming distance”. 
     “Error correction” is understood to mean any method capable of converting a sequence of symbols not forming a codeword into the closest codeword. In that sense, “distance” between two words will be understood to mean any metric which allows the differences between two words to be measured. Therefore, the word closest to a word c 0  will be that word having the smallest distance to c 0 . 
     The “minimum distance” of a code will be the minimum difference between any two words thereof. 
     The most well-known example of codes that allow error correction are the codes obtained by the simple parity method, whereby an additional bit is added to each group of bits (word), which will be 0 or 1 depending on whether the number of 1 contained in the word is even or uneven. In that sense, it can be said that a code “allows error correction” or that it “has error detection capacity” when it is possible to transform the received word into the correct word of the code with the detection and correction system upon emitting a (valid) word and receiving another different (invalid) word. By way of example, a code Callows k errors to be correct if any two words c 1  and c 2  having a Hamming distance less than k coincide. In other words, in that case, a code allows k errors to be corrected if and only if the Hamming minimum distance, d m , between any two words therein is at least k+1 (d m 2≥ 2k+1). An example code which allows error correction is formed by the Reed-Solomon codes commonly used in QR codes. 
     The “error generation” or “error injection” concepts will be used to refer to any method by means of which are intentionally added sequences of symbols that do not form a valid word (or equivalently do not belong to the code) of a message. These sequences of symbols do not necessarily have to have a length equal to n. 
     Particularly, the “dynamic error generation” concept refers to the technique capable of generating errors in controlled or predefined positions under dynamic conditions. 
     “Error condition” will be understood to mean the interpretation given to an error generated or injected in a particular position, particularly as a result of the occurrence of errors as a result of the changes occurring in a dynamic layer. That is, if any type of change occurs in the dynamic layer (for example, after a reagent reacting upon contact with a chemical compound), then the information that would be detected by the error correction algorithm appears, giving rise to an error condition causing the method for decoding of the invention to activate the reinterpretation of said error. 
     The graphic depiction of a message can be defined as a “visual code”. If that message is encoded in a code with error correction capacity, it will be referred to as “visual code with error correction capacity”. Examples of visual codes with error correction capacity are barcodes, BIDI codes, a QR code or codes. In the context of the present invention, “visual code”, or where appropriate “visual code with error correction capacity”, will be understood to mean an element or device comprising the graphic depiction of an encoded message, particularly the printed graphic depiction. 
    
    
     
       DESCRIPTION OF THE DRAWINGS 
       A brief description of each of the figures used to complete the following description of the invention is provided below. Said figures expressly relate to preferred embodiments of the invention which are presented as non-limiting examples thereof. 
         FIG.  1    shows a block diagram depicting the main steps of the method for encoding of the invention according to a preferred embodiment thereof. 
         FIG.  2    shows a block diagram depicting the main steps of the method for decoding of the invention according to a preferred embodiment thereof. 
         FIG.  3    shows a preferred embodiment of the invention, wherein a QR type code having part of its code configured with ink which dynamically changes colour in the presence of a reagent is used. The QR code furthermore has three regions in its corners coloured with non-alterable reference colours which are known prior to analysing the colour information of the QR. These colours therefore serve as “control” colours for purposes of analysing the colour change of the dynamic layer as a result of the reagent present in the ink. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     In a first aspect, the present invention relates to a device for storing encoded visual information with error detection capacity, comprising at least two superimposed physical layers:
     a first unalterable static layer comprising the graphic depiction of a message encoded in a code with error correction capacity;   one or more dynamic layers, the graphic depiction of which may vary, generating errors on the message of the first layer.   

     In this context, the dynamic layers represent an “extended code”, with an extension of the encoded information in the static layer being understood as such, wherein said extended code can be read by corresponding reading means (preferably, computerised optical recognition means for recognising the information present in said layers). Therefore, if the error induced by a change in the dynamic layer causes the word of the code (for example, 01001001110) to become a word that is not in the code (for example, 01001001111), when the error is detected, the word is reinterpreted with two meanings: on one hand, 01001001110 (correction of 01001001111 in the code) will be interpreted. And on the other hand, if 01001001111 belongs to the extended code, it will be interpreted as the word of the extended code or, otherwise, as the word of the extended code that corrects (the closest one) to 01001001111. This extension becomes effective during the method for decoding, which recognises this additional information which is interpreted, therefore enhancing the information that was encoded in the static layer. Therefore, in a preferred embodiment of the invention, the device always comprises a static layer and at least one dynamic layer. 
     In a preferred embodiment of the invention, at least one of the dynamic layers of information of the device comprises one or more chemical and/or biochemical components, which can modify the optical properties or opacity thereof according to the environmental conditions to which they are subjected and/or to the addition of external reagents. The information provided by the dynamic layer could thereby be read and interpreted by the optical recognition means. 
     In a more preferred embodiment of the invention, at least one of the dynamic layers of information is formed by enzymes, antibodies or by colorimetric substrates, understanding as such chemical and/or biochemical components selected for the development of colorimetric sensors on paper, in solution or on any polymeric support which allows the viewing or reading of the colorimetric change. As an example of said support, can be considered any analyte used in “screening” type test strips or the analytes used in immunochromatographic strips, particularly peptides or polymers. 
     In another preferred embodiment of the invention, the information contained in the layers making up the device can be encrypted, in order to ensure that it could only be extracted if there is a corresponding decryption code. 
     In a second aspect, the present invention relates to a method of manufacturing the device of the invention and its dynamic layers, configured for generating errors on the visual code contained in the static layer, thereby enhancing the information providing the device. In the mentioned method, from a visual code comprising static metainformation (i.e., of the static layer), the method for creating dynamic layers of the invention comprises generating a graphic depiction from what will be referred to as encoding the “erroneous information”, in which an extended code is generated by means of which the error information is associated with a particular meaning, which allows words with errors (defined in the error condition) and the different positions of the visual code in which the material that is dynamically altered should be located to be interpreted. 
     Preferably, the method for encoding of the invention comprises the following steps ( FIG.  1   ), which can be performed as many times as there are dynamic layers contained in the device:
     Selecting one or more positions of the visual code of the static layer in which information can be stored such that they introduce code-correctable errors.   Defining one or more error conditions, which will determine the interpretation made of the error according to the position in which said error is detected.   Generating the extended code with the encoding the metainformation generated in the previous step.   

     Each of the steps of the method is described in greater detail below:
     Generating a visual code comprising static metainformation (static layer):
   In this step, which is optional since the method can start from previously created visual codes, the information is converted to valid words for the code The words that are generated in this step will have to be valid for the code and will depend on the visual representation of the encoding used: QR codes, BIDI codes, barcodes, etc. From a practical point of view, in this step information relating to the specific field to which the invention is applied in a given embodiment (for example, a product batch, date, server access URLs, etc.) is typically encoded and can optionally be encrypted.   
   Selecting positions of the visual code of the static layer in which information can be stored: 
   As previously described, “position” in a visual code is understood to mean a point or region identified by coordinates (x,y), located in the area in which the visual code is represented, whether it is a data area or an error protection area. Visual codes with error correction capacity usually have fixed positions dedicated to the synchronisation, orientation, etc., so in different embodiments of the invention, these positions can optionally be discarded.   From the rest of the positions, those positions which, when modified, introduce code-correctable errors, are selected. These positions are stored and will be the positions that will subsequently contain the means altered by physical or chemical conditions.   
   Defining error conditions: 
   In this step, metainformation defining error conditions and the meaning that these conditions will have is introduced. Once the basic information to be stored in the visual code is created, it is necessary to decide how to interpret said conditions with each error, depending on the position in which this occurs. That is, the type of modifications associated with each code position, that the words encoded in the dynamic layer can undergo is defined in this step. Subsequently, the interpretation of each of the possible modifications is defined.   In one embodiment of the invention, in which the error committed upon reading the colour of the sensor implemented in a QR code is to be interpreted, the following could be performed:
   i) The information (codewords) that will contain the visual code, as well as the corresponding colours, is defined in the static layer. This information can be related to the company, batch and other logistic characteristics.   ii) The information defined in the previous step is encoded by means of a given encoding protocol (for example, a conventional protocol for Reed-Solomon type QR codes), the codewords of which will be at least partially replaced in the areas of protection against QR errors.   iii) Likewise, some codewords will be printed in the QR with non-sensing ink and others with sensing ink. Therefore, the codewords printed with sensing ink may experience a colour variation with respect to the codewords marked with non-sensing ink.   iv) When the QR is subject to optical recognition, the codewords will be decoded by means of the Reed-Solomon protocol, specifying the distance existing between the colour read and the colour with which it was originally printed. This gives the reference distance to be applied at the time of reading (light conditions, camera conditions, etc., and correction factors could optionally be applied), and the percentage of variation with respect to the original colour is analysed.   
   
   Generating the extended code with the encoding of the metainformation generated in the previous step: 
   In this step, the information of the errors generated in the previous step (metainformation) must be associated with the layer of information contained in the static layer, specifying how the set of detected errors must be interpreted. The extended code which confers validity to certain information marked as erroneous during the decoding of the message in the receiver is thereby constructed.   In a particular embodiment of the invention, the method is completed with a step of the physical generation, particularly printing or deposition, of the dynamic layer which will deposit the alterable means in those previously selected positions. This physical generation will preferably be performed by means of printing each of the superimposed layers forming the device, using chemical or biochemical components. Therefore, for the example based on the colour error analysis described above, the error condition is created by adding a dynamic layer on the static layer such that, with sensing ink, are printed areas which have a colour that changes over time (for example, in the presence of a bacterium, gas, chemical agent, etc.), such that new information about the encoded information appears in the visual code of the static layer which, therefore, acquires a new meaning when interpreted as an error condition.   
   

     In a third aspect, the present invention also relates to a method of decoding information contained in the device of the invention, comprising the identification of words marked with error and their correction, by first using a word of the code and then a word of the extended code. More specifically, said method comprises the following steps:
     Selecting a word marked as an error.   Analysing the error:
   Returning the word of the code with the one having a smaller distance with respect to the word selected in the first step.   
   Interpreting the error: 
   Returning the word of the extended code having a smaller distance with respect to the word selected in the first step.   
   

     The method of decoding is fundamentally based on the analysis of the message when said message is read, as well as in the extraction of the words encoding same (see  FIG.  2   ). If the words are not marked with errors, then the word is considered valid and, therefore, their interpretation or meaning will be unique. If, on the other hand, the word is marked with an error, then it is possible to correct same (in the event that the code allows error correction) and replace it with a word of the code that is valid and in respect of which it is separated the least (said analysis can be based, for example, on the Hamming distance). Additionally, and according to the method proposed by the invention, a layer of metainformation associated with a dynamic layer which will generate errors in the encoded information and allows said errors to be interpreted and each word validated is created during the encoding phase. During the decoding process, instead of ignoring errors and correcting the erroneous word(s), they will be considered valid within the subcode. 
     In a particular embodiment, the algorithm used for error correction is a Reed-Solomon type algorithm. Likewise, in another particular embodiment in which the information contained in the device of the invention is encrypted, the method of decoding also comprises the decryption of that information. 
     A fourth object of the invention relates to a computer program comprising instructions for carrying out the method for creating dynamic layers of the invention and/or the method for decoding of the invention. Said object can thereby be performed in the form of source code, object code or in an intermediate code between source code and object code, such as in a partially compiled form or in any other form suitable for use in the implementation of the processes according to the invention. Particularly, computer programs also comprise cloud applications implementing the method for creating dynamic layers of the invention and/or the method for decoding of the invention. Said programs can be arranged on or within a support suitable for reading, referred to as “carrier means” or simply, “carrier”. The carrier means can be any entity or device capable of carrying the program. When the program is incorporated in a signal that can be transported directly by a cable or other device or means, the carrier means can consist of said cable or other device or means. As a variant, the carrier means may be an integrated circuit in which the program is included, with the integrated circuit being adapted for executing or for being used in the execution of the corresponding processes. 
     By way of example, the programs can be incorporated in storage means, such as a ROM memory, a CD ROM memory or a ROM semiconductor memory, a USB memory, or a magnetic recording medium, for example, a floppy disk or a hard disk. Alternatively, the programs could be supported in a transmittable carrier signal. For example, it could be an electrical or optical signal that may be transported through an electric or optical cable, by radio or by any other means. 
     A fifth aspect of the present invention relates to a system for reading encoded visual information with error detection capacity, which allows the information contained in the devices of the invention, particularly the devices created by superimposing one or more dynamic layers created with the method for creating dynamic layers of the invention on a visual code with error correction capacity, to be decoded, and comprising the means needed for carrying out the method for decoding of the invention. 
     More specifically, the system of the invention preferably comprises:
     Means for capturing or acquiring images.   Information processing means suitable for executing instructions configured for carrying out the method for decoding of the invention.   Optionally, at least one external server and communication means configured for connecting the system to said external server and allowing the exchange of information between both.   

     Examples of means for capturing images may vary between a digital camera, CCD sensors or infrared code readers. In a preferred embodiment, the system for reading codes of the invention comprises a CCD sensor. 
     As an example of information processing means, can be used any processor with capacity to execute the program instructions implementing the method for decoding of the invention. 
     The system can perform processing of decoding without having to exchange information with any other external computational element (such as data servers, for example). However, in other particular embodiments of the invention, the system can also comprise one or more servers and communication means between same. Examples of said communication means are communication devices using WIFI or Bluetooth, or USB connections, among others. In another particular embodiment, the system comprises a communication antenna that allows access to other computing environments (networks) through research or commercial protocols for data exchange in communication networks, including the Internet. 
     Lastly, in another optional embodiment, the system further comprises data output means on which information can be shown, such as a display, for example. 
     Another object of the invention relates to computer-readable storage means, comprising program instructions capable of causing a computer to carry out the method for creating dynamic layers of the invention and/or the method for decoding of the invention. 
     Lastly, a final object of the invention relates to transmittable signals comprising program instructions capable of causing a computer to carry out the method for creating dynamic layers of the invention and/or the method for decoding of the invention. 
     According to the objects of the invention described above, several examples of applying said objects are described below:
     Method for colour control: 
   Another direct application of the invention is being able to have control means for devices using cameras to read information associated with colour. Said application allows deviations in reading the colour occurring due to the light conditions as a result of the substrate of the inks used, the paper, the process of manufacturing the camera, algorithms for compressing the image captured through the camera, etc., to be corrected. In this context, as a result of the interpretation of the error information in the reading, the invention makes it possible to correct said colour information in the form of metainformation. As an example of this application and for the correct interpretation of the colour information, in a preferred embodiment of the invention it is possible to carry out a method of validating colour by means of one or more reference colours. For this purpose, it is possible to use a QR code equipped with one or more regions coloured with said reference colours, which are preferably non-alterable. In addition to these regions, the QR will have another part of its code configured with ink which will dynamically change colour in the presence of a reagent (following the general embodiment of the invention). The reference colours can be previously known when analysing the colour information of the QR, thus serving as “control” colours for the purpose of analysing their colour change as a consequence of the reagent present in the ink.     FIG.  3    of the present document shows, by way of illustration, the analysis of a QR code configured with a pattern of three reference colours in its corners: 0x0000FF (blue), 0x00FF00 (green) and 0xFF0000 (orange). When the image of said QR code is scanned (for example, obtaining said image by means of the camera of a mobile device), the colour information of the corners is perceived as 0x00113F (blue), 0x003510 (green) and 0xF23001 (orange). Therefore, if the mobile device is configured with the reference information of said colours, it can calculate deviations in colour reading caused by light conditions, the parameters of the camera itself, etc., and which are not strictly due to the dynamic alteration of the colours of its sensitive layer. As a result of the reference colours, a software application in charge of analysing the information could interpret the rest of the message of the QR code, using the information of the corners and the differences obtained in their reading by way of calibrating colour of the camera. Accordingly, said calibration will allow the colour change of the central region of the QR code to be determined with greater precision (for example, by applying the variation obtained with a Reed-Solomon algorithm).   
   Method of obtaining useful data for diagnosis:
   Another application of the invention is its use for obtaining useful information for medical diagnosis, and more specifically, its use in the development of kits for diagnosing diseases or disease markers which allow information to be obtained in situ and in time real. There are a number of systems on the market, for example immunochromatographic test strips, lab-on-chip devices, etc., which can benefit from a device according to the invention.   
   Smart packaging: 
   In another particular embodiment, the invention can be used in a packaging which incorporates at least one device for encoding, characterised in that at least one of the dynamic layers of the code is formed by a chemical or biochemical compound that can alter its optical properties or opacity, according to the physical or chemical conditions produced inside and/or outside the packaging. By way of example, a packaging according to the invention can consist of a transparent film for vacuum packaging or packaging in a controlled atmosphere, having a code of the invention printed on its inner part, and in which said visual code contains a first static layer of information with data relating to the packaged product (packaging date, type of product, etc.), and a second dynamic layer formed by a chemical compound that reacts in the presence of oxygen and achieves opacity when the level of oxygen inside the bag exceeds a particular threshold.   
   Pregnancy test:
   In another particular embodiment, by means of the devices of the invention can be improved the application of the pregnancy test based on the presence of the hormone called human chorionic gonadotropin (hCG). The test determines the presence or absence of this hormone in urine, with the conclusion of whether or not the woman is pregnant.   
   

     In this case, a QR code printed on a test strip is used, with some biochemically modified bits with the anti-hCG monoclonal and polyclonal antibodies, together with the colorimetric indicator and produced by a sandwich type assay, an agglutination inhibition assay or a lateral flow immunoassay. If the immunological reaction occurs, the test is positive and there is a colour code to inform the person of the result.