Real-time monitoring method and device for transaction scene, equipment, medium and program product
By combining a feature extraction layer with pruning processing and a correlation calculation module, the problem of low accuracy in small target detection in bank counter cash transactions is solved, and a highly efficient target detection effect is achieved.
Patent Information
- Application Number
- CN202511321315.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies for detecting cash transactions at bank counters suffer from an inherent contradiction: low accuracy in detecting small targets and high computational load, making it difficult to achieve the optimal balance between accuracy and speed.
A feature extraction layer with pruning is combined with a correlation calculation module and a feature map dynamic weighting module. Feature fusion is performed through similarity calculation and weight assignment of connected regions, which improves detection accuracy and reduces computation.
It improves the accuracy of small target detection while reducing the amount of computation, enabling efficient target detection for real-time monitoring in bank counter transaction scenarios.
Smart Images

Figure CN121330596A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, in particular to a video processing method, and more particularly to a real-time monitoring method and device for a transaction scene, equipment, medium and program product. BACKGROUND
[0002] The detection of bank counter cash transactions is of great significance to the security and compliance of finance. This technology not only effectively identifies large or high-frequency cash flows to prevent illegal financing risks, but also discovers irregularities or fraud in the operation of tellers, thereby reducing financial losses. For example, through real-time monitoring, illegal financial activities that may exist in the transaction process of tellers can be identified. In addition, through continuous monitoring of customer cash transaction behavior, the transparency and traceability of fund flow can be improved, thereby strengthening overall risk management.
[0003] However, the transaction scene area is small in space, and the financial target size is small, which belongs to the typical small target detection category. Because the small target has less detailed information in the video frame, in order to improve the detection speed, the existing technology often uses a network structure with relatively simple structure, which makes it difficult to fully represent the high-level semantic features of the target, thereby affecting the detection accuracy; or, a relatively complex network structure with higher detection accuracy is used, but its computational complexity and parameter quantity also increase. As can be seen, the target detection algorithm in the existing technology has an inherent contradiction between accuracy and speed, and it is difficult to achieve the best trade-off.
[0004] Therefore, there is an urgent need for a real-time monitoring scheme for a transaction scene that can reduce the total data operation amount and improve the detection accuracy of small targets. SUMMARY
[0005] In view of the above problems, the present application provides a real-time monitoring method and device for a transaction scene, equipment, medium and program product.
[0006] According to a first aspect of the present application, a real-time monitoring method of a transaction scene is provided, comprising: performing input preprocessing operation on a real-time monitoring video of the transaction scene to obtain a single frame image; performing feature extraction on the single frame image through a feature extraction layer that has been pruned to obtain an image feature map corresponding to the single frame image; performing similarity calculation on the image feature map through a preset correlation calculation module to obtain a similarity value, and performing weighted summation calculation based on the similarity value to obtain a pixel point feature representation; performing same type interconnection processing based on the similarity value through a preset feature map dynamic weighting module to obtain an interconnection region, and determining a weight value according to the feature strength of the interconnection region, and performing fusion processing on the pixel point feature representation with the interconnection region based on the weight value to obtain a strengthened fusion feature; performing target detection based on the strengthened fusion feature to obtain a detection result, and generating a monitoring response of the transaction scene in real time according to the detection result.
[0007] According to an embodiment of the present application, the input preprocessing operation is performed on the real-time monitoring video of the transaction scene to obtain a single frame image, comprising: performing real-time denoising processing and real-time correction processing on the obtained real-time monitoring video of the transaction scene to generate a standard video; performing frame processing on the standard video to extract continuous frame images; and performing de-duplication operation and cropping operation on the continuous frame images to obtain a single frame image.
[0008] According to an embodiment of the present application, the feature extraction layer that has been pruned, the correlation calculation module and the feature map dynamic weighting module are integrated in a pre-trained real-time monitoring model; wherein the pre-trained real-time monitoring model comprises: performing pruning operation on the feature extraction layer of the preset pyramid network architecture to form a pruned pyramid network architecture, and embedding a correlation calculation architecture and a feature map dynamic weighting architecture on the pruned pyramid network architecture to form a target detection network; repeatedly training the target detection network through pre-obtained training data until the detection loss function value of the target detection network reaches a preset detection threshold, then taking the optimal target detection network as the real-time monitoring model; wherein the training data is obtained by data preprocessing on the captured sample data; the detection loss function value is obtained by weighted summation of the pruning extraction loss function value and the interconnection fusion loss function value; wherein the pruning extraction loss function value is the loss function value formed by the pruning operation performed on the feature extraction layer during the training process; the interconnection fusion loss function value is the loss function value formed by the correlation calculation architecture and the feature map dynamic weighting architecture during the training process.
[0009] According to an embodiment of the present application, the feature extraction layer of the preset pyramid network architecture is pruned to form a pruned pyramid network architecture, including: performing regularization term processing on the normalization layer in the feature extraction layer to obtain the utilization rate value of each channel of the normalization layer; and pruning the channel with a utilization rate value lower than a preset utilization value to form the pruned pyramid network architecture.
[0010] According to an embodiment of the present application, the pruning extraction loss function value is the sum of the self-loss value and the distillation loss value; wherein the self-loss value is the loss value generated when the pruned pyramid network architecture performs feature extraction on the training data to obtain the training pruning feature; and the distillation loss value is the loss value generated by performing loss calculation on the training pruning feature and the pre-obtained complete training feature; and the complete training feature is obtained by performing feature extraction on the training data by the pyramid network architecture.
[0011] According to an embodiment of the present application, the interconnection fusion loss function value is obtained by: performing linear transformation on each pixel in the training feature map corresponding to the training data by the correlation calculation architecture to obtain a training query vector, a training key vector and a training value vector, performing dot product operation and normalization processing based on the training query vector and the training key vector to obtain a training correlation value, and performing weighted summation based on the training correlation value and the training value vector to obtain a training feature representation; obtaining the correlation degree between the pixel points according to the training correlation value by the feature map dynamic weighting architecture, assigning trainable weights to the training feature representation based on the correlation degree and the feature strength of the training feature representation, and performing the same type of interconnection processing on the training feature representation according to the trainable weights to obtain a training enhanced fusion feature; wherein the weight value is a parameter value determined after the real-time monitoring model training is completed; and performing loss calculation on the training enhanced fusion feature and the pre-obtained fusion feature to obtain the interconnection fusion loss function value; wherein the fusion feature is obtained by performing feature fusion on the training data by the pruned pyramid network architecture.
[0012] According to an embodiment of the present application, the similarity of the image feature map is calculated by the preset correlation calculation module to obtain a similarity value, and the weighted summation calculation is performed based on the similarity value to obtain a pixel point feature representation, including: performing linear transformation on each pixel point in the image feature map to obtain a query vector, a key vector and a value vector; performing dot product operation on the query vector of each pixel point and the key vector of other pixel points in the image feature map to obtain an attention score matrix; performing normalization processing on the attention score matrix to obtain the similarity value of each pixel point and other pixel points; and performing weighted summation on the similarity value of each pixel point and the value vector of the pixel point itself to obtain the pixel point feature representation.
[0013] According to an embodiment of the present application, the same type of connectivity processing is performed on the similarity values by a preset feature map dynamic weighting module to obtain a connectivity region, a weight value is determined according to the feature intensity of the connectivity region, and the pixel point feature representation with the connectivity region is fused based on the weight value to obtain a strengthened fusion feature, including: obtaining the classification probability of each pixel point belonging to the same target region according to the similarity value; each pixel point with a classification probability higher than a preset classification threshold is regarded as the same target pixel point, and the same target point is processed to form a connectivity region; the area and the average feature intensity of the connectivity region are obtained, the weight value is assigned to the connectivity region based on the area and the average feature intensity, and the pixel point feature representation with the connectivity region is fused based on the weight value to obtain the strengthened fusion feature.
[0014] According to an embodiment of the present application, target detection is performed based on the strengthened fusion feature to obtain a detection result, and a monitoring response of the transaction scene is generated in real time according to the detection result, including: real-time feature classification and real-time regression operation are performed on the fusion feature to determine the target object position and the target object type; wherein, if the target object position is a preset alert position, or the target object type is an alert type, the detection result is an abnormal detection result, and the monitoring response corresponding to the abnormal detection result is called in real time based on the abnormal detection result.
[0015] The second aspect of the present application provides a real-time monitoring device for a transaction scene, including: an input module for performing input preprocessing operation on a real-time monitoring video for a transaction scene to obtain a single frame image; a feature extraction module for performing feature extraction on the single frame image through a feature extraction layer that has been pruned to obtain an image feature map corresponding to the single frame image; a similarity calculation module for performing similarity calculation on the image feature map through a preset correlation calculation module to obtain a similarity value, and performing weighted summation calculation based on the similarity value to obtain a pixel point feature representation; a fusion module for performing same type of connectivity processing based on the similarity value through a preset feature map dynamic weighting module to obtain a connectivity region, determining a weight value according to the feature intensity of the connectivity region, and performing fusion processing on the pixel point feature representation with the connectivity region based on the weight value to obtain a strengthened fusion feature; and a response module for performing target detection based on the strengthened fusion feature to obtain a detection result, and generating a monitoring response of the transaction scene in real time according to the detection result.
[0016] The third aspect of the present application provides an electronic device, including: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0017] The fourth aspect of the present application also provides a computer-readable storage medium, which stores a computer program or instructions, and the computer program or instructions are executed by a processor to realize the steps of the above method.
[0018] The fifth aspect of the present application also provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to realize the steps of the above method.
[0019] The one or more embodiments have the beneficial effects that: the feature extraction operation is performed through the pre-set pruned feature extraction layer, the correlation calculation is performed through the correlation calculation module and the feature map dynamic weighting module to obtain the fusion feature to obtain the connected region, and the weight value is determined according to the feature intensity of the connected region to perform feature fusion, so that the connected region adopts the corresponding weight during fusion, thus solving the problem that the same weight is used for fusion, which easily causes the small target feature of target monitoring to be submerged by the background and noise, thereby improving the accuracy of target detection, and although the detection accuracy is improved, the overall calculation amount is reduced because the feature extraction layer that has been pruned is used in the feature extraction stage, thereby achieving the beneficial effects of reducing the calculation amount and improving the target detection accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0020] The above and other objects, features and advantages of the present application will become more apparent from the following description of the embodiments of the present application taken with reference to the accompanying drawings, in which:
[0021] Figure 1 An application scenario diagram of the real-time monitoring method, device, equipment, medium and program product of the transaction scenario according to the embodiments of the present application is schematically shown;
[0022] Figure 2 A flowchart of the real-time monitoring method of the transaction scenario according to the embodiments of the present application is schematically shown;
[0023] Figure 3 A functional component trend diagram involved in the real-time monitoring method of the transaction scenario according to the embodiments of the present application is schematically shown;
[0024] Figure 4 A construction flowchart of the real-time monitoring model pre-trained in the real-time monitoring method of the transaction scenario according to the embodiments of the present application is schematically shown;
[0025] Figure 5 A structural block diagram of the real-time monitoring device of the transaction scenario according to the embodiments of the present application is schematically shown; and
[0026] Figure 6A block diagram of an electronic device suitable for implementing a real-time monitoring method for transaction scenarios, according to an embodiment of this application, is shown schematically. Detailed Implementation
[0027] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0030] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0031] In the technical solution of this application, the application data related to users is collected, stored, used, processed, transmitted, provided, disclosed and applied with the user's authorization, which complies with the provisions of relevant laws and regulations, takes necessary confidentiality measures and does not violate public order and good morals.
[0032] The trading environment is confined, and financial targets are relatively small, falling into the typical category of small target detection. Given that the feature strength of small targets is generally weaker than that of large targets, simple feature fusion mechanisms may actually highlight the features of large targets, causing the features of small targets to be overwhelmed by the large targets and background noise. This phenomenon is called "feature competition," where the weak features of small targets are dominated by the strong features of large targets during the fusion process, making them insignificant in the final feature representation and thus affecting their detectability. However, if a more complex network structure with higher detection accuracy is used, the computational cost and number of parameters also increase accordingly. Therefore, current target detection algorithms have an inherent contradiction between accuracy and speed, making it difficult to achieve an optimal trade-off.
[0033] This application provides a method, apparatus, device, medium, and program product for real-time monitoring of transaction scenarios. The real-time monitoring method for transaction scenarios includes: performing input preprocessing on real-time monitoring video of the transaction scenario to obtain a single-frame image; extracting features from the single-frame image using a pruned feature extraction layer to obtain an image feature map corresponding to the single-frame image; calculating the similarity of the image feature map using a preset correlation calculation module to obtain a similarity value, and performing a weighted summation calculation based on the similarity value to obtain pixel feature representations; performing similarity connectivity processing based on the similarity value using a preset feature map dynamic weighting module to obtain connected regions, determining weight values based on the feature intensity of the connected regions, and fusing the pixel feature representations with connected regions based on the weight values to obtain enhanced fused features; performing target detection based on the enhanced fused features to obtain detection results, and generating a monitoring response for the transaction scenario in real time based on the detection results.
[0034] Figure 1 The diagram illustrates an application scenario of a real-time monitoring method for transaction scenarios according to an embodiment of this application.
[0035] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105.
[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0038] Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. Network 104 serves as the medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0039] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the real-time monitoring method for transaction scenarios provided in this application embodiment can generally be executed by server 105. Correspondingly, the real-time monitoring device for transaction scenarios provided in this application embodiment can generally be located in server 105. The real-time monitoring method for transaction scenarios provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the real-time monitoring device for transaction scenarios provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0042] The following will be based on Figure 1 The described scene, through Figures 2-4 A method for real-time monitoring of transaction scenarios according to embodiments of this application is described in detail.
[0043] Figure 2 A flowchart illustrating a real-time monitoring method for a transaction scenario according to an embodiment of this application is shown.
[0044] likeFigure 2 As shown, the real-time monitoring method for transaction scenarios in this embodiment includes steps S210 to S250, as detailed below:
[0045] Operation S210 performs input preprocessing on the real-time monitoring video for the transaction scenario to obtain a single-frame image; Operation S220 extracts features from the single-frame image through a pruned feature extraction layer to obtain an image feature map corresponding to the single-frame image; Operation S230 calculates the similarity of the image feature map through a preset correlation calculation module to obtain a similarity value, and performs weighted summation based on the similarity value to obtain pixel feature representation; Operation S240 performs similarity connectivity processing based on the similarity value through a preset feature map dynamic weighting module to obtain connected regions, determines weight values based on the feature intensity of the connected regions, and performs fusion processing on the pixel feature representations with connected regions based on the weight values to obtain enhanced fusion features; Operation S250 performs target detection based on the enhanced fusion features to obtain detection results, and generates a real-time monitoring response for the transaction scenario based on the detection results.
[0046] As an example, this preprocessing operation can be performed by a data preprocessing layer. This preprocessing operation involves segmenting the real-time monitoring video of the transaction scene into video frames to obtain single-frame images. Then, a pre-pruned and pre-trained feature extraction layer is used to extract features from the single-frame image to obtain an image feature map. This image feature map can contain multi-scale feature maps, such as eight feature maps of different scales. Then, a pre-trained feature map dynamic weighting module with pre-defined weights is used to perform homologous connectivity processing on the eight feature maps of different scales. This homologous connectivity processing refers to encircling pixels of the same category from the feature maps to form connected regions. Weight values are then assigned to the feature map (one of the multi-scale feature maps) based on the area and feature intensity of the connected regions. Finally, based on the weight values corresponding to each feature map, the pixel feature representations corresponding to the multi-scale feature maps (such as the pixel feature representations of the eight feature maps of different scales) are fused to obtain enhanced fused features.
[0047] Therefore, it can be seen that the enhanced fusion feature is derived by fusing pixel feature representations with different weights. That is, the pixel feature representations of feature maps corresponding to different connected regions are fused with different weights. This solves the problem that the small target features of the target detection are easily submerged by the background and noise when fused with the same weight, thus improving the accuracy of target detection. Although the detection accuracy is improved, the overall computational load is reduced because the feature extraction layer has already undergone pruning. Thus, it achieves the beneficial effect of both reducing the computational load and improving the accuracy of target detection.
[0048] Figure 3 This diagram illustrates the functional components involved in the application phase of the real-time monitoring method for transaction scenarios in this embodiment.
[0049] like Figure 2 , Figure 3 As shown in the figure, in this embodiment, operation S210 performs input preprocessing on the real-time monitoring video of the transaction scenario to obtain a single-frame image, including: performing real-time denoising and real-time correction processing on the acquired real-time monitoring video of the transaction scenario to generate a standard video; performing frame segmentation processing on the standard video to extract continuous frame images; and performing deduplication and cropping operations on the continuous frame images to obtain a single-frame image.
[0050] As an example, the real-time monitoring video for this transaction scenario is a counter transaction monitoring video. First, the counter transaction monitoring video needs to be denoised and corrected in real time. Then, single-frame images are extracted frame by frame. If necessary, cropping, rotation, color correction, and other processing can also be performed. All of these processing and correction processes are performed in real time, which enables real-time feature calculation and feature fusion of the real-time monitoring video. In this way, if an abnormal situation occurs in the transaction scenario, a real-time response can be made based on the real-time monitoring video.
[0051] Figure 4 This illustration shows a schematic diagram of the process of building a real-time monitoring model in the training phase of the real-time monitoring method for transaction scenarios in this embodiment.
[0052] like Figure 4 As shown, in this embodiment, the pruned feature extraction layer, correlation calculation module, and feature map dynamic weighting module are integrated into a pre-trained real-time monitoring model. The pre-training of the real-time monitoring model includes: pruning the feature extraction layer of a preset pyramid network architecture to form a pruned pyramid network architecture; embedding the correlation calculation architecture and the feature map dynamic weighting architecture into the pruned pyramid network architecture to form a target detection network; repeatedly training the target detection network using pre-acquired training data until the detection loss function value of the target detection network reaches a preset detection threshold, then using the optimal target detection network as the real-time monitoring model; wherein the training data is obtained by preprocessing the captured sample data; the detection loss function value is obtained by weighted summation of the pruned extraction loss function value and the connectivity fusion loss function value; wherein the pruned extraction loss function value is the loss function value formed by the pruning operation performed on the feature extraction layer during training; and the connectivity fusion loss function value is the loss function value formed by the correlation calculation architecture and the feature map dynamic weighting architecture during training.
[0053] As an example, this pyramid network architecture can adopt the YOLOv8 model, then prune its feature extraction layer, and then improve its feature pyramid based on the YOLOv8 model. For example, a correlation calculation architecture and a dynamic weighted feature map architecture can be embedded on the neck (fusion layer) layer of the original YOLOv8 model to form an object detection network. This object detection network can then be repeatedly trained using pre-acquired training data. The training data is obtained by preprocessing the captured sample data using a pre-defined data preprocessing module. Since the pruning operation, the embedding of the correlation calculation architecture, and the dynamic weighted feature map architecture are all performed on the YOLOv8 model, and the parameters of the YOLOv8 model are pre-configured, in this embodiment, the detection loss function value is... The weighted sum of the pruning extraction loss function and the connectivity fusion loss function is obtained. The pruning extraction loss function is the loss function value formed by the pruning operation performed on the feature extraction layer during training, while the connectivity fusion loss function is the loss function value formed by the correlation calculation architecture and the dynamic weighted feature map architecture during training. Based on this detection loss function value, the impact of pruning and embedding correlation calculation module and dynamic weighted feature map module on the pyramid network architecture can be reflected in the form of loss value. Based on this loss value, the target detection network can be repeatedly trained and its parameters can be repeatedly adjusted to obtain the optimal real-time monitoring model. In particular, based on this, the weight values corresponding to different feature intensities can be determined, thereby solving the problem that small target features are easily submerged by background and noise when fusion with the same weight, thus improving the accuracy of target detection.
[0054] In this embodiment, a pruning operation is performed on the feature extraction layer of the preset pyramid network architecture to form a pruned pyramid network architecture. This includes: performing regularization processing on the normalization layer in the feature extraction layer to obtain the utilization value of each channel of the normalization layer; and pruning channels with utilization values lower than the preset utilization value to form a pruned pyramid network architecture.
[0055] As an example, this pruning operation is performed during the training of the real-time monitoring model. In a specific example, an L1 regularization term can be added to the γ parameter (utilization parameter) in each BN layer of the feature extraction layer. This regularization term forces the γ values (utilization values) corresponding to unimportant channels to approach zero. Then, the γ parameter values of all channels are sorted, and a preset utilization value, also known as a global pruning threshold, is set. For example, the channels with the lowest γ values in 50% of cases are considered non-critical channels, and the channels with the lowest γ values in 50% of cases are removed. Finally, these non-critical channels and their corresponding connection weights are removed from the network. This process can be iterated multiple times to achieve a better pruning rate. Based on this, the number of model parameters and computational load can be significantly reduced, thereby reducing the overall data computation load in the real-time monitoring process of transaction scenarios and improving the overall computational speed.
[0056] In this embodiment, the pruning extraction loss function is the sum of its own loss value and the distillation loss value; wherein, the own loss value is the loss value generated when the pruning pyramid network architecture performs feature extraction operation on the training data to obtain training pruning features; the distillation loss value is the loss value generated by calculating the loss based on the training pruning features and the pre-acquired complete training features; the complete training features are obtained by feature extraction of the training data through the pyramid network architecture.
[0057] As an example, to compensate for the accuracy loss caused by pruning, this embodiment uses the original model before pruning (i.e., the large and complex pyramid network architecture) as the teacher model, and the pruned pyramid network architecture after pruning as the student model. The student model learns the classification and localization knowledge of the target by imitating the output of the teacher model. During training, the total loss function consists of two parts: one part is the student model's own loss function, such as classification loss and regression loss, and the other part is distillation loss, which is the difference between the student model's output and the teacher model's soft label. By minimizing these two parts of loss simultaneously, the student model can achieve excellent performance similar to the teacher model with fewer parameters, thus facilitating the compensation of this difference when training the overall real-time monitoring model. In this way, the total amount of data computation is reduced while the impact of pruning on feature extraction is reduced.
[0058] In this embodiment, obtaining the connectivity fusion loss function value includes: performing a linear transformation on each pixel in the training feature map corresponding to the training data through a correlation calculation architecture to obtain a training query vector, a training key vector, and a training value vector; performing dot product operations and normalization processing on the training query vector and the training key vector to obtain a training correlation value; and performing a weighted summation on the training correlation value and the training value vector to obtain a training feature representation; obtaining the degree of correlation between pixels based on the training correlation value through a feature map dynamic weighting architecture; assigning trainable weights to the training feature representation based on the degree of correlation and the feature strength of the training feature representation; and performing similar connectivity processing on the training feature representation based on the trainable weights to obtain training-enhanced fusion features; wherein the weight values are parameter values determined by the trainable weights after the real-time monitoring model training is completed; calculating the loss between the training-enhanced fusion features and the pre-acquired fusion features to obtain the connectivity fusion loss function value; wherein the fusion features are obtained by feature fusion of the training data through a pruned pyramid network architecture.
[0059] As an example, as described above, a customized relevance calculation architecture and a dynamic feature map weighting architecture are embedded between the fusion layers of each YOLOv8 model. This relevance calculation architecture, based on a self-attention mechanism, performs linear transformations on the pixels in the feature map corresponding to the training data, assigning queries (Q), keys (K), and values (V), to obtain training query vectors, training key vectors, and training value vectors. The training query vector of each pixel is then multiplied by the training key vectors of all other pixels in the feature map to obtain a training attention score matrix. This matrix is normalized using the Softmax function to obtain the relevance weights (training relevance values) of each pixel with all other pixels. These relevance weights are then weighted and summed with the corresponding training value vectors to obtain a new training feature representation. The dynamic feature map weighting architecture captures the spatial relevance between pixels, identifying and connecting pixels belonging to the same target, thereby obtaining the possible connected regions of the target. Then, different trainable weights are dynamically assigned based on the area of the connected regions and the average feature intensity of the feature map. This training process yields a set of optimal trainable weights, such as which area and feature intensity correspond to which weight value. These optimal trainable weights are the weight values directly used in the application phase. In particular, these weight values correspond one-to-one with different feature intensities. Specifically, regions with an area smaller than a preset threshold and higher feature intensity (i.e., small targets) will be assigned higher weights; conversely, background or large areas will be assigned lower weights. This dynamic weighting mechanism can significantly enhance the expressive power of small target features, making them less likely to be overwhelmed by background or large target features.
[0060] Based on this, the connection fusion loss function value reflects the impact of the correlation calculation architecture and the feature map dynamic weighting architecture on the real-time monitoring model. Furthermore, the weight value in the application process is the optimal trainable weight determined after the real-time monitoring model is trained. Thus, based on this training, the weight value directly used in the application stage can be obtained, thereby enabling different connected regions to use different weights during fusion. In this way, the problem that the same weight can easily lead to the small target features of target detection being submerged by background and noise is solved, thus improving the accuracy of target detection.
[0061] In this embodiment, a similarity calculation is performed on the image feature map using a preset relevance calculation module to obtain a similarity value. A weighted summation is then performed based on the similarity value to obtain a pixel feature representation. This includes: performing a linear transformation on each pixel in the image feature map to obtain a query vector, a key vector, and a value vector; performing a dot product operation between the query vector of each pixel and the key vectors of other pixels in the image feature map to obtain an attention score matrix; normalizing the attention score matrix to obtain a similarity value between each pixel and other pixels; and performing a weighted summation between the similarity value of each pixel and its own value vector to obtain a pixel feature representation.
[0062] As an example, this correlation calculation module is trained along with the real-time monitoring model generated during training. In its application phase, similar to the training process, a self-attention mechanism is employed. This involves linearly transforming the pixels in the image feature map using query (Q), key (K), and value (V) vectors to obtain query vectors, key vectors, and value vectors. Then, the query vector of each pixel is multiplied by the key vectors of all other pixels in the feature map to obtain an attention score matrix. This score matrix is normalized using the Softmax function (normalization function) to obtain the similarity value of each pixel to all other pixels. These similarity values are then weighted and summed with their corresponding value vectors to obtain a new feature representation. This process, by calculating the query vector, key vector, and value vector and then performing a dot product, objectively obtains the correlation between each pixel and other pixels, thus laying the foundation for subsequent connectivity processing.
[0063] In this embodiment, a preset feature map dynamic weighting module performs similarity-based connectivity processing to obtain connected regions. Weight values are determined based on the feature intensity of the connected regions. Based on these weight values, the feature representations of pixels with connected regions are fused to obtain enhanced fusion features. This includes: obtaining the classification probability of each pixel belonging to the same target region based on the similarity value; treating pixels with classification probabilities higher than a preset classification threshold as the same target pixel and performing connectivity processing on the same target pixel to form connected regions; obtaining the area and average feature intensity of the connected regions; assigning weight values to the connected regions based on the area and average feature intensity; and fusing the feature representations of pixels with connected regions based on the weight values to obtain enhanced fusion features.
[0064] As an example, this feature map dynamic weighting module is trained along with the real-time monitoring model generated during training. In its application phase, similar to the training process, it captures the spatial relationships between pixels and obtains the classification probability of each pixel belonging to the same target region based on similarity values. Based on this classification probability, pixels belonging to the same target can be identified and connected, thereby obtaining the possible connected regions where the target may exist. Next, for the pixel feature representations corresponding to image feature maps of different scales, different weight values can be dynamically assigned to the pixel feature representations corresponding to image feature maps of different scales based on the area of the connected regions and the average feature intensity of the feature maps. For example, regions with an area smaller than a preset threshold and high feature intensity (i.e., small targets required for target detection) will be given higher weights; conversely, background or large areas will be given lower weights. This dynamic weighting mechanism can significantly enhance the expressive power of small target features, making them less likely to be overwhelmed by background or large target features, thus highlighting small targets and improving the accuracy of target detection.
[0065] In this embodiment, the process of performing target detection based on enhanced fusion features to obtain detection results and generating a monitoring response for the transaction scenario in real time based on the detection results can be completed by the output layer. This includes: performing real-time feature classification and real-time regression operations on the fusion features to determine the location and type of the target object; wherein, if the location of the target object is a preset warning location, or the type of the target object is a warning type, the detection result is an anomaly detection result, and the monitoring response corresponding to the anomaly detection structure is invoked in real time based on the anomaly detection result.
[0066] As an example, when enhanced fusion features detect cash inflows or outflows at the counter, an anomaly detection result is generated. This result will trigger a real-time alarm or a monitoring response from the transaction data recording function. The logical statements can include: IF Cash_Amount > Preset_Large_Amount_Threshold THEN Trigger_High_Risk_Alarm, or IF Cash_Appearance_Time < Preset_Time_Threshold THEN Trigger_Abnormal_Transaction_Alarm. These logical judgments in the monitoring response help bank staff identify and handle suspicious transactions in real time and automatically generate detailed transaction logs, providing data support for subsequent risk analysis and auditing.
[0067] As described above, the real-time monitoring method for transaction scenarios provided in this embodiment extracts features from a single frame image using a trained real-time monitoring model to obtain an image feature map corresponding to the single frame image. Then, it calculates the similarity of the image feature maps to obtain a similarity value, and performs a weighted summation based on the similarity value to obtain pixel feature representations. Next, it performs connectivity processing based on the similarity value to obtain connected regions, and determines weight values based on the feature intensity of the connected regions. Based on these weight values, it performs fusion processing on the pixel feature representations with connected regions to obtain enhanced fusion features. This method allows different connected regions to use different weights during fusion, thus solving the problem that fusing with the same weight can easily lead to small target features being overwhelmed by background and noise, improving the accuracy of target detection. Furthermore, the real-time monitoring model uses a pruned feature extraction layer, which has fewer channels, reducing the overall computational data volume of the entire real-time monitoring model. This achieves the beneficial effect of both reducing computational load and improving target detection accuracy.
[0068] Based on the real-time monitoring method for the aforementioned transaction scenarios, this application also provides a real-time monitoring device for transaction scenarios. The following will combine... Figure 5 The device is described in detail.
[0069] Figure 5 A schematic block diagram of a real-time monitoring device for a transaction scenario according to an embodiment of this application is shown.
[0070] like Figure 5 As shown, the real-time monitoring device 500 for transaction scenarios in this embodiment includes an input module 510, a feature extraction module 520, a similarity calculation module 530, a fusion module 540, and a response module 550.
[0071] The input module 510 can perform operation S210 to perform input preprocessing operations on real-time monitoring video for the transaction scenario in order to obtain a single frame image.
[0072] The feature extraction module 520 can perform operation S220 to extract features from a single frame image through a pruned feature extraction layer to obtain an image feature map corresponding to the single frame image.
[0073] The similarity calculation module 530 can perform operation S230, which is used to perform similarity calculation on the image feature map through a preset correlation calculation module to obtain a similarity value, and perform weighted summation calculation based on the similarity value to obtain the pixel feature representation.
[0074] The fusion module 540 can perform operation S240, which is used to perform similar connectivity processing based on similarity values through a preset feature map dynamic weighting module to obtain connected regions, and determine weight values according to the feature intensity of the connected regions, and perform fusion processing on the feature representations of pixels with connected regions based on the weight values to obtain enhanced fusion features.
[0075] The response module 550 can perform operation S250 to perform target detection based on enhanced fusion features to obtain detection results and generate a monitoring response for the transaction scenario in real time based on the detection results.
[0076] In this embodiment, the input module 510 includes: a video processing unit, used to perform real-time noise reduction and real-time correction processing on the acquired real-time monitoring video of the transaction scene to generate a standard video; a frame segmentation unit, used to perform frame segmentation processing on the standard video to extract continuous frame images; and a frame processing unit, used to perform deduplication and cropping operations on the continuous frame images to obtain a single frame image.
[0077] The pruned feature extraction layer in the feature extraction module 520, the correlation calculation module in the similarity calculation module 530, and the feature map dynamic weighting module in the fusion module 540 are integrated into a pre-trained real-time monitoring model. The pre-training of the real-time monitoring model includes: pruning the feature extraction layer of a preset pyramid network architecture to form a pruned pyramid network architecture; embedding the correlation calculation architecture and the feature map dynamic weighting architecture into the pruned pyramid network architecture to form a target detection network; repeatedly training the target detection network using pre-acquired training data until the detection loss function value of the target detection network reaches a preset detection threshold, then using the optimal target detection network as the real-time monitoring model; the training data is obtained by preprocessing the captured sample data; the detection loss function value is obtained by weighted summation of the pruned extraction loss function value and the connectivity fusion loss function value; the pruned extraction loss function value is the loss function value formed by the pruning operation performed on the feature extraction layer during training; the connectivity fusion loss function value is the loss function value formed by the correlation calculation architecture and the feature map dynamic weighting architecture during training.
[0078] The feature extraction layer of the pyramid network architecture is pruned to form a pruned pyramid network architecture. This includes: performing regularization on the normalization layer in the feature extraction layer to obtain the utilization value of each channel in the normalization layer; and pruning channels with utilization values lower than a preset utilization value to form a pruned pyramid network architecture.
[0079] The pruning extraction loss function is the sum of its own loss value and the distillation loss value. The own loss value is the loss value generated when the pruning pyramid network architecture performs feature extraction on the training data to obtain training pruned features. The distillation loss value is the loss value generated by calculating the loss based on the training pruned features and the pre-acquired complete training features. The complete training features are obtained by feature extraction from the training data through the pyramid network architecture.
[0080] Obtaining the connectivity fusion loss function value includes: performing a linear transformation on each pixel in the training feature map corresponding to the training data through a correlation calculation architecture to obtain a training query vector, a training key vector, and a training value vector; performing dot product operations and normalization on the training query vector and training key vector to obtain a training correlation value; and performing a weighted summation on the training correlation value and the training value vector to obtain a training feature representation; obtaining the degree of correlation between pixels based on the training correlation value through a feature map dynamic weighting architecture; assigning trainable weights to the training feature representation based on the degree of correlation and the feature strength of the training feature representation; and performing similar connectivity processing on the training feature representation based on the trainable weights to obtain training-enhanced fusion features; wherein the weight values are parameter values determined by the trainable weights after the real-time monitoring model training is completed; calculating the loss on the training-enhanced fusion features and the pre-acquired fusion features to obtain the connectivity fusion loss function value; wherein the fusion features are obtained by feature fusion of the training data through a pruned pyramid network architecture.
[0081] The similarity calculation module 530 includes: a linear transformation unit for performing linear transformations on each pixel in the image feature map to obtain a query vector, a key vector, and a value vector; a dot product calculation unit for performing a dot product operation between the query vector of each pixel and the key vector of other pixels in the image feature map to obtain an attention score matrix; a normalization unit for normalizing the attention score matrix to obtain the similarity value between each pixel and other pixels; and a weighted summation unit for performing a weighted summation between the similarity value of each pixel and the value vector of the pixel itself to obtain the pixel feature representation.
[0082] The fusion module 540 includes: a classification unit, used to obtain the classification probability of each pixel belonging to the same target region based on the similarity value; a connectivity unit, used to treat each pixel with a classification probability higher than a preset classification threshold as the same target pixel, and perform connectivity processing on the same target point to form a connected region; and a weighted fusion unit, used to obtain the area and average feature intensity of the connected region, assign weight values to the connected region based on the area and average feature intensity, and perform fusion processing on the feature representation of the pixel with the connected region based on the weight values to obtain enhanced fusion features.
[0083] The response module 550 is used to perform real-time feature classification and real-time regression operations on the fused features to determine the location and type of the target object. If the location of the target object is a preset warning location or the type of the target object is a warning type, the detection result is an anomaly detection result, and the monitoring response corresponding to the anomaly detection structure is called in real time based on the anomaly detection result.
[0084] Furthermore, according to embodiments of this application, any multiple modules among the input module 510, feature extraction module 520, similarity calculation module 530, fusion module 540, and response module 550 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the input module 510, feature extraction module 520, similarity calculation module 530, fusion module 540, and response module 550 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the extraction module 510, fusion module 520, and matching module 530 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0085] It should be noted that the implementation methods, technical problems solved, functions achieved, and technical effects of each module in the device embodiment are the same as or similar to the implementation methods, technical problems solved, functions achieved, and technical effects of each corresponding step in the method embodiment, and will not be repeated here.
[0086] Figure 6A block diagram of an electronic device suitable for implementing a real-time monitoring method for transaction scenarios, according to an embodiment of this application, is shown schematically.
[0087] like Figure 6 As shown, an electronic device 600 according to an embodiment of this application includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0088] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0089] According to embodiments of this application, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0090] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0091] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.
[0092] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the real-time monitoring method for transaction scenarios provided in the embodiments of this application.
[0093] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0094] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0095] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0096] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device 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 computing device (e.g., via the Internet using an Internet service provider).
[0097] 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. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions 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, may 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.
[0098] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for real-time monitoring of a transaction scenario, characterized in that, The method includes: Input preprocessing is performed on real-time monitoring videos of transaction scenarios to obtain single-frame images; The single-frame image is used to extract features through a feature extraction layer that has been pruned, so as to obtain an image feature map corresponding to the single-frame image. The image feature map is similar to the image using a pre-defined correlation calculation module to obtain a similarity value. Then, a weighted summation is performed based on the similarity value to obtain the pixel feature representation. A preset feature map dynamic weighting module performs similarity connectivity processing based on the similarity value to obtain connected regions. Weight values are determined based on the feature intensity of the connected regions. Based on the weight values, the feature representations of pixels with connected regions are fused to obtain enhanced fusion features. Target detection is performed based on the enhanced fusion features to obtain detection results, and a monitoring response for the transaction scenario is generated in real time based on the detection results.
2. The real-time monitoring method for transaction scenarios according to claim 1, characterized in that, Input preprocessing is performed on real-time monitoring videos of transaction scenarios to obtain single-frame images, including: The acquired real-time monitoring video of the transaction scene is subjected to real-time noise reduction and real-time correction to generate standard video; The standard video is segmented into frames to extract consecutive frame images; The consecutive frame images are deduplicated and cropped to obtain a single frame image.
3. The real-time monitoring method for transaction scenarios according to claim 2, characterized in that, The pruned feature extraction layer, the correlation calculation module, and the feature map dynamic weighting module are integrated into a pre-trained real-time monitoring model; wherein, the pre-training of the real-time monitoring model includes: The feature extraction layer of the preset pyramid network architecture is pruned to form a pruned pyramid network architecture, and a correlation calculation architecture and a dynamic weighted feature map architecture are embedded in the pruned pyramid network architecture to form a target detection network. The target detection network is repeatedly trained using pre-acquired training data until the detection loss function value of the target detection network reaches a preset detection threshold. The optimal target detection network is then used as the real-time monitoring model. The training data is obtained by preprocessing captured sample data. The detection loss function value is a weighted sum of the pruning extraction loss function value and the connectivity fusion loss function value. The pruning extraction loss function value is the loss function value formed by the pruning operation performed on the feature extraction layer during training. The connectivity fusion loss function value is the loss function value formed by the correlation calculation architecture and the dynamic weighted feature map architecture during training.
4. The real-time monitoring method for transaction scenarios according to claim 3, characterized in that, The feature extraction layers of the pre-defined pyramid network architecture are pruned to form a pruned pyramid network architecture, including: The normalization layer in the feature extraction layer is processed with a regularization term to obtain the utilization value of each channel of the normalization layer; Channels with utilization values lower than the preset utilization value are pruned to form a pruned pyramid network architecture.
5. The real-time monitoring method for transaction scenarios according to claim 4, characterized in that, The pruning extraction loss function is the sum of its own loss value and the distillation loss value; wherein, the own loss value is the loss value generated when the pruning pyramid network architecture performs feature extraction operations on the training data to obtain training pruning features; the distillation loss value is the loss value generated by calculating the loss based on the training pruning features and the pre-acquired complete training features; the complete training features are obtained by feature extraction from the training data through the pyramid network architecture.
6. The real-time monitoring method for transaction scenarios according to claim 5, characterized in that, Obtaining the value of the connectivity fusion loss function includes: The relevance calculation architecture is used to perform a linear transformation on each pixel in the training feature map corresponding to the training data to obtain a training query vector, a training key vector, and a training value vector. Based on the training query vector and the training key vector, a dot product operation and normalization are performed to obtain a training relevance value. Finally, a weighted sum is performed on the training relevance value and the training value vector to obtain a training feature representation. The feature map dynamic weighting architecture obtains the correlation between pixels based on the training correlation value, assigns trainable weights to the training feature representation based on the correlation and the feature strength of the training feature representation, and performs similar connection processing on the training feature representation according to the trainable weights to obtain training-enhanced fusion features; wherein, the weight value is the parameter value of the trainable weight determined after the real-time monitoring model is trained; Loss calculations are performed on the trained enhanced fusion features and the pre-acquired fusion features to obtain the connectivity fusion loss function value; wherein, the fusion features are obtained by feature fusion of the training data through the pruned pyramid network architecture.
7. The real-time monitoring method for transaction scenarios according to claim 1, characterized in that, The image feature map is similar to the image using a pre-defined correlation calculation module to obtain a similarity value. A weighted summation is then performed based on the similarity value to obtain pixel feature representations, including: A linear transformation is performed on each pixel in the image feature map to obtain the query vector, key vector, and value vector; The query vector of each pixel is multiplied by the key vector of other pixels in the image feature map to obtain the attention score matrix. The attention score matrix is normalized to obtain the similarity value of each pixel to other pixels; The similarity value of each pixel is weighted and summed with the value vector of the pixel itself to obtain the pixel feature representation.
8. The real-time monitoring method for transaction scenarios according to claim 1, characterized in that, A preset feature map dynamic weighting module performs similarity connectivity processing based on the similarity value to obtain connected regions. Weight values are determined according to the feature intensity of the connected regions. Based on these weight values, the feature representations of pixels with connected regions are fused to obtain enhanced fusion features, including: The probability of each pixel belonging to the same target region is obtained based on the similarity value; Each pixel whose classification probability is higher than a preset classification threshold is regarded as the same target pixel, and the same target pixel is connected to form a connected region. The area and average feature intensity of the connected region are obtained. A weight value is assigned to the connected region based on the area and the average feature intensity. The feature representation of the pixel with the connected region is fused based on the weight value to obtain enhanced fused features.
9. The real-time monitoring method for transaction scenarios according to claim 8, characterized in that, Target detection is performed based on the enhanced fusion features to obtain detection results, and a monitoring response for the transaction scenario is generated in real time based on the detection results, including: The fused features are subjected to real-time feature classification and real-time regression operations to determine the location and type of the target object; wherein, If the target object's location is a preset warning location, or the target object's type is a warning type, then the detection result is an anomaly detection result, and based on the anomaly detection result, the monitoring response corresponding to the anomaly detection structure is invoked in real time.
10. A real-time monitoring device for a transaction scenario, characterized in that, The device includes: The input module is used to perform input preprocessing operations on real-time monitoring videos for transaction scenarios to obtain single-frame images; The feature extraction module is used to extract features from the single frame image through the pruned feature extraction layer to obtain an image feature map corresponding to the single frame image. The similarity calculation module is used to perform similarity calculation on the image feature map through a preset correlation calculation module to obtain a similarity value, and to perform a weighted summation calculation based on the similarity value to obtain the pixel feature representation; The fusion module is used to perform similar connectivity processing based on the similarity value through a preset feature map dynamic weighting module to obtain connected regions, and to determine weight values based on the feature intensity of the connected regions. Based on the weight values, the feature representations of pixels with connected regions are fused to obtain enhanced fusion features. The response module is used to perform target detection based on the enhanced fusion features to obtain detection results, and generate a monitoring response for the transaction scenario in real time based on the detection results.
11. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 9.