CN111239054A - Spectral analysis model application method and device - Google Patents

Spectral analysis model application method and device Download PDF

Info

Publication number
CN111239054A
CN111239054A CN201811449106.4A CN201811449106A CN111239054A CN 111239054 A CN111239054 A CN 111239054A CN 201811449106 A CN201811449106 A CN 201811449106A CN 111239054 A CN111239054 A CN 111239054A
Authority
CN
China
Prior art keywords
information
model
spectral
model application
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811449106.4A
Other languages
Chinese (zh)
Inventor
何骥鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811449106.4A priority Critical patent/CN111239054A/en
Publication of CN111239054A publication Critical patent/CN111239054A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention discloses a spectral analysis model application method, which adopts a preset configuration rule to configure each model application information corresponding to each spectral characteristic attribute; acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected. The invention discloses a spectral analysis model application device and a storage medium.

Description

Spectral analysis model application method and device
Technical Field
The invention relates to the technology of internet of things information acquisition, in particular to a spectral analysis model application method and a spectral analysis model application device.
Background
Analyzing the spectral information corresponding to the spectral analysis model to obtain an expected prediction result, which is called model prediction; in the model prediction process, firstly, determining an object to be predicted and the attribute of the predicted object, namely the spectral characteristic attribute, such as moisture, sugar and the like of an apple expected to be predicted through spectral detection; then, performing corresponding spectrum interpolation and preprocessing on the received spectrum signals, and selecting a characteristic band spectrum value; and selecting a specific spectral analysis model, and finally calculating the selected characteristic waveband spectral value through the spectral analysis model to obtain a predicted value of the spectrum.
When model prediction is performed on different objects, the corresponding algorithm in each prediction step is different, the required characteristic waveband spectrum value is also different, and the parameters of the spectrum analysis model are also different. Therefore, in the actual application process of model prediction, the application information such as the spectral analysis model, the prediction object and attribute, the spectral interpolation algorithm, all the preprocessing algorithms and parameters, the characteristic band, the adopted spectral analysis model, and the like, which is called as model application information, needs to be associated with the prediction process to realize the model application.
The application of the cloud platform of the internet of things to the spectral analysis model is realized in a mode of curing and transplanting an application model, namely, a specific spectral analysis model and model application information of the spectral analysis model are cured; when the cloud platform receives the prediction request, the spectrum is processed by using the cured model application information according to the prediction process, and then the cured model is used for prediction;
the current application mode of the cloud platform of the Internet of things is suitable for spectral analysis of a specific scene, and if a newly added detection object exists, due to the fact that a spectral analysis model and model application information are different, transplantation is needed. The method is suitable for developing a spectral analysis model application product with a single product. In addition, because the type and parameter configuration of the spectrum instrument are possibly different from the spectrum analysis model used and the model application information of the spectrum analysis model, the type, parameter and configuration of the instrument for collecting the spectrum in the prediction process are required to be consistent with those used in the modeling process, so that an accurate model prediction result can be obtained, and the current prediction process does not relate to the setting of the spectrum instrument.
Therefore, how to apply the cloud platform spectral analysis model to different application scenarios and improve the cloud platform spectral analysis adaptability is an urgent problem to be solved.
Disclosure of Invention
In view of this, the embodiment of the invention can enable the application of the cloud platform spectral analysis model to be suitable for different application scenarios, and improve the cloud platform spectral analysis adaptability.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a spectral analysis model application method, which comprises the following steps:
configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected.
In the foregoing solution, the configuring each model application information corresponding to each spectral feature attribute includes: configuring a spectral analysis model output spectral characteristic attribute form and/or a preprocessing configuration specified in the model application information, and/or identification information and/or characteristic waveband information of a spectral analysis model specified in the model application information, and/or calculation parameters of a spectral analysis model specified in the model application information;
the pre-processing configuration comprises: a spectral interpolation algorithm, and/or a spectral pre-processing algorithm, and/or spectral pre-processing algorithm parameters.
In the foregoing solution, the configuring each model application information corresponding to each spectral feature attribute includes: configuring first instrument configuration information corresponding to the model application information;
the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information.
In the foregoing solution, the configuring each model application information corresponding to each spectral feature attribute includes: configuring application object information corresponding to the model application information;
the method further comprises the following steps: and taking the application object information as corresponding model application information and/or index information of a specified spectral analysis model in the model application information.
In the above scheme, determining the model application information corresponding to the spectral information to be measured according to a preset correspondence rule includes:
and when the preset first identification information in the current to-be-detected spectrum information is matched with the preset second identification information of the model application information, determining that the current to-be-detected spectrum information corresponds to the model application information.
The embodiment of the invention also provides a spectral analysis model application device, which comprises: a model configuration module and a model application module, wherein,
the model configuration module is used for configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
the model application module is used for acquiring current spectral information to be detected and determining model application information corresponding to the current spectral information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected.
In the foregoing solution, the configuring each model application information corresponding to each spectral feature attribute includes: configuring a spectral analysis model output spectral characteristic attribute form and/or a preprocessing configuration specified in the model application information, and/or identification information and/or characteristic waveband information of a spectral analysis model specified in the model application information, and/or calculation parameters of a spectral analysis model specified in the model application information;
the pre-processing configuration comprises: a spectral interpolation algorithm, and/or a spectral pre-processing algorithm, and/or spectral pre-processing algorithm parameters.
In the foregoing solution, the model configuration module is specifically configured to: configuring first instrument configuration information corresponding to the model application information;
the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information.
In the foregoing solution, the model configuration module is specifically configured to: configuring application object information corresponding to the model application information;
and taking the application object information as corresponding model application information and/or index information of a specified spectral analysis model in the model application information.
In the foregoing solution, the model application module is specifically configured to:
and when the preset first identification information in the current to-be-detected spectrum information is matched with the preset second identification information of the model application information, determining that the current to-be-detected spectrum information corresponds to the model application information.
Embodiments of the present invention further provide a storage medium, on which an executable program is stored, wherein the executable program, when executed by a processor, implements the steps of the spectral analysis model application method according to any one of the above methods.
The embodiment of the invention also provides a spectral analysis model application device, which comprises a processor, a memory and an executable program which is stored on the memory and can be run by the processor, wherein when the processor runs the executable program, the steps of any one of the spectral analysis model application methods in the methods are executed
According to the spectral analysis model application method and device provided by the embodiment of the invention, each model application information corresponding to each spectral characteristic attribute is configured by adopting a preset configuration rule; acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected. In this way, different model application information is configured on the Internet of things cloud platform according to different spectral characteristic attributes, and corresponding model application information is selected for detection through the corresponding relation during model prediction. Therefore, the application of the cloud platform spectral analysis model can be suitable for different application scenes, and the cloud platform spectral analysis adaptability is improved.
Drawings
FIG. 1 is a schematic flow chart of a method for applying a spectral analysis model according to an embodiment of the present invention;
FIG. 2 is a schematic view of a model configuration process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the structure of the spectrum analysis model application system according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of a structure of an apparatus for applying a spectrum analysis model according to an embodiment of the present invention.
Detailed Description
In the embodiment of the invention, a preset configuration rule is adopted to configure each model application information corresponding to each spectral characteristic attribute; acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected.
The present invention will be described in further detail with reference to examples.
As shown in fig. 1, the method for applying a spectral analysis model according to an embodiment of the present invention includes:
step 101: configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
here, model application information can be configured on the internet of things cloud platform; the preset configuration rule can be set according to scenes which may appear in the prediction process of the actual model, such as different prediction objects, different spectral feature attributes of the prediction objects, different preprocessing modes and the like; the model application information can be a set of information required by the whole model prediction process, including preprocessing of spectral information to be detected, spectral analysis model identification information, spectral analysis model calculation parameter configuration and the like; the configuration can be performed in a mode of selecting various preprocessing modes, information and calculation parameters preset in the cloud platform of the internet of things.
In the actual model prediction process, the model application information is different for different scenes. Aiming at different spectral characteristic attributes, such as water, sugar and the like of the apples, a spectral analysis model corresponding to the water, the sugar and the like is adopted for prediction; meanwhile, when different spectral characteristic attributes are predicted for the same spectral analysis model, different model application information needs to be adopted for spectral information to be detected, and different preprocessing, calculation parameters of the spectral analysis model and the like are performed;
specifically, the model application information can be configured in the cloud platform through a model configuration module, the model configuration module can be classified according to different spectral characteristic attributes, and the model application information corresponding to different spectral analysis models and application scenes is configured for different spectral characteristic attributes respectively; the configuration information of the model application information can be listed in the cloud platform in advance, and can be configured in a manual mode and the like to finally form the model application information.
In practical application, model application information can be configured by a modeling expert through authentication management in a cloud platform; the modeling expert can verify, use and the like in the account; the model application information configured by the modeling expert can be integrated and then released to a common account or a third party for use and the like in a certain application scene.
Further, the spectral analysis model output spectral feature attribute form specified in the model application information, and/or the preprocessing configuration, and/or the identification information of the spectral analysis model specified in the model application information, and/or the characteristic wavelength band information, and/or the calculation parameters of the spectral analysis model specified in the model application information may be configured;
specifically, as shown in fig. 2, an attribute configuration function may be set in the model configuration module, and configured according to an algorithm and parameters required in each step in the configuration model prediction process, so as to finally realize the model prediction of the spectrum. Attribute configuration can be carried out on each spectral characteristic attribute, and the main attribute configuration content comprises: spectral feature attributes, preprocessing configuration, characteristic band information, identification information of a spectral analysis model, and the like, which may be referred to as attribute configuration; wherein,
outputting a spectral characteristic attribute form: and configuring the name of the output spectral characteristic attribute, the unit type of the predicted spectral characteristic attribute of the configuration model and a specific measurement unit, and representing the physical meaning of the predicted spectral characteristic attribute, wherein the unit is g/L if the predicted spectral characteristic attribute is a concentration type. After the cloud platform prediction is finished, the spectrum characteristic attribute name, the attribute value and the measurement unit are sent to external equipment for displaying, so that a user can understand the specific meaning of the spectrum characteristic attribute value;
preprocessing configuration: the parameters of a spectrum interpolation algorithm, a spectrum preprocessing algorithm and/or a spectrum preprocessing algorithm and the like can be configured;
and (3) a spectrum interpolation algorithm: interpolating the spectrum information so as to keep the spectrum in model prediction consistent with the spectrum in model building;
the process of establishing the spectral analysis model comprises the steps of firstly preprocessing a spectral information training set through interpolation, preprocessing and the like, and then training spectral analysis models such as a multiple linear regression, a principal component analysis, a partial least square method, a support vector machine, a neural network and the like, so as to obtain parameters of the spectral analysis model; when model prediction is carried out, the same parameters of a preprocessing and spectral analysis model are needed to obtain an ideal model prediction result.
Spectral pre-processing algorithm and/or spectral pre-processing algorithm parameters: the spectral preprocessing in the model prediction process is not exactly the same as the spectral preprocessing in the modeling process. The spectrum preprocessing algorithm of part of the modeling process can be directly used in the prediction process, such as a smoothing algorithm, the size of a window adopted in the modeling process is the same, and the same window size is also adopted in the model prediction process. The spectrum preprocessing algorithm in the partial prediction process uses spectrum preprocessing algorithm parameters formed when all spectrum information is subjected to spectrum preprocessing in modeling, if the spectrum preprocessing adopts an orthogonal signal correction algorithm, a weight matrix and a load matrix are generated and are used for preprocessing a new single spectrum of a measured object so as to achieve the preprocessing effect same as that of modeling, and the spectrum preprocessing algorithm parameters formed in modeling need to be uploaded in configuring the preprocessing algorithm.
After the pre-processing configuration, a spectrum interpolation function and/or a spectrum pre-processing result verification function can be provided, so that a modeling expert can confirm whether the configured spectrum interpolation algorithm and/or spectrum pre-processing algorithm calculation result is consistent with the pre-processing algorithm result of the self-use modeling tool. The modeling expert can upload the spectrum information according to the specified file and format so as to take out correct data content and process the data according to the set spectrum interpolation algorithm and/or spectrum preprocessing algorithm. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the preprocessing result of the modeling tool to find problems.
Characteristic band information: namely, selecting wavelength, and configuring a characteristic wave band which is the same as the characteristic wave band selected in modeling;
identification information of the spectral analysis model, i.e., the type of the spectral analysis model: such as Partial Least Squares (PLS), Multiple Linear Regression (MLR), Support Vector Machine (SVM), and the like. Different types of spectral analysis models are finally formed by different modeling methods used by modeling experts, the types of the spectral analysis models are different, and the calculation methods between spectra and models are different, so that the model experts are required to select specific identification information of the spectral analysis models.
The calculation parameters of the spectral analysis model refer to the related parameters of the spectral analysis model matched with each scene, which are obtained in the modeling process;
taking a PLS model as an example, assuming that the PLS model is Y ═ a + X × b, where Y is a model prediction result, X is spectral information, a is a constant, b is a matrix, and a and b are calculation parameters of a spectral analysis model; after the modeling process is used for solving a and b, the values of a and b need to be substituted into a PLS model to perform accurate prediction when the spectral information to be detected is predicted. In different scenes such as a spectrometer and the like, the calculation parameters of the spectral analysis model are different; the model prediction can be more accurate by adopting the calculation parameters of the spectral analysis model of the same scene.
The modeling expert can also upload the spectral analysis model on the cloud platform, store the spectral analysis model at a designated position, and call the spectral analysis model when predicting the model. The modeling expert may upload in a specified file and format to use the correct data content for computation. Third party model calls may also be configured: the model experts can conveniently call the models on other platforms, and more comprehensive detection service is provided for the user. The third party model calling configuration content can be designed by combining with a third party platform interface.
The configuration module may also provide model validation functions: and the verification of the prediction result of the spectral analysis model is provided, so that the modeling expert can correctly predict the uploaded spectral information after confirming that the attribute configuration is completed. A modeling expert may be required to upload spectra according to a specified file and format in order to extract the correct data content for model prediction. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the model prediction result of the modeling tool, and problems are found.
Furthermore, first instrument configuration information corresponding to the model application information can be configured; namely, carrying out instrument configuration; the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or, for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
specifically, as shown in fig. 2, an instrument configuration function may be set in the model configuration module, and the instrument configuration information may be information of the type, manufacturer, model, version, configuration, parameter, and the like of the spectrometer used in modeling. The terminal such as the spectrometer can set information such as the type, model, version, configuration, parameters and the like of the spectrometer in the current spectral information to be measured. The model configuration module can also send instrument configuration information in the spectrum application information to the spectrometer; the instrument configuration information sent to the spectrometer here may be the instrument configuration information employed in the modeling; the same information is configured together, so that the subsequent model prediction is more accurate;
the instrument configuration information can be sent to the spectrometer currently performing spectral analysis, so that the spectrometer performs spectral sampling and the like according to the instrument configuration information. The spectrometer can send the self model, parameters and other instrument configuration information to the cloud platform, matching verification is carried out on the spectrometer configuration information and the instrument configuration information adopted by model prediction, if the model configuration information exceeds a preset threshold value, the spectrometer is considered not to be matched, and model prediction is not carried out any more.
Further, configuring application object information corresponding to the model application information; the method further comprises the following steps: the application object information is used as corresponding model application information and/or index information of a specified spectral analysis model in the model application information;
specifically, as shown in fig. 2, an object configuration function may be set in the model configuration module, the spectral analysis model is to measure spectral characteristic attributes of a specific object, and one spectral characteristic attribute generally corresponds to one spectral analysis model. Creating a spectral analysis model first should create the objects predicted by the model. Here, the entering of the introduction information of the prediction object of the spectral analysis model, the assigning of a unique identifier to the object, and the establishing of the directory index for the detection object are mainly completed, and after the configuration is completed, these pieces of information may be provided to the outside so as to obtain the detailed information of the prediction object and the model, and the application object information of the main configuration may include: creating objects, object classification, model description, creator information, measurement methods, attribute description, and/or usage scenario, etc., may be referred to as object configuration, where,
creating an object: a model prediction object may be created and the name of the object entered, generating unique identification information for the object. Such as apples, etc.;
object classification: the modeling expert can establish a directory index for the model prediction object according to a certain classification standard, and an external user can conveniently search according to the directory index. If the first-level catalog is set as agriculture, the second-level catalog is set as grain, fruit and processing, and the third-level catalog is filled by modeling experts;
model description: description information of a prediction spectral analysis model corresponding to the object can be input, such as introduction of the spectral analysis model or creation, update and maintenance information of the spectral analysis model;
creator information: inputting the information of the name of a creator or the name of a creating unit, such as characters, pictures and the like;
the measuring method comprises the following steps: information for correctly detecting by using the spectrometer can be input, such as detection steps, the position of a detected object, a detection mode adopted, and text, picture or video information for introducing a measurement method such as how the detected object is sampled and placed;
and attribute description: information such as a spectrum characteristic attribute name, a detection range of the spectrum characteristic attribute, detection precision of each spectrum characteristic attribute and the like which can be detected by a detection object can be input;
the use scenario is as follows: the prediction model can be input to be suitable for application scenes, such as requirements on physical forms, temperature, maturity conditions and the like of a detection object and requirements on the working environment temperature of a spectrometer;
after the configuration of the model application information is completed, the information of object configuration, instrument configuration and attribute configuration can be stored in the cloud platform configuration information area according to a certain mode, and unique identification information can be set for each model application information and stored in the identification information. Here, the model application information may be used only by the modeling expert's own account, and is not directly provided to the general user, aiming at controlling the scope of distribution.
After the model is mature, the model expert can integrate one or more objects under a certain application scene into an application package according to the directory index in the object configuration, and after naming the objects, an index directory is formed for a user to load one or more batch models according to the application scene. And storing the index directory of the model integration in an index information area. The model released at this stage is for use by ordinary users or third parties.
As shown in fig. 2, an object publishing function may be set in the model configuration module to publish the configured model application information, and the module may store the model application information of the object configuration, the instrument configuration, and the attribute configuration in the cloud platform configuration information area in a certain manner, and may set unique identification information for each model application information. The object is released in the object releasing stage, can be used by the modeling expert personal account and is not directly provided for a common user, and the purpose is to control the releasing range.
Step 102: acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected;
here, the spectrometer can send the current spectral information to be detected to the internet of things cloud platform, and the cloud platform detects the spectral information to be detected; the preset corresponding rule can be set according to specific information in the to-be-detected spectrum information and the model application information, such as determining the model application information according to the spectrum characteristic attribute; the spectrometer can communicate with the Internet of things cloud platform through a communication terminal or an external communication terminal of the spectrometer. The model application information can be applied in the cloud platform through the model application module, for example, the model application information is released to a cloud platform user, the spectrum information to be measured is predicted, and the like.
Further, according to a preset correspondence rule, determining model application information corresponding to the spectral information to be detected, where the spectral information to be detected and the model application information are determined to correspond to each other when preset first identification information in the spectral information to be detected and preset second identification information of the model application information are matched;
here, the first identification information and the second identification information may be agreed in advance, and may be agreed in advance identification information of the detection object. Setting first identification information when the spectrometer generates spectral information to be detected, and setting second identification information when the cloud platform generates model application information;
after the model application information corresponding to the spectrum information to be detected is determined, plug-in and/or spectrum preprocessing can be performed on the spectrum information to be detected according to a spectrum interpolation algorithm, a spectrum preprocessing algorithm, spectrum preprocessing algorithm parameters and the like in the model application information; selecting a characteristic wave band according to characteristic wave band information in the model application information; and finally, selecting a spectral analysis model according to the identification information of the spectral analysis model in the model application information, and calculating by adopting the calculation parameters of the spectral analysis model so as to obtain a prediction result. Wherein, the spectral analysis model can be pre-stored in the cloud platform or acquired from a third party platform.
Furthermore, in the application process of the spectral analysis model, first instrument configuration information in the model application information can be used for matching verification with second instrument configuration information in the current spectral information to be detected, and/or the first instrument configuration information can be used for being read by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
therefore, the spectrometer used by the current spectral information to be measured can be ensured to be consistent with the spectrometer used in modeling, and the accuracy of model prediction can be improved;
by adopting the spectral analysis model application of the embodiment of the invention, the cloud platform of the manager can realize the establishment and release of model application information suitable for different scenes through a configuration mode on the cloud platform for external calling, thereby meeting the requirements of different application scenes.
The positive effects produced by the present invention will be described in further detail with reference to specific examples below;
as shown in fig. 3, the system for predicting spectra by the internet of things may include an internet of things cloud platform and a spectrometer terminal; third party platforms and model application and management Platform Computer (PC) gates may also be included; the cloud platform of the internet of things can be composed of a receiving module, a service module, an authentication module, a data storage module, a model configuration module, a model application module, a scheduling module and an algorithm library. The cloud platform of the Internet of things is called a cloud platform for short;
the spectrometer terminal is equipment with a part of functions or functions of spectrum acquisition, spectrometer control, interaction with a cloud platform background, data display and control of other equipment. The spectrometer terminal can be integrated with the spectrometer or can be independent. The spectrometer terminal can enable the spectrometer to carry out spectrum acquisition according to the configured instrument configuration information or the instrument configuration information acquired from the cloud platform, so that the spectrometer terminal can adapt to the conditions that the selected instrument types and parameter configurations of different detection objects are different. Wherein the instrument configuration information includes: the instrument type and parameter configuration of the spectrometer, etc. When the spectrometer terminal detects a specific object and performs spectrum acquisition on the object, the spectrometer terminal can send spectral information, namely, spectral signals of the detected object, unique identification information of the detected object, instrument configuration information such as instrument type and parameter configuration, and all information related to spectral analysis such as environment temperature to the cloud platform. General software installed on a spectrometer terminal, such as Application (APP), can acquire introduction information, object identification, detection results or conclusions of an object which can be detected by the spectrometer through a background, and provide functions of interaction, display and the like for a user;
the third party platform refers to a vendor or an individual, etc. that can call the model to perform the spectrum analysis through an Application Programming Interface (API) provided by the cloud platform.
The PC gate of the model application and management platform refers to a webpage provided for a modeling expert to use, and is in butt joint with the model configuration module and the model application module of the background, so that the modeling expert can transplant established model application information to the cloud platform and can rapidly provide the information for a user to use.
And the authentication module is used for realizing the authentication of users, including the authentication of three types of users including a spectrometer terminal, a third party and a modeling expert and other managers, and the functions under the authority can be obtained only through the authenticated account number.
The service module has the main function of providing service for service requests sent by a spectrometer terminal, a third party and a modeling expert through the authentication module, the data storage module, the model configuration module and the model application module. The service module manages the function authority of the account through the authentication module and provides services within the authorization range of the service module. And services such as data uploading, downloading, inquiring and storing are provided for the user through the data storage module. The service module can also provide service for model configuration and an application platform PC portal, and interaction between the model configuration module and the model application module through a webpage by a modeling expert is realized.
The receiving module can be responsible for receiving the spectral information that needs to be made spectral analysis that the spectrometer terminal uploaded, and the receiving module can satisfy the concurrent access requirement of a plurality of spectrometer terminals, third party producer or individual application. When the spectrometer does not perform detection, the logging, storing, querying and downloading functions of the spectrometer terminal can be set to be completed through the service module, so that the platform performance is improved.
The model configuration module has the functions of object configuration, instrument configuration, attribute configuration and object release, and has the main functions of configuring model introduction information, instrument configuration information during modeling and corresponding algorithms and parameters during model prediction of each attribute, and loading the configuration information into model application information of the data storage module for external use. The object configuration function is mainly to input introduction information of the model, such as the name of the model detection object, the name of each detected attribute, the detection precision of each attribute, the applicable scene of the model, and the like, and the information can be used for showing to the user. The function of the instrument configuration module is mainly to adapt the spectrometer, namely to set instrument configuration information such as instrument type, configuration, parameters and version, etc., the model configuration module and the model application module are consistent with the instrument type, configuration, parameters and version used in modeling, the information can be loaded to the spectrometer terminal or acquired by the spectrometer terminal through the network at the background, when the spectrometer terminal measures a certain object, the spectrometer terminal automatically issues or directly controls the spectrometer to carry out spectrum acquisition according to the settings in the instrument configuration information, so as to ensure that a user can correctly use the instrument and obtain an accurate detection result. The attribute configuration has the main function of configuring corresponding algorithms and parameters required by the algorithms for each attribute of the detection object according to the step of model prediction. The object publishing is to store the information of the object, the instrument and the attribute after the configuration is completed in a model application information storage area in the data storage module, wherein the information contains the unique identification information of the object.
The model application module comprises a model integration function and an application generation function, and the main function of the model application module is to integrate models for detecting one or more detection objects together to form a directory index, and load the directory index into the data storage module for all users with calling authority to call. The function of model integration is mainly to integrate one or more models of detection objects according to the requirements of application scenarios. The function of the application generation is mainly to load the index catalog of each object model integrated in the model integration function module into the model application information in the data storage module, and a user can directly obtain all models in the application scene through the catalog.
The scheduling module has the main functions of carrying out algorithm scheduling, searching model application information corresponding to the detection object in the model application information according to the unique identification information of the detection object, searching an algorithm and a parameter corresponding to each step in the model application information according to a prediction process, scheduling the corresponding algorithm in an algorithm library, and simultaneously transmitting the parameter to the algorithm. Here, the division of the modules is mainly to facilitate understanding of the embodiments of the present invention, and in practical applications, the model application module and the scheduling module may be the same module.
The main function of the algorithm library is to provide the algorithms that the scheduling module needs to call. The module can provide corresponding algorithms for each step in different detection object prediction processes, such as algorithms in a preprocessing process, algorithms of a spectral analysis model and the like. When an algorithm is added in the algorithm library, the corresponding algorithm name can be added in the corresponding attribute configuration, and when the algorithm is improved, no change is needed, so that the expansion and the improvement of the algorithm are facilitated.
The data storage module has the main function of storing different types of information, and the information mainly comprises user information, model application information and result information. The user information is mainly used for storing data, such as measurement records, collection records, photos and other information of the user, stored in the background when each user account uses the spectrometer terminal. The model application information is information stored after the modeling expert uses the model configuration and application platform for configuration, such as object, instrument and attribute information, and the published object identification and the index directory generated in the model application. The result information is the prediction result information which is temporarily stored, and the background covers or cleans the prediction result information according to a certain time.
The work flow of the system for predicting the spectrum by the Internet of things is as follows:
the spectrometer terminal and the third party can load object information, instrument configuration information and unique identification information of the detected object in the authority range of the spectrometer terminal and the third party through the service module, and a user can see model introduction in the object information through the interactive display equipment. When a detection object is detected, the loaded instrument configuration information can control the spectrometer to acquire the spectrum according to the instrument configuration and parameters during modeling through the unique identification information of the detection object. After the collection is finished, sending the spectral information to be detected of the detection object to a cloud spectral receiving module, wherein the spectral information comprises all information related to spectral analysis, such as a spectral signal, a unique model identifier corresponding to the detection object, instrument configuration information, environmental temperature and the like;
and after receiving the spectral information to be detected, the receiving module sends the spectral information to be detected to the scheduling module. The scheduling module firstly finds the model application information corresponding to the detected object in the model application information according to the unique identification information of the object, and compares the spectrum information to be detected with the instrument configuration information in the model application information. If the instrument configuration information in the spectral information to be tested is different from the model application information, storing the unmatched instrument result in a result information area; if the spectral information is the same as the detected object, firstly carrying out interpolation, preprocessing and the like on the spectral information to be detected according to the steps of the model application information and the algorithm and the parameters configured for each step, then intercepting the characteristic wave band, then selecting the spectral analysis model according to the model identification information, calculating the spectral information to be detected by adopting the calculation parameters of the spectral analysis model, finally obtaining the calculation result of each attribute of the detected object, and storing the calculation result into a result information area. The spectrometer terminal or a third party sends a result query request to the service module to obtain a spectral analysis result;
the spectrometer terminal can also store, download and view the contents of files, records, pictures and the like in the user information in a mode of sending a request to the service module. And the service module provides the service within the account authority range through the authentication module and the data storage module after receiving the corresponding request.
As shown in fig. 4, the spectrum analysis model application apparatus provided in the embodiment of the present invention includes: a model configuration module 41 and a model application module 42; wherein,
the model configuration module 41 is configured to configure each model application information corresponding to each spectral characteristic attribute by using a preset configuration rule;
here, model application information can be configured on the internet of things cloud platform; the preset configuration rule can be set according to scenes which may appear in the prediction process of the actual model, such as different prediction objects, different spectral feature attributes of the prediction objects, different preprocessing modes and the like; the model application information can be a set of information required by the whole model prediction process, including preprocessing of spectral information to be detected, spectral analysis model identification information, spectral analysis model calculation parameter configuration and the like; the configuration can be performed in a mode of selecting various preprocessing modes, information and calculation parameters preset in the cloud platform of the internet of things.
In the actual model prediction process, the model application information is different for different scenes. Aiming at different spectral characteristic attributes, such as water, sugar and the like of the apples, a spectral analysis model corresponding to the water, the sugar and the like is adopted for prediction; meanwhile, when different spectral characteristic attributes are predicted for the same spectral analysis model, different model application information needs to be adopted for spectral information to be detected, and different preprocessing, calculation parameters of the spectral analysis model and the like are performed;
specifically, the model application information may be configured in the cloud platform through the model configuration module 41, the model configuration module 41 may classify according to different spectral characteristic attributes, and configure the model application information corresponding to different spectral analysis models and application scenes for different spectral characteristic attributes, respectively; the configuration information of the model application information can be listed in the cloud platform in advance, and can be configured in a manual mode and the like to finally form the model application information.
In practical application, model application information can be configured by a modeling expert through authentication management in a cloud platform; the modeling expert can verify, use and the like in the account; the model application information configured by the modeling expert can be integrated and then released to a common account or a third party for use and the like in a certain application scene.
Further, the spectral analysis model output spectral feature attribute form specified in the model application information, and/or the preprocessing configuration, and/or the identification information of the spectral analysis model specified in the model application information, and/or the characteristic wavelength band information, and/or the calculation parameters of the spectral analysis model specified in the model application information may be configured;
specifically, as shown in fig. 2, an attribute configuration function may be set in the model configuration module 41, and is used to configure according to an algorithm and parameters required in each step in the configuration model prediction process, so as to finally realize the model prediction of the spectrum. Attribute configuration can be carried out on each spectral characteristic attribute, and the main attribute configuration content comprises: spectral feature attributes, preprocessing configuration, characteristic band information, identification information of a spectral analysis model, and the like, which may be referred to as attribute configuration; wherein,
outputting a spectral characteristic attribute form: and configuring the name of the output spectral characteristic attribute, the unit type of the predicted spectral characteristic attribute of the configuration model and a specific measurement unit, and representing the physical meaning of the predicted spectral characteristic attribute, wherein the unit is g/L if the predicted spectral characteristic attribute is a concentration type. After the cloud platform prediction is finished, the spectrum characteristic attribute name, the attribute value and the measurement unit are sent to external equipment for displaying, so that a user can understand the specific meaning of the spectrum characteristic attribute value;
preprocessing configuration: the parameters of a spectrum interpolation algorithm, a spectrum preprocessing algorithm and/or a spectrum preprocessing algorithm and the like can be configured;
and (3) a spectrum interpolation algorithm: interpolating the spectrum information so as to keep the spectrum in model prediction consistent with the spectrum in model building;
the process of establishing the spectral analysis model comprises the steps of firstly preprocessing a spectral information training set through interpolation, preprocessing and the like, and then training spectral analysis models such as a multiple linear regression, a principal component analysis, a partial least square method, a support vector machine, a neural network and the like, so as to obtain parameters of the spectral analysis model; when model prediction is carried out, the same parameters of a preprocessing and spectral analysis model are needed to obtain an ideal model prediction result.
Spectral pre-processing algorithm and/or spectral pre-processing algorithm parameters: the spectral preprocessing in the model prediction process is not exactly the same as the spectral preprocessing in the modeling process. The spectrum preprocessing algorithm of part of the modeling process can be directly used in the prediction process, such as a smoothing algorithm, the size of a window adopted in the modeling process is the same, and the same window size is also adopted in the model prediction process. The spectrum preprocessing algorithm in the partial prediction process uses spectrum preprocessing algorithm parameters formed when all spectrum information is subjected to spectrum preprocessing in modeling, if the spectrum preprocessing adopts an orthogonal signal correction algorithm, a weight matrix and a load matrix are generated and are used for preprocessing a new single spectrum of a measured object so as to achieve the preprocessing effect same as that of modeling, and the spectrum preprocessing algorithm parameters formed in modeling need to be uploaded in configuring the preprocessing algorithm.
After the pre-processing configuration, a spectrum interpolation function and/or a spectrum pre-processing result verification function can be provided, so that a modeling expert can confirm whether the configured spectrum interpolation algorithm and/or spectrum pre-processing algorithm calculation result is consistent with the pre-processing algorithm result of the self-use modeling tool. The modeling expert can upload the spectrum information according to the specified file and format so as to take out correct data content and process the data according to the set spectrum interpolation algorithm and/or spectrum preprocessing algorithm. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the preprocessing result of the modeling tool to find problems.
Characteristic band information: namely, selecting wavelength, and configuring a characteristic wave band which is the same as the characteristic wave band selected in modeling;
identification information of the spectral analysis model, i.e., the type of the spectral analysis model: PLS, MLR, SVM, etc. Different types of spectral analysis models are finally formed by different modeling methods used by modeling experts, the types of the spectral analysis models are different, and the calculation methods between spectra and models are different, so that the model experts are required to select specific identification information of the spectral analysis models.
The calculation parameters of the spectral analysis model refer to the related parameters of the spectral analysis model matched with each scene, which are obtained in the modeling process;
taking a PLS model as an example, assuming that the PLS model is Y ═ a + X × b, where Y is a model prediction result, X is spectral information, a is a constant, b is a matrix, and a and b are calculation parameters of a spectral analysis model; after the modeling process is used for solving a and b, the values of a and b need to be substituted into a PLS model to perform accurate prediction when the spectral information to be detected is predicted. In different scenes such as a spectrometer and the like, the calculation parameters of the spectral analysis model are different; the model prediction can be more accurate by adopting the calculation parameters of the spectral analysis model of the same scene.
The modeling expert can also upload the spectral analysis model on the cloud platform, store the spectral analysis model at a designated position, and call the spectral analysis model when predicting the model. The modeling expert may upload in a specified file and format to use the correct data content for computation. Third party model calls may also be configured: the model experts can conveniently call the models on other platforms, and more comprehensive detection service is provided for the user. The third party model calling configuration content can be designed by combining with a third party platform interface.
The configuration module may also provide model validation functions: and the verification of the prediction result of the spectral analysis model is provided, so that the modeling expert can correctly predict the uploaded spectral information after confirming that the attribute configuration is completed. A modeling expert may be required to upload spectra according to a specified file and format in order to extract the correct data content for model prediction. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the model prediction result of the modeling tool, and problems are found.
Furthermore, first instrument configuration information corresponding to the model application information can be configured; namely, carrying out instrument configuration; the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or, for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
specifically, as shown in fig. 2, an instrument configuration function may be set in the model configuration module 41, and the instrument configuration information may be information of the type, manufacturer, model, version, configuration, parameter, and the like of the spectrometer used in modeling. The terminal such as the spectrometer can set information such as the type, model, version, configuration, parameters and the like of the spectrometer in the current spectral information to be measured. The model configuration module 41 may also send instrument configuration information in the spectrum application information to the spectrometer; the instrument configuration information sent to the spectrometer here may be the instrument configuration information employed in the modeling; the same information is configured together, so that the subsequent model prediction is more accurate;
the instrument configuration information can be sent to the spectrometer currently performing spectral analysis, so that the spectrometer performs spectral sampling and the like according to the instrument configuration information. The spectrometer can send the self model, parameters and other instrument configuration information to the cloud platform, matching verification is carried out on the spectrometer configuration information and the instrument configuration information adopted by model prediction, if the model configuration information exceeds a preset threshold value, the spectrometer is considered not to be matched, and model prediction is not carried out any more.
Further, configuring application object information corresponding to the model application information; the method further comprises the following steps: the application object information is used as corresponding model application information and/or index information of a specified spectral analysis model in the model application information;
specifically, as shown in fig. 2, an object configuration function may be set in the model configuration module 41, where the spectral analysis model is measured according to spectral feature attributes of a specific object, and one spectral feature attribute generally corresponds to one spectral analysis model. Creating a spectral analysis model first should create the objects predicted by the model. Here, the entering of the introduction information of the prediction object of the spectral analysis model, the assigning of a unique identifier to the object, and the establishing of the directory index for the detection object are mainly completed, and after the configuration is completed, these pieces of information may be provided to the outside so as to obtain the detailed information of the prediction object and the model, and the application object information of the main configuration may include: creating objects, object classification, model description, creator information, measurement methods, attribute description, and/or usage scenario, etc., may be referred to as object configuration, where,
creating an object: a model prediction object may be created and the name of the object entered, generating unique identification information for the object. Such as apples, etc.;
object classification: the modeling expert can establish a directory index for the model prediction object according to a certain classification standard, and an external user can conveniently search according to the directory index. If the first-level catalog is set as agriculture, the second-level catalog is set as grain, fruit and processing, and the third-level catalog is filled by modeling experts;
model description: description information of a prediction spectral analysis model corresponding to the object can be input, such as introduction of the spectral analysis model or creation, update and maintenance information of the spectral analysis model;
creator information: inputting the information of the name of a creator or the name of a creating unit, such as characters, pictures and the like;
the measuring method comprises the following steps: information for correctly detecting by using the spectrometer can be input, such as detection steps, the position of a detected object, a detection mode adopted, and text, picture or video information for introducing a measurement method such as how the detected object is sampled and placed;
and attribute description: information such as a spectrum characteristic attribute name, a detection range of the spectrum characteristic attribute, detection precision of each spectrum characteristic attribute and the like which can be detected by a detection object can be input;
the use scenario is as follows: the prediction model can be input to be suitable for application scenes, such as requirements on physical forms, temperature, maturity conditions and the like of a detection object and requirements on the working environment temperature of a spectrometer;
after the configuration of the model application information is completed, the information of object configuration, instrument configuration and attribute configuration can be stored in the cloud platform configuration information area according to a certain mode, and unique identification information can be set for each model application information and stored in the identification information. Here, the model application information may be used only by the modeling expert's own account, and is not directly provided to the general user, aiming at controlling the scope of distribution.
After the model is mature, the model expert can integrate one or more objects under a certain application scene into an application package according to the directory index in the object configuration, and after naming the objects, an index directory is formed for a user to load one or more batch models according to the application scene. And storing the index directory of the model integration in an index information area. The model released at this stage is for use by ordinary users or third parties.
As shown in fig. 2, an object publishing function may be set in the model configuration module 41 to publish configured model application information, and the module may store the model application information of object configuration, instrument configuration, and attribute configuration in the cloud platform configuration information area according to a certain manner, and may set unique identification information for each model application information. The object is released in the object releasing stage, can be used by the modeling expert personal account and is not directly provided for a common user, and the purpose is to control the releasing range.
The model application module 42 is configured to obtain current spectral information to be detected, and determine, according to a preset correspondence rule, model application information corresponding to the current spectral information to be detected; detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected;
here, the spectrometer can send the current spectral information to be detected to the internet of things cloud platform, and the cloud platform detects the spectral information to be detected; the preset corresponding rule can be set according to specific information in the to-be-detected spectrum information and the model application information, such as determining the model application information according to the spectrum characteristic attribute; the spectrometer can communicate with the Internet of things cloud platform through a communication terminal or an external communication terminal of the spectrometer. The model application information may be applied in the cloud platform through the model application module 42, for example, the model application information is released to a cloud platform user, and the spectrum information to be measured is predicted.
Further, according to a preset correspondence rule, determining model application information corresponding to the spectral information to be detected, where the spectral information to be detected and the model application information are determined to correspond to each other when preset first identification information in the spectral information to be detected and preset second identification information of the model application information are matched;
here, the first identification information and the second identification information may be agreed in advance, and may be agreed in advance identification information of the detection object. Setting first identification information when the spectrometer generates spectral information to be detected, and setting second identification information when the cloud platform generates model application information;
after the model application information corresponding to the spectrum information to be detected is determined, plug-in and/or spectrum preprocessing can be performed on the spectrum information to be detected according to a spectrum interpolation algorithm, a spectrum preprocessing algorithm, spectrum preprocessing algorithm parameters and the like in the model application information; selecting a characteristic wave band according to characteristic wave band information in the model application information; and finally, selecting a spectral analysis model according to the identification information of the spectral analysis model in the model application information, and calculating by adopting the calculation parameters of the spectral analysis model so as to obtain a prediction result. Wherein, the spectral analysis model can be pre-stored in the cloud platform or acquired from a third party platform.
Furthermore, in the application process of the spectral analysis model, first instrument configuration information in the model application information can be used for matching verification with second instrument configuration information in the current spectral information to be detected, and/or the first instrument configuration information can be used for being read by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
therefore, the spectrometer used by the current spectral information to be measured can be ensured to be consistent with the spectrometer used in modeling, and the accuracy of model prediction can be improved;
by adopting the spectral analysis model application of the embodiment of the invention, the cloud platform of the manager can realize the establishment and release of model application information suitable for different scenes through a configuration mode on the cloud platform for external calling, thereby meeting the requirements of different application scenes.
In practical application, the model configuration module 41 and the model application module 42 may be implemented by a CPU, a Microprocessor (MCU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA) in a cloud platform system server.
A storage medium is provided in an embodiment of the present invention, on which an executable program is stored, and when the executable program is executed by a processor, the method for applying a spectral analysis model is implemented, as shown in fig. 1, and includes:
step 101: configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
here, model application information can be configured on the internet of things cloud platform; the preset configuration rule can be set according to scenes which may appear in the prediction process of the actual model, such as different prediction objects, different spectral feature attributes of the prediction objects, different preprocessing modes and the like; the model application information can be a set of information required by the whole model prediction process, including preprocessing of spectral information to be detected, spectral analysis model identification information, spectral analysis model calculation parameter configuration and the like; the configuration can be performed in a mode of selecting various preprocessing modes, information and calculation parameters preset in the cloud platform of the internet of things.
In the actual model prediction process, the model application information is different for different scenes. Aiming at different spectral characteristic attributes, such as water, sugar and the like of the apples, a spectral analysis model corresponding to the water, the sugar and the like is adopted for prediction; meanwhile, when different spectral characteristic attributes are predicted for the same spectral analysis model, different model application information needs to be adopted for spectral information to be detected, and different preprocessing, calculation parameters of the spectral analysis model and the like are performed;
specifically, the model application information can be configured in the cloud platform through a model configuration module, the model configuration module can be classified according to different spectral characteristic attributes, and the model application information corresponding to different spectral analysis models and application scenes is configured for different spectral characteristic attributes respectively; the configuration information of the model application information can be listed in the cloud platform in advance, and can be configured in a manual mode and the like to finally form the model application information.
In practical application, model application information can be configured by a modeling expert through authentication management in a cloud platform; the modeling expert can verify, use and the like in the account; the model application information configured by the modeling expert can be integrated and then released to a common account or a third party for use and the like in a certain application scene.
Further, the spectral analysis model output spectral feature attribute form specified in the model application information, and/or the preprocessing configuration, and/or the identification information of the spectral analysis model specified in the model application information, and/or the characteristic wavelength band information, and/or the calculation parameters of the spectral analysis model specified in the model application information may be configured;
specifically, as shown in fig. 2, an attribute configuration function may be set in the model configuration module, and configured according to an algorithm and parameters required in each step in the configuration model prediction process, so as to finally realize the model prediction of the spectrum. Attribute configuration can be carried out on each spectral characteristic attribute, and the main attribute configuration content comprises: spectral feature attributes, preprocessing configuration, characteristic band information, identification information of a spectral analysis model, and the like, which may be referred to as attribute configuration; wherein,
outputting a spectral characteristic attribute form: and configuring the name of the output spectral characteristic attribute, the unit type of the predicted spectral characteristic attribute of the configuration model and a specific measurement unit, and representing the physical meaning of the predicted spectral characteristic attribute, wherein the unit is g/L if the predicted spectral characteristic attribute is a concentration type. After the cloud platform prediction is finished, the spectrum characteristic attribute name, the attribute value and the measurement unit are sent to external equipment for displaying, so that a user can understand the specific meaning of the spectrum characteristic attribute value;
preprocessing configuration: the parameters of a spectrum interpolation algorithm, a spectrum preprocessing algorithm and/or a spectrum preprocessing algorithm and the like can be configured;
and (3) a spectrum interpolation algorithm: interpolating the spectrum information so as to keep the spectrum in model prediction consistent with the spectrum in model building;
the process of establishing the spectral analysis model comprises the steps of firstly preprocessing a spectral information training set through interpolation, preprocessing and the like, and then training spectral analysis models such as a multiple linear regression, a principal component analysis, a partial least square method, a support vector machine, a neural network and the like, so as to obtain parameters of the spectral analysis model; when model prediction is carried out, the same parameters of a preprocessing and spectral analysis model are needed to obtain an ideal model prediction result.
Spectral pre-processing algorithm and/or spectral pre-processing algorithm parameters: the spectral preprocessing in the model prediction process is not exactly the same as the spectral preprocessing in the modeling process. The spectrum preprocessing algorithm of part of the modeling process can be directly used in the prediction process, such as a smoothing algorithm, the size of a window adopted in the modeling process is the same, and the same window size is also adopted in the model prediction process. The spectrum preprocessing algorithm in the partial prediction process uses spectrum preprocessing algorithm parameters formed when all spectrum information is subjected to spectrum preprocessing in modeling, if the spectrum preprocessing adopts an orthogonal signal correction algorithm, a weight matrix and a load matrix are generated and are used for preprocessing a new single spectrum of a measured object so as to achieve the preprocessing effect same as that of modeling, and the spectrum preprocessing algorithm parameters formed in modeling need to be uploaded in configuring the preprocessing algorithm.
After the pre-processing configuration, a spectrum interpolation function and/or a spectrum pre-processing result verification function can be provided, so that a modeling expert can confirm whether the configured spectrum interpolation algorithm and/or spectrum pre-processing algorithm calculation result is consistent with the pre-processing algorithm result of the self-use modeling tool. The modeling expert can upload the spectrum information according to the specified file and format so as to take out correct data content and process the data according to the set spectrum interpolation algorithm and/or spectrum preprocessing algorithm. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the preprocessing result of the modeling tool to find problems.
Characteristic band information: namely, selecting wavelength, and configuring a characteristic wave band which is the same as the characteristic wave band selected in modeling;
identification information of the spectral analysis model, i.e., the type of the spectral analysis model: PLS, MLR, SVM, etc. Different types of spectral analysis models are finally formed by different modeling methods used by modeling experts, the types of the spectral analysis models are different, and the calculation methods between spectra and models are different, so that the model experts are required to select specific identification information of the spectral analysis models.
The calculation parameters of the spectral analysis model refer to the related parameters of the spectral analysis model matched with each scene, which are obtained in the modeling process;
taking a PLS model as an example, assuming that the PLS model is Y ═ a + X × b, where Y is a model prediction result, X is spectral information, a is a constant, b is a matrix, and a and b are calculation parameters of a spectral analysis model; after the modeling process is used for solving a and b, the values of a and b need to be substituted into a PLS model to perform accurate prediction when the spectral information to be detected is predicted. In different scenes such as a spectrometer and the like, the calculation parameters of the spectral analysis model are different; the model prediction can be more accurate by adopting the calculation parameters of the spectral analysis model of the same scene.
The modeling expert can also upload the spectral analysis model on the cloud platform, store the spectral analysis model at a designated position, and call the spectral analysis model when predicting the model. The modeling expert may upload in a specified file and format to use the correct data content for computation. Third party model calls may also be configured: the model experts can conveniently call the models on other platforms, and more comprehensive detection service is provided for the user. The third party model calling configuration content can be designed by combining with a third party platform interface.
The configuration module may also provide model validation functions: and the verification of the prediction result of the spectral analysis model is provided, so that the modeling expert can correctly predict the uploaded spectral information after confirming that the attribute configuration is completed. A modeling expert may be required to upload spectra according to a specified file and format in order to extract the correct data content for model prediction. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the model prediction result of the modeling tool, and problems are found.
Furthermore, first instrument configuration information corresponding to the model application information can be configured; namely, carrying out instrument configuration; the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or, for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
specifically, as shown in fig. 2, an instrument configuration function may be set in the model configuration module, and the instrument configuration information may be information of the type, manufacturer, model, version, configuration, parameter, and the like of the spectrometer used in modeling. The terminal such as the spectrometer can set information such as the type, model, version, configuration, parameters and the like of the spectrometer in the current spectral information to be measured. The model configuration module can also send instrument configuration information in the spectrum application information to the spectrometer; the instrument configuration information sent to the spectrometer here may be the instrument configuration information employed in the modeling; the same information is configured together, so that the subsequent model prediction is more accurate;
the instrument configuration information can be sent to the spectrometer currently performing spectral analysis, so that the spectrometer performs spectral sampling and the like according to the instrument configuration information. The spectrometer can send the self model, parameters and other instrument configuration information to the cloud platform, matching verification is carried out on the spectrometer configuration information and the instrument configuration information adopted by model prediction, if the model configuration information exceeds a preset threshold value, the spectrometer is considered not to be matched, and model prediction is not carried out any more.
Further, configuring application object information corresponding to the model application information; the method further comprises the following steps: the application object information is used as corresponding model application information and/or index information of a specified spectral analysis model in the model application information;
specifically, as shown in fig. 2, an object configuration function may be set in the model configuration module, the spectral analysis model is to measure spectral characteristic attributes of a specific object, and one spectral characteristic attribute generally corresponds to one spectral analysis model. Creating a spectral analysis model first should create the objects predicted by the model. Here, the entering of the introduction information of the prediction object of the spectral analysis model, the assigning of a unique identifier to the object, and the establishing of the directory index for the detection object are mainly completed, and after the configuration is completed, these pieces of information may be provided to the outside so as to obtain the detailed information of the prediction object and the model, and the application object information of the main configuration may include: creating objects, object classification, model description, creator information, measurement methods, attribute description, and/or usage scenario, etc., may be referred to as object configuration, where,
creating an object: a model prediction object may be created and the name of the object entered, generating unique identification information for the object. Such as apples, etc.;
object classification: the modeling expert can establish a directory index for the model prediction object according to a certain classification standard, and an external user can conveniently search according to the directory index. If the first-level catalog is set as agriculture, the second-level catalog is set as grain, fruit and processing, and the third-level catalog is filled by modeling experts;
model description: description information of a prediction spectral analysis model corresponding to the object can be input, such as introduction of the spectral analysis model or creation, update and maintenance information of the spectral analysis model;
creator information: inputting the information of the name of a creator or the name of a creating unit, such as characters, pictures and the like;
the measuring method comprises the following steps: information for correctly detecting by using the spectrometer can be input, such as detection steps, the position of a detected object, a detection mode adopted, and text, picture or video information for introducing a measurement method such as how the detected object is sampled and placed;
and attribute description: information such as a spectrum characteristic attribute name, a detection range of the spectrum characteristic attribute, detection precision of each spectrum characteristic attribute and the like which can be detected by a detection object can be input;
the use scenario is as follows: the prediction model can be input to be suitable for application scenes, such as requirements on physical forms, temperature, maturity conditions and the like of a detection object and requirements on the working environment temperature of a spectrometer;
after the configuration of the model application information is completed, the information of object configuration, instrument configuration and attribute configuration can be stored in the cloud platform configuration information area according to a certain mode, and unique identification information can be set for each model application information and stored in the identification information. Here, the model application information may be used only by the modeling expert's own account, and is not directly provided to the general user, aiming at controlling the scope of distribution.
After the model is mature, the model expert can integrate one or more objects under a certain application scene into an application package according to the directory index in the object configuration, and after naming the objects, an index directory is formed for a user to load one or more batch models according to the application scene. And storing the index directory of the model integration in an index information area. The model released at this stage is for use by ordinary users or third parties.
As shown in fig. 2, an object publishing function may be set in the model configuration module to publish the configured model application information, and the module may store the model application information of the object configuration, the instrument configuration, and the attribute configuration in the cloud platform configuration information area in a certain manner, and may set unique identification information for each model application information. The object is released in the object releasing stage, can be used by the modeling expert personal account and is not directly provided for a common user, and the purpose is to control the releasing range.
Step 102: acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected;
here, the spectrometer can send the current spectral information to be detected to the internet of things cloud platform, and the cloud platform detects the spectral information to be detected; the preset corresponding rule can be set according to specific information in the to-be-detected spectrum information and the model application information, such as determining the model application information according to the spectrum characteristic attribute; the spectrometer can communicate with the Internet of things cloud platform through a communication terminal or an external communication terminal of the spectrometer. The model application information can be applied in the cloud platform through the model application module, for example, the model application information is released to a cloud platform user, the spectrum information to be measured is predicted, and the like.
Further, according to a preset correspondence rule, determining model application information corresponding to the spectral information to be detected, where the spectral information to be detected and the model application information are determined to correspond to each other when preset first identification information in the spectral information to be detected and preset second identification information of the model application information are matched;
here, the first identification information and the second identification information may be agreed in advance, and may be agreed in advance identification information of the detection object. Setting first identification information when the spectrometer generates spectral information to be detected, and setting second identification information when the cloud platform generates model application information;
after the model application information corresponding to the spectrum information to be detected is determined, plug-in and/or spectrum preprocessing can be performed on the spectrum information to be detected according to a spectrum interpolation algorithm, a spectrum preprocessing algorithm, spectrum preprocessing algorithm parameters and the like in the model application information; selecting a characteristic wave band according to characteristic wave band information in the model application information; and finally, selecting a spectral analysis model according to the identification information of the spectral analysis model in the model application information, and calculating by adopting the calculation parameters of the spectral analysis model so as to obtain a prediction result. Wherein, the spectral analysis model can be pre-stored in the cloud platform or acquired from a third party platform.
Furthermore, in the application process of the spectral analysis model, first instrument configuration information in the model application information can be used for matching verification with second instrument configuration information in the current spectral information to be detected, and/or the first instrument configuration information can be used for being read by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
therefore, the spectrometer used by the current spectral information to be measured can be ensured to be consistent with the spectrometer used in modeling, and the accuracy of model prediction can be improved;
by adopting the spectral analysis model application of the embodiment of the invention, the cloud platform of the manager can realize the establishment and release of model application information suitable for different scenes through a configuration mode on the cloud platform for external calling, thereby meeting the requirements of different application scenes.
The spectrum analysis model application device provided by the embodiment of the invention comprises a processor, a memory and an executable program which is stored on the memory and can be run by the processor, wherein the processor executes a method for realizing spectrum analysis model application when running the executable program, as shown in fig. 1, the method comprises the following steps:
step 101: configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
here, model application information can be configured on the internet of things cloud platform; the preset configuration rule can be set according to scenes which may appear in the prediction process of the actual model, such as different prediction objects, different spectral feature attributes of the prediction objects, different preprocessing modes and the like; the model application information can be a set of information required by the whole model prediction process, including preprocessing of spectral information to be detected, spectral analysis model identification information, spectral analysis model calculation parameter configuration and the like; the configuration can be performed in a mode of selecting various preprocessing modes, information and calculation parameters preset in the cloud platform of the internet of things.
In the actual model prediction process, the model application information is different for different scenes. Aiming at different spectral characteristic attributes, such as water, sugar and the like of the apples, a spectral analysis model corresponding to the water, the sugar and the like is adopted for prediction; meanwhile, when different spectral characteristic attributes are predicted for the same spectral analysis model, different model application information needs to be adopted for spectral information to be detected, and different preprocessing, calculation parameters of the spectral analysis model and the like are performed;
specifically, the model application information can be configured in the cloud platform through a model configuration module, the model configuration module can be classified according to different spectral characteristic attributes, and the model application information corresponding to different spectral analysis models and application scenes is configured for different spectral characteristic attributes respectively; the configuration information of the model application information can be listed in the cloud platform in advance, and can be configured in a manual mode and the like to finally form the model application information.
In practical application, model application information can be configured by a modeling expert through authentication management in a cloud platform; the modeling expert can verify, use and the like in the account; the model application information configured by the modeling expert can be integrated and then released to a common account or a third party for use and the like in a certain application scene.
Further, the spectral analysis model output spectral feature attribute form specified in the model application information, and/or the preprocessing configuration, and/or the identification information of the spectral analysis model specified in the model application information, and/or the characteristic wavelength band information, and/or the calculation parameters of the spectral analysis model specified in the model application information may be configured;
specifically, as shown in fig. 2, an attribute configuration function may be set in the model configuration module, and configured according to an algorithm and parameters required in each step in the configuration model prediction process, so as to finally realize the model prediction of the spectrum. Attribute configuration can be carried out on each spectral characteristic attribute, and the main attribute configuration content comprises: spectral feature attributes, preprocessing configuration, characteristic band information, identification information of a spectral analysis model, and the like, which may be referred to as attribute configuration; wherein,
outputting a spectral characteristic attribute form: and configuring the name of the output spectral characteristic attribute, the unit type of the predicted spectral characteristic attribute of the configuration model and a specific measurement unit, and representing the physical meaning of the predicted spectral characteristic attribute, wherein the unit is g/L if the predicted spectral characteristic attribute is a concentration type. After the cloud platform prediction is finished, the spectrum characteristic attribute name, the attribute value and the measurement unit are sent to external equipment for displaying, so that a user can understand the specific meaning of the spectrum characteristic attribute value;
preprocessing configuration: the parameters of a spectrum interpolation algorithm, a spectrum preprocessing algorithm and/or a spectrum preprocessing algorithm and the like can be configured;
and (3) a spectrum interpolation algorithm: interpolating the spectrum information so as to keep the spectrum in model prediction consistent with the spectrum in model building;
the process of establishing the spectral analysis model comprises the steps of firstly preprocessing a spectral information training set through interpolation, preprocessing and the like, and then training spectral analysis models such as a multiple linear regression, a principal component analysis, a partial least square method, a support vector machine, a neural network and the like, so as to obtain parameters of the spectral analysis model; when model prediction is carried out, the same parameters of a preprocessing and spectral analysis model are needed to obtain an ideal model prediction result.
Spectral pre-processing algorithm and/or spectral pre-processing algorithm parameters: the spectral preprocessing in the model prediction process is not exactly the same as the spectral preprocessing in the modeling process. The spectrum preprocessing algorithm of part of the modeling process can be directly used in the prediction process, such as a smoothing algorithm, the size of a window adopted in the modeling process is the same, and the same window size is also adopted in the model prediction process. The spectrum preprocessing algorithm in the partial prediction process uses spectrum preprocessing algorithm parameters formed when all spectrum information is subjected to spectrum preprocessing in modeling, if the spectrum preprocessing adopts an orthogonal signal correction algorithm, a weight matrix and a load matrix are generated and are used for preprocessing a new single spectrum of a measured object so as to achieve the preprocessing effect same as that of modeling, and the spectrum preprocessing algorithm parameters formed in modeling need to be uploaded in configuring the preprocessing algorithm.
After the pre-processing configuration, a spectrum interpolation function and/or a spectrum pre-processing result verification function can be provided, so that a modeling expert can confirm whether the configured spectrum interpolation algorithm and/or spectrum pre-processing algorithm calculation result is consistent with the pre-processing algorithm result of the self-use modeling tool. The modeling expert can upload the spectrum information according to the specified file and format so as to take out correct data content and process the data according to the set spectrum interpolation algorithm and/or spectrum preprocessing algorithm. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the preprocessing result of the modeling tool to find problems.
Characteristic band information: namely, selecting wavelength, and configuring a characteristic wave band which is the same as the characteristic wave band selected in modeling;
identification information of the spectral analysis model, i.e., the type of the spectral analysis model: PLS, MLR, SVM, etc. Different types of spectral analysis models are finally formed by different modeling methods used by modeling experts, the types of the spectral analysis models are different, and the calculation methods between spectra and models are different, so that the model experts are required to select specific identification information of the spectral analysis models.
The calculation parameters of the spectral analysis model refer to the related parameters of the spectral analysis model matched with each scene, which are obtained in the modeling process;
taking a PLS model as an example, assuming that the PLS model is Y ═ a + X × b, where Y is a model prediction result, X is spectral information, a is a constant, b is a matrix, and a and b are calculation parameters of a spectral analysis model; after the modeling process is used for solving a and b, the values of a and b need to be substituted into a PLS model to perform accurate prediction when the spectral information to be detected is predicted. In different scenes such as a spectrometer and the like, the calculation parameters of the spectral analysis model are different; the model prediction can be more accurate by adopting the calculation parameters of the spectral analysis model of the same scene.
The modeling expert can also upload the spectral analysis model on the cloud platform, store the spectral analysis model at a designated position, and call the spectral analysis model when predicting the model. The modeling expert may upload in a specified file and format to use the correct data content for computation. Third party model calls may also be configured: the model experts can conveniently call the models on other platforms, and more comprehensive detection service is provided for the user. The third party model calling configuration content can be designed by combining with a third party platform interface.
The configuration module may also provide model validation functions: and the verification of the prediction result of the spectral analysis model is provided, so that the modeling expert can correctly predict the uploaded spectral information after confirming that the attribute configuration is completed. A modeling expert may be required to upload spectra according to a specified file and format in order to extract the correct data content for model prediction. The data processing result can be exported for a modeling expert to compare and verify the data processing result with the model prediction result of the modeling tool, and problems are found.
Furthermore, first instrument configuration information corresponding to the model application information can be configured; namely, carrying out instrument configuration; the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or, for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
specifically, as shown in fig. 2, an instrument configuration function may be set in the model configuration module, and the instrument configuration information may be information of the type, manufacturer, model, version, configuration, parameter, and the like of the spectrometer used in modeling. The terminal such as the spectrometer can set information such as the type, model, version, configuration, parameters and the like of the spectrometer in the current spectral information to be measured. The model configuration module can also send instrument configuration information in the spectrum application information to the spectrometer; the instrument configuration information sent to the spectrometer here may be the instrument configuration information employed in the modeling; the same information is configured together, so that the subsequent model prediction is more accurate;
the instrument configuration information can be sent to the spectrometer currently performing spectral analysis, so that the spectrometer performs spectral sampling and the like according to the instrument configuration information. The spectrometer can send the self model, parameters and other instrument configuration information to the cloud platform, matching verification is carried out on the spectrometer configuration information and the instrument configuration information adopted by model prediction, if the model configuration information exceeds a preset threshold value, the spectrometer is considered not to be matched, and model prediction is not carried out any more.
Further, configuring application object information corresponding to the model application information; the method further comprises the following steps: the application object information is used as corresponding model application information and/or index information of a specified spectral analysis model in the model application information;
specifically, as shown in fig. 2, an object configuration function may be set in the model configuration module, the spectral analysis model is to measure spectral characteristic attributes of a specific object, and one spectral characteristic attribute generally corresponds to one spectral analysis model. Creating a spectral analysis model first should create the objects predicted by the model. Here, the entering of the introduction information of the prediction object of the spectral analysis model, the assigning of a unique identifier to the object, and the establishing of the directory index for the detection object are mainly completed, and after the configuration is completed, these pieces of information may be provided to the outside so as to obtain the detailed information of the prediction object and the model, and the application object information of the main configuration may include: creating objects, object classification, model description, creator information, measurement methods, attribute description, and/or usage scenario, etc., may be referred to as object configuration, where,
creating an object: a model prediction object may be created and the name of the object entered, generating unique identification information for the object. Such as apples, etc.;
object classification: the modeling expert can establish a directory index for the model prediction object according to a certain classification standard, and an external user can conveniently search according to the directory index. If the first-level catalog is set as agriculture, the second-level catalog is set as grain, fruit and processing, and the third-level catalog is filled by modeling experts;
model description: description information of a prediction spectral analysis model corresponding to the object can be input, such as introduction of the spectral analysis model or creation, update and maintenance information of the spectral analysis model;
creator information: inputting the information of the name of a creator or the name of a creating unit, such as characters, pictures and the like;
the measuring method comprises the following steps: information for correctly detecting by using the spectrometer can be input, such as detection steps, the position of a detected object, a detection mode adopted, and text, picture or video information for introducing a measurement method such as how the detected object is sampled and placed;
and attribute description: information such as a spectrum characteristic attribute name, a detection range of the spectrum characteristic attribute, detection precision of each spectrum characteristic attribute and the like which can be detected by a detection object can be input;
the use scenario is as follows: the prediction model can be input to be suitable for application scenes, such as requirements on physical forms, temperature, maturity conditions and the like of a detection object and requirements on the working environment temperature of a spectrometer;
after the configuration of the model application information is completed, the information of object configuration, instrument configuration and attribute configuration can be stored in the cloud platform configuration information area according to a certain mode, and unique identification information can be set for each model application information and stored in the identification information. Here, the model application information may be used only by the modeling expert's own account, and is not directly provided to the general user, aiming at controlling the scope of distribution.
After the model is mature, the model expert can integrate one or more objects under a certain application scene into an application package according to the directory index in the object configuration, and after naming the objects, an index directory is formed for a user to load one or more batch models according to the application scene. And storing the index directory of the model integration in an index information area. The model released at this stage is for use by ordinary users or third parties.
As shown in fig. 2, an object publishing function may be set in the model configuration module to publish the configured model application information, and the module may store the model application information of the object configuration, the instrument configuration, and the attribute configuration in the cloud platform configuration information area in a certain manner, and may set unique identification information for each model application information. The object is released in the object releasing stage, can be used by the modeling expert personal account and is not directly provided for a common user, and the purpose is to control the releasing range.
Step 102: acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected;
here, the spectrometer can send the current spectral information to be detected to the internet of things cloud platform, and the cloud platform detects the spectral information to be detected; the preset corresponding rule can be set according to specific information in the to-be-detected spectrum information and the model application information, such as determining the model application information according to the spectrum characteristic attribute; the spectrometer can communicate with the Internet of things cloud platform through a communication terminal or an external communication terminal of the spectrometer. The model application information can be applied in the cloud platform through the model application module, for example, the model application information is released to a cloud platform user, the spectrum information to be measured is predicted, and the like.
Further, according to a preset correspondence rule, determining model application information corresponding to the spectral information to be detected, where the spectral information to be detected and the model application information are determined to correspond to each other when preset first identification information in the spectral information to be detected and preset second identification information of the model application information are matched;
here, the first identification information and the second identification information may be agreed in advance, and may be agreed in advance identification information of the detection object. Setting first identification information when the spectrometer generates spectral information to be detected, and setting second identification information when the cloud platform generates model application information;
after the model application information corresponding to the spectrum information to be detected is determined, plug-in and/or spectrum preprocessing can be performed on the spectrum information to be detected according to a spectrum interpolation algorithm, a spectrum preprocessing algorithm, spectrum preprocessing algorithm parameters and the like in the model application information; selecting a characteristic wave band according to characteristic wave band information in the model application information; and finally, selecting a spectral analysis model according to the identification information of the spectral analysis model in the model application information, and calculating by adopting the calculation parameters of the spectral analysis model so as to obtain a prediction result. Wherein, the spectral analysis model can be pre-stored in the cloud platform or acquired from a third party platform.
Furthermore, in the application process of the spectral analysis model, first instrument configuration information in the model application information can be used for matching verification with second instrument configuration information in the current spectral information to be detected, and/or the first instrument configuration information can be used for being read by a spectrometer and configuring the spectrometer according to the first instrument configuration information;
therefore, the spectrometer used by the current spectral information to be measured can be ensured to be consistent with the spectrometer used in modeling, and the accuracy of model prediction can be improved;
by adopting the spectral analysis model application of the embodiment of the invention, the cloud platform of the manager can realize the establishment and release of model application information suitable for different scenes through a configuration mode on the cloud platform for external calling, thereby meeting the requirements of different application scenes.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (12)

1. A method of applying a spectral analysis model, the method comprising:
configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
acquiring current spectrum information to be detected, and determining model application information corresponding to the current spectrum information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected.
2. The method of claim 1, wherein the configuring of each model application information corresponding to each spectral feature attribute comprises: configuring a spectral analysis model output spectral characteristic attribute form and/or a preprocessing configuration specified in the model application information, and/or identification information and/or characteristic waveband information of a spectral analysis model specified in the model application information, and/or calculation parameters of a spectral analysis model specified in the model application information;
the pre-processing configuration comprises: a spectral interpolation algorithm, and/or a spectral pre-processing algorithm, and/or spectral pre-processing algorithm parameters.
3. The method of claim 1, wherein the configuring of each model application information corresponding to each spectral feature attribute comprises: configuring first instrument configuration information corresponding to the model application information;
the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information.
4. The method of claim 1, wherein the configuring of each model application information corresponding to each spectral feature attribute comprises: configuring application object information corresponding to the model application information;
the method further comprises the following steps: and taking the application object information as corresponding model application information and/or index information of a specified spectral analysis model in the model application information.
5. The method according to any one of claims 1 to 4, wherein determining the model application information corresponding to the spectral information to be measured according to a preset correspondence rule comprises:
and when the preset first identification information in the current to-be-detected spectrum information is matched with the preset second identification information of the model application information, determining that the current to-be-detected spectrum information corresponds to the model application information.
6. An apparatus for applying a spectral analysis model, the apparatus comprising: a model configuration module and a model application module, wherein,
the model configuration module is used for configuring each model application information corresponding to each spectral characteristic attribute by adopting a preset configuration rule;
the model application module is used for acquiring current spectral information to be detected and determining model application information corresponding to the current spectral information to be detected according to a preset corresponding rule; and detecting the spectral characteristic attribute of the current spectral information to be detected by adopting the model application information corresponding to the current spectral information to be detected and according to the spectral analysis model appointed in the model application information corresponding to the current spectral information to be detected.
7. The apparatus of claim 6, wherein the configuring of each model application information corresponding to each spectral feature attribute comprises: configuring a spectral analysis model output spectral characteristic attribute form and/or a preprocessing configuration specified in the model application information, and/or identification information and/or characteristic waveband information of a spectral analysis model specified in the model application information, and/or calculation parameters of a spectral analysis model specified in the model application information;
the pre-processing configuration comprises: a spectral interpolation algorithm, and/or a spectral pre-processing algorithm, and/or spectral pre-processing algorithm parameters.
8. The apparatus of claim 6, wherein the model configuration module is specifically configured to: configuring first instrument configuration information corresponding to the model application information;
the first instrument configuration information is used for matching verification with second instrument configuration information in the spectrum information to be detected, and when the first instrument configuration information is not matched with the second instrument configuration information, the spectrum characteristic attribute is not detected; and/or for reading by a spectrometer and configuring the spectrometer according to the first instrument configuration information.
9. The apparatus of claim 6, wherein the model configuration module is specifically configured to: configuring application object information corresponding to the model application information;
and taking the application object information as corresponding model application information and/or index information of a specified spectral analysis model in the model application information.
10. The apparatus according to any one of claims 6 to 9, wherein the model application module is specifically configured to:
and when the preset first identification information in the current to-be-detected spectrum information is matched with the preset second identification information of the model application information, determining that the current to-be-detected spectrum information corresponds to the model application information.
11. A storage medium on which an executable program is stored, wherein the executable program, when executed by a processor, performs the steps of the spectral analysis model application method of any one of claims 1 to 5.
12. A spectral analysis model application apparatus comprising a processor, a memory and an executable program stored on the memory and executable by the processor, wherein the processor executes the executable program to perform the steps of the spectral analysis model application method according to any one of claims 1 to 5.
CN201811449106.4A 2018-11-28 2018-11-28 Spectral analysis model application method and device Pending CN111239054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811449106.4A CN111239054A (en) 2018-11-28 2018-11-28 Spectral analysis model application method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811449106.4A CN111239054A (en) 2018-11-28 2018-11-28 Spectral analysis model application method and device

Publications (1)

Publication Number Publication Date
CN111239054A true CN111239054A (en) 2020-06-05

Family

ID=70873999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811449106.4A Pending CN111239054A (en) 2018-11-28 2018-11-28 Spectral analysis model application method and device

Country Status (1)

Country Link
CN (1) CN111239054A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114077427A (en) * 2020-08-12 2022-02-22 中移物联网有限公司 Interaction method and system based on spectral analysis model
CN114530216A (en) * 2020-11-23 2022-05-24 中移物联网有限公司 Spectral analysis method, device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101949824A (en) * 2009-06-30 2011-01-19 武汉矽感科技有限公司 Method and system device for detecting commodity according to spectral information of substance
WO2015165394A1 (en) * 2013-05-31 2015-11-05 欧普图斯(苏州)光学纳米科技有限公司 Multi-industry detection-oriented laser raman spectrum intelligent identification method and system
CN106596435A (en) * 2016-12-29 2017-04-26 湖南餐智科技有限公司 Food material quality detecting system
CN106934416A (en) * 2017-02-23 2017-07-07 广州讯动网络科技有限公司 A kind of model matching method based on big data
CN107481018A (en) * 2017-07-31 2017-12-15 无锡迅杰光远科技有限公司 Goods attribute authentication method, apparatus and system based on Internet technology
CN207689356U (en) * 2017-12-26 2018-08-03 深圳和而泰数据资源与云技术有限公司 A kind of spectral detection server and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101949824A (en) * 2009-06-30 2011-01-19 武汉矽感科技有限公司 Method and system device for detecting commodity according to spectral information of substance
WO2015165394A1 (en) * 2013-05-31 2015-11-05 欧普图斯(苏州)光学纳米科技有限公司 Multi-industry detection-oriented laser raman spectrum intelligent identification method and system
CN106596435A (en) * 2016-12-29 2017-04-26 湖南餐智科技有限公司 Food material quality detecting system
CN106934416A (en) * 2017-02-23 2017-07-07 广州讯动网络科技有限公司 A kind of model matching method based on big data
CN107481018A (en) * 2017-07-31 2017-12-15 无锡迅杰光远科技有限公司 Goods attribute authentication method, apparatus and system based on Internet technology
CN207689356U (en) * 2017-12-26 2018-08-03 深圳和而泰数据资源与云技术有限公司 A kind of spectral detection server and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114077427A (en) * 2020-08-12 2022-02-22 中移物联网有限公司 Interaction method and system based on spectral analysis model
CN114077427B (en) * 2020-08-12 2024-05-24 中移物联网有限公司 Interaction method and system based on spectrum analysis model
CN114530216A (en) * 2020-11-23 2022-05-24 中移物联网有限公司 Spectral analysis method, device and readable storage medium

Similar Documents

Publication Publication Date Title
WO2020119419A1 (en) Image recognition-based testing and apparatus, and computer device and storage medium
CN111176990A (en) Test data generation method and device based on data decision and computer equipment
CN115049057B (en) Model deployment method and device, electronic equipment and storage medium
CN111239054A (en) Spectral analysis model application method and device
CN106156098B (en) Error correction pair mining method and system
CN111882059A (en) Data processing method and device, electronic equipment and storage medium
CN115757745A (en) Service scene control method and system based on artificial intelligence and cloud platform
CN110796367A (en) Equipment information management method and device based on information remote identification and terminal
CN110232130A (en) Metadata management pedigree generation method, device, computer equipment and storage medium
CN113360300A (en) Interface calling link generation method, device, equipment and readable storage medium
CN117235527A (en) End-to-end containerized big data model construction method, device, equipment and medium
CN115775064A (en) Engineering decision calculation result evaluation method and cloud platform
CN114510305A (en) Model training method and device, storage medium and electronic equipment
CN107750051A (en) The optimization method and its device of radio transmission model
CN114185871A (en) Data migration method, data migration device, medium, and electronic device
CN113688134A (en) Visual variable management method, system and equipment based on multidimensional data
CN112907145A (en) Model interpretation method and electronic device
CN114077427B (en) Interaction method and system based on spectrum analysis model
KR102471596B1 (en) Service providing apparatus and method supporting experiment request and management
CN117167366B (en) Automatic flow control method and system for hydraulic distributor
CN117112539B (en) Machine learning-oriented data model management system
CN113342862B (en) Query recommendation method and device, electronic equipment and readable storage medium
CN110569199B (en) Automatic bill testing method and device
CN116992655A (en) Modeling method, detection method, equipment and medium for multi-sensor spectrum data
CN117035845A (en) Sensitivity determination method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200605

RJ01 Rejection of invention patent application after publication