Scale-aware modulation anomaly detection method and related apparatus

By combining multi-scale feature extraction and differential analysis networks, the scope of contextual information fusion is dynamically adjusted, which solves the problems of accuracy and robustness in multi-scale anomaly detection in medical images and improves the detection performance of the model.

CN122115929APending Publication Date: 2026-05-29BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2026-01-08
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing medical image anomaly detection technologies, distillation-based methods cannot adapt to multi-scale anomaly regions, resulting in decreased model performance when faced with anomalies of different scales. This makes it difficult to effectively capture contextual information, affecting the accuracy and robustness of detection.

Method used

By extracting multi-scale features from the target image based on the encoder, feature enhancement is performed, and an anomaly detection model is constructed using a differential analysis network to dynamically perceive scale changes in the abnormal region and adaptively adjust the fusion range of contextual information.

Benefits of technology

It significantly improves the model's ability to represent abnormalities at different scales, especially its sensitivity to small lesions, and enhances the accuracy and localization precision of abnormality detection. It is suitable for multi-scale and multi-type abnormality identification in complex clinical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115929A_ABST
    Figure CN122115929A_ABST
Patent Text Reader

Abstract

The present disclosure provides a scale-aware modulation anomaly detection method and related device, the method comprising: performing feature extraction on a target image based on an encoder to obtain multi-scale features; performing feature enhancement on the multi-scale features to obtain enhanced multi-scale features; constructing the enhanced multi-scale features based on a difference analysis network to obtain an anomaly detection model; inputting the target image into the anomaly detection model for detection to obtain an anomaly detection result. The present disclosure can capture dynamic context information of abnormal regions and adaptively adjust the scale, effectively improving the accuracy and robustness of medical image anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer image processing technology, and in particular to a scale-aware modulation anomaly detection method and related apparatus. Background Technology

[0002] This section is intended to provide background or context for the embodiments of this disclosure as set forth in the claims. The description herein is not intended to be a prior art simply because it is included in this section.

[0003] In existing medical image anomaly detection technologies, distillation-based learning methods are widely used. These methods typically employ a "frozen teacher model" and a "learnable student model." The student model learns the features of the teacher model from normal samples, and ultimately detects anomalies by comparing the features of the student model with those of the teacher model during the inference phase.

[0004] However, in related technologies, there is a problem that fixed context processing methods cannot adapt to multi-scale abnormal regions in medical images, which leads to a decline in model performance when facing abnormalities of different scales, making it difficult to effectively capture contextual information and affecting the accuracy and robustness of detection. Summary of the Invention

[0005] In view of this, the purpose of this disclosure is to propose a scale-aware modulation anomaly detection method and related apparatus, which at least to some extent solves one of the technical problems in the related art.

[0006] To achieve the above objectives, a first aspect of the exemplary embodiments of this disclosure provides an anomaly detection method for scale-aware modulation, the method comprising: Based on the encoder, feature extraction of the target image is performed to obtain multi-scale features; The multi-scale features are enhanced to obtain the enhanced multi-scale features; An anomaly detection model is obtained by constructing the enhanced multi-scale features based on the differential analysis network; The target image is input into the anomaly detection model for detection, and anomaly detection results are obtained.

[0007] Based on the same inventive concept, a second aspect of the exemplary embodiments of this disclosure provides a scale-aware modulation anomaly detection apparatus, comprising: The multi-scale feature determination module is configured to extract features from the target image based on the encoder to obtain multi-scale features; A multi-scale feature enhancement module is configured to enhance the multi-scale features to obtain enhanced multi-scale features. The detection model determination module is configured to construct the enhanced multi-scale features based on the differential analysis network to obtain an anomaly detection model; The detection result determination module is configured to input the target image into the anomaly detection model for detection and obtain anomaly detection results.

[0008] Based on the same inventive concept, a third aspect of the exemplary embodiments of this disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in the first aspect.

[0009] Based on the same inventive concept, a fourth aspect of the exemplary embodiments of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in the first aspect.

[0010] Based on the same inventive concept, a fifth aspect of the exemplary embodiments of this disclosure provides a computer program product including computer program instructions that, when run on a computer, cause the computer to perform the method as described in the first aspect.

[0011] As can be seen from the above, the scale-aware modulation anomaly detection method and related apparatus provided in this disclosure include: Feature extraction is performed on the target image using an encoder to obtain multi-scale features; these multi-scale features are then enhanced to obtain enhanced multi-scale features; an anomaly detection model is constructed based on the enhanced multi-scale features using a differential analysis network; the target image is then input into the anomaly detection model for detection to obtain an anomaly detection result. This disclosure can capture dynamic contextual information of anomaly regions and adaptively adjust scale, effectively improving the accuracy and robustness of anomaly detection in medical images. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A schematic diagram illustrating an application scenario of the scale-aware modulation anomaly detection method provided as an exemplary embodiment of this disclosure; Figure 2 A schematic flowchart of an anomaly detection method for scale-aware modulation provided as an exemplary embodiment of this disclosure; Figure 3A schematic diagram illustrating a feature enhancement method for anomaly detection using scale-aware modulation provided as an exemplary embodiment of this disclosure; Figure 4 A schematic diagram of a scale-aware modulation anomaly detection method provided as an exemplary embodiment of the present disclosure; Figure 5 A schematic diagram of the structure of electronic device hardware provided by an exemplary embodiment of this disclosure. Detailed Implementation

[0014] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0015] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this application's technical solution, based on the prompt message.

[0016] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0017] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this application. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this application.

[0018] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0019] To make the objectives, technical solutions, and advantages of this disclosure clearer, the principles and spirit of this disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0020] In this article, it is important to understand that any number of elements in the accompanying figures is for illustrative purposes and not for limitation, and any naming is for distinction only and has no limiting meaning.

[0021] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar words used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly. The article "a" or "an" preceding an element does not exclude the existence of multiple such elements.

[0022] The principles and spirit of this disclosure will be explained in detail below with reference to several representative embodiments.

[0023] As described in the background section, related technologies suffer from the problem that fixed context processing methods cannot adapt to multi-scale abnormal regions in medical images. This leads to performance degradation of models when faced with anomalies of different scales, making it difficult to effectively capture contextual information and affecting the accuracy and robustness of detection. Specifically, medical image anomaly detection is a highly anticipated task, one of its core applications being the detection and localization of minute lesions in medical images for postoperative assessment. However, due to significant individual differences among patients, the scale of abnormal regions can vary greatly, meaning that different input images may require different ranges of contextual information. To address this issue, previous distillation-based methods employed a "frozen teacher model" and a "learnable student model." The student model learns the features of the teacher model from normal samples through training, and finally, during the inference phase, anomalies are detected by comparing the features of the student model with those of the teacher model. Many subsequent works have also built upon this distillation paradigm, designing more complex and sophisticated student networks to achieve more effective feature reconstruction and improve the performance of anomaly detection tasks.

[0024] Existing distillation-based anomaly detection methods typically employ a fixed context processing approach when handling anomalies in medical images. This fixed approach means that the model uses a pre-defined receptive field or context range when extracting features and performing anomaly detection, and cannot dynamically adjust according to the actual scale of the anomaly region. For example, when the anomaly region is small, a fixed context range may introduce too much irrelevant background information, interfering with anomaly detection; while when the anomaly region is large, a fixed context range may not provide enough contextual information to accurately identify the anomaly, leading to a decrease in detection accuracy.

[0025] Furthermore, the scale of abnormal regions in medical images varies greatly due to individual patient differences, making it difficult for fixed-context processing methods to adapt to such dynamic changes. Because the context cannot be adjusted according to the actual scale of the abnormality, the model cannot effectively capture the most relevant contextual information when faced with multi-scale anomalies, thus affecting the accuracy and robustness of anomaly detection and leading to a decline in overall performance.

[0026] To address the aforementioned problems, this disclosure provides a scale-aware modulation anomaly detection method and related apparatus, the method specifically including: Feature extraction is performed on the target image based on an encoder to obtain multi-scale features; feature enhancement is performed on the multi-scale features to obtain enhanced multi-scale features; an anomaly detection model is constructed based on the enhanced multi-scale features using a differential analysis network; the target image is input into the anomaly detection model for detection to obtain anomaly detection results. This disclosure significantly improves the model's ability to represent anomalies at different scales, especially its sensitivity to small lesions, through multi-scale feature extraction and enhancement; this disclosure also utilizes a differential analysis mechanism to dynamically perceive scale changes in abnormal regions and adaptively adjust the scope of contextual information fusion, enhancing the model's robustness to scale differences; finally, this disclosure effectively improves the accuracy and localization precision of anomaly detection without significantly increasing the number of model parameters, and is particularly suitable for the automated identification of multi-scale and multi-type anomalies in complex clinical scenarios.

[0027] After introducing the basic principles of this disclosure, various non-limiting embodiments of this disclosure will be described in detail below.

[0028] refer to Figure 1 This is a schematic diagram of an application scenario of the scale-aware modulation anomaly detection method provided in the exemplary embodiments of this disclosure.

[0029] This application scenario includes a terminal device 101 and a server 102. The terminal device 101 and the server 102 can be connected via a wired or wireless communication network to achieve data interaction.

[0030] Terminal device 101 may be an electronic device located close to the user side, possessing data transmission and multimedia input / output functions, including but not limited to desktop computers, mobile phones, portable computers, tablet computers, media players, smart wearable devices, personal digital assistants (PDAs), or other electronic devices capable of performing the aforementioned functions. This electronic device may include a processor and a display screen with touch input functionality. The display screen is used to present a graphical user interface (GUI), which can display an application interface. The processor is used to process application data, generate the GUI, and control the display of the GUI on the screen.

[0031] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0032] In some exemplary embodiments, the scale-aware modulation anomaly detection method can be run on terminal device 101 or server 102.

[0033] When the scale-aware modulation anomaly detection method is running on server 102, server 102 is used to provide scale-aware modulation anomaly detection services to users of terminal device 101.

[0034] Server 102 extracts features from the target image based on the encoder to obtain multi-scale features; Server 102 performs feature enhancement on the multi-scale features to obtain enhanced multi-scale features; Server 102 constructs an anomaly detection model based on the enhanced multi-scale features using a differential analysis network. Server 102 inputs the target image into the anomaly detection model for detection, and obtains the anomaly detection result. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this disclosure, and the implementation of this disclosure is not limited in any way. On the contrary, the implementation of this disclosure can be applied to any applicable scenario.

[0035] refer to Figure 2 A scale-aware modulation anomaly detection method, the method comprising the following steps: Step S210: Extract features from the target image based on the encoder to obtain multi-scale features.

[0036] In some embodiments, the step of extracting features from the target image based on the encoder to obtain multi-scale features includes: The target image is pixel-adjusted to obtain a first-size image with a pixel size of 448×448; The first-sized image is cropped from the center to obtain a second-sized image with a size of 392×392; Based on the encoder, feature extraction is performed on the second-size image to obtain the multi-scale features.

[0037] In specific implementation, the target image is adjusted by pixels to obtain a first-size image with a pixel size of 448×448: The input raw medical images (i.e., target images such as chest X-rays, brain tumor MRI slices, skin lesion images, etc.) are standardized in size to uniformly adjust them to a first-size image with a pixel size of 448×448.

[0038] In practice, the first-sized image is cropped from the center to obtain a second-sized image with a size of 392×392. The first-size image, adjusted to 448×448 pixels, is further cropped to obtain a second-size image of 392×392 pixels. This cropping process precisely extracts the central region of the image, removes potential interference information at the edges, and preserves key features of the core region, ensuring that subsequent feature extraction and anomaly detection can focus on the most informative parts of the image.

[0039] In specific implementation, the multi-scale features are obtained by extracting features from the second-size image based on the encoder as follows: In this embodiment, a pre-trained visual base model (such as DINOv2) can be used as the teacher encoder, and all its parameters are frozen to retain knowledge of normal patterns and avoid interference during subsequent training. The teacher encoder is used to extract features from the middle 8 layers of a second-size image of size 392×392, thereby generating multi-scale features covering different scales and levels.

[0040] Step S220: Perform feature enhancement on the multi-scale features to obtain enhanced multi-scale features.

[0041] In this step, multi-scale features are hierarchically aligned and averaged, then optimized using channel and spatial attention to obtain enhanced multi-scale features. This step effectively improves the representational power of the fused features through a dual attention mechanism, optimizing the channel distribution of features and accurately focusing on foreground regions where anomalies may occur. This provides a high-quality feature foundation for subsequent normal pattern reconstruction by the decoder, indirectly improving the overall accuracy of anomaly detection.

[0042] In some embodiments, feature enhancement is performed on the multi-scale features to obtain enhanced multi-scale features, including: The multi-scale features are fused to obtain basic fused features; The basic fusion features are pooled based on the channel attention mechanism to obtain channel-enhanced features; The channel enhancement features are enhanced based on the spatial attention mechanism to obtain the enhanced multi-scale features.

[0043] In specific implementation, the multi-scale features are fused to obtain the basic fused features in the following way: Average pooling is used to perform preliminary fusion of the multi-scale features of the encoder to obtain basic fused features.

[0044] In practice, the basic fusion features are pooled based on a channel attention mechanism to obtain channel-enhanced features in the following way: refer to Figure 3 Channel attention is used to adjust the feature distribution. By performing adaptive average pooling and max pooling on the basic fused features, the pooling results are concatenated and then channel attention weights are generated through a lightweight MLP. The channel distribution of the original fused features is adjusted by weighting, thereby obtaining channel-enhanced features.

[0045] In specific implementation, the enhanced channel features are enhanced based on a spatial attention mechanism to obtain the enhanced multi-scale features in the following way: refer to Figure 3 The channel-enhanced features are subjected to average pooling and max pooling along the channel dimension through spatial attention mechanism. After concatenation, spatial attention weights are generated by 1D convolution and Sigmoid activation to focus on the target foreground region, thereby obtaining the enhanced multi-scale features.

[0046] Step S230: Construct the enhanced multi-scale features based on the differential analysis network to obtain the anomaly detection model.

[0047] In some embodiments, an anomaly detection model is obtained by constructing the enhanced multi-scale features based on a differential analysis network, including: The enhanced multi-scale features are weighted and fused based on the differential analysis network to obtain the weighted and fused multi-scale features. The anomaly detection model is constructed based on the weighted fusion of multi-scale features.

[0048] In specific implementation, the enhanced multi-scale features are weighted and fused based on the differential analysis network to obtain the weighted fused multi-scale features in the following way: By using a differential analysis network, multi-scale gating weights are generated based on the residual maps of encoder and decoder features. The enhanced multi-scale features are then dynamically weighted and fused to obtain weighted fused features that adapt to different anomaly scales.

[0049] In specific implementation, the anomaly detection model is constructed based on the weighted fusion of multi-scale features in the following manner: By performing specialized reconstruction and anomaly comparison analysis on the weighted fusion multi-scale features, a detection model that can adaptively handle multi-scale anomalies is constructed.

[0050] In some embodiments, the enhanced multi-scale features are weighted and fused based on the differential analysis network to obtain weighted and fused multi-scale features, including: Based on the decoder, feature extraction is performed on the enhanced multi-scale features to obtain decoder features; The Manhattan distance between the enhanced multi-scale features and the decoder features is determined, and a residual feature map is obtained based on the Manhattan distance. Based on the difference analysis network, the residual feature map is convolutionally activated to obtain multi-scale gating weights; The decoder features are weighted and fused based on the multi-scale gating weights to obtain the weighted and fused multi-scale features.

[0051] In specific implementation, the decoder features are obtained by extracting features from the enhanced multi-scale features based on the decoder. The decoder extracts features from the enhanced multi-scale features, gradually recovers the spatial resolution of the feature map through layer-by-layer upsampling and convolution operations, and refines and optimizes the features to finally generate decoder features that match the size of the input image.

[0052] In specific implementation, the Manhattan distance between the enhanced multi-scale features and the decoder features is determined, and the residual feature map is obtained based on the Manhattan distance as follows: By calculating the Manhattan distance between the enhanced multi-scale features and the decoder features, the difference between the two at each pixel location is quantified, thereby generating a residual feature map. This residual feature map can highlight the deviation between potential anomalous regions and normal patterns.

[0053] In specific implementation, the residual feature map is convolutionally activated based on the differential analysis network to obtain multi-scale gating weights: The differential analysis network receives residual feature maps as input, performs feature transformation on the residual feature maps through two 1×1 convolutional operations, and then normalizes the convolutional output to the (0,1) interval using the Sigmoid activation function to generate multi-scale gating weights. These gating weights are used to weightedly fuse contextual features under different receptive fields, thereby achieving dynamic adjustment of the scale of abnormal regions and adaptive capture of contextual information.

[0054] In specific implementation, the decoder features are weighted and fused based on the multi-scale gating weights to obtain the weighted and fused multi-scale features in the following way: Multi-scale gating weights generated by a differential analysis network are used to weight and fuse decoder features. By multiplying elements one by one, features related to abnormal regions are strengthened while suppressing the interference of background information, thus obtaining multi-scale features after weighted fusion.

[0055] In some embodiments, the anomaly detection model is constructed based on the weighted fused multi-scale features, including: Scale analysis is performed on the weighted and fused multi-scale features to construct an expert network; The expert network is used to reconstruct the weighted and fused multi-scale features to obtain the reconstructed multi-scale features. The anomaly detection model is constructed by comparing and analyzing the reconstructed multi-scale features with the weighted fused multi-scale features.

[0056] In practice, the expert network is constructed by performing scale analysis on the weighted fused multi-scale features. By performing scale analysis on the weighted and fused multi-scale features, an expert network is constructed to address anomalous regions at different scales. Specifically, based on the scale information of the multi-scale features, multiple expert network branches are designed, each specializing in feature reconstruction at a specific scale. A difference analysis network is used to quantify the semantic differences of the features, and a scale classifier is used to dynamically allocate the most suitable expert network branch, thereby achieving accurate modeling of anomalies at different scales and restoration of normal patterns.

[0057] In specific implementation, the expert network is used to reconstruct the weighted and fused multi-scale features to obtain the reconstructed multi-scale features in the following way: The expert network receives weighted and fused multi-scale features as input and performs targeted reconstruction of features at different scales through multiple expert branches. Each expert branch focuses on the feature recovery task at a specific scale, uses a difference analysis network to quantify the semantic differences of features, and combines a scale classifier to dynamically select the most suitable expert branch for feature reconstruction. Finally, it outputs the reconstructed multi-scale features, providing a more accurate reference for normal patterns in anomaly detection.

[0058] In specific implementation, the anomaly detection model is constructed by comparing and analyzing the reconstructed multi-scale features with the weighted fused multi-scale features: An anomaly detection model is constructed by comparing and analyzing the reconstructed multi-scale features with the weighted fused multi-scale features, and calculating the differences between the two. This difference analysis highlights the parts of the image that deviate from the normal pattern, thereby accurately locating abnormal regions. In this way, the model can effectively distinguish between normal and abnormal features, achieving high-precision detection of abnormal regions in medical images.

[0059] Step S240: Input the target image into the anomaly detection model for detection to obtain anomaly detection results.

[0060] In specific implementation, the target image is input into the anomaly detection model for detection, and the anomaly detection result is obtained in the following way: The target image is input into the constructed anomaly detection model. The model identifies and locates potential anomalous regions in the image through internal processes such as feature extraction, enhancement, scale analysis, feature reconstruction, and contrastive analysis. Finally, the model outputs anomaly detection results, clearly indicating whether an anomaly exists in the image and its specific location, providing a reliable reference for medical diagnosis.

[0061] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0062] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0063] Based on the same inventive concept, corresponding to any of the above embodiments, this disclosure also provides a scale-aware modulation anomaly detection device.

[0064] refer to Figure 4 The scale-aware modulation anomaly detection device includes: The multi-scale feature determination module 410 is configured to extract features from the target image based on the encoder to obtain multi-scale features; The multi-scale feature enhancement module 420 is configured to enhance the multi-scale features to obtain enhanced multi-scale features. The detection model determination module 430 is configured to construct the enhanced multi-scale features based on the differential analysis network to obtain an anomaly detection model; The detection result determination module 440 is configured to input the target image into the anomaly detection model for detection and obtain anomaly detection results.

[0065] In this exemplary embodiment, the multi-scale feature determination module 410 is specifically configured as follows: The target image is pixel-adjusted to obtain a first-size image with a pixel size of 448×448; the first-size image is center-cropped to obtain a second-size image with a size of 392×392; features are extracted from the second-size image based on the encoder to obtain multi-scale features.

[0066] In this exemplary embodiment, the multi-scale feature enhancement module 420 is specifically configured as follows: The multi-scale features are fused to obtain basic fused features; the basic fused features are pooled based on a channel attention mechanism to obtain channel enhanced features; the channel enhanced features are enhanced based on a spatial attention mechanism to obtain enhanced multi-scale features.

[0067] In this exemplary embodiment, the detection model determination module 430 is specifically configured as follows: Based on the decoder, feature extraction is performed on the enhanced multi-scale features to obtain decoder features; The Manhattan distance between the enhanced multi-scale features and the decoder features is determined, and a residual feature map is obtained based on the Manhattan distance. Convolutional activation is performed on the residual feature map using the differential analysis network to obtain multi-scale gating weights. The decoder features are then weighted and fused based on the multi-scale gating weights to obtain weighted and fused multi-scale features. Scale analysis is performed on the weighted and fused multi-scale features to construct an expert network. Feature reconstruction is performed on the weighted and fused multi-scale features using the expert network to obtain reconstructed multi-scale features. The reconstructed multi-scale features are compared and analyzed with the weighted and fused multi-scale features to construct an anomaly detection model.

[0068] In this exemplary embodiment, the detection result determination module 440 is specifically configured as follows: The target image is input into the anomaly detection model for detection, and anomaly detection results are obtained.

[0069] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.

[0070] The apparatus of the above embodiments is used to implement the corresponding scale-aware modulation anomaly detection method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0071] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the scale-aware modulation anomaly detection method described in any of the above embodiments.

[0072] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0073] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0074] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0075] The input / output interface 1030 is used to connect input / output modules to realize information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0076] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0077] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0078] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0079] The electronic devices described above are used to implement the corresponding scale-aware modulation anomaly detection methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0080] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the scale-aware modulation anomaly detection method as described in any of the above embodiments.

[0081] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0082] The aforementioned non-transitory computer-readable storage media can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).

[0083] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the scale-aware modulation anomaly detection method as described in any of the embodiments in the exemplary method section above, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0084] Based on the same inventive concept, corresponding to the scale-aware modulation anomaly detection method described in any of the above embodiments, this disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to perform the scale-aware modulation anomaly detection method. Corresponding to the execution entity for each step in each embodiment of the scale-aware modulation anomaly detection method, the processor executing the corresponding step can belong to the corresponding execution entity.

[0085] The computer program product of the above embodiments is used to cause the computer and / or the processor to execute the scale-aware modulation anomaly detection method as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0086] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, method, or computer program product. Therefore, this disclosure can be implemented as entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this disclosure can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0087] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (not exhaustive) of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0088] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0089] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0090] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0091] It should be understood that each block of a flowchart and / or block diagram, as well as combinations of blocks in a flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine that, when executed by a computer or other programmable data processing device, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0092] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction apparatus that implements the functions / operations specified in the boxes of a flowchart and / or block diagram.

[0093] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable apparatus can provide a process for implementing the functions / operations specified in the boxes of a flowchart and / or block diagram.

[0094] Furthermore, although the operations of the methods of this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowcharts may be executed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0096] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0097] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0098] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0099] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0100] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

[0101] While the spirit and principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.

Claims

1. An anomaly detection method for scale-aware modulation, characterized in that, include: Based on the encoder, feature extraction of the target image is performed to obtain multi-scale features; The multi-scale features are enhanced to obtain the enhanced multi-scale features; An anomaly detection model is obtained by constructing the enhanced multi-scale features based on the differential analysis network; The target image is input into the anomaly detection model for detection, and anomaly detection results are obtained.

2. The method according to claim 1, characterized in that, The feature extraction of the target image based on the encoder to obtain multi-scale features includes: The target image is pixel-adjusted to obtain a first-size image with a pixel size of 448×448; The first-sized image is cropped from the center to obtain a second-sized image with a size of 392×392; Based on the encoder, feature extraction is performed on the second-size image to obtain the multi-scale features.

3. The method according to claim 1, characterized in that, The step of enhancing the multi-scale features to obtain enhanced multi-scale features includes: The multi-scale features are fused to obtain basic fused features; The basic fusion features are pooled based on the channel attention mechanism to obtain channel-enhanced features; The channel enhancement features are enhanced based on the spatial attention mechanism to obtain the enhanced multi-scale features.

4. The method according to claim 1, characterized in that, The anomaly detection model is obtained by constructing the enhanced multi-scale features based on the differential analysis network, including: The enhanced multi-scale features are weighted and fused based on the differential analysis network to obtain the weighted and fused multi-scale features. The anomaly detection model is constructed based on the weighted fusion of multi-scale features.

5. The method according to claim 4, characterized in that, The weighted fusion of the enhanced multi-scale features based on the differential analysis network to obtain the weighted fused multi-scale features includes: Based on the decoder, feature extraction is performed on the enhanced multi-scale features to obtain decoder features; The Manhattan distance between the enhanced multi-scale features and the decoder features is determined, and a residual feature map is obtained based on the Manhattan distance. Based on the difference analysis network, the residual feature map is convolutionally activated to obtain multi-scale gating weights; The decoder features are weighted and fused based on the multi-scale gating weights to obtain the weighted and fused multi-scale features.

6. The method according to claim 4, characterized in that, The anomaly detection model is constructed based on the weighted fused multi-scale features, including: Scale analysis is performed on the weighted and fused multi-scale features to construct an expert network; The expert network is used to reconstruct the weighted and fused multi-scale features to obtain the reconstructed multi-scale features. The anomaly detection model is constructed by comparing and analyzing the reconstructed multi-scale features with the weighted fused multi-scale features.

7. An anomaly detection device based on scale-sensing modulation, characterized in that, include: The multi-scale feature determination module is configured to extract features from the target image based on the encoder to obtain multi-scale features; A multi-scale feature enhancement module is configured to enhance the multi-scale features to obtain enhanced multi-scale features. The detection model determination module is configured to construct the enhanced multi-scale features based on the differential analysis network to obtain an anomaly detection model; The detection result determination module is configured to input the target image into the anomaly detection model for detection and obtain anomaly detection results.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes computer program instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1 to 6.