A training method and system for a control model for sewage treatment
By constructing a distribution model of underwater images and water quality information during the sewage treatment process and generating derived sample data, the problem of slow model fitting speed in the existing technology is solved, and a fast training and efficient sewage treatment control model is achieved.
Patent Information
- Application Number
- CN202311256973.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2043-09-27
AI Technical Summary
In the prior art, the model fitting speed is slow during sewage treatment, which is mainly due to the lack of sample data, which makes it impossible to quickly train the model.
By obtaining historical sample data, extract the feature values and water quality information of underwater images, build a distribution model of feature values and water quality information, generate derived sample data, and train the model based on these data.
By generating more sample data, the fitting speed and training effect of the model are significantly improved, so that the control model of sewage treatment can quickly adapt to changes and improve processing efficiency.
Smart Images

Figure CN118228835B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a training method and system for a control model for sewage treatment. Background Art
[0002] Sewage treatment (wastewater treatment) is the process of purifying sewage to meet the water quality requirements for discharge into a water body or reuse. Sewage treatment is widely used in various fields such as construction, agriculture, transportation, energy, petrochemicals, environmental protection, urban landscape, medical care, and catering, and is increasingly entering the daily lives of ordinary people.
[0003] In the prior art, during the sewage treatment process, the dosage of the medicine is mainly controlled based on human experience, and then the medicine is added according to the dosage. Therefore, in the prior art, a model is trained to automatically control the dosing of the medicine. However, the existing model training method requires a huge amount of data, and the solution in the prior art that uses historical data as data samples cannot meet the needs of fast model training. As a result, the model fitting speed is slow. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a training method and system for a control model for sewage treatment, so as to solve the problem of slow model fitting speed caused by lack of sample data in the prior art.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A training method for a control model for sewage treatment of the present invention comprises:
[0007] Acquire historical sample data collected at multiple historical time points, wherein the historical sample data includes historical underwater images, historical water quality information and dosage in the sewage pool;
[0008] Extracting characteristic values of a plurality of historical underwater images, wherein the characteristic values include suspended particle size and suspended particle quantity;
[0009] Constructing a first eigenvalue distribution model based on the eigenvalues of the multiple historical underwater images, and constructing a second eigenvalue distribution model based on the values of the multiple historical water quality information, wherein the first eigenvalue distribution model characterizes the corresponding relationship between the eigenvalue and the probability, and the second eigenvalue distribution model characterizes the corresponding relationship between the value of the water quality information and the probability;
[0010] Generate derived eigenvalues based on the first eigenvalue distribution model; generate derived water quality information based on the second eigenvalue distribution model; and construct derived sample data based on the derived eigenvalues and the derived water quality information, wherein the derived sample data includes manually marked dosage;
[0011] The called model is trained based on the historical sample data and the derived sample data to obtain a control model for sewage treatment.
[0012] In one embodiment of the present application, the historical water quality information includes pH value, water temperature, turbidity, total nitrogen, total phosphorus, inlet flow rate and outlet flow rate.
[0013] In one embodiment of the present application, extracting feature values of multiple historical underwater images includes:
[0014] Extracting contour features from historical underwater images;
[0015] When any contour feature meets the target conditions, the contour feature is used as the contour of the suspended particle, and the target conditions include: (1) the contour feature forms a closed figure; (2) the pixel value of the pixel point in the closed figure is within a preset pixel value range;
[0016] Determine the number of contours of suspended particles in each historical underwater image , the average area of suspended particles and the standard deviation of the area of suspended particles , and obtain the feature values of multiple historical underwater images.
[0017] In one embodiment of the present application, constructing a first eigenvalue distribution model based on the eigenvalues of the plurality of historical underwater images includes:
[0018] Counting the number of silhouettes of suspended particles in multiple historical underwater images The average and standard deviation , calculate the average area of suspended particles in multiple historical underwater images The average and standard deviation , and calculate the standard deviation of the area of suspended particles in multiple historical underwater images The average and standard deviation ;
[0019] Based on the average and the standard deviation Constructing the probability density function of the number of suspended particles , based on the average and the standard deviation Constructing the probability density function of the average area of suspended particles , and based on the average and the standard deviation Constructing the probability density function of the area variance of suspended particles ,in:
[0020]
[0021]
[0022] In the formula, is the number of suspended particles, is the probability corresponding to the number of suspended particles, is the average area of suspended particles, is the probability corresponding to the average area of suspended particles, is the area variance of suspended particles, is the probability of the area variance of suspended particles;
[0023] Based on the probability density function , the probability density function And the probability density function Construct the first eigenvalue distribution model.
[0024] In one embodiment of the present application, a second eigenvalue distribution model is constructed based on multiple values of historical water quality information, including:
[0025] Calculate the average value of each water quality factor in the plurality of historical water quality information and standard deviation ;
[0026] Based on the average and the standard deviation Construct the probability density function of each water quality factor ,in,
[0027]
[0028] In the formula, For the The values of water quality factors are For the The probability corresponding to the value of the water quality factor;
[0029] Based on the probability density function Construct the second eigenvalue distribution model.
[0030] In an embodiment of the present application, generating a derived eigenvalue based on the first eigenvalue distribution model includes:
[0031] Based on the probability density function , the probability density function And the probability density function Randomly generate multiple groups of suspended particle numbers, average area of suspended particles and average area variance of suspended particles;
[0032] Derived eigenvalues are constructed based on the number of randomly generated groups of suspended particles, the average area of the suspended particles, and the variance of the average area of the suspended particles.
[0033] In one embodiment of the present application, generating derived water quality information based on the second eigenvalue distribution model includes:
[0034] Based on the probability density function Randomly generate multiple sets of water quality factor values;
[0035] Derived water quality information is constructed based on the values of multiple sets of randomly generated water quality factors.
[0036] In an embodiment of the present application, training the called model based on the historical sample data and the derived sample data includes:
[0037] S1, preprocessing the historical sample data and the derived sample data to obtain standard data;
[0038] S2, using the dosage in the standard data as labels and other data as training data to construct a training data set;
[0039] S3, loading the training data in the training data set into the tensorflow model to obtain prediction data, wherein the loss function and optimizer parameters of the tensorflow model are pre-configured;
[0040] S4, calculating the error between the predicted data and the label, retaining the training data and the corresponding label when the error is less than or equal to a preset error threshold, and discarding the training data and the corresponding label when the error is greater than the preset error threshold;
[0041] S5, repeating steps S3-S4 until the loss function is less than a preset loss threshold, thereby obtaining a control model for sewage treatment.
[0042] In an embodiment of the present application, the historical sample data and the derived sample data are preprocessed to obtain standard data, including:
[0043] Filling missing values and removing noise from the historical sample data and the derived sample data to obtain first intermediate data;
[0044] Normalizing and aggregating the first intermediate data to obtain second intermediate data;
[0045] The second intermediate data is compressed to obtain standard data.
[0046] The present application also provides a training system for a control model for sewage treatment, comprising:
[0047] An acquisition module, used to acquire historical sample data collected at multiple historical time points, wherein the historical sample data includes historical underwater images, historical water quality information and dosage in the sewage pool;
[0048] A feature extraction module, used to extract feature values of a plurality of historical underwater images, wherein the feature values include the size and quantity of suspended particles;
[0049] A model building module, used to build a first eigenvalue distribution model based on the eigenvalues of the multiple historical underwater images, and to build a second eigenvalue distribution model based on the values of multiple historical water quality information, wherein the first eigenvalue distribution model represents the corresponding relationship between the eigenvalue and the probability, and the second eigenvalue distribution model represents the corresponding relationship between the value of the water quality information and the probability;
[0050] A data derivation module, for generating derived characteristic values based on the first characteristic value distribution model; generating derived water quality information based on the second characteristic value distribution model; and constructing derived sample data based on the derived characteristic values and the derived water quality information, wherein the derived sample data includes manually marked dosage;
[0051] The training module is used to train the called model based on the historical sample data and the derived sample data to obtain a control model for sewage treatment.
[0052] The beneficial effects of the present invention are as follows: the training method and system of the control model for sewage treatment of the present invention obtains historical sample data, analyzes the features in the historical sample data, calculates the distribution law of the characteristic values and water quality information in the historical sample data, and derives more sample data according to the distribution law. After artificial standardization of the sample data, a large amount of training data can be obtained. Therefore, the model can be quickly fitted after training with a large amount of data, so that the training effect is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0054] FIG1 is a flow chart of a method for training a control model for sewage treatment according to an embodiment of the present invention;
[0055] FIG. 2 is a structural diagram of a training system for a control model for sewage treatment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0057] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show the layers related to the present invention rather than being drawn according to the number, shape and size of the layers in actual implementation. In actual implementation, the type, quantity and proportion of each layer may be changed arbitrarily, and the layer layout may also be more complicated.
[0058] In the following description, numerous details are discussed to provide a more thorough explanation of embodiments of the present invention; however, it is apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details.
[0059] A training method and system for a control model for sewage treatment in the present application are applied in the field of computer management, and the execution object can be a computer, a mobile terminal or a server.
[0060] Figure 1 is a flow chart of a training method for a control model for sewage treatment shown in an embodiment of the present application, such as Figure 1 Shown: Included:
[0061] S110, obtaining historical sample data collected at multiple historical time points, wherein the historical sample data includes historical underwater images, historical water quality information and dosage in the sewage pool; the historical water quality information includes pH value, water temperature, turbidity, total nitrogen, total phosphorus, inlet flow rate and outlet flow rate.
[0062] S120, extracting characteristic values of a plurality of historical underwater images, wherein the characteristic values include the size of suspended particles and the number of suspended particles; wherein the characteristic values include the size of suspended particles and the number of suspended particles;
[0063] In one embodiment of the present application, extracting feature values of multiple historical underwater images includes:
[0064] Extracting contour features from historical underwater images;
[0065] When any contour feature meets the target conditions, the contour feature is used as the contour of the suspended particle, and the target conditions include: (1) the contour feature forms a closed figure; (2) the pixel value of the pixel point in the closed figure is within a preset pixel value range;
[0066] Determine the number of contours of suspended particles in each historical underwater image , the average area of suspended particles and the standard deviation of the area of suspended particles , and obtain the feature values of multiple historical underwater images.
[0067] S130, constructing a first eigenvalue distribution model based on the eigenvalues of the multiple historical underwater images, and constructing a second eigenvalue distribution model based on the values of the multiple historical water quality information, wherein the first eigenvalue distribution model represents the corresponding relationship between the eigenvalue and the probability, and the second eigenvalue distribution model represents the corresponding relationship between the value of the water quality information and the probability;
[0068] In one embodiment of the present application, constructing a first eigenvalue distribution model based on the eigenvalues of the plurality of historical underwater images includes:
[0069] Counting the number of silhouettes of suspended particles in multiple historical underwater images The average and standard deviation , calculate the average area of suspended particles in multiple historical underwater images The average and standard deviation , and calculate the standard deviation of the area of suspended particles in multiple historical underwater images The average and standard deviation ;
[0070] Based on the average and the standard deviation Constructing the probability density function of the number of suspended particles , based on the average and the standard deviation Constructing the probability density function of the average area of suspended particles , and based on the average and the standard deviation Constructing the probability density function of the area variance of suspended particles ,in:
[0071]
[0072]
[0073]
[0074] In the formula, is the number of suspended particles, is the probability corresponding to the number of suspended particles, is the average area of suspended particles, is the probability corresponding to the average area of suspended particles, is the area variance of suspended particles, is the probability of the area variance of suspended particles;
[0075] Based on the probability density function , the probability density function And the probability density function Construct the first eigenvalue distribution model.
[0076] This application obtains the distribution law of the eigenvalues by counting the average value and standard deviation of the eigenvalues in multiple historical sample data, and constructs a probability density model that conforms to the normal distribution through the average value and standard deviation. Among them, the probability density function Characterizes the probability of different numbers of suspended particles, the probability density function Characterizes the probability of different average sizes of suspended particles, the probability density function Characterizes the probability of different size uniformity of suspended particles.
[0077] In one embodiment of the present application, a second eigenvalue distribution model is constructed based on multiple values of historical water quality information, including:
[0078] Calculate the average value of each water quality factor in the plurality of historical water quality information and standard deviation ;
[0079] Based on the average and the standard deviation Construct the probability density function of each water quality factor ,in,
[0080]
[0081] In the formula, For the The values of water quality factors are For the The probability corresponding to the value of the water quality factor;
[0082] Based on the probability density function Construct the second eigenvalue distribution model.
[0083] This application constructs a probability density function that conforms to the normal distribution by counting the mean and standard deviation of water quality information in multiple historical sample data. .
[0084] S140, generating a derived eigenvalue based on the first eigenvalue distribution model; generating derived water quality information based on the second eigenvalue distribution model; and constructing derived sample data based on the derived eigenvalue and the derived water quality information, wherein the derived sample data includes manually marked dosage;
[0085] In an embodiment of the present application, generating a derived eigenvalue based on the first eigenvalue distribution model includes:
[0086] Based on the probability density function , the probability density function And the probability density function Randomly generate multiple groups of suspended particle numbers, average area of suspended particles and average area variance of suspended particles;
[0087] Derived eigenvalues are constructed based on the number of randomly generated groups of suspended particles, the average area of the suspended particles, and the variance of the average area of the suspended particles.
[0088] In one embodiment of the present application, generating derived water quality information based on the second eigenvalue distribution model includes:
[0089] Based on the probability density function Randomly generate multiple sets of water quality factor values;
[0090] Derived water quality information is constructed based on the values of multiple sets of randomly generated water quality factors.
[0091] The present application uses an established probability density model to randomly generate derived characteristic values and derived water quality information, wherein each time the derived characteristic values and derived water quality information are generated, the derived characteristic values and derived water quality information are compared with the existing data. When the derived characteristic values and derived water quality information are different from the existing data, they are saved and manually labeled to obtain derived data samples.
[0092] S150, training the called model based on the historical sample data and the derived sample data to obtain a control model for sewage treatment.
[0093] In an embodiment of the present application, training the called model based on the historical sample data and the derived sample data includes:
[0094] S1, preprocessing the historical sample data and the derived sample data to obtain standard data;
[0095] S2, using the dosage in the standard data as labels and other data as training data to construct a training data set;
[0096] S3, loading the training data in the training data set into the tensorflow model to obtain prediction data, wherein the loss function and optimizer parameters of the tensorflow model are pre-configured;
[0097] S4, calculating the error between the predicted data and the label, retaining the training data and the corresponding label when the error is less than or equal to a preset error threshold, and discarding the training data and the corresponding label when the error is greater than the preset error threshold;
[0098] S5, repeating steps S3-S4 until the loss function is less than a preset loss threshold, thereby obtaining a control model for sewage treatment.
[0099] In an embodiment of the present application, the historical sample data and the derived sample data are preprocessed to obtain standard data, including:
[0100] Filling missing values and removing noise from the historical sample data and the derived sample data to obtain first intermediate data;
[0101] Normalizing and aggregating the first intermediate data to obtain second intermediate data;
[0102] The second intermediate data is compressed to obtain standard data.
[0103] The training method of a control model for sewage treatment of the present invention obtains historical sample data, analyzes the features in the historical sample data, calculates the distribution law of the feature values and water quality information in the historical sample data, and derives more sample data according to the distribution law. After artificial standardization of the sample data, a large amount of training data can be obtained. Therefore, the model can be quickly fitted after training with a large amount of data, so that the training effect is better.
[0104] like Figure 2 As shown, the present application also provides a training system for a control model for sewage treatment, comprising:
[0105] An acquisition module, used to acquire historical sample data collected at multiple historical time points, wherein the historical sample data includes historical underwater images, historical water quality information and dosage in the sewage pool;
[0106] A feature extraction module, used to extract feature values of a plurality of historical underwater images, wherein the feature values include the size and quantity of suspended particles;
[0107] A model building module, used to build a first eigenvalue distribution model based on the eigenvalues of the multiple historical underwater images, and to build a second eigenvalue distribution model based on the values of multiple historical water quality information, wherein the first eigenvalue distribution model represents the corresponding relationship between the eigenvalue and the probability, and the second eigenvalue distribution model represents the corresponding relationship between the value of the water quality information and the probability;
[0108] A data derivation module, for generating derived characteristic values based on the first characteristic value distribution model; generating derived water quality information based on the second characteristic value distribution model; and constructing derived sample data based on the derived characteristic values and the derived water quality information, wherein the derived sample data includes manually marked dosage;
[0109] The training module is used to train the called model based on the historical sample data and the derived sample data to obtain a control model for sewage treatment.
[0110] The training system of the control model for sewage treatment of the present invention obtains historical sample data, analyzes the features in the historical sample data, calculates the distribution law of the feature values and water quality information in the historical sample data, and derives more sample data according to the distribution law. After artificial standardization of the sample data, a large amount of training data can be obtained. Therefore, the model can be quickly fitted after training with a large amount of data, so that the training effect is better.
[0111] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented, wherein the method is the execution logic of this system.
[0112] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0113] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.
[0114] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0115] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step of the above method.
[0116] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0117] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0118] In the above-mentioned embodiments, although the present invention has been described in conjunction with the specific embodiments of the present invention, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art according to the foregoing description. The embodiments of the present invention are intended to cover all such replacements, modifications and variations falling within the broad scope of the appended claims.
[0119] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A training method for a control model for sewage treatment, characterized in that: include: Acquire historical sample data collected at multiple historical time points, wherein the historical sample data includes historical underwater images, historical water quality information and dosage in the sewage pool; Extracting feature values of multiple historical underwater images, wherein the feature values include suspended particle size and suspended particle quantity; extracting feature values of multiple historical underwater images, including: extracting contour features in the historical underwater images; when any contour feature meets a target condition, using the contour feature as the contour of the suspended particle, wherein the target condition includes: (1) the contour feature forms a closed figure; (2) the pixel value of the pixel point in the closed figure is within a preset pixel value range; determining the number of contours of the suspended particles in each historical underwater image , the average area of suspended particles and the standard deviation of the area of suspended particles , obtain the characteristic values of multiple historical underwater images; A first eigenvalue distribution model is constructed based on the eigenvalues of the multiple historical underwater images, and a second eigenvalue distribution model is constructed based on the values of multiple historical water quality information, wherein the first eigenvalue distribution model characterizes the corresponding relationship between the eigenvalue and the probability, and the second eigenvalue distribution model characterizes the corresponding relationship between the value of the water quality information and the probability; constructing the first eigenvalue distribution model based on the eigenvalues of the multiple historical underwater images includes: calculating the number of contours of suspended particles in the multiple historical underwater images The average and standard deviation , calculate the average area of suspended particles in multiple historical underwater images The average and standard deviation , and calculate the standard deviation of the area of suspended particles in multiple historical underwater images The average and standard deviation ; Based on the average and the standard deviation Constructing the probability density function of the number of suspended particles , based on the average and the standard deviation Constructing the probability density function of the average area of suspended particles , and based on the average and the standard deviation Constructing the probability density function of the area variance of suspended particles ,in: In the formula, is the number of suspended particles, is the probability corresponding to the number of suspended particles, is the average area of suspended particles, is the probability corresponding to the average area of suspended particles, is the area variance of suspended particles, is the probability of the area variance of suspended particles; based on the probability density function , the probability density function And the probability density function Constructing a first eigenvalue distribution model; constructing a second eigenvalue distribution model based on the values of multiple historical water quality information, including: calculating the average value of each water quality factor in the multiple historical water quality information and standard deviation ; Based on the average and the standard deviation Construct the probability density function of each water quality factor ,in, In the formula, For the The values of water quality factors are For the The probability corresponding to the value of the water quality factor; based on the probability density function Constructing a second eigenvalue distribution model; Generate derived eigenvalues based on the first eigenvalue distribution model; generate derived water quality information based on the second eigenvalue distribution model; and construct derived sample data based on the derived eigenvalues and the derived water quality information, wherein the derived sample data includes manually marked dosages; generate derived eigenvalues based on the first eigenvalue distribution model, including: based on the probability density function , the probability density function And the probability density function Randomly generate the number of multiple groups of suspended particles, the average area of the suspended particles, and the average area variance of the suspended particles; construct derived eigenvalues based on the number of multiple groups of suspended particles, the average area of the suspended particles, and the average area variance of the suspended particles generated randomly; generate derived water quality information based on the second eigenvalue distribution model, including: based on the probability density function Randomly generate multiple sets of water quality factor values; construct derived water quality information based on the randomly generated multiple sets of water quality factor values; The called model is trained based on the historical sample data and the derived sample data to obtain a control model for sewage treatment.
2. A training method for a control model for sewage treatment according to claim 1, characterized in that: The historical water quality information includes pH value, water temperature, turbidity, total nitrogen, total phosphorus, inlet flow rate and outlet flow rate.
3. The training method of a control model for sewage treatment according to claim 1, characterized in that: The called model is trained based on the historical sample data and the derived sample data, including: S1, preprocessing the historical sample data and the derived sample data to obtain standard data; S2, using the dosage in the standard data as labels and other data as training data to construct a training data set; S3, loading the training data in the training data set into the tensorflow model to obtain prediction data, wherein the loss function and optimizer parameters of the tensorflow model are pre-configured; S4, calculating the error between the predicted data and the label, retaining the training data and the corresponding label when the error is less than or equal to a preset error threshold, and discarding the training data and the corresponding label when the error is greater than the preset error threshold; S5, repeating steps S3-S4 until the loss function is less than a preset loss threshold, thereby obtaining a control model for sewage treatment.
4. A training method for a control model for sewage treatment according to claim 3, characterized in that: Preprocessing the historical sample data and the derived sample data to obtain standard data includes: Filling missing values and removing noise from the historical sample data and the derived sample data to obtain first intermediate data; Normalizing and aggregating the first intermediate data to obtain second intermediate data; The second intermediate data is compressed to obtain standard data.
5. A training system for a control model for sewage treatment, characterized in that: include: An acquisition module, used to acquire historical sample data collected at multiple historical time points, wherein the historical sample data includes historical underwater images, historical water quality information and dosage in the sewage pool; A feature extraction module is used to extract feature values of multiple historical underwater images, wherein the feature values include the size of suspended particles and the number of suspended particles; extracting the feature values of multiple historical underwater images includes: extracting contour features in the historical underwater images; when any contour feature meets a target condition, using the contour feature as the contour of the suspended particle, wherein the target condition includes: (1) the contour feature forms a closed figure; (2) the pixel value of the pixel point in the closed figure is within a preset pixel value range; determining the number of contours of suspended particles in each historical underwater image , the average area of suspended particles and the standard deviation of the area of suspended particles , obtain the characteristic values of multiple historical underwater images; A model building module, for building a first eigenvalue distribution model based on the eigenvalues of the plurality of historical underwater images, and building a second eigenvalue distribution model based on the values of the plurality of historical water quality information, wherein the first eigenvalue distribution model characterizes the corresponding relationship between the eigenvalue and the probability, and the second eigenvalue distribution model characterizes the corresponding relationship between the value of the water quality information and the probability; building the first eigenvalue distribution model based on the eigenvalues of the plurality of historical underwater images, comprising: calculating the number of contours of suspended particles in the plurality of historical underwater images; The average and standard deviation , calculate the average area of suspended particles in multiple historical underwater images The average and standard deviation , and calculate the standard deviation of the area of suspended particles in multiple historical underwater images The average and standard deviation ; Based on the average and the standard deviation Constructing the probability density function of the number of suspended particles , based on the average and the standard deviation Constructing the probability density function of the average area of suspended particles , and based on the average and the standard deviation Constructing the probability density function of the area variance of suspended particles ,in: In the formula, is the number of suspended particles, is the probability corresponding to the number of suspended particles, is the average area of suspended particles, is the probability corresponding to the average area of suspended particles, is the area variance of suspended particles, is the probability of the area variance of suspended particles; based on the probability density function , the probability density function And the probability density function Constructing a first eigenvalue distribution model; constructing a second eigenvalue distribution model based on the values of multiple historical water quality information, including: calculating the average value of each water quality factor in the multiple historical water quality information and standard deviation ; Based on the average and the standard deviation Construct the probability density function of each water quality factor ,in, In the formula, For the The values of water quality factors are For the The probability corresponding to the value of the water quality factor; based on the probability density function Constructing a second eigenvalue distribution model; A data derivation module, for generating derived eigenvalues based on the first eigenvalue distribution model; generating derived water quality information based on the second eigenvalue distribution model; and constructing derived sample data based on the derived eigenvalues and the derived water quality information, wherein the derived sample data includes manually marked dosages; generating derived eigenvalues based on the first eigenvalue distribution model, including: based on the probability density function , the probability density function And the probability density function Randomly generate the number of multiple groups of suspended particles, the average area of the suspended particles, and the average area variance of the suspended particles; construct derived eigenvalues based on the number of multiple groups of suspended particles, the average area of the suspended particles, and the average area variance of the suspended particles generated randomly; generate derived water quality information based on the second eigenvalue distribution model, including: based on the probability density function Randomly generate multiple sets of water quality factor values; construct derived water quality information based on the randomly generated multiple sets of water quality factor values; The training module is used to train the called model based on the historical sample data and the derived sample data to obtain a control model for sewage treatment.
Citation Information
Patent Citations
Sewage quality prediction method and related device
CN115271232A
Sewage purification treatment agent dosage control system based on big data learning and image recognition
CN115367823A