Water conservancy facility environment abnormal interference error correction method and device
By constructing the environmental error correlation model of each measurement unit of water conservancy facilities and using genetic algorithms to perform real-time correction, the problem of correcting monitoring data in complex environments is solved, and the accuracy and reliability of monitoring data is improved.
Patent Information
- Application Number
- CN202510308506.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Water conservancy facilities monitoring data is difficult to accurately correct under complex and dynamic environmental changes, and the prior art linear correction methods are not sufficient to cope with this situation.
Build an environmental error correlation model corresponding to each measurement unit of water conservancy facilities, obtain environmental data and measurement information in real time, determine environmental interference data, and use genetic algorithms to generate environmental error correlation model for real-time correction.
It improves the accuracy of measurement error prediction, realizes real-time correction of water conservancy facilities inspection data, reduces interference from irrelevant data, adapts to complex dynamic environments, and ensures accurate and reliable monitoring.
Smart Images

Figure CN120180130A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of water conservancy facilities, and particularly to a method and device for correcting environmental abnormal interference errors of water conservancy facilities. Background Art
[0002] Water conservancy facilities are one of the important infrastructure facilities, and their functions include flood control, irrigation, and hydropower generation, etc. Ensuring their stable and efficient operation is of great significance to social and economic development. However, during the operation of water conservancy facilities, obtaining accurate monitoring data is the key to maintaining their reliable operation.
[0003] In practical applications, monitoring data is often subject to multiple interferences from the external environment, such as environmental conditions like sudden changes in temperature, humidity changes, and air pressure fluctuations. These changes in environmental factors will cause fluctuations and offsets in the monitoring data, posing a severe challenge to the accuracy of the monitoring data. Existing technologies often adjust the monitoring data of water conservancy facilities based on simple linear correction, and this method often cannot effectively correct the monitoring data in the face of complex and dynamic environmental changes. Summary of the Invention
[0004] This application provides a method and device for correcting environmental abnormal interference errors of water conservancy facilities to solve the problems raised in the above background art.
[0005] In a first aspect, this application provides a method for correcting environmental abnormal interference errors of water conservancy facilities, including: Constructing an environmental error correlation model corresponding to each measurement unit of the water conservancy facility; Obtaining in real time the environmental data information of the environment around the water conservancy facility and the measurement information of the water conservancy facility; wherein, the measurement information includes the real-time measurement values of each measurement unit; For each real-time measurement value of the measurement information, determining the environmental interference data information of the real-time measurement value in the environmental data information based on the environment-related factor information of the real-time measurement value, and inputting the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value to obtain the real-time measurement error of the real-time measurement value, and performing real-time correction on the real-time measurement value based on the real-time measurement error; Among them, constructing an environmental error correlation model corresponding to each measurement unit of the water conservancy facility includes: For each measurement unit, obtaining the training data set of the measurement unit, and generating the environmental error correlation model corresponding to the measurement unit by using a preset genetic algorithm based on the training data set.
[0006] In a possible implementation, obtaining the training data set of the measurement unit and generating an environmental error correlation model corresponding to the measurement unit based on the training data set includes: Obtaining training environmental data information at multiple time points, and obtaining the measurement values of the measurement unit at each of the time points; For each of the time points, obtaining the high-precision measurement value corresponding to the time point, and subtracting the measurement value corresponding to the time point from the high-precision measurement value to obtain the error corresponding to the time point; For each of the time points, constructing a mapping relationship between the training environmental data information corresponding to the time point and the error; each of the mapping relationships constitutes the training data set; Based on the training data set composed of each of the mapping relationships, using a preset genetic algorithm to generate an environmental error correlation model corresponding to the measurement unit; Wherein, obtaining the high-precision measurement value corresponding to the time point includes: Constructing a virtual model corresponding to the water conservancy facility and the water body it is located in at the time point, and setting the virtual environment where the virtual model is located based on the training environmental data information at the time point; Replacing the virtual unit corresponding to the measurement unit in the virtual model with a high-precision virtual measurement unit matching the measurement unit, and obtaining the high-precision measurement value of the high-precision virtual measurement unit.
[0007] In a possible implementation, based on the training data set composed of each of the mapping relationships, using a preset genetic algorithm to generate an environmental error correlation model corresponding to the measurement unit includes: Respectively obtaining the Pearson correlation coefficients corresponding to each environmental feature of the training environmental data information based on the training data set; For each of the environmental features, comparing the absolute value of the Pearson correlation coefficient corresponding to the environmental feature with a preset threshold, and if the absolute value is greater than the preset threshold, determining the environmental feature as an environmental correlation factor of the measurement unit; each of the environmental correlation factors constitutes the environmental correlation factor information corresponding to the measurement unit; Based on the environmental correlation factor information, deleting the environmental features not included in the environmental correlation factor information from the training data set to obtain a target training data set; Based on the target training data set, using the genetic algorithm to train a preset initial neural network model to obtain the environmental error correlation model.
[0008] In a possible implementation, training the preset initial neural network model with the genetic algorithm based on the target training dataset to obtain the environmental error correlation model includes: Encoding the model parameters of the initial neural network model using a real number encoding method to obtain an initial chromosome; Generating an initial population based on the initial chromosome; wherein, the initial population includes multiple chromosomes; Calculating the fitness of each chromosome respectively based on a preset fitness calculation method; Selecting the first-generation chromosomes from each of the chromosomes based on the fitness of each chromosome to obtain a first-generation population; Performing population iterative evolution processing on the first-generation population until a target optimal chromosome is obtained; Updating the model parameters of the initial neural network model using the target optimal chromosome to obtain a target neural network model; Training the target neural network model based on the target training dataset to obtain the environmental error correlation model.
[0009] In a possible implementation, calculating the fitness of each chromosome respectively based on a preset fitness calculation method includes: For each chromosome, updating the model parameters of the initial neural network model based on the chromosome to obtain an intermediate neural network model corresponding to the chromosome, obtaining the mean square error of the intermediate neural network model based on the target training dataset, and taking the reciprocal of the sum of the mean square error and a preset harmonic value as the fitness of the chromosome.
[0010] In a possible implementation, selecting the first-generation chromosomes from each of the chromosomes based on the fitness of each chromosome to obtain a first-generation population includes: Determining the selection probability of each chromosome respectively based on the fitness of each chromosome; Generating the cumulative probability of each chromosome in sequence based on the selection probability of each chromosome and the sequence of each chromosome in the initial population to obtain a cumulative probability sequence; Generating a number of random numbers in the interval [0, 1); the number of the random numbers is not less than the number of the chromosomes; For each of the random numbers, determining the chromosome corresponding to the cumulative probability in the cumulative probability sequence that is first not less than the random number as the first-generation chromosome corresponding to the random number; Performing duplicate removal processing on all the first-generation chromosomes to obtain the first-generation population.
[0011] In a possible implementation, the population iterative evolution process for the first-generation population until the target optimal chromosome is obtained includes: Select the first-generation optimal chromosome from each of the first-generation chromosomes; wherein, the first-generation optimal chromosome is the first-generation chromosome with the highest fitness among each of the first-generation chromosomes; Based on a preset crossover algorithm, perform crossover processing on the first-generation optimal chromosome with each of the remaining first-generation chromosomes respectively to obtain a plurality of first gene crossover chromosomes, and perform mutation processing on the optimal chromosome based on a preset mutation algorithm to obtain a plurality of first gene mutation chromosomes. All the first gene crossover chromosomes, all the first gene mutation chromosomes, and the first-generation optimal chromosome form the second-generation population; Calculate the fitness of each second-generation chromosome of the second-generation population respectively based on a preset fitness calculation method; Determine the second-generation optimal chromosome from each of the second-generation chromosomes; wherein, the second-generation optimal chromosome is the second-generation chromosome with the highest fitness among each of the second-generation chromosomes; Judge whether the second-generation optimal chromosome is consistent with the first-generation optimal chromosome, and judge whether the fitness of the second-generation optimal chromosome is consistent with the fitness of the first-generation optimal chromosome; If the second-generation optimal chromosome is consistent with the first-generation optimal chromosome, and the fitness of the second-generation optimal chromosome is consistent with the fitness of the first-generation optimal chromosome, determine the second-generation optimal chromosome as the target optimal chromosome; If the second-generation optimal chromosome is inconsistent with the first-generation optimal chromosome, loop and iterate the steps after selecting the first-generation optimal chromosome from each of the first-generation chromosomes until the nth-generation optimal chromosome is consistent with the (n - 1)th-generation optimal chromosome, and the fitness of the nth-generation optimal chromosome is consistent with the fitness of the (n - 1)th-generation optimal chromosome, then determine the nth-generation optimal chromosome as the target optimal chromosome; If the second-generation optimal chromosome is consistent with the first-generation optimal chromosome, but the fitness of the second-generation optimal chromosome is inconsistent with the fitness of the first-generation optimal chromosome, loop and iterate the steps after selecting the first-generation optimal chromosome from each of the first-generation chromosomes until the nth-generation optimal chromosome is consistent with the (n - 1)th-generation optimal chromosome, and the fitness of the nth-generation optimal chromosome is consistent with the fitness of the (n - 1)th-generation optimal chromosome, then determine the nth-generation optimal chromosome as the optimal chromosome.
[0012] In a second aspect, the present application provides a water conservancy facility environmental anomaly interference error correction device, including: A construction module for constructing an environmental error correlation model corresponding to each measurement unit of a water conservancy facility; An acquisition module for acquiring in real time environmental data information of the environment around the water conservancy facility and measurement information of the water conservancy facility; wherein, the measurement information includes real-time measurement values of each of the measurement units; A calibration module for, for each real-time measurement value of the measurement information, determining environmental interference data information of the real-time measurement value in the environmental data information based on environmental correlation factor information of the real-time measurement value, inputting the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value, obtaining a real-time measurement error of the real-time measurement value, and performing real-time calibration on the real-time measurement value based on the real-time measurement error; Wherein, constructing an environmental error correlation model corresponding to each measurement unit of the water conservancy facility includes: For each of the measurement units, obtaining a training data set of the measurement unit, and generating an environmental error correlation model corresponding to the measurement unit by using a preset genetic algorithm.
[0013] The present application provides a method and device for correcting environmental abnormal interference errors of a water conservancy facility. The method includes: constructing an environmental error correlation model corresponding to each measurement unit of the water conservancy facility; acquiring in real time environmental data information of the environment around the water conservancy facility and measurement information of the water conservancy facility; wherein, the measurement information includes real-time measurement values of each of the measurement units; for each real-time measurement value of the measurement information, determining environmental interference data information of the real-time measurement value in the environmental data information based on environmental correlation factor information of the real-time measurement value, inputting the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value, obtaining a real-time measurement error of the real-time measurement value, and performing real-time calibration on the real-time measurement value based on the real-time measurement error. On the one hand, by constructing an environmental error correlation model for each measurement unit, this method helps to improve the accuracy of measurement error prediction. On the other hand, it realizes real-time calibration of the detection data of the water conservancy facility. On the further hand, for each of the real-time measurement values, by screening the environmental interference data information related to the real-time measurement value, the interference of irrelevant data is reduced, further improving the accuracy of measurement error prediction. This embodiment helps the water conservancy facility to effectively calibrate the monitoring data in the face of complex and dynamic environmental changes. Description of the Drawings
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0015] Figure 1 It is a schematic flowchart of the method for correcting the abnormal interference error of the water conservancy facility environment provided by the embodiment of the present application; Figure 2 It is a schematic block diagram of the structure of the device for correcting the abnormal interference error of the water conservancy facility environment provided by the embodiment of the present application; Figure 3 It is a schematic block diagram of the structure of the terminal device provided by the embodiment of the present application. Detailed implementation manners
[0016] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0017] The flowchart shown in the accompanying drawings is only an example, and does not necessarily include all contents and operations / steps, nor does it necessarily execute in the described order. For example, some operations / steps can be decomposed, combined, or partially merged, so the actual execution order may change according to the actual situation.
[0018] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of the present application and the appended claims, unless otherwise clearly specified in the context, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0019] It should be further understood that the term "and / or" used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0020] The following will describe in detail some embodiments of the present application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0021] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of the method for correcting the abnormal interference error of the water conservancy facility environment provided by the embodiment of the present application, asFigure 1 As shown, the method for correcting the environmental abnormal interference error of water conservancy facilities provided by the embodiments of the present application includes steps S1 to S3.
[0022] Step S1: Construct an environmental error correlation model corresponding to each measurement unit of the water conservancy facility.
[0023] Step S2: Real-time obtain the environmental data information of the environment around the water conservancy facility and the measurement information of the water conservancy facility; wherein, the measurement information includes the real-time measurement values of each of the measurement units.
[0024] Step S3: For each real-time measurement value of the measurement information, determine the environmental interference data information of the real-time measurement value in the environmental data information based on the environmental correlation factor information of the real-time measurement value, and input the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value to obtain the real-time measurement error of the real-time measurement value, and perform real-time correction on the real-time measurement value based on the real-time measurement error.
[0025] As described in step S1 above, construct an environmental error correlation model corresponding to each test unit of the water conservancy facility. Specifically, for each of the test units, obtain the training data set of the measurement unit, and based on the training data set, use a preset genetic algorithm to generate the environmental error correlation model corresponding to the measurement unit. Wherein, the test units include but are not limited to water level gauges, flow meters, rainfall gauges, water pressure sensors, etc.
[0026] As described in step S2 above, real-time obtain the environmental data information of the environment around the water conservancy facility and the measurement information of the water conservancy facility. Specifically, obtain the environmental data information of the environment around the water conservancy facility through a preset environmental data acquisition device, and the environmental data information includes meteorological data information and geological monitoring data information.
[0027] As described in step S3 above, for each real-time measurement value of the measurement information, based on the environment-related factor information of the real-time measurement value, determine the environmental interference data information of the real-time measurement value in the environmental data information, and input the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value to obtain the real-time measurement error of the real-time measurement value, and perform real-time correction on the real-time measurement value based on the real-time measurement error. It can be understood that for each real-time measurement value, not all environmental parameters in the environmental data information will affect the measurement accuracy of the real-time measurement value. If the environmental data information is directly input into the environmental error correlation model corresponding to the real-time measurement value, it will cause computational redundancy in the environmental error correlation model and affect the accuracy of the error result of the real-time measurement value. Therefore, in step S3, first determine the environmental interference data information of the real-time measurement value in the environmental data information based on the environment-related factor information of the real-time measurement value, and then input the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value to obtain the real-time measurement error of the real-time measurement value, where the environment-related factor information of the real-time measurement value is stored in a preset database, and during the process of constructing the environmental error correlation model of the real-time measurement value, generate the environment-related factor information of the real-time measurement value.
[0028] For the method provided in this embodiment, on the one hand, by constructing an environmental error correlation model for each measurement unit, it helps to improve the accuracy of measurement error prediction. On the other hand, it realizes the real-time correction of the detection data of water conservancy facilities. On the other hand, for each real-time measurement value, by screening the environmental interference data information related to the real-time measurement value, the interference of irrelevant data is reduced, and the accuracy of measurement error prediction is further improved. This embodiment helps water conservancy facilities to effectively correct the monitoring data in the face of complex and dynamic environmental changes.
[0029] In some embodiments, the steps of obtaining the training data set of the measurement unit and generating the environmental error correlation model corresponding to the measurement unit based on the training data set by using a preset genetic algorithm include the following steps: Obtain the training environmental data information at multiple time points, and obtain the measurement values of the measurement unit at each of the time points; For each of the time points, obtain the high-precision measurement value corresponding to the time point, and subtract the measurement value corresponding to the time point from the high-precision measurement value to obtain the error corresponding to the time point; For each of the time points, construct the mapping relationship between the training environmental data information corresponding to the time point and the error; each of the mapping relationships constitutes the training data set; Based on the training data set composed of each of the mapping relationships, a preset genetic algorithm is used to generate an environmental error correlation model corresponding to the measurement unit; Among them, the obtaining of the high-precision measurement value corresponding to the time point includes the following: Construct a virtual model corresponding to the water conservancy facility and the water body it is located in at the time point, and set the virtual environment where the virtual model is located based on the training environment data information at the time point; specifically, first collect the visual image, structured light image, and spectral image of the water conservancy facility and the water body it is located in, then construct a virtual framework of the water conservancy facility and the water body it is located in based on the structured light image and the spectral image, and finally render the virtual framework based on the visual image to obtain the virtual model; Replace the virtual unit corresponding to the measurement unit in the virtual model with a high-precision virtual measurement unit matching the measurement unit, and obtain the high-precision measurement value of the high-precision virtual measurement unit.
[0030] It can be understood that the method provided in this embodiment can accurately simulate the actual measurement scenario and obtain high-precision measurement values very close to the true values by replacing the virtual unit corresponding to the measurement unit in the virtual model with a high-precision virtual measurement unit matching the measurement unit, providing a reliable basis for constructing an environmental error correlation model.
[0031] In this embodiment, the generating of the environmental error correlation model corresponding to the measurement unit by using a preset genetic algorithm based on the training data set composed of each of the mapping relationships includes the following steps: Based on the training data set, respectively obtain the Pearson correlation coefficients corresponding to the environmental characteristics of the training environment data information; it should be noted that the calculation of the Pearson correlation coefficient belongs to the prior art and will not be elaborated here; For each of the environmental characteristics, compare the absolute value of the Pearson correlation coefficient corresponding to the environmental characteristic with a preset threshold. If the absolute value is greater than the preset threshold, determine the environmental characteristic as the environmental correlation factor of the measurement unit; each of the environmental correlation factors constitutes the environmental correlation factor information corresponding to the measurement unit. Based on the environmental correlation factor information, delete the environmental characteristics not included in the environmental correlation factor information from the training data set to obtain a target training data set; Based on the target training data set, use the genetic algorithm to train a preset initial neural network model to obtain the environmental error correlation model.
[0032] Understandably, the method provided in this embodiment can identify environmental features that have a significant impact on measurement errors by calculating the Pearson correlation coefficient of environmental features, which helps to improve the accuracy of the environmental error correlation model.
[0033] In this embodiment, training the preset initial neural network model using the genetic algorithm based on the target training dataset to obtain the environmental error correlation model includes the following steps: Encoding the model parameters of the initial neural network model using real number encoding to obtain an initial chromosome; it should be noted that the initial chromosome is a set composed of various network parameters of the initial neural network model; Generating an initial population based on the initial chromosome; wherein, the initial population includes multiple chromosomes; it should be noted that the initial population includes the initial chromosome, and generating the initial population based on the initial chromosome means generating multiple chromosomes in the form of the initial chromosome, the forms of the chromosomes in the initial population are the same, and the network parameters in each chromosome are all within the interval [-1, 1]. Smaller initial network parameters contribute to the stability of model training and can prevent the activation function from becoming oversaturated due to overly large initial network parameters; Calculating the fitness of each chromosome respectively based on a preset fitness calculation method; Selecting the first-generation chromosomes from each chromosome based on the fitness of each chromosome to obtain the first-generation population; Performing population iterative evolution processing on the first-generation population until a target optimal chromosome is obtained; Updating the model parameters of the initial neural network model using the target optimal chromosome to obtain a target neural network model; Training the target neural network model based on the target training dataset to obtain the environmental error correlation model.
[0034] Understandably, the method provided in this embodiment can effectively explore a wide parameter space through the evolutionary search strategy of the genetic algorithm, find the network parameter combination most suitable for error correction through the optimization process, and be able to jump out of local optima and pursue the global optimal solution. This enables the target neural network model to better fit the data, helps to improve the prediction accuracy of the environmental error correlation model, and further improves the correction accuracy.
[0035] In this embodiment, calculating the fitness of each chromosome respectively based on a preset fitness calculation method includes the following steps: For each of the chromosomes, update the model parameters of the initial neural network model based on the chromosome to obtain an intermediate neural network model corresponding to the chromosome, and obtain the mean squared error of the intermediate neural network model based on the target training data set. And take the reciprocal of the sum of the mean squared error and a preset harmonic value as the fitness of the chromosome. Wherein, the preset harmonic value is a positive integer close to 0, which is set to prevent the denominator from being 0. It should be noted that the calculation of the mean squared error is a prior art and will not be elaborated here.
[0036] In this embodiment, selecting the first-generation chromosomes from each of the chromosomes based on the fitness of each chromosome to obtain the first-generation population includes the following steps: Determine the selection probability of each chromosome based on the fitness of each chromosome; specifically, add up the fitnesses of each chromosome to obtain the sum of fitnesses; for each chromosome, take the ratio of the fitness of the chromosome to the sum of fitnesses as the selection probability of the chromosome; Generate the cumulative probability of each chromosome in sequence based on the selection probability of each chromosome and the sequence of each chromosome in the initial population to obtain a cumulative probability sequence; exemplarily, as shown in Table 1, the first column is the sequence of the chromosome, the second column is the selection probability of each chromosome, and the third column is the cumulative probability of each chromosome; Generate a number of random numbers in the interval [0, 1); the number of the random numbers is not less than the number of the chromosomes; For each of the random numbers, determine the chromosome corresponding to the cumulative probability in the cumulative probability sequence that is first not less than the random number as the first-generation chromosome corresponding to the random number; Perform duplicate removal processing on all the first-generation chromosomes to obtain the first-generation population.
[0037] In this embodiment, the population iterative evolution processing of the first-generation population until the target optimal chromosome is obtained includes the following steps: Select the first-generation optimal chromosome from each of the first-generation chromosomes; wherein, the first-generation optimal chromosome is the first-generation chromosome with the highest fitness among each of the first-generation chromosomes; Based on a preset crossover algorithm, perform crossover processing on the first-generation optimal chromosome with each of the remaining first-generation chromosomes to obtain a plurality of first gene crossover chromosomes, and perform mutation processing on the optimal chromosome based on a preset mutation algorithm to obtain a plurality of first gene mutation chromosomes. All the first gene crossover chromosomes, all the first gene mutation chromosomes, and the first-generation optimal chromosome form the second-generation population; Calculate the fitness of each second-generation chromosome of the second-generation population respectively based on a preset fitness calculation method; Determine the second-generation optimal chromosome among each of the second-generation chromosomes; wherein, the second-generation optimal chromosome is the second-generation chromosome with the highest fitness among each of the second-generation chromosomes; Judge whether the second-generation optimal chromosome is the same as the first-generation optimal chromosome, and judge whether the fitness of the second-generation optimal chromosome is the same as the fitness of the first-generation optimal chromosome; If the second-generation optimal chromosome is the same as the first-generation optimal chromosome, and the fitness of the second-generation optimal chromosome is the same as the fitness of the first-generation optimal chromosome, determine the second-generation optimal chromosome as the target optimal chromosome; If the second-generation optimal chromosome is different from the first-generation optimal chromosome, loop and iterate the steps after selecting the first-generation optimal chromosome among each of the first-generation chromosomes until the nth-generation optimal chromosome is the same as the (n - 1)th-generation optimal chromosome, and the fitness of the nth-generation optimal chromosome is the same as the fitness of the (n - 1)th-generation optimal chromosome, then determine the nth-generation optimal chromosome as the target optimal chromosome; If the second-generation optimal chromosome is the same as the first-generation optimal chromosome, but the fitness of the second-generation optimal chromosome is different from the fitness of the first-generation optimal chromosome, loop and iterate the steps after selecting the first-generation optimal chromosome among each of the first-generation chromosomes until the nth-generation optimal chromosome is the same as the (n - 1)th-generation optimal chromosome, and the fitness of the nth-generation optimal chromosome is the same as the fitness of the (n - 1)th-generation optimal chromosome, then determine the nth-generation optimal chromosome as the optimal chromosome.
[0038] The method provided in this embodiment locates the optimal chromosome through an iterative optimization strategy, realizing the refinement and high efficiency of the model. Compared with traditional methods, this solution adapts to complex dynamic environments, ensures the accuracy and reliability of water conservancy facility monitoring, reduces risks and improves system stability, and has high technical application value and broad promotion potential.
[0039] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of the water conservancy facility environmental anomaly interference error correction device 100 provided by an embodiment of the present application. As Figure 2 shown, the water conservancy facility environmental anomaly interference error correction device 100 provided by an embodiment of the present application includes: A construction module 110, configured to construct an environmental error correlation model corresponding to each measurement unit of the water conservancy facility.
[0040] An acquisition module 120 is configured to acquire in real time the environmental data information of the environment around the water conservancy facility and the measurement information of the water conservancy facility; wherein, the measurement information includes the real-time measurement values of each of the measurement units.
[0041] A calibration module 130 is configured to, for each real-time measurement value of the measurement information, determine the environmental interference data information of the real-time measurement value in the environmental data information based on the environment-related factor information of the real-time measurement value, input the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value to obtain the real-time measurement error of the real-time measurement value, and perform real-time calibration on the real-time measurement value based on the real-time measurement error.
[0042] Wherein, constructing the environmental error correlation model corresponding to each measurement unit of the water conservancy facility includes: For each of the measurement units, obtain the training data set of the measurement unit, and based on the training data set, use a preset genetic algorithm to generate the environmental error correlation model corresponding to the measurement unit.
[0043] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system and each module can refer to the corresponding processes in the foregoing embodiments of the method for correcting environmental abnormal interference errors of water conservancy facilities, and will not be elaborated herein.
[0044] The water conservancy facility environmental abnormal interference error correction device 100 provided in the above embodiment can be implemented in the form of a computer program, and this computer program can run on a terminal device 200 as shown in Figure 3 shown.
[0045] Please refer to Figure 3 , Figure 3 , which is a schematic block diagram of the structure of the terminal device 200 provided in the embodiment of the present application. The terminal device 200 includes a processor 201 and a memory 202. The processor 201 and the memory 202 are connected through a device bus 203. Among them, the memory 202 may include a non-volatile storage medium and an internal memory.
[0046] The non-volatile storage medium can store a computer program. This computer program includes program instructions. When the program instructions are executed by the processor 201, the processor 201 can be enabled to execute any of the above methods for correcting environmental abnormal interference errors of water conservancy facilities.
[0047] The processor 201 is configured to provide computing and control capabilities to support the operation of the entire terminal device 200.
[0048] The internal memory provides an environment for the operation of a computer program in a non-volatile storage medium. When the computer program is executed by the processor 201, the processor 201 can be caused to execute any of the above-mentioned water conservancy facility environment anomaly interference error correction methods.
[0049] Those skilled in the art can understand that Figure 3 The structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the terminal device 200 involved in the solution of this application. The specific terminal device 200 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0050] It should be understood that the processor 201 may be a central processing unit (CPU), and the processor 201 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0051] Among them, in some embodiments, the processor 201 is used to run a computer program stored in the memory to implement the following steps: Construct an environmental error correlation model corresponding to each measurement unit of the water conservancy facility; Obtain the environmental data information of the environment around the water conservancy facility and the measurement information of the water conservancy facility in real time; wherein, the measurement information includes the real-time measurement values of each of the measurement units; For each real-time measurement value of the measurement information, determine the environmental interference data information of the real-time measurement value in the environmental data information based on the environment-related factor information of the real-time measurement value, and input the environmental interference data information into the environmental error correlation model corresponding to the real-time measurement value to obtain the real-time measurement error of the real-time measurement value, and perform real-time correction on the real-time measurement value based on the real-time measurement error; Among them, the construction of the environmental error correlation model corresponding to each measurement unit of the water conservancy facility includes: For each of the measurement units, obtain the training data set of the measurement unit, and based on the training data set, use a preset genetic algorithm to generate the environmental error correlation model corresponding to the measurement unit.
[0052] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described terminal device 200 can refer to the corresponding process of the aforementioned method for correcting the abnormal interference error in the water conservancy facility environment, which will not be elaborated here.
[0053] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the one or more processors are caused to implement the method for correcting the abnormal interference error in the water conservancy facility environment provided by the embodiment of the present application.
[0054] Among them, the computer-readable storage medium may be an internal storage unit of the terminal device 200 in the foregoing embodiment, such as the hard disk or memory of the terminal device 200. The computer-readable storage medium may also be an external storage device of the terminal device 200, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped with the terminal device 200.
[0055] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present application, and these modifications or substitutions should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for correcting abnormal interference errors in water conservancy facilities environment, characterized in that: include: Construct the environmental error correlation model corresponding to each measurement unit of water conservancy facilities; Acquire in real time the environmental data information of the surrounding environment of the water conservancy facility and the measurement information of the water conservancy facility; wherein the measurement information includes the real-time measurement value of each of the measurement units; For each real-time measurement value of the measurement information, determine the environmental interference data information of the real-time measurement value in the environmental data information based on the environment-related factor information of the real-time measurement value, input the environmental interference data information into the environmental error association model corresponding to the real-time measurement value, obtain the real-time measurement error of the real-time measurement value, and perform real-time correction on the real-time measurement value based on the real-time measurement error; The construction of the environmental error correlation model corresponding to each measurement unit of the water conservancy facility includes: For each of the measurement units, a training data set of the measurement unit is obtained, and based on the training data set, a preset genetic algorithm is used to generate an environmental error association model corresponding to the measurement unit.
2. The method for correcting abnormal interference errors in water conservancy facilities environment according to claim 1, characterized in that: The step of acquiring a training data set of the measurement unit and generating an environmental error association model corresponding to the measurement unit using a preset genetic algorithm based on the training data set includes: Acquire training environment data information at multiple time points, and acquire measurement values of the measurement unit at each of the time points; For each of the time points, obtain a high-precision measurement value corresponding to the time point, and subtract the measurement value corresponding to the time point from the high-precision measurement value to obtain an error corresponding to the time point; For each of the time points, a mapping relationship between the training environment data information and the error corresponding to the time point is constructed; each of the mapping relationships constitutes the training data set; Based on a training data set composed of each of the mapping relationships, a preset genetic algorithm is used to generate an environmental error association model corresponding to the measurement unit; Wherein, obtaining the high-precision measurement value corresponding to the time point includes: Constructing a virtual model of the water conservancy facility and the water body in which it is located corresponding to the time point, and setting the virtual environment in which the virtual model is located based on the training environment data information at the time point; The virtual unit corresponding to the measuring unit in the virtual model is replaced by a high-precision virtual measuring unit matching the measuring unit, and a high-precision measurement value of the high-precision virtual measuring unit is obtained.
3. The method for correcting abnormal interference errors in water conservancy facilities environment according to claim 2, characterized in that: The method of generating an environmental error association model corresponding to the measurement unit based on a training data set composed of each of the mapping relationships by using a preset genetic algorithm includes: Based on the training data set, respectively obtain the Pearson correlation coefficient corresponding to each environmental feature of the training environment data information; For each of the environmental features, compare the absolute value of the Pearson correlation coefficient corresponding to the environmental feature with a preset threshold value, and if the absolute value is greater than the preset threshold value, determine that the environmental feature is the environmental related factor of the measurement unit; each of the environmental related factors constitutes the environmental related factor information corresponding to the measurement unit; Based on the environment-related factor information, deleting the environmental features not included in the environment-related factor information in the training data set to obtain a target training data set; Based on the target training data set, the preset initial neural network model is trained using the genetic algorithm to obtain the environmental error association model.
4. The method for correcting abnormal interference errors in water conservancy facilities environment according to claim 1, characterized in that: The method of training a preset initial neural network model based on the target training data set using the genetic algorithm to obtain the environmental error association model includes: Encoding the model parameters of the initial neural network model by real number encoding to obtain an initial chromosome; generating an initial population based on the initial chromosome; wherein the initial population includes a plurality of chromosomes; Calculating the fitness of each chromosome based on a preset fitness calculation method; Selecting a first generation chromosome from each of the chromosomes based on the fitness of each of the chromosomes to obtain a first generation population; Performing population iterative evolution processing on the first generation population until the target optimal chromosome is obtained; Using the target optimal chromosome to update the model parameters of the initial neural network model to obtain a target neural network model; The target neural network model is trained based on the target training data set to obtain the environmental error association model.
5. The method for correcting abnormal interference errors in water conservancy facilities environment according to claim 4, characterized in that: The fitness calculation method based on a preset fitness calculation method is used to calculate the fitness of each chromosome, including: For each of the chromosomes, the model parameters of the initial neural network model are updated based on the chromosome to obtain the intermediate neural network model corresponding to the chromosome, and the mean square error of the intermediate neural network model is obtained based on the target training data set, and the inverse of the sum of the mean square error and the preset harmonic value is used as the fitness of the chromosome.
6. The method for correcting abnormal interference errors in water conservancy facilities environment according to claim 4, characterized in that: The step of selecting a first generation chromosome from each of the chromosomes based on the fitness of each of the chromosomes to obtain a first generation population comprises: Determining the selection probability of each of the chromosomes based on the fitness of each of the chromosomes; Generate cumulative probabilities of the chromosomes in sequence based on the selection probabilities of the chromosomes and the sequences of the chromosomes in the initial population to obtain a cumulative probability sequence; Generate a number of random numbers in the interval [0, 1); the number of the random numbers is not less than the number of the chromosomes; For each of the random numbers, determine the chromosome corresponding to the first cumulative probability not less than the random number in the cumulative probability sequence as the first generation chromosome corresponding to the random number; All the first-generation chromosomes are deduplicated to obtain the first-generation population.
7. The method for correcting abnormal interference errors in water conservancy facilities environment according to claim 4, characterized in that: The performing population iterative evolution processing on the first generation population until obtaining the target optimal chromosome includes: Selecting the first-generation optimal chromosome from each of the first-generation chromosomes; wherein the first-generation optimal chromosome is the first-generation chromosome with the highest fitness among each of the first-generation chromosomes; Based on a preset crossover algorithm, the first-generation optimal chromosome is cross-processed with the remaining first-generation chromosomes to obtain a plurality of first gene crossover chromosomes, and based on a preset mutation algorithm, the optimal chromosome is mutated to obtain a plurality of first gene mutation chromosomes, and all the first gene crossover chromosomes, all the first gene mutation chromosomes and the first-generation optimal chromosome constitute a second-generation population; Calculating the fitness of each second-generation chromosome of the second-generation population based on a preset fitness calculation method; Determining the second-generation optimal chromosome among each of the second-generation chromosomes; wherein the second-generation optimal chromosome is the second-generation chromosome with the highest fitness among each of the second-generation chromosomes; Determine whether the second-generation optimal chromosome is consistent with the first-generation optimal chromosome, and determine whether the fitness of the second-generation optimal chromosome is consistent with the fitness of the first-generation optimal chromosome; If the second-generation optimal chromosome is consistent with the first-generation optimal chromosome, and the fitness of the second-generation optimal chromosome is consistent with the fitness of the first-generation optimal chromosome, determining the second-generation optimal chromosome as the target optimal chromosome; If the second-generation optimal chromosome is inconsistent with the first-generation optimal chromosome, the steps after selecting the first-generation optimal chromosome from each of the first-generation chromosomes are iterated in a loop until the n-th generation optimal chromosome is consistent with the n-1-th generation optimal chromosome, and the fitness of the n-th generation optimal chromosome is consistent with the fitness of the n-1-th generation optimal chromosome, and the n-th generation optimal chromosome is determined to be the target optimal chromosome; If the second-generation optimal chromosome is consistent with the first-generation optimal chromosome, but the fitness of the second-generation optimal chromosome is inconsistent with the fitness of the first-generation optimal chromosome, the steps after selecting the first-generation optimal chromosome from each of the first-generation chromosomes are iterated in a loop until the n-th generation optimal chromosome is consistent with the n-1-th generation optimal chromosome, and the fitness of the n-th generation optimal chromosome is consistent with the fitness of the n-1-th generation optimal chromosome, and the n-th generation optimal chromosome is determined to be the optimal chromosome.
8. A device for correcting abnormal interference errors in water conservancy facilities environment, characterized in that: include: A construction module is used to construct an environmental error correlation model corresponding to each measurement unit of a water conservancy facility; An acquisition module, used for acquiring in real time the environmental data information of the surrounding environment of the water conservancy facility and the measurement information of the water conservancy facility; wherein the measurement information includes the real-time measurement value of each of the measurement units; a correction module, configured to determine, for each real-time measurement value of the measurement information, environmental interference data information of the real-time measurement value in the environmental data information based on the environment-related factor information of the real-time measurement value, input the environmental interference data information into an environmental error association model corresponding to the real-time measurement value, obtain a real-time measurement error of the real-time measurement value, and perform real-time correction on the real-time measurement value based on the real-time measurement error; The environmental error correlation model corresponding to each measurement unit of the water conservancy facility is constructed, including: For each of the measurement units, a training data set of the measurement unit is obtained, and based on the training data set, a preset genetic algorithm is used to generate an environmental error association model corresponding to the measurement unit.