Risk determination method and device, equipment, storage medium and program product
By extracting and analyzing the background features in the face recognition video and calculating the risk coefficient using the enhanced learning model, the problem of poor risk detection effect when background image elements are complex in the prior art is solved, and the accuracy of risk determination results is improved.
Patent Information
- Application Number
- CN202411544368.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art has poor risk detection effect when the background image elements are relatively complex, reducing the accuracy of risk determination results.
By obtaining the background image in the target face recognition video, identifying the lighting state, extracting background features, determining whether there are blacklist features in the feature set, and using the enhanced learning model to calculate the risk coefficient based on the dynamic calculation strategy to determine the degree of risk.
Improve the accuracy of risk detection when background image elements are complex, and dynamically optimize calculation strategies to improve the accuracy of risk determination results.
Smart Images

Figure CN119399815A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a risk determination method, device, equipment, storage medium and program product. Background Art
[0002] Face recognition belongs to the category of biometric recognition and is currently widely used in many fields. However, with the popularization of AI-generated image and video tools, the security of relying solely on face recognition technology faces great challenges. It is necessary to determine the risk of the background when face recognition occurs to prevent criminals from using stolen real faces for business authentication.
[0003] Currently, risk determination of the background when face recognition occurs is generally performed by matching the background image to be determined with historical background images marked with risk level identifiers, thereby determining the risk level corresponding to the background image to be determined based on the matching result.
[0004] However, this risk determination method is not effective when the elements of the background image are complex, which reduces the accuracy of the risk determination results. Summary of the invention
[0005] The present application provides a risk determination method, apparatus, device, storage medium and program product to solve the problem in the prior art that when the elements of the background image are relatively complex, the risk detection effect is poor, thereby reducing the accuracy of the risk determination result.
[0006] In a first aspect, the present application provides a risk determination method, comprising: obtaining a target face recognition video, and obtaining at least one background image in the target face recognition video;
[0007] Identify the lighting state corresponding to each background image, and determine whether the lighting state meets the natural light state at the current time;
[0008] If not, extract the background features corresponding to each background image, and determine whether there is a background image with the most corresponding background features. If not, determine the background features corresponding to each background image as a background feature set;
[0009] Determine whether at least one background feature in the background feature set is in the blacklist, and if not, input the background feature set into the reinforcement learning model;
[0010] The reinforcement learning model is adopted to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, and the risk level of the target face recognition video is determined based on the risk level of the previous face recognition video and the actual risk level.
[0011] In one possible design, obtaining at least one background picture in the target face recognition video includes: obtaining at least one frame of face recognition image included in the target face recognition video, and determining the area covered by the face picture in each frame of the face recognition image; segmenting each frame of the face recognition image based on the area to obtain at least one face picture and at least one background picture.
[0012] In a possible design, the extracting of background features corresponding to each background image to obtain a background feature set includes: segmenting each background image using an image segmentation algorithm to obtain a sub-image corresponding to each background image; extracting corresponding background features from the sub-images corresponding to each background image, and arranging the background features corresponding to each background image in sequence to construct a matrix to obtain a background feature set; the number of rows of the matrix is determined by the number of background features, and the number of columns is determined by the number of background images.
[0013] In one possible design, the risk coefficient corresponding to the background feature set is calculated according to the current dynamic calculation strategy, including: calculating the risk value of each background feature in the background feature set according to the current dynamic calculation strategy, and obtaining the current feedback coefficient of each background feature; weighting the risk value using the current feedback coefficient to obtain the risk coefficient of each background feature; analyzing the risk coefficient of each background feature to obtain the risk coefficient corresponding to the background feature set.
[0014] In one possible design, determining the risk level of the target face recognition video based on the risk coefficient includes: obtaining coefficient thresholds corresponding to multiple preset risk levels, and determining the coefficient threshold where the risk coefficient is located; each of the preset risk levels is progressive from low to high; and determining the preset risk level corresponding to the coefficient threshold as the risk level of the target face recognition video.
[0015] In a possible design, before obtaining the target face recognition video, it also includes: calculating the risk value of each background feature corresponding to the previous face recognition video according to the previous dynamic calculation strategy, and obtaining the previous feedback coefficient corresponding to each background feature; determining the risk level of the previous face recognition video according to the previous feedback coefficient and the risk value; obtaining the actual risk level of the previous face recognition video, and determining the current feedback coefficient corresponding to each background feature according to the risk level of the previous face recognition video and the actual risk level; adjusting the previous dynamic calculation strategy based on the current feedback coefficient corresponding to each background feature to obtain the current dynamic calculation strategy.
[0016] In one possible design, the current feedback coefficient corresponding to each background feature is determined based on the risk level and the actual risk level of the previous face recognition video, including: obtaining a feedback coefficient determination file; the feedback coefficient determination file includes a mapping relationship between multiple preset risk levels and the actual risk levels corresponding to each preset risk level, and a preset feedback coefficient corresponding to the mapping relationship; in the feedback coefficient determination file, the mapping relationship between the risk level and the actual risk level of the previous face recognition video is determined, and the preset feedback coefficient corresponding to the mapping relationship is obtained; and the above-mentioned preset feedback coefficient is determined as the current feedback coefficient corresponding to each background feature.
[0017] In a possible design, after determining whether the lighting state satisfies the natural light state at the current time, the method further includes: if so, directly determining that the risk level of the target face recognition video is the lowest risk level.
[0018] In one possible design, after determining whether there is a background image with the most corresponding background features, it also includes: if so, determining the background features contained in the background image with the most corresponding background features as a background feature set, and determining the risk level of the target face recognition video based on the background feature set.
[0019] In a possible design, after determining whether at least one background feature in the background feature set is in the blacklist, the method further includes: if so, directly determining that the risk level of the target face recognition video is the highest risk level.
[0020] In a second aspect, the present application provides a risk determination device, including: an acquisition module, for acquiring a target face recognition video;
[0021] The acquisition module is further used to acquire at least one background image in the target face recognition video;
[0022] A recognition module, used to recognize the lighting state corresponding to each background image;
[0023] A judging module, used to judge whether the lighting state satisfies the natural light state at the current time;
[0024] An extraction module, for extracting background features corresponding to each background image if no;
[0025] The judging module is further used to judge whether there is a background picture with the most corresponding background features, and if not, the background features corresponding to each background picture are determined as a background feature set;
[0026] The judging module is further used to judge whether there is at least one background feature in the background feature set that is in the blacklist;
[0027] an input module, for inputting the background feature set into a reinforcement learning model if no;
[0028] A calculation module, used to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy using the reinforcement learning model;
[0029] A determination module is used to determine the risk level of the target face recognition video based on the risk coefficient; the current dynamic calculation strategy is determined based on the risk level of the previous face recognition video and the actual risk level.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the risk determination method described in the first aspect and various possible designs of the first aspect.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the risk determination method described in the first aspect and various possible designs of the first aspect is implemented.
[0032] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the risk determination method described in the first aspect and various possible designs of the first aspect.
[0033] The risk determination method, apparatus, device, storage medium and program product provided by the present application obtain a target face recognition video and obtain at least one background image in the target face recognition video; identify the lighting state corresponding to each background image and determine whether the lighting state satisfies the natural light state at the current time; if not, extract the background features corresponding to each background image and determine whether there is a background image with the most corresponding background features, if not, determine the background features corresponding to each background image as a background feature set; determine whether there is at least one background feature in the background feature set that is in a blacklist, if not, input the background feature set into a reinforcement learning model; use the reinforcement learning model to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, and determine the risk level of the target face recognition video based on the risk coefficient; the current dynamic calculation strategy is determined based on the risk level of the previous face recognition video and the actual risk level. Since the current dynamic calculation strategy is determined in advance according to the risk level of the previous face recognition video and the actual risk level, by obtaining the target face recognition video and obtaining at least one background image in the target face recognition video, the illumination state corresponding to each background image can be identified first, and it is determined whether the illumination state satisfies the natural light state at the current time, so that the background features corresponding to each background image can be extracted when it does not meet the requirements, and it is further determined whether there is a background image with the most background features. If not, the background features corresponding to each background image can be determined as a background feature set. And by judging whether there is at least one background feature in the background feature set that is in the blacklist, the background feature set can be input into the reinforcement learning model when it is determined that it does not exist, and the reinforcement learning model can be used to execute the current dynamic calculation strategy, so as to calculate the risk coefficient corresponding to the background feature set, and then determine the risk level of the target face recognition video based on the risk coefficient. Therefore, the calculation strategy can be dynamically optimized based on each risk determination process for the face recognition video, and the calculation strategy can be used to determine the risk based on all the features of the background, thereby improving the accuracy of the risk determination result. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0035] Figure 1 An application scenario diagram of the risk determination method provided in this application;
[0036] Figure 2 The process of the risk determination method provided in the embodiment of the present application Figure 1 ;
[0037] Figure 3The process of the risk determination method provided in the embodiment of the present application Figure 2 ;
[0038] Figure 4 A schematic diagram of the structure of a risk determination device provided in an embodiment of the present application;
[0039] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0040] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0042] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0043] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0044] Terminology explanation:
[0045] Face recognition: The process of automatically identifying and analyzing faces in videos using video capture technology combined with face recognition algorithms.
[0046] Reinforcement learning: Reinforcement learning is an experiential learning method that involves an intelligent agent continuously exploring and utilizing the environment and optimizing strategies based on rewards or penalties provided by the environment.
[0047] Reinforcement learning model: A model or framework used to implement a reinforcement learning algorithm, which is a means of guiding an agent to optimize its strategy. Specifically, it can be a Monte Carlo reinforcement learning algorithm.
[0048] In the prior art, when determining the risk of the background when face recognition occurs, a classifier is generally used first to classify multiple historical background images according to different preset risk levels to obtain historical background images marked with risk level identifiers. Subsequently, when face recognition occurs, a certain background image to be determined is obtained based on the face recognition video, and the background image to be determined is matched with each historical background image marked with risk level identifiers for similarity, so that the risk level corresponding to the historical background image with the highest similarity is determined as the risk level of the background image to be determined. However, this risk determination method is not effective when the elements in the background image to be determined are relatively complex, which reduces the accuracy of the risk determination result.
[0049] In view of the above technical problems, the present application proposes the following technical concept: in order to enhance the effect of risk determination and improve the accuracy of risk determination results, the risk level of the background image to be determined is not determined based on the similarity between the background image to be determined and the historical background image, but an enhanced learning model is set, and a calculation strategy that can be learned in real time and dynamically adjusted based on the learning results is configured based on the model. When it is necessary to determine the risk of the background when face recognition occurs, at least one background image when face recognition occurs is obtained, and the features corresponding to each background image are extracted when the illumination of the above background image is in an abnormal state. Then, when it is determined that there is no background with the most features, and all the above features are not on the blacklist, all the above features are input into the enhanced learning model, so as to adopt the calculation strategy adjusted according to the last learning result, calculate the risk coefficient corresponding to all the above features, and determine the risk level corresponding to the risk coefficient. In this way, the calculation strategy can be dynamically optimized based on each risk determination process for face recognition videos, and the calculation strategy can be used to determine the risk based on all the features of the background, thereby improving the accuracy of the risk determination results.
[0050] Figure 1 This is an application scenario diagram of the risk determination method provided in this application. Figure 1As shown, the application scenario includes: user terminal 1, electronic device 2, and database 3. Among them, user terminal 1 is any terminal with face recognition function. Electronic device 2 is any device that executes the above-mentioned risk determination method. Database 3 is the database corresponding to electronic device 2. Among them, electronic device 2 is respectively connected to user terminal 1 and database 3 in communication. First, user terminal 1 responds to the face recognition request triggered by the corresponding operation interface, and collects the target face recognition video based on the camera. Then, in response to the target face recognition video acquisition being completed, the electronic device 2 obtains the target face recognition video, obtains at least one background image therein, identifies the lighting state corresponding to each background image, and determines whether the lighting state satisfies the natural light state at the current time, thereby extracting the background features corresponding to each background image in each background image when it is not satisfied, and determines whether there is a background image with the most corresponding background features. If not, the background features corresponding to each background image are determined as a background feature set. Further, a pre-set blacklist is obtained from the database 3, and it is determined whether there is at least one background feature in the background feature set that is in the above-mentioned blacklist. If not, the background feature set is input into the reinforcement learning model, and the reinforcement learning model is used to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, thereby determining the risk level of the target face recognition video based on the risk coefficient, wherein the current dynamic calculation strategy is determined based on the risk level of the previous face recognition video and the actual risk level.
[0051] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0052] based on Figure 1 In the application scenario shown, the embodiment of the present application also provides a risk determination method. Figure 2 The process of the risk determination method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the execution subject of this solution is a risk determination device, which is specifically located in an electronic device. The risk determination method includes:
[0053] S201: Obtain a target face recognition video, and obtain at least one background image in the target face recognition video.
[0054] The target face recognition video is a video collected by the user terminal based on the execution result of face recognition. The target face recognition video may specifically include a face picture and a background picture. The face picture is a picture representing the area covered by the face in the target face recognition video. The background picture is a picture representing the coverage area of the environment in which the face is located in the target face recognition video.
[0055] In this embodiment, a user may trigger a face recognition request based on the identity authentication requirements of a certain service. Then, in response to the request being triggered, the user terminal uses the camera to collect the user's face and the environment in which the face is located through a communication connection with the camera to obtain a target face recognition video. Based on this, the electronic device obtains the target face recognition video in response to the target face recognition video being collected, and extracts at least one background image from it.
[0056] Specifically, at least one frame of image contained in a face video is obtained, and the faces and the environment in which the faces are located contained in each frame of image are identified, so that based on the recognition results, the corresponding face environment is extracted from each frame of image to obtain a picture of the coverage area of at least one face environment, that is, at least one background picture.
[0057] S202: Identify the lighting state corresponding to each background image, and determine whether the lighting state satisfies the natural light state at the current time.
[0058] The illumination state refers to the state under the influence of the illumination of the external environment.
[0059] The natural light state refers to the state under natural light corresponding to the current time.
[0060] In this embodiment, pictures corresponding to natural light conditions at different times may be collected and stored in advance. After obtaining at least one background picture, the light conditions corresponding to each background picture are identified, and pictures corresponding to the natural light conditions at the current time are obtained, so as to determine whether the light conditions corresponding to each background picture are consistent with the natural light conditions presented in the pictures corresponding to the natural light conditions at the current time. If so, it is determined that the light conditions meet the natural light conditions at the current time. If not, it is determined that the light conditions do not meet the natural light conditions at the current time.
[0061] S203: If not, extract the background features corresponding to each background image, and determine whether there is a background image with the most corresponding background features; if not, determine the background features corresponding to each background image as a background feature set.
[0062] In this embodiment, if the lighting condition does not meet the natural lighting condition at the current time, it means that the background in the target face recognition video may be synthesized using, for example, an artificial intelligence synthesis method, and the background features corresponding to each background picture are extracted from each background picture.
[0063] The background features are features that characterize elements present in the background image.
[0064] For example, if a background image is a background image of "three interfering faces under a street light at night", the background features corresponding to the background image may include "night", "street light", "insufficient lighting", and "three interfering faces".
[0065] It can be understood that the above examples are only for illustrative purposes, and this embodiment does not limit the specific content that the background features may include.
[0066] The background feature set is a set consisting of background features contained in all background images.
[0067] It is understandable that each background image reflects the same target face recognition video. Therefore, it is possible to consider selecting the background image that best reflects the target face recognition video from among the background images to perform the subsequent risk determination process.
[0068] Based on this, we can further determine whether there is a background picture with the most corresponding background features. If not, it means that among the background pictures, there is no background picture that best reflects the target face recognition video. In this case, the background features corresponding to each background picture, that is, all background features, are determined as a background feature set.
[0069] S204: Determine whether there is at least one background feature in the background feature set that is in the blacklist; if not, input the background feature set into the reinforcement learning model.
[0070] The blacklist is a pre-set list based on certain background features. When these background features appear, the face recognition video is usually at a higher risk.
[0071] Among them, the reinforcement learning model is a model pre-built based on the reinforcement learning algorithm.
[0072] In this embodiment, a preset blacklist is obtained and read to determine whether there is at least one background feature in the background feature set whose field is the same as the background feature in the blacklist. If not, it means that the target face recognition video does not have a high risk level under normal circumstances. In order to further determine the risk level of the target face recognition video, the above background feature set is input into the reinforcement learning model.
[0073] S205. Using a reinforcement learning model, calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, and determine the risk level of the target face recognition video based on the risk coefficient; the current dynamic calculation strategy is determined based on the risk level of the previous face recognition video and the actual risk level.
[0074] The current dynamic calculation strategy is the latest adjusted dynamic calculation strategy based on the risk level of the previous face recognition video and the actual risk level. The risk coefficient is a value that represents the risk bias.
[0075] The actual risk level is the risk level actually determined by the auditor. The previous face recognition video is the last face recognition video that was determined before the risk determination of the target face recognition video was performed this time.
[0076] In this embodiment, the initial dynamic calculation strategy can be configured in advance by the R&D personnel based on the needs of risk determination, and multiple test videos with determined risk levels can be prepared. Then, according to the above steps, the background feature set corresponding to each test video is obtained, and the background feature set corresponding to one of the test videos is input into the reinforcement learning model to adopt the initial dynamic calculation strategy to determine the risk level of the test video, so as to determine the feedback that needs to be given to the initial dynamic calculation strategy according to the risk level and the actual risk level of the test video, and automatically adjust the initial dynamic calculation strategy according to the feedback. Then, further, the background feature set corresponding to another test video is input into the reinforcement learning model to adopt the initial dynamic calculation strategy after the first adjustment to determine the risk level of the test video, so as to determine the feedback this time, and automatically adjust the initial dynamic calculation strategy after the first adjustment according to the feedback this time, and so on. When the adjustment result meets the application requirements, the above reinforcement learning model is applied in real business scenarios.
[0077] The initial dynamic calculation strategy is the dynamic calculation strategy used before the reinforcement learning model is learned and has not been adjusted. The test video is a video with a determined risk level for the reinforcement learning model to learn.
[0078] It is understandable that in the subsequent application process, the reinforcement learning model will continue to be optimized based on the specific application process. That is, for each face recognition video that needs to determine the risk based on the reinforcement learning model, the dynamic calculation strategy adopted is based on the dynamic calculation strategy adopted when the risk was determined last time, combined with the risk level corresponding to the previous face recognition video and the actual risk level.
[0079] Based on this, the current dynamic calculation strategy in this embodiment is determined according to the risk level and actual risk level of the previous face recognition video. After the background feature set corresponding to the target face recognition video is input into the reinforcement learning model, the model is adopted. According to the current dynamic calculation strategy, the risk coefficient corresponding to each background feature in the background feature set is first calculated, and then the risk coefficient corresponding to the background feature set is calculated based on the risk coefficient corresponding to each background feature, and the specific risk level of the target face recognition video is determined based on the risk bias represented by the risk coefficient.
[0080] The risk determination method provided in this embodiment determines the current dynamic calculation strategy in advance according to the risk level of the previous face recognition video and the actual risk level. Therefore, by obtaining the target face recognition video and obtaining at least one background image in the target face recognition video, the illumination state corresponding to each background image can be identified first, and it can be determined whether the illumination state meets the natural light state at the current time, so that the background features corresponding to each background image can be extracted when it does not meet the requirements, and it can be further determined whether there is a background image with the most background features. If not, the background features corresponding to each background image can be determined as a background feature set. And by determining whether there is at least one background feature in the background feature set that is in the blacklist, the background feature set can be input into the reinforcement learning model when it is determined that it does not exist, and the reinforcement learning model can be used to execute the current dynamic calculation strategy, so as to calculate the risk coefficient corresponding to the background feature set, and then determine the risk level of the target face recognition video based on the risk coefficient. Therefore, the calculation strategy can be dynamically optimized based on each risk determination process for the face recognition video, and the calculation strategy can be used to determine the risk based on all the features of the background, thereby improving the accuracy of the risk determination result.
[0081] As an optional embodiment, based on the above embodiment, this embodiment further refines the process of obtaining at least one background image in the target face recognition video. When obtaining at least one background image in the target face recognition video, this embodiment specifically includes the following steps:
[0082] Step a1: obtaining at least one face recognition image frame included in the target face recognition video, and determining the area covered by the face image in each face recognition image frame.
[0083] The face recognition image is a frame image in the target face recognition video.
[0084] In this embodiment, in response to obtaining at least one background image in the target face recognition video, the target face recognition video is divided according to the number of frames to obtain at least one frame of face recognition image contained therein. Further, each frame of face recognition image is recognized, and the area covered by the face image in each frame of face recognition image is determined according to the recognition result.
[0085] Step a2: segment each frame of face recognition image based on the region to obtain at least one face picture and at least one background picture.
[0086] In this embodiment, after determining the area covered by the face picture in each frame of face recognition image, each frame of face recognition image is segmented according to the pixels in the above area to obtain at least one face picture and at least one background picture.
[0087] It can be understood that, for at least one facial image obtained, each facial image can be synchronously compared with the corresponding facial images of the user collected in advance to perform identity recognition on each facial image, so that when the risk determination result is normal, corresponding business services can be provided to the corresponding user based on the recognition result.
[0088] The risk determination method provided in this embodiment, since the target face recognition video contains at least one frame of face recognition image, by obtaining at least one frame of face recognition image included in the target face recognition video, the area covered by the face picture in each frame of face recognition image can be determined, and each frame of face recognition image can be segmented based on the above area to obtain at least one face picture and at least one background picture, thereby improving the integrity of the extracted background picture.
[0089] As an optional embodiment, in this embodiment Figure 2 On the basis of the corresponding embodiment, the background features corresponding to each background image are extracted to obtain the background feature set, and the present embodiment specifically includes the following steps when extracting the background features corresponding to each background image to obtain the background feature set:
[0090] Step b1: Use an image segmentation algorithm to segment each background image to obtain a sub-image corresponding to each background image.
[0091] Among them, the image segmentation algorithm is an algorithm for dividing an image into multiple sub-images with specific features.
[0092] The sub-image is a subset divided from the background image.
[0093] In this embodiment, after obtaining each background picture, each background picture is preprocessed, such as denoising, contrast enhancement, etc., to obtain each preprocessed background picture, and a pre-configured picture segmentation algorithm is obtained, and then the picture segmentation algorithm is used to separate the areas related to specific features in each preprocessed background picture, and the separated areas are post-processed, such as morphological operations, connecting adjacent similar areas, etc., to obtain sub-pictures corresponding to each background picture.
[0094] Denoising is a processing method for reducing noise interference in an image, which may be Gaussian filtering, median filtering, etc. Contrast enhancement is a processing method for adjusting the contrast and brightness of an image.
[0095] Among them, when using the image segmentation algorithm to separate the areas related to specific features in each preprocessed background image, the DBSCAN algorithm can be used for separation. Specifically, based on each preprocessed background image, each pixel in each background image is traversed, and based on each pixel, it is checked whether the number of points in the neighborhood exceeds a preset minimum number, so that when it is determined that it exceeds, the pixel is marked as a core point, and more pixels are iteratively clustered into the core point, and then the interconnected clusters are merged according to the density connectivity, thereby completing the separation.
[0096] It is understandable that in addition to the above-mentioned DBSCAN algorithm, the K-means algorithm can also be used, or separation can be performed based on thresholds, edges, regions (such as region growing, level set methods, etc.), deep learning (such as convolutional neural network CNN), etc. This embodiment does not limit the specific separation method used.
[0097] Among them, the morphological operation is a processing method for removing small noise areas or filling holes.
[0098] Step b2: extract the corresponding background features from the sub-pictures corresponding to each background picture, and arrange the background features corresponding to each background picture in sequence to construct a matrix to obtain a background feature set; the number of rows of the matrix is determined by the number of background features, and the number of columns is determined by the number of background pictures.
[0099] In this embodiment, after obtaining the sub-pictures corresponding to the background pictures, feature recognition is performed on the sub-pictures corresponding to the background pictures to obtain the background features corresponding to the background pictures. Further, the background features corresponding to the background pictures are arranged in sequence according to the order of the frames in which the background pictures are located, so as to obtain a matrix with the number of background features as the number of columns and the number of background pictures as the number of rows, and the matrix is determined as the background feature set.
[0100] Among them, when performing feature recognition on the sub-pictures corresponding to each background picture, a convolutional neural network CNN can be specifically used to perform feature recognition on the sub-pictures corresponding to each background picture. Specifically, the sub-pictures corresponding to each background picture are input into the CNN model, and a plurality of convolution kernels are used to perform convolution operations on the input sub-pictures, so as to extract corresponding local features based on each convolution kernel, and then the extracted local features are processed by a nonlinear activation function to obtain the features of the sub-picture, thereby completing feature recognition.
[0101] In order to more clearly illustrate the obtained background feature set, a specific table is used to illustrate the background feature set below. As shown in Table 1, the matrix formed based on each background picture and the background features corresponding to each background picture has the number of rows being the number of background pictures and the number of columns being the number of background features.
[0102] Table 1
[0103]
[0104] The risk determination method provided in this embodiment uses an image segmentation algorithm to segment each background image to obtain a sub-image corresponding to each background image. The corresponding background features can be extracted from the sub-images corresponding to each background image, and the background features corresponding to each background image can be arranged in sequence to obtain a matrix with the number of background features as the number of columns and the number of background images as the number of rows, so as to successfully extract the background features and then successfully obtain a background feature set, thereby improving the success rate of subsequent risk determination.
[0105] As an optional embodiment, in this embodiment Figure 2 On the basis of the corresponding embodiment, the risk coefficient corresponding to the background feature set calculated according to the current dynamic calculation strategy is refined. When the risk coefficient corresponding to the background feature set is calculated according to the current dynamic calculation strategy, the embodiment specifically includes the following steps:
[0106] Step c1: According to the current dynamic calculation strategy, the risk value of each background feature in the background feature set is calculated, and the current feedback coefficient of each background feature is obtained.
[0107] Among them, the risk value is the risk bias value when feedback is not considered.
[0108] Among them, the current feedback coefficient is the feedback coefficient of the reward or punishment that should be given to each background feature at present.
[0109] In this embodiment, when calculating the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, each background feature in the background feature set is first scored in the risk dimension according to the current dynamic calculation strategy to obtain the risk value corresponding to each background feature. Then, after obtaining the risk value corresponding to each background feature, in order to further consider the feedback that should be given to each background feature, the current feedback coefficient of each background feature is obtained in the current dynamic calculation strategy.
[0110] Step c2: Use the current feedback coefficient to weight the risk value to obtain the risk coefficient of each background feature.
[0111] Among them, weighted processing is used to assign corresponding weights to risk values.
[0112] In this embodiment, after the risk value and the current feedback coefficient corresponding to each background feature are obtained, the current feedback coefficient corresponding to each background feature is used to perform weighted processing on the corresponding risk value to obtain the risk coefficient of each background feature.
[0113] Step c3: Analyze and process the risk coefficient of each background feature to obtain the risk coefficient corresponding to the background feature set.
[0114] The analysis process is used to analyze the overall risk performance reflected by the risk coefficient of each background feature, which can be a dynamic weighting process or a nonlinear fitting process. In this embodiment, after obtaining the risk coefficient corresponding to each background feature, the risk coefficient of each background feature can be analyzed by a dynamic weighting process or a nonlinear fitting process to obtain the risk coefficient corresponding to the background feature set.
[0115] Specifically, the importance of each background feature can be determined in advance, and then the risk coefficients of each background feature are dynamically weighted and summed according to the corresponding importance to obtain the total risk coefficient, that is, the risk coefficient corresponding to the background feature set. Alternatively, a nonlinear model can be established in advance, and the parameters of the nonlinear model can be optimized using a nonlinear fitting algorithm, so that the risk coefficients of each background feature are input into the optimized nonlinear model to obtain an output result, and the output result is determined as the risk coefficient corresponding to the background feature set.
[0116] In the risk determination method provided in this embodiment, since the current dynamic calculation strategy includes the current feedback coefficient that should be given to each background feature, by calculating the risk value of each background feature in the background feature set according to the current dynamic calculation strategy and obtaining the current feedback coefficient of each background feature, the risk value can be weighted by using the current feedback coefficient to obtain the risk coefficient of each background feature. And by analyzing and processing the risk coefficient of each background feature, the risk coefficient corresponding to the background feature set can be obtained, thereby accurately determining the risk coefficient of the face recognition video.
[0117] As an optional embodiment, in this embodiment Figure 2 On the basis of the corresponding embodiment, the risk level of the target face recognition video determined based on the risk coefficient is refined. When determining the risk level of the target face recognition video based on the risk coefficient, this embodiment specifically includes the following steps:
[0118] Step d1: Obtain coefficient thresholds corresponding to multiple preset risk levels, and determine the coefficient threshold where the risk coefficient is located; each preset risk level is progressive from low to high.
[0119] The preset risk level is a pre-set risk level, and the coefficient threshold is a threshold set based on the size of the risk coefficient. The preset risk levels are arranged in a progressive order from low to high.
[0120] Exemplarily, each preset risk level may be normal, risky, and black industry from low to high.
[0121] In this embodiment, the R&D personnel can set corresponding coefficient thresholds for different preset risk levels. For example, the normal threshold is set to "0-10", the risk threshold is set to "11-20", and the black industry threshold is set to "21-30". This embodiment does not limit the specific rules for setting the thresholds.
[0122] Based on this, after obtaining the risk coefficient corresponding to the background feature set, the preset risk levels and the corresponding coefficient thresholds are obtained, and the coefficient thresholds where the risk coefficients are located are determined. For example, if the risk coefficient is 6, the coefficient threshold where the risk coefficients are located can be determined to be "0-10".
[0123] Step d2: Determine the preset risk level corresponding to the coefficient threshold as the risk level of the target face recognition video.
[0124] In this embodiment, after determining the coefficient threshold of the risk coefficient, the preset risk coefficient corresponding to the coefficient threshold is determined as the risk level of the target face recognition video. For example, if the coefficient threshold is "0-10", it can be determined that the risk level of the target face recognition video is normal.
[0125] The risk determination method provided in this embodiment sets multiple preset risk levels in order from low to high. Therefore, by obtaining the coefficient thresholds corresponding to the multiple preset risk levels, the coefficient threshold of the risk coefficient corresponding to the background feature set can be determined, and the preset risk level corresponding to the coefficient threshold can be determined as the risk level of the target face recognition video, thereby accurately determining the risk level of the face recognition video.
[0126] As an optional embodiment, based on any of the above embodiments, this embodiment further includes the following steps before obtaining the target face recognition video:
[0127] Step e1: According to the previous dynamic calculation strategy, the risk value of each background feature corresponding to the previous face recognition video is calculated, and the previous feedback coefficient corresponding to each background feature is obtained.
[0128] The previous dynamic calculation strategy is the dynamic calculation strategy used when determining the risk of the previous face recognition video. The previous feedback coefficient is the feedback coefficient given to each background feature when calculating the risk coefficient of each background feature according to the previous dynamic calculation strategy.
[0129] It can be understood that a prerequisite for the implementation of this solution is that the current dynamic calculation strategy has been determined based on the risk level of the previous face recognition video and the actual risk level.
[0130] Based on this, the previous face recognition video can be obtained first, and at least one background picture can be obtained in the previous face recognition video; the lighting state corresponding to each background picture is identified, and it is determined whether the lighting state meets the natural light state at the current time; if not, the background features corresponding to each background picture are extracted, and it is determined whether there is a background picture with the most corresponding background features. If not, the background features corresponding to each background picture are determined as the background feature set corresponding to the previous face recognition video, and it is determined whether there is at least one background feature in the background feature set that is in the blacklist. If not, the background feature set is input into the reinforcement learning model. The specific execution process is similar to S201-S204, which will not be repeated here; then the reinforcement learning model is used to calculate the risk value of each background feature in the background feature set corresponding to the previous face recognition video according to the previous dynamic calculation strategy, and the previous feedback coefficient of the above-mentioned background features is obtained. The specific execution process is similar to step c1, which will not be repeated here.
[0131] Step e2: Determine the risk level of the previous face recognition video based on the previous feedback coefficient and risk value.
[0132] In this embodiment, after obtaining the risk value of each background feature corresponding to the previous face recognition video and the previous feedback coefficient, the risk coefficient corresponding to each background feature is calculated according to the previous feedback coefficient and the risk value, thereby calculating the risk coefficient of the previous face recognition video. The specific execution process is similar to step c2-step c3, and will not be repeated here. Then, the risk level of the previous face recognition video is determined based on the risk coefficient. The specific execution process is similar to step d1-step d2, and will not be repeated here.
[0133] Step e3: Obtain the actual risk level of the previous face recognition video, and determine the current feedback coefficient corresponding to each background feature based on the risk level of the previous face recognition video and the actual risk level.
[0134] In this embodiment, after obtaining the risk level of the previous face recognition video, the actual risk level of the previous face recognition video is obtained, and based on the difference between the risk level of the previous face recognition video and the actual risk level, it is determined that the feedback coefficient corresponding to each background feature should be given when the risk is determined next time, that is, the current feedback coefficient corresponding to each background feature.
[0135] Step e4: Based on the current feedback coefficient corresponding to each background feature, adjust the previous dynamic calculation strategy to obtain the current dynamic calculation strategy.
[0136] In this embodiment, after the current feedback coefficient corresponding to each background feature is obtained, the current feedback coefficient is used to adjust the previous feedback coefficient corresponding to each background feature in the previous dynamic calculation strategy to obtain the current dynamic calculation strategy.
[0137] The risk determination method provided in this embodiment, since one of the prerequisites for the implementation of this scheme is to determine the current dynamic calculation strategy, by calculating the risk value of each background feature corresponding to the previous face recognition video according to the previous dynamic calculation strategy, and obtaining the previous feedback coefficient corresponding to each background feature, the risk level of the previous face recognition video can be determined based on the above-mentioned previous feedback coefficient and risk value. And by obtaining the actual risk level of the previous face recognition video, the current feedback coefficient corresponding to each background feature can be determined based on the risk level of the previous face recognition video and the actual risk level, and the previous dynamic calculation strategy can be adjusted based on the current feedback coefficient corresponding to each background feature, thereby successfully obtaining the current dynamic calculation strategy, and further improving the success rate of subsequent risk determination.
[0138] As an optional embodiment, based on the above embodiment, this embodiment further refines the determination of the current feedback coefficient corresponding to each background feature according to the risk level and the actual risk level of the previous face recognition video. When determining the current feedback coefficient corresponding to each background feature according to the risk level and the actual risk level of the previous face recognition video, this embodiment specifically includes the following steps:
[0139] Step f1: Obtain a feedback coefficient determination file; the feedback coefficient determination file includes a mapping relationship between a plurality of preset risk levels and an actual risk level corresponding to each preset risk level, and a preset feedback coefficient corresponding to the mapping relationship.
[0140] The feedback coefficient determination file is a pre-set file for determining the feedback coefficient. The file specifically includes a mapping relationship between a plurality of preset risk levels and the actual risk levels corresponding to each preset risk level, and a preset feedback coefficient corresponding to the above mapping relationship. The preset feedback coefficient is a feedback coefficient pre-set according to the difference between the preset risk level and the actual risk level.
[0141] The feedback coefficient determination file is described below using a specific table. As shown in Table 2, when the preset risk level and the actual risk level are both normal, the corresponding preset feedback coefficient is 1. When the preset risk level and the actual risk level are both risk, the corresponding preset feedback coefficient is 5. When the preset risk level and the actual risk level are both black production, the corresponding preset feedback coefficient is 10. When the preset risk level is normal and the actual risk level is risk, the corresponding preset feedback coefficient is -10. When the preset risk level is normal and the actual risk level is black production, the corresponding preset feedback coefficient is -20. When the preset risk level is risk and the actual risk level is normal, the corresponding preset feedback coefficient is -5. When the preset risk level is risk and the actual risk level is black production, the corresponding preset feedback coefficient is -10. When the preset risk level is black production and the actual risk level is normal, the corresponding preset feedback coefficient is -10. When the preset risk level is black production and the actual risk level is risk, the corresponding preset feedback coefficient is -1.
[0142] Table 2
[0143]
[0144] It can be understood that the specific values of the preset risk levels, actual risk levels, and corresponding preset feedback coefficients shown in the above table are all examples and should not constitute any limitation to the present application.
[0145] Step f2: In the feedback coefficient determination file, determine the mapping relationship between the risk level of the previous face recognition video and the actual risk level, and obtain the preset feedback coefficient corresponding to the mapping relationship.
[0146] In this embodiment, after obtaining the feedback coefficient file, the preset risk level that is the same as the risk level of the previous facial recognition video and the actual risk level that is the same as the actual risk level of the previous facial recognition video are searched therein according to the risk level and the actual risk level of the previous facial recognition video, and the mapping relationship between the preset risk level and the actual risk level is determined as the mapping relationship between the risk level and the actual risk level of the previous facial recognition video, thereby obtaining the preset feedback coefficient corresponding to the mapping relationship.
[0147] Step f3: Determine the above preset feedback coefficient as the current feedback coefficient corresponding to each background feature.
[0148] In this embodiment, after obtaining the preset feedback coefficients corresponding to the risk level of the previous face recognition video and the actual risk level, the preset feedback coefficients are determined as the current feedback coefficients corresponding to each background feature.
[0149] The risk determination method provided in this embodiment has a mapping relationship established in advance between multiple preset risk levels and the actual risk level corresponding to each preset risk level, and a corresponding preset feedback coefficient is set based on each mapping relationship to form a feedback coefficient determination file. Therefore, by obtaining the feedback coefficient determination file, the mapping relationship between the risk level of the previous face recognition video and the actual risk level can be determined in the feedback coefficient determination file, and the preset feedback coefficient corresponding to the above mapping relationship can be obtained, so as to determine the above preset feedback coefficient as the current feedback coefficient corresponding to each background feature. In this way, the current feedback coefficient corresponding to each background feature can be quickly determined, thereby improving the determination efficiency.
[0150] As an optional embodiment, based on any of the above embodiments, after determining whether the lighting state meets the natural light state at the current time, this embodiment further includes the following steps:
[0151] If so, the risk level of the target face recognition video is directly determined to be the lowest risk level.
[0152] Among them, the lowest risk level is pre-set, and the risk bias is the lowest level, such as "normal".
[0153] In this embodiment, it is determined whether the lighting state meets the natural light state at the current time. If so, it means that the target face recognition video was shot under natural light at the current time, and the risk level of the target face recognition video is directly determined to be the lowest risk level.
[0154] The risk determination method provided in this embodiment, since it is difficult for artificial intelligence to accurately synthesize the natural light conditions at a certain time, when the lighting conditions meet the natural light conditions at the current time, by directly determining the risk level of the target face recognition video as the lowest risk level, normal users can be quickly identified, thereby improving the efficiency of risk determination and further improving the accuracy of the risk determination results.
[0155] As an optional embodiment, based on any of the above embodiments, after determining whether there is a background image with the most corresponding background features, this embodiment further includes the following steps:
[0156] If so, the background features contained in the background image with the most corresponding background features are determined as a background feature set, and the risk level of the target face recognition video is determined based on the background feature set.
[0157] In this embodiment, it is determined whether there is a background image with the most corresponding background features. If so, it means that there is a background image that best reflects the target face recognition video. In this case, the background image with the most corresponding background features is obtained, and the background features contained in the background image are determined as a background feature set, so as to determine the risk level of the target face recognition video based on the background feature set. The specific determination process is similar to S204-S205 and will not be repeated here.
[0158] The risk determination method provided in this embodiment, since the background image containing the most background features can reflect the target face recognition video to the greatest extent, when there is a background image with the most corresponding background features, the background features contained in the background image with the most corresponding background features can be determined as a background feature set, and the risk level of the target face recognition video can be determined based on the background feature set, thereby saving computing resources and further improving the efficiency of risk determination.
[0159] As an optional embodiment, based on any of the above embodiments, after determining whether there is at least one background feature in the background feature set in the blacklist, this embodiment further includes the following steps:
[0160] If so, the risk level of the target face recognition video is directly determined to be the highest risk level.
[0161] Among them, the highest risk level is pre-set, and the risk tendency is the highest level, such as "black industry".
[0162] In this embodiment, it is determined whether there is at least one background feature in the background feature set that is on the blacklist. If so, it means that the target face recognition video usually has a higher risk level, and the risk level of the target face recognition video is directly determined to be the highest risk level.
[0163] The risk determination method provided in this embodiment, since there may be at least one background feature in the background feature set that is on the blacklist, when such a background feature exists, the black market user can be quickly identified by directly determining the risk level of the target face recognition video as the highest risk level, thereby improving the efficiency of risk determination.
[0164] Optionally, after determining the risk level of the target face recognition video, the actual risk level of the target face recognition video can also be obtained, and the next feedback coefficient of each background feature is determined based on the risk level of the face recognition video and the actual risk level, so as to adjust the current dynamic calculation strategy based on the next feedback coefficient of each background feature to obtain the next dynamic calculation strategy. The specific execution process is similar to step e3-step e4, and will not be repeated here.
[0165] Figure 3 The process of the risk determination method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, the complete process of the risk determination method is shown:
[0166] S301. According to the previous dynamic calculation strategy, the risk value of each background feature corresponding to the previous face recognition video is calculated, and the previous feedback coefficient corresponding to each background feature is obtained.
[0167] S302: Determine the risk level of the previous face recognition video according to the previous feedback coefficient and the risk value.
[0168] S303: Obtain the actual risk level of the previous face recognition video.
[0169] S304, obtaining a feedback coefficient determination file; the feedback coefficient determination file includes a mapping relationship between a plurality of preset risk levels and an actual risk level corresponding to each preset risk level, and a preset feedback coefficient corresponding to the mapping relationship.
[0170] S305. Determine the mapping relationship between the risk level of the previous face recognition video and the actual risk level in the feedback coefficient determination file, and obtain a preset feedback coefficient corresponding to the mapping relationship.
[0171] S306: Determine the preset feedback coefficient as the current feedback coefficient corresponding to each background feature.
[0172] S307: Based on the current feedback coefficient corresponding to each background feature, adjust the previous dynamic calculation strategy to obtain the current dynamic calculation strategy.
[0173] S308: Obtain the target face recognition video, and obtain at least one frame of face recognition image included therein.
[0174] S309: Determine the area covered by the face image in each frame of face recognition image.
[0175] S310, segmenting each frame of face recognition image based on regions to obtain at least one face picture and at least one background picture.
[0176] S311, identifying the lighting state corresponding to each background image, and determining whether the lighting state satisfies the natural light state at the current time, if not, continuing to execute S312, if yes, executing S323.
[0177] S312: Use a picture segmentation algorithm to segment each background picture to obtain a sub-picture corresponding to each background picture.
[0178] S313 , extracting corresponding background features from the sub-pictures corresponding to each background picture, and arranging the background features corresponding to each background picture in sequence to construct a matrix.
[0179] The number of rows in the matrix is determined by the number of background features, and the number of columns is determined by the number of background images.
[0180] S314, determine whether there is a background image with the most corresponding background features, if not, continue to execute S315, if yes, execute S324.
[0181] S315: Determine the background features corresponding to each background image as a background feature set.
[0182] S316, determine whether there is at least one background feature in the background feature set that is in the blacklist, if not, execute S317-S322, if yes, execute S325.
[0183] S317: Input the background feature set into the reinforcement learning model.
[0184] S318. Using the reinforcement learning model, according to the current dynamic calculation strategy, the risk value of each background feature in the background feature set is calculated, and the current feedback coefficient of each background feature is obtained.
[0185] S319: Use the current feedback coefficient to perform weighted processing on the risk value to obtain the risk coefficient of each background feature.
[0186] S320: Analyze and process the risk coefficient of each background feature to obtain the risk coefficient corresponding to the background feature set.
[0187] S321. Obtain coefficient thresholds corresponding to a plurality of preset risk levels, and determine the coefficient threshold at which the risk coefficient lies; each preset risk level is progressive from low to high.
[0188] S322. Determine the preset risk level corresponding to the coefficient threshold as the risk level of the target face recognition video, and execute S326-S327.
[0189] S323. Directly determine that the risk level of the target face recognition video is the lowest risk level, and execute S326-S327.
[0190] S324, determining the background features contained in the background image with the most corresponding background features as a background feature set, and determining the risk level of the target face recognition video based on the background feature set, and executing S326-S327.
[0191] The execution method of this step is similar to S317-S322, and will not be repeated here.
[0192] S325. Directly determine that the risk level of the target face recognition video is the highest risk level, and execute S326-S327.
[0193] S326. Obtain the actual risk level of the target face recognition video, and determine the next feedback coefficient of each background feature according to the risk level of the face recognition video and the actual risk level.
[0194] S327. Based on the next feedback coefficient of each background feature, adjust the current dynamic calculation strategy to obtain the next dynamic calculation strategy.
[0195] Figure 4 This is a schematic diagram of the structure of the risk determination device provided in the embodiment of the present application. Figure 4 As shown, the risk determination device 40 includes: an acquisition module 41, an identification module 42, a judgment module 43, an extraction module 44, an input module 45, a calculation module 46, and a determination module 47.
[0196] Among them, the acquisition module 41 is used to obtain the target face recognition video; the acquisition module 41 is also used to obtain at least one background picture in the target face recognition video; the identification module 42 is used to identify the lighting state corresponding to each background picture; the judgment module 43 is used to judge whether the lighting state meets the natural light state at the current time; the extraction module 44 is used to extract the background features corresponding to each background picture if not; the judgment module 43 is also used to judge whether there is a background picture with the most corresponding background features, if not, the background features corresponding to each background picture are determined as a background feature set; the judgment module 43 is also used to judge whether there is at least one background feature in the background feature set that is in the blacklist; the input module 45 is used to input the background feature set into the reinforcement learning model if not; the calculation module 46 is used to use the reinforcement learning model to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy; the determination module 47 is used to determine the risk level of the target face recognition video based on the risk coefficient; the current dynamic calculation strategy is determined based on the risk level of the previous face recognition video and the actual risk level.
[0197] Optionally, when acquiring at least one background image in the target face recognition video, the acquisition module 41 is specifically configured to:
[0198] Acquire at least one face recognition image frame included in the target face recognition video, and determine the area covered by the face picture in each face recognition image frame; segment each face recognition image frame based on the area to obtain at least one face picture and at least one background picture.
[0199] Optionally, the extraction module 44, when extracting the background features corresponding to each background image to obtain the background feature set, is specifically used to:
[0200] Each background image is segmented by an image segmentation algorithm to obtain a sub-image corresponding to each background image; the corresponding background features are extracted from the sub-images corresponding to each background image, and the background features corresponding to each background image are arranged in sequence to construct a matrix to obtain a background feature set; the number of rows of the matrix is determined by the number of background features, and the number of columns is determined by the number of background images.
[0201] Optionally, the calculation module 46, when calculating the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, is specifically used to:
[0202] According to the current dynamic calculation strategy, the risk value of each background feature in the background feature set is calculated, and the current feedback coefficient of each background feature is obtained; the risk value is weighted using the current feedback coefficient to obtain the risk coefficient of each background feature; the risk coefficient of each background feature is analyzed and processed to obtain the risk coefficient corresponding to the background feature set.
[0203] Optionally, the determination module 47, when determining the risk level of the target face recognition video based on the risk coefficient, is specifically configured to:
[0204] Obtain coefficient thresholds corresponding to multiple preset risk levels, and determine the coefficient threshold where the risk coefficient is located; each preset risk level is progressive from low to high; and determine the preset risk level corresponding to the coefficient threshold as the risk level of the target face recognition video.
[0205] Optionally, the risk determination device provided in this embodiment further includes: an adjustment module.
[0206] Among them, the calculation module 46 is also used to calculate the risk value of each background feature corresponding to the previous face recognition video according to the previous dynamic calculation strategy before the acquisition module 41 acquires the target face recognition video, and the acquisition module 41 is also used to obtain the previous feedback coefficient corresponding to each background feature; the determination module 47 is also used to determine the risk level of the previous face recognition video based on the previous feedback coefficient and the risk value; the acquisition module 41 is also used to obtain the actual risk level of the previous face recognition video, and the determination module 47 is also used to determine the current feedback coefficient corresponding to each background feature based on the risk level and the actual risk level of the previous face recognition video; the adjustment module is used to adjust the previous dynamic calculation strategy based on the current feedback coefficient corresponding to each background feature to obtain the current dynamic calculation strategy.
[0207] Optionally, the determination module 47, when determining the current feedback coefficient corresponding to each background feature according to the risk level of the previous face recognition video and the actual risk level, is specifically used to:
[0208] Obtain a feedback coefficient determination file; the feedback coefficient determination file includes a mapping relationship between multiple preset risk levels and actual risk levels corresponding to each preset risk level, and a preset feedback coefficient corresponding to the mapping relationship; in the feedback coefficient determination file, determine the mapping relationship between the risk level of the previous face recognition video and the actual risk level, and obtain the preset feedback coefficient corresponding to the mapping relationship; determine the above preset feedback coefficient as the current feedback coefficient corresponding to each background feature.
[0209] Optionally, the determination module 47 is further configured to, after the judgment module 43 determines whether the lighting state satisfies the natural light state at the current time, directly determine that the risk level of the target face recognition video is the lowest risk level if so.
[0210] Optionally, the determination module 47 is also used to, after the judgment module 43 determines whether there is a background image with the most corresponding background features, if so, determine the background features contained in the background image with the most corresponding background features as a background feature set, and determine the risk level of the target face recognition video based on the background feature set.
[0211] Optionally, the determination module 47 is further used to determine whether there is at least one background feature in the background feature set that is in the blacklist after the judgment module 43 determines, and if so, directly determine that the risk level of the target face recognition video is the highest risk level.
[0212] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 50 may include: a transceiver 51 , a processor 52 , and a memory 53 .
[0213] The processor 52 executes the computer execution instructions stored in the memory, so that the processor 52 executes the scheme in the above embodiment. The processor 52 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0214] The memory 53 is connected to the processor 52 via a system bus and completes communication between them. The memory 53 is used to store computer program instructions.
[0215] The transceiver 51 may be used to transmit and receive data.
[0216] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0217] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0218] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the risk determination method in the above embodiment.
[0219] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the risk determination method of the above embodiment.
[0220] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the risk determination method in the above embodiment.
[0221] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0222] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0223] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0224] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0225] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0226] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0227] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0228] The above 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 memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0229] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0230] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A risk determination method, characterized in that: The method comprises: Acquire a target face recognition video, and acquire at least one background image in the target face recognition video; Identify the lighting state corresponding to each background image, and determine whether the lighting state meets the natural light state at the current time; If not, extract the background features corresponding to each background image, and determine whether there is a background image with the most corresponding background features. If not, determine the background features corresponding to each background image as a background feature set; Determine whether at least one background feature in the background feature set is in the blacklist, and if not, input the background feature set into the reinforcement learning model; The reinforcement learning model is adopted to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy, and the risk level of the target face recognition video is determined based on the risk level of the previous face recognition video and the actual risk level.
2. The method according to claim 1, characterized in that The obtaining at least one background image in the target face recognition video includes: Acquire at least one face recognition image frame included in the target face recognition video, and determine the area covered by the face image in each face recognition image frame; Each frame of face recognition image is segmented based on the region to obtain at least one face picture and at least one background picture.
3. The method according to claim 1, characterized in that The extracting of background features corresponding to each background image includes: Using an image segmentation algorithm to segment each background image to obtain a sub-image corresponding to each background image; Corresponding background features are extracted from the sub-pictures corresponding to each background picture, and the background features corresponding to each background picture are arranged in sequence to construct a matrix; the number of rows of the matrix is determined by the number of background features, and the number of columns is determined by the number of background pictures.
4. The method according to claim 1, characterized in that: The step of calculating the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy includes: According to the current dynamic calculation strategy, the risk value of each background feature in the background feature set is calculated, and the current feedback coefficient of each background feature is obtained; The risk value is weighted by using the current feedback coefficient to obtain the risk coefficient of each background feature; The risk coefficient of each background feature is analyzed and processed to obtain the risk coefficient corresponding to the background feature set.
5. The method according to claim 1, characterized in that The determining the risk level of the target face recognition video based on the risk coefficient includes: Obtaining coefficient thresholds corresponding to a plurality of preset risk levels, and determining the coefficient threshold where the risk coefficient is located; the preset risk levels are progressive from low to high; The preset risk level corresponding to the coefficient threshold is determined as the risk level of the target face recognition video.
6. The method according to any one of claims 1 to 5, characterized in that: Before obtaining the target face recognition video, the method further includes: According to the previous dynamic calculation strategy, the risk value of each background feature corresponding to the previous face recognition video is calculated, and the previous feedback coefficient corresponding to each background feature is obtained; Determining the risk level of the previous face recognition video according to the previous feedback coefficient and the risk value; Obtaining the actual risk level of the previous face recognition video, and determining the current feedback coefficient corresponding to each background feature according to the risk level of the previous face recognition video and the actual risk level; Based on the current feedback coefficient corresponding to each background feature, the previous dynamic calculation strategy is adjusted to obtain a current dynamic calculation strategy.
7. The method according to claim 6, characterized in that The step of determining the current feedback coefficient corresponding to each background feature according to the risk level of the previous face recognition video and the actual risk level includes: Obtaining a feedback coefficient determination file; the feedback coefficient determination file includes a mapping relationship between a plurality of preset risk levels and an actual risk level corresponding to each preset risk level, and a preset feedback coefficient corresponding to the mapping relationship; In the feedback coefficient determination file, determining a mapping relationship between the risk level of the previous face recognition video and the actual risk level, and obtaining a preset feedback coefficient corresponding to the mapping relationship; The preset feedback coefficient is determined as the current feedback coefficient corresponding to each background feature.
8. The method according to any one of claims 1 to 5, characterized in that: After determining whether the illumination state satisfies the natural light state at the current time, the method further includes: If so, the risk level of the target face recognition video is directly determined to be the lowest risk level.
9. The method according to any one of claims 1 to 5, characterized in that: After determining whether there is a background image with the most corresponding background features, the method further includes: If so, the background features contained in the background image with the most corresponding background features are determined as a background feature set, and the risk level of the target face recognition video is determined based on the background feature set.
10. The method according to any one of claims 1 to 5, characterized in that: After determining whether there is at least one background feature in the background feature set that is in the blacklist, the method further includes: If so, the risk level of the target face recognition video is directly determined to be the highest risk level.
11. A risk determination device, characterized in that: The device comprises: An acquisition module is used to acquire the target face recognition video; The acquisition module is further used to acquire at least one background image in the target face recognition video; A recognition module, used to recognize the lighting state corresponding to each background image; A judging module, used to judge whether the lighting state satisfies the natural light state at the current time; An extraction module, for extracting background features corresponding to each background image if no; The judging module is further used to judge whether there is a background picture with the most corresponding background features, and if not, the background features corresponding to each background picture are determined as a background feature set; The judging module is further used to judge whether there is at least one background feature in the background feature set that is in the blacklist; an input module, for inputting the background feature set into a reinforcement learning model if no; A calculation module, used to calculate the risk coefficient corresponding to the background feature set according to the current dynamic calculation strategy using the reinforcement learning model; A determination module is used to determine the risk level of the target face recognition video based on the risk coefficient; the current dynamic calculation strategy is determined based on the risk level of the previous face recognition video and the actual risk level.
12. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 10 when executed by a processor.
14. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 10 when being executed by a processor.
Citation Information
Cited By
Weak feature background visual risk control method based on image deep analysis
CN119785048A
Weak Feature Background Visual Risk Control Method and System Based on Image Depth Analysis
CN119785048B