Smart manhole cover data analysis method, device and storage medium based on the Internet of Things
By constructing and utilizing network tuning templates, tuning and optimizing neural networks, the problems of low computational efficiency and low prediction accuracy in smart manhole cover monitoring data processing are solved, and more efficient and accurate data analysis and early warning are achieved.
Patent Information
- Application Number
- CN202411650649.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-19
AI Technical Summary
When processing smart manhole cover monitoring data, the prior art has low computing efficiency and low prediction accuracy, especially when processing serial data, it is difficult to capture the time dependence and potential patterns between the data, resulting in poor early warning effects.
By obtaining monitoring data in the smart manhole cover network, a network tuning template is constructed and the initial neural network is used for data inference and commonality measurements, the neural network is tuned and optimized to generate a more accurate representation of the smart manhole cover feature vector.
It improves the computing efficiency and prediction accuracy of smart manhole cover data analysis, enhances the ability to capture data time dependencies and patterns, thereby improving the accuracy of early warning.
Smart Images

Figure CN119155335B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a smart manhole cover data analysis method, device and storage medium based on the Internet of Things. Background Art
[0002] With the continuous advancement of smart city construction, smart manhole covers, as an important part of urban infrastructure, are becoming increasingly important for intelligent management. Smart manhole covers use built-in sensors to monitor the status of manhole covers and surrounding environmental parameters, such as water level, concentration of harmful gases, noise level, etc. in real time, providing rich data support for city managers. However, how to effectively process and analyze these massive monitoring data and accurately predict and warn the health status of sewers is still a major challenge facing the current construction of smart cities. In the existing technology, traditional data mining and machine learning methods are mostly used for the processing and analysis of smart manhole cover monitoring data. These methods often have problems of low computational efficiency and low prediction accuracy when processing large-scale, high-dimensional monitoring data. Especially when processing sequence data, traditional methods find it difficult to capture the temporal dependencies and potential patterns between data, resulting in poor warning effects. Summary of the invention
[0003] In view of this, the present invention provides a method, device and storage medium for analyzing smart manhole cover data based on the Internet of Things. The technical solution of the present invention is implemented as follows:
[0004] On the one hand, the present invention provides a smart manhole cover data analysis method based on the Internet of Things, including: obtaining a first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and based on the first monitoring data set, obtaining a second monitoring data set associated with the past smart manhole cover sequence of each sewer health state in the sewer health state set; constructing a first network adjustment template based on the second monitoring data set, performing data inference on the first network adjustment template according to an initial neural network, and obtaining the inference confidence corresponding to the shielded part in the first network adjustment template; the first network adjustment template includes a triggered adjustment template and an untriggered adjustment template; based on the initial neural network, performing commonality on the first network adjustment template and the first triggered adjustment template corresponding to the first network adjustment template to obtain a first template commonality measurement result; based on the inference confidence, the shielded part in the first network calibration template, and the first template commonality measurement result, the initial neural network is calibrated to obtain a calibrated initial neural network; based on the second monitoring data set, a second network calibration template is constructed, and based on the calibrated initial neural network, a commonality measurement is performed on the second network calibration template and the second trigger calibration template corresponding to the second network calibration template to obtain a second template commonality measurement result; the second network calibration template does not have a trigger calibration template; based on the second template commonality measurement result, the calibrated initial neural network is optimized to obtain an optimized initial neural network; the optimized initial neural network is used to generate initial coding features of the smart manhole cover.
[0005] On the other hand, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the above method when executing the program.
[0006] In yet another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps in any of the above methods when executed by a processor.
[0007] The beneficial effects of the present invention include: the present invention obtains the first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, combines the first monitoring data set corresponding to the smart manhole cover covered in the past smart manhole cover sequence of each sewer health status, and obtains the second monitoring data set corresponding to the past smart manhole cover sequence; based on the second monitoring data set, generates a first network tuning template for tuning the initial neural network and a second network tuning template for optimizing the tuned initial neural network. According to the first network tuning template, the initial neural network is tuned based on a parallel method of data reasoning and commonality measurement to obtain the tuned initial neural network. According to the second network tuning template, the tuned initial neural network is optimized based on a commonality measurement method to obtain the optimized initial neural network. Based on the above optimized initial neural network, an initialized smart manhole cover feature vector representation can be generated for the state trigger warning, and the features of the past smart manhole cover sequence can be mined in combination with the ability of the initial neural network to improve the representation quality of the smart manhole cover feature vector representation, thereby improving the accuracy of the trigger warning.
[0008] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present invention and, together with the specification, are used to explain the technical solutions of the present invention.
[0010] Figure 1 A schematic diagram of the implementation flow of a smart manhole cover data analysis method based on the Internet of Things provided in an embodiment of the present invention.
[0011] Figure 2 A hardware entity diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0013] The embodiment of the present invention provides a method for analyzing smart manhole cover data based on the Internet of Things, which can be executed by a processor of a computer device, wherein the computer device can refer to a device with data processing capabilities such as a server, a laptop, a tablet computer, a desktop computer, a mobile device, etc. Figure 1A schematic diagram of the implementation process of a smart manhole cover data analysis method based on the Internet of Things provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0014] Step S100: Obtain a first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and based on the first monitoring data set, obtain a second monitoring data set associated with the past smart manhole cover sequence of each sewer health status in the sewer health status set.
[0015] Step S100 collects and processes a large amount of monitoring data from the smart manhole cover network to construct a basic data set for subsequent analysis. The computer device obtains a first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network. The smart manhole cover network is a network composed of multiple smart manhole covers distributed in different geographical locations. Each smart manhole cover is equipped with various sensors for real-time monitoring of various parameters of the manhole cover and its surrounding environment. These parameters include but are not limited to water flow monitoring data (such as water level height, water flow speed), harmful gas monitoring data (such as hydrogen sulfide concentration, methane concentration) and noise monitoring data (such as abnormal sounds under the manhole cover, pipeline leakage, etc.).
[0016] Taking water flow monitoring data as an example, a smart manhole cover may report the following water level data: [0.5m, 0.6m, 0.7m, ...], which indicates the water level measured at different time points. Similarly, harmful gas monitoring data may include a time series of hydrogen sulfide concentration: [5ppm, 6ppm, 5ppm, ...], which indicates the change of hydrogen sulfide concentration over time. Noise monitoring data may be a series of audio signal sampling values, representing the noise level of the environment near the manhole cover.
[0017] The computer device integrates these different types of data according to the smart manhole cover to form a comprehensive first monitoring data set. For each smart manhole cover, an example of this set is: Smart manhole cover 1: {water flow monitoring data: [0.5, 0.6, 0.7, ...], harmful gas monitoring data: [5, 6, 5, ...], noise monitoring data: [audio_sample1, audio_sample2, ...]}; Smart manhole cover 2: {water flow monitoring data: [0.4, 0.5, 0.6, ...], harmful gas monitoring data: [4, 5, 4, ...], noise monitoring data: [audio_sample3, audio_sample4,...]}...
[0018] Next, the computer device further obtains past smart manhole cover sequences associated with each sewer health state in the sewer health state set based on these first monitoring data sets. The sewer health state set may include multiple states, such as "normal", "slightly blocked", "severely blocked", "gas leak", etc. Each state corresponds to a set of smart manhole cover sequences that have triggered the state in the past. These sequences are arranged in chronological order and record the smart manhole covers that triggered specific health states at different time points.
[0019] For example, for the "slightly blocked" state, the past sequence of smart manhole covers may include smart manhole cover A, smart manhole cover B, and smart manhole cover C, which triggered the "slightly blocked" state at time points T1, T2, and T3, respectively. The triggered state means that these manhole covers detected abnormal data at the corresponding time point, such as abnormally high water levels, excessive concentrations of harmful gases, or abnormal noise. The computer device finds these smart manhole covers that have triggered specific health states and collects their first monitoring data set when they are in the triggered state. For the "slightly blocked" state, assuming that smart manhole cover A is triggered at time point T1, the computer device will extract the first monitoring data of smart manhole cover A near time point T1. These data will constitute part of a second monitoring data set associated with the "slightly blocked" state.
[0020] To illustrate more specifically, assume that the first monitoring data of smart manhole cover A at time point T1 is as follows: Smart manhole cover A (time point T1): {water flow monitoring data: [0.8, 0.9, 1.0, ...], harmful gas monitoring data: [7, 8, 9,...], noise monitoring data: [audio_sample5, audio_sample6, ...]}
[0021] The computer device will similarly collect the first monitoring data of smart manhole cover B at time point T2 and the smart manhole cover C at time point T3, and combine these data with the data of smart manhole cover A into a complete second monitoring data set specifically for analyzing the "mild blockage" state.
[0022] This process is repeated for each state in the sewer health state set, and multiple second monitoring data sets are finally obtained, each set corresponding to a specific sewer health state. These sets will serve as the basis for subsequent analysis to help the computer device understand and predict the occurrence patterns and triggering factors of different health states.
[0023] When constructing the second monitoring data set, the computer device may also apply some data preprocessing techniques to improve data quality. For example, for noise monitoring data, the computer device may use audio processing technology to extract key features (such as audio energy, spectrum distribution, etc.) to better characterize abnormal sounds under the manhole cover. For water flow and harmful gas monitoring data, the computer device may perform denoising, smoothing or normalization processing to reduce the impact of measurement errors and outliers.
[0024] Step S200: construct a first network calibration template based on the second monitoring data set, perform data inference on the first network calibration template according to the initial neural network, and obtain the inference confidence corresponding to the shielded part in the first network calibration template; the first network calibration template includes a triggered calibration template and an untriggered calibration template.
[0025] Step S200 uses the second monitoring data set to construct a first network calibration template, and performs data inference on the template through the initial neural network to evaluate the model's prediction ability for unknown (or shielded) data. First, the computer device constructs a first network calibration template based on the second monitoring data set. This template is composed of multiple data segments, each of which corresponds to the monitoring data of a smart manhole cover when it triggers or does not trigger the health status of the sewer at a specific time point. These data segments are called calibration templates, which together form the basis of the first network calibration template.
[0026] The first network calibration template includes two types of calibration templates: triggered calibration templates and untriggered calibration templates. The triggered calibration template is composed of data fragments of smart manhole covers that have triggered a specific sewer health state in the past. For example, if a smart manhole cover triggers a "slightly blocked" state at time point T1, the monitoring data of the manhole cover at time point T1 (including water flow, harmful gas and noise monitoring data) will be used as part of the triggered calibration template. The untriggered calibration template is composed of data fragments of smart manhole covers that have not triggered any sewer health state in the past. These data fragments provide background information about the "normal" or "non-abnormal" state, which helps the neural network learn how to distinguish between normal and abnormal states. When constructing the first network calibration template, the computer device can perform some preprocessing on the data fragments to improve the quality and consistency of the data. For example, it can normalize the data so that the values of different monitoring parameters are at the same order of magnitude; or smooth the data to reduce the impact of noise and outliers.
[0027] Next, the computer device loads the first network calibration template into the initial neural network and infers the data in the template. The initial neural network is a pre-trained model that has certain data processing and pattern recognition capabilities. In this step, the task of the neural network is to predict the shielded part in the first network calibration template.
[0028] The masked parts are those data segments that are intentionally hidden or not provided. For example, in a trigger adjustment template, the computer device can intentionally hide a part of the water flow monitoring data or noise monitoring data, and then let the neural network predict the hidden data based on the remaining data. This process is similar to giving the neural network a "fill in the blanks" question and letting it infer the missing part based on contextual information.
[0029] In order to evaluate the predictive ability of the neural network, the computer device calculates the inference confidence. Inference confidence is an indicator to measure the accuracy of the neural network's predictions. It indicates the degree of confidence that the neural network has in its prediction results. The higher the inference confidence, the more reliable the prediction of the neural network; conversely, it means that there may be greater uncertainty in the prediction.
[0030] There are many ways to calculate the confidence of inference, and one common method is to use the softmax function. The softmax function can convert the output of the neural network into a probability distribution, where each probability value represents the confidence of the corresponding category. For the prediction task of the masked part, the softmax function can help the computer device calculate the prediction probability of the neural network for each possible data value and select the value with the highest probability as the prediction result.
[0031] Suppose that a neural network predicts the water flow monitoring data of a shielded part and outputs a vector containing multiple predicted values. This vector can be expressed as: [0.1, 0.2, 0.7, 0.0]. Each value represents the predicted probability of the corresponding water flow monitoring data value. In this example, 0.7 is the maximum value, so the computer device will select the data value corresponding to 0.7 as the prediction result and use 0.7 as the inference confidence. In some cases, the neural network can give wrong prediction results and high confidence due to data noise, model overfitting or other reasons. Therefore, in practical applications, the computer device usually combines multiple indicators (such as inference confidence, cross-validation results, etc.) to comprehensively evaluate the performance of the neural network and make necessary adjustments and optimizations.
[0032] Step S300: Based on the initial neural network, commonality measurement is performed on the first network calibration template and the first trigger calibration template corresponding to the first network calibration template to obtain a first template commonality measurement result.
[0033] Step S300 uses the initial neural network to measure the commonality of the first network adjustment template and its corresponding first trigger adjustment template to evaluate the similarity and correlation between them.
[0034] Initial neural network: This is a pre-trained model with certain data processing and pattern recognition capabilities. In step S200, this model has been used to perform data inference on the shielded part in the first network calibration template.
[0035] First network tuning template: This is a collection of multiple data segments, each of which corresponds to the monitoring data of a smart manhole cover when it triggers or does not trigger the health status of the sewer at a specific time point. These data segments are used as input to the neural network for subsequent data reasoning and commonality measurement.
[0036] First trigger tuning template: This is another template associated with the first network tuning template, which consists of data fragments of smart manhole covers that have triggered a specific sewer health state. Compared with the first network tuning template, the first trigger tuning template focuses more on the manhole cover data that have triggered the health state. In step S300, the computer device first loads the first network tuning template and the first trigger tuning template into the initial neural network. Then, it uses the neural network to extract features from these templates and convert the original high-dimensional data into a low-dimensional feature vector representation. These feature vectors can capture the key information in the data while reducing the dimensionality of the data for subsequent calculations and analysis. The feature extraction process maps the original data into a new feature space. In this new feature space, similar data points are clustered together to form different feature clusters. These feature clusters represent different categories or patterns in the data.
[0037] Next, the computer device performs commonality measurement on the extracted feature vectors. Commonality measurement is a method for evaluating the similarity between two or more data sets. In this context, it is used to evaluate the correlation between the first network calibration template and the first trigger calibration template.
[0038] There are many specific methods for commonality measurement. One common method is to calculate the cosine similarity between two feature vectors. Cosine similarity is an indicator that measures the similarity of the directions of two vectors. Its value range is between [-1, 1]. When the directions of the two vectors are exactly the same, the cosine similarity is 1; when the directions of the two vectors are completely opposite, the cosine similarity is -1; when the two vectors are orthogonal, the cosine similarity is 0.
[0039] In practical applications, the computer device can calculate the cosine similarity between multiple feature vector pairs and take the average value as the first template commonality measurement result. This result can reflect the overall similarity between the first network adjustment template and the first trigger adjustment template in the feature space.
[0040] In addition to cosine similarity, there are other methods that can be used for commonality measurement, such as Euclidean distance, Manhattan distance, Pearson correlation coefficient, etc. These methods have their own advantages and disadvantages and are suitable for different application scenarios and data types. In actual operation, the computer device will select the most appropriate commonality measurement method according to the specific situation.
[0041] Through the commonality measurement process of step S300, the computer device can evaluate the similarity and correlation between the first network calibration template and the first trigger calibration template. This information is crucial for subsequent model calibration and optimization. If the commonality measurement result between the two templates is high, it means that the data distribution and pattern between them are relatively consistent, which may mean that the neural network has learned the characteristics of these data well. Conversely, if the commonality measurement result is low, it may be necessary to further adjust the parameters or structure of the neural network to improve its performance.
[0042] Step S400: Based on the inference confidence, the shielded part in the first network calibration template, and the first template commonality measurement result, the initial neural network is calibrated to obtain the calibrated initial neural network.
[0043] Step S400 adjusts the initial neural network based on multiple key indicators to improve its ability to process smart manhole cover monitoring data. In step S200, the computer device uses the initial neural network to perform data inference on the shielded part in the first network calibration template and calculates the inference confidence. The inference confidence is an important indicator to measure the accuracy of the neural network's prediction of unknown data, which reflects the degree of confidence of the neural network in the prediction result. In step S300, the computer device performs commonality measurement on the first network calibration template and the first trigger calibration template, and obtains the first template commonality measurement result. This result measures the similarity and correlation between the two templates in the feature space, and provides important reference information for the calibration of the neural network. In step S400, the computer device first comprehensively considers the inference confidence and the first template commonality measurement result. If the inference confidence is high, it means that the neural network predicts the shielded part more accurately, which usually means that the parameter setting of the neural network is more reasonable and does not need to be adjusted significantly. However, if the inference confidence is low, it may mean that the neural network has difficulties in processing certain types of data and its parameters need to be adjusted. At the same time, the first template commonality measurement result also provides important information. If the commonality measurement result is high, it means that the distribution of the first network tuning template and the first trigger tuning template in the feature space is relatively consistent, which usually means that the neural network has learned the characteristics of these data well. However, if the commonality measurement result is low, it may mean that the neural network has deviations when processing certain types of data, and its parameters need to be fine-tuned to improve performance.
[0044] Based on these considerations, the computer device will adjust the initial neural network. The adjustment process usually includes the following steps:
[0045] 1. Parameter adjustment: The computer device will adjust the parameters of the neural network based on the inference confidence and commonality measurement results. This includes the setting of hyperparameters such as learning rate, weight decay, batch size, and the updating of weights of each layer of the neural network. By adjusting these parameters, the computer device can change the training process of the neural network to better adapt it to the characteristics of smart manhole cover monitoring data.
[0046] 2. Weight update: Based on the parameter adjustment, the computer device will update the weight of the neural network. This is usually achieved through the back propagation algorithm, which updates the weight of the neural network layer by layer according to the prediction error and gradient information of the neural network. Through multiple iterations of this process, the neural network can gradually learn the inherent laws and characteristics of the data.
[0047] 3. Model verification: During the tuning process, the computer device will periodically verify the performance of the neural network. This is usually achieved by using a portion of the data as a validation set, and the data in the validation set will not participate in the training process of the neural network. By calculating performance indicators on the validation set (such as accuracy, recall, F1 score, etc.), the computer device can evaluate the generalization ability of the neural network and adjust the tuning strategy accordingly.
[0048] 4. Tuning stop conditions: In order to avoid overfitting and waste of computing resources, the computer device will set some tuning stop conditions. For example, when the performance indicators on the validation set no longer improve, or when the tuning process reaches a preset number of iterations, the computer device will stop the tuning process and save the tuned neural network model.
[0049] During the tuning process, the computer device can also apply some advanced techniques to optimize the performance of the neural network. For example, it can use regularization techniques to prevent overfitting, or use dropout techniques to reduce the neural network's dependence on specific data points. In addition, it can also use transfer learning technology to migrate pre-trained neural network models to smart manhole cover data analysis tasks to accelerate the training process and improve the performance of the model.
[0050] Through the adjustment process of step S400, the computer device can improve the performance of the initial neural network to better adapt it to the characteristics of the smart manhole cover monitoring data. The adjusted neural network model will have stronger generalization ability and higher prediction accuracy, providing strong support for subsequent smart manhole cover data analysis tasks.
[0051] Step S500: construct a second network tuning template based on the second monitoring data set, and based on the tuned initial neural network, perform commonality measurement on the second network tuning template and the second trigger tuning template corresponding to the second network tuning template to obtain a second template commonality measurement result; the second network tuning template does not have a trigger tuning template.
[0052] Step S500 further refines the optimization process of the neural network by constructing a second network tuning template and performing commonality measurement to evaluate and optimize the tuned initial neural network. The execution subject of this step is still a computer device, which uses complex data processing and machine learning technology to complete the task.
[0053] In step S400, the computer device has adjusted the initial neural network based on the inference confidence, the shielded part in the first network adjustment template, and the first template commonality measurement result, and obtained a neural network model with better performance. Now, this adjusted neural network will be used to construct and optimize the second network adjustment template.
[0054] At the beginning of step S500, the computer device first constructs a second network calibration template based on the second monitoring data set. Unlike the first network calibration template, the second network calibration template does not include a trigger calibration template, that is, it does not include the smart manhole cover data that has triggered a specific sewer health state. Instead, the second network calibration template focuses on the smart manhole cover data that has not triggered a health state, and their monitoring data changes at different time points.
[0055] The process of constructing the second network calibration template is similar to that of constructing the first network calibration template, but the focus is different. The computer device extracts the smart manhole cover data fragments that have not triggered the health state from the second monitoring data set and organizes these data fragments in time series. Then, it adds indicator marks to these data fragments, which are used to indicate the beginning of the data sequence or the location of specific data, thereby helping the neural network better understand the data structure and context information.
[0056] Next, the computer device loads the second network calibration template into the calibrated initial neural network and performs feature extraction on the data in the template. Feature extraction is an important step in machine learning, which helps the neural network better understand and process data by converting raw data into more meaningful feature vectors. In this process, the computer device can use convolutional neural networks (CNNs), recurrent neural networks (RNNs), or other types of neural network structures to extract spatial or temporal features of the data.
[0057] After feature extraction, the computer device measures the commonality of the second network calibration template and the corresponding second trigger calibration template. The second trigger calibration template is constructed based on the second network calibration template, but it contains the smart manhole cover data fragments of the trigger health state associated with the second network calibration template. Although these data fragments are not directly included in the second network calibration template, they have potential relevance and similarity with the data in the template.
[0058] Commonality measurement is a process of evaluating the similarity between two data sets. In step S500, the computer device may use cosine similarity, Euclidean distance, Pearson correlation coefficient or other measurement methods to calculate the similarity between the second network calibration template and the second trigger calibration template. These measurement methods have their own advantages and disadvantages and are suitable for different application scenarios and data types. In actual operation, the computer device may calculate the cosine similarity between multiple feature vector pairs and take the average value as the second template commonality measurement result. This result can reflect the overall similarity between the second network calibration template and the second trigger calibration template in the feature space. After obtaining the second template commonality measurement result, the computer device optimizes the adjusted initial neural network based on this result. The goal of the optimization is to further improve the neural network's ability to understand and process the smart manhole cover data that has not triggered a healthy state. This may involve adjusting the parameters, structure or training methods of the neural network.
[0059] Specifically, the computer device may adjust the weights and biases of the neural network based on the second template commonality measurement result to make it better fit the data distribution in the second network calibration template. At the same time, it may also improve the architecture and training process of the neural network by adding additional hidden layers, changing activation functions, or adjusting learning rates.
[0060] In addition, the computer device can also use cross-validation and other techniques to evaluate the performance of the optimized neural network. Cross-validation is a method of dividing a data set into multiple subsets and performing training and validation separately. It can help the computer device more accurately evaluate the generalization ability of the neural network. Through the execution of step S500, the computer device can further optimize the adjusted initial neural network so that it performs better when processing smart manhole cover data that has not triggered a healthy state. This not only improves the accuracy and robustness of the neural network, but also provides more reliable support for subsequent smart manhole cover data analysis tasks.
[0061] Step S600: Optimize the calibrated initial neural network based on the commonality measurement result of the second template to obtain an optimized initial neural network; the optimized initial neural network is used to generate initial coding features of the smart manhole cover.
[0062] Step S600 further optimizes the adjusted initial neural network to generate more accurate and useful initial coding features of smart manhole covers. The execution subject of this step is a computer device, which fine-tunes the neural network by comprehensively applying the commonality measurement results of the second template and other relevant information, thereby improving its ability to process and analyze smart manhole cover data.
[0063] In step S500, the computer device has constructed a second network calibration template based on the second monitoring data set, and has performed commonality measurement on the second network calibration template and the second trigger calibration template, thereby obtaining a second template commonality measurement result. This result reflects the similarity and correlation between the second network calibration template and the second trigger calibration template in the feature space, and provides an important reference for further optimization of the neural network.
[0064] In step S600, the computer device will use the second template commonality measurement result to optimize the adjusted initial neural network. The goal of the optimization is to improve the neural network's ability to understand and process smart manhole cover data, so that it can more accurately generate the initial coding features of smart manhole covers. These features will be used in subsequent data analysis and early warning tasks to provide strong support for smart city management.
[0065] The optimization process usually includes the following steps:
[0066] 1. Analyze the second template commonality measurement results: The computer device first analyzes the second template commonality measurement results to understand the similarities and differences between the second network calibration template and the second trigger calibration template. This will help determine where the neural network performs well and where improvements are needed.
[0067] 2. Adjust the parameters of the neural network: Based on the analysis results, the computer device will adjust the parameters of the neural network. This may include the setting of hyperparameters such as learning rate, weight decay, batch size, and the updating of weights of each layer of the neural network. The purpose of adjusting the parameters is to make the neural network better adapt to the characteristics of the smart manhole cover data and improve its ability to fit and generalize the data.
[0068] 3. Introducing regularization technology: In order to avoid overfitting, computer devices can introduce regularization technology in neural networks. Regularization technology prevents neural networks from over-learning noise and outliers in training data by limiting their complexity. Common regularization techniques include L1 regularization, L2 regularization, and Dropout.
[0069] 4. Use transfer learning: If the amount of available data is limited, the computer device can use transfer learning techniques to accelerate the training process of the neural network and improve the performance of the model. Transfer learning allows the knowledge learned on one task to be transferred to another related task, thereby using existing experience and knowledge to improve the performance of the new task.
[0070] 5. Validation and testing: During the optimization process, the computer device will periodically validate and test the performance of the neural network. This usually involves using a portion of the data as a validation set and a test set, and using this data to evaluate the accuracy and generalization ability of the neural network. If the performance on the validation set and the test set reaches the expected goal, the optimization process can be stopped; otherwise, the computer device will continue to adjust the parameters and optimization strategy.
[0071] 6. Generate initial coding features of smart manhole covers: The optimized neural network will be used to generate initial coding features of smart manhole covers. These features are highly abstract and compressed representations of the original monitoring data, and they can capture key information and patterns in the data. When generating features, the computer device can use the forward propagation algorithm of the neural network to calculate the feature vector representation of the input data.
[0072] The following is a specific example to illustrate the process of feature generation:
[0073] Suppose there is a monitoring data set D of smart manhole covers, which contains monitoring data of multiple smart manhole covers at different time points. The monitoring data of each smart manhole cover includes multiple dimensions such as water flow monitoring data, harmful gas monitoring data, and noise monitoring data. After preprocessing and feature extraction, a feature matrix X can be obtained, in which each row represents the feature vector of a smart manhole cover.
[0074] Now, the feature matrix X is input into the optimized neural network. The neural network transforms and processes these feature vectors and finally outputs a low-dimensional feature vector representation Y. This feature vector Y is the initial encoding feature of the smart manhole cover, which captures the key information and patterns in the original monitoring data.
[0075] For example, if the original monitoring data has 100 dimensions (such as 10 parameters for water flow monitoring, 20 parameters for harmful gas monitoring, and 70 parameters for noise monitoring), and the optimized neural network outputs a 10-dimensional feature vector Y, then this feature vector is a highly compressed and abstract representation of the original monitoring data. It contains the key information in the original data while removing redundant and noisy information.
[0076] By executing step S600, the computer device successfully optimizes the adjusted initial neural network and generates the initial coding features of the smart manhole cover. These features will provide strong support for subsequent data analysis and early warning tasks, and bring convenience and benefits to the management and maintenance of smart cities.
[0077] As an implementation mode, step S100, obtaining a first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and obtaining a second monitoring data set associated with a past smart manhole cover sequence of each sewer health status in a sewer health status set based on the first monitoring data set, including:
[0078] Step S110: obtaining water flow monitoring data, harmful gas monitoring data, and noise monitoring data corresponding to each smart manhole cover in the smart manhole cover network, and fusing the water flow monitoring data, harmful gas monitoring data, and noise monitoring data corresponding to the same smart manhole cover to obtain a first monitoring data set corresponding to each smart manhole cover;
[0079] Step S120: obtaining a past smart manhole cover sequence corresponding to each sewer health state in the sewer health state set, and arranging the smart manhole covers in the past smart manhole cover sequence in descending order based on the warning triggering moments corresponding to the smart manhole covers in the past smart manhole cover sequence to obtain a sorted past smart manhole cover sequence;
[0080] Step S130: Combine the first monitoring data sets corresponding to the smart manhole covers included in the sorted past smart manhole cover sequence to obtain a second monitoring data set associated with the past smart manhole cover sequence of each sewer health status.
[0081] In step S110, the computer device collects and integrates multi-source monitoring data of each smart manhole cover in the smart manhole cover network. These data include water flow monitoring data (such as water level and flow), harmful gas monitoring data (such as hydrogen sulfide and methane), and noise monitoring data (such as water leakage and pipe rupture). These data come from various sensors on the smart manhole cover, which record the dynamic changes of the manhole cover and its surrounding environment in real time.
[0082] For example, water flow monitoring data: Assume that the water level sensor of a smart manhole cover records the following water level data within a certain hour: [0.5m, 0.6m, 0.7m, ..., 0.4m]. Harmful gas monitoring data: During the same period of time, the hydrogen sulfide sensor of the manhole cover records the following concentration data: [5ppm, 6ppm, 7ppm, ..., 4ppm]. Noise monitoring data: The noise sensor may record a series of audio signal sampling values, which represent the noise level of the environment near the manhole cover (this can capture abnormal noise inside the sewer, such as water leakage, pipe rupture, etc., which helps to quickly locate the fault point.).
[0083] The computer device classifies these data according to the smart manhole cover, and merges different types of monitoring data of the same manhole cover in the same time period to form a comprehensive data set, namely the first monitoring data set. This process may involve steps such as time alignment of data, missing value processing and outlier detection to ensure the accuracy and completeness of the data.
[0084] Example of the first monitoring data set: {"Smart manhole cover 1": {"Water flow monitoring data": [0.5, 0.6, 0.7,..., 0.4],"Harmful gas monitoring data": [5, 6, 7, ..., 4],"Noise monitoring data": [audio_sample1, audio_sample2, ...]},"Smart manhole cover 2": {"Water flow monitoring data": [0.4, 0.5, 0.6,...],"Harmful gas monitoring data": [3, 4, 5, ...],"Noise monitoring data": [audio_sample3,audio_sample4, ...]},...}
[0085] In step S120, the computer device obtains the past smart manhole cover sequences corresponding to each health state from the sewer health state set. These sequences record the smart manhole covers that trigger specific health states at different time points, which is an important basis for analyzing the health status of the sewer.
[0086] For example, suppose the sewer health status set includes three states: "normal", "slightly blocked" and "severely blocked". For the "slightly blocked" state, the past smart manhole cover sequence may include smart manhole cover A (trigger time T1), smart manhole cover B (trigger time T2) and smart manhole cover C (trigger time T3).
[0087] The computer device will sort the smart manhole covers according to these triggering moments, usually in descending order (that is, the most recently triggered manhole covers are at the front). This helps to prioritize the most recent health events in subsequent analysis.
[0088] An example of a sequence of past smart manhole covers after sorting: "Minor blockage": [{"Smart manhole cover": "Smart manhole cover C", "Trigger time": T3},{"Smart manhole cover": "Smart manhole cover B", "Trigger time": T2},{"Smart manhole cover": "Smart manhole cover A", "Trigger time": T1}].
[0089] In step S130, the computer device will use the sorted past smart manhole cover sequence to construct a second monitoring data set. This set is different from the first monitoring data set. It focuses on past triggering events of a specific sewer health status and includes the first monitoring data set of the smart manhole cover that triggered these events.
[0090] For each sewer health state, the computer device will traverse the corresponding past smart manhole cover sequence and extract the data fragments of these manhole covers near the triggering time from the first monitoring data set. These data fragments will be combined to form a second monitoring data set associated with the health state.
[0091] For example, assuming that the "slightly blocked" state is of interest and it is known that the smart manhole cover C triggered this state at time T3, the computer device will find the data of the smart manhole cover C near time T3 from the first monitoring data set, such as data from T3-1 hour to T3+1 hour.
[0092] "Minor blockage": {"Smart manhole cover C": {"Water flow monitoring data": [water_level_data_around_T3],"Harmful gas monitoring data": [gas_concentration_data_around_T3],"Noise monitoring data": [noise_data_around_T3]},"Smart manhole cover B": {...},"Smart manhole cover A": {...}}.
[0093] In this example, `water_level_data_around_T3`, `gas_concentration_data_around_T3`, and `noise_data_around_T3` represent the water flow monitoring data, harmful gas monitoring data, and noise monitoring data of the smart manhole cover C around time T3, respectively.
[0094] Through step S130, the computer device successfully constructs a second monitoring data set for each sewer health status. These sets will serve as input data for subsequent steps (such as neural network calibration, commonality measurement, etc.), providing a solid foundation for smart manhole cover data analysis.
[0095] In summary, step S100 effectively collects multi-source monitoring data in the smart manhole cover network through three sub-steps: data fusion, sequence organization, and data set construction, and organizes past trigger event data associated with the health status of the sewer.
[0096] As an implementation mode, step S200, constructing a first network calibration template based on the second monitoring data set, includes:
[0097] Step S210: determining a shielded portion in the second monitoring data set based on the data screening ratio, and taking the data items of the shielded portion as a candidate monitoring data set;
[0098] Step S220: performing a data masking operation on the candidate monitoring data set in the second monitoring data set to obtain a basic calibration template, adding an indication mark to the basic calibration template to obtain a first network calibration template.
[0099] In step S210, the computer device determines the masked portion of the second monitoring data set, that is, the data items that will be hidden or not provided in the subsequent data reasoning process. This process is performed based on the data screening ratio, which reflects the proportion of the data items that need to be masked in the entire data set.
[0100] For example, assuming that the second monitoring data set contains 100 data items, each data item represents the monitoring data of a smart manhole cover at a specific time point (such as water level, harmful gas concentration, noise level, etc.). According to the data screening ratio (for example, set to 20%), the computer device will randomly select or select 20 data items based on specific rules (such as data importance, timestamp, etc.) as the shielded part.
[0101] {"Shielded part": [{"Data item ID": 1, "Data type": "Water level", "Time stamp": "T1", "Value": 0.5},{"Data item ID": 5, "Data type": "Harmful gas concentration", "Time stamp": "T5", "Value": 6ppm},...{"Data item ID": 95, "Data type": "Noise level", "Time stamp": "T95", "Value": 75dB}],"Unshielded part": [...]}.
[0102] In the above example, the selected 20 data items (such as data items with IDs 1, 5, ..., 95) constitute the masked part, while the remaining data items belong to the unmasked part. These selected data items are then used as candidate monitoring data sets, which will be hidden in the subsequent data reasoning process to test the prediction ability of the neural network for unknown data.
[0103] In step S220, the computer device performs a data masking operation on the candidate monitoring data set to construct a basic calibration template. The data masking operation means removing or replacing data items in the candidate monitoring data set from the second monitoring data set with placeholders, random values, etc. to simulate the situation of missing or uncertain data in the real world.
[0104] For example, for the masked portion determined in step S210, the computer device may directly remove it from the second monitoring data set, or insert a placeholder (such as `NaN`, `NULL` or a placeholder data of a specific encoding) at the corresponding position. At the same time, in order to maintain the integrity and continuity of the data sequence, the computer device may also add an indicator mark at the masked position.
[0105] {"Basic adjustment template": [{"Data item ID": 1, "Data type": "Water level", "Timestamp": "T1","Value": NaN}, / / Shield and add indicator tags{"Data item ID": 2, "Data type": "Water level", "Timestamp": "T2", "Value": 0.6},{"Data item ID": 3, "Data type": "Water level", "Timestamp": "T3", "Value": 0.7},...{"Data item ID": 5, "Data type": "Harmful gas concentration", "Timestamp": "T5", "Value": NaN}, / / Shield and add indicator tags...{"Data item ID": 95, "Data type": "Noise level", "Timestamp": "T95", "Value": NaN} / / Shield and add indicator tags]}.
[0106] In the above example, the masked data items (such as data items with IDs 1, 5, ..., 95) have been removed or replaced with `NaN` (for "not a number"), and indicators have been added at the corresponding positions (although in this example the indicators are directly reflected in the replacement of the values, in actual applications, the indicators may exist in the form of additional fields).
[0107] Next, the computer adds markers to the base training template to indicate where a data sequence begins or where a specific data item is located. These markers are crucial for the neural network because they help it understand the structure and context of the data.
[0108] {"First network calibration template": [{"Data item ID": 0, "Data type": "Sequence start", "Timestamp": "N / A", "Value": "START"}, / / Sequence start marker{"Data item ID": 1, "Data type": "Water level", "Timestamp": "T1", "Value": NaN, "Indicator": "Shield"},{"Data item ID": 2, "Data type": "Water level", "Timestamp": "T2", "Value": 0.6},...{"Data item ID": 5, "Data type": "Harmful gas concentration", "Timestamp": "T5", "Value": NaN, "Indicator": "Shield"},...{"Data item ID": 95,"Data type": "Noise level", "Timestamp": "T95", "Value": NaN, "Indicator": "Shield"},{"Data item ID": 96, "Data type": "Sequence end", "Timestamp": "N / A", "Value": "END"} / / Sequence end marker]}.
[0109] In this example, markers are added to indicate the start and end of the sequence (`START` and `END` respectively), as well as an indicator for each masked data item (such as `MASKED`). These markers will be used as part of the input to the neural network to help the network better understand the structure and context of the data.
[0110] By executing steps S210 and S220, the computer device constructs a first network calibration template, which includes a shielded portion, an unshielded portion, and necessary indicator marks, providing a basis for subsequent neural network data reasoning and commonality measurement.
[0111] As an implementation manner, step S220, performing a data masking operation on the candidate monitoring data set in the second monitoring data set to obtain a basic calibration template, includes:
[0112] Step S221: Based on the first shielding support and the second shielding support, perform data shielding operation on the candidate monitoring data set in the second monitoring data set to obtain a basic adjustment template; wherein the first shielding support represents the possibility of changing the candidate monitoring data set in the second monitoring data set into a placeholder, and the second shielding support represents the possibility of changing the candidate monitoring data set in the second monitoring data set into random data.
[0113] In step S220 of the smart manhole cover data analysis process, the fine control of the data masking operation is the key to building an effective basic adjustment template. As one of the specific implementation methods of the data masking operation, step S221 introduces the concepts of first masking support and second masking support to provide a more flexible and controllable method for the data masking process.
[0114] In step S221, the computer device performs data masking on the candidate monitoring data set in the second monitoring data set according to the first masking support and the second masking support. The two supports represent two different data masking strategies: the possibility of replacing the candidate data item with a placeholder (such as `NaN`, `NULL`, etc.), and the possibility of replacing the candidate data item with random data.
[0115] First Masking Support (FMS): Indicates the probability of changing the data items in the candidate monitoring data set into placeholders. A placeholder is a special marker used to indicate the existence of a data item but the specific content is unknown or unavailable. In neural network training, placeholders can help the model learn how to deal with missing data.
[0116] Second Masking Support (SMS): Indicates the probability of changing the data items in the candidate monitoring data set into random data. Unlike placeholders, random data are actual values, but they are unrelated to the original data and are usually used to simulate data noise or uncertainty.
[0117] For example, assuming that the second monitoring data set contains 100 data items, 20 of which are selected as candidate monitoring data sets for shielding operations. The first shielding support can be set to 0.6 and the second shielding support can be set to 0.4, which means that during the shielding process, there is a 60% probability of replacing the data item with a placeholder and a 40% probability of replacing the data item with random data.
[0118] In a specific implementation process, the computer device traverses each data item in the candidate monitoring data set and determines how to mask the data item according to the preset first masking support and second masking support. For example:
[0119] For a first candidate data item, the computer device generates a random number (eg, uniformly distributed between 0 and 1).
[0120] If this random number is less than or equal to the first masked support (0.6), then the data item is replaced with a placeholder (such as `NaN`).
[0121] If this random number is greater than the first shielded support but less than or equal to the sum of the first shielded support and the second shielded support (0.6+0.4=1.0), the data item is replaced with a randomly generated value.
[0122] An example of data masking operation: Assume that there is a candidate monitoring data item whose original value is 0.75 (representing the water level data of a smart manhole cover at a specific point in time). According to the above masking strategy: if the generated random number is less than or equal to 0.6, the masked data item becomes `NaN`. If the generated random number is greater than 0.6 but less than or equal to 1.0, the masked data item may become a random value, such as 0.32 (this value is randomly generated within a certain range and has nothing to do with the original value of 0.75). By repeating this process, the computer device can perform masking operations on all data items in the candidate monitoring data set, thereby constructing a basic calibration template. This template will contain three types of items: original data, placeholders, and random data, which together simulate the diversity and uncertainty of data in the real world.
[0123] After the data masking operation is completed, the computer device will obtain a basic calibration template, which contains not only the masked data items, but also other necessary information, such as the timestamp, type identification and possible indicator marks (used to indicate the beginning, end or position of a specific data item in a data sequence) of the data item.
[0124] Basic tuning template example:
[0125] {"Basic adjustment template": [{"Timestamp": "T1", "Type": "Water level", "Value": 0.65},{"Timestamp": "T2", "Type": "Water level", "Value": NaN}, / / Placeholder replacement{"Timestamp": "T3", "Type":"Harmful gas concentration", "Value": 0.03},{"Timestamp": "T4", "Type": "Noise level", "Value": 72.3},{"Timestamp": "T5", "Type": "Water level", "Value": 0.45},{"Timestamp": "T6", "Type": "Water level","Value": 37.2}, / / Random data replacement...]}.
[0126] In this example, the basic tuning template contains three types of data items: original data, placeholder replacement, and random data replacement. These data items will be used as input to the neural network for training and optimizing the model to improve its ability to handle missing data and noisy data.
[0127] Through the implementation of step S221, the computer device can flexibly control the data masking process based on the dual support strategy, thereby constructing a basic adjustment template that is both in line with the actual data distribution and has a certain degree of challenge. This provides strong support for subsequent neural network adjustment and optimization.
[0128] As an implementation mode, in step S200, data inference is performed on the first network calibration template according to the initial neural network to obtain the inference confidence corresponding to the shielded part in the first network calibration template, including:
[0129] Step S230: loading the first network calibration template into the initial neural network, performing feature vector representation on the first network calibration template based on the initial neural network, and obtaining a first template feature vector representation corresponding to the first network calibration template;
[0130] Step S240: performing data inference on the shielded part in the first network calibration template based on the first template feature vector representation to obtain the inference confidence corresponding to the shielded part in the first network calibration template.
[0131] In step S230, the computer device loads the first network calibration template into the initial neural network, and performs feature vector representation on the calibration template based on the neural network. Feature vector representation is a core concept in machine learning, which captures the intrinsic features and patterns of data by converting raw data into vectors in a high-dimensional space.
[0132] In the specific example:
[0133] 1. Data preprocessing: Before loading the calibration template, the computer device may need to preprocess the data in the template, such as data standardization, normalization or encoding conversion, to ensure that the data meets the input requirements of the neural network.
[0134] 2. Model loading: Next, the computer device loads the initial neural network model into memory, ready for feature extraction and inference calculation. The initial neural network is a model that has been preliminarily trained and has certain data processing and pattern recognition capabilities.
[0135] 3. Feature extraction: Once the calibration template is loaded into the neural network, the computer device will process the data in the template using the neural network's feature extraction layers (such as convolutional layers, pooling layers, etc.). These layers convert the raw data into higher-level feature representations through a series of mathematical operations (such as convolution, pooling, etc.).
[0136] 4. Feature vector generation: After processing in the feature extraction layer, the computer device will obtain a series of feature maps or feature vectors. These feature vectors capture the key information and patterns of the data in the calibration template and provide a basis for subsequent data reasoning.
[0137] 5. First template feature vector representation: Finally, the computer device will combine all feature vectors to form a complete feature vector representation, namely the first template feature vector representation. This vector represents the position of the first network calibration template in the high-dimensional feature space of the neural network.
[0138] For example, assume that the first network calibration template contains the following data items:
[0139] {"Timestamp": "T1", "Type": "Water level", "Value": 0.65,"Timestamp": "T2", "Type": "Water level", "Value": NaN, / / Shield part "Timestamp": "T3", "Type": "Harmful gas concentration", "Value": 0.03,...}.
[0140] In the process of feature vector representation, the neural network can convert each data item into a series of numerical features, such as the height of the water level, the concentration of harmful gases, etc. For the shielded part (such as the water level data at the T2 timestamp), the neural network can infer its possible value based on other unshielded data items and the learning rules within the model.
[0141] After feature extraction and combination, the first template feature vector representation may be similar to the following form: [0.32, 0.15, 0.68, ..., NaN_inferred_value, ...].
[0142] Among them, `NaN_inferred_value` is the inferred value of the neural network for the masked part (water level data at the T2 timestamp). Although in actual representation, a placeholder or special encoding can be used to represent this inferred value, for the sake of illustration, it is assumed here that it has been converted into a specific value.
[0143] In step S240, the computer device performs data inference on the shielded part in the first network calibration template based on the first template feature vector representation to obtain inference confidence. Inference confidence is an important indicator to measure the accuracy of the neural network's prediction of the shielded part.
[0144] The specific examples are:
[0145] 1. Inference calculation: After obtaining the first template feature vector representation, the computer device will input this vector into the inference layer of the neural network (such as the fully connected layer, output layer, etc.) for calculation. The inference layer predicts the true value of the masked part through a series of mathematical operations (such as matrix multiplication, nonlinear activation, etc.).
[0146] 2. Confidence assessment: During the inference process, the neural network usually outputs a probability distribution or confidence score to indicate the degree of confidence in each possible prediction value. For the predicted value of the shielded part, the computer device can extract the corresponding confidence score as the inference confidence.
[0147] 3. Confidence processing: In practical applications, the confidence of the inference may need further processing and analysis. For example, a computer device can convert the confidence score into a percentage, or judge the credibility of the predicted value based on a specific threshold.
[0148] For example, continuing the example above, suppose the neural network infers a value of 0.55 for the masked part (the water level data at timestamp T2) and outputs a confidence score of 0.8. This means that the neural network is 80% confident that the water level data at timestamp T2 is 0.55.
[0149] In practical applications, this confidence score can be used to evaluate the prediction accuracy of the neural network. If the confidence is high (such as close to 1.0), it means that the prediction of the neural network is more reliable; if the confidence is low (such as close to 0.0), it means that the prediction may have a large uncertainty or error.
[0150] Through the implementation of steps S230 and S240, the computer device can perform feature vector representation and data inference on the first network calibration template based on the initial neural network, thereby obtaining the inference confidence of the shielded part. This process not only helps to evaluate the performance of the neural network, but also provides an important reference for subsequent model calibration and optimization.
[0151] As an implementation manner, step S300, based on the initial neural network, performs commonality measurement on the first network calibration template and the first trigger calibration template corresponding to the first network calibration template to obtain the first template commonality measurement result, including:
[0152] Step S310: The first monitoring data of the next smart manhole cover that triggers the target state corresponding to the first network adjustment template is integrated as the first trigger adjustment template; the first network adjustment template and the first trigger adjustment template belong to the smart manhole cover that has triggered the target state in the past and has the same sewer health state;
[0153] Step S320: loading the first trigger adjustment template into the initial neural network, performing feature vector representation on the first trigger adjustment template based on the feature extraction component in the initial neural network, and obtaining a second template feature vector representation corresponding to the first trigger adjustment template;
[0154] Step S330: Obtain a first sewer health state feature vector representation associated with the sewer health state associated with the first trigger adjustment template, and obtain a first template commonality measurement result based on the first sewer health state feature vector representation, the second template feature vector representation, and the first template feature vector representation corresponding to the first network adjustment template.
[0155] In step S310, the computer device determines a first trigger calibration template, which is associated with the first network calibration template and represents a first monitoring data set for triggering the next smart manhole cover of the same sewer health status.
[0156] The specific examples are:
[0157] 1. Target state identification: First, the computer device needs to identify the target sewer health state corresponding to the first network adjustment template. This target state is the health state that has been triggered by all smart manhole covers in the adjustment template.
[0158] 2. Trigger manhole cover screening: Next, the computer device will screen out the next manhole cover that triggers the target state from all the smart manhole covers that have triggered the target state. The first monitoring data set of this manhole cover will be used as the first trigger adjustment template.
[0159] 3. Template association: Finally, the computer device associates the first trigger adjustment template with the first network adjustment template to ensure that they belong to past trigger events of the same sewer health status.
[0160] For example, assume that the target corresponding to the first network calibration template is the "slightly blocked" state, and the template includes the first monitoring data set of smart manhole cover A and smart manhole cover B when the "slightly blocked" state is triggered. The computer device identifies that the next smart manhole cover that triggers the "slightly blocked" state is smart manhole cover C. Therefore, the first monitoring data set of smart manhole cover C will be determined as the first trigger calibration template.
[0161] In step S320, the computer device loads the first trigger calibration template into the initial neural network and uses the feature extraction component in the network to represent the feature vector. This process is similar to the processing of the first network calibration template in step S230.
[0162] The specific examples are:
[0163] 1. Data loading: First, the computer device loads the first trigger adjustment template into the initial neural network, preparing for feature extraction.
[0164] 2. Feature extraction: Next, the computer device processes the data in the first trigger calibration template using the feature extraction layers in the neural network (such as convolutional layers, pooling layers, etc.). These layers convert the raw data into higher-level feature representations through a series of mathematical operations.
[0165] 3. Feature vector generation: After processing in the feature extraction layer, the computer device will obtain a feature vector representation, namely the second template feature vector representation. This vector captures the key information and patterns of the data in the first trigger adjustment template.
[0166] For example, continuing the above example, assume that the first monitoring data set of smart manhole cover C contains data of multiple dimensions such as water level, harmful gas concentration and noise level. In the feature extraction process, the neural network can convert this data into a series of numerical features, such as the height of the water level, the concentration of harmful gases and the spectral characteristics of noise. Ultimately, these features will be combined into a feature vector representation, namely the second template feature vector representation.
[0167] In step S330, the computer device calculates the first template commonality measurement result based on the first sewer health status feature vector representation, the second template feature vector representation and the first template feature vector representation. This process involves similarity and correlation analysis between multiple vectors.
[0168] The specific examples are:
[0169] 1. Feature vector acquisition: First, the computer device needs to obtain a feature vector representation of the health status of the first sewer. This vector may be obtained through clustering, classification or other machine learning algorithms in the previous step, and it represents the typical characteristics of the health status in the feature space.
[0170] 2. Vector similarity calculation: Next, the computer device will calculate the similarity between the second template feature vector representation and the first sewer health status feature vector representation. This can be achieved by cosine similarity, Euclidean distance or other measurement methods.
[0171] 3. Calculation of commonality measurement results: Finally, the computer device will combine the first template feature vector representation (i.e., the feature vector representation of the first network calibration template) and the above similarity calculation results to comprehensively evaluate the commonality measurement results between the first network calibration template and the first trigger calibration template. This process may involve complex mathematical operations and logical reasoning.
[0172] For example, it is assumed that the feature vector of the health state of the first sewer is represented as [h1, h2, h3, ...], the feature vector of the second template is represented as [f1, f2, f3, ...], and the feature vector of the first template is represented as [t1, t2, t3, ...]. The computer device first calculates the cosine similarity between [f1, f2, f3, ...] and [h1, h2, h3, ...] to obtain a similarity score S1. Then, the computer device may consider the similarity between the first template feature vector representation [t1, t2, t3, ...] and [h1, h2, h3, ...] (assuming S2) and the similarity between [t1, t2, t3, ...] and [f1, f2, f3, ...] (assuming S3). Finally, the computer device may perform weighted summation of S1, S2 and S3 or adopt other combinations to obtain the first template commonality measurement result.
[0173] Through the implementation of steps S310 to S330, the computer device can measure the commonality of the first network adjustment template and the first trigger adjustment template based on the initial neural network, thereby obtaining similarity and correlation information between them. This information is crucial for subsequent model adjustment and optimization, and it helps to improve the neural network's ability to process and analyze smart manhole cover data.
[0174] As an implementation manner, the number of the first network calibration templates is x, where x≥1; in step S330, based on the first sewer health state feature vector representation, the second template feature vector representation, and the first template feature vector representation corresponding to the first network calibration template, a first template commonality measurement result is obtained, including:
[0175] Step S331: obtaining a first commonality measurement result between the first sewer health status feature vector representation and the second template feature vector representation, performing an exponential transformation on the first commonality measurement result, and obtaining a first temporary commonality measurement result;
[0176] Step S332: obtaining a second commonality measurement result between the first sewer health status feature vector representation and the first template feature vector representation corresponding to each first network calibration template, performing an exponential transformation on the second commonality measurement result, and obtaining a second temporary commonality measurement result related to each first network calibration template;
[0177] Step S333: summing up the second temporary commonality measurement results related to each first network calibration template to obtain a commonality measurement sum value, and determining the first template commonality measurement result based on the ratio between the first temporary commonality measurement result and the commonality measurement sum value.
[0178] In step S330 of the smart manhole cover data analysis process, calculating the first template commonality measurement result is a key step in evaluating the similarity and correlation between the first network adjustment template and the first trigger adjustment template. When the number of the first network adjustment template is x (x ≥ 1), the calculation process becomes more complicated because it needs to comprehensively consider the commonality measurement results between multiple adjustment templates and the sewer health status feature vector.
[0179] In step S331, the computer device calculates a first commonality measurement result between the first sewer health status feature vector representation and the second template feature vector representation, and performs an exponential transformation on the result to obtain a first temporary commonality measurement result.
[0180] The specific examples are:
[0181] 1. Calculation of commonality measure: First, the computer device needs to calculate the commonality measure result between two feature vectors. This can be achieved by a variety of methods, such as cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. Here, it is assumed that cosine similarity is used as the measurement method. The calculation formula of cosine similarity is: ;
[0182] in, and Represent two eigenvectors, represents the dot product of vectors, Represents the magnitude (i.e. length) of a vector.
[0183] The first sewer health status feature vector is represented (set as ) and the second template feature vector representation (set as ) into the above formula, we can get the first commonality measurement result (set as ).
[0184] 2. Exponential transformation: Next, the computer device needs to perform an exponential transformation on the first commonality measurement result. Exponential transformation is a nonlinear transformation that can map the measurement result to a new numerical range, thereby enhancing the differentiation of the result. The formula for exponential transformation is: ,in, is the base of natural logarithms, is an adjustable parameter that controls the strength and direction of the transformation. The value can be determined according to specific requirements and data characteristics.
[0185] For example, suppose the first sewer health status feature vector is represented as , the second template feature vector is expressed as The first commonality measurement result calculated according to the cosine similarity formula is If you take =1, then the first temporary commonality measurement result is .
[0186] In step S332, the computer device calculates the second commonality measurement results between the first sewer health status feature vector representation and the first template feature vector representation corresponding to each first network adjustment template, and performs exponential transformation and summation processing on these results.
[0187] The specific examples are:
[0188] 1. Commonality metric calculation: For each first network calibration template (set as the i-th template, where , the computer device needs to calculate its corresponding first template feature vector representation (set as ( ) and the first sewer health status feature vector representation ( ) between the commonality measurement results (set as ). This can also be achieved using cosine similarity or other metrics.
[0189] 2. Exponential transformation: Similar to step S331, the computer device needs to perform an exponential transformation on each second commonality measurement result to obtain a second temporary commonality measurement result (set as ). The formula for exponential transformation is: ,in, is the same adjustable parameter as in step S331.
[0190] 3. Sum processing: Finally, the computer device needs to sum all the second temporary commonality measurement results to obtain the commonality measurement sum value (set as ). The formula for summation is: For example, continuing the above example, assuming there are 3 first network calibration templates (i.e. x=3), their corresponding first template feature vector representations are The second commonality measurement results obtained by calculating the cosine similarity are If you take =1, then the corresponding second temporary commonality measurement results are The commonality measure and value is .
[0191] In step S333 , the computer device determines a first template commonality metric result based on a ratio between the first temporary commonality metric result and the commonality metric sum value.
[0192] The specific examples are:
[0193] 1. Ratio calculation: The computer device first calculates the first temporary commonality measurement result (set as E_1) and the commonality measurement sum value ( ) (set to R). The formula for calculating the ratio is: .
[0194] 2. Result determination: Finally, the computer device uses this ratio R as the first template commonality measurement result. This result reflects the overall level of the commonality measurement between the first trigger adjustment template and the first sewer health status feature vector relative to the commonality measurement between all first network adjustment templates and the feature vector.
[0195] For example, continuing the above example, it is known that the first temporary commonality measurement result is =2.59, the commonality measure and value is =6.92. Therefore, the first template commonality measurement result is This result indicates that the commonality measure between the first trigger calibration template and the first sewer health status feature vector accounts for about 37% of the sum of the commonality measures between all calibration templates and the feature vector.
[0196] Through the implementation of steps S331 to S333, the computer device can comprehensively consider the commonality measurement results between multiple first network adjustment templates and sewer health status feature vectors, thereby more accurately evaluating the similarity and correlation between the first trigger adjustment template and the sewer health status. This provides an important reference for subsequent model adjustment and optimization.
[0197] As an implementation manner, the number of shielded parts in the first network calibration template is y, y≥1; step S400, based on the inference confidence, the shielded parts in the first network calibration template, and the first template commonality measurement result, the initial neural network is calibrated to obtain the calibrated initial neural network, including:
[0198] Step S410: performing logarithmic transformation on the inference confidences corresponding to the y shielded parts to obtain the transformation results of the likelihood degree of each shielded part, and summing the transformation results of the likelihood degree of each shielded part to obtain the summed result as the shielded data prediction error;
[0199] Step S420: determining a network calibration error corresponding to the initial neural network based on the masked data prediction error and the first template commonality measurement result;
[0200] Step S430: Based on the network calibration error, the parameters of the initial neural network are repeatedly corrected, and the optimization is stopped when the network calibration error meets the preset convergence requirement to obtain the calibrated initial neural network.
[0201] In step S410, the computer device performs logarithmic transformation on the inference confidences corresponding to the y shielding parts in the first network calibration template to obtain the transformation results of the likelihood degree of each shielding part. Subsequently, these transformation results are summed to obtain the shielding data prediction error.
[0202] The specific examples are:
[0203] 1. Logarithmic transformation: Logarithmic transformation is a commonly used data preprocessing method, which can map the original data to a new numerical range, thereby enhancing the separability and stability of the data. Here, the computer device performs a logarithmic transformation on the inference confidence corresponding to the y shielding parts, and the transformation formula is: . Where i represents the i-th shielding part, Represents the natural logarithm function.
[0204] 2. Sum processing: After completing the logarithmic transformation, the computer device will sum all the transformation results to obtain the shielding data prediction error. The summation formula is: , where y is the number of shielded sections.
[0205] For example, suppose there are 3 shielded parts (i.e., y=3), and their corresponding inference confidences are 0.8, 0.7, and 0.9, respectively. First, these confidences are logarithmically transformed, and the transformed results are Then, these transformation results are summed up to obtain the prediction error of the shielded data as -0.357.
[0206] In step S420, the computer device determines the network calibration error corresponding to the initial neural network based on the masked data prediction error and the first template commonality measurement result.
[0207] The specific examples are:
[0208] 1. Fusion of commonality measurement results: First, the computer device may need to properly scale or normalize the first template commonality measurement result to ensure that it is at the same order of magnitude as the masked data prediction error. This can be achieved through simple linear transformation or nonlinear transformation.
[0209] 2. Comprehensive error calculation: Then, the computer device performs weighted summation or other forms of combination on the shielded data prediction error and the first template commonality measurement result to obtain the network calibration error. The weighted summation formula is: .in, is a weight coefficient used to balance the contribution of masked data prediction error and commonality measurement results to the network calibration error.
[0210] For example, continuing with the above example, assuming that the first template commonality metric result is 0.75 (after proper scaling or normalization), the weight coefficient =1 and =0.5. Then the network calibration error is 1×(-0.357)+0.5×0.75=-0.357+0.375=0.018.
[0211] In step S430, the computer device will repeatedly correct the parameters of the initial neural network based on the network calibration error until the network calibration error meets the preset convergence requirement and then stop the optimization, thereby obtaining the calibrated initial neural network.
[0212] The specific examples are:
[0213] 1. Gradient calculation: First, the computer device needs to calculate the gradient of the network calibration error relative to the neural network parameters. This is usually achieved through the back propagation algorithm, which propagates the error signal backward layer by layer starting from the output layer and calculates the gradient of each layer parameter.
[0214] 2. Parameter update: Then, the computer device updates the parameters of the neural network according to the calculated gradient. Common update methods include stochastic gradient descent (SGD), Adam optimizer, etc. The general form of the update formula is: ;in, represents the parameter value of the tth iteration, is the learning rate, is the network calibration error J with respect to the parameter gradient.
[0215] 3. Convergence judgment: After each parameter update, the computer device needs to check whether the network calibration error meets the preset convergence requirements. The convergence requirements are usually set based on the size or change rate of the network calibration error. If the network calibration error is less than a certain threshold or the change amount of multiple consecutive iterations is less than a certain threshold, the network is considered to have converged and the optimization process is stopped.
[0216] 4. Model saving: Finally, the computer device saves the adjusted initial neural network model to a storage medium for subsequent use.
[0217] For example, suppose that in the initial iteration, the network calibration error is 0.018 (as shown in the example above). The computer device uses the Adam optimizer to update the parameters and sets the convergence threshold to 0.001. After multiple iterations, if the network calibration error drops to 0.0009 (less than the convergence threshold), the optimization process is stopped and the tuned neural network model is saved to disk.
[0218] Through the implementation of steps S410 to S430, the computer device can accurately adjust the initial neural network based on the reasoning confidence, shielded part and commonality measurement results, thereby improving its ability to process smart manhole cover monitoring data.
[0219] As an implementation mode, step S500, constructing a second network calibration template based on the second monitoring data set, and based on the calibrated initial neural network, performing commonality measurement on the second network calibration template and the second trigger calibration template corresponding to the second network calibration template to obtain the second template commonality measurement result, including:
[0220] Step S510: adding an indication mark to the second monitoring data set, obtaining a second network adjustment template, and determining a second trigger adjustment template corresponding to the second network adjustment template;
[0221] Step S520: obtaining a third template feature vector representation corresponding to the second network calibration template based on the initial neural network, and obtaining a fourth template feature vector representation corresponding to the second trigger calibration template based on the initial neural network;
[0222] Step S530: Obtain a second sewer health state feature vector representation associated with the sewer health state associated with the second trigger adjustment template, and obtain a second template commonality measurement result based on the second sewer health state feature vector representation, the third template feature vector representation, and the fourth template feature vector representation.
[0223] In step S510, the computer device adds an indication mark to the second monitoring data set to obtain a second network calibration template, and determines a second trigger calibration template corresponding to the template.
[0224] The specific examples are:
[0225] 1. Addition of indicator marks: Indicator marks are special symbols or codes used to identify specific positions or events in a data sequence. During the construction of the second network calibration template, the computer device will add these marks to the appropriate positions of the second monitoring data set to indicate the start, end or position of a specific data item of the data sequence. For example, "START" can be used to mark the start of a data sequence, "END" can be used to mark the end of a data sequence, or other marks can be used to indicate the position of a shielded portion.
[0226] 2. Generation of the second network calibration template: After adding the indicator mark, the second monitoring data set is transformed into the second network calibration template. This template contains the original monitoring data and the indicator mark, providing richer information for the training and reasoning of the neural network.
[0227] 3. Determination of the second trigger adjustment template: Similar to the first trigger adjustment template, the second trigger adjustment template is associated with the second network adjustment template, and represents the data set of the smart manhole covers that trigger the same sewer health state. The computer device will select the next manhole cover that triggers the state from all the smart manhole covers that have triggered the state according to the sewer health state corresponding to the second network adjustment template, and determine its data set as the second trigger adjustment template.
[0228] For example, assume that the second monitoring data set contains monitoring data of multiple smart manhole covers at different time points, such as water level, harmful gas concentration and noise level. The computer device adds "START" and "END" marks to these data to indicate the beginning and end of the data sequence. The data set with the added marks constitutes the second network adjustment template. Then, the computer device recognizes that the sewer health status corresponding to the second network adjustment template is "slightly blocked", and selects the next smart manhole cover C that triggers the "slightly blocked" state. The data set of smart manhole cover C is determined as the second trigger adjustment template.
[0229] In step S520, the computer device obtains feature vector representations corresponding to the second network calibration template and the second trigger calibration template based on the calibrated initial neural network.
[0230] The specific examples are:
[0231] 1. Model loading and data input: First, the computer device loads the adjusted initial neural network into the memory, and inputs the second network adjustment template and the second trigger adjustment template into the network respectively.
[0232] 2. Feature extraction and representation: Next, the feature extraction layer in the neural network processes the input data and converts the raw data into feature vectors in a high-dimensional space through a series of mathematical operations (such as convolution, pooling, full connection, etc.). For the second network calibration template, the computer device will obtain a third template feature vector representation; for the second trigger calibration template, the computer device will obtain a fourth template feature vector representation.
[0233] For example, continuing with the above example, assume that the initial neural network after calibration is a convolutional neural network (CNN). When the second network calibration template and the second trigger calibration template are input into the network, the feature extraction layer of the CNN will perform convolution and pooling operations on the data to extract the key features in the data. For the second network calibration template, the CNN may output a feature vector containing multiple values as the third template feature vector representation; for the second trigger calibration template, the CNN will also output a feature vector as the fourth template feature vector representation.
[0234] In step S530, the computer device calculates the second template commonality measurement result based on the sewer health status feature vector representation associated with the second trigger adjustment template, the third template feature vector representation, and the fourth template feature vector representation.
[0235] The specific examples are:
[0236] 1. Acquisition of health status feature vector representation: First, the computer device needs to obtain the sewer health status feature vector representation associated with the second trigger adjustment template. This vector may be obtained in the previous step through clustering, classification or other machine learning algorithms, and it represents the typical characteristics of the health status in the feature space.
[0237] 2. Calculation of commonality measure: Next, the computer device will calculate the commonality measure result between the fourth template feature vector representation and the second sewer health status feature vector representation, and the commonality measure result between the third template feature vector representation and the fourth template feature vector representation. This can be achieved by a variety of methods, such as cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. Here, it is assumed that cosine similarity is used as the measurement method.
[0238] 3. Result synthesis and output: Finally, the computer device can perform weighted summation or other forms of combination of the two commonality measurement results to obtain the second template commonality measurement result. This result reflects the similarity and correlation between the second network adjustment template, the second trigger adjustment template and their associated sewer health status in the feature space.
[0239] For example, continuing the above example, suppose that the health status feature vector of the second sewer has been obtained as , the fourth template feature vector is expressed as , and the third template feature vector is expressed as The computer device first calculates The cosine similarity between them gives the similarity score , then calculate The cosine similarity between them gives the similarity score Finally, the computer device may perform a weighted sum of the two similarity scores (e.g. ),in is the weight coefficient used to balance the contribution of the two similarity scores to the final result. This is the commonality measurement result of the second template.
[0240] By implementing steps S510 to S530, the computer device can construct a second network calibration template based on the second monitoring data set, and evaluate the similarity and correlation between the second network calibration template, the second trigger calibration template and their associated sewer health states through commonality metric calculation.
[0241] As an embodiment, the method further includes:
[0242] Step S700: adding an indication mark to the first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and obtaining the smart manhole cover input data corresponding to each smart manhole cover in the smart manhole cover network;
[0243] Step S800: loading the smart manhole cover input data corresponding to the first smart manhole cover in the smart manhole cover network into the optimized initial neural network, and obtaining the smart manhole cover feature vector representation corresponding to the first smart manhole cover based on the optimized initial neural network;
[0244] Step S900: Obtain the smart manhole cover feature vector representation corresponding to each smart manhole cover in the smart manhole cover network, and add the smart manhole cover feature vector representation corresponding to each smart manhole cover to the smart manhole cover coding feature library.
[0245] In the further derivative implementation of the smart manhole cover data analysis process, steps S700 to S900 involve the process of preprocessing, feature extraction and feature library construction of each smart manhole cover data in the smart manhole cover network. The purpose is to convert the original monitoring data into a more meaningful feature representation and establish a coded feature library containing all smart manhole cover feature vectors to provide support for subsequent data analysis and application.
[0246] In step S700, the computer device adds an indicator mark to the first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network to obtain the smart manhole cover input data.
[0247] The specific examples are:
[0248] 1. Data collection and integration: First, the computer device needs to collect the first monitoring data set of all smart manhole covers in the smart manhole cover network. These data sets contain the monitoring data of each smart manhole cover at different time points, such as water level, harmful gas concentration, noise level, etc.
[0249] 2. Adding indicator marks: Next, the computer device will add indicator marks to the first monitoring data set of each smart manhole cover. These marks are used to indicate the beginning, end or location of a specific data item in a data sequence, which helps the neural network better understand the structure and contextual information of the data when processing the data. For example, "START" can be used to mark the beginning of a data sequence, "END" can be used to mark the end of a data sequence, or other marks can be used to indicate the location of a masked part or an outlier.
[0250] 3. Generation of smart manhole cover input data: After adding the indicator mark, the first monitoring data set of each smart manhole cover is transformed into the smart manhole cover input data. These data contain the original monitoring data and the indicator mark, which provides the basis for the subsequent feature extraction and coding feature library construction.
[0251] For example, suppose there are two smart manhole covers A and B in the smart manhole cover network, and their first monitoring data sets are as follows:
[0252] Smart manhole cover A: [water level_A1, harmful gas concentration_A1, noise level_A1, ..., water level_An, harmful gas concentration_An, noise level_An];
[0253] Smart manhole cover B: [water level_B1, harmful gas concentration_B1, noise level_B1, ..., water level_Bm, harmful gas concentration_Bm, noise level_Bm];
[0254] After adding indicator marks to these data sets, the computer device obtains the smart manhole cover input data:
[0255] Smart manhole cover A: [START, water level_A1, harmful gas concentration_A1, noise level_A1, ..., water level_An, harmful gas concentration_An, noise level_An, END];
[0256] Smart manhole cover B: [START, water level_B1, harmful gas concentration_B1, noise level_B1, ..., water level_Bm, harmful gas concentration_Bm, noise level_Bm, END];
[0257] In step S800, the computer device loads the smart manhole cover input data corresponding to the first smart manhole cover in the smart manhole cover network into the optimized initial neural network to obtain the feature vector representation corresponding to the smart manhole cover.
[0258] The specific examples are:
[0259] 1. Model loading and data input: First, the computer device loads the optimized initial neural network into the memory, and inputs the smart manhole cover input data of the first smart manhole cover (such as smart manhole cover A) into the network.
[0260] 2. Feature extraction: Next, the neural network processes the input data of the smart manhole cover and converts the raw data into feature vectors in a high-dimensional space through a series of mathematical operations (such as convolution, pooling, full connection, etc.). This process is similar to the feature vector representation acquisition process in step S520.
[0261] 3. Generation of feature vector representation: After being processed by the feature extraction layer of the neural network, the computer device will obtain a feature vector containing multiple values, that is, the feature vector representation of smart manhole cover A. This vector captures the key information and patterns in the monitoring data of smart manhole cover A.
[0262] For example, continuing the above example, assume that the optimized initial neural network is a convolutional neural network (CNN). When the smart manhole cover input data of smart manhole cover A is input into CNN, the feature extraction layer of CNN will perform convolution and pooling operations on the data to extract the key features in the data. Ultimately, CNN may output a feature vector containing 128 values as the feature vector representation of smart manhole cover A, such as [f1_A, f2_A, f3_A, ..., f128_A].
[0263] In step S900, the computer device will obtain the feature vector representations corresponding to all smart manhole covers in the smart manhole cover network, and add these feature vector representations to a unified coding feature library.
[0264] The specific examples are:
[0265] 1. Collection of feature vector representations: First, the computer device needs to process each smart manhole cover in the smart manhole cover network in turn according to step S800 to obtain their corresponding feature vector representations. These feature vector representations constitute the basic data of the encoding feature library.
[0266] 2. Establishment of the coding feature library: Next, the computer device will organize all the collected feature vector representations into a unified database or data structure, namely the smart manhole cover coding feature library. This library contains the unique identifier of each smart manhole cover (such as the manhole cover ID) and the corresponding feature vector representation, which is convenient for subsequent data retrieval and analysis.
[0267] 3. Maintenance and update of the library: As time goes by and new monitoring data is generated, the computer device may need to regularly update the encoding feature library. This can be achieved by adding newly acquired feature vector representations to the library, or cleaning and replacing old data in the library as needed.
[0268] For example, assuming that there are N smart manhole covers (N≥2) in the smart manhole cover network, the computer device has obtained the feature vector representation of each smart manhole cover in the manner of step S800. These feature vector representations can be organized into a two-dimensional array or a similar data structure, such as: [[manhole cover ID_1, [f1_1, f2_1, f3_1, ..., f128_1]], [manhole cover ID_2, [f1_2, f2_2, f3_2, ..., f128_2]], ..., [manhole cover ID_N, [f1_N, f2_N, f3_N, ..., f128_N]]].
[0269] This array constitutes the smart manhole cover coding feature library. In subsequent data analysis, the computer device can quickly retrieve the corresponding feature vector representation based on the manhole cover ID, and use these feature vectors to perform tasks such as pattern recognition, anomaly detection or predictive analysis.
[0270] Through the implementation of steps S700 to S900, the computer device can convert the original monitoring data in the smart manhole cover network into a more meaningful feature vector representation, and establish a coded feature library containing all smart manhole cover feature vectors. This process not only helps to improve the efficiency of data analysis and application, but also provides strong support for the refined management of smart cities.
[0271] As an embodiment, the method further includes:
[0272] Step S1000: constructing a third network calibration template of a state-triggered warning network based on the smart manhole cover feature vector representation in the smart manhole cover coding feature library and the past smart manhole cover sequences corresponding to each sewer health state in the sewer health state set;
[0273] Step S1100: Calibrate the state trigger warning network based on the third network calibration template to obtain the calibrated state trigger warning network; wherein, the debugging process of the state trigger warning network includes a first process and a second process, the first process is used to calibrate the sequence prediction learning, and suspend the calibration of the smart manhole cover feature vector representation; the second process is used to calibrate the smart manhole cover feature vector representation, and suspend the calibration of the sequence prediction learning; the calibrated state trigger warning network is used for state trigger warning.
[0274] Steps S1000 and S1100 aim to use the smart manhole cover coding feature library and past smart manhole cover sequence information to build a state-triggered warning network that can accurately predict and warn the health status of the sewer.
[0275] In step S1000, the computer device constructs a third network calibration template of the state-triggered warning network based on the smart manhole cover feature vector representation in the smart manhole cover coding feature library and the past smart manhole cover sequences corresponding to each sewer health state in the sewer health state set.
[0276] The specific examples are:
[0277] 1. Data preparation: First, the computer device needs to extract the feature vector representation of all smart manhole covers from the smart manhole cover coding feature library. These feature vectors capture the key information and patterns in the monitoring data of each smart manhole cover and are the basis for building the third network calibration template.
[0278] 2. Sequence matching: Next, the computer device needs to match the smart manhole cover feature vector representation with each health state in the sewer health state set. For each health state, the computer device will filter out the smart manhole covers that have triggered this state from the past smart manhole cover sequence and obtain the feature vector representations of these manhole covers before and after the triggering state.
[0279] 3. Template construction: Based on the matched data, the computer device can construct a third network adjustment template. This template contains multiple data fragments, each of which is composed of a series of feature vectors, representing the characteristic changes of a smart manhole cover before and after triggering a specific health state. In addition, the template may also contain other relevant information, such as trigger time, health state type, manhole cover location, etc.
[0280] For example, suppose that the smart manhole cover coding feature library contains feature vector representations of 100 smart manhole covers, and the sewer health status set defines three states: "normal", "slightly blocked" and "severely blocked". The computer device first extracts the feature vectors of all manhole covers from the feature library. Then, for the "slightly blocked" state, the computer device will filter out all manhole covers that have triggered this state (such as manhole cover A, manhole cover B and manhole cover C), and obtain their feature vector representations before and after the "slightly blocked" state is triggered. Finally, the computer device will construct a third network calibration template containing these feature vector representations for subsequent state trigger warning network calibration.
[0281] In step S1100, the computer device will adjust the status trigger warning network based on the third network adjustment template to obtain a network model that can accurately predict and warn the health status of the sewer.
[0282] The specific examples are:
[0283] 1. Network initialization: First, the computer device needs to initialize a state-triggered warning network. This network may be a complex deep learning model, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), or a gated recurrent unit (GRU), which is used to process sequence data and predict future health status.
[0284] 2. Adjustment process: The adjustment process of the state-triggered warning network includes two main stages: the first process and the second process.
[0285] First pass: In the first pass, the computer device focuses on the calibration of sequence prediction learning. This means that the network will learn how to predict future health status sequences based on past feature vector sequences. In this pass, the computer device can fix the calibration of the smart manhole cover feature vector representation (i.e., not update the weights of these features), and focus on optimizing the network parameters related to sequence prediction.
[0286] Second process: In the second process, the computer device turns its attention to the adjustment of the smart manhole cover feature vector representation. This means that the network will learn how to better extract and represent the monitoring data features of the smart manhole cover to improve the accuracy of state prediction. In this process, the computer device can fix the parameters of sequence prediction learning (i.e., do not update the weights related to sequence prediction) and focus on optimizing the network parameters related to feature extraction and representation.
[0287] By alternating these two processes, the computer device can gradually optimize the overall performance of the status triggered warning network.
[0288] 3. Convergence judgment and model preservation: After each tuning iteration, the computer device needs to check whether the network's performance on the validation set has improved. If the performance improvement reaches the preset convergence requirement (such as the accuracy improvement is less than a certain threshold), the tuning process is stopped and the current network model is saved as the final state to trigger the warning network.
[0289] For example, continuing with the above example, assume that the computer device has built a state-triggered warning network based on LSTM. In the first process, the computer device fixes the feature vector input weights of the LSTM layer and optimizes the state update and output weights of the LSTM unit to improve the accuracy of sequence prediction. In the second process, the computer device fixes the state update and output weights of the LSTM unit and optimizes the weights of the feature extraction layer (such as the weights of the convolutional layer or the fully connected layer) to improve the representation quality of the smart manhole cover feature vector. By alternating these two processes, the computer device can gradually improve the overall performance of the state-triggered warning network until the convergence requirements are met.
[0290] Through the implementation of steps S1000 and S1100, the computer device constructs a state-triggered warning network that accurately predicts and warns the health status of the sewer. This process not only involves complex data processing and machine learning techniques, but also reflects the fine tuning and optimization of sequence data and feature representation.
[0291] In summary, the present invention obtains the first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, combines the first monitoring data set corresponding to the smart manhole cover covered in the past smart manhole cover sequence of each sewer health status, and obtains the second monitoring data set corresponding to the past smart manhole cover sequence; based on the second monitoring data set, generates a first network tuning template for tuning the initial neural network and a second network tuning template for optimizing the tuned initial neural network. According to the first network tuning template, the initial neural network is tuned based on a parallel method of data reasoning and commonality measurement to obtain the tuned initial neural network. According to the second network tuning template, the tuned initial neural network is optimized based on a commonality measurement method to obtain the optimized initial neural network. Based on the above optimized initial neural network, an initialized smart manhole cover feature vector representation can be generated for the state trigger warning, and the features of the past smart manhole cover sequence can be mined in combination with the ability of the initial neural network to improve the representation quality of the smart manhole cover feature vector representation, thereby improving the accuracy of the trigger warning.
[0292] An embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0293] The embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium may be transient or non-transient.
[0294] An embodiment of the present invention provides a computer program, including computer-readable codes. When the computer-readable codes are run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.
[0295] An embodiment of the present invention provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0296] Figure 2 A hardware entity diagram of a computer device provided by an embodiment of the present invention, such as Figure 2 As shown, the hardware entity of the computer device 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.
[0297] The above description is only an implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A smart manhole cover data analysis method based on the Internet of Things, characterized in that: include: Obtain a first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and based on the first monitoring data set, obtain a second monitoring data set associated with a past smart manhole cover sequence of each sewer health status in the sewer health status set; constructing a first network calibration template based on the second monitoring data set, performing data inference on the first network calibration template according to the initial neural network, and obtaining the inference confidence corresponding to the shielded part in the first network calibration template; the first network calibration template includes a triggered calibration template and a non-triggered calibration template; Based on the initial neural network, performing commonality measurement on the first network adjustment template and a first trigger adjustment template corresponding to the first network adjustment template to obtain a first template commonality measurement result; Based on the reasoning confidence, the shielded part in the first network calibration template, and the first template commonality measurement result, the initial neural network is calibrated to obtain a calibrated initial neural network; constructing a second network tuning template based on the second monitoring data set, and performing commonality measurement on the second network tuning template and a second trigger tuning template corresponding to the second network tuning template based on the adjusted initial neural network to obtain a second template commonality measurement result; the second network tuning template does not have a trigger tuning template; Optimizing the adjusted initial neural network based on the second template commonality measurement result to obtain an optimized initial neural network; The optimized initial neural network is used to generate initial coding features of the smart manhole cover; The step of performing data reasoning on the first network calibration template according to the initial neural network to obtain the reasoning confidence corresponding to the shielded part in the first network calibration template includes: Loading the first network calibration template into the initial neural network, performing feature vector representation on the first network calibration template based on the initial neural network, and obtaining a first template feature vector representation corresponding to the first network calibration template; Performing data inference on the shielded part in the first network calibration template based on the first template feature vector representation to obtain an inference confidence corresponding to the shielded part in the first network calibration template; The step of performing commonality measurement on the first network adjustment template and a first trigger adjustment template corresponding to the first network adjustment template based on the initial neural network to obtain a first template commonality measurement result includes: The first monitoring data of the next smart manhole cover that triggers the target state corresponding to the first network adjustment template is collected as the first trigger adjustment template; the first network adjustment template and the first trigger adjustment template belong to the smart manhole cover that has triggered the target state in the past and has the same sewer health state; Loading the first trigger adjustment template into the initial neural network, performing feature vector representation on the first trigger adjustment template based on a feature extraction component in the initial neural network, and obtaining a second template feature vector representation corresponding to the first trigger adjustment template; Obtaining a first sewer health state feature vector representation associated with the sewer health state associated with the first trigger adjustment template, and obtaining a first template commonality measurement result based on the first sewer health state feature vector representation, the second template feature vector representation, and the first template feature vector representation corresponding to the first network adjustment template; The number of the first network calibration templates is x, where x≥1; the first template commonality measurement result is obtained based on the first sewer health status feature vector representation, the second template feature vector representation, and the first template feature vector representation corresponding to the first network calibration template, including: Acquire a first commonality measurement result between the first sewer health state feature vector representation and the second template feature vector representation, perform an exponential transformation on the first commonality measurement result, and obtain a first temporary commonality measurement result; Obtaining a second commonality measurement result between the first sewer health state feature vector representation and the first template feature vector representation corresponding to each first network calibration template, performing an exponential transformation on the second commonality measurement result, and obtaining a second temporary commonality measurement result related to each first network calibration template; The second temporary commonality measurement results related to each first network calibration template are summed to obtain a commonality measurement sum value, and the first template commonality measurement result is determined based on a ratio between the first temporary commonality measurement result and the commonality measurement sum value.
2. The method according to claim 1, characterized in that The step of obtaining a first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and obtaining a second monitoring data set associated with a past smart manhole cover sequence of each sewer health status in a sewer health status set based on the first monitoring data set, includes: Obtain water flow monitoring data, harmful gas monitoring data, and noise monitoring data corresponding to each smart manhole cover in the smart manhole cover network, merge the water flow monitoring data, harmful gas monitoring data, and noise monitoring data corresponding to the same smart manhole cover, and obtain a first monitoring data set corresponding to each smart manhole cover; Obtain a past smart manhole cover sequence corresponding to each sewer health state in the sewer health state set, and based on the warning triggering moments corresponding to the smart manhole covers included in the past smart manhole cover sequence, arrange the smart manhole covers included in the past smart manhole cover sequence in descending order to obtain a sorted past smart manhole cover sequence; The first monitoring data sets corresponding to the smart manhole covers included in the sorted past smart manhole cover sequence are combined to obtain a second monitoring data set associated with the past smart manhole cover sequence of each sewer health status.
3. The method according to claim 1, characterized in that The constructing a first network calibration template based on the second monitoring data set includes: Determine a shielded portion in the second monitoring data set based on the data screening ratio, and use the data items of the shielded portion as a candidate monitoring data set; Perform a data masking operation on the candidate monitoring data set in the second monitoring data set to obtain a basic calibration template, add an indication mark to the basic calibration template, and obtain a first network calibration template.
4. The method according to claim 3, characterized in that The step of performing a data shielding operation on the candidate monitoring data set in the second monitoring data set to obtain a basic calibration template includes: Based on the first shielding support and the second shielding support, a data shielding operation is performed on the candidate monitoring data set in the second monitoring data set to obtain a basic adjustment template; wherein the first shielding support represents the possibility of changing the candidate monitoring data set in the second monitoring data set into a placeholder, and the second shielding support represents the possibility of changing the candidate monitoring data set in the second monitoring data set into random data.
5. The method according to claim 1, characterized in that: The number of shielded parts in the first network calibration template is y, and y≥1; the initial neural network is calibrated based on the inference confidence, the shielded parts in the first network calibration template, and the first template commonality measurement result to obtain the calibrated initial neural network, including: Performing logarithmic transformation on the inference confidences corresponding to the y shielded parts to obtain the transformation results of the likelihood degree of each shielded part, summing up the transformation results of the likelihood degree of each shielded part to obtain the summed result as the shielded data prediction error; Determining a network calibration error corresponding to the initial neural network based on the masked data prediction error and the first template commonality measurement result; Based on the network calibration error, the parameters of the initial neural network are repeatedly corrected, and when the network calibration error meets the preset convergence requirement, the optimization is stopped to obtain the calibrated initial neural network; The step of constructing a second network calibration template based on the second monitoring data set, and performing commonality measurement on the second network calibration template and a second trigger calibration template corresponding to the second network calibration template based on the calibrated initial neural network to obtain a second template commonality measurement result includes: adding an indication mark to the second monitoring data set, obtaining a second network adjustment template, and determining a second trigger adjustment template corresponding to the second network adjustment template; Acquire a third template feature vector representation corresponding to the second network adjustment template based on the initial neural network, and acquire a fourth template feature vector representation corresponding to the second trigger adjustment template based on the initial neural network; Obtaining a second sewer health state feature vector representation associated with the sewer health state associated with the second trigger adjustment template, and obtaining a second template commonality measurement result based on the second sewer health state feature vector representation, the third template feature vector representation, and the fourth template feature vector representation; The method further comprises: Adding an indication mark to the first monitoring data set corresponding to each smart manhole cover in the smart manhole cover network, and obtaining the smart manhole cover input data corresponding to each smart manhole cover in the smart manhole cover network; Loading the smart manhole cover input data corresponding to the first smart manhole cover in the smart manhole cover network into the optimized initial neural network, and obtaining the smart manhole cover feature vector representation corresponding to the first smart manhole cover based on the optimized initial neural network; The smart manhole cover feature vector representation corresponding to each smart manhole cover in the smart manhole cover network is obtained, and the smart manhole cover feature vector representation corresponding to each smart manhole cover is added to the smart manhole cover coding feature library.
6. The method according to claim 5, characterized in that The method further comprises: Based on the smart manhole cover feature vector representation in the smart manhole cover coding feature library and the past smart manhole cover sequences corresponding to the sewer health states in the sewer health state set, a third network calibration template of the state triggering warning network is constructed; Adjust the state trigger warning network based on the third network adjustment template to obtain the adjusted state trigger warning network; Among them, the debugging process of the state-triggered warning network includes a first process and a second process. The first process is used to calibrate the sequence prediction learning and terminate the calibration of the smart manhole cover feature vector representation; the second process is used to calibrate the smart manhole cover feature vector representation and terminate the calibration of the sequence prediction learning; the calibrated state-triggered warning network is used for state-triggered warning.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Ecological environment remote sensing data analysis method and system based on artificial intelligence
CN117421643A
Inspection well monitoring device and method based on convolutional neural network
CN117990162A