A security warning method, device, medium and product based on image enhancement
Patent Information
- Application Number
- CN202610901704.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]现有ATM机配置的图像采集装置,在日间自然光充足环境下成像质量可控,但在夜间、楼道背光、阴雨昏暗等低光照工况下,采集图像存在整体亮度偏低、随机噪声密布、纹理与边缘细节退化模糊等缺陷
[0063]本申请实施例提供的一种基于图像增强的安全预警方法、设备、介质和产品,对图像特征、亮度特征和边缘特征进行多层下采样处理,得到多层级中间特征和全局深层特征。随后,基于全局深层特征确定多种退化类型的权重系数,并结合多种退化类型各自对应的基准特征生成退化表征,能够更有针对性地反映当前图像的退化情况。进而,基于退化表征以及多层级中间特征确定图像优化特征,并结合待处理图像生成增强图像。借助退化表征实现全局暗光量化调控,有效提高了对暗光环境下采集图像的增强效果。最终,基于增强图像进行安全预警,采用高质量增强图像可以有效减少异常操作的漏检、错检,提升了安全预警的可靠性。
Smart Images

Figure CN123015342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of image processing and intelligent security, and in particular to a security early warning method, device, medium and product based on image enhancement. Background Technology
[0002] With the widespread adoption of self-service financial services, ATMs are extensively deployed in various public areas such as commercial districts, communities, and streets, serving as a crucial platform for banks' offline deposit, withdrawal, and transfer services. To ensure transaction traceability, ATMs are generally equipped with image capture devices that collect real-time images of user interactions and key areas of the machine for post-transaction verification and security evidence collection.
[0003] Existing ATM image acquisition devices produce acceptable image quality under sufficient natural light during the day. However, in low-light conditions such as nighttime, backlit corridors, or dimly lit areas during rainy weather, the acquired images suffer from overall low brightness, dense random noise, and blurred or degraded texture and edge details. Most existing image enhancement solutions use fixed-parameter noise reduction and brightening, which cannot adapt to the varying degrees of degradation at night. Image enhancement may result in severe loss of detail, overexposure, and edge distortion, making it impossible to accurately identify abnormal user behavior.
[0004] Therefore, how to improve the enhancement effect of images acquired in low-light environments is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] This application provides a security early warning method, device, medium, and product based on image enhancement, which improves the enhancement effect of images acquired in low-light environments.
[0006] In a first aspect, embodiments of this application provide a security early warning method based on image enhancement, including:
[0007] Extract image features, brightness features, and edge features from the image to be processed;
[0008] Multi-level downsampling is performed on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features;
[0009] Based on global deep features, the weight coefficients of multiple degradation types are determined, and degradation representations are generated based on the baseline features corresponding to each degradation type and the weight coefficients of multiple degradation types.
[0010] Based on degradation characteristics and multi-level intermediate features, image optimization features are determined, and an enhanced image is generated based on the image optimization features and the image to be processed.
[0011] Security alerts are issued based on enhanced images.
[0012] In one possible implementation, image features, brightness features, and edge features of the image to be processed are extracted, including:
[0013] Image features of the image to be processed are extracted through convolutional layers;
[0014] The image to be processed is converted to a color space, and the value of the lightness channel is extracted to obtain the lightness feature;
[0015] The Sobel operator is used to extract edge features from the image to be processed.
[0016] In one possible implementation, multi-level downsampling is performed on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features, including:
[0017] The image features are downsampled by the first-layer downsampling module to obtain the first-layer intermediate features;
[0018] The second-layer downsampling module downsamples the features obtained by fusing the first-layer intermediate features and edge features to obtain the second-layer intermediate features.
[0019] The third-layer downsampling module downsamples the features obtained by fusing the intermediate features and brightness features of the second layer to obtain global deep features.
[0020] In one possible implementation, image optimization features are determined based on degradation characteristics and multi-level intermediate features, including:
[0021] The degradation characterization is subjected to first channel adaptation and second channel adaptation processing respectively to obtain the first degradation characterization and the second degradation characterization;
[0022] Based on the features obtained by fusing the first degenerate representation and the second layer intermediate features, intermediate optimized features are obtained;
[0023] Image optimization features are obtained based on the features obtained by fusing the second degradation representation, intermediate optimization features, and first-layer intermediate features.
[0024] In one possible implementation, the method further includes:
[0025] During the transaction processing phase when the bank card is in the card slot, if the ATM is detected to have its image enhancement function enabled, video frames are periodically extracted from the video captured by the image acquisition device and used as images to be processed.
[0026] In one possible implementation, security alerts are based on enhanced images, including:
[0027] From the enhanced image, extract the visual features of the preset regions, including: device status features, user behavior features, and facial features;
[0028] Based on the visual features of the region, anomaly scores are determined, and security warnings are issued based on these anomaly scores.
[0029] In one possible implementation, security alerts are generated based on anomaly scores, including:
[0030] If the abnormal score is higher than the first abnormal threshold but lower than the second abnormal threshold, a security warning will be issued via SMS and software pop-up based on the bank card account currently in operation.
[0031] If the abnormal score is greater than or equal to the second abnormal threshold, a security warning will be issued based on the bank card account currently being operated, via SMS, software pop-up, and telecom voice notification, and withdrawal and transfer operations of the corresponding bank card will be prohibited.
[0032] Secondly, embodiments of this application provide a security warning device based on image enhancement, comprising:
[0033] The feature extraction module is used to extract image features, brightness features, and edge features from the image to be processed.
[0034] The downsampling processing module is used to perform multi-level downsampling processing on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features.
[0035] The degradation characterization generation module is used to determine the weight coefficients of multiple degradation types based on global deep features, and generate degradation characterizations based on the baseline features corresponding to each degradation type and the weight coefficients of multiple degradation types.
[0036] An enhanced image generation module is used to determine image optimization features based on degradation characteristics and multi-level intermediate features, and to generate an enhanced image based on the image optimization features and the image to be processed.
[0037] The security warning module is used to provide security warnings based on enhanced images.
[0038] In one possible implementation, the feature extraction module, when extracting image features, brightness features, and edge features of the image to be processed, is specifically used for:
[0039] Image features of the image to be processed are extracted through convolutional layers;
[0040] The image to be processed is converted to a color space, and the value of the lightness channel is extracted to obtain the lightness feature;
[0041] The Sobel operator is used to extract edge features from the image to be processed.
[0042] In one possible implementation, the downsampling processing module, when performing multi-level downsampling processing on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features, is used for:
[0043] The image features are downsampled by the first-layer downsampling module to obtain the first-layer intermediate features;
[0044] The second-layer downsampling module downsamples the features obtained by fusing the first-layer intermediate features and edge features to obtain the second-layer intermediate features.
[0045] The third-layer downsampling module downsamples the features obtained by fusing the intermediate features and brightness features of the second layer to obtain global deep features.
[0046] In one possible implementation, the enhanced image generation module, when performing the determination of image optimization features based on degradation representations and multi-level intermediate features, specifically uses:
[0047] The degradation characterization is subjected to first channel adaptation and second channel adaptation processing respectively to obtain the first degradation characterization and the second degradation characterization;
[0048] Based on the features obtained by fusing the first degenerate representation and the second layer intermediate features, intermediate optimized features are obtained;
[0049] Image optimization features are obtained based on the features obtained by fusing the second degradation representation, intermediate optimization features, and first-layer intermediate features.
[0050] In one possible implementation, the safety warning device further includes an enhanced activation module for:
[0051] During the transaction processing phase when the bank card is in the card slot, if the ATM is detected to have its image enhancement function enabled, video frames are periodically extracted from the video captured by the image acquisition device and used as images to be processed.
[0052] In one possible implementation, when the security warning module performs security warnings based on enhanced images, it specifically uses the following methods:
[0053] From the enhanced image, extract the visual features of the preset regions, including: device status features, user behavior features, and facial features;
[0054] Based on the visual features of the region, anomaly scores are determined, and security warnings are issued based on these anomaly scores.
[0055] In one possible implementation, when the security alert module performs a security alert based on anomaly scores, it specifically uses the following methods:
[0056] If the abnormal score is higher than the first abnormal threshold but lower than the second abnormal threshold, a security warning will be issued via SMS and software pop-up based on the bank card account currently in operation.
[0057] If the abnormal score is greater than or equal to the second abnormal threshold, a security warning will be issued based on the bank card account currently being operated, via SMS, software pop-up, and telecom voice notification, and withdrawal and transfer operations of the corresponding bank card will be prohibited.
[0058] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0059] The memory stores the instructions that the computer executes;
[0060] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0061] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0062] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0063] This application provides a security early warning method, device, medium, and product based on image enhancement. It performs multi-level downsampling processing on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features. Subsequently, weight coefficients for various degradation types are determined based on the global deep features, and degradation representations are generated by combining the corresponding baseline features for each degradation type, which can more specifically reflect the current image degradation status. Furthermore, image optimization features are determined based on the degradation representations and multi-level intermediate features, and an enhanced image is generated by combining them with the image to be processed. Global dark light quantization control is achieved using degradation representations, effectively improving the enhancement effect on images acquired in low-light environments. Finally, security early warning is performed based on the enhanced image. Using high-quality enhanced images can effectively reduce missed or false detections of abnormal operations, improving the reliability of security early warnings. Attached Figure Description
[0064] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0065] Figure 1A flowchart illustrating a security early warning method based on image enhancement provided in this application. Figure 1 ;
[0066] Figure 2 A flowchart illustrating a security early warning method based on image enhancement provided in this application. Figure 2 ;
[0067] Figure 3 A flowchart illustrating a security early warning method based on image enhancement provided in this application. Figure 3 ;
[0068] Figure 4 A schematic diagram of the structure of a security early warning device based on image enhancement provided in this application;
[0069] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application.
[0070] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0071] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0072] It should be noted that the user information (including but not limited to user device information, user attribute information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0073] In actual deployment, ATMs are usually set up in semi-open environments such as the exterior of bank branches, self-service banking booths, shopping mall aisles, community service points or transportation hubs. ATMs are generally equipped with image acquisition devices to capture transaction images, so as to continuously acquire images to be processed, including the user's face, card insertion area, keyboard area, cash dispensing area and the appearance of the device, and to complete image analysis and early warning judgment.
[0074] Because ATMs need to operate 24 / 7, security early warning systems must not only record user operations such as withdrawals, transfers, and inquiries, but also provide usable image evidence for identifying and handling abnormal devices. Therefore, security early warning systems typically require continuous processing capabilities from image acquisition and processing to security analysis. In nighttime environments, rainy or snowy weather, or under insufficient unilateral lighting, acquired images suffer from defects such as low overall brightness, dense random noise, and blurred or degraded texture and edge details.
[0075] Based on the above scenarios, it can be seen that most existing technologies use image enhancement schemes that employ fixed parameters for noise reduction and brightening. However, this scheme cannot adapt to the varying degrees of degradation at night. After image enhancement, problems such as severe loss of detail, overexposure, and edge distortion may occur, making it impossible to accurately identify abnormal operation behaviors.
[0076] This application provides a security early warning method based on image enhancement. It extracts image features, brightness features, and edge features from the image to be processed, and performs multi-level downsampling on these features to obtain multi-level intermediate features and global deep features, which can characterize low-light image content from both local and global perspectives. Subsequently, weight coefficients for various degradation types are determined based on the global deep features, and degradation representations are generated by combining the corresponding baseline features for each degradation type, which can more specifically reflect the current image degradation status. Furthermore, image optimization features are determined based on the degradation representations and multi-level intermediate features, and an enhanced image is generated by combining it with the image to be processed. This enhanced image has low degradation, complete texture details, and natural colors, improving image visibility and providing a high-quality input image for subsequent abnormal operation behavior recognition and security early warning. Finally, security early warning is performed based on the enhanced image. Using high-quality enhanced images can effectively reduce missed and false detections of abnormal operations, improving the reliability of security early warnings.
[0077] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0078] Figure 1 A flowchart illustrating a security early warning method based on image enhancement provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:
[0079] S101: Extract image features, brightness features, and edge features from the image to be processed.
[0080] In this embodiment, the image to be processed can be a single frame image captured in real time by the image acquisition device in the ATM, or an image frame selected from a continuous video stream according to a preset time interval, event triggering conditions, or keyframe extraction strategy. Image features are used to characterize the basic visual information of the image to be processed, including but not limited to: overall scene content, texture distribution, device outline, personnel posture, and transaction area layout. Brightness features are used to reflect the brightness distribution of the image to be processed, and provide illumination information support in environments with nighttime, backlighting, and uneven local lighting; edge features are used to characterize the contour, boundary, and structural information in the image to be processed.
[0081] In practical implementation, for image feature extraction, a convolutional neural network can be used to perform convolution operations, normalization, and non-linear activation on the image to be processed, outputting image features with a fixed number of channels. For brightness feature extraction, the image to be processed can first undergo color space conversion, and the value of the brightness channel can be extracted as the brightness input. Then, one or more convolutional layers can be used to match it with image features in terms of spatial scale and channel dimension. For edge feature extraction, the Sobel operator can be applied to the grayscale image to extract the horizontal and vertical gradients respectively, and the edge features can be obtained by calculating the gradient magnitude. Alternatively, the Canny algorithm can be used to extract features from the grayscale image, obtaining accurate edge features through gradient calculation, non-maximum suppression, and double thresholding.
[0082] By simultaneously extracting image features, brightness features, and edge features during the input stage, image enhancement processing can move beyond relying solely on the original imaging result for single-path enhancement. Instead, it establishes a joint representation of the image to be processed from three dimensions: content information, brightness information, and structural information. This processing method is well-suited to problems particularly common in ATM scenarios, such as dark area compression, overexposure of reflections, insufficient contrast between people and backgrounds, and blurred device boundaries. Image enhancement not only needs to improve visibility but also needs to maintain the regional structure related to security judgment. Therefore, the introduction of edge features can suppress contour blurring after enhancement, the introduction of brightness features can avoid local overexposure caused by blindly brightening the entire image, and image features provide basic visual semantic support, thus establishing a complete input foundation for subsequent multi-layer downsampling and degradation state modeling.
[0083] S102: Perform multi-level downsampling on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features.
[0084] In this embodiment, multi-level downsampling is used to compress and refine image features, brightness features, and edge features layer by layer to form an information representation that simultaneously includes local details and global semantics. Multi-level intermediate features carry the local and intermediate layer information retained from different downsampling stages, reflecting the texture and boundary details of the transaction area, facial area, operation area, and device structure area at different scales. Global deep features are feature representations formed at a deeper level, used to characterize the overall scene relationships and global degradation trends of the entire image to be processed. For example, whether the entire image is in a low-light state, whether there is fog-like blur, whether there are local strong reflections, and whether there is occlusion or contrast imbalance.
[0085] In practice, image features, brightness features, and edge features are concatenated or weighted before entering the downsampling process. If concatenation is used, the three types of features can be combined into a unified feature tensor along the channel dimension, and then channel compression can be performed through 1×1 convolution. If weighted fusion is used, learnable fusion coefficients can be set for brightness features and edge features, so that the fusion network can automatically adjust the contribution ratio of different features based on the training samples.
[0086] The first layer of downsampling can be achieved using convolutions with a stride of 2, reducing the spatial resolution to half of the original. Simultaneously, residual connections preserve shallow structural details, resulting in first-layer intermediate features better suited for describing local information such as keyboard character edges, card insertion contours, cash dispenser shapes, and screen display borders. The second layer of downsampling further reduces resolution and expands the receptive field, enabling the second-layer intermediate features to cover the user's upper body posture, device front panel layout, and the interaction between the user and the device. The resulting second-layer intermediate features possess both local and regional expressive capabilities. The third layer of downsampling further expands the feature receptive range through a combination of stride convolutions, pooling, or dilated convolutions, allowing the output global deep features to comprehensively characterize the illumination distribution, degradation category mixing, and background interference levels of the entire image.
[0087] For ATM machine usage scenarios, the number of downsampling layers and the channel size can be set according to the actual deployment platform capabilities. For example, with limited computing power, a three-layer downsampling structure can be used, with the number of channels being 32, 64, and 128 respectively; with sufficient computing power, a higher channel size can be used to improve the precision of degradation recognition. Security alerts not only rely on global brightness recovery but also need to judge details such as whether the button area is obstructed, whether the cash dispenser is abnormally opened, whether there are pry marks on the machine panel, and whether the user's face area is covered by obstructions. Therefore, multi-level intermediate features should be retained. Image degradation usually has a global trend, such as low overall illumination, overall color cast, or large-area reflection. If only local features are relied upon, it is difficult to reliably distinguish various degradation types. Therefore, global deep features should be retained. During the compression process, multi-level intermediate features and global deep features are gradually formed, enabling subsequent processing to not only use deep semantics to determine the degradation nature, but also to trace back shallow and middle-level details to achieve targeted image restoration. This avoids the problems of detail blurring, boundary damage and regional imbalance that occur after single-scale enhancement methods increase brightness, and provides a stable basis for subsequent image optimization and reconstruction.
[0088] S103: Based on global deep features, determine the weight coefficients of multiple degradation types, and generate degradation representations based on the baseline features corresponding to each degradation type and the weight coefficients of multiple degradation types.
[0089] In this embodiment, multiple degradation types are used to describe the quality degradation that may occur in the image to be processed under complex environments. These types may include at least one or more of the following: low-light degradation, motion blur degradation, noise enhancement degradation, local overexposure degradation, backlight contrast imbalance degradation, reflection interference degradation, and local occlusion degradation. Global deep features, having undergone multi-layer downsampling, possess strong global semantic and overall state representation capabilities; therefore, they can be used as the basis for degradation identification. Weighting coefficients characterize the degree of influence of each degradation type on the current image to be processed; larger values indicate a more pronounced degradation type, which should contribute more significantly in the subsequent generation of degradation representations.
[0090] Baseline features serve as reference feature templates for different degradation types. These can be feature centers learned through large-scale sample training, or category prototype vectors statistically obtained beforehand based on different degradation simulation samples. Degradation representations comprehensively express the degradation state of the current image to be processed, acting as an intermediary bridge connecting global degradation modeling and detail enhancement reconstruction.
[0091] In practical implementation, global deep features can be input into a degradation discrimination sub-network, which includes a global average pooling layer, a 1×1 convolutional layer, and a normalized output layer. The global average pooling layer aggregates deep features in the spatial dimension into a global description vector. The 1×1 convolutional layer calculates the mapping relationship between this vector and each degradation type. The normalized output layer can use the Softmax function to obtain the weight coefficients for each degradation type. The purpose of using normalized weights is to facilitate the subsequent stable weighting of multiple baseline features, preventing one type of degradation from masking other degradation information due to excessively large numerical scales.
[0092] After obtaining the weight coefficients corresponding to each degradation type, the baseline features corresponding to each degradation type are called. The baseline features are feature vectors that maintain the same dimension as the global deep feature channels. For example, the baseline features corresponding to low illumination are used to characterize the pixel compression distribution law in dark areas, the baseline features corresponding to blur are used to characterize the boundary diffusion change pattern, the baseline features corresponding to reflection interference are used to characterize the local highlight abrupt change features, and the baseline features corresponding to occlusion degradation are used to reflect the features of region missing and texture interruption.
[0093] In the process of generating degenerate representations, the baseline features of each degenerate type are first multiplied element-wise with the weight coefficients corresponding to that degenerate type to achieve weighted processing. Then, a weighted summation operation is performed on the multiple sets of features after weighting. Finally, the summed features are input into a 3×3 convolutional layer to carry out cross-channel feature fusion processing, and finally the degenerate representation is obtained.
[0094] The calculation formula for generating the degradation characterization is as follows:
[0095] ;
[0096] in, For the generated degradation characterization; The baseline feature corresponding to the degradation type; The weight coefficient for the i-th type of degradation; This indicates that a 3×3 convolutional layer is used for feature fusion processing.
[0097] Existing image enhancement methods typically apply a uniform enhancement curve to all images to be processed, making it difficult to differentiate between different degradation conditions. This can easily lead to over-enhancing some areas of the enhanced image while leaving others blurred. In this embodiment, based on global deep features, weight coefficients for various degradation types are determined. This facilitates the perception of whether the image to be processed is primarily characterized by insufficient brightness, blurred edges, or a combination of issues such as reflections and occlusions. Furthermore, degradation representations are generated using corresponding baseline features. These degradation representations are equivalent to conditional encodings of the degradation state of the image to be processed. They transform abstract degradation judgments into guiding information that can directly participate in feature reconstruction, making the subsequently generated image optimization features more targeted, thereby improving the enhanced image's ability to recover key regions.
[0098] S104: Based on degradation representation and multi-level intermediate features, determine image optimization features, and generate an enhanced image based on the image optimization features and the image to be processed.
[0099] In this embodiment, the image optimization features are feature representations more suitable for restoring image quality, formed by the combined effect of degradation representations and multi-level intermediate features. The degradation representations provide global degradation constraints, while the multi-level intermediate features provide local detail constraints. Together, they determine the enhancement direction and magnitude. The enhanced image is a repaired output image reconstructed based on the image optimization features combined with the original image features. Compared to the image to be processed, it can improve brightness levels, texture clarity, and structural recognizability, while maintaining consistency between the original scene content and device status, avoiding the generation of pseudo-textures that affect subsequent warning judgments.
[0100] In practice, the degraded representations are subjected to first-channel and second-channel adaptation processes to obtain first and second degraded representations, respectively. Spatial and channel unification can be achieved through upsampling and 1×1 convolution, facilitating the hierarchical participation of the degraded representations in feature fusion. Then, based on the features fused from the first degraded representation and the second-layer intermediate features, intermediate optimized features are obtained. Furthermore, based on the features fused from the second degraded representation, intermediate optimized features, and the first-layer intermediate features, image optimized features are obtained. Finally, based on the image optimized features and the image to be processed, an enhanced image is generated.
[0101] To ensure that the determined image optimization features possess accurate degradation compensation, detail preservation, and structural fidelity capabilities, and that the generated enhanced images can meet the abnormal operation recognition requirements of ATM usage scenarios, multi-dimensional joint constraints can be applied to the image optimization feature solving process and the image enhancement generation process. These constraints include structural similarity constraints and edge preservation constraints, enabling precise control over the direction and magnitude of feature correction. Edge preservation constraints, during the image optimization feature solving process, focus on constraining gradient abrupt change regions, ensuring that the edge features of key areas such as the card slot edge, keyboard outline, machine frame, cash dispenser opening boundary, and facial contours of the ATM are complete and clear. Structural similarity constraints constrain the overall correction logic of the image optimization features, ensuring that the spatial structure and object shape layout of the main image remain consistent before and after enhancement.
[0102] By using degraded representations as global guidance, multi-level intermediate features as sources of detail, and combining them with original image features to perform joint reconstruction, adaptive enhancement for complex degraded scenes is achieved. The output enhanced image can improve visibility in dark areas while preserving edge and texture details, and reducing noise amplification, local overexposure, and structural distortion, thus providing a more reliable image foundation for subsequent abnormal operation behavior recognition.
[0103] S105: Provide security alerts based on enhanced images.
[0104] In this embodiment, the security warning is a warning or action triggered based on anomalies identified in the enhanced image.
[0105] In practice, multi-dimensional analysis is performed based on enhanced images to comprehensively determine the security level. Based on this security level, a corresponding warning method is selected. The multi-dimensional analysis includes: abnormal device detection analysis, user behavior analysis, and facial anomaly analysis. For abnormal device detection analysis, core device areas such as the device frame, card insertion area, cash dispensing area, and keyboard area in the enhanced image are used as detection targets. Target detection algorithms accurately extract complete features of device components, compare them with a standard feature library of normal devices, and identify various abnormal device states. For example, it can detect abnormalities such as device obstruction, component damage, foreign object adhesion, card slot blockage, abnormal opening and closing of the cash dispensing slot, and the addition of suspicious devices to the device, simultaneously outputting the device anomaly type and location.
[0106] For user behavior analysis, based on enhanced image extraction of dynamic features such as human contours, body movements, and operation trajectories, intelligent judgment is made on user operation behavior in ATM operation scenarios. It can accurately identify abnormal behaviors such as loitering, prolonged obstruction of the camera, hitting or bumping the equipment, unauthorized disassembly of the equipment, frequent card insertion and removal, and obstruction of the keyboard PIN input area, and output the type and duration of abnormal behavior.
[0107] For facial anomaly analysis, the system relies on enhanced image localization to locate facial regions within the image and extracts key facial features to conduct facial state analysis. It can identify anomalies such as the absence of faces, multiple people sharing a device, face occlusion, and abnormal facial expressions. Simultaneously, it performs facial validity verification and outputs the results of facial anomaly status and personnel identity verification.
[0108] Furthermore, based on the results of enhanced image multidimensional analysis, the security level is comprehensively determined. Generally, if all three angles are determined to be free of anomalies, the security level is determined to be low-risk; if only one angle shows anomalies, the security level is determined to be medium-risk; if two angles show anomalies, the security level is determined to be high-risk; and if all three angles show anomalies, the security level is determined to be severe. Finally, based on the preset correspondence between security levels and security warning responses, the corresponding warning methods are determined and executed to achieve graded handling of anomalies and precise warnings. Warning methods include, but are not limited to: pushing software pop-ups to the monitoring terminal, sending SMS messages to bank security personnel, initiating telecom voice notifications to the monitoring center, and temporarily prohibiting withdrawals, transfers, or continued interactive operations.
[0109] The security early warning method based on image enhancement provided in this application extracts image features, brightness features, and edge features from the image to be processed, and performs multi-level downsampling processing on these features to obtain multi-level intermediate features and global deep features, which can characterize the content of low-light images from both local and global levels. Subsequently, weight coefficients for various degradation types are determined based on the global deep features, and degradation representations are generated by combining the corresponding baseline features for each degradation type, which can more specifically reflect the degradation status of the current image. Furthermore, image optimization features are determined based on the degradation representations and multi-level intermediate features, and an enhanced image is generated by combining these features with the image to be processed. Global low-light quantization control is achieved through degradation representations, local detail protection is achieved through multi-level intermediate features, and degradation constraints are embedded into the decoding optimization features layer by layer to achieve targeted compensation for low-light defects, balancing dark area brightening, noise suppression, and detail preservation. This effectively improves the enhancement effect of images acquired in low-light environments and provides high-quality input images for subsequent abnormal operation behavior recognition and security early warning. Ultimately, security alerts based on enhanced images can effectively reduce missed or false detections of abnormal operations by using high-quality enhanced images, thus improving the reliability of security alerts.
[0110] Figure 2 A flowchart illustrating a security early warning method based on image enhancement provided in this application. Figure 2 ,like Figure 2 As shown, the method includes:
[0111] S201: Extract image features of the image to be processed through convolutional layers; perform color space transformation on the image to be processed and extract the value of the brightness channel to obtain brightness features; use the Sobel operator to extract the edge features of the image to be processed.
[0112] In this embodiment, convolutional layers are used to perform local neighborhood mapping on the input image to be processed, so as to extract texture, contour, and local structural information while preserving spatial location information. Color space transformation is used to map the image to be processed to a representation space that facilitates the separation of luminance components, so that the luminance channel can reflect the lighting intensity of the scene. The Sobel operator is used to calculate the gradient changes of the image to be processed in the horizontal and vertical directions to highlight boundary and contour regions.
[0113] In practical implementation, feature encoding can be performed on the image to be processed through convolutional layers to obtain image features. The convolutional kernel can be 3×3 or 5×5 in size to obtain local texture response with less computational overhead.
[0114] Subsequently, the original image to be processed is converted to the HSV color space or another color space suitable for brightness separation, and the lightness channel is extracted as a brightness feature to characterize the overall brightness changes under nighttime, backlighting, or local shadow conditions. For example, in the HSV color space, color attributes are divided into hue (H), saturation (S), and value (V), which makes color representation more intuitive and facilitates image recognition in low-light environments. In the HSV space, if the RGB colors of the image to be processed are set to (R, G, B), the value of the V channel can be calculated using the following formula:
[0115] ;
[0116] Furthermore, the Sobel operator is applied to the image to be processed to calculate the horizontal and vertical gradients respectively, and the gradient magnitudes are combined to obtain edge features, thereby preserving the structural boundaries of the card insertion area, keyboard area, cash withdrawal area and user face area.
[0117] The specific process for calculating edge intensity is as follows: When calculating the gradients of the image to be processed in the horizontal and vertical directions, two 3×3 convolution kernels are used, one to detect horizontal edges and the other to detect vertical edges. By applying these two convolution kernels to the image to be processed, the gradient information Gx and Gy in the horizontal and vertical directions are obtained. Then, the gradient magnitude of each pixel is calculated using the following formula, thereby obtaining the edge features: .
[0118] The image features obtained from convolution, the brightness features corresponding to the brightness channel, and the edge features output by the Sobel operator can be output at the same feature alignment scale for subsequent multi-layer downsampling and fusion processing. Since the convolutional layer enhances semantic texture representation, the brightness channel improves the ability to identify low-light and overexposed areas, and the Sobel operator highlights edge contours, it can effectively alleviate the information loss caused by uneven lighting, dark area compression, and edge weakening in the complex scene of an ATM.
[0119] S202: The image features are downsampled by the first-layer downsampling module to obtain the first-layer intermediate features; the features after the fusion of the first-layer intermediate features and edge features are downsampled by the second-layer downsampling module to obtain the second-layer intermediate features; the features after the fusion of the second-layer intermediate features and brightness features are downsampled by the third-layer downsampling module to obtain the global deep features.
[0120] In this embodiment, a three-level downsampling architecture is set up. This downsampling module can use a TransformerBlock as the core computational unit, relying on the Transformer's self-attention mechanism to complete feature encoding and spatial dimension downsampling; alternatively, it can be replaced with any of the convolutional downsampling or pooling downsampling modules to achieve feature scale compression. Edge features are used to characterize object contours, texture abrupt changes, and structural boundaries in the image, and are typically obtained by gradient extraction of the image to be processed using the Sobel operator. Brightness features are used to reflect the light and dark distribution of the image, and are typically obtained by extracting the brightness channel after color space conversion of the image to be processed.
[0121] In its implementation, the first-layer downsampling module performs initial downsampling on the image features extracted by the convolutional layers. This reduces feature resolution while preserving local structural information such as the transaction area, person outlines, and device appearance. The output first-layer intermediate features are used for subsequent feature fusion. Subsequently, the first-layer intermediate features and edge features are first aligned by channel and space, then fused using methods such as concatenation, element-wise addition, or gated fusion to form a fused feature, which is then fed into the second-layer downsampling module to obtain a second-layer intermediate feature that emphasizes contour constraints. Furthermore, the second-layer intermediate features are further matched and fused with brightness features, using brightness information to compensate for grayscale deviations under low light, backlight, or local overexposure conditions. This is then refined by the third-layer downsampling module to form global deep features. These global deep features simultaneously encompass the overall image structure, local edge constraints, and brightness distribution information, thus providing a unified deep foundation for subsequent degradation characterization construction and image optimization feature generation.
[0122] Through the above method, image features retain details in the shallow layer, edge features enhance structural boundaries in the middle layer, and brightness features supplement illumination priors in the deep layer, enabling the multi-level downsampling process to take into account both local texture and global semantics. The resulting multi-level intermediate features and global deep features can adapt to low-light conditions, backlight contrast, and reflective interference in ATM usage scenarios, improving the recognizability of subsequent enhanced images and providing more stable feature support for security warnings.
[0123] S203: Based on global deep features, determine the weight coefficients of multiple degradation types, and generate degradation representations based on the baseline features corresponding to each degradation type and the weight coefficients of multiple degradation types.
[0124] The determination of weight coefficients for various degradation types and the implementation process for generating degradation representations have been fully described in the previous embodiments and will not be repeated here.
[0125] S204: Perform first-channel adaptation and second-channel adaptation processing on the degraded representation to obtain the first degraded representation and the second degraded representation; obtain intermediate optimized features based on the features after fusing the first degraded representation and the intermediate features of the second layer; obtain image optimized features based on the features after fusing the second degraded representation, the intermediate optimized features and the intermediate features of the first layer; generate an enhanced image based on the image optimized features and the image to be processed.
[0126] In this embodiment, the first channel adapter is used to map the degraded representation to a channel dimension that matches the intermediate features of the second layer, and the second channel adapter is used to map the degraded representation to a channel dimension that matches the intermediate features and intermediate optimized features of the first layer. The two can use different convolution kernel parameters, channel compression ratios or pointwise convolution mapping relationships so that the degraded representation can maintain effective expression when features are fused at different levels.
[0127] In practice, the degenerate representation is input into different channel adaptation units to obtain the first and second degenerate representations. Specifically, the degenerate representation is fed into the first set of channel adaptation units, where the number of channels and feature space size are adjusted using convolutional layers within the unit. Then, a normalization layer regularizes the feature distribution, and an activation layer introduces a nonlinear transformation, outputting the first degenerate representation whose dimension perfectly matches the intermediate features of the second layer. The same degenerate representation is then fed into the second set of channel adaptation units, where it undergoes progressive convolution, normalization, and activation operations to achieve dimension adaptation, outputting the second degenerate representation whose dimension matches the fusion conditions of the intermediate features and optimized features of the first layer.
[0128] Then, the first degradation representation and the second-layer intermediate features are channel-separated and fused. The second-layer intermediate features carry local detail information such as image texture and edge structure, while the first degradation representation carries global degradation constraint information. After fusion, the two are sent to the decoding module for feature refinement to obtain intermediate optimized features.
[0129] Furthermore, the intermediate optimized features are upsampled to align their spatial dimensions with the first-layer intermediate features. Then, the upsampled intermediate optimized features, the first-layer intermediate features, and the channel-adapted second degradation representation are multi-channel stitched together. The first-layer intermediate features contain shallow, fine texture information, the intermediate optimized features carry mid-scale details and mid-level degradation correction information, and the second degradation representation continuously transmits global degradation constraints. The fused combined features are optimized by feature mapping in the decoding module, outputting image optimized features adapted to the current low-light and dark-light ATM usage scenarios. The image optimized features are transformed into degradation compensation residual features through terminal convolution operations. These residual features are then superimposed pixel-by-pixel with the image to be processed. The low-light correction information of the optimized features is used to compensate for degradation defects such as underexposure, noise, and blur, ultimately outputting a repaired and enhanced image.
[0130] S205: Provide security warnings based on enhanced images.
[0131] The process of implementing security warnings based on enhanced images has been fully described in the previous embodiments and will not be repeated here.
[0132] The security warning method based on image enhancement provided in this application extracts image features through convolutional layers and performs color space transformation on the image to be processed to obtain brightness features. Simultaneously, edge features are extracted using the Sobel operator. Then, through three downsampling operations, first-layer intermediate features, second-layer intermediate features, and global deep features are obtained. The multi-level intermediate features and global deep features obtained through multi-layer downsampling can adapt to low-light conditions, backlight contrast, and reflective interference in ATM usage scenarios, improving the recognizability of subsequent enhanced images and providing more stable feature support for security warnings. Furthermore, based on the global deep features, weight coefficients for various degradation types are determined, and degradation representations are generated based on the corresponding baseline features and weight coefficients for each degradation type. Subsequently, the degradation representations are fused with the first-layer and second-layer intermediate features to obtain image optimization features. The low-light correction information of the image optimization features is used to compensate for degradation defects such as underexposure, noise, and blur in the image to be processed, ultimately outputting a repaired enhanced image. The enhanced image exhibits low degradation, intact texture details, and natural colors, improving the enhancement effect on images acquired in low-light environments and providing high-quality input images for subsequent abnormal operation behavior recognition and security warnings. Ultimately, security warnings based on enhanced images, utilizing high-quality enhanced images, can effectively reduce missed and false detections of abnormal operations, thus improving the reliability of security warnings.
[0133] Figure 3 A flowchart illustrating a security early warning method based on image enhancement provided in this application. Figure 3 ,like Figure 3 As shown, the method includes:
[0134] S301: During the business processing stage when the bank card is in the card slot, if the low light enhancement function of the ATM is detected to be enabled, video frames are periodically extracted from the video captured by the image acquisition device as images to be processed.
[0135] In this embodiment, the business processing stage where the bank card is in the card slot refers to the bank card being inserted into the ATM card slot and entering an interactive processing process such as identity verification, withdrawal, transfer, or inquiry. The image acquisition device can be a camera or industrial camera arranged at the front of the ATM, used to continuously acquire video data including: the user's face, the card insertion area, the keyboard area, and the cash dispensing area. The low-light enhancement function refers to an image enhancement mode activated when the ambient brightness is below a threshold. This threshold can be determined based on statistical analysis of real samples to improve image visibility in nighttime, backlit, or low-light scenes. The size of the threshold is not limited in this embodiment.
[0136] In practical implementation, the ATM can continuously monitor the activation / deactivation status of the low-light enhancement function during the transaction processing phase. When it is determined that the low-light enhancement function is enabled, video frames are captured from the real-time video stream at preset time intervals, and these captured video frames are used as images to be processed in subsequent image enhancement processing. The time interval can be set according to the transaction duration, video frame rate, etc., for example, it can be set to capture every several frames or several milliseconds, so as to reduce redundant calculations while ensuring continuous coverage of the transaction process.
[0137] To avoid missing key moments such as card insertion, button operation, and cash dispensing, the frame timing can be synchronized by combining business status signals, so that the images to be processed can cover key scenarios such as bank card holding time, personnel operation, and changes in equipment status.
[0138] During the business processing phase and with low-light enhancement enabled, video frames are extracted from the captured video as images to be processed and subsequent image enhancement operations are performed. This allows the ATM to skip the enhancement process in idle standby and well-lit scenarios, significantly reducing invalid convolution and feature encoding operations and saving terminal computing power and storage space.
[0139] S302: Extract image features, brightness features, and edge features from the image to be processed.
[0140] The process of extracting image features, brightness features, and edge features has been fully described in the previous embodiments and will not be repeated here.
[0141] S303: Perform multi-level downsampling on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features.
[0142] The process of performing multi-level downsampling to obtain multi-level intermediate features and global deep features has been fully described in the previous embodiments and will not be repeated here.
[0143] S304: Based on global deep features, determine the weight coefficients of multiple degradation types, and generate degradation representations based on the baseline features corresponding to each degradation type and the weight coefficients of multiple degradation types.
[0144] The determination of weight coefficients for various degradation types and the implementation process for generating degradation representations have been fully described in the previous embodiments and will not be repeated here.
[0145] S305: Based on degradation characteristics and multi-level intermediate features, determine image optimization features, and generate an enhanced image based on the image optimization features and the image to be processed.
[0146] The process of determining image optimization features and generating enhanced images has been fully described in the previous embodiments and will not be repeated here.
[0147] S306: Extract visual features of a preset region from the enhanced image, wherein the visual features include: device status features, user behavior features, and facial features; determine an anomaly score based on the visual features; if the anomaly score is higher than a first anomaly threshold but lower than a second anomaly threshold, issue a security warning via SMS and software pop-up based on the currently used bank card account; if the anomaly score is greater than or equal to the second anomaly threshold, issue a security warning via SMS, software pop-up, and telecom voice notification based on the currently used bank card account, and prohibit withdrawal and transfer operations of the corresponding bank card.
[0148] In this embodiment, the preset region is the area of interest in the enhanced image that is directly related to ATM transaction security, typically including but not limited to: the card slot, keypad area, cash dispenser, screen area, and the area where the user's face is located, so as to focus analysis resources on device status, operational behavior, and identity-related information. The region visual features are a set of image quantification features extracted from the preset region in the enhanced image, used to quantify the degree of scene anomalies. Specifically, device status features characterize whether the device appearance is obstructed, pried, or damaged by additional devices or structures; user behavior features characterize hand movements, postures, operational trajectories, and the presence of abnormal contact behavior; and facial features characterize facial contours, key point distribution, and occlusion.
[0149] The first anomaly threshold is used to characterize the boundary between mild and moderate anomalies. When the anomaly score is between the first and second anomaly thresholds, it indicates that the current transaction process has shown signs of anomalies that have not yet reached a severe level. The second anomaly threshold is used to characterize the trigger boundary for high-level anomalies. When the anomaly score reaches or exceeds the second anomaly threshold, it indicates that the current bank card operation has a strong concentration of anomalies, and it is necessary to simultaneously increase the alarm intensity and restrict transaction permissions.
[0150] In practical implementation, a feature extraction structure based on convolutional neural networks can be used to perform region cropping, scale normalization, and feature encoding on preset regions in the enhanced image, thereby outputting feature vectors related to device status, user behavior, and face, i.e., regional visual features.
[0151] Following this, based on pre-set scoring ranges for various anomalies, device status features, user behavior features, and facial features are individually quantified and scored to obtain an anomaly score for each feature. A higher anomaly score indicates a more severe anomaly. Then, the final anomaly score is calculated by combining the anomaly scores and weights of each feature, i.e., Anomaly Score = Device Anomaly Score × Device Weight + Behavior Anomaly Score × Behavior Weight + Facial Anomaly Score × Facial Weight.
[0152] After calculating the anomaly score, it is compared with a pre-configured first and second anomaly thresholds. When the anomaly score is greater than the first threshold but less than the second threshold, the account identifier associated with the current transaction is invoked to generate a corresponding warning message. This message is simultaneously output via SMS gateway and client messaging interface to remind the cardholder to verify the transaction environment. When the anomaly score reaches or exceeds the second threshold, in addition to sending SMS messages and pop-ups, a telecom voice alarm can be issued to the cardholder. Simultaneously, the current bank card's withdrawal and transfer permissions are written to a restriction status table to immediately block subsequent withdrawal and transfer instructions.
[0153] The image enhancement-based security warning method provided in this application, during the business processing phase when the bank card is in the card slot, if the ATM is detected to have its low-light enhancement function enabled, periodically extracts video frames from the video captured by the image acquisition device as images to be processed. Only during the business processing phase, when the low-light enhancement function is enabled, are video frames extracted from the captured video as images to be processed and subsequent image enhancement operations performed. This allows the ATM to skip the enhancement process in idle standby or well-lit scenarios, significantly reducing invalid convolution and feature encoding operations and saving terminal computing power and storage space.
[0154] Furthermore, multi-level downsampling processing is performed on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features. Subsequently, weight coefficients for various degradation types are determined based on the global deep features, and degradation representations are generated by combining the baseline features corresponding to each degradation type. Then, image optimization features are determined based on the degradation representations and multi-level intermediate features, and an enhanced image is generated by combining them with the image to be processed. Finally, regional visual features are extracted from preset regions in the enhanced image, and anomaly scores are determined based on these regional visual features. If the anomaly score is higher than a first anomaly threshold but lower than a second anomaly threshold, a security warning is issued via SMS and software pop-ups based on the currently used bank card account. If the anomaly score is greater than or equal to the second anomaly threshold, a security warning is issued via SMS, software pop-ups, and telecom voice notifications based on the currently used bank card account, and withdrawal and transfer operations on the corresponding bank card are prohibited. Differentiated responses to different anomaly levels in ATM usage scenarios improve the timeliness and coverage of anomaly alerts and can directly prevent withdrawal and transfer operations on the corresponding bank card under highly abnormal conditions, thereby improving the efficiency of handling abnormal operations.
[0155] Figure 4 A schematic diagram of a security early warning device based on image enhancement provided in this application is shown below. Figure 4 As shown, the safety warning device 40 provided in this embodiment includes:
[0156] Feature extraction module 401 is used to extract image features, brightness features and edge features of the image to be processed;
[0157] The downsampling processing module 402 is used to perform multi-level downsampling processing on image features, brightness features and edge features to obtain multi-level intermediate features and global deep features;
[0158] The degradation characterization generation module 403 is used to determine the weight coefficients of multiple degradation types based on global deep features, and to generate degradation characterizations based on the baseline features corresponding to each of the multiple degradation types and the weight coefficients of the multiple degradation types.
[0159] The enhanced image generation module 404 is used to determine image optimization features based on degradation representation and multi-level intermediate features, and to generate an enhanced image based on the image optimization features and the image to be processed.
[0160] The security warning module 405 is used to provide security warnings based on enhanced images.
[0161] In one possible implementation, when the feature extraction module 401 extracts image features, brightness features, and edge features of the image to be processed, it is specifically used for:
[0162] Image features of the image to be processed are extracted through convolutional layers;
[0163] The image to be processed is converted to a color space, and the value of the lightness channel is extracted to obtain the lightness feature;
[0164] The Sobel operator is used to extract edge features from the image to be processed.
[0165] In one possible implementation, when performing multi-level downsampling processing on image features, brightness features, and edge features to obtain multi-level intermediate features and global deep features, the downsampling processing module 402 is used to:
[0166] The image features are downsampled by the first-layer downsampling module to obtain the first-layer intermediate features;
[0167] The second-layer downsampling module downsamples the features obtained by fusing the first-layer intermediate features and edge features to obtain the second-layer intermediate features.
[0168] The third-layer downsampling module downsamples the features obtained by fusing the intermediate features and brightness features of the second layer to obtain global deep features.
[0169] In one possible implementation, when the enhanced image generation module 404 performs the task of determining image optimization features based on degradation representations and multi-level intermediate features, it specifically performs the following:
[0170] The degradation characterization is subjected to first channel adaptation and second channel adaptation processing respectively to obtain the first degradation characterization and the second degradation characterization;
[0171] Based on the features obtained by fusing the first degenerate representation and the second layer intermediate features, intermediate optimized features are obtained;
[0172] Image optimization features are obtained based on the features obtained by fusing the second degradation representation, intermediate optimization features, and first-layer intermediate features.
[0173] In one possible implementation, the safety warning device further includes an enhanced activation module for:
[0174] During the transaction processing phase when the bank card is in the card slot, if the ATM is detected to have its image enhancement function enabled, video frames are periodically extracted from the video captured by the image acquisition device and used as images to be processed.
[0175] In one possible implementation, when the security warning module 405 performs security warning based on enhanced images, it is specifically used for:
[0176] From the enhanced image, extract the visual features of the preset regions, including: device status features, user behavior features, and facial features;
[0177] Based on the visual features of the region, anomaly scores are determined, and security warnings are issued based on these anomaly scores.
[0178] In one possible implementation, when the security warning module 405 performs a security warning based on anomaly scores, it is specifically used for:
[0179] If the abnormal score is higher than the first abnormal threshold but lower than the second abnormal threshold, a security warning will be issued via SMS and software pop-up based on the bank card account currently in operation.
[0180] If the abnormal score is greater than or equal to the second abnormal threshold, a security warning will be issued based on the bank card account currently being operated, via SMS, software pop-up, and telecom voice notification, and withdrawal and transfer operations of the corresponding bank card will be prohibited.
[0181] This embodiment provides a security warning device based on image enhancement, which can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0182] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0183] In the specific implementation process, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to execute the above-mentioned image enhancement-based security warning method.
[0184] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0185] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0186] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0187] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0188] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described image-enhanced security warning method.
[0189] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the aforementioned image-enhanced security warning method.
[0190] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0191] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0192] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0194] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0195] If a function is implemented as 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0196] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0197] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A security early warning method based on image enhancement, characterized in that, include: Extract image features, brightness features, and edge features from the image to be processed; Multi-level downsampling is performed on the image features, the brightness features, and the edge features to obtain multi-level intermediate features and global deep features; Based on the global deep features, weight coefficients for multiple degradation types are determined, and degradation representations are generated based on the baseline features corresponding to each of the multiple degradation types and the weight coefficients for the multiple degradation types. Based on the degradation characteristics and the multi-level intermediate features, image optimization features are determined, and an enhanced image is generated based on the image optimization features and the image to be processed. Security warnings are issued based on the enhanced images.
2. The method according to claim 1, characterized in that, The extraction of image features, brightness features, and edge features from the image to be processed includes: Image features of the image to be processed are extracted through convolutional layers; The image to be processed is subjected to color space conversion, and the value of the brightness channel is extracted to obtain the brightness feature; The edge features of the image to be processed are extracted using the Sobel operator.
3. The method according to claim 1, characterized in that, The step of performing multi-level downsampling processing on the image features, the brightness features, and the edge features to obtain multi-level intermediate features and global deep features includes: The image features are downsampled using the first-layer downsampling module to obtain the first-layer intermediate features; The second-layer downsampling module downsamples the features obtained by fusing the first-layer intermediate features and the edge features to obtain the second-layer intermediate features. The third-layer downsampling module downsamples the features obtained by fusing the intermediate features of the second layer and the brightness features to obtain the global deep features.
4. The method according to claim 3, characterized in that, The process of determining image optimization features based on the degradation characteristics and the multi-level intermediate features includes: The degradation characterization is subjected to first channel adaptation and second channel adaptation processing respectively to obtain the first degradation characterization and the second degradation characterization; Based on the features obtained by fusing the first degenerate representation with the second layer intermediate features, intermediate optimized features are obtained; Based on the second degradation representation, the intermediate optimization features, and the features obtained by fusing the first layer intermediate features, the image optimization features are obtained.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: During the business processing phase when the bank card is in the card slot, if the ATM is detected to have its image enhancement function enabled, video frames are periodically extracted from the video captured by the image acquisition device and used as the image to be processed.
6. The method according to claim 5, characterized in that, The security warning based on the enhanced image includes: Visual features of a region are extracted from a preset region in the enhanced image, wherein the visual features of the region include: device status features, user behavior features, and facial features; Based on the visual features of the region, an anomaly score is determined, and a security warning is issued based on the anomaly score.
7. The method according to claim 6, characterized in that, The security alert based on the anomaly score includes: If the abnormal score is higher than the first abnormal threshold and lower than the second abnormal threshold, a security warning will be issued via SMS and software pop-up based on the bank card account currently in operation. If the abnormal score is greater than or equal to the second abnormal threshold, a security warning will be issued based on the bank card account currently in operation, via SMS, software pop-up, and telecom voice notification, and withdrawal and transfer operations of the corresponding bank card will be prohibited.
8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.
