Bromine valve control method, device and equipment based on visual identification and medium
Through the bromine valve control method based on visual recognition, the color space model and advanced process control software are used to realize automatic control of bromine valves, solving the problems of cumbersome and inaccurate manual adjustment, and improving reaction stability and product quality.
Patent Information
- Application Number
- CN202510150578.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, the adjustment of bromine valves mainly relies on manual observation of the color changes of the reactor, resulting in cumbersome operation, delayed adjustment, high labor intensity, easy errors, and easy to cause excessive or too little bromine, affecting reaction stability and product quality.
The bromine valve control method based on visual recognition is adopted. By obtaining real-time bromine reactor image data, the color space model is used to perform histogram equalization and color system deletion processing, the image picture is divided, the image color value is calculated, the median average value is calculated, and the range range conversion is used to generate control instructions to realize the automatic control and adjustment of bromine valves.
The automatic control of bromine valves is realized, which reduces the intensity of manual labor, avoids excessive or excessive bromine, improves the stability of the reaction and product quality, and unifies the operation of different teams, improving the anti-interference ability and robustness of the system.
Smart Images

Figure CN119934289A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual recognition technology, and in particular to a bromine valve control method, device, equipment and medium based on visual recognition. Background Art
[0002] At present, the color change of the bromination reactor is observed manually through the camera installed on site to judge the reaction degree and adjust the opening of the bromine inlet regulating valve. When there is too much bromine and too little trifluoroethylene, the red color in the reactor deepens until the whole reactor turns red, then the opening of the bromine inlet regulating valve is manually reduced to balance the reaction feed; when there is too much trifluoroethylene and too little bromine, the red color in the reactor decreases until the whole reactor is transparent, then the opening of the bromine inlet regulating valve is manually increased to balance the reaction feed. In daily production, the color change of the reactor is continuously observed by human eyes using a camera, and then the opening of the bromine inlet valve is adjusted based on manual experience. The adjustment process is cumbersome, the adjustment is delayed, the operation is labor-intensive (more than 300 operations per day), the operation is extensive, error-prone, safety is poor, it is easy to affect the subsequent production process, and the operation experience of each team is not unified, which affects the quality of the final product.
[0003] As can be seen from the above, how to achieve automatic control and adjustment of the bromine valve to avoid excessive or insufficient bromine caused by manual adjustment and improve the stability of the reaction and product quality are problems to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a bromine valve control method, device, equipment and medium based on visual recognition, which can realize automatic control and adjustment of the bromine valve, avoid the situation of excessive or insufficient bromine caused by manual adjustment, and improve the stability of the reaction and the quality of the product. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a bromine valve control method based on visual recognition, which is applied to a server and includes:
[0006] Acquire real-time video data of the bromination reactor;
[0007] Performing histogram equalization and color system deletion processing on the image data using a color space model to obtain processed image data, dividing the image screen in the processed image data according to coordinate points to obtain a plurality of coordinate images, and calculating corresponding image color values;
[0008] Calculating the median average of all the image color values, and performing range conversion on the median average within the initial range using local advanced process control software to obtain the median average within the target range;
[0009] A control instruction is generated based on the median average value within the target range and the regulating valve threshold, and the bromine valve is controlled and adjusted based on the control instruction using a pre-built control model.
[0010] Optionally, the step of obtaining real-time image data of the bromination reactor includes:
[0011] The image data of the bromination reactor is obtained from the control room according to a preset data transmission method; the data transmission method includes interface network cable, universal serial bus and wireless network transmission; the image data is the data after the initial image data of the scene is converted into photoelectric data.
[0012] Optionally, the using a color space model to perform histogram equalization and color system deletion processing on the image data to obtain the processed image data includes:
[0013] Performing histogram equalization on the image data using a color space model and based on an adaptive contrast equalization method to obtain corrected image data;
[0014] The blue color, the cyan color and part of the green color that meet the preset conditions in the corrected image data are deleted to obtain the processed image data.
[0015] Optionally, dividing the processed image frame in the image data according to the coordinate points to obtain a plurality of coordinate images, and calculating corresponding image color values, includes:
[0016] Dividing all image frames in the processed image data into a plurality of coordinate points according to the coordinate points to obtain a plurality of coordinate images, and selecting a target coordinate point that satisfies a preset color change;
[0017] The color value of the image at the target coordinate point is calculated using color space technology and adaptive contrast equalization correction technology to obtain the image color value.
[0018] Optionally, the using of local advanced process control software to perform range conversion on the median average within the initial range includes:
[0019] The script control component in the local advanced process control software and the preset range conversion coding language are used to perform range conversion on the median average value within the initial range.
[0020] Optionally, the generating of the control instruction based on the median average value within the target range and the regulating valve threshold value includes:
[0021] Using the historical trend component in the local advanced process control software to determine the relationship between the median average value and the control valve threshold within the target range;
[0022] A corresponding control instruction is generated based on the size relationship.
[0023] Optionally, the controlling and adjusting the bromine valve using a pre-built control model based on the control instruction includes:
[0024] Use model predictive control technology to build control models;
[0025] The control model is used to transmit the control instruction to the distributed control system, so that the distributed control system transmits the control instruction to the bromine valve to achieve control and regulation of the bromine valve.
[0026] In a second aspect, the present application discloses a bromine valve control device based on visual recognition, which is applied to a server and includes:
[0027] A data acquisition module, used to acquire real-time image data of the bromination reactor;
[0028] A screen division module, used for performing histogram equalization and color system deletion processing on the image data using a color space model to obtain the processed image data, dividing the image screen in the processed image data according to coordinate points to obtain a plurality of coordinate images, and calculating corresponding image color values;
[0029] A conversion module, used for calculating the median average of all the image color values, and performing range conversion on the median average within the initial range using local advanced process control software to obtain the median average within the target range;
[0030] The control module is used to generate a control instruction based on the median average value within the target range and the regulating valve threshold, and control and adjust the bromine valve based on the control instruction using a pre-built control model.
[0031] In a third aspect, the present application discloses an electronic device, comprising:
[0032] Memory, used to store computer programs;
[0033] A processor is used to execute the computer program to implement the aforementioned bromine valve control method based on visual recognition.
[0034] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned bromine valve control method based on visual recognition are implemented.
[0035] It can be seen that the present application provides a bromine valve control method based on visual recognition, including acquiring real-time image data of a bromination reactor; performing histogram equalization and color system deletion processing on the image data using a color space model to obtain the processed image data, dividing the image screen in the processed image data according to coordinate points to obtain multiple coordinate images, and calculating the corresponding image color values; calculating the median average of all the image color values, and using local advanced process control software to perform range conversion on the median average within the initial range to obtain the median average within the target range; generating control instructions based on the median average within the target range and the regulating valve threshold, and controlling and adjusting the bromine valve using a pre-constructed control model and based on the control instructions. The present application uses a color space model to perform histogram equalization and color system deletion processing on the image data, divides the image screen in the processed image data according to coordinate points, calculates the corresponding image color values, performs digital-to-analog conversion on the image data in the bromination reactor into a continuous floating-point digital signal, so that the reaction degree of the reactor is visualized and digitized, and uses advanced process control software to perform range conversion on the median average value within the initial range to obtain the median average value within the target range. Based on the median average value within the target range and the regulating valve threshold, a control instruction is generated to control and adjust the bromine valve, realize automatic control and adjustment of the bromine valve, reduce manual labor intensity, avoid excessive or insufficient bromine caused by manual adjustment, ensure the uniformity of the reaction product, and improve the stability of the reaction and product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A flow chart of a bromine valve control method based on visual recognition disclosed in this application;
[0038] Figure 2 A process flow chart of a bromination reaction disclosed in the present application;
[0039] Figure 3 A data connection relationship diagram disclosed in this application;
[0040] Figure 4 This is an example diagram of a color space disclosed in this application;
[0041] Figure 5 A diagram of an adaptive contrast equalization correction method disclosed in this application;
[0042] Figure 6 A model diagram of an advanced process controller disclosed in this application;
[0043] Figure 7 A program logic diagram of an advanced process controller disclosed in this application;
[0044] Figure 8 This is a schematic diagram of the structure of a bromine valve control device based on visual recognition disclosed in this application;
[0045] Fig. 9 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] At present, the color change of the bromination reactor is observed manually through a camera installed on site to judge the degree of reaction and adjust the opening of the bromine inlet regulating valve. When there is too much bromine and too little trifluoroethylene, the red color in the reactor deepens until the whole reactor turns red, then the opening of the bromine inlet regulating valve is manually reduced to balance the reaction feed again; when there is too much trifluoroethylene and too little bromine, the red color in the reactor decreases until the whole reactor is transparent, then the opening of the bromine inlet regulating valve is manually increased to balance the reaction feed again. In daily production, the color change of the reactor is continuously observed by human eyes using a camera, and then the opening of the bromine inlet valve is adjusted based on manual experience. The adjustment process is cumbersome, the adjustment is delayed, the operation labor intensity is high (more than 300 operations per day), the operation is extensive, error-prone, the safety is poor, it is easy to affect the subsequent production process, and the operation experience of each team is not unified, which affects the quality of the final product. As can be seen from the above, how to realize the automatic control and adjustment of the bromine valve, avoid the situation of excessive or insufficient bromine caused by manual adjustment, and improve the stability of the reaction and product quality are problems to be solved in this field.
[0048] See also Figure 1 As shown, the embodiment of the present invention discloses a bromine valve control method based on visual recognition, which is applied to a server and may specifically include:
[0049] Step S11: Acquire real-time image data of the bromination reactor.
[0050] In this embodiment, the image data of the bromination reactor is obtained from the control room according to a preset data transmission method; the data transmission method includes interface network cable, universal serial bus and wireless network transmission; the image data is the data after the initial image data of the scene is converted into photoelectric data.
[0051] In this embodiment, the process flow of the bromination reaction is as follows Figure 2 As shown, liquid bromine enters the evaporator through the bromination regulating valve, is heated and vaporized, and then enters the bromination reactor from the bottom to react with trifluoroethylene coming in from another route. Finally, the finished product 1,2-dibromo-1,1,2-trifluoroethane is produced from the top of the bromination reactor. To apply the technical solution of the present application, it is first necessary to use a camera installed on site to collect image data of the bromination reactor, and transmit it to the control room via optical fiber. After photoelectric conversion, it can be connected to the server using an interface network cable (such as an RJ45 interface network cable), USB (Universal Serial Bus) transmission, and WIFI (Wireless Fidelity) so that the server can obtain the image data of the bromination reactor. The data connection relationship is as follows: Figure 3 shown.
[0052] Step S12: Perform histogram equalization and color system deletion processing on the image data using a color space model to obtain the processed image data, divide the image frame in the processed image data according to coordinate points to obtain multiple coordinate images, and calculate the corresponding image color values.
[0053] In this embodiment, the image data is histogram equalized using a color space model and based on an adaptive contrast equalization method to obtain the corrected image data; the blue color, cyan color and part of the green color that meets preset conditions in the corrected image data are deleted to obtain the processed image data, and then all image frames in the processed image data are divided into multiple coordinate points according to the coordinate points to obtain multiple coordinate images, and a target coordinate point that meets the preset color change is selected; the color value of the image at the target coordinate point is calculated using color space technology and adaptive contrast equalization correction technology to obtain the image color value.
[0054] Specifically, after both parties have set a fixed IP (Internet Protocol Address), they can perform digital-to-analog conversion on the image data on the server, and perform histogram equalization and color system deletion on the image data through the HSV (Hue Saturation Value) color space model. HSV is a commonly used color space, also known as HSB. Different from the RGB (Red Green Blue) color space, the HSV color space is closer to the human visual system's perception of color. Examples of HSV color space are as follows: Figure 4 As shown, the Hue, Saturation, and Value / Brightness in the reactor are digitized to form a value from 0 to 360 degrees, and different values represent different colors. Due to the changes in ambient light at different times, there are certain brightness differences in the images acquired by the camera, which in turn affects the judgment of the color space. It is necessary to use an adaptive contrast equalization method to correct the images collected at different times. The adaptive contrast equalization method improves the local contrast of the image by performing histogram equalization on the local area of the image. In this way, the contrast of each area is improved without the problem of global over-enhancement or loss of details. The adaptive contrast equalization correction method is shown in Figure 5 shown.
[0055] In order to avoid the problem that 0 degrees and 360 degrees in the HSV color space represent red at the same time, this application deletes the blue and cyan colors and part of the green color that are impossible to appear in this device, selects the range intervals of 300 degrees to 0 degrees and 0 degrees to 150 degrees in the HSV color space, and avoids the jump from 360 degrees to 0 degrees, and automatically changes the numerical range to -30 to 150 degrees to represent the color changes in the reactor.
[0056] In order to more accurately capture the color image that can reflect the reaction degree of the reactor in the image, the entire image is divided into countless points according to the horizontal and vertical coordinates. Select multiple coordinate points that can reflect the best color change of the reactor, convert the value reflecting the color of the coordinate image according to the HSV color space technology and adaptive contrast balance correction technology, and calculate the median average of all values.
[0057] Step S13: Calculate the median average of all the image color values, and use the local advanced process control software to perform range conversion on the median average within the initial range to obtain the median average within the target range.
[0058] In this embodiment, the median average of all the image color values is calculated, and then the median average within the initial range is converted into a range using the script control component in the local advanced process control software and the preset range conversion coding language.
[0059] Specifically, the APC control software is used to perform range conversion on the median average value within the initial range to obtain the median average value within the target range, and the digital signal is read and stored in real time.
[0060] Since the definition of red in HSV color space is 0 degrees, in order to facilitate operators to more quickly understand the relationship between the color change of the reactor and the digital signal, the script control component in the APC software is used to convert the initial range of the median average from -30 to 150 to the target range of 180 to 0 in Python language. The red is converted from the original 0 to 150, and the blue is converted from the original -30 to 180. Therefore, when the amount of bromine in the reactor increases and the color is darker, the value obtained is larger.
[0061] Step S14: Generate a control instruction based on the median average value within the target range and the regulating valve threshold, and control and adjust the bromine valve based on the control instruction using a pre-built control model.
[0062] In this embodiment, the historical trend component in the local advanced process control software is used to determine the size relationship between the median average value within the target range and the control valve threshold; corresponding control instructions are generated based on the size relationship, and a control model is constructed using model predictive control technology; the control model is used to transmit the control instructions to the distributed control system so that the distributed control system transmits the control instructions to the bromine valve to achieve control and regulation of the bromine valve.
[0063] The historical trend component in the APC control software is used to analyze the size relationship between the median average value within the target range and the regulating valve threshold, and generate corresponding control instructions. The MPC (Model Predictive Control) is used to build a control model for the color of the bromine regulating valve and the bromination reactor. Finally, the control model outputs the control instructions and transmits them to the on-site bromine inlet valve through the DCS (Distributed Control System) to adjust the valve opening, thereby replacing manual operation and achieving the automatic control effect of the bromination reaction. The APC controller model is as follows: Figure 6 shown.
[0064] In this embodiment, after the reactor color is digitized, a control loop is established with the on-site regulating valve to have multiple control objects. The APC controller established using model predictive control technology in the present invention controls the on-site bromine inlet regulating valve; the control objects include: other on-site regulating valves; on-site switch valves; on-site machine pump frequency conversion signals, etc.
[0065] In addition, when the camera is offline or blocked, the historical trend component in the APC control software analyzes the digital signal and uses the Python language of the script control component for programming. For the digital signals that remain unchanged for a long time, it automatically determines that there is an obstruction blocking the camera and automatically reminds the operator. At the same time, the controller will not select the digital signal in this time period for APC control calculation. After it returns to the normal range, the APC control calculation will be performed again to ensure the safe production of the on-site reactor. The specific program logic is as follows: Figure 7 shown.
[0066] The present application uses visual recognition technology to transmit the image data of the reactor collected by the on-site camera to the server for real-time and continuous digital-to-analog conversion; combined with the actual situation on site, in order to reflect the best reaction effect, it is necessary to partition the image of the reactor and screen out the area that best reflects the reaction effect for digital-to-analog conversion; to avoid the influence of light and environmental brightness on the digital-to-analog conversion effect, it is necessary to automatically correct the brightness balance of the image; the digital signal converted by visual recognition technology, the color picture of the actual on-site reactor, and the reaction rate are combined to obtain the converted numerical setting range for the best reaction; the database and trend viewing module in the advanced control software are used to analyze and model the data of the action of the bromine inlet regulating valve and the color status of the reactor to obtain a model; during the operation of the controller, there may be objects blocking the camera or the camera may be disconnected, and relevant instrument error prevention measures need to be designed to automatically process data in the event of camera blocking or disconnection, so as to avoid reactor reaction imbalance.
[0067] The innovation of the present application lies in: using HSV color space technology to digitize the collected image data, and at the same time, in order to make the obtained digital information continuous, the 0 to 360 degrees of the HSV color space is changed to -30 to 150 degrees; using adaptive contrast balance correction technology, automatically collect images at different times for correction, so as to avoid errors in the calculation of reactor color changes caused by different ambient brightness; it is necessary to perform regional acquisition on the collected image pictures, exclude those regional images that are not related to the reactor reaction, and select those regional images that can accurately represent the degree of reaction, so as to ensure the accuracy of the data; when performing APC control operations, it has the function of automatically determining the camera being disconnected and blocked, so as to avoid the camera calculating wrong control instructions to the on-site bromine inlet regulating valve due to disconnection or blockage, thereby ensuring the safety of production. The advantages are: the automation degree of bromination reaction is improved, the labor intensity is reduced, and the number of operations is reduced from about 300 times a day to 0 times; after the reaction degree of the reactor is digitized and automated, the differences in the opening of the bromine inlet regulating valve controlled by different shifts are unified, the occurrence of excessive or insufficient bromine caused by manual adjustment is reduced, and the uniformity of the reaction products is ensured; the APC control of the bromine inlet regulating valve makes the reaction process control more accurate and sensitive, improves the stability of the reaction, improves product quality, strengthens the system's anti-interference ability, and enhances robustness.
[0068] In this embodiment, real-time image data of the bromination reactor is acquired; the image data is subjected to histogram equalization and color system deletion processing using a color space model to obtain the processed image data; the image screen in the processed image data is divided according to coordinate points to obtain a plurality of coordinate images, and the corresponding image color values are calculated; the median average of all the image color values is calculated, and the median average within the initial range is converted to a range using local advanced process control software to obtain the median average within the target range; a control instruction is generated based on the median average within the target range and a regulating valve threshold, and the bromine valve is controlled and adjusted using a pre-constructed control model and based on the control instruction. The present application uses a color space model to perform histogram equalization and color system deletion processing on the image data, divides the image screen in the processed image data according to coordinate points, calculates the corresponding image color values, performs digital-to-analog conversion on the image data in the bromination reactor into a continuous floating-point digital signal, so that the reaction degree of the reactor is visualized and digitized, and uses advanced process control software to perform range conversion on the median average value within the initial range to obtain the median average value within the target range. Based on the median average value within the target range and the regulating valve threshold, a control instruction is generated to control and adjust the bromine valve, realize automatic control and adjustment of the bromine valve, reduce manual labor intensity, avoid excessive or insufficient bromine caused by manual adjustment, ensure the uniformity of the reaction product, and improve the stability of the reaction and product quality.
[0069] See also Figure 8 As shown, the embodiment of the present invention discloses a bromine valve control device based on visual recognition, which is applied to a server and may specifically include:
[0070] A data acquisition module 11 is used to acquire real-time image data of the bromination reactor;
[0071] The image division module 12 is used to perform histogram equalization and color system deletion processing on the image data using a color space model to obtain the processed image data, divide the image frame in the processed image data according to coordinate points to obtain a plurality of coordinate images, and calculate the corresponding image color values;
[0072] The conversion module 13 is used to calculate the median average of all the image color values, and use the local advanced process control software to perform range conversion on the median average within the initial range to obtain the median average within the target range;
[0073] The control module 14 is used to generate a control instruction based on the median average value within the target range and the regulating valve threshold, and control and adjust the bromine valve based on the control instruction using a pre-built control model.
[0074] In this embodiment, real-time image data of the bromination reactor is acquired; the image data is subjected to histogram equalization and color system deletion processing using a color space model to obtain the processed image data; the image screen in the processed image data is divided according to coordinate points to obtain a plurality of coordinate images, and the corresponding image color values are calculated; the median average of all the image color values is calculated, and the median average within the initial range is converted to a range using local advanced process control software to obtain the median average within the target range; a control instruction is generated based on the median average within the target range and a regulating valve threshold, and the bromine valve is controlled and adjusted using a pre-constructed control model and based on the control instruction. The present application uses a color space model to perform histogram equalization and color system deletion processing on the image data, divides the image screen in the processed image data according to coordinate points, calculates the corresponding image color values, performs digital-to-analog conversion on the image data in the bromination reactor into a continuous floating-point digital signal, so that the reaction degree of the reactor is visualized and digitized, and uses advanced process control software to perform range conversion on the median average value within the initial range to obtain the median average value within the target range. Based on the median average value within the target range and the regulating valve threshold, a control instruction is generated to control and adjust the bromine valve, realize automatic control and adjustment of the bromine valve, reduce manual labor intensity, avoid excessive or insufficient bromine caused by manual adjustment, ensure the uniformity of the reaction product, and improve the stability of the reaction and product quality.
[0075] In some specific embodiments, the data acquisition module 11 may specifically include:
[0076] Image data acquisition is used to obtain image data of the bromination reactor from the control room in a data transmission manner; the data transmission manner includes interface network cable, universal serial bus and wireless network transmission; the image data is the data after the initial image data on site is photoelectrically converted.
[0077] In some specific embodiments, the picture division module 12 may specifically include:
[0078] A histogram equalization module, used for performing histogram equalization on the image data by using a color space model and based on an adaptive contrast equalization method to obtain the corrected image data;
[0079] The deletion processing module is used to delete the blue color, the cyan color and part of the green color that meets the preset conditions in the corrected image data to obtain the processed image data.
[0080] In some specific embodiments, the picture division module 12 may specifically include:
[0081] An image frame division module, used for dividing all image frames in the processed image data into a plurality of coordinate points according to the coordinate points to obtain a plurality of coordinate images, and selecting a target coordinate point that satisfies a preset color change;
[0082] The color value calculation module is used to calculate the color value of the image at the target coordinate point by using the color space technology and the adaptive contrast balance correction technology to obtain the image color value.
[0083] In some specific embodiments, the conversion module 13 may specifically include:
[0084] The range conversion module is used to perform range conversion on the median average value within the initial range by utilizing the script control component in the local advanced process control software and the preset range conversion coding language.
[0085] In some specific embodiments, the control module 14 may specifically include:
[0086] A size relationship judgment module, used for judging the size relationship between the median average value and the regulating valve threshold within the target range by using the historical trend component in the local advanced process control software;
[0087] A control instruction generating module is used to generate corresponding control instructions based on the size relationship.
[0088] In some specific embodiments, the control module 14 may specifically include:
[0089] A control model building module, used to build a control model using model predictive control technology;
[0090] The valve control and regulation module is used to transmit the control instruction to the distributed control system by using the control model, so that the distributed control system transmits the control instruction to the bromine valve to realize the control and regulation of the bromine valve.
[0091] Fig. 9A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the bromine valve control method based on visual recognition performed by the electronic device disclosed in any of the aforementioned embodiments.
[0092] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0093] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0094] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the bromine valve control method based on visual recognition performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the bromine valve control device based on visual recognition, the data 223 can also include data collected by its own input and output interface 25.
[0095] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0096] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the bromine valve control method based on visual recognition disclosed in any of the aforementioned embodiments are implemented.
[0097] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0098] The above is a detailed introduction to the bromine valve control method, device, equipment and storage medium based on visual recognition provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A bromine valve control method based on visual recognition, characterized in that: Applicable to servers, including: Acquire real-time video data of the bromination reactor; Using a color space model to perform histogram equalization and color system deletion processing on the image data to obtain processed image data, dividing the image screen in the processed image data according to coordinate points to obtain a plurality of coordinate images, and calculating corresponding image color values; Calculating the median average of all the image color values, and performing range conversion on the median average within the initial range using local advanced process control software to obtain the median average within the target range; A control instruction is generated based on the median average value within the target range and the regulating valve threshold, and the bromine valve is controlled and adjusted based on the control instruction using a pre-built control model.
2. The bromine valve control method based on visual recognition according to claim 1 is characterized in that: The step of obtaining real-time image data of the bromination reactor comprises: The image data of the bromination reactor is obtained from the control room according to a preset data transmission method; the data transmission method includes interface network cable, universal serial bus and wireless network transmission; the image data is the data after the initial image data of the scene is converted into photoelectric data.
3. The bromine valve control method based on visual recognition according to claim 1 is characterized in that: The using the color space model to perform histogram equalization and color system deletion processing on the image data to obtain the processed image data includes: Performing histogram equalization on the image data using a color space model and based on an adaptive contrast equalization method to obtain corrected image data; The blue color, the cyan color and part of the green color that meet the preset conditions in the corrected image data are deleted to obtain the processed image data.
4. The bromine valve control method based on visual recognition according to claim 1, characterized in that: The step of dividing the processed image frame in the image data according to the coordinate points to obtain a plurality of coordinate images and calculating corresponding image color values includes: Dividing all image frames in the processed image data into a plurality of coordinate points according to the coordinate points to obtain a plurality of coordinate images, and selecting a target coordinate point that satisfies a preset color change; The color value of the image at the target coordinate point is calculated using color space technology and adaptive contrast equalization correction technology to obtain the image color value.
5. The bromine valve control method based on visual recognition according to claim 1, characterized in that: The using of the local advanced process control software to convert the median average value within the initial range into a range includes: The script control component in the local advanced process control software and the preset range conversion coding language are used to perform range conversion on the median average value within the initial range.
6. The bromine valve control method based on visual recognition according to claim 1, characterized in that: The generating of the control instruction based on the median average value within the target range and the regulating valve threshold value comprises: Using the historical trend component in the local advanced process control software to determine the relationship between the median average value and the control valve threshold within the target range; A corresponding control instruction is generated based on the size relationship.
7. The bromine valve control method based on visual recognition according to any one of claims 1 to 6, characterized in that: The method of controlling and adjusting the bromine valve by using the pre-built control model and based on the control instruction includes: Use model predictive control technology to build control models; The control model is used to transmit the control instruction to the distributed control system, so that the distributed control system transmits the control instruction to the bromine valve to achieve control and regulation of the bromine valve.
8. A bromine valve control device based on visual recognition, characterized in that: Applicable to servers, including: A data acquisition module, used to acquire real-time image data of the bromination reactor; A screen division module, used for performing histogram equalization and color system deletion processing on the image data using a color space model to obtain the processed image data, dividing the image screen in the processed image data according to coordinate points to obtain a plurality of coordinate images, and calculating corresponding image color values; A conversion module, used for calculating the median average of all the image color values, and performing range conversion on the median average within the initial range using local advanced process control software to obtain the median average within the target range; The control module is used to generate a control instruction based on the median average value within the target range and the regulating valve threshold, and to control and adjust the bromine valve based on the control instruction using a pre-built control model.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the bromine valve control method based on visual recognition as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the bromine valve control method based on visual recognition as described in any one of claims 1 to 7 is implemented.