Method for automatically testing metering function of water meter
By building an image acquisition hardware system and a ResNet model image recognition system, automated testing of water metering function is realized, solving the problems of inefficiency and artificial error of traditional detection methods, and improving the detection efficiency and reliability of results.
Patent Information
- Application Number
- CN202510333463.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-20
AI Technical Summary
Traditional water meter factory inspection methods rely on manual operation, are inefficient, long-term, prone to human errors, and have high requirements for human resource investment.
An image acquisition hardware system and ResNet model are used to build an image recognition system. By recording the working status of the water meter in real time, transmitting data to the image recognition system, identifying and judgment, and comparing it with the actual water pump flow data, and issuing a test report.
The automatic testing of the water meter metering function has been realized, which improves the detection efficiency, reduces human error, reduces human resource investment, and makes the detection results more objective and credible.
Smart Images

Figure CN120176803A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water meter detection, and particularly relates to an automatic test method for the metering function of a water meter. Background Art
[0002] With the rapid development of technology and the acceleration of the intelligentization process, the water meter, as an indispensable metering device in daily life and industrial production, its metering accuracy and reliability are of great significance for water resource management, trade settlement, and energy conservation and emission reduction. The traditional factory inspection method of water meters mainly relies on manual operation, which is not only inefficient and time-consuming, but also prone to human errors in a large number of repetitive tests, and at the same time has high requirements for human resource input.
[0003] In recent years, the remarkable progress of deep learning and computer vision technologies has provided new ideas for solving this problem. Especially the image recognition system based on the Residual Network (ResNet) architecture has achieved breakthrough results in many image processing tasks. Its excellent feature extraction ability and deep learning ability have greatly improved the automatic recognition accuracy. However, in the field of automatic testing of water meter metering functions, these advanced technologies have not been fully applied. Therefore, we propose an automatic test method for the metering function of a water meter. Summary of the Invention
[0004] The main purpose of the present invention is to provide an automatic test method for the metering function of a water meter, which can effectively solve the problems in the background art.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows: An automatic test method for the metering function of a water meter, comprising the following steps: S1: Construct an image acquisition hardware system and perform preliminary preparation work on the water meter; S2: Use various existing historical data to construct an image recognition system; S3: Start the corresponding water pump at the water meter end and synchronously start the image acquisition hardware system to record the working state of the water meter in real time; S4: Transmit the recorded data into the image recognition system to obtain the system recognition and judgment result; S5: Compare the judgment result with the actual water pump flow data and issue a test report.
[0006] Preferably, in the S1, the image acquisition hardware system includes an industrial camera, an image sensor, a light source, an image acquisition card, image preprocessing hardware, and a storage device.
[0007] Preferably, the image sensor is a CMOS image sensor, the image acquisition card is a GigE Vision interface digital image acquisition card, the image preprocessing hardware is an ISP chip, and the storage device is a high-speed solid-state drive.
[0008] Preferably, in the step S2, the steps of constructing the image recognition system include: S201: Dataset preparation; S202: Data feature extraction; S203: Model selection and training; S204: Model optimization, parameter adjustment and evaluation; S205: Model deployment and application.
[0009] Preferably, in the step S201, the steps of dataset preparation include: S2011: Collect a large amount of image data related to the target recognition task to ensure the diversity and representativeness of the dataset; S2012: Data cleaning and preprocessing, including removing image noise, standardizing image size and image color correction; S2013: Assign corresponding class labels to each image and perform detailed bounding box annotation.
[0010] Preferably, in the step S203, the selected model for the image recognition task is the ResNet model, and the ResNet model includes residual blocks, convolutional layers, batch normalization layers, activation function layers, downsampling layers, fully connected layers and global average pooling layers.
[0011] Preferably, in the step S203, the steps of model training include: S2031: Divide the preprocessed image dataset into a training set, a validation set and a test set; S2032: Use the training set to train the ResNet model and update the model parameters through the backpropagation algorithm; S2033: Regularly evaluate the model performance on the validation set to prevent overfitting and adjust the hyperparameters.
[0012] Preferably, in the step S204, the method for model optimization is the cross-validation and grid search method, the method for parameter adjustment is the early stopping strategy and the learning rate scheduling technique, and the method for model evaluation is the F1 score and the AUC-ROC curve metric evaluation.
[0013] Preferably, in the step S205, the steps of model deployment and application include: S2051: Package the trained model into an API and embed it into the application program; S2052: Predict the newly acquired real-time data and provide real-time feedback or an offline analysis report according to requirements.
[0014] In step S3 and step S5, the content of the inspection report includes: the indicated flow rate of the dial hand, the real-time flow rate of the water pump, the relative error result, the error range evaluation result, and product suggestions.
[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. By constructing an image acquisition hardware system and adopting various advanced image acquisition devices, the acquired image data of the present invention is more reliable. A dedicated water meter test bench is built to inspect each newly produced water meter, avoiding the uncertainty of results brought by sampling inspection, further checking the product quality. At the same time, various devices are connected in an orderly manner to jointly serve the image acquisition task, improving the overall work efficiency and reducing the interference of hardware errors for subsequent intelligent recognition.
[0016] 2. The present invention uses the ResNet model to build an image recognition system. Compared with general models, the ResNet model can, to a certain extent, solve the problem of gradient disappearance, can be used to train deeper networks, and can avoid degradation problems to a certain extent. It also has good modular characteristics, which is convenient for testers to build different types of networks, further improving the overall generalization of the model, being more intelligent, not requiring manual intervention, and minimizing the labor burden to achieve the purpose of automatic testing.
[0017] 3. The present invention can issue a specific inspection report according to the evaluation result of the final model, enabling each water meter to obtain specific improvement suggestions, continuously iterating the product quality of the water meter, enhancing the product competitiveness, and avoiding the interference of human subjective factors at the same time, making the results more objective and credible. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flowchart of an automatic testing method for the water meter metering function of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0019] In order to make the technical means, creative features, achieved purposes, and functions of the present invention easy to understand, the present invention will be further described below in conjunction with specific embodiments.
[0020] Embodiment As Figure 1 shown, an automatic testing method for the water meter metering function includes the following steps: S1: Construct an image acquisition hardware system and perform preliminary preparation work for the water meter; Among them, the image acquisition hardware system includes an industrial camera, an image sensor, a light source, an image acquisition card, image preprocessing hardware, and a storage device.
[0021] Among them, the image sensor is a CMOS image sensor, the image acquisition card is a GigE Vision interface digital image acquisition card, the image preprocessing hardware is an ISP chip, and the storage device is a high-speed solid-state hard drive.
[0022] S2: Construct an image recognition system using various existing historical data; Among them, the steps of constructing the image recognition system include: S201: Dataset preparation; Among them, the steps of the dataset preparation include: S2011: Collect a large amount of image data related to the target recognition task to ensure the diversity and representativeness of the dataset; S2012: Data cleaning and preprocessing, including removing image noise, normalizing image size, and image color correction; S2013: Assign corresponding class labels to each image and perform detailed bounding box annotation.
[0023] S202: Data feature extraction; S203: Model selection and training; Among them, the model selection is to select the ResNet model for the image recognition task. The ResNet model includes residual blocks, convolutional layers, batch normalization layers, activation function layers, downsampling layers, fully connected layers, and global average pooling layers.
[0024] Among them, the steps of the model training include: S2031: Divide the preprocessed image dataset into a training set, a validation set, and a test set; S2032: Use the training set to train the ResNet model and update the model parameters through the backpropagation algorithm; S2033: Regularly evaluate the model performance on the validation set to prevent overfitting and adjust the hyperparameters.
[0025] S204: Model optimization, parameter adjustment, and evaluation; Among them, the method of model optimization is the cross-validation and grid search method, the parameter adjustment method is the early stopping strategy and learning rate scheduling technique, and the model evaluation method is the F1 score and AUC-ROC curve metrics evaluation.
[0026] S205: Model deployment and application.
[0027] Among them, the steps of the model deployment and application include: S2051: Package the trained model into an API and embed it into the application program; S2052: Predict the newly collected real-time data and provide real-time feedback or offline analysis reports according to requirements.
[0028] S3: Start the water pump corresponding to the water meter end, and simultaneously start the image acquisition hardware system to record the working state of the water meter in real time; Among them, the content of the inspection report includes: the flow rate indicated by the meter needle, the real-time flow rate of the water pump, the relative error result, the error range evaluation result, and product suggestions.
[0029] S4: Transmit the recorded data into the image recognition system to obtain the system recognition and judgment result; S5: Compare the judgment result with the actual water pump flow data and issue an inspection report.
[0030] By constructing an image acquisition hardware system and adopting various advanced image acquisition devices, the present invention makes the collected image data more reliable, and builds a special water meter test bench to inspect each newly produced water meter, avoiding the uncertainty of results brought by sampling inspection, further checking the product quality. At the same time, various devices are orderly connected to jointly serve the image acquisition task, improving the overall work efficiency and reducing the interference of hardware errors for subsequent intelligent recognition; using the ResNet model to build the image recognition system, compared with general models, the ResNet model can solve the problem of gradient disappearance to a certain extent, can be used to train deeper networks, and avoid the degradation problem to a certain extent, and has good modular characteristics, which is convenient for testers to build different types of networks, further improving the overall generalization of the model, being more intelligent, not requiring manual intervention, and minimizing the human burden to achieve the purpose of automatic testing; specific inspection reports can be issued according to the evaluation results of the final model, enabling each water meter to obtain specific improvement suggestions, continuously iterating the product quality of the water meter, enhancing the product competitiveness, and at the same time avoiding the interference of subjective human factors, making the results more objective and credible.
[0031] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for automatically testing the metering function of a water meter, characterized in that: The following steps are involved: S1: Build the image acquisition hardware system and carry out preliminary preparations for the water meter; S2: Use existing historical data to build an image recognition system; S3: Start the water pump corresponding to the water meter, and simultaneously start the image acquisition hardware system to record the working status of the water meter in real time; S4: The recorded data is transmitted to the image recognition system to obtain the system recognition result; S5: Compare the judgment result with the actual water pump flow data and issue a test report.
2. The automatic testing method for water meter measurement function according to claim 1 is characterized in that: In S1, the image acquisition hardware system includes an industrial camera, an image sensor, a light source, an image acquisition card, image preprocessing hardware and a storage device.
3. The automatic testing method for the water meter measurement function according to claim 2 is characterized in that: The image sensor is a CMOS image sensor, the image acquisition card is a GigE Vision interface digital image acquisition card, the image preprocessing hardware is an ISP chip, and the storage device is a high-speed solid-state hard disk.
4. The automatic testing method for water meter measurement function according to claim 1 is characterized in that: In S2, the step of constructing an image recognition system includes: S201: Dataset preparation; S202: data feature extraction; S203: Model selection and training; S204: Model optimization, parameter adjustment and evaluation; S205: Model deployment and application.
5. The automatic testing method for the water meter measurement function according to claim 4 is characterized in that: In S201, the step of preparing the data set includes: S2011: Collect a large amount of image data related to the object recognition task to ensure the diversity and representativeness of the dataset; S2012: Data cleaning and preprocessing, including image noise removal, image size standardization and image color correction; S2013: Label each image with a corresponding category and perform detailed bounding box annotation.
6. The automatic testing method for water meter measurement function according to claim 4 is characterized in that: In S203, the model selection is to select a ResNet model for image recognition tasks, and the ResNet model includes a residual block, a convolution layer, a batch normalization layer, an activation function layer, a downsampling layer, a fully connected layer and a global average pooling layer.
7. The automatic testing method for water meter measurement function according to claim 4 is characterized in that: In S203, the model training step includes: S2031: Divide the preprocessed image dataset into a training set, a validation set, and a test set; S2032: Use the training set to train the ResNet model and update the model parameters through the back propagation algorithm; S2033: Regularly evaluate model performance on the validation set to prevent overfitting and adjust hyperparameters.
8. The automatic testing method for water meter measurement function according to claim 4 is characterized in that: In S204, the model optimization method is a cross-validation and grid search method, the parameter adjustment method is an early stopping strategy and a learning rate scheduling technique, and the model evaluation method is an F1 score and an AUC-ROC curve indicator evaluation.
9. The automatic testing method for water meter measurement function according to claim 4, characterized in that: In S205, the steps of model deployment and application include: S2051: Encapsulate the trained model into an API and embed it into the application; S2052: Make predictions on new data collected in real time and provide real-time feedback or offline analysis reports as needed.
10. The automatic testing method for water meter measurement function according to claim 1, characterized in that: In S5, the content of the test report includes: the flow rate indicated by the needle, the real-time flow rate of the water pump, the relative error result, the error range assessment result and the product recommendation.