Portable water quality detector and detection method thereof
Through the modular design of the portable water quality detector, the combination of adaptive filters and machine learning models solves the problems of insufficient real-time and data processing efficiency in traditional water quality monitoring technology, achieving rapid response and accurate diagnosis, and is suitable for on-site water quality detection, reducing costs and maintenance requirements.
Patent Information
- Application Number
- CN202410562709.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-05-08
AI Technical Summary
Traditional water quality monitoring technology is time-consuming, costly and inconvenient for rapid on-site detection. Existing portable water quality detectors have shortcomings in real-time performance and data processing efficiency, especially when faced with multi-parameter and different water source data, it is difficult to achieve rapid response and accuracy. analyze.
A portable water quality detector is designed that combines modular design, adaptive filters and machine learning models to achieve real-time data collection and processing. It improves operational convenience and equipment safety through mode switching buttons and safety locking units, and adopts cross-validation And regularization technology optimizes model generalization capabilities, and automatically adjusts the sampling frequency and alarm system during anomaly detection.
It improves the real-time and continuity of monitoring, enhances data accuracy and processing efficiency, achieves rapid response and accurate diagnosis, is suitable for non-professionals to conduct water quality testing in environments with limited resources, and reduces costs and maintenance requirements.
Smart Images

Figure CN118330165B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality detectors, and in particular to a portable water quality detector and a detection method thereof. Background Art
[0002] Water quality monitoring is a key means of ensuring water resource security, preventing water pollution, and improving the quality of the water environment. Traditional water quality monitoring techniques typically rely on detailed laboratory analysis, which is not only time-consuming and costly, but also inconvenient for rapid on-site testing.
[0003] Existing water quality testing technologies mainly include electrochemical detection methods, optical detection methods, and biosensor technology. Electrochemical detection methods rely on electrode reactions to determine the content of specific chemical substances in water, while optical detection methods assess water quality by measuring the absorption or scattering of light by water samples. Biosensor technology uses the sensitivity of biological reactions to detect harmful substances in water. Although these technologies have their own advantages, the water quality testers in existing technologies are relatively large. The development and application of portable water quality testers have become an important direction of technological innovation. Such testers are generally small in size, easy to carry, simple to operate, fast in response, and relatively low in cost. They are particularly suitable for non-professionals to conduct water quality testing without laboratory conditions. Summary of the Invention
[0004] In view of the above-mentioned deficiencies, the object of the present invention is to provide a portable water quality detector and a detection method thereof.
[0005] The present invention provides the following technical solutions:
[0006] A portable water quality detector comprises an instrument body, a connecting piece is provided at the end of the instrument body, a detection probe is installed on the connecting piece, a display unit is fixedly installed on the instrument body, a tensioning screw is installed on the connecting piece, an abutment unit is configured on the instrument body, a safety locking unit is configured at a location adjacent to the abutment unit, a hanging unit is configured on the connecting piece, a snap-in recess is provided on the instrument body, an extension portion is provided on the detection probe, a sealing end is fixedly connected to one end of the instrument body away from the connection, an assembly groove is provided in the snap-in recess on the instrument body, and A battery assembly port is also provided in the snap-fit recess, a power supply module is installed at the battery assembly port on the instrument body, the power supply module is a battery, and a toggle switch is provided on one side of the battery assembly port on the instrument body, the instrument body and the connecting piece are connected by snapping, the display unit includes an external display screen, an adjustment button is installed near the external display screen, a reset button is provided on the display unit, and the reset button is located below the adjustment button, a mode switching module is provided at the lower end of the instrument body, and a mode switching button is installed on the mode switching module.
[0007] As an optimal technical solution for a portable water quality detector, it includes a shock-absorbing unit, which includes a support rod, a accommodating groove, a connecting rod, a cylindrical shock-absorbing member and a spiral beryllium copper wire. The support rod is installed on the instrument body, and the cylindrical shock-absorbing member is arranged on the support rod. The support rod is installed in a circular groove, and the accommodating groove is provided on the support rod. The connecting rod is firmly arranged in the accommodating groove of the support rod. The bottom of the cylindrical shock-absorbing member is located in the accommodating groove of the support rod, and the bottom of the cylindrical shock-absorbing member is sleeved on the connecting rod. The spiral beryllium copper wire is sleeved on the connecting rod in the accommodating groove, one end of which is connected to the bottom of the accommodating groove, and the other end is connected to the lower end face of the cylindrical shock-absorbing member.
[0008] As an optimal technical solution for a portable water quality detector, it includes a safety locking unit, which includes a square part, a square assembly part, a fixing belt, a circular assembly groove, a flat-head fixing part, a limit opening and a magnet. The square part is fixedly arranged on the instrument body at one end away from the connecting part, and the magnet is firmly arranged on the square part. The square part and the square assembly part are fixedly connected. The fixing belt is fixedly arranged on the square assembly part, and the square part, the square assembly part and the fixing belt are assembled in the assembly groove on the instrument body. The circular assembly groove is opened on the square assembly part, and the flat-head fixing part is assembled in the circular assembly groove on the square assembly part, and is connected to the instrument body by a threaded connection. The square assembly part is fixed in the assembly groove on the instrument body through the flat-head fixing part, and the square part is fixed to the instrument body through the square assembly part. The limit opening is opened on the square part, and the magnet is clamped in the limit opening on the square part.
[0009] As an optimal technical solution for a portable water quality detector, it includes a hook unit, which includes a coupling block, an elastic sleeve, a penetration hole, an elastic rope and a connecting frame. The elastic sleeve is configured on the coupling block, the elastic rope is configured on the elastic sleeve, the coupling block is installed on the connecting piece, and the elastic sleeve is provided with the penetration hole, the elastic rope is passed through the penetration hole on the elastic sleeve, and the connecting frame is installed on the elastic rope. The connecting frame includes a coupling head, a coupling tail, a wire connection hole and a wire connection joint. The coupling head and the coupling tail are fixedly configured at the head of the elastic rope, the wire connection hole is opened on the coupling head, and the wire connection joint is opened on the coupling tail, and the coupling head and the coupling tail are combined and fixed by a wire connection between the wire connection hole and the wire connection joint.
[0010] A detection method for a portable water quality detector includes the following technical steps:
[0011] Data collection and preliminary processing: Collect water quality data from different water sources and pre-process the collected data;
[0012] Build a water quality detection model: Select a suitable machine learning model, train the model based on the collected data, and use cross-validation and other techniques to optimize model parameters to ensure the model's generalization ability on different water source data;
[0013] Optimization of water quality detection models: The instrument continuously collects water quality data and inputs it into the water quality detection model for analysis in real time. Based on the feedback output by the model, the detection algorithm parameters are adjusted;
[0014] Abnormal detection and response mechanism: When the detected water quality parameters are abnormal, the system automatically increases the sampling and analysis frequency. The abnormal situation triggers additional data recording and alarm systems to remind users to take specific measures.
[0015] As a preferred technical solution for the detection method of a portable water quality detector, set y i (t) is the filtered output of the i-th parameter, and the formula of the adaptive filter is expressed as follows:
[0016]
[0017] b ijk (t+1)=b ijk (t)+μ·e i (t)·x j (tk)
[0018] e i (t) = d i (t)-y i (t)
[0019] Where n is the total number of monitored parameters, which is 4 here; m is the maximum value of the time delay considered; b ijk (t) is the filter coefficient at time t, which is the effect of parameter j on parameter i; e i (t) is the estimation error of the i-th parameter at time t; d i (t) is the target value or reference value of the i-th parameter; μ is the learning rate, which controls the speed of filter coefficient adjustment.
[0020] As a preferred technical solution for the detection method of a portable water quality detector, set is the detection value of the i-th parameter at time t, and anomaly detection can be performed using the following formula:
[0021]
[0022] in, Indicates that an abnormality is detected, and 0 indicates normal.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] 1. Improve the real-time and continuity of monitoring: By using portable water quality detectors, users can conduct on-site water quality testing without laboratory equipment, which greatly improves the real-time and continuity of monitoring. Compared with traditional offline laboratory analysis methods, this portable device makes frequent and regular water quality monitoring possible, especially in environments that require rapid response and decision-making.
[0025] 2. Enhance the convenience and security of user operations:
[0026] The modular design and user-friendly features, such as a mode switch button, a simple tension screw locking mechanism, and a convenient battery replacement port, make daily use and maintenance of the device easier and safer. In addition, the design of the shock-absorbing unit and safety locking unit reduces the potential damage to the device during transportation and operation, thereby extending the service life of the device.
[0027] 3. Improved Data Accuracy and Processing Efficiency: By integrating adaptive filters and machine learning models, the system not only increases data acquisition speed and accuracy, but also optimizes the accuracy of multi-parameter detection through advanced data processing techniques. The adaptive filter allows the system to automatically adjust processing parameters for varying water quality conditions, while the machine learning model ensures good generalization and high prediction accuracy for new and unseen data through cross-validation and regularization techniques.
[0028] 4. Enhanced anomaly detection and rapid response mechanisms: The system's anomaly detection mechanism automatically increases sampling frequency and triggers an alarm system when it detects abnormal water quality parameters (such as excessive heavy metal levels). This not only enables timely action but also provides more data to support rapid diagnosis and decision-making. Furthermore, by recording detailed information about abnormal events, the system enhances its ability to track and analyze potential issues.
[0029] 5. Improved cost-efficiency and environmental adaptability: The design and functionality of the portable water quality tester make it a low-cost solution suitable for a variety of environmental conditions. It is suitable for non-professional operation and, due to its rapid response and low maintenance requirements, is well suited for use in areas with limited resources or far from laboratory facilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0031] Figure 1This is a schematic diagram of the overall structure of a portable water quality detector of the present invention;
[0032] Figure 2 This is a schematic diagram of the back structure of a portable water quality detector of the present invention;
[0033] Figure 3 A portable water quality detector of the present invention Figure 1 Enlarged view of point A in the middle;
[0034] Figure 4 A portable water quality detector of the present invention Figure 2 Enlarged view of point B in the middle;
[0035] Figure 5 This is a structural schematic diagram of a buffer structure of a portable water quality detector of the present invention;
[0036] Figure 6 This is a structural schematic diagram of an adsorption structure of a portable water quality detector of the present invention;
[0037] Figure 7 This is a structural diagram of the suspension structure of a portable water quality detector of the present invention;
[0038] Figure 8 This is a structural schematic diagram of the connecting frame of a portable water quality detector of the present invention.
[0039] The following are marked in the figure: 10, instrument body; 20, connecting piece; 30, detection probe; 40, snap-in recess; 50, extension; 60, abutment unit; 61, support rod; 62, accommodating groove; 63, connecting rod; 64, cylindrical shock absorber; 65, spiral beryllium copper wire; 70, safety locking unit; 71, square piece; 72, square assembly part; 73, fixing belt; 74, circular assembly groove; 75, flat head fixing piece; 76, limit mouth; 77, magnet; 80, display Display unit; 90, hanging unit; 91, joint block; 92, elastic sleeve; 93, penetration hole; 94, elastic rope; 95, connection frame; 951, connection head; 952, connection tail; 953, thread connection hole; 954, thread connection joint; 100, power supply module; 110, toggle switch; 120, tensioning screw; 130, end cap; 140, external display screen; 150, adjustment button; 160, reset button; 170, mode switching module; 180, mode switching button; DETAILED DESCRIPTION
[0040] The following is a clear and complete description of the concept, specific structure and technical effects of the present invention in conjunction with the embodiments and drawings, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other in the absence of conflict. It should be noted that, unless otherwise specified, when a feature is referred to as "fixed" or "connected" to another feature, it can be directly fixed or connected to another feature, or it can be indirectly fixed or connected to another feature. In addition, the descriptions of up, down, left, right, etc. used in the present invention are only relative to the relative positional relationship of the various components of the present invention in the drawings.
[0041] Example 1
[0042] Please refer to Figures 1 to 8 As shown, a portable water quality detector includes an instrument body 10, and a connecting piece 20 is provided at the end of the instrument body 10, and a detection probe 30 is installed on the connecting piece 20. A display unit 80 is fixedly installed on the instrument body 10, a tensioning screw 120 is installed on the connecting piece 20, an abutment unit 60 is configured on the instrument body 10, a safety locking unit 70 is configured at a location adjacent to the abutment unit 60, a hanging unit 90 is configured on the connecting piece 20, a snap-in recess 40 is provided on the instrument body 10, an extension portion 50 is provided on the detection probe 30, a sealing end 130 is fixedly connected to the end of the instrument body 10 away from the connection, an assembly groove is provided in the snap-in recess 40 on the instrument body 10, and a battery assembly port is also provided in the snap-in recess 40, and a power supply module is installed at the battery assembly port on the instrument body 10.
[0043] 100, the power supply module
[0044] 100 represents a battery, and a toggle switch 110 is located on one side of the battery assembly port on the instrument body 10. The instrument body 10 is connected to the connector 20 via a snap-fit mechanism. The display unit 80 includes an external display screen 140, with adjustment buttons 150 mounted near the external display screen 140. A reset button 160 is also located on the display unit 80, below the adjustment buttons 150. A mode switching module 170 is located at the lower end of the instrument body 10, with a mode switching button 180 mounted on the module. When water quality testing is not required, the detection probe 30 and the instrument body 10 are aligned, with the extension 50 of the detection probe 30 positioned within the snap-fit recess 40 on the instrument body 10. In this state, the water quality detector is in a retracted position. This demonstrates the advantages of this type of detector, such as small size, portability, ease of operation, fast response, and relatively low cost, making it particularly suitable for non-professionals performing water quality testing without a laboratory. When the water quality detector needs to be used, the user takes out the water quality detector and starts the instrument by toggling the switch 110 on the instrument body 10. The external display screen 140 displays the initial data. The adjustment button 150 is used to view the relevant detection data. If the relevant detection data displayed on the external display screen 140 is not zero, the relevant detection data on the external display screen 140 can be reset and adjusted by the reset button 160. After the adjustment is completed, the detection probe 30 is rotated so that the detection probe 30 and the instrument body 10 are in the same straight line. Then, the tensioning screw 120 is rotated and the detection probe 30 is locked by the tensioning screw 120, so that the detection probe 30 is fixed and the detection probe 30 of the instrument is inserted into the water to be tested. The user determines the relevant detection data of the water quality based on the detection data displayed on the external display screen 140 on the display unit 80. After recording the relevant detection data on the instrument, the detection probe 30 is cleaned and reset to the data on the detection instrument by the reset button 160, and then other water quality tests can be continued. Before each water quality test, the relevant test data on the external display 140 must be checked to ensure normality. If any abnormality is found, the data must be adjusted using the reset button 160 to ensure accurate water quality testing. When the instrument is not used for an extended period of time, or when the battery in the instrument body 10 is low and needs to be replaced, the user can insert a fingernail into the battery opening to remove the battery.
[0045] Example 2
[0046] like Figure 5As shown, a shock absorbing unit of a portable water quality detector includes a support rod 61, a receiving groove 62, a connecting rod 63, a cylindrical shock absorbing member 64, and a spiral beryllium copper wire 65. The support rod 61 is mounted on the instrument body 10, and the cylindrical shock absorbing member 64 is arranged on the support rod 61. The support rod 61 is mounted in a circular groove, and the receiving groove 62 is provided on the support rod 61. The connecting rod 63 is firmly arranged in the receiving groove 62 of the support rod 61. The bottom of the cylindrical shock absorbing member 64 is located in the receiving groove 62 of the support rod 61, and the bottom of the cylindrical shock absorbing member 64 is sleeved on the connecting rod 63. The spiral beryllium copper wire 65 is sleeved on the connecting rod 63 in the receiving groove 62, with one end connected to the bottom of the receiving groove 62 and the other end connected to the lower end surface of the cylindrical shock absorbing member 64. When the water quality detector is not in use or is carried, the rotating detection probe 30 can be integrated into the instrument body 10. The extension 50 initially touches the cylindrical shock absorber 64 on the support rod 61. The cylindrical shock absorber 64 moves along the length of the connecting rod 63 in the accommodating groove 62 and presses against the spiral beryllium copper wire 65. The spiral beryllium copper wire 65 provides a collision relief effect, preventing the detection probe 30 from directly colliding with the instrument body 10, thereby ensuring the integrity of the instrument as a whole. When the detection instrument needs to be opened, the deformation force of the spiral beryllium copper wire 65 is converted into motion potential energy, driving the cylindrical shock absorber 64 to push upward, which helps to quickly open the detection probe 30.
[0047] Example 3
[0048] like Figure 6As shown, a safety locking unit 70 of a portable water quality detector includes a square member 71, a square assembly member 72, a fixing belt 73, a circular assembly groove 74, a flat head fixing member 75, a limit opening 76, and a magnet 77. The square member 71 is fixedly arranged on the end of the instrument body 10 away from the connecting member 20, the magnet 77 is firmly arranged on the square member 71, the square member 71 and the square assembly member 72 are fixedly connected, the fixing belt 73 is fixedly arranged on the square assembly member 72, and the square member 71, the square assembly member 72, and the fixing belt 73 are assembled in the assembly groove on the instrument body 10. The circular assembly groove 74 is opened on the square assembly member 72, and the flat head fixing member 75 is assembled in the circular assembly groove 74 on the square assembly member 72, and is connected to the instrument body 10 by threaded connection. The square assembly part 72 is fixed to the assembly groove on the instrument body 10 by the flat head fixing part 75, and the square part 71 is fixed to the instrument body 10 by the square assembly part 72. The limiting opening 76 is provided on the square part 71, and the magnet 77 is clamped in the limiting opening 76 on the square part 71. When the detection probe 30 is stored, it can be safely locked by the safety locking unit 70 to prevent the detection probe 30 from suddenly tilting up. During the specific assembly, the square assembly part 72 and the fixing belt 73 on the square part 71 are inserted into the assembly groove on the instrument body 10 to ensure that the square assembly part 72 and other components are tightly connected to the assembly groove. At this time, the circular assembly groove 74 on the square assembly part 72 is aligned with the hole in the assembly groove on the instrument body 10. The operator inserts the flat head fixing part 75 into the circular assembly groove 74 on the square assembly part 72, and rotates the flat head fixing part 75 by means of a tool so that its end contacts the hole in the assembly groove and is screwed in. The square assembly part 72, square part 71 and other structures are firmly fixed to the assembly groove on the instrument body 10 through the flat head fixing part 75, and then the magnet 77 is snapped into the limit opening 76 on the square part 71, thereby completing the adsorption and fixation of the rotation detection probe 303.
[0049] Example 4
[0050] like Figure 7 、 8As shown, this embodiment describes a hook unit for a portable water quality detector. The hook unit includes a coupling block 91, an elastic sleeve 92, a through-hole 93, an elastic cord 94, and a coupling frame 95. The elastic sleeve 92 is disposed on the coupling block 91, and the elastic cord 94 is disposed on the elastic sleeve 92. The coupling block 91 is mounted on the connector 20, and the through-hole 93 is formed in the elastic sleeve 92. The elastic cord 94 is inserted through the through-hole 93 in the elastic sleeve 92, and the coupling frame 95 is mounted on the elastic cord 94. The coupling frame 95 includes a coupling head 951, a coupling tail 952, a thread connection hole 953, and a thread connection joint 954. The coupling head 951 and the coupling tail 952 are fixedly disposed at the head of the elastic cord 94. The thread connection hole 953 is provided on the coupling head 951, and the thread connection joint 954 is provided on the coupling tail 952. The coupling head 951 and the coupling tail 952 are connected and fixed together by a thread connection between the thread connection hole 953 and the thread connection joint 954. After use, the hook unit can be used to hang the elastic cord 94 on a support nail or a horizontal rod through the coupling frame 95 for storage.
[0051] Example 5
[0052] In the field of environmental monitoring, the development of water quality testing technology has always been a focus of scientists and engineers worldwide. From the initial use of basic chemical reagent analysis to modern electronic sensing technology, water quality testing methods have undergone significant changes. Traditional techniques primarily rely on offline laboratory analysis, which is not only time-consuming but also difficult to achieve continuous monitoring. With technological advances, a variety of online and portable testing instruments have become increasingly popular, making real-time monitoring possible. For example, the use of electronic pH meters and dissolved oxygen sensors has greatly improved data collection speed and accuracy, while turbidity and heavy metal content measurements have leveraged advances in spectroscopy and electrochemistry. However, while existing technologies have made progress in reducing data collection time and improving data quality, they still face shortcomings in the complexity of data processing and analysis, the accuracy of simultaneous multi-parameter detection, and the generalization ability of models. Traditional methods often fail to adequately handle the diverse influences from different water sources, resulting in an unstable foundation for model training. Furthermore, existing methods struggle with real-time data analysis and dynamic parameter adjustment, limiting the ability of detection systems to adapt to rapidly changing water quality conditions. For example, the response to sudden heavy metal exceeding the standard is often not fast or accurate enough, and it is not possible to effectively warn and guide emergency treatment measures. To address the above problems, the present invention proposes a detection method of a portable water quality detector, including
[0053] S1. Data Collection and Preliminary Processing: During device initialization, water quality data from different water sources, including pH, dissolved oxygen, turbidity, and heavy metal content, is collected. This data is then preprocessed, such as by standardization and denoising. This ensures the quality and consistency of the input data, providing an accurate training foundation for the machine learning model.
[0054] Furthermore, assume that the water quality parameters we monitor include pH, dissolved oxygen, turbidity, and heavy metal content, denoted as x1(t), x2(t), x3(t), and x4(t) respectively. Our goal is to design a filter that can not only effectively filter each parameter, but also exploit the interdependence between these parameters to improve filtering performance.
[0055] Set y i (t) is the filtered output of the i-th parameter, and the formula of the adaptive filter is expressed as follows:
[0056]
[0057] b ijk (t+1)=b ijk (t)+μ·e i (t)·x j (tk)
[0058] e i (t) = d i (t)-y i (t)
[0059] Where n is the total number of monitored parameters, which is 4 here; m is the maximum value of the time delay considered; b ijk (t) is the filter coefficient at time t, which is the effect of parameter j on parameter i; e i (t) is the estimation error of the i-th parameter at time t; d i (t) is the target value or reference value of the i-th parameter; μ is the learning rate, which controls the speed of filter coefficient adjustment.
[0060] It should be noted that, through the above model, the filter not only focuses on the data quality of a single parameter, but can also use the common information of all parameters to optimize the processing. For example, if there is a known chemical dependency between x1 (pH value) and x4 (heavy metal content), the model can adjust the relevant filter coefficients (such as b 14k (t) and b 41k (t) to reflect this relationship, so that this dependence can be taken into account in forecasting and adjustments.
[0061] S2. Build a water quality detection model: Select an appropriate machine learning model, train the model based on collected data, and optimize model parameters using techniques such as cross-validation to ensure the model's generalization ability across different water source data. Use an effective machine learning model to simultaneously detect multiple parameters, improving the model's accuracy and robustness.
[0062] Furthermore, the expression of the water quality detection model is:
[0063]
[0064] Where: Φ(θ) represents the evaluation function of the overall model performance during the cross-validation process; K is the number of folds in the cross-validation, which is used to ensure the generalization ability of the model on different subsets; γ is the normalization function to ensure that the influence of different batches of data is balanced; ω i It is based on the weight of the importance of data features to adjust the influence of each feature in model training; Is the loss function, which measures the predicted value of the k-th data compromise the i-th sample and the true value The error between them; R(θ) is the regularization term, which is used to control the complexity of the model and prevent overfitting; λ is the regularization coefficient, which adjusts the influence of the regularization term.
[0065] Specifically, by setting different weights ω for each detection parameter i , the model can take into account the different importance of each parameter to water quality assessment, which enables the model to optimize those parameters that have a greater impact on water quality while ensuring that all parameters are properly considered; the design of the loss function L requires the model to minimize the total error of all parameter predictions, ensuring the high accuracy of the model in multi-parameter detection; by introducing regularization terms, the model avoids over-reliance on certain data features that may be noise during training, thereby enhancing its predictive ability on new and unseen data; by training and testing on different data subsets, cross-validation ensures that the model remains stable under various data conditions, prevents overfitting, and ensures that the model performs well in a variety of water quality environments;
[0066] The ideal range of Φ(θ) is close to 0, indicating that the model has high prediction accuracy and the complexity is effectively controlled. When the value of Φ(θ) is high, it may mean that the model performs poorly on a specific data fold or is too complex.
[0067] S3. Optimization of the water quality detection model: In actual use, the instrument continuously collects water quality data and inputs it into the water quality detection model for analysis in real time. Based on the feedback from the model output, the detection algorithm parameters (such as detection threshold and sampling frequency) are adjusted. This enables the equipment to dynamically adjust based on real-time data, optimize detection performance, and improve the adaptability and accuracy of the detection process.
[0068] Furthermore, the optimized water quality detection model expression is:
[0069]
[0070] where Θ new (t) and Θ old (t) represents the model parameters before and after the update at time t; α is the learning rate, which controls the speed of parameter update; K is the number of folds in cross-validation, which ensures the performance of the model on different subsets; is the gradient of the loss function on the k-th fold data with respect to the parameter Θ; L k is the loss function on the k-th fold data, which is used to measure the performance of the model on this fold data; X k ,Y k represent the input data and label of the k-th fold respectively; R is the regularization function, which is used to control the complexity of the model and prevent overfitting; λ is the regularization coefficient, which is used to adjust the influence of the regularization term.
[0071] It should be noted that Θ new The ideal value of (t) should be close to the actual model parameters so that the loss function L k Reaching the minimum indicates that the model has high accuracy and excellent generalization performance.
[0072] S4. Abnormal detection and response mechanism: Set up an abnormal detection mechanism. When the detected water quality parameters are abnormal (such as heavy metals suddenly exceeding the standard), the system automatically increases the sampling and analysis frequency. The abnormal situation triggers additional data recording and alarm systems to remind users to take specific measures.
[0073] Furthermore, a safety threshold L is set for each parameter (such as pH value, dissolved oxygen, turbidity and heavy metal content). i and U i , respectively represent the lower and upper safety thresholds of the parameter. When the parameter value exceeds this range, it is considered an abnormal state; set is the detection value of the i-th parameter at time t. Anomaly detection can be performed using the following formula:
[0074]
[0075] in, Indicates that an abnormality is detected, and 0 indicates normal.
[0076] Furthermore, when any parameter anomalies are detected, the system will automatically execute the following response measures: Under normal circumstances, water quality monitoring may be conducted once an hour. If an anomaly is detected, the system can automatically adjust to once every 15 minutes to closely monitor water quality conditions; in the event of an anomaly, the system will trigger additional data logging functions to record detailed information such as the time of occurrence, duration, parameter values, etc. At the same time, the system will notify relevant personnel through the alarm system or automatically initiate pre-set emergency response procedures.
[0077] It should be noted that through real-time monitoring and immediate response to anomalies, the system can quickly identify potential risks and prevent problems from escalating; increased data collection and detailed records provide more information for analyzing and diagnosing the causes of problems, making future decisions more accurate and effective; an effective anomaly response mechanism increases users' confidence in water quality safety while reducing health risks that may be caused by water quality problems.
[0078] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein with equivalents. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A portable water quality detector, characterized in that: The invention comprises an instrument body, wherein the end of the instrument body (10) is provided with a connecting piece (20), a detection probe (30) is mounted on the connecting piece (20), a display unit (80) is fixedly mounted on the instrument body (10), a tensioning screw (120) is mounted on the connecting piece (20), an abutment unit (60) is arranged on the instrument body (10), a safety locking unit (70) is arranged at a position adjacent to the abutment unit (60), a hanging unit (90) is arranged on the connecting piece (20), a clamping recess (40) is provided on the instrument body (10), an extension portion (50) is arranged on the detection probe (30), a sealing end (130) is fixedly connected to one end of the instrument body (10) away from the connection, an assembly groove is arranged in the clamping recess (40) on the instrument body (10), and a safety locking unit (70) is arranged in the clamping recess (40) 40) is also provided with a battery assembly port, a power supply module (100) is installed at the battery assembly port on the instrument body (10), the power supply module (100) is a battery, and a toggle switch (110) is provided on one side of the battery assembly port on the instrument body (10), the instrument body (10) and the connecting member (20) are connected by a snap-fit manner, the display unit (80) includes an external display screen (140), an adjustment button (150) is installed near the external display screen (140), a reset button (160) is provided on the display unit (80), and the reset button (160) is located below the adjustment button (150), and a mode switching module (170) is provided at the lower end of the instrument body (10), and a mode switching button (180) is installed on the mode switching module (170); The safety locking unit (70) comprises a square piece (71), a square assembly piece (72), a fixing belt (73), a circular assembly groove (74), a flat head fixing piece (75), a limit opening (76) and a magnet (77); the square piece (71) is fixedly arranged on one end of the instrument body (10) away from the connecting piece (20); the magnet (77) is firmly arranged on the square piece (71); the square piece (71) and the square assembly piece (72) are fixedly connected; the fixing belt (73) is fixedly arranged on the square assembly piece (72); and the square piece (71), the square assembly piece (72) and the fixing belt (73) are assembled on the instrument body (10). In the assembly groove on the instrument body (10), the circular assembly groove (74) is opened on the square assembly part (72), the flat head fixing part (75) is assembled in the circular assembly groove (74) on the square assembly part (72), and is connected to the instrument body (10) in a threaded manner, the square assembly part (72) is fixed to the assembly groove on the instrument body (10) through the flat head fixing part (75), the square part (71) is fixed to the instrument body (10) through the square assembly part (72), the limiting opening (76) is opened on the square part (71), and the magnet (77) is clamped in the limiting opening (76) on the square part (71).
2. The portable water quality detector according to claim 1, characterized in that: The invention comprises a shock absorbing unit, wherein the shock absorbing unit comprises a support rod (61), a receiving groove (62), a connecting rod (63), a columnar shock absorbing member (64) and a spiral beryllium copper wire (65), wherein the support rod (61) is installed on the instrument body (10), the columnar shock absorbing member (64) is arranged on the support rod (61), the support rod (61) is installed in a circular groove, the receiving groove (62) is opened on the support rod (61), and the connecting rod (63) is firmly fixed to the support rod (61). The cylindrical shock absorbing member (64) is arranged in the receiving groove (62) of the support rod (61), the bottom of the cylindrical shock absorbing member (64) is located in the receiving groove (62) of the support rod (61), and the bottom of the cylindrical shock absorbing member (64) is sleeved on the connecting rod (63), and the spiral beryllium copper wire (65) is sleeved on the connecting rod (63) in the receiving groove (62), one end of the spiral beryllium copper wire (65) is connected to the bottom of the receiving groove (62), and the other end is connected to the lower end surface of the cylindrical shock absorbing member (64).
3. The portable water quality detector according to claim 1, characterized in that: The invention comprises a hook unit, wherein the hook unit comprises a joint block (91), an elastic sleeve (92), a penetration hole (93), an elastic rope (94) and a connecting frame (95), wherein the elastic sleeve (92) is arranged on the joint block (91), the elastic rope (94) is arranged on the elastic sleeve (92), the joint block (91) is installed on a connecting piece (20), the penetration hole (93) is opened on the elastic sleeve (92), the elastic rope (94) is passed through the penetration hole (93) on the elastic sleeve (92), and the connecting frame (95) is installed on the elastic rope (91). 4), the connecting frame (95) comprises a connecting head (951), a connecting tail (952), a thread connection hole (953) and a thread connection joint (954); the connecting head (951) and the connecting tail (952) are fixedly arranged at the head of the elastic rope (94); the thread connection hole (953) is provided on the connecting head (951), and the thread connection joint (954) is provided on the connecting tail (952); and the connecting head (951) and the connecting tail (952) are combined and fixed by a thread connection method between the thread connection hole (953) and the thread connection joint (954).
4. The detection method based on the portable water quality detector according to any one of claims 1 to 3, characterized in that: The technical steps include: Data collection and preliminary processing: Collect water quality data from different water sources and pre-process the collected data; Build a water quality detection model: select a suitable machine learning model, train the model based on the collected data, and use cross-validation and other techniques to optimize model parameters to ensure the generalization ability of the model on different water source data; Optimization of water quality detection model: The instrument continuously collects water quality data and inputs it into the water quality detection model for analysis in real time. The detection algorithm parameters are adjusted according to the feedback output by the model; Abnormal detection and response mechanism: When the detected water quality parameters are abnormal, the system automatically increases the sampling and analysis frequency. The abnormal situation triggers additional data recording and alarm systems to remind users to perform specific processing.
5. The detection method of the portable water quality detector according to claim 4, characterized in that: Set y i (t) is the filtering output of the i-th parameter, and the formula of the adaptive filter is expressed as follows: b ijk (t+1)=b ijk (t)+μ·e i (t)·x j (t-k) e i (t)=d i (t)-y i (t) Where n is the total number of monitored parameters, which is 4 here; m is the maximum value of the time delay considered; b ijk (t) is the filter coefficient at time t, which is the effect of parameter j on parameter i; e i (t) is the estimated error of the i-th parameter at time t; d i (t) is the target value or reference value of the i-th parameter; μ is the learning rate, which controls the speed of adjusting the filter coefficients.
6. The detection method of the portable water quality detector according to claim 4, characterized in that: The expression of water quality detection model is: Where: Φ(θ) represents the evaluation function of the overall model performance during the cross-validation process; K is the fold number in the cross-validation, which is used to ensure the generalization ability of the model on different subsets; γ is the normalization function to ensure that the impact of different batches of data is balanced; ω i It is based on the weight of the importance of data features, adjusting the influence of each feature in model training; is the loss function, which measures the predicted value of the k-th data compromised with the i-th sample With the true value The error between them; R(θ) is the regularization term, which is used to control the complexity of the model and prevent overfitting; λ is the regularization coefficient, which adjusts the influence of the regularization term.
7. The detection method of the portable water quality detector according to claim 4, characterized in that: The optimized water quality detection model expression is: where Θ new (t) and θ old (t) represents the model parameters before and after the update at time t; α is the learning rate, which controls the speed of parameter update; K is the number of folds in cross-validation, which ensures the performance of the model on different subsets; is the gradient of the loss function on the k-th fold data with respect to the parameter Θ; L k is the loss function on the k-th fold data, which is used to measure the performance of the model on this fold data; X k ,Y k They represent the input data and label of the kth fold respectively; R is the regularization function, which is used to control the complexity of the model and prevent overfitting; λ is the regularization coefficient, which is used to adjust the influence of the regularization term.
8. The detection method of the portable water quality detector according to claim 4, characterized in that: set up is the detection value of the i-th parameter at time t. Anomaly detection can be performed using the following formula: in, Indicates that an abnormality is detected, and 0 indicates normal.
Citation Information
Patent Citations
Multimedia system monitoring method and system based on data analysis
CN116955092A
AI-based direct drinking water quality monitoring method
CN117235661A
Method for monitoring wastewater quality of industrial enterprise
CN117665231A
Water environment monitoring and intelligent early warning system
CN117973613A
Multi -parameter water quality testing appearance
CN206420865U
