Physical and chemical value prediction method compatible with multi-format spectral data

By establishing a compatible model on the server side and processing near-infrared spectral data in different formats, the problem of users repeatedly establishing models on different instruments is solved, and the unified processing of spectral data and physical and chemical value prediction is realized, and the application efficiency is improved.

CN120180185APending Publication Date: 2025-06-20COFCO MEAT INVESTMENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510254594.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing near-infrared spectroscopy technology requires professional operation in qualitative analysis and modeling, and the equipment of different brands of near-infrared scanning instruments cannot be integrated, resulting in users needing to repeatedly establish and maintain predictive models on different instruments, which consumes a lot of time and effort.

Method used

A physical and chemical value prediction method is provided that is compatible with multi-format spectral data. Spectral data is received through a compatible model on the server side, and the relationship between spectral data and physical and chemical values ​​is calculated using the algorithm in the algorithm library. The model is optimized through a global optimization algorithm to enable spectral data of different formats to be uniformly predicted.

Benefits of technology

The unified processing of spectral data in different formats is realized, which reduces the users' need to establish and maintain predictive models on different instruments, and improves the application efficiency and promotion speed of near-infrared spectral instruments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180185A_ABST
    Figure CN120180185A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a physical and chemical value prediction method compatible with multi-format spectral data, and the method employs a compatible model to calculate the relation between the spectral data and corresponding physical and chemical values, so as to output predicted physical and chemical value data, the establishment process of the compatible model comprises the following steps: calling an algorithm preset in an algorithm library of a server to calculate and obtain a function relationship between the first spectral data and the first physicochemical value; calculating to obtain a calculated physicochemical value of the second spectral data through the function relationship, optimizing the function relationship by using a global optimization algorithm to minimize the difference between the second physicochemical value and the calculated physicochemical value, and generating a coefficient matrix; and according to a coefficient matrix, updating the function relationship to determine the compatible model. According to the method provided by the invention, a compatible model is established, so that the defect that a prediction model needs to be independently established for spectral data in different formats is overcome, and the model establishment and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of near-infrared spectral data processing, and particularly to a method for predicting physical and chemical values that is compatible with multi-format spectral data. Background Art

[0002] Near-infrared spectroscopy (NIRS) technology is an analytical method that uses the near-infrared region (800 - 2500 nm) of the electromagnetic spectrum. It can measure the absorbance of a sample at different wavelengths in the near-infrared region, recording the overtone and combination band absorption information of the fundamental frequency vibrations of molecular groups such as CH, NH, or OH. The NIRS analysis technology is essentially an indirect relative analysis. By collecting a large number of representative standard samples in the early stage, measuring the necessary data through strict and detailed chemical analysis, and then establishing a mathematical model, i.e., calibration, on a computer to maximize the reflection of the normal distribution law of the measured sample population. Then, through this mathematical model or calibration equation, the required data of unknown samples can be predicted.

[0003] Since the operation of near-infrared spectroscopy in qualitative analysis modeling requires professionals, and there are a wide variety of near-infrared scanning instruments and equipment on the market, the software between each instrument company is not interoperable, and their spectral formats, model formats, etc. are also different and cannot be integrated and unified. Therefore, users need to be proficient in the software and instruments of different instrument companies, and also need to repeatedly establish and maintain the same type of prediction model on different instruments. This not only places high requirements on users, but also makes the establishment and maintenance of near-infrared spectral prediction models take up a large amount of time and energy of users, greatly restricting the application and promotion of near-infrared instruments. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a method for solving the problem that corresponding prediction models need to be established separately when predicting physical and chemical values for different formats of near-infrared spectral data.

[0005] To achieve the above object, an embodiment of the present invention provides a physical and chemical value prediction method compatible with multi-format spectral data, which is applied to the server side. The method includes: receiving spectral data; and inputting the spectral data into a compatible model, and using the compatible model to calculate the relationship between the spectral data and its corresponding physical and chemical value, so as to output predicted physical and chemical value data. Wherein, the establishment process of the compatible model includes: obtaining first spectral data of a first sample by using a first instrument, and measuring the first physical and chemical value corresponding to the spectral data; obtaining second spectral data of a second sample by using a second instrument, and measuring the second physical and chemical value corresponding to the spectral data; calling an algorithm preset in the algorithm library of the server to calculate the functional relationship between the first spectral data and the first physical and chemical value; calculating the calculated physical and chemical value of the second spectral data through the functional relationship, and using a global optimization algorithm to optimize the functional relationship to minimize the difference between the second physical and chemical value and the calculated physical and chemical value, and generating a coefficient matrix; and updating the functional relationship according to the coefficient matrix to determine the compatible model, where the first sample and the second sample are different samples belonging to the same category.

[0006] Optionally, the method further includes: judging whether the compatible model needs to be updated according to a preset condition. If not, it is not updated and the current compatible model is continued to be used. If so, the following steps are executed: using a plurality of intermediate models associated with the compatible model to generate corresponding prediction results for the verification data; comparing the difference between the prediction results and the true values of the verification data, determining an optimal prediction result, and determining the corresponding optimal model according to the optimal prediction result; using the optimal model to replace the current compatible model to achieve model update, where the verification data is spectral data for which the true physical and chemical values have been obtained.

[0007] Optionally, at least one algorithm is preset in the algorithm library of the server. When the number of algorithms is greater than one, the following steps are executed: traversing each algorithm preset in the algorithm library of the server, and each algorithm correspondingly generates an initial model; adjusting the parameter values according to the parameter optimizable range of the initial model to re-establish a plurality of intermediate models with different parameter values; and using the plurality of re-established intermediate models with different parameter values to generate corresponding prediction results for the verification data, and associating the intermediate model that generates the optimal prediction result and its parameters with the current compatible model.

[0008] Optionally, the process of traversing each algorithm preset in the algorithm library of the server, and each algorithm correspondingly generates an initial model is performed through parallel computing on the server side.

[0009] Optionally, the pre-set algorithm includes: multiple linear regression method or partial least squares method.

[0010] Optionally, calculating the functional relationship between the first spectral data and the first physical and chemical value includes: obtaining a first spectral data matrix of the first spectral data and a first physical and chemical value matrix of the first physical and chemical value, and respectively performing singular value decomposition on the first physical and chemical value matrix and the first spectral data matrix to respectively obtain a score matrix and a loading matrix of each of the first physical and chemical value matrix and the first spectral data matrix; performing linear regression calculation on the score matrix and the loading matrix of each of the first physical and chemical value matrix and the first spectral data matrix to obtain a linear relationship coefficient matrix between the first physical and chemical value matrix and the first spectral data matrix; and obtaining the functional relationship between the first physical and chemical value matrix and the first spectral data matrix according to the linear relationship coefficient matrix.

[0011] Optionally, the method further includes: using the second instrument to measure samples with multiple different physical and chemical values to obtain multiple corresponding spectral data, and measuring the true physical and chemical values of the samples with multiple different physical and chemical values; calculating the calculated physical and chemical values of the multiple corresponding spectral data through the functional relationship, optimizing the functional relationship by using a global optimization algorithm to minimize the difference between the true physical and chemical value and the calculated physical and chemical value, and generating multiple coefficient matrices; calculating the mean of the multiple coefficient matrices, and updating the functional relationship according to the calculated mean matrix.

[0012] Optionally, the multi-format spectral data is obtained through a client and input into the server side.

[0013] In a second aspect, the present invention provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to cause a machine to execute the physical and chemical value prediction method for compatible multi-format spectral data according to any one of the above in the present application.

[0014] In a third aspect, the present invention provides a processor for running a program, wherein when the program is run, it is used to execute the physical and chemical value prediction method for compatible multi-format spectral data.

[0015] Through the above technical solution, the present invention uses a first instrument to obtain first spectral data of a first sample, and obtains a first physical and chemical value corresponding to the first spectral data by measurement, and calls an algorithm in the server algorithm library to calculate a functional relationship between the first spectral data and the first physical and chemical value. A sample that belongs to the same category as the first sample but is different is selected as the second sample, and a second instrument is used to obtain second spectral data of the second sample, and the second physical and chemical value corresponding to the second spectral data is measured. Since the second sample and the first sample belong to the same category, their physical and chemical values should also be of the same type. Therefore, when the first physical and chemical value and the second physical and chemical value are equal, there should be a certain consistency relationship between the first spectral data and the second spectral data. Therefore, the calculated physical and chemical value of the second spectral data is calculated using the obtained functional relationship, but there is a certain error between the calculated physical and chemical value and the measured second physical and chemical value. Furthermore, the global optimization algorithm is used to optimize the functional relationship so that the difference between the second physical and chemical value and the calculated physical and chemical value is minimized. This process will obtain a coefficient matrix, and according to this coefficient matrix, the functional relationship is updated, thereby determining the compatibility model. The present invention increases the physical and chemical value constraint by using the condition that the physical and chemical values of different samples in the same category are equal, establishes a functional relationship between the spectral data of different samples in the same category on different instruments, and determines the compatibility model according to this functional relationship, which is used to receive spectral data of different formats measured by different instruments and uniformly predict physical and chemical values.

[0016] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific implementation part. Brief Description of the Drawings

[0017] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification, and are used to explain the embodiments of the present invention together with the following specific implementation manners, but do not constitute a limitation to the embodiments of the present invention. In the drawings:

[0018] Figure 1 is a flowchart of a method for predicting physical and chemical values compatible with multi-format spectral data provided by an embodiment of the present invention;

[0019] Figure 2 is a flowchart of a process for establishing a compatibility model provided by an embodiment of the present invention;

[0020] Figure 3 is a flowchart of a process for updating a compatibility model provided by an embodiment of the present invention;

[0021] Figure 4 is a flowchart of the association between a compatibility model and an intermediate model provided by an embodiment of the present invention;

[0022] Figure 5It is a schematic diagram of the process for a client to transmit data to a server provided by an embodiment of the present invention. Specific Embodiments

[0023] The following further elaborates on the specific embodiments of the embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for the purpose of illustrating and explaining the embodiments of the present invention, and are not used to limit the embodiments of the present invention.

[0024] It should be noted that all operations of obtaining, transmitting, storing, using, processing, etc. of data in the technical solution of this application comply with the relevant regulations of national laws and regulations. In the embodiments of this application, some existing industry solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary, and their purpose is only to illustrate the feasibility in the implementation of the technical solution of this application, but it does not mean that the applicant has already or necessarily used this solution.

[0025] Since feed raw materials may contain poor-quality nutritional components, if not discovered in time and fed to livestock and poultry, it will seriously affect the health and production status of animals. Therefore, the determination and quantification of the nutritional components of feed raw materials or finished products are crucial for reducing production losses. However, the determination based on wet chemical manual values is laborious, expensive, and time-consuming. With the rapid development of near-infrared spectroscopy analysis technology, various detection technologies based on NIRS have also been widely applied. It is the first choice for analyzing organic components in the chemical and pharmaceutical industries, as well as in food, feed, and agriculture. Using NIRS technology in feed mill laboratories can greatly reduce the determination of manual values, which is an important measure to improve the work efficiency of feed mills and expand production scale.

[0026] However, there are various types and models of existing near-infrared devices. For example: Bruker, Unity2500, Unity2600, etc. Due to different construction times of feed mills, different brands and models of near-infrared devices may be purchased. The difficulty in integrating NIR instruments of different brands lies in that the software of each instrument company is independent and not interoperable, and their spectral formats, model formats, etc. are also different. This results in that users not only need to be proficient in the software and instruments of different instrument companies, but also need to repeatedly establish and maintain the same type of product models on different instruments. This not only places high requirements on users, but also makes the establishment and maintenance of near-infrared models occupy a large amount of time and energy of users, which greatly limits the application and promotion of near-infrared instruments in the feed industry. In addition, different models of devices cannot be uniformly managed, and the management difficulty is relatively large. On the other hand, personnel manually export the results from near-infrared devices and fill them into the quality inspection results, and this process is less efficient. On the other hand, most of the NIR devices purchased by feed mills are imported devices, and the quality inspection data storage and analysis servers are all deployed abroad, posing potential risks to data security.

[0027] Based on this, the present invention provides a method for predicting physical and chemical values compatible with multi-format spectral data. The schematic flow diagram of this method is as shown in Figure 1 and is described below. The method is applied to the server side and includes steps S101 - S102.

[0028] Step S101: Receive spectral data;

[0029] Step S102: Input the spectral data into a compatible model, and use the compatible model to calculate the relationship between the spectral data and its corresponding physical and chemical values, so as to output predicted physical and chemical value data.

[0030] Through this method, it is possible to compatibly receive spectral data in different formats from multiple brands and models, and directly obtain predicted physical and chemical value data based on the input spectral data.

[0031] It can be understood that due to different near-infrared instruments from different manufacturers, their instrument principles are different, the core components used are different, and even the degree of decay of the components during use is different. Then, for the same sample measured on different instruments, the spectral data obtained will surely not be the same, which makes it particularly difficult to establish a model that can uniformly process spectral data in different formats.

[0032] For example, for the same sample, it is measured on two different spectral instruments, and two spectral data in different formats are obtained. Through a function f, these two spectral data in different formats can be converted to establish a conversion relationship between them. However, since the function f is difficult to describe in the form of a certain functional expression and can only exist as a mapping set on different scatter points, that is, there is a functional relationship f for each data point i in the spectral data. i . However, with the change of the measured sample, the established functional relationship f i will also change accordingly. Considering that the spectral data of the same type of sample is similar, that is, the wavelength and absorbance (x i , y i ) of each data point i vary within a relatively small range, based on this feature, it can be considered that the functional relationship f i at each data point i is a linear function. Of course, the functional relationship f i at each data point i can also be described as a more complex polynomial or other non-linear relationship expression, which can obtain a more accurate mapping relationship, but at the same time increases the complexity and calculation amount of the calculation. And in practical applications, there will be cases where the same sample cannot be measured on two instruments, for example, the two instruments are far apart.

[0033] Therefore, the process of establishing a compatible model provided by the embodiments of the present invention has a schematic flow diagram as shown in Figure 2As shown. The establishment process of the compatibility model includes steps S201 - S206.

[0034] Step S201: Use the first instrument to obtain the first spectral data of the first sample and measure the first physical and chemical value corresponding to this spectral data;

[0035] Step S202: Use the second instrument to obtain the second spectral data of the second sample and measure the second physical and chemical value corresponding to this spectral data;

[0036] Step S203: Call the algorithm preset in the algorithm library of the server to calculate the functional relationship between the first spectral data and the first physical and chemical value;

[0037] Step S204: Calculate the calculated physical and chemical value of the second spectral data through the functional relationship;

[0038] Step S205: Use the global optimization algorithm to optimize the functional relationship to minimize the difference between the second physical and chemical value and the calculated physical and chemical value, and generate a coefficient matrix;

[0039] Step S206: Update the functional relationship according to the coefficient matrix to determine the compatibility model.

[0040] Among them, the first sample and the second sample are different samples belonging to the same category. Specifically, the first sample and the second sample are different samples of the same category, such as corn, but not the same corn sample. The first instrument is a near-infrared spectrometer of a certain brand or type, and the first spectral data of the first sample measured is represented as (Ax i , Ay i ). The second instrument is a near-infrared spectrometer of a different brand or type from the first instrument, and the second spectral data of the second sample measured by it is represented as (Bx i , By i ). Among them, i represents the data point of the sample within the spectral range measurable by the spectral instrument, x i represents the data corresponding to the horizontal axis in the spectrogram of this data point, with the unit of wavelength or wave number, and y i represents the data corresponding to the vertical axis in the spectrogram of this data point, with the unit of absorbance.

[0041] Specifically, the first physical and chemical value corresponding to the first spectral data (Ax i , Ay i ) is represented as C A , and the second physical and chemical value corresponding to the second spectral data (Bx i , By i ) is represented as C B, where the first physical and chemical value and the second physical and chemical value mentioned herein may be the moisture value of corn, the protein content of corn, or other types of physical and chemical values. The first spectral data (Ax i , Ay i ) and the function relationship p between the first physical and chemical value C A are calculated according to the algorithms preset in the algorithm library of the called server. Since the first sample and the second sample are different samples of the same category, the first physical and chemical value C A and the second physical and chemical value C B are of the same type. Then, when C A is equal to C B , there should be a certain consistency relationship between the first spectral data (Ax i , Ay i ) and the second spectral data (Bx i , By i ). Therefore, according to this correspondence, the calculated physical and chemical value C' i of the second spectral data (Bx i , By B ) can be calculated using the calculated function relationship p. It can be understood that since the first spectral data (Ax i , Ay i ) and the second spectral data (Bx i , By i ) are data in different formats, the calculated physical and chemical value C' i of the second spectral data (Bx i , By B ) calculated using the function relationship p should have a certain error from the true physical and chemical value C i of the second spectral data (Bx i , By B ). Then, in the embodiment of the present invention, the global optimization algorithm is used to optimize the function relationship p, so that the difference between the second physical and chemical value C B and the calculated physical and chemical value C' B is minimized, thereby generating a coefficient matrix. According to this coefficient matrix, the function relationship p is updated to obtain a new function relationship p'. This obtained new function relationship p' is the established compatibility model. In the embodiment of the present invention, by introducing an algorithm function to characterize the differences between different instruments, and through the established function relationship, a compatibility model for compatible spectral data in different formats is determined.

[0042] In some embodiments, calculating the functional relationship between the first spectral data and the first physical and chemical value includes: obtaining a first spectral data matrix of the first spectral data and a first physical and chemical value matrix of the first physical and chemical value, and respectively performing singular value decomposition on the first physical and chemical value matrix and the first spectral data matrix to respectively obtain a score matrix and a loading matrix of each of the first physical and chemical value matrix and the first spectral data matrix; performing linear regression calculation on the score matrix and the loading matrix of each of the first physical and chemical value matrix and the first spectral data matrix to obtain a linear relationship coefficient matrix between the first physical and chemical value matrix and the first spectral data matrix; and obtaining the functional relationship between the first physical and chemical value matrix and the first spectral data matrix according to the linear relationship coefficient matrix.

[0043] Specifically, the first spectral matrix of the first spectral data (Ax i , Ay i ) is denoted as X, and the first physical and chemical value matrix of the first physical and chemical value C A is denoted as Y. By performing singular value decomposition on the first spectral matrix X and the first physical and chemical value matrix Y, the score matrix and the loading matrix of each of the first spectral X matrix and the first physical and chemical value matrix Y can be obtained, and their expressions are: X = TP T + E, Y = UQ T + F. Wherein, T is the score matrix of the first spectral matrix, P is the loading matrix of the first spectral matrix, U is the score matrix of the first physical and chemical value matrix, Q is the loading matrix of the first physical and chemical value matrix, and E and F are the error (residual) matrices of the first spectral data matrix and the first physical and chemical value matrix respectively. Performing linear regression on the score matrix T of the first spectral matrix and the score matrix U of the first physical and chemical value matrix, we get U = TB, B = (T T T) -1 T T Y, where B is the transformation matrix obtained through linear regression, that is, a coefficient matrix, such that the score matrix U of the first physical and chemical value matrix can be expressed as the product of the score matrix T of the first spectral matrix and the coefficient matrix B. Therefore, for the physical and chemical value matrix of any new sample, it can be predicted through the following calculation formula: Y u = T u BQ T , where Y u is the physical and chemical value matrix of any new sample, T u is the score matrix of the new sample, Q T is the loading matrix of the physical and chemical value matrix, and B is the transformation matrix. In this way, the spectral data can be converted into physical and chemical values, thereby obtaining the relationship between the spectral data and the physical and chemical values.

[0044] It is understandable that for the second spectral data (Bx i , By i ) obtained by measuring the second sample with the second instrument, and the physical and chemical value C of the second sample obtained by actual measurement B , and since the first sample and the second sample are different samples of the same category, the second spectral data measured by the second instrument is also applicable to the relationship expression between the above spectral data and the physical and chemical value: Y u = T u BQ T . Since the first sample and the second sample are similar, when the first physical and chemical value and the second physical and chemical value are equal, using the relationship expression Y u = T u BQ T , set the global optimization algorithm, and the optimization goal is to make the value of the physical and chemical value matrix Y u as close as possible to the value of the second physical and chemical value C B , so that Min(C B - Y u ) = Min(C B - T u BQ T ). By introducing a coefficient matrix S, make Y u = ST u BQ T . According to the new function relationship expression obtained from this coefficient matrix, the updated compatible model is determined, and the output prediction physical and chemical value that is compatible with the spectral data measured by any spectral instrument is realized. It should be noted that the global optimization algorithm mentioned above can be a genetic algorithm (GA), simulated annealing (SA), and ant colony algorithm (ACO), or any other optimization algorithm that can achieve the purpose of optimization. Here, it is only for illustrative purposes.

[0045] In some embodiments, the method further includes: using the second instrument to measure samples with multiple different physical and chemical values to obtain multiple corresponding spectral data, and measuring the true physical and chemical values of the samples with multiple different physical and chemical values; calculating the calculated physical and chemical values of the multiple corresponding spectral data through the function relationship, using the global optimization algorithm to optimize the function relationship to minimize the difference between the true physical and chemical value and the calculated physical and chemical value, and generating multiple coefficient matrices; calculating the mean of the multiple coefficient matrices, and updating the function relationship according to the calculated mean matrix.

[0046] Specifically, in order to make the coefficient matrix S calculated by the global optimization algorithm more accurate, multiple samples of the same type with different physicochemical values can be selected, and the second instrument can be used to measure them to obtain the spectral data corresponding to each sample. Moreover, the true physicochemical value data of these samples have been obtained through chemical measurement and other methods. Using the above functional relationship, that is, the compatibility model, the calculated physicochemical value of each sample is calculated. Then, the global optimization algorithm is used to minimize the difference between the calculated physicochemical value and the true physicochemical value of each sample. Through this series of processes, a coefficient matrix is generated for each sample's calculation process. Therefore, the mean value of the multiple coefficient matrices calculated is used to update the functional relationship with this mean matrix, so that this mean matrix can be suitable for physicochemical values within a certain range. It should be noted that the number of samples of the same type with different physicochemical values selected here should be no less than 20, and the more the number, the more accurate the calculated mean matrix will be.

[0047] Figure 3 is a schematic flowchart of a process for updating a compatibility model provided by an embodiment of the present invention. As Figure 3 shown, in some embodiments, the update process includes steps S301 - S305.

[0048] Step S301: Determine whether the compatibility model needs to be updated according to preset conditions. If not, do not update and continue to use the current compatibility model. If so, execute steps S302 - S305.

[0049] Step S302: Use multiple intermediate models associated with the compatibility model to generate corresponding prediction results for the verification data;

[0050] Step S303: Compare the difference between the prediction result and the true value of the verification data to determine an optimal prediction result;

[0051] Step S304: Determine the corresponding optimal model according to the optimal prediction result;

[0052] Step S305: Use the optimal model to replace the current compatibility model to achieve model update.

[0053] Among them, the verification data is a part of the spectral data. It can be understood that the compatible model provided by the embodiments of the present invention can also be automatically updated. According to preset conditions, it is judged whether the compatible model needs to be updated. The preset conditions can be time values. For example, a time period can be preset, which can be set to one week or one month. This is only for illustrative purposes here. Those skilled in the art can set different time values according to actual application scenarios and application needs. When the time reaches this preset period, the update condition is automatically triggered to perform the update process of the compatible model. This preset condition can also be an error value, that is, when the error between the predicted physical and chemical value result output by the compatible model and the true physical and chemical value of the verification data reaches a certain threshold, the update process is triggered. It should be noted that the verification data here is the spectral data for which the true physical and chemical values have been obtained, so as to verify the specific error value between the predicted physical and chemical value output and the true physical and chemical value. It is also possible to connect the server side applying the compatible model provided by the embodiments of the present invention to the network, automatically calculate the error between the predicted sample physical and chemical value result of the compatible model and the standard physical and chemical value of the sample. When the accuracy rate is lower than 5%, the compatible model is automatically updated, and after the update, the data obtained by wet chemistry is used for review.

[0054] Through the above method, for the compatible model provided by the embodiments of the present invention, only after the initial establishment, the established compatible model is used for predicting the physical and chemical values of samples in subsequent applications. When it is judged that the compatible model needs to be optimized, the compatible model is automatically updated. After the update is completed, it is used for predicting the physical and chemical values of spectral data again. Through this function of automatically updating the model, those skilled in the art do not need to manually establish models for each instrument of each brand separately, saving a large amount of labor costs. And this automated method is accurate, convenient and efficient, and can be completed without the operation of professionals.

[0055] Figure 4 It is a schematic flowchart of the association between a compatible model and an intermediate model provided by the embodiments of the present invention. In some embodiments, at least one algorithm is preset in the algorithm library of the server. When the number of algorithms is greater than one, steps S401 - S404 are executed.

[0056] Step S401: Traverse each algorithm preset in the algorithm library of the server, and each algorithm correspondingly generates an initial model;

[0057] Step S402: According to the parameter optimizable range of the initial model, adjust its parameter values to re - establish multiple intermediate models with different parameter values;

[0058] Step S403: Use the multiple re - established intermediate models with different parameter values to generate corresponding prediction results for the verification data;

[0059] Step S404: Associate the intermediate model that generates the optimal prediction result and its parameters with the current compatible model.

[0060] Specifically, the preset algorithms include: multiple linear regression method or partial least squares method. The functional relationship between the first spectral data and the first physicochemical value is calculated through the preset algorithms. At this time, the parameters of the algorithms are the initial parameters stored in the algorithms, and the functional relationship calculated by using these algorithms is the initial model. The parameters of the model include: the number of physicochemical value data used to establish the functional relationship, and the number of wavelength points of the input spectral data. These parameters all have a certain range of optimizability, and the parameter values are adjusted for each parameter according to the optimizable range. Using different parameter values, multiple models with different parameters can be established in combination, and the number of models obtained is 300 - 500. These models with different parameters are the intermediate models. The corresponding prediction results are generated for the validation data by using these intermediate models. According to the difference between the prediction result and the true value of the validation data, the optimal prediction result is determined, and the intermediate model corresponding to the optimal prediction result and its parameters are associated with the current compatible model. Moreover, since there is at least one preset algorithm in the algorithm library of the server, considering the computational efficiency, the process of traversing each preset algorithm in the algorithm library of the server and generating an initial model for each algorithm is performed through parallel computing on the server side. After traversing all the algorithms in the algorithm library, the current model may be associated with intermediate models of multiple different algorithms. Usually, the number of algorithms in the algorithm library is not less than 10, and those skilled in the art can set the specific algorithms and the number of algorithms in the algorithm library according to actual needs. And, in some embodiments, the number of intermediate models associated with the current compatible model is set to 5. In the case where the model needs to be optimized, more spectral data can be input, and the algorithms and parameters of these 5 associated intermediate models are used for the update and reconstruction work of the compatible model, thereby greatly saving time, realizing the rapid optimization of the model, and ensuring a high degree of accuracy.

[0061] Figure 5It is a schematic diagram of the process for a client to transmit data to a server provided by an embodiment of the present invention. In some embodiments, the multi-format spectral data is obtained by the client and input into the server, and the method for predicting physical and chemical values compatible with multi-format spectral data provided by the embodiment of the present invention runs on the server. Specifically, the client communicates with the server through the Internet / Intranet / Extranet network, mainly for obtaining spectral data measured by the instrument and other relevant information. In addition, the embodiment of the present invention also provides a spectral recognition program running on the server for determining whether there are problems with the input spectral data, and if there are problems, prompting the user to pay attention. And the predicted physical and chemical value data output by the compatible model provided by the embodiment of the present invention is sent from the server to the terminal specified by the user, and other relevant indicators can be calculated according to the pre-set calculation formula.

[0062] In a second aspect, the present invention provides a machine-readable storage medium, on which instructions are stored for causing a machine to execute the method for predicting physical and chemical values compatible with multi-format spectral data according to any one of the above of the present application.

[0063] In a third aspect, the present invention provides a processor for running a program, wherein when the program is run, it is used to execute the method for predicting physical and chemical values compatible with multi-format spectral data.

[0064] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0065] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0066] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 specified in one block or multiple blocks.

[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, thereby providing steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 specified in one block or multiple blocks.

[0068] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0069] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

[0070] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for storing information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0071] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.

[0072] The above are only embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for predicting physical and chemical values ​​compatible with multi-format spectral data, applied to a server, characterized in that: The method comprises: receiving spectral data; and The spectral data is input into a compatible model, and the compatible model is used to calculate the relationship between the spectral data and its corresponding physical and chemical values ​​to output predicted physical and chemical value data. The process of establishing the compatible model includes: Acquiring first spectral data of a first sample using a first instrument, and measuring a first physical and chemical value corresponding to the spectral data; Acquiring second spectral data of a second sample using a second instrument, and measuring a second physical and chemical value corresponding to the spectral data; Calling an algorithm preset in an algorithm library of the server to calculate and obtain a functional relationship between the first spectral data and the first physical and chemical value; Obtaining the calculated physicochemical value of the second spectral data by calculating the functional relationship, optimizing the functional relationship by using a global optimization algorithm so as to minimize the difference between the second physicochemical value and the calculated physicochemical value, and generating a coefficient matrix; and According to the coefficient matrix, the functional relationship is updated to determine the compatible model, The first sample and the second sample are different samples belonging to the same category.

2. The prediction method according to claim 1, characterized in that: The method further comprises: Determine whether the compatible model needs to be updated according to the preset conditions. If not, do not update and continue to use the current compatible model. If yes, perform the following steps: generating corresponding prediction results for the verification data using a plurality of intermediate models associated with the compatible model; Comparing the difference between the prediction result and the true value of the verification data, determining an optimal prediction result, and determining a corresponding optimal model according to the optimal prediction result; The optimal model is used to replace the current compatible model to update the model. Wherein, the verification data is spectral data whose real physical and chemical values ​​have been obtained.

3. The prediction method according to claim 2, characterized in that: There is at least one algorithm pre-set in the algorithm library of the server. When the number of the algorithms is greater than one, the following steps are performed: Traversing each algorithm pre-set in the algorithm library of the server, each algorithm correspondingly generates an initial model; According to the parameter optimizable range of the initial model, the parameter values ​​are adjusted to re-establish a plurality of intermediate models with different parameter values; as well as The intermediate model with multiple different parameter values ​​that have been re-established is used to generate corresponding prediction results for the verification data, and the intermediate model that generates the optimal prediction result and its parameters are associated with the current compatible model.

4. The prediction method according to claim 3, characterized in that: The traversal of each algorithm pre-set in the algorithm library of the server, each algorithm correspondingly generates an initial model, and this process is performed in the server side through parallel computing.

5. The prediction method according to claim 1, characterized in that: The preset algorithm includes: multiple linear regression method or partial least squares method.

6. The prediction method according to claim 1, characterized in that: The calculating and obtaining a functional relationship between the first spectral data and the first physicochemical value includes: Acquire a first spectral data matrix of the first spectral data and a first physicochemical value matrix of the first physicochemical value, and perform singular value decomposition on the first physicochemical value matrix and the first spectral data matrix, respectively, to obtain a score matrix and a loading matrix of the first physicochemical value matrix and the first spectral data matrix, respectively; Performing linear regression calculation on the score matrix and the load matrix of each of the first physicochemical value matrix and the first spectral data matrix to obtain a linear relationship coefficient matrix between the first physicochemical value matrix and the first spectral data matrix; and According to the linear relationship coefficient matrix, a functional relationship between the first physical and chemical value matrix and the first spectral data matrix is ​​obtained.

7. The prediction method according to claim 1, characterized in that: The method further comprises: Using the second instrument to measure a plurality of samples with different physical and chemical values ​​to obtain a plurality of corresponding spectral data, and measuring the true physical and chemical values ​​of the plurality of samples with different physical and chemical values; The calculated physicochemical values ​​of the plurality of corresponding spectral data are obtained by calculating the functional relationship, and the functional relationship is optimized by using a global optimization algorithm so as to minimize the difference between the true physicochemical value and the calculated physicochemical value, and generate a plurality of coefficient matrices; Calculate the mean values ​​of the multiple coefficient matrices, and update the functional relationship according to the calculated mean value matrix.

8. The prediction method according to claim 1, characterized in that: The multi-format spectral data is acquired through the client and input into the server.

9. A machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute any of the above-mentioned physical and chemical value prediction methods compatible with multi-format spectral data of the present application.

10. A processor, characterized in that: Used to run a program, wherein the program, when run, is used to execute: the physical and chemical value prediction method compatible with multi-format spectral data as described in any one of claims 1-8.