Chemometric models for spectroscopic devices

WO2026175787A1PCT designated stage Publication Date: 2026-08-27TRINAMIX GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/EP2026/054070
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-20
Filing Date
2026-02-16
Publication Date
2026-08-27

Smart Images

  • Figure EP2026054070_27082026_PF_FP_ABST
    Figure EP2026054070_27082026_PF_FP_ABST
Patent Text Reader

Abstract

The invention is in the field of chemometric models for spectroscopic devices. It relates to a portable computing device comprising: a. an interface for receiving spectroscopic data, b. an interface for receiving a chemometric model in text format, c. a processor for converting the chemometric model in text format into a native chemometric model which is executable on the processor and for generating chemometric data by executing the native chemometric model with the spectroscopic data as input, and d. an interface for outputting the chemometric data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Chemometric Models for Spectroscopic Devices

[0002] The invention is in the field of chemometric models for spectroscopic devices. It relates to a portable computing device, a method for processing spectrometric data, a non-transient computer-readable medium including instructions that, when executed by one or more processors, cause the one or more processors to perform a method for processing spectrometric data, and a server.

[0003] Background

[0004] Mobile spectrometers are a powerful tool to quickly and reliably obtain information about a material. In order to provide meaningful information to a user, a chemometric model is required to transform the raw data obtained from the spectrometer into chemometric data, i.e. an information related to the composition of the measured object. The model will be updated regularly, for example to account for new reference data or for changes of the measured subjects. A simple approach would be to operate the model in a cloud, so the spectrometers send for each measurement their spectrum to the cloud and receive the chemometric data back. However, this approach requires that the spectrometer has a permanent internet access with sufficient band width. In many cases, this cannot be ensured, for example in case of agricultural applications in the field where no internet access exists or the connection is slow and unstable. Hence, the chemometric model needs to be accessible if there is temporarily no internet access. The chemometric model may be executed by a portable computing device like a smartphone. However, various operating systems and versions make it very difficult to provide an appropriate chemometric model correctly for each device.

[0005] US 2024 / 0044801 A1 discloses machine-learning models trained with spectroscopy data. The models may be transferred to edge spectroscopy devices. However, there is still the need for more flexibility and efficiency.

[0006] Summary

[0007] In one aspect the disclosure relates to a portable computing device comprising:

[0008] a. an interface for receiving spectroscopic data,

[0009] b. an interface for receiving a chemometric model in text format,

[0010] c. a processor for converting the chemometric model in text format into a native chemometric model which is executable on the processor and for generating chemometric data by executing the native chemometric model with the spectroscopic data as input, and

[0011] d. an interface for outputting the chemometric data.

[0012] In another aspect the disclosure relates to a method for processing spectrometric data comprising:

[0013] a. receiving spectroscopic data by a portable computing device,b. receiving a chemometric model in text format by the portable computing device,

[0014] c. converting the chemometric model in text format into a native chemometric model which is executable on the portable computing device,

[0015] d. generating chemometric data by executing the executable native model on the portable computing device with the spectroscopic data as input and

[0016] e. outputting the chemometric data.

[0017] In another aspect the disclosure relates to a non-transient computer-readable medium including instructions that, when executed by one or more processors, cause the one or more processors to perform a method comprising: a. receiving spectroscopic data,

[0018] b. receiving instructions for a chemometric model in text format,

[0019] c. converting the chemometric model in text format into a native chemometric model which is executable on a portable computing device,

[0020] d. generating chemometric data by executing the native chemometric model with the spectroscopic data as input and

[0021] e. outputting the chemometric data.

[0022] In another aspect the disclosure relates to a server comprising:

[0023] a. A communication interface to a portable computing device,

[0024] b. a memory for storing a chemometric model in text format, and

[0025] c. a processor for providing the chemometric model in text format via the interface to the portable computing device,

[0026] wherein the portable computing device is configured to convert the chemometric model in text format into a native chemometric model which is executable on the portable computing device.

[0027] Distributing chemometric models in text format to portable computing devices offers the advantage of platform independence, as text can be converted into native executable code by various operating systems or software versions, reducing the need to develop multiple versions of a chemometric model. Text files are smaller in size compared to binary files, which reduces bandwidth requirements and allows for faster, more reliable updates, even in areas with limited or unstable internet connectivity. Additionally, text format allows for straight-forward encryption and digital signatures, enhancing the security of the model by ensuring its authenticity and integrity.

[0028] Furthermore, distributing models in text format provides flexibility in updates, as small text files can be easily downloaded and converted into executable code, keeping the model up-to-date without extensive reinstallation. The human-readable nature of text formats improves debugging and maintenance, while collaboration among developers is facilitated. Resource optimization is another advantage, as devices can tailor the execution of the model to their specific hardware and software configurations, ensuring efficient performance. This method also offers scalabilityacross a wide range of portable computing devices and proves to be cost-effective by reducing multiple versions and data transmission requirements.

[0029] The term "portable computing device” may refer to a device having dimensions and weight which allow a human to carry the portable computing device without major physical effort. The portable computing device may be a smartphone, a tablet or a wearable. The wearable may be a wristwatch, a wristband, a hearing aid, a ring, a belt, a necklace, an ankle band, a thigh band, or a forearm band.

[0030] The portable computing device has an interface for receiving spectroscopic data. The interface may be configured to receive spectroscopic data. The interface may be an interface to receive spectroscopic data from a data storage, for example a memory of the portable computing device or a memory of a remote computing device. The interface for receiving spectroscopic data may be an interface to a spectroscopic device. The interface may be configured to trigger the spectroscopic device to measure an object and in response to triggering the spectroscopic device to receive spectroscopic data from the spectroscopic device.

[0031] The portable computing device may comprise a spectroscopic device, for example as spectroscopic device module. The spectroscopic device module may be fully integrated into the portable computing device, i.e. all parts of the spectroscopic device are contained in the portable computing device. Parts of the spectroscopic device module, for example the processor, may be shared with other functionalities in the portable computing device. An interface to the integrated spectroscopic device may be a physical connection, for example a bus like I2C bus or USB.

[0032] Alternatively, one or more than one components of the spectroscopic device may be physically placed outside the portable computing device and may be communicatively coupled to the portable computing device. The portable computing device may contain a communication interface, for example a telecommunication interface or a Bluetooth interface. The communication interface may enable data flow between components of the spectroscopic device outside the portable computing device and the portable computing device.

[0033] The portable computing device comprises memory. The term "memory” may refer to an electronic component or subsystem which can be used to store and retrieve data. Memory may be read-only memory (ROM), random-access memory (RAM), or non-volatile memory like a hard disc, a solid-state drive or flash memory.

[0034] The portable computing device comprises an interface for receiving a chemometric model. The interface may be configured to receive a chemometric model. The interface may be a communication interface, for example a communication interface to a server or a memory. The communication interface may be a telecommunication interface, for example an interface to a telecommunication network. The communication interface may also be an interface to a local internet access point, for example a Wi-Fi communication interface or a network cable. Theinterface for receiving a chemometric model may be the same interface as the interface for receiving spectroscopic data or a different one.

[0035] The term "spectroscopic device” may refer to an apparatus which is capable of recording spectroscopic data of an object. The spectroscopic device may be a spectrometer or a device into which a spectrometer is integrated. The spectroscopic device may be portable or stationary, for example a laboratory device. A portable spectroscopic device may be a hand-held spectroscopic device or a module which is integrated into a portable computing device like a smartphone, a tablet or a wearable like a smartwatch. A portable spectroscopic device may be communicatively coupled to a computer device, for example a cloud computer or a smartphone. Such computer device may be configured to execute a chemometric model.

[0036] The term "spectroscopic data” may refer to data comprising intensity values, wherein each intensity value is indicative of the intensity of the electromagnetic radiation in at least a part of its spectral range. The spectroscopic data may hence contain a set of value pairs, wherein a pair contains a value indicative of the spectral range, i.e. the wavelength or the wavelength range of the electromagnetic radiation, and a value indicative of the corresponding intensity of the electromagnetic radiation. Hence, the spectroscopic data may comprise a spectrum of electromagnetic radiation. The spectroscopic data may contain the direct output values of the sensors, sometimes referred to raw data, or it may contain adjusted values, for example corrected with calibration coefficients.

[0037] The term "electromagnetic radiation” may refer to radio waves, microwaves, infrared light, visible light, ultraviolet light, X-rays, or gamma rays. Infrared light may be near-infrared with a wavelength of 0.75 to 1.4 pm, shortwavelength infrared with a wavelength of 1.4 to 3 pm, mid-wavelength infrared with a wavelength of 3 to 8 pm, long-wavelength infrared with a wavelength of 8 to 15 pm or far infrared with a wavelength of 15 to 1000 pm. For example, spectroscopic data may comprise intensity values for electromagnetic radiation of wavelength in the range of 760 nm to 3 pirn, for example in the range of 1 to 2.5 m.

[0038] The spectroscopic data may be received directly or indirectly from a spectroscopic device. Directly may refer to receiving the spectroscopic data via a data link, for example a cable or a wireless communication interface. Indirectly may refer to receiving the spectroscopic data from a storage device where the spectroscopic data from a spectroscopic device has been stored to. The spectroscopic device may be a device separate to the device on which the spectroscopic data is processed. The spectroscopic device may be part of the device on which the spectroscopic data is processed, for example as spectroscopic device built into a portable computing device such as a smartphone, a tablet or a smartwatch.

[0039] The spectroscopic device may comprise a radiation source. The term "radiation source” may refer to a device that generates and / or emits electromagnetic radiation, for example electromagnetic radiation in the wavelength range described above. The radiation source may be configured for illuminating an object. The radiation source may be orcomprise a thermal radiator or a semiconductor-based radiation source. The at least one semiconductor-based radiation source may be a light emitting diode (LED) or a laser, in particular a laser diode. The thermal radiator may be an incandescent lamp or a thermal infrared emitter.

[0040] The spectroscopic device may be configured to generate spectroscopic data. The spectroscopic data may hence be received from the spectroscopic device. The spectroscopic device may contain a photosensitive detector. The term "photosensitive detector” may refer to a device which generates an electrical signal in response to receiving electromagnetic irradiation. The photosensitive detector may contain one or more than one photosensitive region, wherein each photosensitive region may generate a separate electrical signal indicative for the intensity of the electromagnetic irradiation impinging onto the photosensitive region.

[0041] The photosensitive detector may be an inorganic camera element, such as an inorganic camera chip, a CCD chip or a CMOS chip. The photosensitive detector may comprise a photoconductive material, in particular an inorganic photoconductive material, especially selected from lead sulfide (PbS), lead selenide (PbSe), germanium (Ge), indium gallium arsenide (InGaAs, including but not limited to ext. InGaAs, i.e. InGaAs which exhibits a spectral response up to 2.6 pm), indium antimonide (InSb), or mercury cadmium telluride (HgCdTe or MCT).

[0042] The photosensitive detector may contain multiple photosensitive regions, for example an array of photosensitive regions, wherein electromagnetic radiation of different wavelength impinges on the photosensitive regions. For this reason, the spectroscopic device may contain a dispersive element, such as a prism or a grating. The spectroscopic device may contain one or more than one optical filters, for example a linear variable filter or multiple filters transmit different wavelengths of the electromagnetic radiation for different photosensitive regions. The dispersive element or the filter may be arranged such that electromagnetic radiation of different wavelength impinges on the multiple photosensitive regions. The photosensitive detector may contain multiple photosensitive regions, wherein the photosensitive regions are covered by filters, wherein the filters transmit electromagnetic radiation of different wavelengths.

[0043] The photosensitive detector may contain only one photosensitive region. Light of different wavelength may impinge on this one photosensitive region at different points in time. For this reason, the spectroscopic device may contain an interferometer, for example a Michelson interferometer. The interferometer may be arranged such that it receives the incoming electromagnetic radiation and directs the electromagnetic radiation having passed the interferometer to the photosensitive region. The interferometer may also be placed between the radiation source of the spectroscopic device and the object to be measured, so the wavelength of the electromagnetic radiation received by the spectroscopic device varies with time.

[0044] The electric signal from the detector may be analog or digital. If it is analog, it may be converted into a digital signal. Therefore, the spectroscopic device may contain an analog-to-digital converter (ADC). The spectroscopic device maycontain a microcontroller. The microcontroller may contain ADC functionality. The microcontroller may provide the spectroscopic data. The spectroscopic data may contain some or all of the electric signals. The spectroscopic data may further contain the wavelength or wavelength range of the electromagnetic radiation associated with the electric signal. The information about the wavelength or wavelength range may be obtained by identifying which photosensitive region the electric signal originates from and a stored value indicating a wavelength or wavelength region for this photosensitive region, for example by providing the filter information of the filter on the particular photosensitive region.

[0045] The spectroscopic device may be operationally coupled to a processor, such as a microcontroller or a processor outside the spectroscopic device, for example the CPU of a portable computing device which the spectroscopic device is integrated into. The processor may be configured to execute code to apply calibration coefficients.

[0046] Calibration coefficients may relate to values usable for correcting the output of the spectroscopic device to compensate for fabrication imperfections or drifts over time. Calibration coefficients may need a change from time to time to adjust to changes like said drift. In order to do so, the spectroscopic device needs to execute a calibration. Calibration can be performed in various ways.

[0047] Calibration may involve a reference target which is measured instead of a sample. A reference target may have a highly reproducible reflectance behavior. The reference target may have a high reflectivity within the wavelength range of the spectroscopic device, sometimes also referred to a white reference target. Other reference targets may be applied, for example reference targets with a characteristic reflectance behavior which is different for different wavelengths. The reference target may be a separate piece which needs to be placed in front of the spectroscopic device. Alternatively, the spectroscopic device comprises a reference target. In this case, the spectroscopic device may contain optics capable of directing radiation from the radiation source to the reference target and which is further capable of directing radiation reflected by the reference target to the photosensitive detector.

[0048] Calibration may be performed by directing radiation from the radiation source directly onto the photosensitive detector. The spectroscopic device may hence comprise optics capable of directing radiation from the radiation source to the photosensitive detector, for example a mirror or a lens. In case of a mirror, it is possible to use the characteristic reflectance of the mirror for calibration. The spectroscopic device may contain a window which partially transmits the radiation from the radiation source to the sample and partially reflects the radiation from the radiation source to the photosensitive detector. The window may comprise or consist essentially of or consist of an optical glass, for example silica glass, phosphate glass, aluminosilicate glass, or silicon. Many of such materials exhibit Fresnel reflection characteristics, i.e. a window containing said materials may reflect radiation at certain wavelengths in well-defined ratios which are often independent of the temperature. During sample measurement, such reflected radiation may be subtracted from the measurement, or it may be blocked by optics, for example a shutter or an aperture.Calibration involving a reference target or directing radiation from the radiation source directly onto the photosensitive detector yields a detector signal which can be correlated to the known intensity of the incoming radiation. This correlation may be used to generate calibration coefficients. The calibration coefficients may be used to correct the detector signals.

[0049] Calibration may be performed by avoiding any incoming radiation onto the photosensitive detector, sometimes also called dark calibration. Avoiding incoming radiation may involve removing any sample from the spectroscopic device, switching off the radiation source or blocking any incoming light, for example by an aperture or a shutter.

[0050] Alternatively, the spectroscopic device may contain one or more than one photosensitive detectors which never receive any incoming radiation, for example by covering them with an absorbing or reflecting material. The signal of a photosensitive detector which temporarily or permanently does not receive any incoming radiation may be used as background signal. The background signal may be subtracted from the signal upon measurement. The background signal may also serve to determine calibration coefficients. The calibration coefficients may be used to correct the detector signals.

[0051] A calibration may be triggered by the application. A measurement request submitted by the application to the interface may contain a request to calibrate prior to the measurement, for example as a flag or parameter to the request function call. The interface may provide a separate function call to the application for triggering a calibration request. The request for a calibration may comprise which kind of calibration is requested, for example a white or a dark calibration as described above.

[0052] The spectroscopic device may determine if a calibration is required, for example prior to a measurement upon receiving a measurement request. In this case, the processor is configured to determine if calibration of the spectroscopic device is required and if so trigger a calibration.

[0053] Chemometric data may be determined by employing a chemometric model. The term "chemometric model” may refer to a model which is parameterized to receive spectroscopic data as input and output the chemometric data. The chemometric model may be parameterized to receive spectroscopic data, object data or environmental data as input and output the chemometric data. In this case, the spectroscopic data and the object data or the environmental data may be used to determine the chemometric data. The chemometric model may be parameterized to receive spectroscopic data as input and output intermediate chemometric data. Intermediate chemometric data may be chemometric data which has been determined without taking into account the object data or the environmental data. The intermediate chemometric data may be adjusted or corrected using the object data and environmental data, for example by employing a refining model. The refining model may be a data-driven model which may be trained with historic data for adjusting or correcting intermediate chemometric data. A refining model may be a multivariate linear or polynomial regression model or it may be an artificial neural network.The chemometric data obtained from the chemometric model may be associated with one or more than one characteristic, for example at least two or at least three characteristics. A chemometric model which outputs more than one characteristic may be referred to as multilabel chemometric model. A multilabel chemometric model may contain several partial chemometric models, wherein each partial chemometric model may be configured to translate a spectrum to one characteristic. The multilabel chemometric model may be configured to merge the chemometric data obtained from the at least two partial chemometric models, for example to output one vector comprising values for each characteristic.

[0054] A chemometric model may comprise a pre-processing method and a machine learning model to obtain the chemometric data. A chemometric model may comprise a pre-processing method, a feature selection filter and a machine learning model. If the chemometric model comprises two or more partial chemometric models, each partial chemometric model may comprise a separate pre-processing method, a feature selection filter and a machine learning model. Alternatively, the partial models may use the same pre-processing method or feature selection filter.

[0055] A chemometric model may comprise a pre-processing method. The term "pre-processing” may refer to a method to reduce or eliminate interferences from a spectrum such as stray light, noise or baseline drift to enhance the subsequent machine learning. Hence, the pre-processing method may be applied before the machine learning method. Pre-processing may include one or more of baseline correction, scatter correction, smoothing, scaling, aggregation.

[0056] A chemometric model may comprise a machine learning method. The term "machine learning method” may refer to a model which translates spectroscopic into corresponding chemometric data. The machine learning method hence may use spectroscopic data as input and derive chemometric data therefrom. The machine learning method may be considered as an integral part of the chemometric model. Machine learning methods may be supervised, semisupervised or unsupervised. Machine learning methods may include multivariate calibration, classification, pattern recognition, clustering, ensemble methods, neural nets and deep learning, or multivariate curve resolution.

[0057] A chemometric model may comprises a feature selection filter. The term "feature selection filter” may refer to a method to select those parts of the spectrum with a correlation to the chemometric data. A feature selection filter may facilitate the machine learning method of the chemometric model and thus avoid overfitting and reduce the number of required training datasets. A feature selection filter may use a spectroscopic data input, remove all unselected parts and output a spectrum with only the selected parts left. Hence, the output of the feature selection filter may be a spectrum in form of a vector of lower dimensionality than the input vector. The output of the feature selection filter can be used as input for the machine learning method. Hence, the feature selection filter may be applied before the machine learning method. The input of the feature selection filter may be the received spectroscopic data or it may be the pre-processed spectrum, preferably the pre-processed spectrum. Hence, the feature selection filter may be applied after the pre-processing method.A chemometric model may be a trained chemometric model. Training may comprise adjusting parameters of the chemometric model such that the output of the chemometric model most closely fits to historic chemometric data associated with the spectroscopic data. Often, training comprises minimizing a loss or cost function, for example a least mean square value of chemometric model output to provided chemometric data. The complete set of received spectra and associated chemometric data may be used for training or parts thereof. A trained chemometric model may be validated chemometric model. Validation may be done with parts of the historic chemometric data associated with the spectroscopic data not used for training. Alternatively, cross-validation may be applied, for example K-fold cross-validation, leave-one-out cross-validation, stratified cross-validation.

[0058] The chemometric model is received in text format. The term "text format” may refer to the encoding of data using characters and symbols of human-readable text. Common standards for text encoding include American Standard Code for Information Interchange (ASCII), Unicode Transformation Format (UTF), ISO-8859 Series such as ISO-8859-1 (Latin-1) or Windows-1252. Text format data structures may be represented in plain text files or strings within a programming environment, allowing for easy interpretation and manipulation by both humans and machines. Text format may include plain text, comma-separated values (CSV), tab-separated values (TSV), JavaScript Object Notation (JSON), JavaScript (js), hypertext markup language (HTML), extensible markup language (XML), YAML, markdown, LaTeX, INI files, resource description framework (RDF), Tom's obvious, minimal language (TOML) or symbolic expressions. Text format may also include formats which are related to text files, for example MessagePack which is related to JSON. Text format data structures may be designed to ensure compatibility across different platforms and applications, facilitating data interchange or integration within diverse computing environments.

[0059] The chemometric model in text format may comprise a description of a chemometric model text format. Hence, the chemometric model may comprise a description of a preprocessing method, a description of a machine-learning method and / or a description of a feature selection filter. The description may be provided as a series of textual commands directed to describe the chemometric model or parts thereof.

[0060] The chemometric model in text format may be compressed. The term "compression” may refer to the process of reducing the size of data by encoding information more efficiently, thereby minimizing the amount of storage space or bandwidth required to store or transmit the data. Compression algorithms may identify and eliminate redundancies to represent the same data in fewer bits. Preferably, compression algorithms are loss-less, i.e. can be decoded to yield exactly the same data as was encoded. Compression algorithms may employ dictionary-matching or entropy coding like Huffman coding. Common examples of compression algorithms include ZIP, GZIP, BZIP2, LZ4, LZ77, LZ78, and LZW.

[0061] The complete chemometric model in text format may be in one text format. Alternatively, different parts of the chemometric model may be in different text formats. For example, the preprocessing method may be encoded in aJSON format and the machine learning method may be in a format specific for machine learning, for example open neural network exchange (ONNX), predictive model markup language (PMML), TensorFlow text proto or TorchScript. Using specific text formats for different parts of the chemometric model may have the advantage that generally available resources, e.g. program libraries, can be utilized reducing the requirement to provide resources specific to the chemometric model which can save administrative effort, band-width and memory usage.

[0062] The chemometric model in text format may comprise a validity tag indicating the validity of the chemometric model. The validity tag may verify that the chemometric model in text format has not been altered or corrupted during transmission or storage and that it adheres to specific standards and protocols. The validity tag may verify data integrity, i.e. enables the detection of any modifications or corruptions of the chemometric model in text format. The validity tag may verify data authenticity, i.e. it enables the verification that the chemometric model in text format is received from a legitimate source. The validity tag may verify data completeness, i.e. it enables verification that all necessary elements of the chemometric model in text format are present and accounted for. The validity tag may verify data consistency, i.e. it enables verification that the chemometric model in text format adheres to predefined formats and standards. The validity tag may verify data up-to-dateness, i.e. it enables verification that the chemometric model in text format is in the most recent version to ensure that all necessary updates are applied. The validity tag may be or may comprise a checksum, a hash function, in particular a crypto-secure hash function like SHA-256 or MD5, a digital signature, a certificate issued by a trusted entity, a version control like a version number, a time stamp or a time period within which the chemometric model may be used.

[0063] The chemometric model in text format may be validated, for example after having been received, by determining its validity using the validity tag. If validation fails, chemometric model in text format may be rejected, i.e. it may not be converted into a native chemometric model. Alternatively or additionally, the chemometric model in text format may be validated before the native chemometric model is executed, for example in case the validity tag includes a time period in which the chemometric model may be used, it may be validated if the execution time point is within the time period indicated by the validity tag and the native chemometric model may only be executed if validation is successful.

[0064] The chemometric model in text format may be received in encrypted. Encryption may be symmetric, for example using advanced encryption standard (AES), data encryption standard (DES) or triple DES. Encryption may be asymmetric, for example using the Rivest-Shamir-Adleman (RSA) algorithm or elliptic curve cryptography (ECC). Encryption may be implemented by the transmission channel, for example TLS / SSL or PGP. The chemometric model in text format may be provided as an encrypted file. In this case, the chemometric model in text format may be decrypted prior to conversion to a native chemometric model.

[0065] The chemometric model in text format is converted into a native chemometric model. The term "native chemometric model” may refer to a chemometric model in native code. The term "native code" may refer to code which isexecuted directly by a processor of the portable computing device without requiring any intermediate translation or interpretation. Native code may be specific to the architecture and instruction set of the target processor. Native code may ensure optimal performance and efficient utilization of the hardware resources of the portable computing device. Native code may be or may comprise machine-level instructions that the processor can process directly, thereby eliminating the need for additional software layers, such as virtual machines or emulators, to execute the code.

[0066] Converting the chemometric model in text format into a native chemometric model may comprise one, more than one or all of the following steps. The chemometric model may be parsed and subjected to lexical and semantic analysis to ensure it follows the correct syntax and logic. Intermediate code may be generated, optimized, and translated into machine code specific to the target processor. The machine code may be linked with other required modules and libraries. The native code may be tested and / or validated to ensure it performs as expected.

[0067] Conversion may be performed by a compiler, a parser, optimization tools, a linker, an integrated development environment (IDE), and / or a debugger.

[0068] The chemometric model in text format may be received in response to a request. The request may be sent from the portable computing device for which the chemometric model is desired to the server. For example, a user of the spectroscopic device may enter, such as via a graphical user interface on a portable computing device, the need to measure a certain substance in a certain object. The portable computing device may not have a chemometric model for such use case, so it sends a request to the server for providing a chemometric model. A request may be sent when a validity check of the chemometric model failed, for example because it is expired or corrupt. A request may also be sent periodically, for example every three months or every year.

[0069] The chemometric model in text format may be received from the server triggered by the server. The server may send the chemometric model in text format in response to a trigger event. The trigger event may be the availability of a new version of a chemometric model. The server may broadcast the chemometric model in text format to all portable computing devices or it may send the chemometric model in text format only to those portable computing devices which are registered to have access to such chemometric model in text format.

[0070] The native chemometric model may be executed on a processor of the mobile computing device. The native chemometric model may receive spectroscopic data as input and output chemometric data.

[0071] The term "chemometric data” may refer to data associated with a physical or chemical characteristics of an object. Chemometric data may hence contain parameters representing physical or chemical characteristic of the object. Physical characteristics may comprise thermal characteristics, for example the temperature, the thermal conductivity or the specific heat capacity; the macroscopic or microscopic state of matter, for example the degree of crystallinity; optical characteristics, for example refractive index, optical conductivity or absorption coefficients; electricalcharacteristics, for example electrical conductivity or dielectric constant. Chemical characteristics of an object typically refer to the chemical composition of the object comprising the material composition, for example the type and the concentration of certain chemical compounds such as the water content; the molecular structure of an object, for example the presence of functional groups like carbonyl groups or hydrogen bonds; the molecular weight, for example the degree of polymerization of a polymer; the state of matter, for example the degree of crystallinity or the aggregate state, for example in a disperse phase.

[0072] Chemical characteristics may further comprise biomarkers if the measured object is a living organism, in particular a human. Biomarkers may be chemical compounds found in the body which are indicative for a certain condition of the body like a disease, the fitness level or an intoxication condition. Examples for biomarkers are blood components, for example the blood glucose level, the oxygen level in blood or the blood alcohol level; skin components like moisture level or lipid content; metabolites like uric acid or degradation products of drugs in urine; protein biomarkers like cancer proteins or proteins of a virus. The chemometric model may been optimized for a group of people or it may be optimized for one person, i.e. it has been trained with training data from one particular person. Alternatively, the chemometric model has been trained with training data from multiple persons, but has been retained with training data from one particular person. In particular in the later case, the chemometric model may contain sensitive medical information and hence needs to be shielded against unauthorized access.

[0073] Chemometric data may comprise one physical or chemical characteristic of the object or more than one, for example the concentration of two chemical compounds in a sample. A physical or chemical characteristic can be variable, it can assume any value in a certain range, for example a concentration, or it can be categorial, for example the type of fiber in a fabric.

[0074] A chemometric model may be designed to determine fitness and health information from a spectrum of the skin of a person, for example the hydration level of the skin, the blood glucose or lactose content of the skin, or the blood alcohol concentration. The result may be used to make recommendations to the user, for example to drink water according to the hydration level of the skin or adjust the training program according to the lactose level in the blood.

[0075] A chemometric model may be designed to analyze agricultural products, food or feed from a spectrum of an agricultural product, for example a fruit, vegetable, meat, dairy product; food, for example bread, sauces, sausages, sweets; feed like fodder or forage. For example the chemometric model may determine a relevant content, for example the sugar or protein content. The result may be used to make recommendations, for example the expected date for harvesting to a farmer or a suitable recipe for a cook.

[0076] A chemometric model may be designed to determine information related to recycling from a spectrum of an object to be recycled, for example a plastic object like a bottle or a metal object like a can. For example, it may be determined which material the object is made of, for example polyethyleneterephthalate (PET) for a bottle. The result may beused to make recommendations, for example the most suitable way for recycling the object or the most convenient place put the object so it can be recycled.

[0077] A chemometric model may be designed to determine product quality in a production process. Determining product quality may mean determining parameters of a specification, for example the concentration of an ingredient. Product quality may refer to the quality of the input material, for example as received from a supplier, of an intermediate, i.e. a material which as undergone some processing steps and will undergo further processing steps, and an output material, for example before it is packaged and shipped to a customer.

[0078] The chemometric model may be parameterized to receive spectroscopic data, object data or environmental data as input and output the chemometric data. In this case, the spectroscopic data and the object data or the environmental data may be used to determine the chemometric data. The chemometric model may be parameterized to receive spectroscopic data as input and output intermediate chemometric data. Intermediate chemometric data may be chemometric data which has been determined without taking into account the object data or the environmental data. The intermediate chemometric data may be adjusted or corrected using the object data and environmental data, for example by employing a refining model. The refining model may be a data-driven model which may be trained with historic data for adjusting or correcting intermediate chemometric data. A refining model may be a multivariate linear or polynomial regression model or it may be an artificial neural network. Taking object data or environmental data into account has the advantage that more accurate chemometric data can be obtained, in particular for the case that such object data or environmental data influence the spectroscopic measurement.

[0079] The term "object data” may refer to data associated with a characteristic of the object such as a physical or chemical characteristic of the object. Object data may refer to any data associated with a characteristic of the object which has been obtained with a method other than spectroscopy. Object data may correlate with the chemometric data to be determined. Object data may be associated with the same characteristic as the chemometric data to be determined or with a different characteristic as the chemometric data to be determined. Physical characteristics may comprise thermal characteristics, for example the temperature, the thermal conductivity or the specific heat capacity; the macroscopic or microscopic state of matter, for example the shape or topology of the object or the degree of crystallinity; mechanical characteristics, for example pressure, compressibility or mechanical elasticity; optical characteristics, for example the color, refractive index, optical conductivity or absorption coefficients; electromagnetic characteristics, for example electrical conductivity, dielectric constant, radio frequency-based permittivity, microwave complex permittivity, millimeter wave complex permittivity, magnetic permittivity or susceptibility.

[0080] Chemical characteristics of an object typically refer to the chemical composition of the object comprising the material composition, for example the type and the concentration of certain chemical compounds such as the water content; the state of matter, for example the degree of crystallinity or the aggregate state, for example in a disperse phase.For the case that the object is a living body, in particular a human, the object data may contain or may be a biomarker. The term "biomarker” may refer to a measurable substance, process or characteristic that is indicative of a biological state or condition. A biomarker may refer to a specific molecule, protein, genetic sequence, or other measurable feature that is associated with a particular disease, condition or treatment response. Examples for biomarkers are body dimensions such as size, head circumference, chest girth, abdominal girth, crotch length, arm length; body weight or body mass index; body topology such as face topology, iris structure, finger print, palm topology; muscle measures like muscular strength, muscular endurance, muscular agility and speed, balance, coordination; cardio-vascular measures such as heart rate, heart rate variability, electrocardiogram, blood pressure, blood oxygen; skin measures such as skin conductance, skin impedance, skin moisture level, skin sebum level, skin roughness, skin elasticity, skin pH, skin blood flow, skin sweat rate; blood metabolites such as blood glucose, blood cholesterol, blood triglycerides, blood urea, blood creatinine, blood lactate, blood bilirubin, blood pH; urine metabolites such as urine glucose, urine urea, urine creatinine, urine ketones, urine pH, urine protein content; hormone levels such as thyroid hormone level, insulin level, growth hormone level, cortisol level, estrogen level, progesterone level, testosterone level, prolactin level; drug levels or levels of drug metabolites such as alcohol, amphetamines, opioids, cocaine, marijuana, benzodiazepines, barbiturates.

[0081] Object data may be obtained from sensors other than a spectroscopic device, for example a thermometer, a hygrometer, a scale, a balance, a light sensor, an optical camera, an optical 3D scanner system, conductance or impedance gauge such as a corneometer, a sweat rate monitor or sweat patch, a liquid or gas chromatograph, a mass spectrograph, a nuclear magnetic spectroscopic device or imager, an electrochemical sensor, an immunoassay, a polymerase chain reaction apparatus. The spectroscopic device may be integrated into a portable computing device which further comprises sensors from which at least parts of the object data is received.

[0082] Object data may also be obtained from a storage device or it can be obtained from a user interface, for example a graphical user interface, to which a user can enter object data, for example from observations. In case the object to be measured is a human, object data may comprise human characteristics like age, sex, origin, ethnicity; medical history including current and former medications; nutrition such as vegetarian or vegan diet; consumption of stimulants such as caffeine, alcohol, tobacco products, drug; physical activity level such as type of profession, i.e. office job or physically demanding job, kind of sports, average duration of sports, average sleeping hours.

[0083] The term "environmental data” may refer to data associated with a characteristic of the surrounding of the object, for example a physical or chemical characteristic of the surrounding of the object. The characteristic of the surrounding of the object may have an influence on the spectroscopic measurement of the object or on the characteristic of the object such as the physical or chemical characteristic of the object. However, environmental data may not comprise an intrinsic characteristic of the object.Environmental data may comprise sensor data from sensors other than a spectroscopic device. Environmental data may comprise the location of the object, for example the geolocation such as the GPS coordinates, the height above sea level, distance to a reference point such as the spectroscopic device, acceleration, orientation with regard to gravity; weather conditions such air temperature, air pressure, air humidity, wind speed, wind direction, ambient light intensity; time or date; air pollutant levels like CO2 concentration, CO concentration, ozone concentration, nitrogen oxide concentration, sulfur dioxide concentration, fine dust concentration, volatile organic compounds level.

[0084] Sensor data may have been recorded by a sensor capable of determining the sensor data. The sensor may be integrated into the spectroscopic device. The spectroscopic device may be integrated into a portable computing device which further comprises sensors from which at least parts of the environmental data is received. The sensor may be communicatively coupled to the spectroscopic device, for example via a wireless communication or via internet. Examples for sensors may be a GPC receiver, an accelerometer, a gyroscope, an altimeter, a goniometer, a distance sensor like a time-of-flight sensor, a radar or a LiDaR, a pressure sensor such as a MEMS sensor, a piezo sensor or a capacitive sensor, a magnetometer, a barometer, a light sensor, a thermometer, a gas sensor.

[0085] Environmental data may comprise data associated with the spectroscopic device, for example a spectroscopic device ID, a version number of the spectroscopic device, a version number of the firmware of the spectroscopic device, the spectroscopic device settings, an error code indicating a specific problem with the measurement, the temperature of the spectroscopic device, the age of the spectroscopic device, time since the last calibration was performed, age of the illumination source, number of measurements the spectroscopic device has already performed in its lifetime or within a certain time such as the last week or the last month. Environmental data may comprise data associated with the portable computing device, for example a model type, the battery level, a version number of software running on the portable computing device. Environmental data may further comprise data associated with the spectroscopic measurement of the object, for example the sampling time, the illumination strength with which the spectroscopic device illuminates the object, or the distance of the object to the spectroscopic device.

[0086] Environmental data may be received from a data storage medium. The data storage medium may be part of the spectroscopic device, or it may be a remote storage device, for example a computer system or a cloud system. Environmental data may be received from a database, for example from a database on a remote storage system, in response to a request containing time and / or geographic location. A remote storage system may refer to a system which is far from the object of the measurement, for example a cloud server or a database server. For example, a request containing the GPS coordinates of the object and the time of the spectroscopic measurement may be sent to a cloud server having a weather database. The cloud server may in response to the request send weather data corresponding to the time and location of the request.

[0087] Object data or environmental data may originate from a user interface. The user interface may be configured to receive user input, for example a text or elements of a form such as tick-boxes or selection fields. The user interfacemay be a graphical user interface. The user interface may be displayed on a screen of the portable computing device. For example, a user may input into the user interface that the measured plastic bottle has scratches, is dirty or that the user is unsure whether the bottle is actually made of PET as the label on the bottle indicates. Another example may be that the user enters into the user interface that there was dust in the air due to a truck passing by on a dirty road.

[0088] The portable computing device has an interface for outputting the chemometric data. The interface may be an interface to a different process on the portable computing device, for example a an inter process communication interface provided by the operating system. The different process may further process the chemometric data. The interface may also be a display, for example the screen of the portable computing device. The interface may be a communication interface for transmitting the chemometric data to a remote computer system, for example a server. The interface for outputting the chemometric data may hence be the same as the interface for receiving the spectroscopic data or the chemometric model in text format or a different one.

[0089] The present disclosure further relates to a non-transient computer-readable medium including instructions that, when executed by one or more processors, cause the one or more processors to perform the method according to the present invention. The term "computer-readable data medium” may refer to any suitable data storage device or computer readable memory on which is stored one or more sets of instructions (for example software) embodying any one or more of the methodologies or functions described herein. The instructions may also reside, completely or at least partially, within the main memory and / or within the processor during execution thereof by the computer, main memory, and processing device, which may constitute computer-readable storage media. The instructions may further be transmitted or received over a network via a network interface device. Computer-readable data medium include hard drives, for example on a server, USB storage device, CD, DVD or Blue-ray discs. The computer program may contain all functionalities and data required for execution of the method according to the present invention or it may provide interfaces to have parts of the method processed on remote systems, for example on a cloud system.

[0090] The present disclosure further relates to a server. The term "server” may refer to any remote computer system or computer network configured to receive, process, store, and provide data. A server may also refer to a cloud computing system. The server comprises a communication interface. The communication interface may be a telecommunication interface, for example an interface to a telecommunication network. The communication interface may also be an interface to a local internet access point, for example a Wi-Fi communication interface or a network cable. The communication interface of the server may be configured to provide a chemometric model in text format to a portable computing device. The server may comprise a memory for storing a chemometric model in text format, i.e. a memory configured to store a chemometric model in text format. The server may be configured to provide a chemometric model in text format to more than one portable computing device or to a plurality of portable computing devices, for example at least five portable computing devices or at least 10 portable computing devices or at least 50portable computing devices or at least 100 portable computing devices. The server may be configured to provide the chemometric model in text format to different portable computing devices. The portable computing devices may be different in respect to their operating systems, the portable computing devices may for example have different operating systems installed, such as Android or iOS, or the same operating system in a different version. The portable computing devices may be different in respect to their processors, the portable computing devices may for example have different processors, for example a Qualcomm Snapdragon or an Apple A series processor.

[0091] Brief Description of the Figures

[0092] Figure 1 illustrates the acquisition of spectroscopic data, object data and environmental data from an object.

[0093] Figure 2 illustrates an example for a spectroscopic device in communication with a portable computing device.

[0094] Figure 3 illustrates an example for a portable computing device with integrated spectrometer module.

[0095] Figure 4 illustrates two examples of how chemometric data can be determined from spectroscopic data, object data and environmental data.

[0096] Figure 5 illustrates a server communicatively coupled with portable computing devices.

[0097] Figure 6 illustrates an example of a chemometric model in text format.

[0098] Description of Embodiments

[0099] Figure 1 illustrates the acquisition of spectroscopic data, object data and environmental data from an object. A spectroscopic device 101 may illuminate the object 103, for example a nutrient, a pharmaceutical or a body part, with a light beam 102. The spectroscopic device may contain an infrared light source, for example an incandescent lamp or an LED, and illumination optics. The infrared light beam 102 may contain light in the infrared wavelength range, for example 760 nm to 3 m. The infrared light beam may hit the object and be reflected back to the spectroscopic device. This measurement mode is often referred to as reflectance mode. Alternatively, the light beam 102 may penetrate the object 103 and be directed back to the spectroscopic device 101, for example with mirrors. This measurement mode is often referred to as transmission mode. The spectroscopic device 101 may comprise light collection optics to capture the light beam 102 travelling from the object 103 to the spectroscopic device 101. The spectroscopic device 101 may comprise an optical element which separates different wavelengths of the infrared light beam 102 travelling from the object 103 to the spectroscopic device 101 in space or in time, for example a linear variable filter, an interferometer or a dedicated filter for each sensor element. The spectroscopic device 101 may contain one or multiple optical sensor elements which generate an electrical signal depending on the intensity of infrared lightimpinging on the optical sensor. The intensity data may be associated with the wavelength data, for example by a processor or microcontroller in the spectroscopic device. The spectroscopic device 101 may hence output spectroscopic data 104, for example as vector of wavelength values and an associated vector of intensity values. The spectroscopic data 104 may be raw data or it may be corrected data, for example by multiplication with calibration coefficients.

[0100] Sensor 105 may measure the object 103 and output object data 106. For example, the sensor 105 may be an RGB camera. In this case, the object data 106 may be an RGB image of the object 103 or a characteristic which is derived from the RGB image, for example its luminance, an average color or its orientation. Deriving such information may include a processor which applies an appropriate algorithm to the image. The processor may be part of the sensor 105 or it may be part of a computer system which is communicatively coupled with the sensor 105.

[0101] Sensor 107 may record a physical or chemical characteristic of the environment of the object 103 which may have an influence on the measurement of the spectroscopic device 101. For example, the sensor 107 may be a thermometer, a hygrometer or a pressure sensor measuring the air ambient to the object 103. In this case, the environmental data 108 may be the temperature, the air humidity or the atmospheric pressure surrounding the object. It is further possible that object data 106 and / or environmental data 108 are entered via a user interface 109, in particular if the object 103 is a person and the person can provide personal data about himself.

[0102] Figure 2 illustrates an example for a spectroscopic device in communication with a portable computing device. The spectroscopic device 220 may be a hand-held spectroscopic device. The spectroscopic device 220 may comprise an illumination 221, a detector 222, a controller 223 and a communication interface 224. The illumination 221 may be a light source, for example an incandescent lamp or an LED. The light source may produce electromagnetic radiation in the desired range, for example in the near infrared range. The illumination 221 may further contain optics to direct the electromagnetic radiation from the light source to the object, for example lenses, mirrors and / or apertures. The controller 223 may be an ASIC or a microcontroller. The illumination 221 may be operatively coupled to the controller 223. The controller 223 may supply electric power, e.g. from the battery of the spectroscopic device 220, and switch the light source of the illumination 221 on and off when required.

[0103] The detector 222 may generate electric signals in response to electromagnetic irradiation impinging on the detector 222. The detector 222 may contain an array of photosensitive regions. Each photosensitive region may be covered by a filter such that electromagnetic radiation of a dedicated wavelength or wavelength range impinges on a photosensitive region. The photosensitive region may be sensitive in the wavelength region of interest, for example in the near infrared region. The photosensitive region may contain a photoconductor, for example PbS or PbSe. The photosensitive region may generate an electric current which is indicative of the intensity of the electromagnetic radiation impinging on the photosensitive region. The detector 222 may contain optics to collect a maximum of incoming electromagnetic radiation. The optics may include mirrors, lenses and / or apertures.The detector 222 may be operatively coupled to the controller 223. The controller 223 may convert the signal or signals from analog to digital. This may, for example, be accomplished by integrating the electric current obtained from each photosensitive region and providing a value of the result in a digital form. By combining these values with the origin of the photosensitive region each of which measures the electromagnetic radiation at a particular wavelength or wavelength region, the controller 223 may gather spectroscopic data.

[0104] The communication interface 224 may be a wireless connection to a portable computing device 210. The communication interface 224 may be operatively coupled to the controller 223 so the communication interface 224 may transfer the spectroscopic data from the controller 223 to the portable computing device 210. The portable computing device 210 may be a smartphone or a tablet. The portable computing device 210 may comprise a communication interface 213 to receive the spectroscopic data from the spectroscopic device 220. The portable computing device 210 may comprise a processor 211, for example a CPU. The processor 211 may be operationally coupled to the communication interface 213. The processor 211 may receive the spectroscopic data form the communication interface 213. The processor 211 may be operationally coupled to memory 212. Memory 212 may store a chemometric model, object data and environmental data. The processor 211 may apply the chemometric model retrieved from memory 212 using the spectroscopic data, the object data and the environmental data and thereby determine chemometric data. The portable computing device 210 may further comprise a camera 214, for example an RGB camera, which operationally coupled to the processor 211. The processor 211 may receive an image of the object from the camera 214 and extract object data from the image which may be used to determine chemometric data. The determined chemometric data may be stored in memory 212 or it may be displayed on display 214, for example on a user interface.

[0105] Object data may be obtained from the camera 214, for example by using the camera 214 to record an image of the object and extract the object data from the image, for example the color of the object or the identity of the person if the object is a person. Object and / or environmental data may be obtained from memory 212, for example personal data of the person measured like age, ethnicity or skin color. Object and / or environmental data may be obtained from a different sensor in the portable computing device, for example a thermometer measuring the environmental temperature, or a GPS system providing the geographic location. The processor 211 may determine chemometric data from the spectroscopic data, for example the skin moisture of the person from which the spectroscopic data is recorded.

[0106] Figure 3 illustrates an example for a portable computing device with integrated spectrometer module. The portable computing device 300 may be a smartphone, a tablet or a wearable such as a smartwatch. The portable computing device 300 may comprise a spectroscopic device module 310. The spectroscopic device module 310 may comprise an illumination 311. The illumination 311 may be a light source, for example an incandescent lamp or an LED. The light source may produce electromagnetic radiation in the desired range, for example in the near infrared range. Theillumination 311 may further contain optics to direct the electromagnetic radiation from the light source to the object, for example lenses, mirrors and / or apertures. The spectroscopic device module 310 may further comprise a controller 313, for example an ASIC. The illumination 311 may be operatively coupled to the controller 313. The controller 313 may supply electric power, e.g. from the battery of the portable computing device 300, and switch the light source of the illumination 311 on and off when required.

[0107] The spectroscopic device module may further comprise a detector 312. The detector 312 may generate electric signals in response to electromagnetic irradiation impinging on the detector 312. The detector 312 may contain an array of photosensitive regions. Each photosensitive region may be covered by a filter such that electromagnetic radiation of a dedicated wavelength or wavelength range impinges on a photosensitive region. The photosensitive region may be sensitive in the wavelength region of interest, for example in the near infrared region. The photosensitive region may contain a photoconductor, for example PbS or PbSe. The photosensitive region may generate an electric current which is indicative of the intensity of the electromagnetic radiation impinging on the photosensitive region. The detector 312 may contain optics to collect a maximum of incoming electromagnetic radiation. The optics may include mirrors, lenses and / or apertures.

[0108] The detector 312 may be operatively coupled to the controller 313. The controller 313 may collect the signal or the signals from the detector 312 and forward them to the processor 330. The controller 313 may convert the signal or signals from analog to digital. This may, for example, be accomplished by integrating the electric current obtained from each photosensitive region and providing a value of the result in a digital form. By combining these values with the origin of the photosensitive region each of which measures the electromagnetic radiation at a particular wavelength or wavelength region, the controller 313 may gather spectroscopic data and forward these to the processor 330.

[0109] The portable computing device 300 may further comprise memory 320, for example RAM or flash memory. The memory 320 may store spectroscopic data, for example obtained from the spectroscopic device module 310. The memory may store object data, for example obtained from a different sensor of the portable computing device 300 or from a user interface to which a user has entered object data. The memory 320 may store environmental data, for example obtained from a different sensor of the portable computing device 300 or from a user interface to which a user has entered environmental data. The memory 320 may be operatively coupled to the processor 330, so the processor 330 may receive spectroscopic data, object data and / or environmental data from the memory 320.

[0110] The portable computing device 300 may further comprise a communication interface 340, for example a Wi-Fi connection to a network or a connection to a telecommunication network. The communication interface 340 may be operatively coupled to the processor 330, so the processor 330 may receive spectroscopic data, object data and / or environmental data from the communication interface 340, for example from a cloud computer system.The portable computing device 300 may further comprise a camera 350, for example an RGB camera or an infrared camera. The camera 350 may be used for capturing an image of the object or its environment in order to obtain object data or environmental data. The camera 350 may be operatively coupled to the processor 330, so the processor 330 can receive image data from the camera 350. The processor 330 may execute code which is configured to extract object data or environmental data from the image received from the camera 350.

[0111] The processor 330 may execute the code for the method described above. The processor 330 may obtain the code from memory 320. The processor 330 may in this example execute both code of the spectroscopic device, in particular the determination of chemometric data using spectroscopic data, object data and environmental data, for example by executing a chemometric model. The portable computing device 300 may further contain a display (360) for collecting user input and display measurement results, for example via a graphical user interface (GUI).

[0112] Figure 4 illustrates two examples of how chemometric data can be determined from spectroscopic data, object data and environmental data. In Figure 4a spectroscopic data 411 may be input to a chemometric model comprising preprocessing 421, feature selection 422 and a machine learning model 423. Spectroscopic data 411 may comprise a spectrum, for example a near infrared spectrum, obtained from a measurement with a spectrometer. Pre-processing 421 may comprise baseline correction, for example first-order derivation, scatter correction, for example standard normal variate, smoothing, for example moving average filtering, scaling, for example Pareto scaling, aggregation, for example spatial median. The pre-processed spectroscopic data may subsequently undergo feature selection 422. Feature selection 422 may reduce the dimensionality of the spectroscopic data 411 , so training the machine learning model 423 requires less training data. Feature selection 422 may for example involve principle component regression (PGR). The thus pre-processed and feature-selected spectroscopic data may be passed as input to a machine leaning model 423, for example an artificial neural network. The machine leaning model 423 may be parametrized to further receive the object data 412 and the environmental data 413 as further input. The object data 412 and the environmental data 413 may be pre-processed before inputting into the machine learning model 413, for example to adjust the format and the units of the data. The machine leaning model 423 may be trained with historic data comprising spectra, object data and environmental data. The machine leaning model 423 may output chemometric data 415. Using a chemometric model which uses spectroscopic data, object data and environmental data as input has the advantage that complex interplays between spectroscopic data, object data and environmental data can be taken into account.

[0113] Figure 4b shows an alternative example for determination of chemometric data from spectroscopic data, object data and environmental data. Spectroscopic data 411 may be input to a chemometric model 431 which outputs intermediate chemometric data 432. The chemometric model 431 may not be parametrized to take object data 412 and environmental data 413 into account. Hence, the intermediate chemometric data 432 only depends on the spectroscopic data 432. In order to obtain the desired chemometric data 434, a refining model 433 may be employed. The refining model 433 may be parametrized to receive the intermediate chemometric data 432, the object data 412 and theenvironmental data 413 and to output the chemometric data 434. The refining model 433 may comprise to sub-mod-els, one which processes the object data 412 and one which processes the environmental data 413. For example, the first sub-model may receive the intermediate chemometric data 432 and the object data 412 as input and output a refined chemometric data. A second sub-model may use the refined chemometric data and the environmental data 413 as input and output the chemometric data 434. The refining model 433 may be a multivariate polynomial regression model which adjusts the intermediate chemometric data 432 according to the object data 412 and the environmental data 413 to arrive at the chemometric data 434. A refining model 433 has the advantage that the chemometric model 431 does not need a retraining for new object data types or environmental data types.

[0114] Figure 5 illustrates a server communicatively coupled with portable computing devices. Server 510 may be a cloud system comprising computer hardware including memory, processor and a communication interface. The server 510 have provide a chemometric model in text format 511 from its memory through a communication interface to portable computing devices 520, 530. The portable computing devices 520, 530 may receive chemometric model in text format 511, for example through an interface, for example via a communication interface configured to receive data via a telecommunication network. The portable computing devices 520, 530 may be different to each other. They may run different operating systems or different versions of the same operating system. They may comprise processors of different processor architectures or different processors versions. The portable computing devices 520, 530 may in response to receiving the chemometric model in text format 511 convert the chemometric model in text format 511 to a native chemometric model 524, 534. The native chemometric model 524 may be executable on the processor of portable computing device 520 and the native chemometric model 534 may be executable on the processor of portable computing device 530. Hence, native chemometric model 524 may be different to native chemometric model 534. For example, chemometric model 524 may be encoded in ARM ISA and chemometric model 534 may be encoded in X86 ISA.

[0115] The portable computing devices 520, 530 may comprise a spectroscopic module 522, 532, for example as described for figure 3. The spectroscopic module 522, 532 may provide spectroscopic data 523, 533. The spectroscopic data 523, 533 may be input into native chemometric model 524, 525 which in turn outputs chemometric data 525, 526. The chemometric data 525, 526 may be further processed, for example to determine a recommendation for an action, or it may be directly displayed, for example on the display of the portable computing device 520, 530.

[0116] Figure 6 illustrates an example of a chemometric model in text format. The chemometric model in text format 600 may comprise a preprocessing method 610 and a machine learning method 620. It may further comprise a feature selection filter or a refining model for object data and / or environmental data. The preprocessing 610 and machine learning 620 may be defined in a JSON format or a format which resembles the JSON format. It is possible to use different formats, for example CSV for preprocessing 610 and ONNX for machine learning 620. As shown in the figure, preprocessing may comprise an outlier removal and the calculation of a derivative each of which are further defined by method-specific parameters. The same holds true for the machine learning 620. The example shows aneural network comprising two layers each of which defines input, output, weights, biases and activation. This example is strongly simplified to illustrate the principle, a real chemometric model normally contains a lot more parameters.

[0117] The present disclosure has been described in conjunction with preferred embodiments and examples as well.

[0118] However, other variations can be understood and effected by those persons skilled in the art and practicing the claimed invention, from the studies of the drawings, this disclosure and the claims.

[0119] Any steps presented herein can be performed in any order. The methods disclosed herein are not limited to a specific order of these steps. It is also not required that the different steps are per-formed at a certain place or in a certain computing node of a distributed system, i.e. each of the steps may be performed at different computing nodes using different equipment / data processing.

[0120] As used herein ..determining" also includes ..initiating or causing to determine", "generating" also includes ..initiating and / or causing to generate" and "providing” also includes "initiating or causing to determine, generate, select, send and / or receive”. "Initiating or causing to perform an action” includes any processing signal that triggers a computing node or device to perform the respective action.

[0121] In the claims as well as in the description the word "comprising” does not exclude other elements or steps and the indefinite article "a” or "an” does not exclude a plurality. A single element or other unit may fulfill the functions of several entities or items recited in the claims. The mere fact that certain measures are recited in the mutual different dependent claims does not indicate that a combination of these measures cannot be used in an advantageous implementation. In the claims as well as in the description the word "comprising” or "including” or similar wording does not exclude other elements or steps and shall not be construed limiting to the elements or steps lined out.

[0122] Providing in the scope of this disclosure may include any interface configured to provide data. This may include an application programming interface, a human-machine interface such as a display and / or a software module interface. Providing may include communication of data or sub-mission of data to the interface, in particular display to a user or use of the data by the receiving node, entity or interface.

[0123] Various units, circuits, entities, nodes or other computing components may be described as "configured to” perform a task or tasks. Configured to shall recite structure meaning "having circuitry that” performs the task or tasks on operation. The units, circuits, entities, nodes or other computing components can be configured to perform the task even when the unit / circuit / component is not operating. The units, circuits, entities, nodes or other computing components that form the structure corresponding to "configured to” may include hardware circuits and / or memory storing program instructions executable to implement the operation. The units, circuits, entities, nodes or other computing components may be described as performing a task or tasks, for convenience in the description. Suchdescriptions shall be interpreted as including the phrase "configured to.” Any recitation of "configured to” is expressly intended not to invoke 35 U.S.C. § 112(f) interpretation.

[0124] In general, the methods, apparatuses, systems, computer elements, nodes or other computing components described herein may include memory, software components and hardware components. The memory can include volatile memory such as static or dynamic random-access memory and / or nonvolatile memory such as optical or magnetic disk storage, flash memory, programmable read-only memories, etc. The hardware components may include any combination of combinatorial logic circuitry, clocked storage devices such as flops, registers, latches, etc., finite state machines, memory such as static random-access memory or embedded dynamic random-access memory, custom designed circuitry, programmable logic arrays, etc.

[0125] Any disclosure and embodiments described herein relate to the methods, the systems, apparatuses, devices, chemicals, materials, computer program elements lined out above and vice versa. Advantageously, the benefits provided by any of the embodiments and examples equally apply to all other embodiments and examples and vice versa. All terms and definitions used herein are understood broadly and have their general meaning.

Claims

25Claims1. A portable computing device comprising:a. an interface for receiving spectroscopic data,b. an interface for receiving a chemometric model in text format,c. a processor for converting the chemometric model in text format into a native chemometric model which is executable on the processor and for generating chemometric data by executing the native chemometric model with the spectroscopic data as input, andd. an interface for outputting the chemometric data.

2. The portable computing device according to claim 1, wherein the portable computing device is communicatively coupled with a mobile spectrometer, wherein the spectroscopic data is received from the portable spectrometer.

3. The portable computing device according to claim 1 or 2, wherein the portable computing device is communicatively coupled with a server providing the chemometric model in text format.

4. The portable computing device according to any of the claims 1 to 3, wherein the chemometric model in text format comprises instructions for a preprocessing method, a machine learning method and a feature selection filter.

5. The portable computing device according to any of the claims 1 to 4, wherein the chemometric model in text format comprises a validity tag indicating the validity of the chemometric model and wherein the processor is configured to determine the validity of the chemometric model in text format using the tag before executing the native chemometric model.

6. The portable computing device according to any of the claims 1 to 5, wherein the spectroscopic data comprises a spectrum representing the absorbance or transmittance of radiation of a wavelength in the range of 760 nm to 3 pm.

7. A method for processing spectrometric data comprising:a. receiving spectroscopic data by a portable computing device,b. receiving a chemometric model in text format by the portable computing device,c. converting the chemometric model in text format into a native chemometric model which is executable on the portable computing device,d. generating chemometric data by executing the executable native model on the portable computing device with the spectroscopic data as input ande. outputting the chemometric data.

8. The method according to claim 7, wherein the spectroscopic data are received from a portable infrared spectrometer.

9. The method according to claim 7 or 8, wherein the chemometric model in text format comprises a description of a neural network.

10. The method according to any of the claims 7 to 9, wherein the chemometric data comprises the concentration of a chemical compound in a sample from which the spectroscopic data is obtained.

11. The method according to any of the claims 7 to 10, wherein the chemometric data comprises a recommendation for acting on the sample from which the spectroscopic data is obtained.

12. A non-transient computer-readable medium including instructions that, when executed by one or more processors, cause the one or more processors to perform a method comprising:a. receiving spectroscopic data,b. receiving instructions for a chemometric model in text format,c. converting the chemometric model in text format into a native chemometric model which is executable on a portable computing device,d. generating chemometric data by executing the native chemometric model with the spectroscopic data as input ande. outputting the chemometric data.

13. A server comprising:a. a communication interface to a portable computing device,b. a memory for storing a chemometric model in text format, andc. a processor for providing the chemometric model in text format via the interface to the portable computing device,wherein the portable computing device is configured to convert the chemometric model in text format into a native chemometric model which is executable on the portable computing device.

14. The server according to claim 13, wherein the communication interface is configured to connect the server to a plurality of portable computing devices, wherein the portable computing devices are operated with at least two different operating systems.

15. The server according to claim 13 or 14, wherein the communication interface is configured to connect the server to a plurality of portable computing devices, wherein the portable computing devices are operated with at least two different processors.