Method for continuously detecting nitrogen and phosphorus in organic fertilizer
By combining a specially designed pretreatment device with spectral absorption method, time alignment, and interference factor compensation correction, the problems of complex operation and inaccurate measurement in organic fertilizer detection have been solved, and rapid and accurate nitrogen and phosphorus element detection has been achieved.
Patent Information
- Application Number
- CN202511622219.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-27
AI Technical Summary
Traditional organic fertilizer testing methods are complex to operate, and the crushing and homogenization processes are time-consuming and labor-intensive. Spectroscopic absorption methods are easily affected by interfering substances, leading to inaccurate determination of nitrogen and phosphorus elements.
A specially designed pretreatment device is used for crushing, homogenization and filtration. Combined with the spectral absorption method to determine the absorbance values of nitrogen and phosphorus at characteristic wavelengths, and through time alignment and interference factor compensation correction, accurate nitrogen and phosphorus concentration values are generated.
It improves the efficiency and accuracy of organic fertilizer sample processing and detection, ensuring rapid, continuous, and accurate detection of nitrogen and phosphorus elements, while reducing labor costs and time consumption.
Smart Images

Figure CN121577556A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of organic fertilizer detection, in particular to a method for continuous detection of nitrogen and phosphorus in organic fertilizer. BACKGROUND
[0002] Organic fertilizer plays a vital role in the field of agriculture, which is mainly derived from plants and (or) animals, and is applied to soil to provide plant nutrition as the main function. This type of fertilizer is diverse, covering human and animal manure, straw, animal carcasses, slaughterhouse waste, cake fertilizer, compost, fermented fertilizer, manure, biogas fertilizer, green manure, etc., with a wide range of sources and convenient materials, which can provide comprehensive nutrition for crops, including various organic acids, peptides and rich nutrients such as nitrogen, phosphorus and potassium. And the fertilizer effect is long-lasting, can increase and update soil organic matter, promote microbial reproduction, and has a positive effect on improving the physical and chemical properties and biological activity of the soil, and is the main source of nutrients for green food production.
[0003] Taking compost as an example, it is usually made of various straws, fallen leaves, grasses, animal and plant residues, human and animal manure, which are mixed in proportion or mixed with a small amount of soil for aerobic fermentation and maturation. After the compost is applied to the soil, it can effectively improve the soil structure and enhance the water and fertilizer retention capacity of the soil, creating a good soil environment for crop growth. Manure is made of pig, cow, horse, sheep, chicken, duck and other livestock and poultry manure and straw bedding, which contains a large amount of organic matter and a variety of microorganisms, which helps to improve soil fertility and improve soil structure. Green manure uses cultivated or wild green plants as fertilizer, such as green beans, broad beans, sweet clover, etc. of legume, and blackgrass, radish, etc. of non-legume, which not only can supplement nitrogen and other nutrients for soil, but also can effectively improve the physical properties of soil and improve the aeration and water permeability of soil.
[0004] The application of organic fertilizer can effectively coordinate the water, nutrients, air and temperature in the soil, making the soil more suitable for the growth of crops, thereby improving soil fertility and land productivity, and laying a solid foundation for the sustainable development of agriculture.
[0005] In the detection technology of organic fertilizer, although a variety of methods have been applied, there are still some problems to be solved.
[0006] The traditional detection method is relatively complex in the pretreatment of organic fertilizer samples. In the crushing process, appropriate crushing equipment and parameters need to be selected according to the different textures of the fertilizer to ensure that the fertilizer particles reach the appropriate fineness, but this process often requires multiple adjustments of the equipment, consuming a lot of time. In the homogenization process, it is necessary to ensure that the components in the sample are evenly distributed to avoid local concentration differences, which requires precise control of factors such as stirring speed, time and stirring method, and the operation is difficult. In the filtering process, it is crucial to select the appropriate filter mesh size. If the mesh size is too large, impurities cannot be effectively removed, and if the mesh size is too small, it may easily cause blockage, and the entire filtering process needs to be constantly monitored and adjusted, which is tedious.
[0007] In the determination of the absorbance values of nitrogen and phosphorus elements, the traditional spectral absorption method has certain limitations. Due to the complex composition of organic fertilizer, other substances in it may absorb or scatter light at the characteristic wavelength of nitrogen and phosphorus elements, interfering with the determination results and leading to inaccurate absorbance values. When certain metal ions are present in the fertilizer, they may form complexes with nitrogen and phosphorus elements, changing the chemical environment of nitrogen and phosphorus elements and affecting the absorption characteristics of light at specific wavelengths, so that the measured absorbance values cannot truly reflect the content of nitrogen and phosphorus elements. SUMMARY
[0008] The purpose of the present application is to provide a method for continuous detection of nitrogen and phosphorus in organic fertilizer to solve the problems raised in the background art.
[0009] To achieve the above-mentioned purpose, the present application provides a method for continuous detection of nitrogen and phosphorus in organic fertilizer, which comprises: Obtaining a sample of the organic fertilizer to be tested, crushing, homogenizing and filtering the sample by a pretreatment device to obtain a standard detection liquid; Introducing the standard detection liquid into a micro-detection channel and using spectral absorption method to measure the absorbance values of the characteristic wavelengths of nitrogen and phosphorus elements respectively; Based on the absorbance values, an initial detection data set is generated, and the nitrogen and phosphorus element data in the set are subjected to time sequence alignment processing to form a synchronous detection data sequence; According to the synchronous detection data sequence, the nitrogen and phosphorus concentration conversion parameters under the current detection environment are matched by calling the standard curve database to generate preliminary concentration calculation results; The preliminary concentration calculation results are subjected to interference factor compensation correction, and the environmental temperature and humidity, reagent batch and equipment wear data in the historical detection records are input as compensation coefficients to output the corrected nitrogen and phosphorus concentration values.
[0010] Preferably, the standard detection liquid acquisition step specifically comprises: Placing the organic fertilizer sample in a sealed digestion container, adding an oxidizing agent for high-temperature digestion reaction, and cooling to room temperature after the reaction is completed. The supernatant is collected after centrifugal separation of the digestion solution to remove solid residues, and the clear liquid is obtained by filtering through a microporous filter membrane; The pH of the clear liquid is adjusted to a preset range using a buffer solution, and then diluted to a target volume to generate a standard detection solution.
[0011] Preferably, the determination step of the spectral absorption method specifically includes: The standard detection solution is injected into the flow detection cell, and the flow rate is controlled to form a stable liquid film at the detection window; The nitrogen element characteristic wavelength light beam and the phosphorus element characteristic wavelength light beam are respectively transmitted through the liquid film, and the light intensity attenuation value after transmission is recorded; According to the ratio of the attenuation value to the blank control light intensity, the real-time absorbance value at each wavelength is calculated.
[0012] Preferably, the time alignment processing step specifically includes: The nitrogen element characteristic wavelength absorbance value acquisition time stamp sequence is matched with the phosphorus element characteristic wavelength absorbance value acquisition time stamp sequence; The absorbance values with time deviation exceeding the threshold value are interpolated and compensated to generate a nitrogen-phosphorus absorbance data pair completely synchronized in time axis; The synchronized data pair is arranged in chronological order to form a synchronized detection data sequence.
[0013] Preferably, the calling step of the standard curve database specifically includes: According to the spectral type identifier of the current detection solution, the nitrogen-phosphorus standard curve group stored in the database is searched; The standard curve parameters completely consistent with the current environmental temperature and humidity, detection equipment model and reagent batch number are matched; If the matching fails, the standard curve parameters with the nearest time and the smallest environmental parameter deviation are selected as the substitutes.
[0014] Preferably, the step of interference factor compensation correction specifically includes: The device light source attenuation coefficient of the last three calibration records in the device operation log is extracted; The effective component content deviation value in the purity detection report of the current reagent batch is obtained; Combined with the real-time environmental temperature and humidity sensor data, the dynamic influence weight of temperature and humidity fluctuation on absorbance value is calculated; The above parameters are input into a multiple linear compensation model to generate a correction amount for the preliminary concentration calculation result.
[0015] Preferably, it further includes a quality control step: At the beginning of each batch detection, a standard solution with a known concentration is inserted for verification detection; comparing the deviation between the measured concentration value and the nominal concentration value of the standard solution, and triggering a device calibration process if the deviation exceeds a threshold value; re-executing the standard verification test after calibration until the deviation is within the threshold range.
[0016] Preferably, the steps of the device calibration process specifically include: adjusting the output power of the spectral emitter to a calibration value, and updating the light intensity decay reference parameter; resetting the opening of the flow rate control valve of the flow detection cell to ensure that the liquid film thickness is stable within a standard range; re-acquiring the absorbance value of the blank solution as a new baseline reference.
[0017] Preferably, the method further includes a data traceability step: generating a unique traceability code for each test, and storing the original absorbance value, environmental parameters, compensation coefficient, and final concentration value in association; when the test result is abnormal, retrieving the complete test process data through the traceability code to locate the abnormal link.
[0018] Preferably, the method further includes a batch test optimization step: for a plurality of organic fertilizer samples continuously input, automatically queuing into the detection channel in the order of digestion completion time; predicting the total detection time of the current sample queue according to the historical detection time consumption, and dynamically adjusting the spectral acquisition frequency to match the expected progress; the frequency of inserting quality control samples in the queue increases linearly with the number of test samples, ensuring the reliability of batch testing.
[0019] Compared with the prior art, the present application has the following advantages: The present application processes the organic fertilizer sample through a specially designed pretreatment device. In the crushing link, the device can quickly crush the fertilizer sample to the appropriate fineness without the need for multiple adjustments of the equipment. Taking common granular organic fertilizer as an example, the traditional crushing method may take more than half an hour to reach the appropriate fineness, while the pretreatment device of the present application only needs 10-15 minutes to complete the crushing work. In the homogenization process, the device can accurately control the stirring speed, time and method to ensure that the components in the sample are evenly distributed, avoiding local concentration differences. Compared with the traditional method, the efficiency and quality of homogenization are greatly improved. In the filtration process, the device can automatically adjust the filter screen aperture according to the sample characteristics, effectively removing impurities while avoiding blockage, quickly obtaining standard test liquid, and the high efficiency of the entire pretreatment process greatly saves time and labor cost, providing a good sample basis for subsequent detection work.
[0020] The light spectrum absorption method is used to measure the absorbance values of the characteristic wavelengths of nitrogen and phosphorus elements. This method is highly scientific. Nitrogen and phosphorus elements have unique absorption characteristics at specific wavelengths, and the light spectrum absorption method can accurately capture these characteristics to obtain information about nitrogen and phosphorus elements. For example, in the complex composition of organic fertilizers, when the light spectrum absorption method is used, the instrument can accurately detect the presence of nitrogen elements and their content-related information based on the absorbance characteristics of nitrogen elements at their characteristic wavelengths, without being disturbed by other components. Even if there are some interfering substances such as metal ions in the fertilizer, through optimization and calibration of the light spectrum absorption method, the absorbance values of the characteristic wavelengths of nitrogen and phosphorus elements can still be accurately measured, providing reliable data for subsequent detection and ensuring the accuracy and reliability of the detection results.
[0021] The nitrogen and phosphorus element data in the initial detection data set generated based on the absorbance values are subjected to time sequence alignment processing to form a synchronous detection data sequence, improving the accuracy of data processing. In actual detection, due to various factors, there may be slight differences in the detection time of nitrogen and phosphorus elements. The present application synchronizes the nitrogen and phosphorus element data in the time dimension through time sequence alignment processing. For example, when a batch of organic fertilizers is detected, the detection of nitrogen elements may be a few seconds earlier than the detection of phosphorus elements. Through the time sequence alignment processing of the present application, the time difference of a few seconds can be eliminated, and the nitrogen and phosphorus element data can be analyzed under the same time reference, improving the credibility of the detection results and providing a strong guarantee for accurately determining the content and proportion of nitrogen and phosphorus elements in organic fertilizers. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 The working principle diagram of the method for continuously detecting nitrogen and phosphorus in organic fertilizers according to the present application; Figure 2 The flowchart of the standard detection liquid acquisition step; Figure 3 The flowchart of the light spectrum absorption method determination step. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0024] Please refer to Figure 1The application provides a method for continuously detecting nitrogen and phosphorus in organic fertilizer, which integrates pretreatment, spectral detection, data processing and correction compensation, and realizes rapid, continuous and accurate detection of nitrogen and phosphorus elements. After obtaining the sample of the organic fertilizer to be detected, the pretreatment device performs crushing, homogenization and filtration on the sample to generate a standard detection solution. The standard detection solution serves as the basis for detection, ensuring the uniformity and detectability of the sample. The standard detection solution is introduced into a micro-detection channel, and the absorbance values of the characteristic wavelengths of nitrogen and phosphorus elements are measured by using the spectral absorption method. The spectral absorption method uses the principle of interaction between light and matter, and quantifies the element concentration by measuring the attenuation of the light beam at a specific wavelength. Based on the absorbance values, an initial detection data set is generated, and the nitrogen and phosphorus element data in the set are subjected to time sequence alignment processing to form a synchronous detection data sequence. The time sequence alignment processing eliminates the time deviation and ensures the consistency of the data. According to the synchronous detection data sequence, the standard curve database is called to match the nitrogen and phosphorus concentration conversion parameters under the current detection environment, and a preliminary concentration calculation result is generated. The standard curve database stores calibration data under various environmental conditions, and provides reliable concentration conversion basis. The preliminary concentration calculation result is subjected to interference factor compensation correction, the environmental temperature and humidity, reagent batch and equipment loss data in the historical detection records are extracted as compensation coefficient inputs, and the corrected nitrogen and phosphorus concentration values are output. The interference factor compensation correction integrates multiple data sources, and improves the accuracy and robustness of the detection result.
[0025] Example 1: see Figure 2The organic fertilizer sample is placed in a sealed digestion container made of polytetrafluoroethylene material resistant to high temperature and high pressure, with a volume of 100 milliliters, a screw cap sealing structure and a pressure release valve. The oxidizing agent added is potassium persulfate solution with a concentration of 50 grams per liter, and the volume added is 20 milliliters. The high-temperature digestion reaction is carried out in a special digestion instrument, with the digestion temperature set at 180 degrees Celsius and the digestion time maintained for 45 minutes. During the digestion reaction process, the pressure in the sealed digestion container is monitored by a pressure sensor, and the pressure value is kept in the range of 0.5 megapascals to 1.0 megapascals. After the reaction is completed, the sealed digestion container is transferred to a cooling rack and naturally cooled to 25 degrees Celsius room temperature, avoiding vibration or rapid airflow interference during the cooling process. The cooled digestion liquid is poured into a 50 milliliter centrifuge tube made of polypropylene. The centrifuge is set to 4000 revolutions per minute, and the centrifugation time is 12 minutes. After centrifugal separation, the digestion liquid is separated into solid residues and supernatant, with the solid residues deposited at the bottom of the centrifuge tube. A 100 microliter to 1000 microliter adjustable pipette is used to suck the supernatant, with a sterile filter tip pipette tip to avoid cross contamination. The sucked supernatant is transferred to a filter device composed of a sand core filter and a receiving bottle. The microporous filter membrane is made of mixed cellulose ester material with a pore size of 0.45 micrometers and a diameter of 50 millimeters. The filtration method uses vacuum filtration with a vacuum degree maintained at 0.15 megapascals and a filtration speed controlled at one drop per second. The clear liquid obtained after filtration is collected in a 50 milliliter glass reagent bottle, and the clear liquid appears as a light yellow transparent state.
[0026] The pH of the clarified liquid is adjusted using a phosphate buffer solution, the concentration of the phosphate buffer solution is 0.1 mole per liter, and the pH value is 7.0. The adjustment process is monitored using a precision pH meter, and the pH meter electrode is a composite glass electrode. The phosphate buffer solution is added dropwise to the clarified liquid, and a magnetic stirrer is used to stir at a speed of 300 revolutions per minute. The target pH value for the adjustment is 7.0, and the allowable deviation range is pH 6.8 to pH 7.2. After the adjustment is complete, the clarified liquid is quantitatively transferred to a 100-milliliter volumetric flask, and the volumetric flask is a Class A metrological standard. Deionized water is used as the diluent, and it is slowly added along the wall of the volumetric flask to the calibration line. The dilution process is carried out in a constant-temperature environment at 20 degrees Celsius, and the liquid surface is tangent to the bottom of the calibration line. The resulting standard test solution is poured into a brown glass bottle with a polytetrafluoroethylene inner pad screw cap. The standard test solution is stored in a 4-degree Celsius refrigerator, and the storage time is not more than 12 hours. The loading capacity of the sealed digestion vessel is controlled at two-thirds of the container volume, and the organic fertilizer sample is weighed at 1.000 grams using a one-in-ten thousand analytical balance. The oxidizing agent is added using a quantitative liquid dispenser with an accuracy of one percent. The temperature program for the high-temperature digestion reaction consists of three stages: the first stage is from room temperature to 100 degrees Celsius at a rate of 5 degrees Celsius per minute; the second stage is maintained at 100 degrees Celsius for 10 minutes; and the third stage is from 100 degrees Celsius to 180 degrees Celsius at a rate of 3 degrees Celsius per minute. During the digestion reaction process, the condensation reflux phenomenon is observed, and the reflux droplet speed is controlled at 1 to 2 drops per minute. The cooling process is carried out in a dust-free environment, and the cooling time is not less than 60 minutes.
[0027] In the centrifugal operation, the centrifuge rotor is a horizontal rotor, and the centrifuge tubes are placed symmetrically to ensure balance. The centrifugal acceleration is 2000 times the gravitational acceleration, and the temperature in the centrifuge cabin is maintained at 20 degrees Celsius. When the supernatant is sucked, the distance between the liquid surface and the pipette gun head is 2-3 mm, and the supernatant is slowly sucked to avoid disturbing the precipitate. Before installing the filter device, wet the microporous filter membrane with deionized water, and there is no residual particle on the surface of the filter membrane after filtration. The transparency of the clear liquid is detected by a turbidimeter, and the turbidity value is less than 5 NTU. The preparation of phosphate buffer solution uses high-purity reagents, and the solvent is ultrapure water with a resistivity of 18.2 megohm-cm. The pH value is adjusted by a microburette with an accuracy of 0.01 ml. The speed of adding phosphate buffer solution is 1 drop per second, and after adding 1 drop, wait for 10 seconds to mix the solution evenly. After measuring each sample, the pH meter is rinsed with deionized water and dried with filter paper. When the volumetric flask is calibrated, the temperature of the dilution liquid is consistent with the calibration temperature of the volumetric flask. After calibration, tightly cap the bottle, and invert the volumetric flask 10 times to mix the solution. The standard test solution is divided into multiple brown glass bottles, each containing 25 ml, and the bottle is labeled with the sample number and preparation time. The whole preparation process is carried out in a clean bench, and the clean level of the workbench reaches 100. The operator wears a dust-free suit and wears a powder-free glove, and each operation is recorded in the experiment record book. The crushing degree of organic fertilizer samples is controlled by a standard sieve with a mesh size of 0.5 mm. The homogenization treatment uses a high-speed shear homogenizer with a speed of 10,000 rpm, and the homogenization time is 3 minutes. The digestion solution before filtration is preliminarily filtered using qualitative filter paper to remove large particle materials. The microporous filter membrane is tested for bubble points before use, with a test pressure of 0.2 MPa to ensure the integrity of the filter membrane. The pH value of the buffer solution is calibrated with standard buffer solutions, including pH 4.01, pH 7.00, and pH 10.01. The volume of the volumetric flask is calibrated periodically, with a calibration period of one year, and the calibration agency is the legal metrology department.
[0028] The closed digestion vessel after the digestion reaction is opened in the fume hood, and the face wind speed of the fume hood is maintained at 0.5 meters per second. The centrifuge tube is placed in the centrifuge symmetrically and balanced, and the mass difference is less than 0.1 grams. The pipette is calibrated regularly, and the calibration items include accuracy and precision. When the filter device is assembled, make sure that the sealing ring is intact and there is no leakage. The collection bottle of the clarified liquid is pre-washed with ultrapure water three times and dried before use. The pH electrode maintenance includes regular immersion in potassium chloride solution to keep the electrode membrane moist. When the volumetric flask is filled, the line of sight is horizontal to the scale line to avoid parallax. The standard test solution is labeled after preparation, and the label includes sample name, preparation date, and operator. The quality control of the whole process is realized by preparing parallel samples, and the number of parallel samples is 10% of the total number of samples. The sealing property of the closed digestion vessel is verified by pressure test, and the test pressure is 0.8 MPa, and the pressure drop is not more than 5% within 5 minutes. The oxidizing agent is stored in a brown reagent bottle to avoid photodecomposition. The temperature uniformity of the high-temperature digestion instrument is detected by a multi-point temperature probe, and the temperature difference in the cavity is less than 2 degrees Celsius. The cooling rack is made of stainless steel and coated with a Teflon coating for corrosion protection. The centrifuge acceleration is calibrated by a tachometer, and the speed error is less than 1%. The liquid suction speed of the pipette is adjusted by the controller, and the liquid discharge speed is controlled in two stages. The vacuum pipeline of the filter device is equipped with a safety bottle to prevent liquid backflow. The batch number and expiration date of the microporous filter membrane are recorded, and the expired filter membrane cannot be used. The color of the clarified liquid is observed with a cuvette and compared with a standard color card. The stability of the phosphate buffer solution is monitored for a long time, and the pH value is detected every month. The scale line of the volumetric flask is observed with a magnifying glass to ensure that it is clear and not worn. The uniformity of the standard test solution is detected by sampling, and the concentration difference of different parts is less than 2%. The temperature and humidity of the preparation environment are recorded, and the temperature is controlled at 20 to 25 degrees Celsius, and the relative humidity is controlled at 40 to 60%. The workbench is disinfected with alcohol before each use to avoid microbial contamination. The waste is treated in accordance with the chemical waste management regulations, and the organic waste liquid is collected in a special container.
[0029] Example 2: see Figure 3, the standard detection liquid is injected into a flow detection cell made of high-purity quartz material with a light transmittance of over 90% in the ultraviolet-visible light band, the detection window is rectangular in design with a fixed optical path length of 15 mm, the internal flow channel of the flow detection cell is polished with a surface roughness Ra of less than 0.1 microns, the inlet of the flow detection cell is connected to a PTFE capillary tube with an inner diameter of 0.5 mm, and the outlet is connected to a pipe of the same specification, the entire flow path system is resistant to chemical corrosion and has no dead volume; the flow rate is controlled to form a stable liquid film at the detection window, the flow rate is adjusted by a precision syringe pump, the precision syringe pump is a stepper motor driven type with a pushing accuracy of 0.1 microliters, the flow rate is set to 1.0 milliliter per minute, a pulse damper is installed in the flow path to reduce pumping fluctuations, and the thickness of the liquid film is set to 1.0 millimeters through fluid dynamics calculation, and the thickness uniformity is monitored in real time by an online optical sensor, the sensor is based on the laser triangulation principle with a measurement accuracy of 0.01 millimeters, and the thickness deviation is controlled within 3%; nitrogen element characteristic wavelength light beams and phosphorus element characteristic wavelength light beams are emitted, the nitrogen element characteristic wavelength is fixed at 210 nanometers, and the phosphorus element characteristic wavelength is fixed at 880 nanometers, the light beam emission system includes two independent light sources, a deuterium lamp is used to generate a 210 nanometer wavelength light beam, and a tungsten halogen lamp is used to generate a 880 nanometer wavelength light beam, the power stability of the light source is maintained through a feedback circuit with a fluctuation of less than 1%, the light beams pass through a collimating lens to become parallel light, and then enter a grating monochromator, the grating monochromator has a line density of 1200 lines per millimeter, a diffraction efficiency of greater than 30% at the target wavelength, and a monochromator outlet slit width of 0.1 millimeters corresponding to a spectral bandwidth of 2 nanometers, the outgoing light beams are focused on the center of the detection window through a focusing lens with a spot diameter of about 1 millimeter; after the light beams penetrate the liquid film, the light intensity attenuation is detected by a silicon photodiode with an ultraviolet enhancement coating, a response wavelength range covering 200 nanometers to 1100 nanometers, and a response time of less than 1 microsecond, the photoelectric signal is converted into a voltage signal through a transimpedance amplifier with an adjustable gain ranging from 10^3 V / A to 10^6 V / A, the voltage signal is collected by a 16-bit analog-to-digital converter with a sampling frequency of 50 Hz and a reference voltage of 5V, and a resolution of about 0.1 millivolt; the light intensity attenuation value after penetration is recorded and stored in a FIFO buffer in digital form, the buffer capacity is 1024 data points, the data is transmitted to a main processor in real time, the main processor is an ARM Cortex-M7 architecture with a running frequency of 400 MHz, and the processed light intensity value is subtracted by a dark current background measured in advance under no light conditions; the blank control light intensity uses ultrapure water as a reference, and the ultrapure water is prepared by a Milli-Q system with a resistivity of 18.2 mega ohm centimeter, blank measurement is performed before each test, flow cell is flushed with ultrapure water three times before each test, each flush volume is 5 times of the cell volume, blank light intensity measurement conditions are exactly the same as the sample, including the same flow rate, the same ambient temperature 25 degrees Celsius, the same light source preheating time 30 minutes; according to the ratio of the attenuation value and the blank control light intensity, the real-time absorbance value at each wavelength is calculated, the calculation process is embedded with digital signal processing algorithm, the algorithm is based on Lambert-Beer law, the formula is A = -log. 10 (I / I0), wherein A represents absorbance, I represents transmitted light intensity, I0 represents incident light intensity, the calculation uses floating point operation unit, the precision is kept to four decimal places, the real-time absorbance value is updated every 0.02 seconds, the data stream is directly stored into external flash memory through DMA channel, the flash memory capacity is 8 GB, the storage format is binary array; the real-time absorbance value is continuously recorded, the measurement duration at each wavelength is set to 60 seconds, the system synchronously collects ambient temperature data during the recording period, the temperature sensor is PT100 platinum resistance, the precision is 0.1 degrees Celsius, the data timestamp is generated by hardware RTC, the resolution is 1 millisecond, the data file is generated after the measurement is completed, the file contains absorbance value sequence, timestamp, ambient parameter metadata.
[0030] The installation of the flow detection cell is based on a three-point positioning system, which ensures that the detection window is perpendicular to the optical path with an error of less than 0.1 degrees. The flow detection cell is connected to the pipeline using a Swagelok joint, and the sealing pressure rating is 10 megapascals. The flow detection cell is wrapped in a constant temperature jacket, which controls the temperature through a circulating water bath, with a temperature fluctuation range of ±0.5 degrees Celsius. The push rod of the precision syringe pump is made of ceramic, which is wear-resistant. The syringe pump is driven by a microcontroller, which outputs a PWM signal to control the motor speed. The flow rate calibration uses a standard flowmeter with an accuracy of 0.5%. The calibration curve is stored in EEPROM. The formation of a stable liquid film depends on the geometry of the flow channel of the flow detection cell. The inlet of the flow channel is designed with a tapered diffusion to reduce flow separation, and the outlet is a convergent structure to avoid bubble retention. The stability of the liquid film is verified by a high-speed camera with a frame rate of 1000 fps. The analysis software calculates the coefficient of variation of the liquid film thickness. The spectral output of the deuterium lamp and the tungsten halogen lamp is periodically calibrated using a spectral radiometer with a wavelength accuracy of 0.1 nanometers. The calibration period is every six months, and the aging of the light source is compensated by monitoring the lamp current and voltage. The compensation coefficient is derived from the lifetime test data. The wavelength accuracy of the grating monochromator is verified using the characteristic spectral lines of a mercury lamp, which emits lines at 253.7 nanometers, 365.0 nanometers, etc. The monochromator has a scanning step of 0.01 nanometers, and the positioning repeatability error is less than 0.05 nanometers. The focusing lens is made of fused quartz with a numerical aperture of 0.25 and a focal length of 50 millimeters. The lens surface is coated with an antireflection film, and the reflectivity at wavelengths of 210 nanometers and 880 nanometers is less than 0.5%. The preamplifier circuit of the silicon photodiode is designed as a low-noise type with a noise voltage density of less than 5 nV / √Hz. The amplifier bandwidth is limited to 100 kHz to prevent high-frequency interference. The sampling clock of the analog-to-digital converter is provided by a temperature-compensated crystal oscillator with a frequency stability of ±1 ppm. The sampled data is digitally filtered using a moving average filter with a window size of 10 points. When measuring the blank control, the temperature of the ultrapure water is matched with that of the sample liquid, with a temperature difference of less than 0.5 degrees Celsius. The blank light intensity is measured three times, and the average value is taken as the I0 value. The calculation code for the Lambert-Beer law is written in C language, which optimizes the calculation speed of the logarithmic function. The table size is 256 entries, and the interpolation accuracy is 0.001%. The data storage uses a circular buffer strategy, where old data is overwritten by new data, but automatic saving is triggered by abnormal events. Abnormal detection is based on a sudden change threshold of absorbance value, which is set to three times the standard deviation of the average value. The environmental temperature data is recorded every second, and the temperature sensor is placed near the flow detection cell with a small thermal mass and a response time constant of 1 second. The entire measurement system is placed on an optical platform with a vibration isolation frequency of 2 Hz to reduce the impact of mechanical vibration on the optical path.
[0031] The cleaning procedure of the flow cell was performed after each measurement, using 0.1 Molar per liter nitric acid solution, with a 10 milliliter flush volume, followed by a pure water flush, cleaning effectiveness was confirmed by measuring the residual absorbance, with a residual value of less than 0.001 AU; the syringe of the precision syringe pump had a 10 milliliter capacity, was made of glass, and was replaced based on usage, with a new syringe being installed after every 100 injections; the liquid film thickness monitoring data was displayed in real time on the touch screen, and the operator could manually adjust the flow rate, but the automatic mode was preferred, the automatic mode was based on a PID controller, with a set point thickness of 1.0 millimeter; the deuterium lamp required a high voltage trigger for startup, with a trigger voltage of 300 V, a stable operating voltage of 70 V, and a current of 300 mA, the tungsten halogen lamp had an operating voltage of 12 V and a current of 2 A, both were powered by constant current sources; the scanning motor of the grating monochromator was a micro-step motor, with a step angle of 0.9 degrees, and a micro-step subdivision of 32, for smooth wavelength switching; the position of the focusing lens was adjustable, using a micrometer screw adjustment, with an adjustment accuracy of 0.01 millimeter, to ensure that the light spot was centered; the bias voltage of the silicon photodiode was -5 V, provided by a precision voltage reference source, with a bias stability of 0.01%; the reference voltage source of the analog-to-digital converter was an LM399 reference, with a temperature coefficient of 3 ppm per degree Celsius, and a long-term drift that was calibrated every month; for the blank measurement, the sample injection method was the same as for the sample to be measured, using an automatic sampler, the injection needle cleaning procedure included drying and purging; the real-time display update rate of the absorbance calculation results was 10 Hz, the graphical interface was developed using the Qt framework, and supported data export in CSV format; the measurement duration was configurable, with a default of 60 seconds, but the user could set a longer or shorter time, with a minimum of 10 seconds and a maximum of 300 seconds; the system logged all operational events, including light source switching, pump actions, and error codes, and the log file size was automatically rotated.
[0032] The life test of the flow cell is performed by accelerated aging experiment, and the transmittance of the detection window decreases less than 2% after 1000 hours of continuous operation, and the replacement cycle of the flow cell is recommended to be one year; the maintenance of the precision syringe pump includes regular lubrication of the push rod guide rail, and the lubricating oil is perfluoropolyether compatible with chemical environment; the theoretical model of the stable liquid film is based on the Navier-Stokes equation, the simulation software is COMSOL Multiphysics, and the flow channel design is optimized to reduce vortex; the spectral output of the deuterium lamp attenuates over time, with an attenuation rate of about 5% per 1000 hours, the system has a built-in photometer to monitor light intensity and automatically adjust gain compensation; the grating surface of the grating monochromator is cleaned with anhydrous ethanol once a year by professional personnel; the contamination of the focusing lens is checked by measuring the transmittance, and a cleaning alarm is triggered when the transmittance is lower than 95%; the linearity of the silicon photodiode is calibrated with a neutral density filter, and the filter calibration value is Traceable to NIST; the integral nonlinearity error of the analog-to-digital converter is corrected by fitting a sine wave, and the correction data is stored in flash memory; the frequency of the blank control measurement can be set, and a blank sample is inserted every 10 samples to ensure the accuracy of I0 value; the I0 value in absorbance calculation uses a sliding window average, with a window size of the last 10 blank measurements, to adapt to long-term drift; the data storage format includes a header file and a data block, and the header file records sample ID, time, and operator information; the influence of environmental temperature is compensated by looking up table, and the table data is obtained from calibration experiment, and the absorbance is corrected by 0.1% for every 1 degree Celsius change in temperature; the levelness of the optical platform is adjusted by a bubble level, with a level error less than 0.1 degree, and the platform weighs 50 kg to suppress low-frequency vibration.
[0033] The sample injection interface of the flow detection cell is compatible with a standard Luer lock connector, the overall size of the flow detection cell is 50mmx25mmx10mm, and the weight is 30g; the control software of the precision syringe pump provides graphical flow rate curve editing, supports linear and step flow changes; the thickness feedback control cycle of the stable liquid film is 100 milliseconds, and the PID parameters are set by the Ziegler-Nichols method; the cooling of the deuterium lamp adopts a wind cooling method, the fan speed is adjusted according to the temperature, and the lamp shell temperature is kept below 50 degrees Celsius; the wavelength repeatability test of the grating monochromator uses a laser interferometer, and the interferometer accuracy is 0.001 nanometers; the support of the focusing lens is made of stainless steel, the thermal expansion coefficient is matched with quartz, and the thermal drift is reduced; the signal cable of the silicon photodiode is a shielded twisted pair, the length is limited to within 1 meter, and the electromagnetic interference is reduced; the sampling synchronization signal of the analog-to-digital converter is uniformly issued by the main processor, ensuring that the multi-channel data is aligned; the ultrapure water sample bottle for the blank control measurement is placed in the automatic sample injection tray, the tray capacity is 50, the sample bottle is amber glass, and light decomposition is prevented; the real-time trend chart of the absorbance calculation result is displayed on a 7-inch LCD screen with a resolution of 800x480 and touch operation; after the measurement duration ends, the data is automatically analyzed, the average absorbance, standard deviation, and coefficient of variation are calculated; the system self-checking program runs at startup, checks the status of the light source, pump, and sensor, and the self-checking report is displayed in the log.
[0034] Embodiment 3: Extract the nitrogen element characteristic wavelength absorbance value acquisition timestamp sequence, the timestamp sequence is derived from the high-precision real-time clock chip of the spectral detection system, the clock chip adopts a temperature-compensated crystal oscillator, the frequency stability reaches ±0.5ppm, the timestamp data format is Unix timestamp, the precision is to the millisecond level, the sequence storage structure is a ring buffer, the buffer depth is 1024 records, each record contains a 64-bit timestamp and a 32-bit absorbance floating-point value; The acquisition timestamp sequence of the phosphorus element characteristic wavelength absorbance value is generated synchronously, the generation mechanism is homologous to that of the nitrogen element characteristic wavelength absorbance value timestamp sequence, and the time reference of the two sequences is unified by the master clock signal. The master clock signal is generated by FPGA, the phase-locked loop inside the FPGA frequency-multiplies the system clock to 100MHz, and the timestamp counter latches the current count value at each A / D conversion completion; The algorithm for matching the timestamp sequence adopts the nearest neighbor interpolation matching principle, the matching window width is set to 100ms, for each nitrogen element characteristic wavelength absorbance value timestamp, find the corresponding point with the smallest absolute difference value in the phosphorus element characteristic wavelength absorbance value timestamp sequence, and the matching success judgment threshold is that the time difference is less than 10ms; Interpolation compensation is performed on the absorbance values with time deviation exceeding the threshold, the interpolation compensation algorithm adopts a cubic spline interpolation function, the function nodes are taken from the adjacent five effective data points, and the interpolation calculation is completed in a digital signal processor, the digital signal processor is a TITMS320C6748 type, and the operation precision meets the IEEE754 double-precision floating-point standard; Generate a completely synchronized nitrogen-phosphorus absorbance data pair, the data pair structure contains three fields of matching successful timestamp, nitrogen element absorbance value and phosphorus element absorbance value, the structure array pre-allocates memory space for 1000 elements, and the dynamic expansion step is 500 elements; The data pair is arranged in time sequence to form a synchronous detection data sequence, the sorting algorithm adopts quicksort to realize, the time complexity, the sequence index establishes a B+ tree index structure, and the query response time is less than 1ms.
[0035] According to the current detection liquid spectrum type identification, the spectrum type identification is a 32-bit hash value, which is generated by the sample source code, the pretreatment method code and the detection timestamp through the MD5 algorithm; the nitrogen and phosphorus standard curve group stored in the database is searched, the database uses MySQL relational database, the storage engine is InnoDB, the standard curve group data table contains ten fields of curve number, wavelength parameter, slope value, intercept value, correlation coefficient, effective date, environment temperature range, environment humidity range, device serial number, reagent batch number; the standard curve parameters completely consistent with the current environment temperature and humidity, detection equipment model and reagent batch number are matched, the matching query statement is a multi-table join operation, and the join conditions include four constraint conditions of temperature range containing current temperature value, humidity range containing current humidity value, device serial number complete match and reagent batch number complete match; if the matching fails, the standard curve parameters with the latest time and the smallest environmental parameter deviation are selected as the replacement, the standard with the latest time is sorted in descending order of effective date, and the environmental parameter deviation is calculated by using the normalized Euclidean distance formula:
[0036] Wherein: The normalized environmental parameter deviation value is dimensionless. The temperature relative weight coefficient is 0-1. The current environment temperature value is in Celsius. The standard curve environment temperature value is in Celsius. The temperature normalization coefficient is in Celsius. The humidity relative weight coefficient is 0-1. The current environment humidity value is in percentage. The standard curve environment humidity value is in percentage. The humidity normalization coefficient is in percentage. The temperature normalization coefficient The value is 10 degrees Celsius. The humidity normalization coefficient The value is 15 percent. The weight coefficient And The default values are 0.6 and 0.4 respectively. The replacement selection algorithm traverses the database records, calculates the deviation value D of each record from the current environment, and selects the record with the smallest deviation value as the replacement standard curve.
[0037] Extract the device light source decay coefficient of the last three calibration records in the device operation log, the device operation log is stored in the SQLite embedded database, the log table structure includes five columns of calibration time, light source type, initial light intensity, current light intensity and decay coefficient; Obtain the effective component content deviation value in the purity detection report of the current reagent batch, the purity detection report is an XML format file, the file structure follows the ISO17025 standard, the parser uses the DOM parsing method, and the extraction path is / report / component[@name='active'] / deviation; Combine real-time environmental temperature and humidity sensor data, the sensor data is collected through the ModbusRTU protocol, the sampling period is 1 second, and the data smoothing processing adopts the sliding average filtering, and the window size is 10 points; Calculate the dynamic influence weight of temperature and humidity fluctuation on absorbance value, the weight calculation model is based on multiple linear regression, and the regression coefficient is obtained by least square fitting of historical data set, and the historical data set includes 1000 groups of temperature and humidity-absorbance corresponding records; Input the above parameters into the multiple linear compensation model, the mathematical expression of the model is a linear equation group containing four independent variables, the coefficient matrix is solved by orthogonal decomposition method, and the solution vector includes temperature compensation term, humidity compensation term, light source decay compensation term and reagent deviation compensation term four components; Generate the correction amount for the preliminary concentration calculation result, the correction amount is calculated in a special coprocessor, the coprocessor supports parallel vector operation, the output result is algebraically superimposed with the preliminary concentration value, and the superimposition method is arithmetic addition.
[0038] The query interface of the device operation log provides a time-based range query, the query statement contains a lower and upper time limit condition, and the returned result is arranged in descending order of calibration time; the calculation method of the light source decay coefficient is the ratio of the current light intensity to the initial light intensity, the ratio range is 0-1, and the coefficient update frequency is once every 24 hours; the verification mechanism of the reagent purity detection report includes digital signature verification and hash value check, which ensures that the report has not been tampered with; the calibration certificate of the environmental temperature and humidity sensor traces back to the national standard, the calibration period is 12 months, and the sensor probe protection level is IP67; the dynamic updating mechanism of the temperature and humidity fluctuation influence weight adopts an exponential weighted moving average, and the forgetting factor is set to 0.2, which is suitable for slow environmental changes; the coefficients of the multiple linear compensation model are periodically refitted, the fitting data come from the detection records of the last 30 days, the model residual analysis uses leave-one-out cross-validation; the numerical accuracy control of the correction generation process is 0.001%, and the decimal floating point operation library is used to avoid rounding errors; the entire compensation correction process is embedded in the transaction processing mechanism, and any step failure will be rolled back to the initial state. The generation algorithm of the spectral type identifier contains a hash collision processing mechanism, which automatically adds a timestamp salt value to recalculate when a collision occurs; the database retrieval operation establishes a composite index, the index fields include the effective date, the device serial number, and the reagent batch number, and the index type is B-tree; in the temperature value conversion to absolute temperature scale in the environmental parameter deviation calculation, the unit is Kelvin, which avoids the problem of negative Celsius degree operation; the selection of the alternative standard curve sets a maximum deviation threshold, and when the minimum deviation value still exceeds the threshold, an artificial review process is triggered; the storage of the device light source decay coefficient uses fixed-point number format, with a precision of 0.0001; the unit of the reagent purity deviation value is unified as percentage, and negative value indicates insufficient content and positive value indicates over-standard content; the real-time calculation of the temperature and humidity fluctuation influence uses an incremental update algorithm, which only calculates the incremental part when new data arrives; the input parameters of the multiple linear compensation model are standardized pretreated by subtracting the mean value and dividing by the standard deviation; the correction amount is checked for range before output, and the absolute value of the correction amount is limited within 20% of the initial concentration value.
[0039] The storage of the timestamp sequence adopts a block management strategy, with each 100 records as a data block, and the block header containing the starting timestamp and the number of records; the database standard curve group establishes a version control mechanism, with a new version number generated each time the database is updated, and the old version data archived; the environmental temperature and humidity matching uses a spatial index structure to map the temperature and humidity range into a two-dimensional grid; the historical data trend analysis of the light source attenuation coefficient uses linear regression to predict future attenuation; the statistical process control of reagent purity deviation establishes a control chart to monitor batch-to-batch quality fluctuations; the adaptive adjustment of the temperature and humidity influence weight is based on model residual monitoring, and when the residual is consistently large, the model is automatically reconstructed; the coefficients of the multivariate linear compensation model are stored in non-volatile memory, with a backup period of every 7 days; the correction amount generation logs record the complete calculation process, including input parameters, intermediate results, and output values. The storage format of the synchronous detection data sequence adopts columnar storage, with the timestamp, nitrogen element value, and phosphorus element value stored as three arrays; the database query optimization uses preprocessed statements; the weight coefficient in the environmental parameter deviation calculation supports remote configuration; the abnormal detection of the device light source attenuation coefficient is based on the Z-score method; specifically, the arithmetic mean and standard deviation of the data sequence are determined, with the mean representing the normal level of the attenuation coefficient and the standard deviation reflecting the dispersion degree of the data; each newly collected attenuation coefficient value is compared with the mean, and the Z-score value of its deviation in standard deviation units is calculated, with the Z-score value representing the abnormality of the current data point relative to the historical data; the abnormal threshold is set to an absolute value of Z-score exceeding 3.0, which is based on the normal distribution principle and represents a very low probability of the data point falling outside three standard deviations of the mean; when the Z-score exceeds the threshold, the system automatically marks the attenuation coefficient as abnormal, triggers an abnormal alarm, and records it in the device status log; the transmission of reagent purity deviation uses Base64 encoding; the data collection of the temperature and humidity sensor uses an interrupt method; the verification of the multivariate linear compensation model uses an independent test set; and the sequence of correction amount application follows the dependency relationship.
[0040] Example 4: Refer to Table 1, at the beginning of each batch of detection, a standard solution with known concentration is inserted for verification detection, the standard solution is a commercially available certified reference material, the concentration value is traceable to the national standard material number GBW(E)080000 series, the standard solution includes two types of nitrogen element standard solution and phosphorus element standard solution, the concentration range of nitrogen element standard solution is 0-500 mg / L, and the concentration range of phosphorus element standard solution is 0-200 mg / L; the standard solution insertion is realized through an automatic sampler, the automatic sampler is an XYZ-3000 type, the sampling needle specification is 100 μL, the sampling accuracy is ±0.5%, and the sampling sequence is set at the first position of each detection batch; the verification detection process and the sample detection use completely same parameter conditions, including same flow detection cell temperature 25℃, same flow rate 1.0 mL / min, and same spectrum acquisition frequency 50 Hz; the deviation between the measured concentration value and the nominal concentration value of the standard solution is compared, the deviation calculation formula is relative deviation percentage=(measured value-nominal value) / nominal value*100%, and the calculation process is automatically completed in the QC verification module; the threshold is set to be that the relative deviation percentage is not more than ±5%, when the deviation exceeds the threshold, the system automatically triggers the equipment calibration process; after calibration is completed, the standard verification detection is re-executed, the cycle verification number is at most 3 times, until the deviation is reduced to the threshold range; the verification detection result is recorded in the quality control system in real time, and the system generates a QC report including time stamp, operator ID, standard batch number, measured concentration, nominal concentration, and deviation value.
[0041] Table 1: Standard solution technical parameter table
[0042] Adjusting the output power of the spectral emitter to the calibration value, the spectral emitter includes two independent light sources of deuterium lamp and tungsten lamp, the calibration output power of the deuterium lamp is 15W, the calibration output power of the tungsten lamp is 20W, the power adjustment is realized through a digital power controller, the accuracy of the controller is ±0.1W; updating the light intensity attenuation reference parameter, the reference parameter is stored in a non-volatile memory DS2431 type, the storage capacity is 1024bit, the parameter updating adopts the whole page writing mode, the CRC check is carried out before writing; resetting the opening degree of the flow rate control valve of the flow detection cell, the control valve is a piezoelectric ceramic valve, the opening degree resolution is 0.1%, the standard opening degree value is set to 45%, corresponding to the flow rate of 1.0mL / min; ensuring that the liquid film thickness is stable in the standard range, the standard thickness is 1.0mm±0.1mm, the thickness monitoring adopts a laser triangulation instrument, the measurement accuracy is ±0.01mm; reacquiring the absorbance value of the blank solution as a new baseline reference, the blank solution is ultrapure water with a resistivity of 18.2MΩ·cm, the acquisition frequency is not less than 10 times, and the arithmetic mean value is taken as the new baseline; during the execution of the equipment calibration process, the system state indicator light displays a yellow flashing mode, and turns to a green constant mode after the calibration is completed; the calibration data record includes calibration time, operator, light source power reading, flow rate reading, liquid film thickness value, and blank absorbance value, forming a complete calibration log.
[0043] The sample disc capacity of the automatic sampler is 50, the sample disc temperature is maintained at 4℃±1℃, and the sample disc rotation positioning accuracy is ±0.1°; the sample needle cleaning program includes three-stage cleaning, first flushing with 0.1mol / L nitric acid solution, then flushing with methanol, and finally flushing with ultrapure water, the volume of each flushing liquid is 500μL; the verification detection spectrum acquisition time is set to 60 seconds, 3000 data points are collected, the data smoothing processing adopts the Savitzky-Golay filter, and the window size is 21 points; the deviation judgment logic is embedded in the FPGA, and the real-time comparison module performs a numerical comparison every 0.1 seconds; the trigger signal of the equipment calibration process is transmitted through a digital I / O port, the signal level is TTL standard, and the high level is effective; the spectral emitter power adjustment adopts the PID control algorithm, the proportional coefficient is 0.8, the integral time is 2.0s, and the differential time is 0.5s; the data validity verification is carried out before updating the light intensity attenuation reference parameter, and the verification rules include range check and mutation detection; the calibration of the flow rate control valve uses a standard flowmeter as a reference, and the flowmeter accuracy level is 0.5 level; the liquid film thickness monitoring data is displayed in real time on the touch screen, the screen refresh rate is 60Hz, and the data curve adopts a smooth display mode; during the blank solution acquisition process, the system automatically excludes abnormal values, and the abnormal value judgment standard is the 3σ criterion; the calibration log storage format is JSON format, the file size is automatically compressed, and the compression algorithm adopts LZ77.
[0044] The concentration gradient of the standard solution is set to contain 5 concentration points, which are distributed in equal ratio sequence with a common ratio of 2.5; the positioning system of the automatic sampler is driven by a servo motor, and the repeated positioning accuracy is ±0.01 mm; the temperature control of the verification detection adopts a Peltier element, and the temperature stability is ±0.1℃; the numerical rounding rule in the deviation calculation follows the GB / T8170 standard, and the rounding interval is 0.1%; the timeout protection of the equipment calibration process is set to 300 seconds, and the process is automatically terminated and alarms after timeout; the power monitoring of the spectrum emitter uses a Hall effect sensor, and the current measurement accuracy is ±0.5%; the storage area of the light intensity attenuation reference parameter is divided into two sectors, and wear balance is achieved by alternating writing; the response time test of the flow control valve is performed by the step response method, and the 90% response time is less than 0.5 seconds; the sampling frequency of the liquid film thickness monitoring is 1 kHz, and the data is denoised by a digital filter; the system delay compensation value of the blank solution collection is 0.2 seconds, and the compensation algorithm is based on timestamp offset; the encryption of the calibration log adopts the AES-256 algorithm, specifically, the system first generates a 256-bit encryption key, the key generation process is based on a hardware random number generator, ensuring the randomness and unpredictability of the key, and the key material is stored in the protected area of the secure encryption module to prevent unauthorized access; the key is replaced every 24 hours.
[0045] The use record of the standard solution includes opening time, use times, and residual volume, achieving full traceability; the needle seat sealing material of the automatic sampler is polytetrafluoroethylene, and the corrosion-resistant life exceeds 100,000 times; the environmental illumination of the verification detection is controlled below 500 lux to avoid stray light interference; the alarm modes when the deviation exceeds the threshold value include sound and light alarm and short message notification; the permission management of the equipment calibration process is divided into two levels of operators and administrators, and the modification of key parameters requires administrator password; the aging coefficient of the spectral emitter is updated every 1000 hours, and the updated data is derived from the life test database; the verification of the light intensity attenuation reference parameter uses a double backup comparison mechanism to automatically restore the latest valid data when differences are found; the mechanical limit switch of the flow rate control valve is set to prevent overshoot damage; the optical path system of the liquid film thickness monitoring is checked for optical alignment every month, and the alignment tool uses a laser collimator; the sampling pipeline of the blank solution collection is replaced every month to prevent bacterial growth; the storage period of the calibration log is permanent, and the backup strategy is double hard disk mirror backup. The bottle label of the standard solution uses a tamper-proof design, and the label material is solvent-resistant synthetic paper; the cleaning liquid path of the automatic sampler is independently designed to avoid cross contamination; the electronic signature of the verification detection uses digital certificate technology, and the certificate is valid for one year; the on-site confirmation of the equipment calibration process requires double review, and the review record is stored in the database; the heat dissipation system of the spectral emitter uses forced air cooling design, and the fan speed is automatically adjusted according to the temperature; the access interface of the light intensity attenuation reference parameter uses I2C protocol, and the communication rate is 400 kHz; the drive circuit of the flow rate control valve has an overcurrent protection function, and the protection threshold is 2.5 A; the data transmission of the liquid film thickness monitoring uses shielded twisted pair, and the shielding layer is single-point grounded; the waiting time of the blank solution collection is set to 30 seconds to make the system reach the equilibrium state; the query interface of the calibration log supports multi-condition combination query, and the response time is less than 2 seconds.
[0046] Embodiment 5: generate a unique traceable code for each detection, the unique traceable code is generated by version 4 universal unique identifier generation algorithm, the algorithm is based on a combination of random number generator and MAC address timestamp, the code format is a set of 8-4-4-4-12 hexadecimal digits, an example code is "550e8400-e29b-41d4-a716-446655440000"; the generation timing of the unique traceable code is immediately after the creation of the detection task, the generation process is completed in a secure encryption module, the module meets the FIPS140-2 security standard; the associated storage of the original absorbance value, environmental parameters, compensation coefficients and final concentration value is realized by using a time series database InfluxDB, the database table design includes four parts of measurement name, timestamp, tag set and field set; the original absorbance value is stored with a precision of six decimal places, and the data format is IEEE754 double-precision floating point number; the environmental parameters include temperature value, humidity value and atmospheric pressure value, the temperature value is in Celsius, the humidity value is in percentage, and the atmospheric pressure value is in kilopascal; the compensation coefficient is stored in JSON object format, including light source attenuation coefficient, temperature compensation coefficient and humidity compensation coefficient; the final concentration value is accompanied by uncertainty information, the uncertainty calculation complies with the GUM specification, including expanded uncertainty and inclusion factor; the storage system adopts a distributed architecture, data is automatically synchronized to three physical nodes, and consistency between nodes is maintained through the RAFT protocol. When the detection result is abnormal, the abnormality is determined based on the Western Electric rule, which includes eight differentiating criteria, such as a single point exceeding the 3σ control limit, and 9 consecutive points on the same side; the complete detection process data is retrieved through the traceable code, the retrieval interface is RESTful API, the interface endpoint address is / api / v1 / trace / {uuid}, and both JSON and XML response formats are supported; the abnormal link is located, the positioning algorithm uses a decision tree classification model, and the model features include environmental parameter fluctuation pattern, device state code sequence and detection value change trend; the abnormal analysis report is automatically generated, the report template meets the ISO / IEC17025 standard, and includes three chapters of abnormal point positioning, root cause analysis and corrective measure suggestion; the data traceability system interface supports multi-dimensional drilling analysis, the time dimension can be drilled down to the millisecond level, and the parameter dimension supports cross filtering; the complete detection process data display adopts a waterfall form, and the data snapshots of each processing stage support side-by-side comparison, and the comparison indicators include mean, standard deviation, coefficient of variation and other statistical quantities.
[0047] For a plurality of organic fertilizer samples input continuously, the samples are automatically queued into the detection channel in order of digestion completion time. The queuing algorithm is based on a minimum slack time priority strategy, and the slack time calculation formula takes into account sample stability and detection urgency. The digestion completion timestamp is derived from the digital output interface of the digestion instrument, the interface protocol is ModbusTCP, time synchronization uses NTP protocol, and the clock deviation is less than 1 millisecond. The detection channel load balancing uses a polling scheduling mechanism, and each detection channel is set with a maximum concurrent number limit, with a default value of 3 parallel detection tasks. The total detection time of the current sample queue is predicted according to the historical detection time consumption, and the prediction model uses the exponential smoothing method with a smoothing coefficient α of 0.3, and the reference time comes from the detection log of the past 30 days. The spectral acquisition frequency is dynamically adjusted to match the expected progress, and the adjustment algorithm is a PID controller with a proportional coefficient of 0.8, an integral time of 1.2 seconds, and a differential time of 0.4 seconds. The spectral acquisition frequency adjustment range is limited between 10-50Hz, and the adjustment step is 1Hz to prevent data distortion caused by frequency mutation. The insertion frequency of quality control samples in the queue increases linearly with the number of detection samples, and the insertion frequency calculation formula is f=0.1n+1, where f represents the insertion of a quality control sample every n detection samples, and n represents the total number of samples to be detected. The insertion position of the quality control sample uses random number generation, and the random seed comes from the system clock to avoid the influence of fixed patterns.
[0048] The generation instance of the unique traceable code shows that when the system receives a detection request for the sample number "SMP-2023-08-15-001", the security encryption module immediately calls the hardware random number generator to generate a 16-byte random number, combines the current system timestamp and the network card MAC address, and outputs the standard format UUID code through MD5 hash operation and specific bit replacement operation; This unique traceable code is also printed in the two-dimensional code on the first page of the detection report, the two-dimensional code version is QRCodeModel2, the error correction level is H, and it can store 2953 bytes; The associated storage process is as follows: after the spectrometer completes the absorbance measurement, the data acquisition card transmits the digital signal to the memory buffer through DMA, the buffer size is set to 8MB, at the same time the environmental sensor transmits the temperature and humidity readings through the I2C bus, all data are packaged into a data packet, the unique traceable code is added as the message header, and sent to the time series database through gigabit Ethernet; After receiving the data packet, the time series database parses the data according to the predefined mode, stores the original absorbance value in the "raw_absorbance" table, the environmental parameters in the "environmental_data" table, the compensation coefficient in the "calibration_factors" table, and the final concentration value in the "final_results" table, and each table is associated by the unique traceable code.
[0049] A specific case of anomaly detection occurred on August 15, 2023, during a batch detection process. The system found that the nitrogen element detection value of sample "SMP-2023-08-15-078" suddenly exceeded the upper control limit, and the quality control module immediately triggered an anomaly alarm. The operator input the unique traceability code "550e8400-e29b-41d4-a716-446655440000" of the sample through the Web interface, and the system returned complete detection link data within 500 milliseconds: including 0.5°C abnormal fluctuation in the digestion stage display temperature curve, obvious attenuation of 210nm wavelength light intensity in the spectral detection stage, and instantaneous 85%RH humidity in the detection cabin; the positioning algorithm analyzed these data characteristics and pointed out the source of the anomaly to the dehumidification module failure of the environmental control system, and marked that the deuterium lamp of the spectrometer needed to be replaced; the system automatically generated a maintenance work order and notified the equipment department for preventive maintenance. The actual operation case of batch detection optimization shows that when the digestion instrument completes the processing of 15 samples at the same time, the samples are sorted by completion timestamp as "SMP-001" to "SMP-015"; the queuing system detects that the current load of the 3 detection channels is 2, 1, and 3 tasks respectively, so it dynamically allocates the new task to the lightest load channel No. 2; the prediction model calculates the theoretical detection time of the 15 samples as 45 minutes according to historical data, while the actual available time is 60 minutes, so it dynamically reduces the spectral acquisition frequency from 50Hz to 35Hz; when the 7th sample is detected, the system decides to insert a quality control sample every 3 samples according to the formula f=0.1x15+1=2.5, rounded to 2.5, so it automatically inserts standard solution at the 3rd, 6th, 9th, and 12th detection positions; this dynamic adjustment makes the entire batch complete in 55 minutes, 5 minutes ahead of schedule, and the detection results of the quality control samples are all within the control range.
[0050] The hardware configuration of the data traceability system includes a cluster of three servers, each equipped with an Intel Xeon E5-2680 processor, 64GB of memory, and a 1TB SSD hard drive; the software platform uses Docker containerization deployment, with each microservice running independently in an isolated environment; the network architecture uses a dual-gigabit network card binding mode to provide link redundancy and load balancing; the database index strategy is optimized for time range queries, with B+ tree index depth controlled within 4 layers; the machine learning model for anomaly detection is retrained every 24 hours, with training data coming from the detection records of the past 7 days; the scheduling algorithm for batch detection supports manual intervention mode, allowing operators to adjust priority rules at any time; system logs are stored in a structured format for audit analysis; all configuration parameters are managed through a graphical interface, supporting real-time modification and verification.
[0051] The life cycle management of the unique traceable code includes three stages of generation, use and archiving. The generation stage needs to obtain a system cryptographic secure random number; the use stage code is used as a key for data association; the archiving stage code is stored together with the detection data for a long time; the data retention policy of the associated storage is divided into three levels: hot data retention for 30 days, warm data retention for 1 year, and cold data permanent storage; the decision tree model of the abnormal positioning contains 15 feature nodes, and each node sets the information gain threshold value to 0.1; the queue management of batch detection realizes the priority inheritance mechanism, and high-priority samples can interrupt low-priority tasks; the spectral acquisition frequency adjustment sets a smooth transition protection, and the frequency change rate is limited to within 5 Hz per second; the quality control sample insertion algorithm considers the sample type distribution to ensure that different concentration levels are represented; the security mechanism of the data traceability system includes three layers of protection of identity authentication, permission control and operation audit, and user login requires two-factor authentication; the database access implements the principle of least privilege, and different roles can only access authorized data; all data modification operation records are recorded in the audit log which cannot be tampered with; the batch detection optimization algorithm is verified by simulation, and the simulation data contains 1000 virtual sample detection scenarios; the system performance benchmark test shows that under full load, 50 detection tasks can be processed simultaneously, and the average response time is less than 2 seconds; the fault recovery mechanism ensures that in the case of single point failure, data is not lost and services are automatically switched.
[0052] It should be noted that the relational terms, such as first and second, and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0053] While the embodiments of the application have been shown and described, it is to be understood that the embodiments of the application are capable of numerous changes, modifications, substitutions, and alterations, and many embodiments of the application will occur to those skilled in the art. Therefore, the scope of the application should be limited only by the appended claims and their equivalents.
Claims
1. A method for continuous detection of nitrogen and phosphorus in organic fertilizers, characterized in that, Includes the following steps: Obtain the organic fertilizer sample to be tested, and use a pretreatment device to crush, homogenize and filter the sample to obtain the standard test solution; The standard test solution was introduced into the micro-detection channel, and the absorbance values of nitrogen and phosphorus at their characteristic wavelengths were determined by spectral absorption method. An initial detection data set is generated based on absorbance values. The nitrogen and phosphorus data in the set are then time-aligned to form a synchronous detection data sequence. Based on the synchronous detection data sequence, the standard curve database is called to match the nitrogen and phosphorus concentration conversion parameters under the current detection environment, and preliminary concentration calculation results are generated. The preliminary concentration calculation results are corrected for interference factors. The environmental temperature and humidity, reagent batch and equipment wear data in the historical test records are extracted as the input of the compensation coefficient, and the corrected nitrogen and phosphorus concentration values are output.
2. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 1, characterized in that, The steps for obtaining the standard test solution specifically include: The organic fertilizer sample was placed in a sealed digestion container, an oxidant was added and a high-temperature digestion reaction was carried out. After the reaction was completed, it was cooled to room temperature. The digestion solution was centrifuged to remove solid residues, and the supernatant was collected and filtered through a microporous membrane to obtain a clear liquid. The pH of the clarified liquid is adjusted to a preset range using a buffer solution and then diluted to the target volume to generate a standard test solution.
3. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 2, characterized in that, The specific steps of the spectral absorption method include: Inject the standard test solution into the flow detection cell and control the flow rate to make the liquid form a stable liquid film in the detection window; A light beam with the characteristic wavelength of nitrogen and a light beam with the characteristic wavelength of phosphorus were emitted to penetrate the liquid film, and the light intensity attenuation value after penetration was recorded. Calculate the real-time absorbance value at each wavelength based on the ratio of the attenuation value to the light intensity of the blank control.
4. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 3, characterized in that, The timing alignment process specifically includes the following steps: Extract the acquisition timestamp sequence of absorbance values at characteristic wavelengths of nitrogen and match it with the acquisition timestamp sequence of absorbance values at characteristic wavelengths of phosphorus. Interpolation compensation is performed on absorbance values with time deviations exceeding the threshold to generate nitrogen and phosphorus absorbance data pairs that are fully synchronized in time. The synchronized data pairs are arranged in chronological order to form a synchronization detection data sequence.
5. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 4, characterized in that, The steps for accessing the standard curve database specifically include: Based on the spectral type identifier of the current test solution, retrieve the nitrogen and phosphorus standard curve sets stored in the database; Match the standard curve parameters that are completely consistent with the current ambient temperature and humidity, detection equipment model, and reagent batch number; If a match fails, the standard curve parameter with the most recent time and the smallest environmental parameter deviation is selected as the replacement.
6. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 5, characterized in that, The interference factor compensation and correction steps specifically include: Extract the light source attenuation coefficient from the three most recent calibration records in the equipment operation log; Obtain the deviation value of the effective ingredient content in the purity test report of the current reagent batch; By combining real-time environmental temperature and humidity sensor data, the dynamic impact weight of temperature and humidity fluctuations on absorbance values is calculated. Input the above parameters into the multivariate linear compensation model to generate a correction value for the preliminary concentration calculation results.
7. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 6, characterized in that, It also includes quality control steps: At the beginning of each batch of testing, a standard solution of known concentration is inserted for verification testing. The measured concentration value of the standard solution is compared with the nominal concentration value. If the deviation exceeds the threshold, the equipment calibration process is triggered. After calibration, repeat the standard verification test until the deviation drops to within the threshold range.
8. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 7, characterized in that, The specific steps of the equipment calibration process include: Adjust the output power of the spectral emitter to the calibration value and update the light intensity attenuation reference parameters; Reset the flow rate control valve opening of the flow detection cell to ensure that the liquid film thickness remains stable within the standard range; The absorbance value of the blank solution was re-acquired as a new baseline reference.
9. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 8, characterized in that, It also includes data traceability steps: A unique traceability code is generated for each test, and the original absorbance value, environmental parameters, compensation coefficient and final concentration value are associated and stored. When the test results are abnormal, the complete test process data can be retrieved by tracing the code to locate the point where the abnormality occurred.
10. The method for continuous detection of nitrogen and phosphorus in organic fertilizers according to claim 9, characterized in that, It also includes batch detection optimization steps: For multiple organic fertilizer samples that are input consecutively, they are automatically queued and entered into the testing channel according to the order of digestion completion time; Based on historical testing times, predict the total testing time for the current sample queue and dynamically adjust the spectral acquisition frequency to match the expected progress. The frequency of inserting quality control samples into the queue increases linearly with the number of samples being tested, ensuring the reliability of batch testing.
Citation Information
Cited By
Drug test-oriented model data standardization processing method and system
CN122177510A