Artificial intelligence-based turbidity detection method, device, equipment and medium

CN122989541APending Publication Date: 2026-10-27SICHUAN PROVINCE AIRPORT GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610914036.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]有鉴于此,本申请的目的在于提供一种基于人工智能的浊度检测方法、装置、设备及介质,以改善现有技术中存在的浊度检测的精度相对不高的问题

Benefits of technology

[0014]本申请提供的基于人工智能的浊度检测方法、装置、设备及介质,首先,获取对进水进行图像采集形成的待检测进水图像、对清水进行图像采集形成的清水图像;其次,从待检测进水图像提取与浊度相关的浊度纹理特征;然后,在待检测进水图像中的语义编码的过程中,通过浊度纹理特征进行正向的引导,并通过清水图像或清水图像的纹理特征进行反向的引导,形成进水浊度编码向量,其中,正向的引导和反向的引导,用于捕捉相关的语义信息和不相关的语义信息;最后,对进水浊度编码向量进行语义解码,输出目标浊度检测结果。基于上述内容,一方面,由于会基于浊度纹理特征对待检测进水图像中的语义编码进行正向引导,使得能够有效地捕捉待检测进水图像中与浊度相关的语义信息,另一方面,由于会基于清水图像或清水图像的纹理特征对待检测进水图像中的语义编码进行反向引导,使得能够抑制待检测进水图像中与浊度不相关的语义信息,如此,可以使得形成的进水浊度编码向量对浊度相关的语义信息的表征准确度更高,从而保障语义解码得到的目标浊度检测结果的精度更高,因此,可以改善现有技术中存在的浊度检测的精度相对不高的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989541A_ABST
    Figure CN122989541A_ABST
Patent Text Reader

Abstract

The application provides an artificial intelligence-based turbidity detection method and device, equipment and medium, and relates to the technical field of data analysis.In the application, first, a to-be-detected water inlet image formed by image acquisition of the water inlet and a clear water image formed by image acquisition of the clear water are obtained.Second, turbidity texture features related to turbidity are extracted from the to-be-detected water inlet image.Then, in the process of semantic coding of the to-be-detected water inlet image, the turbidity texture features are used for forward guidance, and the clear water image or the texture features of the clear water image are used for reverse guidance to form a water inlet turbidity coding vector, wherein the forward guidance and the reverse guidance are used to capture relevant semantic information and irrelevant semantic information.Finally, the water inlet turbidity coding vector is subjected to semantic decoding, and a target turbidity detection result is output.Based on the above, the problem of relatively low precision of turbidity detection in the prior art can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis technology, and more specifically, to an artificial intelligence-based method, apparatus, device, and medium for turbidity detection. Background Technology

[0002] In conventional procedures, to ensure water quality compliance, the water source is manually tested by a water quality testing team before intake (i.e., turbidity testing, where turbidity refers to the degree of obstruction of light transmission by a solution, including the scattering of light by suspended matter and the absorption of light by solute molecules). Only water that meets the standards is allowed to enter the system, followed by secondary disinfection and pressurization before being supplied to the entire facility. However, manual testing is inefficient. Therefore, automated testing can be implemented, and if the test results do not meet requirements, the water intake channel can be shut off via a valve (e.g., ...). Figure 1 (As shown). However, the inventors discovered through research that conventional equipment testing has the problem of relatively low testing accuracy. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a turbidity detection method, apparatus, device and medium based on artificial intelligence, so as to improve the problem of relatively low accuracy of turbidity detection in the prior art.

[0004] To achieve the above objectives, this application adopts the following technical solution: An artificial intelligence-based turbidity detection method includes: The system acquires an image of the incoming water to be detected, formed by image acquisition of the incoming water, and an image of the clean water, formed by image acquisition of the clean water, wherein the clean water refers to water with turbidity less than a preset value. Extract turbidity texture features related to turbidity from the influent image to be detected; In the process of semantic encoding in the image of incoming water to be detected, the turbidity texture features are used for positive guidance, and the texture features of the clear water image or the clear water image are used for reverse guidance to form an incoming water turbidity encoding vector. The positive guidance and the reverse guidance are used to capture relevant semantic information and irrelevant semantic information, respectively. The influent turbidity encoding vector is semantically decoded to output the target turbidity detection result, which reflects the turbidity of the influent.

[0005] In a preferred embodiment of this application, in the aforementioned artificial intelligence-based turbidity detection method, the step of extracting turbidity-related texture features from the influent image to be detected includes: The image of water ingress to be detected is converted to grayscale to form a grayscale water ingress image, and the grayscale water ingress image is segmented to form multiple grayscale local water ingress images. The grayscale water inflow image is subjected to grayscale co-occurrence matrix determination processing to form a first grayscale co-occurrence matrix, and grayscale co-occurrence matrix determination processing is performed on each of the grayscale water inflow local images to form multiple local grayscale co-occurrence matrices; Based on the distribution relationship of the multiple grayscale local water inflow images in the grayscale water inflow image, the multiple local grayscale co-occurrence matrices are stitched together to form a second grayscale co-occurrence matrix; Based on the first gray-level co-occurrence matrix and the second gray-level co-occurrence matrix, a target gray-level co-occurrence matrix is ​​determined, and the target gray-level co-occurrence matrix is ​​determined as a turbidity texture feature.

[0006] In a preferred embodiment of this application, in the aforementioned artificial intelligence-based turbidity detection method, the step of forming an influent turbidity encoding vector by forward guidance through the turbidity texture features and reverse guidance through the texture features of the clear water image or the clear water image, during the semantic encoding process in the influent image to be detected, includes: Shallow semantic encoding is performed on the influent image to be detected, the turbidity texture feature, and the clear water image or the texture feature of the clear water image, respectively, to form corresponding influent encoding vector, turbidity texture encoding vector and clear water encoding vector; In the first deep semantic encoding, the water inlet encoding vector is guided in a positive direction based on the turbidity texture encoding vector to form a first positive encoding vector, and the first positive encoding vector is guided in a negative direction based on the clear water encoding vector to form a first negative encoding vector. In the second deep semantic encoding, the water inlet encoding vector is guided in reverse based on the clear water encoding vector to form a second reverse encoding vector, and the second reverse encoding vector is guided in forward based on the turbidity texture encoding vector to form a second forward encoding vector. Based on the first reverse encoding vector and the second forward encoding vector, the influent turbidity encoding vector is determined.

[0007] In a preferred embodiment of this application, in the aforementioned artificial intelligence-based turbidity detection method, the steps of forward guiding the influent coding vector based on the turbidity texture coding vector to form a first forward coding vector, and reverse guiding the first forward coding vector based on the clean water coding vector to form a first reverse coding vector, in the first deep semantic coding, include: Semantic information that is related to the turbidity texture encoding vector is extracted from the influent encoding vector to form an influent turbidity correlation vector, wherein the influent turbidity correlation vector focuses on representing the semantic information in the influent encoding vector that is related to the turbidity texture encoding vector; In the process of extracting the relevant semantic information between internal parameters from the influent coding vector, the influent turbidity correlation vector is used for positive guidance to form a first positive coding vector; Based on the water coding vector, the first forward coding vector is guided in reverse to form the first reverse coding vector.

[0008] In a preferred embodiment of this application, in the aforementioned artificial intelligence-based turbidity detection method, the step of forming a first positive encoding vector by positively guiding the extraction of the relevant semantic information between internal parameters from the influent encoding vector includes: The influent turbidity correlation vector is focused and mapped to form a focusing parameter matrix. Based on the focusing parameter matrix, the influent coding vector is focused and weighted to form an influent focused vector. The influent focused vector focuses on representing the semantic information corresponding to the important positions represented by the influent turbidity correlation vector in the influent coding vector. The semantic information related to the internal parameters is extracted from the water inflow focusing vector to form a first positive encoding vector.

[0009] In a preferred embodiment of this application, in the aforementioned artificial intelligence-based turbidity detection method, the steps of forward guiding the influent coding vector based on the turbidity texture coding vector to form a first forward coding vector, and reverse guiding the first forward coding vector based on the clean water coding vector to form a first reverse coding vector, in the first deep semantic coding, include: Based on the turbidity texture encoding vector, the water inflow encoding vector is positively guided to form a first positive encoding vector; Semantic information that is related to the water coding vector is extracted from the first forward coding vector to form a forward water-related vector, wherein the forward water-related vector focuses on representing the semantic information in the first forward coding vector that is related to the water coding vector; In the process of extracting the relevant semantic information between internal parameters from the first forward encoding vector, the forward water-related vector is used to guide the reverse process and form the first reverse encoding vector.

[0010] In a preferred embodiment of this application, in the aforementioned artificial intelligence-based turbidity detection method, the step of forming a first inverse encoding vector by reverse guidance through the positive clear water correlation vector during the process of extracting the relevant semantic information between internal parameters from the first forward encoding vector includes: The positive water-related vector is focused and mapped to form a focus parameter matrix. Based on the focus parameter matrix, the first positive encoding vector is focused and weighted to form a positive focus vector. The positive focus vector focuses on representing the semantic information corresponding to the important positions represented by the positive water-related vector in the first positive encoding vector. The positive focusing vector is inverted to form a positive inverted focusing vector, wherein the positive inverted focusing vector focuses on representing the semantic information corresponding to the non-important positions represented by the positive water-related vector in the first positive encoding vector. The semantic information related to the internal parameters is extracted from the forward inversion focusing vector to form the first inverse encoding vector.

[0011] This application also provides an artificial intelligence-based turbidity detection device, comprising: The image acquisition module is used to acquire the image of the incoming water to be detected formed by image acquisition of the incoming water, and to acquire the image of the clean water formed by image acquisition of the clean water, wherein the clean water refers to water with turbidity less than a preset value; The feature extraction module is used to extract turbidity texture features related to turbidity from the influent image to be detected; The encoding guidance module is used to guide the semantic encoding process in the influent image to be detected by using the turbidity texture features for positive guidance and the clear water image or the texture features of the clear water image for reverse guidance, so as to form an influent turbidity encoding vector. The positive guidance and the reverse guidance are used to capture relevant semantic information and irrelevant semantic information, respectively. The semantic decoding module is used to perform semantic decoding on the influent turbidity encoding vector and output the target turbidity detection result, wherein the target turbidity detection result is used to reflect the turbidity of the influent.

[0012] Based on the above, this application also provides an electronic device, including: Memory, used to store computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the above-described artificial intelligence-based turbidity detection method.

[0013] Based on the above, this application also provides a computer-readable storage medium storing a computer program that, when executed, performs the various steps of the artificial intelligence-based turbidity detection method described above.

[0014] The turbidity detection method, apparatus, device, and medium provided in this application, based on artificial intelligence, firstly acquire an image of the incoming water to be detected formed by image acquisition of the incoming water and an image of the clean water formed by image acquisition of the clean water; secondly, extract turbidity-related texture features from the image of the incoming water to be detected; then, in the process of semantic encoding in the image of the incoming water to be detected, positive guidance is provided by the turbidity texture features, and negative guidance is provided by the texture features of the clean water image or the clean water image, to form an incoming water turbidity encoding vector, wherein the positive and negative guidance are used to capture relevant and irrelevant semantic information; finally, the incoming water turbidity encoding vector is semantically decoded to output the target turbidity detection result. Based on the above, on the one hand, since the semantic encoding in the influent image to be detected is positively guided based on the turbidity texture features, the semantic information related to turbidity in the influent image to be detected can be effectively captured. On the other hand, since the semantic encoding in the influent image to be detected is negatively guided based on the texture features of the clear water image or the clear water image, the semantic information unrelated to turbidity in the influent image to be detected can be suppressed. In this way, the accuracy of the formed influent turbidity encoding vector in representing turbidity-related semantic information is higher, thereby ensuring that the target turbidity detection result obtained by semantic decoding is more accurate. Therefore, it can improve the problem of relatively low accuracy of turbidity detection in the existing technology. Attached Figure Description

[0015] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings.

[0016] Figure 1 This is a schematic diagram of a conventional water inlet control system.

[0017] Figure 2 A schematic diagram of an electronic device provided in an embodiment of this application.

[0018] Figure 3 This is a schematic diagram of an artificial intelligence-based turbidity detection method provided in an embodiment of this application.

[0019] Figure 4 This is a schematic diagram of an artificial intelligence-based turbidity detection device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0022] like Figure 2 As shown, this application provides an electronic device. The electronic device may include a memory, a processor, and an artificial intelligence-based turbidity detection device.

[0023] In detail, the memory and the processor are electrically connected directly or indirectly to enable data transmission or interaction. For example, the memory and the processor can be electrically connected via one or more communication buses or signal lines. The AI-based turbidity detection device includes at least one software functional module stored in the memory in the form of software or firmware. The processor is used to execute executable computer programs stored in the memory, such as the software functional modules and computer programs included in the AI-based turbidity detection device, to implement the AI-based turbidity detection method provided in the embodiments of this application.

[0024] Optionally, the memory may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0025] Optionally, the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc.; it may 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, or discrete hardware components.

[0026] Understandable Figure 1 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown may include, for example, a communication unit for interacting with other devices, such as image sensors.

[0027] Combination Figure 3 This application also provides an artificial intelligence-based turbidity detection method applicable to the aforementioned electronic device. The method steps defined in the process of the artificial intelligence-based turbidity detection method can be implemented by the electronic device. The following will describe... Figure 3 The specific process shown will be explained in detail.

[0028] Step S110: Obtain the image of the incoming water to be detected formed by image acquisition of the incoming water, and obtain the image of the clean water formed by image acquisition of the clean water.

[0029] In this embodiment of the application, the electronic device can acquire an image of the incoming water to be detected formed by image acquisition of the incoming water, and acquire an image of the clean water formed by image acquisition of the clean water. Here, clean water refers to water with a turbidity less than a preset value, which can be clean water determined by manual testing. The preset value can be 0.8, 0.7, 0.3, or 0.1 NTU (turbidity unit).

[0030] Step S120: Extract turbidity texture features related to turbidity from the influent image to be detected.

[0031] In this embodiment, after obtaining the image of the incoming water to be detected, the electronic device can extract turbidity texture features related to turbidity from the image. It should be noted that suspended particles in the water can alter the local grayscale distribution and light scattering intensity in the image, and these changes are directly reflected in the image texture features. Therefore, by extracting the corresponding texture structure or texture features, turbidity can be indirectly reflected.

[0032] In step S130, during the semantic encoding process in the influent image to be detected, the turbidity texture features provide positive guidance, and the clear water image or the texture features of the clear water image provide reverse guidance, thereby forming an influent turbidity encoding vector.

[0033] In this embodiment, after obtaining the turbidity texture features, the electronic device can, during the semantic encoding process in the influent image to be detected, use the turbidity texture features for forward guidance and the texture features of the clear water image or the clear water image for reverse guidance to form an influent turbidity encoding vector. The forward and reverse guidance are used to capture relevant and irrelevant semantic information, respectively. That is, it captures information in the influent image to be detected that is related to the turbidity texture features, and it captures semantic information in the influent image to be detected that is irrelevant to the texture features of the clear water image or the clear water image (the semantic information irrelevant to the texture features of the clear water image or the clear water image is actually semantic information related to turbidity; that is, it fully captures the turbidity-related semantic information in the influent image to be detected through both forward and reverse dimensions).

[0034] Step S140: Semantically decode the influent turbidity encoding vector and output the target turbidity detection result.

[0035] In this embodiment, after obtaining the influent turbidity encoding vector, the electronic device can perform semantic decoding on the influent turbidity encoding vector and output the target turbidity detection result. The target turbidity detection result reflects the turbidity status of the influent, such as the turbidity value. It should be noted that the semantic decoding and semantic encoding can be understood as two opposite processes, which can be implemented using trained decoding neural networks and encoding neural networks, respectively. For example, the decoding neural network can include a fully connected network layer and an output function. That is, the influent turbidity encoding vector can be processed through the fully connected network layer to obtain the corresponding influent turbidity fully connected vector. Then, the output function can be processed through the influent turbidity fully connected vector to obtain the corresponding target turbidity detection result. The output function can be an identity mapping function or a linear function, which can be selected according to actual needs.

[0036] Based on the above, on the one hand, since the semantic encoding in the influent image to be detected is positively guided based on the turbidity texture features, the semantic information related to turbidity in the influent image to be detected can be effectively captured. On the other hand, since the semantic encoding in the influent image to be detected is negatively guided based on the texture features of the clear water image or the clear water image, the semantic information unrelated to turbidity in the influent image to be detected can be suppressed. In this way, the accuracy of the formed influent turbidity encoding vector in representing turbidity-related semantic information is higher, thereby ensuring that the target turbidity detection result obtained by semantic decoding is more accurate. Therefore, it can improve the problem of relatively low accuracy of turbidity detection in the existing technology.

[0037] Firstly, regarding step S120, it should be noted that the specific method for extracting turbidity texture features related to turbidity from the image of the influent to be detected is not limited and can be selected according to actual needs.

[0038] For example, in an alternative implementation, in order to improve the effective characterization ability of the formed turbidity texture features for turbidity-related features, the above-mentioned step S120 may further include steps S121, S122, S123 and S124, as detailed below.

[0039] Step S121: Perform grayscale processing on the water inflow image to be detected to form a grayscale water inflow image, and perform segmentation processing on the grayscale water inflow image to form multiple grayscale local water inflow images.

[0040] In this embodiment, the image of water ingress to be detected can be converted to grayscale to form a grayscale water ingress image, and the grayscale water ingress image can be segmented to form multiple grayscale local water ingress images. The specific method of grayscale conversion can refer to relevant existing technologies. Furthermore, the step size and dimensions of the segmentation process can be selected according to actual needs. For example, to ensure effective extraction of texture features, the size of each grayscale local water ingress image can be greater than 32*32, i.e., both its length and width are greater than 32.

[0041] Step S122: Perform gray-level co-occurrence matrix determination processing on the grayscale water inflow image to form a first gray-level co-occurrence matrix, and perform gray-level co-occurrence matrix determination processing on each of the grayscale water inflow local images to form multiple local gray-level co-occurrence matrices.

[0042] In this embodiment, after obtaining the grayscale water inflow image and the grayscale local water inflow image, a grayscale co-occurrence matrix (GCMM) determination process can be performed on the grayscale water inflow image to form a first GCMM. Then, the GCMM determination process can be performed on each of the grayscale local water inflow images to form multiple local GCMMs. The process of determining the GCMM can refer to relevant existing technologies and will not be elaborated upon here.

[0043] Step S123: Based on the distribution relationship of the multiple grayscale water inflow local images in the grayscale water inflow image, the multiple local grayscale co-occurrence matrices are stitched together to form a second grayscale co-occurrence matrix.

[0044] In this embodiment of the application, after obtaining the local gray-level co-occurrence matrix, the multiple local gray-level co-occurrence matrices can be stitched together based on the distribution relationship of the multiple gray-level water inflow local images in the gray-level water inflow image to form a second gray-level co-occurrence matrix.

[0045] Step S124: Based on the first gray-level co-occurrence matrix and the second gray-level co-occurrence matrix, determine the target gray-level co-occurrence matrix, and determine the target gray-level co-occurrence matrix as a turbidity texture feature.

[0046] In this embodiment of the application, after obtaining the first gray-level co-occurrence matrix and the second gray-level co-occurrence matrix, a target gray-level co-occurrence matrix can be determined based on the first gray-level co-occurrence matrix and the second gray-level co-occurrence matrix, and the target gray-level co-occurrence matrix can be determined as a turbidity texture feature. For example, the first gray-level co-occurrence matrix and the second gray-level co-occurrence matrix can be superimposed or spliced ​​to obtain the target gray-level co-occurrence matrix.

[0047] Secondly, it should be noted that the specific method for forming the influent turbidity coding vector is not limited and can be selected according to actual needs.

[0048] For example, in an alternative implementation, in order to improve the accuracy of semantic encoding and guidance, and to make the semantic representation of the formed influent turbidity encoding vector more accurate, the above-mentioned step S130 may further include steps S131, S132, S133 and S134, the specific contents of each step are as follows.

[0049] Step S131: Perform shallow semantic encoding on the water ingress image to be detected, the turbidity texture feature, and the clear water image or the texture feature of the clear water image, respectively, to form corresponding water ingress encoding vector, turbidity texture encoding vector and clear water encoding vector.

[0050] In this embodiment, shallow semantic encoding can be performed on the image of the incoming water to be detected, the turbidity texture features, and the clear water image or the texture features of the clear water image, respectively, to form corresponding incoming water encoding vectors, turbidity texture encoding vectors, and clear water encoding vectors. Exemplarily, shallow semantic encoding can be implemented through convolutional network layers included in the encoding neural network. That is, convolution processing is performed on the image of the incoming water to be detected to obtain the incoming water encoding vector; convolution processing is performed on the turbidity texture features to obtain the turbidity texture encoding vector; and convolution processing is performed on the clear water image or the texture features of the clear water image (which can also be obtained by determining the gray-level co-occurrence matrix of the clear water image) to obtain the clear water encoding vector. In other words, relatively shallow semantic information in the relevant data can be captured through convolution processing.

[0051] Step S132: In the first deep semantic encoding, the water inlet encoding vector is guided in a positive direction based on the turbidity texture encoding vector to form a first positive encoding vector, and the first positive encoding vector is guided in a negative direction based on the clear water encoding vector to form a first negative encoding vector.

[0052] In this embodiment, after obtaining shallow semantic information, in order to achieve high-precision capture of semantic information and obtain higher-level semantic information, in the first deep semantic encoding, the water ingress encoding vector can be positively guided based on the turbidity texture encoding vector to form a first positive encoding vector, and the first positive encoding vector can be negatively guided based on the clear water encoding vector to form a first negative encoding vector. That is, positive guidance can be performed first, followed by negative guidance.

[0053] In step S133, in the second deep semantic encoding, the water inlet encoding vector is guided in reverse based on the clear water encoding vector to form a second reverse encoding vector, and the second reverse encoding vector is guided in forward based on the turbidity texture encoding vector to form a second forward encoding vector.

[0054] In this embodiment, after obtaining shallow semantic information, in order to achieve high-precision capture of semantic information and obtain advanced semantic information, in the second deep semantic encoding, the water ingress encoding vector can be guided in reverse based on the clear water encoding vector to form a second reverse encoding vector, and the second reverse encoding vector can be guided in forward based on the turbidity texture encoding vector to form a second forward encoding vector. That is, the reverse guidance can be performed first, followed by the forward guidance.

[0055] Step S134: Determine the influent turbidity encoding vector based on the first reverse encoding vector and the second forward encoding vector.

[0056] In this embodiment of the application, after obtaining the first reverse encoding vector and the second forward encoding vector, the influent turbidity encoding vector can be determined based on the first reverse encoding vector and the second forward encoding vector. For example, the first reverse encoding vector and the second forward encoding vector can be added, weighted averaged, or concatenated to obtain the influent turbidity encoding vector.

[0057] It is understood that the specific method of forming the first reverse encoding vector in step S132 above is not limited. For example, in an alternative implementation, in order to ensure the reliability of forward guidance, step S132 above may further include steps S132a, S132b and S132c, the specific contents of each step are as follows.

[0058] Step S132a: Extract semantic information that is related to the turbidity texture encoding vector from the influent encoding vector to form an influent turbidity correlation vector.

[0059] In this embodiment, semantic information related to the turbidity texture encoding vector can be extracted from the influent encoding vector to form an influent turbidity correlation vector. This influent turbidity correlation vector focuses on representing the semantic information in the influent encoding vector that is related to the turbidity texture encoding vector. For example, a cross-attention mechanism can be used to extract the related semantic information; for instance, the turbidity texture encoding vector can be mapped to a query vector, and the influent encoding vector can be mapped to a key vector and a value vector.

[0060] In step S132b, during the process of extracting the relevant semantic information between internal parameters from the influent coding vector, the influent turbidity correlation vector is used for positive guidance to form a first positive coding vector.

[0061] In this embodiment, after obtaining the influent turbidity correlation vector, a first positive coding vector can be formed by positively guiding the extraction of semantic information related to internal parameters from the influent coding vector. That is, since the influent turbidity correlation vector focuses on representing semantic information related to turbidity, it can be used to impose positive constraints, enabling more accurate extraction of turbidity-related semantic information from the influent coding vector. This makes the formed first positive coding vector more targeted in representing turbidity-related semantics.

[0062] Step S132c: Based on the water coding vector, the first forward coding vector is guided in reverse to form a first reverse coding vector.

[0063] In this embodiment of the application, after obtaining the water-based coding vector, the first forward coding vector can be reversed based on the water-based coding vector to form a first reverse coding vector. The reverse coding process can be described in detail below or can employ other relevant existing technologies.

[0064] It is understood that the specific method of forming the first forward coding vector in step S132b above is not limited. For example, in an alternative implementation, in order to obtain a first forward coding vector with higher accuracy through forward guidance, step S132b above may further include steps b1 and b2, the specific contents of each step are as follows.

[0065] Step b1 involves focusing and mapping the influent turbidity correlation vector to form a focusing parameter matrix, and then focusing and weighting the influent coding vector based on the focusing parameter matrix to form an influent focusing vector.

[0066] In this embodiment, the influent turbidity correlation vector can be focused and mapped to form a focusing parameter matrix. Based on the focusing parameter matrix, the influent coding vector is then focused and weighted to form an influent focused vector. The influent focused vector emphasizes the representation of semantic information corresponding to the important positions represented by the influent turbidity correlation vector within the influent coding vector. For example, the influent turbidity correlation vector can be processed using a gating mechanism to obtain the corresponding focusing parameter matrix. Then, the focusing parameter matrix and the influent coding vector can be multiplied bitwise to obtain the corresponding influent focused vector. In other words, semantic constraints or positive semantic guidance of the influent coding vector can be achieved through semantic focusing of the influent turbidity correlation vector.

[0067] Step b2: Extract the relevant semantic information between the internal parameters from the water inlet focusing vector to form the first positive encoding vector.

[0068] In this embodiment, after obtaining the inflow focusing vector, the relevant semantic information between the internal parameters can be extracted from the inflow focusing vector to form a first positive encoding vector. For example, self-attention processing can be applied to the inflow focusing vector to capture the relevant semantic information between the internal parameters, thus obtaining the first positive encoding vector. It should be noted that because constraint or focusing is performed first, the accuracy of extracting the relevant semantic information between the internal parameters can be ensured to be higher, i.e., the interference of interference information on the extraction of relevant semantic information can be reduced.

[0069] It is understood that the specific method of forming the first reverse encoding vector in step S132 above is not limited. For example, in an alternative implementation, in order to ensure the reliability of reverse guidance, step S132 above may further include steps S132d, S132e and S132f, the specific contents of each step are as follows.

[0070] Step S132d: Based on the turbidity texture encoding vector, the water inlet encoding vector is guided in a positive direction to form a first positive encoding vector.

[0071] In this embodiment of the application, the water inlet coding vector can be positively guided based on the turbidity texture coding vector to form a first positive coding vector. The positive guidance process can refer to the relevant description above, or other relevant existing technologies can be used.

[0072] Step S132e: Extract semantic information that is related to the water coding vector from the first forward coding vector to form a forward water correlation vector.

[0073] In this embodiment, after obtaining the first forward encoding vector, semantic information related to the clean water encoding vector can be extracted from the first forward encoding vector to form a positive clean water correlation vector. The positive clean water correlation vector focuses on representing the semantic information in the first forward encoding vector that is related to the clean water encoding vector. For example, the extraction of related semantic information can be achieved through a cross-attention mechanism; for instance, the clean water encoding vector can be mapped to a query vector, and the first forward encoding vector can be mapped to a key vector and a value vector.

[0074] In step S132f, during the process of extracting the relevant semantic information between internal parameters from the first forward encoding vector, the forward water-related vector is used to guide the reverse direction and form the first reverse encoding vector.

[0075] In this embodiment, after obtaining the positive water correlation vector, the process of extracting the semantic information related to the internal parameters from the first positive encoding vector can be reversed using the positive water correlation vector to form a first reverse encoding vector. That is, since the positive water correlation vector focuses on representing semantic information related to the water encoding vector, i.e., focusing on representing semantic information unrelated to turbidity, by reversed guidance—that is, guiding the extraction of turbidity-related semantic information from the first positive encoding vector—a first reverse encoding vector related to turbidity is obtained.

[0076] It is understood that the specific method of forming the first reverse encoding vector in step S132f above is not limited. For example, in an alternative implementation, in order to achieve reliable reverse guidance, step S132f above may further include steps f1, f2 and f3, wherein the specific contents of each step are as follows.

[0077] Step f1 involves performing a focus mapping on the positive water correlation vector to form a focus parameter matrix, and then, based on the focus parameter matrix, performing a focus weighting on the first positive encoding vector to form a positive focus vector.

[0078] In this embodiment, the positive water-related vector can be focused and mapped to form a focusing parameter matrix. Based on the focusing parameter matrix, the first positive encoding vector is then focused and weighted to form a positive focused vector. The positive focused vector emphasizes representing the semantic information corresponding to the important positions represented by the positive water-related vector in the first positive encoding vector. The focusing mapping and focusing weighting processes are described above and will not be repeated here.

[0079] Step f2 involves inverting the parameters of the positive focusing vector to form a positive inverted focusing vector.

[0080] In this embodiment, after obtaining the positive focusing vector, the positive focusing vector can be inverted (e.g., y (inverted value) = 1 - x (uninverted value)) to form a positive inverted focusing vector. The positive inverted focusing vector focuses on representing the semantic information corresponding to the non-important positions in the first positive encoding vector that are represented by the positive clear water correlation vector. It should be noted that since the positive focusing vector focuses on representing semantic information unrelated to turbidity, the positive focusing vector obtained through focusing mapping and focusing weighting also focuses on representing semantic information unrelated to turbidity. Thus, by performing parameter inversion, semantic information related to turbidity can be represented.

[0081] Step f3: Extract the relevant semantic information between the internal parameters from the forward inversion focusing vector to form the first inverse encoding vector.

[0082] In this embodiment, after obtaining the forward inversion focusing vector, the relevant semantic information between the internal parameters can be extracted from the forward inversion focusing vector to form a first inverse encoding vector. For example, self-attention processing can be used to extract the relevant semantic information between the internal parameters.

[0083] Combination Figure 4 This application also provides an AI-based turbidity detection device applicable to the aforementioned electronic devices. The AI-based turbidity detection device may include an image acquisition module, a feature extraction module, an encoding guidance module, and a semantic decoding module.

[0084] The image acquisition module is used to acquire an image of the incoming water to be detected formed by image acquisition of the incoming water, and to acquire an image of the clean water formed by image acquisition of the clean water, wherein clean water refers to water with turbidity less than a preset value. In this embodiment of the application, the image acquisition module can be used to perform... Figure 3 For details regarding the image acquisition module in step S110, please refer to the preceding description of step S110.

[0085] The feature extraction module is used to extract turbidity texture features related to turbidity from the influent image to be detected. In this embodiment, the feature extraction module can be used to perform... Figure 3 The details of step S120 shown above, and the relevant content regarding the feature extraction module, can be found in the preceding description of step S120.

[0086] The encoding guidance module is used to provide forward guidance through the turbidity texture features and reverse guidance through the texture features of the clear water image or the clear water image during the semantic encoding process in the influent image to be detected, forming an influent turbidity encoding vector. The forward and reverse guidance are used to capture relevant and irrelevant semantic information, respectively. In this embodiment, the encoding guidance module can be used to execute... Figure 3 The relevant content regarding the encoding guidance module in step S130 shown can be found in the previous description of step S130.

[0087] The semantic decoding module is used to perform semantic decoding on the influent turbidity encoding vector and output a target turbidity detection result, wherein the target turbidity detection result reflects the turbidity status of the influent. In this embodiment, the semantic decoding module can be used to perform... Figure 3 The relevant content regarding the semantic decoding module in step S140 shown can be found in the preceding description of step S140.

[0088] In this application embodiment, corresponding to the above-described artificial intelligence-based turbidity detection method applied to the electronic device, a computer-readable storage medium is also provided, which stores a computer program that executes the various steps of the artificial intelligence-based turbidity detection method when it runs.

[0089] The steps executed by the aforementioned computer program during runtime will not be described in detail here, but can be found in the explanation of the artificial intelligence-based turbidity detection method described above.

[0090] In summary, the turbidity detection method, apparatus, device, and medium based on artificial intelligence provided in this application firstly acquire an image of the incoming water to be detected formed by image acquisition of the incoming water and an image of the clean water formed by image acquisition of the clean water; secondly, extract turbidity-related texture features from the image of the incoming water to be detected; then, in the process of semantic encoding in the image of the incoming water to be detected, positive guidance is provided by the turbidity texture features, and negative guidance is provided by the texture features of the clean water image or the clean water image, to form an incoming water turbidity encoding vector, wherein the positive and negative guidance are used to capture relevant and irrelevant semantic information; finally, the incoming water turbidity encoding vector is semantically decoded to output the target turbidity detection result. Based on the above, on the one hand, since the semantic encoding in the influent image to be detected is positively guided based on the turbidity texture features, the semantic information related to turbidity in the influent image to be detected can be effectively captured. On the other hand, since the semantic encoding in the influent image to be detected is negatively guided based on the texture features of the clear water image or the clear water image, the semantic information unrelated to turbidity in the influent image to be detected can be suppressed. In this way, the accuracy of the formed influent turbidity encoding vector in representing turbidity-related semantic information is higher, thereby ensuring that the target turbidity detection result obtained by semantic decoding is more accurate. Therefore, it can improve the problem of relatively low accuracy of turbidity detection in the existing technology.

[0091] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0092] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0093] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0094] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A turbidity detection method based on artificial intelligence, characterized in that, include: The system acquires an image of the incoming water to be detected, formed by image acquisition of the incoming water, and an image of the clean water, formed by image acquisition of the clean water, wherein the clean water refers to water with turbidity less than a preset value. Extract turbidity texture features related to turbidity from the influent image to be detected; In the process of semantic encoding in the image of incoming water to be detected, the turbidity texture features are used for positive guidance, and the texture features of the clear water image or the clear water image are used for reverse guidance to form an incoming water turbidity encoding vector. The positive guidance and the reverse guidance are used to capture relevant semantic information and irrelevant semantic information, respectively. The influent turbidity encoding vector is semantically decoded to output the target turbidity detection result, which reflects the turbidity of the influent.

2. The turbidity detection method based on artificial intelligence according to claim 1, characterized in that, The step of extracting turbidity-related turbidity texture features from the influent image to be detected includes: The image of water ingress to be detected is converted to grayscale to form a grayscale water ingress image, and the grayscale water ingress image is segmented to form multiple grayscale local water ingress images. The grayscale water inflow image is subjected to grayscale co-occurrence matrix determination processing to form a first grayscale co-occurrence matrix, and grayscale co-occurrence matrix determination processing is performed on each of the grayscale water inflow local images to form multiple local grayscale co-occurrence matrices; Based on the distribution relationship of the multiple grayscale local water inflow images in the grayscale water inflow image, the multiple local grayscale co-occurrence matrices are stitched together to form a second grayscale co-occurrence matrix; Based on the first gray-level co-occurrence matrix and the second gray-level co-occurrence matrix, a target gray-level co-occurrence matrix is ​​determined, and the target gray-level co-occurrence matrix is ​​determined as a turbidity texture feature.

3. The turbidity detection method based on artificial intelligence according to claim 1 or 2, characterized in that, The step of forming an influent turbidity coding vector by using the turbidity texture features for positive guidance and the texture features of the clear water image or the clear water image for reverse guidance during the semantic encoding process in the influent image to be detected includes: Shallow semantic encoding is performed on the influent image to be detected, the turbidity texture feature, and the clear water image or the texture feature of the clear water image, respectively, to form corresponding influent encoding vector, turbidity texture encoding vector and clear water encoding vector; In the first deep semantic encoding, the water inlet encoding vector is guided in a positive direction based on the turbidity texture encoding vector to form a first positive encoding vector, and the first positive encoding vector is guided in a negative direction based on the clear water encoding vector to form a first negative encoding vector. In the second deep semantic encoding, the water inlet encoding vector is guided in reverse based on the clear water encoding vector to form a second reverse encoding vector, and the second reverse encoding vector is guided in forward based on the turbidity texture encoding vector to form a second forward encoding vector. Based on the first reverse encoding vector and the second forward encoding vector, the influent turbidity encoding vector is determined.

4. The turbidity detection method based on artificial intelligence according to claim 3, characterized in that, The steps of guiding the water ingress coding vector in the first deep semantic encoding, based on the turbidity texture coding vector, to form a first forward coding vector, and guiding the first forward coding vector in reverse, based on the clear water coding vector, to form a first reverse coding vector, include: Semantic information that is related to the turbidity texture encoding vector is extracted from the influent encoding vector to form an influent turbidity correlation vector, wherein the influent turbidity correlation vector focuses on representing the semantic information in the influent encoding vector that is related to the turbidity texture encoding vector; In the process of extracting the relevant semantic information between internal parameters from the influent coding vector, the influent turbidity correlation vector is used for positive guidance to form a first positive coding vector; Based on the water coding vector, the first forward coding vector is guided in reverse to form the first reverse coding vector.

5. The turbidity detection method based on artificial intelligence according to claim 4, characterized in that, The step of forming a first positive encoding vector by positively guiding the extraction of relevant semantic information between internal parameters from the influent encoding vector includes: The influent turbidity correlation vector is focused and mapped to form a focusing parameter matrix. Based on the focusing parameter matrix, the influent coding vector is focused and weighted to form an influent focused vector. The influent focused vector focuses on representing the semantic information corresponding to the important positions represented by the influent turbidity correlation vector in the influent coding vector. The semantic information related to the internal parameters is extracted from the water inflow focusing vector to form a first positive encoding vector.

6. The turbidity detection method based on artificial intelligence according to claim 3, characterized in that, The steps of guiding the water ingress coding vector in the first deep semantic encoding, based on the turbidity texture coding vector, to form a first forward coding vector, and guiding the first forward coding vector in reverse, based on the clear water coding vector, to form a first reverse coding vector, include: Based on the turbidity texture encoding vector, the water inflow encoding vector is positively guided to form a first positive encoding vector; Semantic information that is related to the water coding vector is extracted from the first forward coding vector to form a forward water-related vector, wherein the forward water-related vector focuses on representing the semantic information in the first forward coding vector that is related to the water coding vector; In the process of extracting the relevant semantic information between internal parameters from the first forward encoding vector, the forward water-related vector is used to guide the reverse process and form the first reverse encoding vector.

7. The turbidity detection method based on artificial intelligence according to claim 6, characterized in that, The step of extracting the relevant semantic information between internal parameters from the first forward encoding vector, and using the forward water-related vector for reverse guidance to form the first reverse encoding vector, includes: The positive water-related vector is focused and mapped to form a focus parameter matrix. Based on the focus parameter matrix, the first positive encoding vector is focused and weighted to form a positive focus vector. The positive focus vector focuses on representing the semantic information corresponding to the important positions represented by the positive water-related vector in the first positive encoding vector. The positive focusing vector is inverted to form a positive inverted focusing vector, wherein the positive inverted focusing vector focuses on representing the semantic information corresponding to the non-important positions represented by the positive water-related vector in the first positive encoding vector. The semantic information related to the internal parameters is extracted from the forward inversion focusing vector to form the first inverse encoding vector.

8. A turbidity detection device based on artificial intelligence, characterized in that, include: The image acquisition module is used to acquire the image of the incoming water to be detected formed by image acquisition of the incoming water, and to acquire the image of the clean water formed by image acquisition of the clean water, wherein the clean water refers to water with turbidity less than a preset value; The feature extraction module is used to extract turbidity texture features related to turbidity from the influent image to be detected; The encoding guidance module is used to guide the semantic encoding process in the influent image to be detected by forward guidance through the turbidity texture features and reverse guidance through the clear water image or the texture features of the clear water image, to form an influent turbidity encoding vector. The forward guidance and the reverse guidance are used to capture relevant semantic information and irrelevant semantic information, respectively. The semantic decoding module is used to perform semantic decoding on the influent turbidity encoding vector and output the target turbidity detection result, wherein the target turbidity detection result is used to reflect the turbidity of the influent.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the artificial intelligence-based turbidity detection method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, performs the artificial intelligence-based turbidity detection method according to any one of claims 1-7.