Anomaly detection method and system based on scene intelligent perception
Through scene intelligent sensing technology, real-time monitoring of the processing audio signals and spectrum data of CNC machine tools, combined with deep learning models, solves the problem of tool damage in CNC machine tools not being detected in time, and improves production efficiency and product quality.
Patent Information
- Application Number
- CN202410978213.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-22
AI Technical Summary
Existing CNC machine tools lack effective real-time monitoring methods during the machining process, resulting in tool damage not being detected in time, affecting production efficiency and product quality. Manual real-time inspection is costly and difficult to accurately judge minor defects.
Using an anomaly detection method based on scene intelligent perception, by collecting and processing audio signals and converting them into spectrum data, combined with the spectrum anomaly detection model and convolution model, the processing conditions of tools and mechanical originals can be monitored in real time, abnormal features can be identified and defect distribution probabilities can be generated. Real-time detection of cutting tools and mechanical components.
It enables real-time monitoring of cutting tools and mechanical components without frequent shutdowns during the processing process, reduces the processing time of a single mechanical component, improves production efficiency, and improves the detection accuracy of subtle defects.
Smart Images

Figure CN118521965B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of intelligent detection, and in particular, to an anomaly detection method and system based on scene intelligent perception. Background Art
[0002] With the continuous development of the mechanical field, more and more automation technologies are applied to the production and manufacturing links of mechanical equipment, such as welding between mechanical components, transportation of mechanical components, grasping of mechanical components, etc. After the use of automation technology in these links, not only the requirements in terms of precision are met, but also the efficiency is far higher than manual.
[0003] Especially in the field of manufacturing of mechanical parts, such mechanical parts usually need to be processed by a pre-processed mechanical original, and the processing tools include various cutting tools, friction stirring rods, etc. This application mainly focuses on the production and manufacturing of mechanical parts processed by cutting tools. Processing mechanical parts with CNC cutting tools usually requires setting a variety of processing parameters, such as tool position parameters, time node parameters, change instructions, mechanical original position parameters, rotation parameters and pressure parameters, etc. Through intelligent automated production and manufacturing, CNC tool processing of mechanical parts far exceeds manual processing in terms of accuracy and efficiency.
[0004] However, with the continuous improvement of the automation level of CNC machine tools, it becomes very necessary to monitor the processing links of tools and mechanical components. If the monitoring of the processing links of tools and mechanical components is not designed, it is possible that the tool will be damaged without being detected in time. At this time, if the processing continues, not only will a large number of unqualified products appear, but in serious cases, the tool will be further damaged, resulting in damage to other parts of the CNC machine tool. The existing methods for monitoring CNC machine tools in the manufacturing process include manual real-time inspection. Manual real-time inspection is mainly carried out on finished products or semi-finished products. By observing the status of finished products and semi-finished products, it is judged whether the tool has defects. This method is indeed effective for producing a small number of products, but once a large number of products need to be produced, it is easy to cause fatigue, increase labor costs, and for the slight damage defects of the tool, manual observation cannot accurately judge the defects on precision products. In order to ensure the accuracy of monitoring, inspectors need to increase the inspection time.
[0005] In order to solve the above problems, people began to use artificial intelligence to monitor the production and manufacturing process, and analyze the defects of the tool shape through the deep learning model to determine whether the tool has defects. At present, there are certain detection defects for the deep learning model. In the process of tool processing mechanical parts, if detection is required, the real-time shooting image of the tool needs to be detected through the deep learning model detection. During this period, the processing equipment needs to be suspended, and high-resolution lenses and cameras need to be used for close-up shooting. However, since the cutting and filing between the tool and the mechanical original will generate a lot of heat, and the damage to the tool is usually very subtle, it will affect the quality of the captured image to a certain extent, resulting in errors in the subsequent model detection results. At this time, in order to ensure accurate detection, it is necessary to wait for the tool of the processing equipment to cool down before shooting. This means that every once in a while, or after processing a mechanical original, the equipment needs to be suspended for cooling and image collection. The processing time of a single mechanical original is greatly increased, thereby reducing the efficiency of the mechanical original manufacturing production process. Summary of the invention
[0006] The present application discloses an abnormality detection method and system based on scene intelligent perception, which are used to improve the efficiency of the mechanical original component manufacturing production process.
[0007] The first aspect of the present application discloses an anomaly detection method based on scene intelligent perception, comprising:
[0008] Collecting a processing audio signal of the processing equipment when using the target tool to process the mechanical original part, the processing audio signal is an audio signal of the target tool processing the mechanical original part;
[0009] Collect the processing audio signals of the processing equipment when using the target tool to process the mechanical original, including:
[0010] A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool;
[0011] Collecting a first audio signal through a processed audio collection port;
[0012] Collecting a second audio signal through an ambient audio collection port;
[0013] Scaling the second audio signal according to a first distance, a second distance and a third distance, wherein the first distance is the relative distance between the processing audio collection port and the environmental audio collection port, the second distance includes the relative distance between the rotor plane and the processing audio collection port and the environmental audio collection port, and the third distance is the relative distance between the processing audio collection port and the tool;
[0014] Using the scaled second audio signal to perform noise reduction processing on the first audio signal to generate a processed audio signal;
[0015] Converting the processed audio signal into target spectrum data;
[0016] Dividing the target spectrum data into regions according to the tool processing stage, the tool processing stage including the initial contact stage, the flat displacement processing stage, the deep displacement processing stage and / or the extraction processing stage;
[0017] The divided target spectrum data are respectively input into the spectrum anomaly detection model to generate spectrum analysis results. The spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data;
[0018] When the spectrum analysis results show that there is a spectrum anomaly, the processing equipment is stopped, the target tool is photographed, and a real-time image of the tool is generated;
[0019] The real-time image of the tool is input into the tool defect detection convolution model to generate the tool defect distribution probability. The tool defect detection convolution model is used to identify the abnormal defect features appearing on the tool;
[0020] Generate tool status results based on tool defect distribution probability.
[0021] Optionally, after stopping the processing equipment, photographing the target tool, and generating a real-time image of the tool, the real-time image of the tool is input into a tool defect detection convolution model, and before generating a tool defect distribution probability, the anomaly detection method further includes:
[0022] Acquire at least one tool defect image of the target tool, where the tool defect image is a photographed image of tools of the same model of the target tool but with different types of defects;
[0023] At least one tool defect image and a tool real-time image are input into a defect feature fusion generator for defect feature fusion processing. The defect feature fusion generator is used to fuse the defect features of the tool defect image into the tool real-time image.
[0024] Optionally, at least one tool defect image and a tool real-time image are input into a defect feature fusion generator for defect feature fusion processing, including:
[0025] Use a 3*3 convolution kernel to perform convolution operation on the real-time image of the tool to generate tool features;
[0026] Use a 3*3 convolution kernel to perform convolution operation on the tool defect image to generate defect features;
[0027] Performing regional pixel weight generation processing on tool features to generate weight features;
[0028] Multiply the tool feature and the weight feature according to the channel to generate a first superposition feature;
[0029] Generate a channel vector for the first superimposed feature through a global average pooling;
[0030] Perform channel compression processing on the channel vector;
[0031] Generate attention weight parameters for each feature channel in the channel vector;
[0032] Channel superposition of defect features and tool features is performed according to attention weight parameters to generate a second superposition feature;
[0033] Reconstructing the feature length and width of the second superimposed feature through the first deconvolution module to generate a reconstructed feature;
[0034] Generate an attention matrix for reconstructing features, and set the features whose attention is less than a preset threshold to zero according to the attention matrix;
[0035] The reconstructed features are restored and output through the output module Conv_out to regenerate the real-time image of the tool.
[0036] Optionally, after acquiring at least one tool defect image of the target tool, before inputting at least one tool defect image and the tool real-time image into the defect feature fusion generator for defect feature fusion processing, the anomaly detection method further includes:
[0037] Determine the abnormal processing stage based on the spectrum abnormality analysis results;
[0038] Determine the abnormal processing area of the mechanical component according to the abnormal processing stage, use a photographing device to photograph the abnormal processing area of the mechanical component, and generate a real-time image of the mechanical component;
[0039] Input the real-time image of the mechanical component into the mechanical component anomaly detection model to generate the product defect distribution probability. The mechanical component anomaly detection model is used to identify the processing defects on the mechanical component.
[0040] Determine the type of product defects that are greater than a preset threshold based on the probability of product defect distribution;
[0041] Reversely derive the tool defect distribution probability based on the product defect type greater than the preset threshold;
[0042] According to the tool defect distribution probability, the non-conforming images in the tool defect image are screened out.
[0043] Optionally, the processing audio signal of the processing equipment when using the target tool to process the mechanical original part is collected, including:
[0044] A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool;
[0045] Collecting a first audio signal through a processed audio collection port;
[0046] Collecting a second audio signal through an ambient audio collection port;
[0047] Scaling the second audio signal according to a first distance, a second distance and a third distance, wherein the first distance is the relative distance between the processing audio collection port and the environmental audio collection port, the second distance includes the relative distance between the rotor plane and the processing audio collection port and the environmental audio collection port, and the third distance is the relative distance between the processing audio collection port and the tool;
[0048] The scaled second audio signal is used to perform noise reduction processing on the first audio signal to generate a processed audio signal.
[0049] Optionally, converting the processed audio signal into target spectrum data includes:
[0050] Perform pre-emphasis on processed audio;
[0051] Perform discrete fast Fourier transform on the processed audio to generate initial spectrum information;
[0052] The initial spectrum information is processed by a high-pass filter bank to obtain the target spectrum data.
[0053] The second aspect of the present application discloses an anomaly detection system based on scene intelligent perception, comprising:
[0054] A collection unit is used to collect a processing audio signal when the processing equipment uses a target tool to process a mechanical original part, and the processing audio signal is an audio signal of the target tool processing the mechanical original part;
[0055] The acquisition unit includes:
[0056] A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool;
[0057] Collecting a first audio signal through a processed audio collection port;
[0058] Collecting a second audio signal through an ambient audio collection port;
[0059] Scaling the second audio signal according to a first distance, a second distance and a third distance, wherein the first distance is the relative distance between the processing audio collection port and the environmental audio collection port, the second distance includes the relative distance between the rotor plane and the processing audio collection port and the environmental audio collection port, and the third distance is the relative distance between the processing audio collection port and the tool;
[0060] Using the scaled second audio signal to perform noise reduction processing on the first audio signal to generate a processed audio signal;
[0061] A conversion unit, used for converting the processed audio signal into target spectrum data;
[0062] A division unit, for dividing the target spectrum data into regions according to the tool processing stage, wherein the tool processing stage includes an initial contact stage, a flat displacement processing stage, a deep displacement processing stage and / or a withdrawal processing stage;
[0063] A first generating unit is used to input the divided target spectrum data into the spectrum anomaly detection model to generate spectrum analysis results, and the spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data;
[0064] The second generating unit is used to stop the processing equipment, photograph the target tool, and generate a real-time image of the tool when the spectrum analysis result shows that there is a spectrum abnormality;
[0065] a third generating unit, for inputting the real-time image of the tool into a tool defect detection convolution model to generate a tool defect distribution probability, and the tool defect detection convolution model is used to identify abnormal defect features appearing on the tool;
[0066] The fourth generating unit is used to generate a tool status result according to the tool defect distribution probability.
[0067] Optionally, after the second generating unit and before the third generating unit, the anomaly detection system further includes:
[0068] An acquisition unit, used to acquire at least one tool defect image of a target tool, wherein the tool defect image is a photographed image of tools of the same model of the target tool but with different types of defects;
[0069] The feature fusion unit is used to input at least one tool defect image and a tool real-time image into a defect feature fusion generator for defect feature fusion processing. The defect feature fusion generator is used to fuse the defect features of the tool defect image into the tool real-time image.
[0070] Optional, feature fusion unit, including:
[0071] Use a 3*3 convolution kernel to perform convolution operation on the real-time image of the tool to generate tool features;
[0072] Use a 3*3 convolution kernel to perform convolution operation on the tool defect image to generate defect features;
[0073] Performing regional pixel weight generation processing on tool features to generate weight features;
[0074] Multiply the tool feature and the weight feature according to the channel to generate a first superposition feature;
[0075] Generate a channel vector for the first superimposed feature through a global average pooling;
[0076] Perform channel compression processing on the channel vector;
[0077] Generate attention weight parameters for each feature channel in the channel vector;
[0078] Channel superposition of defect features and tool features is performed according to attention weight parameters to generate a second superposition feature;
[0079] Reconstructing the feature length and width of the second superimposed feature through the first deconvolution module to generate a reconstructed feature;
[0080] Generate an attention matrix for reconstructing features, and set the features whose attention is less than a preset threshold to zero according to the attention matrix;
[0081] The reconstructed features are restored and output through the output module Conv_out to regenerate the real-time image of the tool.
[0082] Optionally, after the acquisition unit and before the feature fusion unit, the anomaly detection system further includes:
[0083] A first determination unit, used to determine the abnormal processing stage according to the spectrum abnormality analysis result;
[0084] A fifth generating unit, used to determine an abnormal processing area of the mechanical component according to the abnormal processing stage, and use a photographing device to photograph the abnormal processing area of the mechanical component to generate a real-time image of the mechanical component;
[0085] a sixth generating unit, used for inputting the real-time image of the mechanical component into the mechanical component anomaly detection model to generate a product defect distribution probability, wherein the mechanical component anomaly detection model is used for identifying processing defects on the mechanical component;
[0086] A second determination unit, configured to determine a product defect type greater than a preset threshold value according to a product defect distribution probability;
[0087] A derivation unit, used for reversely deducing the tool defect distribution probability according to the product defect type greater than a preset threshold;
[0088] The screening unit is used to screen out non-conforming images in the tool defect image according to the tool defect distribution probability.
[0089] Optional, acquisition unit, including:
[0090] A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool;
[0091] Collecting a first audio signal through a processed audio collection port;
[0092] Collecting a second audio signal through an ambient audio collection port;
[0093] Scaling the second audio signal according to a first distance, a second distance and a third distance, wherein the first distance is the relative distance between the processing audio collection port and the environmental audio collection port, the second distance includes the relative distance between the rotor plane and the processing audio collection port and the environmental audio collection port, and the third distance is the relative distance between the processing audio collection port and the tool;
[0094] The scaled second audio signal is used to perform noise reduction processing on the first audio signal to generate a processed audio signal.
[0095] Optionally, a conversion unit, including:
[0096] Perform pre-emphasis on processed audio;
[0097] Perform discrete fast Fourier transform on the processed audio to generate initial spectrum information;
[0098] The initial spectrum information is processed by a high-pass filter bank to obtain the target spectrum data.
[0099] A third aspect of the present application provides an electronic device, including:
[0100] Processor, memory, input-output unit, and bus;
[0101] The processor is connected to the memory, the input and output unit, and the bus;
[0102] The memory stores a program, and the processor calls the program to execute the first aspect and any optional abnormality detection method of the first aspect.
[0103] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program performs the first aspect and any optional anomaly detection method of the first aspect.
[0104] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0105] In the present application, firstly, the processing audio signal of the processing equipment when using the target tool to process the mechanical original is collected, and the processing audio signal is the audio signal of the target tool processing the mechanical original. Then the processing audio signal is converted into the target spectrum data. The target spectrum data is divided into regions according to the tool processing stage, and the tool processing stage includes the initial contact section, the flat displacement processing section, the deep displacement processing section and / or the extraction processing section. The divided target spectrum data are respectively input into the spectrum anomaly detection model to generate the spectrum analysis results. The spectrum anomaly detection model is used to identify the abnormal processing features in the target spectrum data. When the spectrum analysis results show that there is a spectrum anomaly, the processing equipment is stopped, the target tool is photographed, and a real-time image of the tool is generated. The real-time image of the tool is input into the tool defect detection convolution model to generate the tool defect distribution probability. The tool defect detection convolution model is used to identify the abnormal defect features appearing on the tool. The tool status result is generated according to the tool defect distribution probability.
[0106] By collecting the scene sound during the processing, the scene audio of the mechanical original during the processing is converted into spectrum data. By analyzing the spectrum data at different processing stages, it is analyzed whether the target tool is abnormal. When the analysis result shows that there is an abnormality, the operation of the processing equipment is stopped. After cooling, the target tool is photographed to generate a real-time image of the tool. Then the real-time image of the tool is input into the tool defect detection convolution model for defect anomaly detection, and the result is finally obtained. Through the intelligent perception of the tool processing scene audio, the processing equipment and mechanical original can be monitored in real time during the processing, without pausing the equipment for cooling and collecting images every once in a while or after processing several mechanical originals. This method can be processed continuously, and the spectrum data is detected using the spectrum anomaly detection model according to different processing stages. When an abnormality is detected, the processing equipment is paused for cooling and collecting images for defect anomaly detection. The processing time of a single mechanical original is reduced, thereby improving the efficiency of the mechanical original manufacturing production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0107] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0108] Figure 1 This is a schematic diagram of an embodiment of an abnormality detection method based on scene intelligent perception of the present application;
[0109] Figure 2 This is a schematic diagram of an embodiment of the first stage of the anomaly detection method based on scene intelligent perception of the present application;
[0110] Figure 3 This is a schematic diagram of an embodiment of the second stage of the anomaly detection method based on scene intelligent perception of the present application;
[0111] Figure 4 This is a schematic diagram of an embodiment of the third stage of the anomaly detection method based on scene intelligent perception of the present application;
[0112] Figure 5 This is another embodiment schematic diagram of the fourth stage of the anomaly detection method based on scene intelligent perception of the present application;
[0113] Figure 6 This is a schematic diagram of an embodiment of an anomaly detection system based on scene intelligent perception of the present application;
[0114] Figure 7 This is a schematic diagram of another embodiment of the anomaly detection system based on scene intelligent perception of the present application. DETAILED DESCRIPTION
[0115] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0116] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0117] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0118] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0119] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0120] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0121] In the prior art, as the automation level of CNC machine tools continues to increase, it becomes very necessary to monitor the processing links of tools and mechanical originals. If the monitoring of the processing links of tools and mechanical originals is not designed, it is possible that the tool will be damaged without being detected in time. At this time, if the processing continues, not only will a large number of unqualified products appear, but in serious cases, the tool will be further damaged, resulting in damage to other parts of the CNC machine tool. The existing methods for monitoring CNC machine tools in the manufacturing process include manual real-time inspection. Manual real-time inspection is mainly carried out on finished products or semi-finished products. By observing the status of finished products and semi-finished products, it is judged whether the tool has defects. This method is indeed effective for producing a small amount of products, but once a large number of products need to be produced, it is easy to cause fatigue, increase labor costs, and for the slight damage defects of the tool, manual observation cannot accurately judge the defects on precision products. In order to ensure the accuracy of monitoring, inspectors need to increase the inspection time.
[0122] In order to solve the above problems, people began to use artificial intelligence to monitor the production and manufacturing process, and use deep learning models to analyze the defects of the tool's appearance, and then determine whether the tool has defects. At present, there are certain detection defects for deep learning models. In the process of tool processing mechanical parts, if detection is required, the real-time shooting image of the tool needs to be detected through deep learning model detection. During this period, the processing equipment needs to be suspended, and high-resolution lenses and cameras are used for close-up shooting. However, since the cutting and filing between the tool and the mechanical original will generate a lot of heat, and the damage to the tool is usually very subtle, it will affect the quality of the captured image to a certain extent, resulting in errors in the subsequent model detection results. At this time, in order to ensure the accuracy of the detection, it is necessary to wait for the tool of the processing equipment to cool down before shooting, which greatly increases the detection time, thereby reducing the efficiency of the mechanical original manufacturing production process.
[0123] Based on this, the present application discloses an anomaly detection method and system based on scene intelligent perception, which is used to improve the efficiency of the mechanical original component manufacturing production process.
[0124] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0125] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.
[0126] See also Figure 1 The present application provides an embodiment of an abnormality detection method based on scene intelligent perception, including:
[0127] 101. Collecting a processing audio signal of a processing device when using a target tool to process a mechanical component, where the processing audio signal is an audio signal of the target tool processing the mechanical component;
[0128] In this application, it is necessary to use audio acquisition equipment in real time to collect the processing scene sound of the running processing equipment and obtain the processing audio signal of the processing mechanical original. It can be collected through a variety of audio acquisition devices, and the collected audio signal can enter the subsequent detection link after noise reduction and other processing.
[0129] 102. Convert the processed audio signal into target spectrum data;
[0130] In this embodiment, the terminal needs to convert the processed audio signal into target spectrum data, and the spectrum data can better express the sound information of the processing scene.
[0131] 103. Divide the target spectrum data into regions according to the tool processing stage, where the tool processing stage includes an initial contact stage, a flat displacement processing stage, a deep displacement processing stage and / or a withdrawal processing stage;
[0132] The terminal divides the target spectrum data into regions according to the tool processing stage, where the tool processing stage includes the initial contact stage, the flat displacement processing stage, the deep displacement processing stage and / or the withdrawal processing stage, because when the target tool processes the mechanical original, the mechanical original is rotated first, and then the control panel tool is controlled to approach. Specifically, the target tool needs to contact the mechanical original, and the processed audio signal during the contact process is the initial contact stage of the tool processing.
[0133] The horizontal displacement processing section refers to the process in which the tool has already contacted the mechanical original part and the target tool cuts the surface of the mechanical original part at a fixed depth.
[0134] The deep displacement processing stage is the stage in which the target tool continuously cuts from the surface of the mechanical original and gradually enters the mechanical original.
[0135] The extraction processing section refers to the process of extracting the target tool from the interior of the mechanical original after the target tool has penetrated into the mechanical original for processing.
[0136] It should be noted that only some tool processing stages are listed in this embodiment. In the actual processing process, there are also different cutting file processing stages, from deep to shallow processing stages, etc., which are not limited here. In the actual processing process, the target tool will process the rotating mechanical original according to the preset route, and different processing stages are divided according to the preset route and the shape of the mechanical original. The model only needs to obtain the spectrum data of the first N mechanical originals processed by the target tool, divide the tool processing stages through the computer and perform corresponding training.
[0137] 104. Input the divided target spectrum data into the spectrum anomaly detection model respectively to generate spectrum analysis results. The spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data;
[0138] The terminal inputs the divided target spectrum data into the spectrum anomaly detection model respectively to generate spectrum analysis results. The spectrum analysis results can analyze the spectrum of different tool processing stages.
[0139] The spectrum anomaly detection model is used to identify abnormal processing features in the target spectrum data. The spectrum anomaly detection model can be trained on the spectrum data of a normal tool in processing a mechanical component, or it can be trained on both normal and abnormal spectra. The purpose of the spectrum anomaly detection model is to identify whether the target spectrum data is generated abnormally or whether it is abnormal.
[0140] 105. When the spectrum analysis result shows that there is spectrum anomaly, stop the processing equipment, take a picture of the target tool, and generate a real-time image of the tool;
[0141] When the spectrum analysis results show that there is a spectrum anomaly, the terminal stops the processing equipment to allow the tool to cool down, reducing the abnormal state of the tool's real-time image so that it can be accurately detected by subsequent models.
[0142] 106. Input the real-time image of the tool into the tool defect detection convolution model to generate a tool defect distribution probability. The tool defect detection convolution model is used to identify abnormal defect features appearing on the tool;
[0143] The terminal inputs the real-time image of the tool into the tool defect detection convolution model to generate the tool defect distribution probability. The tool defect detection convolution model is used to identify the abnormal defect characteristics appearing on the tool. The tool defect detection convolution model here is a conventional image recognition convolution model.
[0144] 107. Generate tool status results based on tool defect distribution probability.
[0145] Finally, the terminal only needs to generate the tool status result based on the tool defect distribution probability.
[0146] In this embodiment, first, the processing audio signal of the processing equipment when using the target tool to process the mechanical original is collected. The processing audio signal is the audio signal of the target tool processing the mechanical original. Then the processing audio signal is converted into target spectrum data. The target spectrum data is divided into regions according to the tool processing stage. The tool processing stage includes the initial contact section, the flat displacement processing section, the deep displacement processing section and / or the extraction processing section. The divided target spectrum data are respectively input into the spectrum anomaly detection model to generate the spectrum analysis results. The spectrum anomaly detection model is used to identify the abnormal processing features in the target spectrum data. When the spectrum analysis results show that there is a spectrum anomaly, the processing equipment is stopped, the target tool is photographed, and a real-time image of the tool is generated. The real-time image of the tool is input into the tool defect detection convolution model to generate the tool defect distribution probability. The tool defect detection convolution model is used to identify the abnormal defect features appearing on the tool. The tool status result is generated according to the tool defect distribution probability.
[0147] By collecting the scene sound during the processing, the scene audio of the mechanical original during the processing is converted into spectrum data. By analyzing the spectrum data at different processing stages, it is analyzed whether the target tool is abnormal. When the analysis result shows that there is an abnormality, the operation of the processing equipment is stopped. After cooling, the target tool is photographed to generate a real-time image of the tool. Then the real-time image of the tool is input into the tool defect detection convolution model for defect anomaly detection, and the result is finally obtained. Through the intelligent perception of the tool processing scene audio, the processing equipment and mechanical original can be monitored in real time during the processing, without pausing the equipment for cooling and collecting images every once in a while or after processing several mechanical originals. This method can be processed continuously, and the spectrum data is detected using the spectrum anomaly detection model according to different processing stages. When an abnormality is detected, the processing equipment is paused for cooling and collecting images for defect anomaly detection. The processing time of a single mechanical original is reduced, thereby improving the efficiency of the mechanical original manufacturing production process.
[0148] Secondly, tool processing is a contact processing, and scene audio is used as the basis for perception, which can better combine the surface image of the mechanical original and the tool image for defect judgment. Specifically, the training samples (tool defect images and tool normal images) required for training a tool defect detection convolution model are many, but the samples that can be obtained in reality are very few. Training a spectrum anomaly detection model also requires a lot of spectrum training samples, but it is relatively easy to obtain. It only needs to obtain different defective tools, and then use these defective tools to process the same mechanical original multiple times, collect audio data at different processing stages, and collect the corresponding audio data and convert it into spectrum data. A large number of training samples can be obtained, and the accuracy of the trained spectrum anomaly detection model will also be very high. First, the spectrum anomaly detection model is used for real-time detection, which can accurately determine the abnormal spectrum and the abnormal processing stage. In the future, whether the tool defect detection convolution model or the product anomaly detection model is used, analysis results can be obtained to verify the spectrum anomaly.
[0149] See also Figure 2 The present application provides an embodiment of an abnormality detection method based on scene intelligent perception, including:
[0150] 201. A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool;
[0151] 202. Collect a first audio signal through a processed audio collection port;
[0152] 203. Collect a second audio signal through an environmental audio collection port;
[0153] 204. Scaling the second audio signal according to a first distance, a second distance, and a third distance, wherein the first distance is a relative distance between the processing audio collection port and the environmental audio collection port, the second distance includes a relative distance between a rotor plane and the processing audio collection port and the environmental audio collection port, and the third distance is a relative distance between the processing audio collection port and a tool;
[0154] 205. Perform noise reduction processing on the first audio signal using the scaled second audio signal to generate a processed audio signal;
[0155] In this embodiment, in order to accurately collect the processing audio signal, a dual-port audio collector is first set on the tool control arm of the processing equipment, wherein the processing audio collection port of the dual-port audio collector faces the tip area of the target tool, and the collection port is mainly used to receive the audio signal during the processing process, while the environmental audio collection port of the dual-port audio collector faces away from the tip area of the target tool, specifically, it is set in the opposite direction of 180° to the processing audio collection port. In actual collection, setting two collection ports in the opposite direction of 180° can well improve the collection effect of the two collection ports on different types of audio, and plays a key role in the subsequent noise reduction processing link. The collection port is mainly used to receive the environmental audio signal during the processing process. In this embodiment, the environmental noise of the tool processing equipment includes the equipment rotor rotation noise and the environmental noise. Since the environmental noise is very far from the two collection ports, it can be chosen to be ignored, but the rotor rotation noise is relatively close to the collection port. The rotor rotation noise referred to in this embodiment is caused by the processing equipment clamping the mechanical original, and the motor controls the rotor to rotate, and the rotor is connected to the clamping device. The rotor rotates so that the clamped mechanical original also rotates. The rotor will produce certain noise during rotation, especially when the rotor has been used for too long or is aging.
[0156] After the setting is completed, the terminal collects the first audio signal through the processed audio collection port, and then collects the second audio signal through the ambient audio collection port. Next, the terminal scales the second audio signal according to the collection distance between the processed audio collection port and the ambient audio collection port, and scales the audio of the processed environment according to a specific ratio of the distance between the two collection ports, rather than scaling it proportionally according to the distance. The scaling ratios for the first distance, the second distance, and the third distance are calculated as follows:
[0157] Since the tool control arm holds the tool, the processing audio acquisition port is also located on the control arm. There is a distance d between the processing audio acquisition port and the tool. This distance d is a safety distance set to prevent the mechanical components from touching the processing audio acquisition port during processing. Depending on the mechanical components being processed, this distance d is usually between 1cm and 3cm. The distance between the processing audio acquisition port and the ambient audio acquisition port is N. During the processing, the control arm and the tool are usually processed perpendicular to the mechanical components. The tool may move to a certain extent, and the rotor plane is fixed. Assume that the distance between the tool and the rotor plane during processing is x. At this time, the two acquisition ports have the following noise about the rotation of the rotor:
[0158]
[0159] in, is the scaling factor, is the rotor plane distance adjustment coefficient. During the processing, the control arm may displace the props and sound collection equipment by a certain distance. The displacement here mainly refers to the distance relative to the rotor. When it is far away from the rotor plane and reaches a certain distance, Will The adjustment is 1, which means that the noise can be directly reduced without scaling, because the impact of the noise of the rotor rotation on the two collection ports is almost the same. When approaching the rotor plane, Adjust according to distance The size of Associated with distance x and distance d, the query table can be set through the data collected by multiple processing. Because the directions of the two collection ports are completely opposite, the sound collection volume of the tool processing mechanical original is quite different, while the two collection ports collect similar rotor rotation noise for the rotor plane. It is only necessary to calculate the scaling ratio according to the above formula and scale the second audio signal. The second audio signal can remove the noise of the first audio signal as much as possible.
[0160] Finally, the terminal uses the scaled second audio signal to perform noise reduction processing on the first audio signal to generate a processed audio signal.
[0161] 206. Pre-emphasize the processed audio;
[0162] 207. Performing discrete fast Fourier transform on the processed audio to generate initial spectrum information;
[0163] 208. Processing the initial spectrum information by using a high-pass filter group to obtain target spectrum data;
[0164] After the terminal obtains the first audio signal after noise reduction, it is necessary to perform pre-emphasis on the processed audio. Pre-emphasis is a signal processing method that compensates for the high-frequency components of the input signal at the transmitting end. As the signal rate increases, the signal is greatly damaged during the transmission process. In order to obtain a better signal waveform at the receiving terminal, it is necessary to compensate for the damaged signal. The pre-emphasis process is to enhance the high-frequency components of the signal at the beginning of the transmission line to compensate for the excessive attenuation of the high-frequency components during the transmission process. However, pre-emphasis has no effect on noise, so it effectively improves the output signal-to-noise ratio. The tool processing in this embodiment mainly involves high-frequency components, so pre-emphasis is used. Next, the terminal performs a discrete fast Fourier transform on the processed audio to generate initial spectrum information, and finally processes the initial spectrum information using a high-pass filter group to obtain the target spectrum data.
[0165] 209. Divide the target spectrum data into regions according to the tool processing stage, where the tool processing stage includes an initial contact stage, a flat displacement processing stage, a deep displacement processing stage and / or a withdrawal processing stage;
[0166] 210. Input the divided target spectrum data into the spectrum anomaly detection model respectively to generate spectrum analysis results. The spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data;
[0167] 211. When the spectrum analysis results show that there is a spectrum anomaly, stop the processing equipment, take a picture of the target tool, and generate a real-time image of the tool;
[0168] Steps 209 to 211 in this embodiment are similar to steps 103 to 105 in the above-mentioned embodiment, and are not described again here.
[0169] 212. Acquire at least one tool defect image of a target tool, where the tool defect image is a photographed image of tools of the same model of the target tool but with different types of defects;
[0170] When the spectrum analysis results indicate that there are defects in the target spectrum data of the processing stage, the terminal stops the processing equipment, shoots the target tool, obtains the real-time image of the target tool, and obtains at least one tool defect image, that is, the tool that has been cut is comprehensively inspected. Specifically, the real-time image of the tool is obtained by shooting the real-time image of the tool. It should be noted that the damage of the CNC tool includes natural wear, notches, cracks, etc. If the degree of these defects is too large, sometimes it is not necessary to detect it through this method, and it is only necessary to collect the pressure data and other operating data of the tool itself to make a judgment. For example, if there is a large notch in the CNC tool, it may not be able to touch the mechanical original at the predetermined position, or it can only touch the mechanical original at a depth of part of the original planned depth. At this time, the operating data generated by the CNC tool will be greatly different.
[0171] In this embodiment, the target is the slight defects in the CNC tool. For precision mechanical components, the CNC tool used has higher requirements. This kind of precision operation may cause the CNC tool to produce slight defects after long-term use, thereby generating slight product defects on the surface of the target tool. Such slight tool defects are difficult to analyze in the operation data, but their impact on the product of the mechanical original is huge. The tool defect image is a shot image of the target tool model when it produces different types of abnormal defects.
[0172] 213. Determine the abnormal processing stage according to the spectrum abnormality analysis results;
[0173] 214. Determine the abnormal processing area of the mechanical component according to the abnormal processing stage, use a photographing device to photograph the abnormal processing area of the mechanical component, and generate a real-time image of the mechanical component;
[0174] 215. Input the real-time image of the mechanical component into the mechanical component anomaly detection model to generate a product defect distribution probability. The mechanical component anomaly detection model is used to identify processing defects on the mechanical component;
[0175] 216. Determine the type of product defects that are greater than a preset threshold based on the probability of product defect distribution;
[0176] 217. Reversely deduce the tool defect distribution probability based on the product defect type greater than the preset threshold;
[0177] 218. Screen out non-conforming images in the tool defect image according to the tool defect distribution probability;
[0178] In this embodiment, this section obtains a real-time image of product processing. The real-time image of product processing here refers to a product image taken after a mechanical original is cut by a target tool on a CNC machine tool. The target tool cuts the mechanical original into a target product. The mechanical original here is not necessarily a finished product, but can also be a semi-finished product.
[0179] The area cut by the CNC tool can be an overlapping area or a non-overlapping area.
[0180] The terminal determines the abnormal processing stage based on the results of the spectrum anomaly analysis, that is, it determines the abnormal tool processing stage based on the anomaly of the spectrum data, and then determines the abnormal processing area of the mechanical original based on the abnormal tool processing stage. The terminal then uses a shooting device to shoot the abnormal processing area of the mechanical original to generate a real-time image of the mechanical original.
[0181] The real-time image of the mechanical component is input into the mechanical component anomaly detection model to generate the product defect distribution probability. The mechanical component anomaly detection model is used to identify the processing defects on the mechanical component. The product defect type greater than the preset threshold is determined based on the product defect distribution probability. The tool defect distribution probability is reversely derived based on the product defect type greater than the preset threshold. The non-conforming images in the tool defect image are screened out based on the tool defect distribution probability.
[0182] In this embodiment, the product defect distribution probability is the probability of defects generated on the surface of the mechanical original, which makes it possible to determine the type of product defects. Because different tools generate different defects on mechanical originals, the tool defect distribution probability can be reversed based on the product defect distribution probability. For example: according to the product defect of product processing area A (tool A) being a depression, a table lookup or calculation is performed based on this depression combined with the cause of the mechanical original's own defects, and the tool defect distribution probability is reversely derived to determine that the probability of tool A being worn is 30%, the probability of having a notch is 40%, the probability of having a crack is 20%, and the probability of having other defects is 10%. At this time, these three defects can be processed. Finally, the terminal screens out the non-conforming images in the tool defect image according to the tool defect distribution probability.
[0183] 219. Use a 3*3 convolution kernel to perform convolution operation on the real-time image of the tool to generate tool features;
[0184] 220. Use a 3*3 convolution kernel to perform a convolution operation on the tool defect image to generate defect features;
[0185] In this embodiment, the terminal first uses a 3*3 convolution kernel to perform a convolution operation on the real-time image of the tool to generate a tool feature, and uses a 3*3 convolution kernel to perform a convolution operation on the tool defect image to generate a defect feature.
[0186] 221. Performing regional pixel weight generation processing on tool features to generate weight features;
[0187] Next, the terminal generates weight features by performing regional pixel weight generation processing on the tool features. Specifically, the present embodiment uses a regional pixel attention module RPA to generate regional pixel weights for tool features. The regional pixel attention module RPA includes a BatchNorm-DefConv-ReLU, a BatchNorm-DefConv, a SigMoid function module and a bilinear interpolation module. BatchNorm-DefConv-ReLU, BatchNorm-DefConv, SigMoid function module and bilinear interpolation module are connected in series in sequence. The BatchNorm-DefConv-ReLU layer and the BatchNorm-DefConv layer here both belong to the feature processing layer, and the SigMoid function is a preset function. The regional pixel attention module RPA is used as the first attention mechanism to assign a weight to each regional pixel of the tool feature, so that the neural network pays more attention to the area with obvious sampling features.
[0188] 222. Multiply the tool feature and the weight feature according to the channel to generate a first superposition feature;
[0189] The tool feature and the weight feature have the same number of channels, and the terminal multiplies the tool feature and the weight feature according to the channels to generate a first superposition feature.
[0190] 223. Generate a channel vector for the first superposition feature through a global average pool;
[0191] 224. Perform channel compression processing on the channel vector;
[0192] 225. Generate attention weight parameters for each feature channel in the channel vector;
[0193] In this embodiment, the attention weight parameters of each feature channel are generated by the attention module Attention. The attention mechanism of this module mainly achieves the effect of selecting feature information (defect features) by allocating normalized weights to different feature channels, enhancing certain channels and suppressing other channels.
[0194] In this embodiment, the channel attention module Attention includes a global average pooling layer, a 1*1Conv-ReLU and a Conv-Sigmoid. The operating principle of the Attention module is described in detail below. Specifically, the first superimposed feature first passes through the global average pooling layer (Global Pooling) of the channel attention module Attention to generate a channel vector, then passes through a 1×1 convolution kernel and a ReLU activation function for channel compression, and then passes through a 1×1 convolution kernel and a Sigmoid activation function to output a normalized one-dimensional vector (attention weight parameter) with a dimension equal to the number of input feature channels. This is the attention weight of each feature channel.
[0195] 226. Channel superimpose the defect feature and the tool feature according to the attention weight parameter to generate a second superimposed feature;
[0196] Next, the terminal needs to perform channel superposition on the defect features and tool features according to the attention weight parameters to generate a second superimposed feature, which is a fusion of the features of the two.
[0197] 227. Reconstruct the feature length and width of the second superimposed feature through the first deconvolution module to generate a reconstructed feature;
[0198] The terminal reconstructs the feature length and width of the second superimposed feature through the first deconvolution module to generate a reconstructed feature. The deconvolution module is also called the Conv_t layer. The terminal uses the first deconvolution module to reconstruct the fifth intermediate feature and the first label feature to increase the feature length and width.
[0199] 228. Generate an attention matrix for reconstructing features, and set features whose attention is less than a preset threshold to zero according to the attention matrix;
[0200] In this embodiment, the attention matrix is generated using the attention Dropout module ADO, which includes BatchNorm-2*2DefConv-ReLU and BatchNorm-2*2DefConv-SigMiod. The attention-based Dropout method is different from the random method used in general Dropout. In this embodiment, attention is used to retain more important feature information to improve the performance and generalization of the model.
[0201] The input reconstructed features are put into BatchNorm-2*2DefConv-ReLU for processing, and then its output is input into BatchNorm-2*2DefConv-SigMiod to generate an attention matrix of the same size as the original features. According to the value of the attention matrix, the neurons at the corresponding positions of the original feature matrix whose attention is less than the first preset threshold are set to zero to reduce the interference of irrelevant pixels.
[0202] 229. The reconstructed features are restored and output through the output module Conv_out to regenerate the real-time image of the tool;
[0203] Finally, the terminal uses the convolutional neural output module (Conv_out) to restore the reconstructed features to generate a simulated defect image. Specifically, a 3×3 convolution is used to restore the reconstructed features to a real-time tool image of the original size.
[0204] 230. Input the real-time image of the tool into the tool defect detection convolution model to generate a tool defect distribution probability. The tool defect detection convolution model is used to identify abnormal defect features appearing on the tool;
[0205] 231. Generate tool status results based on tool defect distribution probability.
[0206] Steps 230 to 231 in this embodiment are similar to steps 106 to 107 in the above-mentioned embodiment, and are not described again here.
[0207] In this embodiment, a dual-port audio collector is firstly arranged on the tool control arm of the processing equipment, wherein the processing audio collection port of the dual-port audio collector faces the tool tip area of the target tool, and the environmental audio collection port of the dual-port audio collector faces away from the tool tip area of the target tool. A first audio signal is collected through the processing audio collection port. A second audio signal is collected through the environmental audio collection port. The second audio signal is scaled according to the collection distance between the processing audio collection port and the environmental audio collection port. The scaled second audio signal is used to perform noise reduction processing on the first audio signal to generate a processing audio signal.
[0208] Then, the processed audio is pre-emphasized. Discrete fast Fourier transform is performed on the processed audio to generate initial spectrum information. The initial spectrum information is processed by a high-pass filter group to obtain target spectrum data.
[0209] The target spectrum data is divided into regions according to the tool processing stage, which includes the initial contact stage, the flat displacement processing stage, the deep displacement processing stage and / or the extraction processing stage. The divided target spectrum data are respectively input into the spectrum anomaly detection model to generate spectrum analysis results. The spectrum anomaly detection model is used to identify abnormal processing features in the target spectrum data. When the spectrum analysis results show that there is a spectrum anomaly, the processing equipment is stopped, the target tool is photographed, and a real-time image of the tool is generated.
[0210] At least one tool defect image of the target tool is obtained, where the tool defect image is a photographed image of tools of the same model of the target tool but with different types of defects.
[0211] Determine the abnormal processing stage based on the results of spectrum anomaly analysis. Determine the abnormal processing area of the mechanical original based on the abnormal processing stage, use a camera to photograph the abnormal processing area of the mechanical original, and generate a real-time image of the mechanical original. Input the real-time image of the mechanical original into the mechanical original anomaly detection model to generate a product defect distribution probability. The mechanical original anomaly detection model is used to identify processing defects on the mechanical original. Determine the product defect type greater than the preset threshold based on the product defect distribution probability. Reversely deduce the tool defect distribution probability based on the product defect type greater than the preset threshold. Screen out non-conforming images in the tool defect image based on the tool defect distribution probability.
[0212] Use 3*3 convolution kernel to perform convolution operation on the real-time image of the tool to generate tool features. Use 3*3 convolution kernel to perform convolution operation on the defect image of the tool to generate defect features. Perform regional pixel weight generation processing on the tool features to generate weight features. Multiply the tool features and weight features according to the channel to generate the first superposition feature. Generate a channel vector for the first superposition feature through a global average pool. Perform channel compression processing on the channel vector. Generate attention weight parameters for each feature channel in the channel vector. Superimpose the defect features and tool features on the channel according to the attention weight parameters to generate the second superposition feature. Reconstruct the feature length and width of the second superposition feature through the first deconvolution module to generate a reconstructed feature. Generate an attention matrix for the reconstructed feature, and set the features whose attention is less than the preset threshold to zero according to the attention matrix. Restore the reconstructed feature through the output module Conv_out to regenerate the real-time image of the tool.
[0213] The real-time image of the tool is input into the tool defect detection convolution model to generate the tool defect distribution probability. The tool defect detection convolution model is used to identify the abnormal defect characteristics appearing on the tool. The tool status result is generated based on the tool defect distribution probability.
[0214] By collecting the scene sound during the processing, the scene audio of the mechanical original during the processing is converted into spectrum data. By analyzing the spectrum data at different processing stages, it is analyzed whether the target tool is abnormal. When the analysis result shows that there is an abnormality, the operation of the processing equipment is stopped. After cooling, the target tool is photographed to generate a real-time image of the tool. Then the real-time image of the tool is input into the tool defect detection convolution model for defect anomaly detection, and the result is finally obtained. Through the intelligent perception of the tool processing scene audio, the processing equipment and mechanical original can be monitored in real time during the processing, without pausing the equipment for cooling and collecting images every once in a while or after processing several mechanical originals. This method can be processed continuously, and the spectrum data is detected using the spectrum anomaly detection model according to different processing stages. When an abnormality is detected, the processing equipment is paused for cooling and collecting images for defect anomaly detection. The processing time of a single mechanical original is reduced, thereby improving the efficiency of the mechanical original manufacturing production process.
[0215] See also Figure 6 The present application provides an embodiment of an anomaly detection system based on scene intelligent perception, including:
[0216] The collecting unit 601 is used to collect the processing audio signal of the processing equipment when the processing equipment uses the target tool to process the mechanical original part, and the processing audio signal is the audio signal of the target tool processing the mechanical original part;
[0217] Optionally, the acquisition unit 601 includes:
[0218] A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool;
[0219] Collecting a first audio signal through a processed audio collection port;
[0220] Collecting a second audio signal through an ambient audio collection port;
[0221] Scaling the second audio signal according to a first distance, a second distance and a third distance, wherein the first distance is the relative distance between the processing audio collection port and the environmental audio collection port, the second distance includes the relative distance between the rotor plane and the processing audio collection port and the environmental audio collection port, and the third distance is the relative distance between the processing audio collection port and the tool;
[0222] The scaled second audio signal is used to perform noise reduction processing on the first audio signal to generate a processed audio signal.
[0223] A conversion unit 602, used to convert the processed audio signal into target spectrum data;
[0224] Optionally, the conversion unit 602 includes:
[0225] Perform pre-emphasis on processed audio;
[0226] Perform discrete fast Fourier transform on the processed audio to generate initial spectrum information;
[0227] The initial spectrum information is processed by a high-pass filter bank to obtain the target spectrum data.
[0228] A division unit 603 is used to divide the target spectrum data into regions according to the tool processing stage, where the tool processing stage includes an initial contact stage, a flat displacement processing stage, a deep displacement processing stage and / or a withdrawal processing stage;
[0229] The first generating unit 604 is used to input the divided target spectrum data into the spectrum anomaly detection model to generate spectrum analysis results. The spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data;
[0230] The second generating unit 605 is used to stop the processing equipment, photograph the target tool, and generate a real-time image of the tool when the spectrum analysis result shows that there is a spectrum abnormality;
[0231] An acquisition unit 606 is used to acquire at least one tool defect image of a target tool, where the tool defect image is a photographed image of tools of the same model of the target tool but with different types of defects;
[0232] A first determining unit 607, configured to determine an abnormal processing stage according to a result of spectrum abnormality analysis;
[0233] A fifth generating unit 608 is used to determine the abnormal processing area of the mechanical component according to the abnormal processing stage, and use a photographing device to photograph the abnormal processing area of the mechanical component to generate a real-time image of the mechanical component;
[0234] The sixth generating unit 609 is used to input the real-time image of the mechanical component into the mechanical component anomaly detection model to generate a product defect distribution probability. The mechanical component anomaly detection model is used to identify processing defects on the mechanical component.
[0235] A second determination unit 610 is used to determine a product defect type greater than a preset threshold according to a product defect distribution probability;
[0236] A derivation unit 611, configured to reversely derive a tool defect distribution probability according to a product defect type greater than a preset threshold;
[0237] A screening unit 612, used for screening out non-conforming images in the tool defect image according to the tool defect distribution probability;
[0238] A feature fusion unit 613 is used to input at least one tool defect image and a tool real-time image into a defect feature fusion generator for defect feature fusion processing, and the defect feature fusion generator is used to fuse the defect features of the tool defect image into the tool real-time image;
[0239] Optionally, the feature fusion unit 613 includes:
[0240] Use a 3*3 convolution kernel to perform convolution operation on the real-time image of the tool to generate tool features;
[0241] Use a 3*3 convolution kernel to perform convolution operation on the tool defect image to generate defect features;
[0242] Performing regional pixel weight generation processing on tool features to generate weight features;
[0243] Multiply the tool feature and the weight feature according to the channel to generate a first superposition feature;
[0244] Generate a channel vector for the first superimposed feature through a global average pooling;
[0245] Perform channel compression processing on the channel vector;
[0246] Generate attention weight parameters for each feature channel in the channel vector;
[0247] Channel superposition of defect features and tool features is performed according to attention weight parameters to generate a second superposition feature;
[0248] Reconstructing the feature length and width of the second superimposed feature through the first deconvolution module to generate a reconstructed feature;
[0249] Generate an attention matrix for reconstructing features, and set the features whose attention is less than a preset threshold to zero according to the attention matrix;
[0250] The reconstructed features are restored and output through the output module Conv_out to regenerate the real-time image of the tool.
[0251] The third generating unit 614 is used to input the real-time image of the tool into the tool defect detection convolution model to generate a tool defect distribution probability. The tool defect detection convolution model is used to identify abnormal defect features appearing on the tool;
[0252] The fourth generating unit 615 is used to generate a tool status result according to the tool defect distribution probability.
[0253] See also Figure 7, the present application provides an electronic device, including:
[0254] Processor 701 , memory 702 , input / output unit 703 , and bus 704 .
[0255] The processor 701 is connected to the memory 702 , the input and output unit 703 , and the bus 704 .
[0256] The memory 702 stores a program, and the processor 701 calls the program to execute the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 and Figure 5 Anomaly detection methods in .
[0257] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 and Figure 5 Anomaly detection methods in .
[0258] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0259] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0260] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0261] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0262] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for anomaly detection based on scene intelligent perception, characterized in that: include: Collecting a processing audio signal when a processing device uses a target tool to process a mechanical component, wherein the processing audio signal is an audio signal of the target tool processing the mechanical component; Collect the processing audio signals of the processing equipment when using the target tool to process the mechanical original, including: A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool; Collecting a first audio signal through the processed audio collection port; Collecting a second audio signal through the ambient audio collection port; The second audio signal is scaled according to the collection distance between the processed audio collection port and the ambient audio collection port. The calculation formula of the scaling ratio k0 is as follows: d is the distance between the processing audio acquisition port and the tool, the distance between the processing audio acquisition port and the ambient audio acquisition port is N, and the distance between the tool and the rotor plane during the processing is x, k x is the rotor plane distance adjustment coefficient; Using the scaled second audio signal to perform noise reduction processing on the first audio signal to generate a processed audio signal; Converting the processed audio signal into target spectrum data; Dividing the target frequency spectrum data into regions according to tool processing stages, wherein the tool processing stages include an initial contact stage, a flat displacement processing stage, a deep displacement processing stage and / or a withdrawal processing stage; Inputting the divided target spectrum data into a spectrum anomaly detection model respectively to generate spectrum analysis results, wherein the spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data; When the spectrum analysis result shows that there is a spectrum anomaly, the processing equipment is stopped, the target tool is photographed, and a real-time image of the tool is generated; Inputting the real-time image of the tool into a tool defect detection convolution model to generate a tool defect distribution probability, wherein the tool defect detection convolution model is used to identify abnormal defect features appearing on the tool; A tool status result is generated according to the tool defect distribution probability.
2. The anomaly detection method according to claim 1, characterized in that: After stopping the processing equipment, photographing the target tool, and generating a real-time image of the tool, the real-time image of the tool is input into the tool defect detection convolution model, and before generating a tool defect distribution probability, the abnormality detection method further includes: Acquire at least one tool defect image of the target tool, wherein the tool defect image is a photographed image of tools of the same model as the target tool but with different types of defects; At least one of the tool defect images and the tool real-time image is input into a defect feature fusion generator for defect feature fusion processing, and the defect feature fusion generator is used to fuse the defect features of the tool defect image into the tool real-time image.
3. The anomaly detection method according to claim 2, characterized in that: Inputting at least one of the tool defect images and the tool real-time image into a defect feature fusion generator for defect feature fusion processing, including: Using a 3*3 convolution kernel to perform a convolution operation on the real-time image of the tool to generate tool features; Using a 3*3 convolution kernel to perform a convolution operation on the tool defect image to generate defect features; Performing regional pixel weight generation processing on the tool feature to generate a weight feature; Multiplying the tool feature and the weight feature according to the channel to generate a first superposition feature; Generating a channel vector for the first superimposed feature through a global average pooling; Performing channel compression processing on the channel vector; Generating an attention weight parameter for each feature channel in the channel vector; Perform channel superposition on the defect feature and the tool feature according to the attention weight parameter to generate a second superposition feature; Reconstructing the feature length and width of the second superimposed feature through a first deconvolution module to generate a reconstructed feature; Generate an attention matrix for the reconstructed features, and set the features whose attention is less than a preset threshold to zero according to the attention matrix; The reconstructed features are restored and output through the output module Conv_out to regenerate the real-time image of the tool.
4. The anomaly detection method according to claim 3, characterized in that: After acquiring at least one tool defect image of the target tool, and before inputting at least one tool defect image and the tool real-time image into a defect feature fusion generator for defect feature fusion processing, the anomaly detection method further includes: Determining the abnormal processing stage according to the spectrum abnormality analysis result; Determining an abnormal processing area of the mechanical component according to the abnormal processing stage, photographing the abnormal processing area of the mechanical component using a photographing device to generate a real-time image of the mechanical component; Inputting the real-time image of the mechanical component into a mechanical component anomaly detection model to generate a product defect distribution probability, wherein the mechanical component anomaly detection model is used to identify processing defects on the mechanical component; Determining the type of product defects that are greater than a preset threshold according to the product defect distribution probability; Reversely derive the tool defect distribution probability based on the product defect type greater than the preset threshold; Non-compliant images in the tool defect images are screened out according to the tool defect distribution probability.
5. The abnormality detection method according to any one of claims 1 to 4, characterized in that: Converting the processed audio signal into target spectrum data comprises: Performing pre-emphasis processing on the processed audio; Performing a discrete fast Fourier transform on the processed audio to generate initial spectrum information; The initial spectrum information is processed by a high-pass filter group to obtain target spectrum data.
6. An anomaly detection system based on scene intelligent perception, characterized in that: include: A collection unit, used for collecting a processing audio signal when the processing equipment uses a target tool to process a mechanical original part, wherein the processing audio signal is an audio signal of the target tool processing the mechanical original part; The acquisition unit includes: A dual-port audio collector is arranged on a tool control arm of a processing device, wherein a processing audio collection port of the dual-port audio collector faces toward a tool tip region of a target tool, and an environmental audio collection port of the dual-port audio collector faces away from the tool tip region of the target tool; Collecting a first audio signal through a processed audio collection port; Collecting a second audio signal through an ambient audio collection port; The second audio signal is scaled according to the collection distance between the processed audio collection port and the ambient audio collection port. The calculation formula of the scaling ratio k0 is as follows: d is the distance between the processing audio acquisition port and the tool, the distance between the processing audio acquisition port and the ambient audio acquisition port is N, and the distance between the tool and the rotor plane during the processing is x, k x is the rotor plane distance adjustment coefficient; Using the scaled second audio signal to perform noise reduction processing on the first audio signal to generate a processed audio signal; A conversion unit, used for converting the processed audio signal into target spectrum data; A division unit, used for dividing the target spectrum data into regions according to tool processing stages, wherein the tool processing stages include an initial contact stage, a flat displacement processing stage, a deep displacement processing stage and / or a withdrawal processing stage; A first generating unit is used to input the divided target spectrum data into a spectrum anomaly detection model to generate a spectrum analysis result, wherein the spectrum anomaly detection model is used to identify abnormal processing features existing in the target spectrum data; A second generating unit is used to stop the processing equipment, photograph the target tool, and generate a real-time image of the tool when the spectrum analysis result shows that there is a spectrum abnormality; a third generating unit, configured to input the real-time image of the tool into a tool defect detection convolution model to generate a tool defect distribution probability, wherein the tool defect detection convolution model is used to identify abnormal defect features appearing on the tool; The fourth generating unit is used to generate a tool status result according to the tool defect distribution probability.
7. The abnormality detection system according to claim 6, characterized in that: After the second generating unit and before the third generating unit, the anomaly detection system further includes: An acquisition unit, configured to acquire at least one tool defect image of the target tool, wherein the tool defect image is a photographed image of tools of the same model as the target tool but with different types of defects; The feature fusion unit is used to input at least one of the tool defect images and the tool real-time image into a defect feature fusion generator for defect feature fusion processing. The defect feature fusion generator is used to fuse the defect features of the tool defect image into the tool real-time image.
8. The abnormality detection system according to claim 7, characterized in that: Feature fusion unit, including: Using a 3*3 convolution kernel to perform a convolution operation on the real-time image of the tool to generate tool features; Using a 3*3 convolution kernel to perform a convolution operation on the tool defect image to generate defect features; Performing regional pixel weight generation processing on the tool feature to generate a weight feature; Multiplying the tool feature and the weight feature according to the channel to generate a first superposition feature; Generating a channel vector for the first superimposed feature through a global average pooling; Performing channel compression processing on the channel vector; Generating an attention weight parameter for each feature channel in the channel vector; Perform channel superposition on the defect feature and the tool feature according to the attention weight parameter to generate a second superposition feature; Reconstructing the feature length and width of the second superimposed feature through a first deconvolution module to generate a reconstructed feature; Generate an attention matrix for the reconstructed features, and set the features whose attention is less than a preset threshold to zero according to the attention matrix; The reconstructed features are restored and output through the output module Conv_out to regenerate the real-time image of the tool.
9. The abnormality detection system according to claim 8, characterized in that: After the acquisition unit and before the feature fusion unit, the anomaly detection system further includes: A first determining unit, configured to determine an abnormal processing stage according to the abnormal spectrum analysis result; a fifth generating unit, configured to determine an abnormal processing area of the mechanical component according to the abnormal processing stage, and use a photographing device to photograph the abnormal processing area of the mechanical component to generate a real-time image of the mechanical component; a sixth generating unit, configured to input the real-time image of the mechanical component into a mechanical component anomaly detection model to generate a product defect distribution probability, wherein the mechanical component anomaly detection model is used to identify processing defects on the mechanical component; A second determination unit, configured to determine a product defect type greater than a preset threshold according to the product defect distribution probability; A derivation unit, used for reversely deducing the tool defect distribution probability according to the product defect type greater than a preset threshold; A screening unit is used to screen out non-conforming images in the tool defect image according to the tool defect distribution probability.
Citation Information
Patent Citations
Switch cabinet maintenance somatosensory system and method based on wireless data communication
CN105070136A
Cutter state monitoring method and device, equipment and storage medium
CN112434613A
An equipment abnormity identification method and device, terminal equipment and a storage medium
CN112598027A
Cutter wear prediction method based on multi-scale convolutional neural network
CN113313198A
Cutter detection method, electronic device and storage medium
CN114078473A
