Risk processing method, device, system and equipment and storage medium
Through the Gaussian hybrid model, the detection images of security check points are analyzed and prohibited objects are detected, and the risk attributes are calculated, which solves the problem of inflexible and targeted allocation of security resources in the existing technology, and the accurate assessment of the risk situation of each security check point is achieved. and rational allocation of resources.
Patent Information
- Application Number
- CN202411501998.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-14
AI Technical Summary
When allocating security resources in the prior art, the lack of accurate assessment of the risks of each security checkpoint is achieved, resulting in insufficient flexibility and targeted resource allocation, making it difficult to adapt to complex and changeable actual situations.
By obtaining the detection images within the target time range of the security check point, using the Gaussian mixed model for flow analysis and prohibited object detection, combining the flow analysis results, prohibited object detection results and target time range, the risk attributes of the security check point are calculated to determine the appropriate Security resource allocation.
It has achieved accurate assessment of the risks of each security checkpoint, improved the flexibility and pertinence of security resource allocation, and can more effectively respond to complex and changeable actual situations and ensure public safety.
Smart Images

Figure CN119445481A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a risk management method, device, system, equipment and storage medium. Background Art
[0002] In the field of public security, especially when organizing large-scale events or managing public places, the rational allocation of security resources is the key to ensuring the safety of the public domain.
[0003] In the related art, the risk situation of each security checkpoint can be determined, and the allocation of security resources can be achieved according to the determined risk situation. Therefore, it can be understood that when allocating security resources, accurately determining the risk situation of each security checkpoint is of great significance for the reasonable allocation of security resources. Summary of the invention
[0004] The embodiments of the present application provide a risk management method, apparatus, system, device and storage medium, which can accurately determine the risk situation of each security checkpoint.
[0005] In a first aspect, an embodiment of the present application provides a risk management method, comprising: obtaining a first detection image corresponding to a first detection object within a target time range in a security checkpoint; performing a flow analysis of the first detection object on the first detection image using a Gaussian mixture model to obtain a flow analysis result; performing a prohibited object detection on a second detection object within the target time range in the security checkpoint to obtain a prohibited object detection result; and calculating the risk attributes of the security checkpoint based on the flow analysis result, the prohibited object detection result, and the target time range.
[0006] In one implementation, the risk attribute of the security checkpoint is calculated based on the flow analysis results, the prohibited object detection results, and the target time range, including:
[0007] The risk attributes of the security checkpoint are calculated based on the traffic analysis results, prohibited object detection results, target time range and their corresponding weights.
[0008] In one embodiment, before using a Gaussian mixture model to perform flow analysis on a first detection image for a first detection object and obtaining a flow analysis result, the method also includes: using a background subtraction method to distinguish between foreground and background of the first detection image to obtain foreground data corresponding to the first detection image; using a Gaussian mixture model to perform flow analysis on the first detection image for the first detection object to obtain a flow analysis result, including: using a Gaussian mixture model to perform flow analysis on foreground data to obtain a flow analysis result.
[0009] In one embodiment, before using a Gaussian mixture model to perform flow analysis on a first detection object on a first detection image and obtaining a flow analysis result, the method further includes: obtaining a training sample set, the training sample set including multiple training samples; inputting the training samples into a preset Gaussian mixture model, and using the preset Gaussian mixture model to perform flow probability calculation on the training samples to obtain flow probability values corresponding to each training sample; using the flow probability values corresponding to each training sample, calculating the function value of a log-likelihood function of the preset Gaussian mixture model; when it is determined that the function value of the log-likelihood function is greater than a preset threshold, adjusting the parameters in the preset Gaussian mixture model, and returning to the step of inputting the training samples into the preset Gaussian mixture model, and using the preset Gaussian mixture model to perform flow probability calculation on the training samples to obtain flow probability values corresponding to each training sample, until a preset stop condition is met to obtain a trained Gaussian mixture function.
[0010] In one implementation, the flow probability values corresponding to each training sample are used to calculate the function value of the log-likelihood function of a preset Gaussian mixture model, including: using the mixing coefficient to perform weighted summation on the flow density probability values corresponding to the training samples to obtain a target probability value; and performing a logarithmic operation on the target probability value to obtain the function value of the log-likelihood function.
[0011] In one embodiment, the risk attributes of a security checkpoint are calculated based on flow analysis results, prohibited object detection results, a target time range, and their respective corresponding weights, including: inputting the flow analysis results, prohibited object detection results, and the target time range into a risk prediction model to obtain the risk attributes predicted by the risk prediction model; wherein the risk prediction model is obtained by training a security risk sample set, wherein the security risk sample set includes: a plurality of security risk samples and their corresponding risk attribute labels, wherein the features corresponding to the security risk samples include at least one of the flow analysis result features, the prohibited object detection result features, and the target time range features, so that the risk prediction model determines the weight corresponding to any one of the flow analysis result features, the prohibited object detection result features, and the target time range features during the training process to predict the risk attributes.
[0012] In one embodiment, after calculating the risk attribute of the security checkpoint according to the flow analysis results, the prohibited object detection results and the target time range, the method further includes: determining the security resources allocated to the security checkpoint based on the risk attribute.
[0013] In one implementation, allocating security resources to security checkpoints based on risk attributes includes: determining geographic location information of the security checkpoints and candidate security resources; and allocating security resources to the security checkpoints based on the geographic location information of the security checkpoints and candidate security resources and the risk attributes of the security checkpoints.
[0014] In one embodiment, the method further includes: displaying security check information on a display device, where the security check information is generated based on at least one of a human flow analysis result, a prohibited object detection result, and security resources allocated to the security check point.
[0015] In one embodiment, after determining the security resources to be allocated to the security checkpoint based on the risk attributes, the method further includes: sending a dispatch instruction to an electronic device related to the security resource so that the security resource is dispatched to the security checkpoint.
[0016] In the second aspect, an embodiment of the present application provides a risk management device, which includes: an acquisition module, used to acquire a first detection image corresponding to a first detection object within a target time range in a security checkpoint; an analysis module, used to perform a flow analysis of the first detection object on the first detection image using a Gaussian mixture model, and obtain a flow analysis result; a detection module, used to perform a prohibited object detection on a second detection object within the target time range in the security checkpoint, and obtain a prohibited object detection result; and a calculation module, used to calculate the risk attributes of the security checkpoint based on the flow analysis result, the prohibited object detection result and the target time range.
[0017] In a third aspect, an embodiment of the present application provides a risk management system, the system comprising a data acquisition terminal and a security inspection server, the security inspection server being used to execute the risk management method in the first aspect or any one of the embodiments of the first aspect.
[0018] In a fourth aspect, an embodiment of the present application provides a risk management device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the risk management method in the first aspect or any one of the embodiments of the first aspect is implemented.
[0019] In a fifth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the risk management method in the first aspect or any one of the embodiments of the first aspect is implemented.
[0020] In a sixth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a risk management method such as the first aspect or any one of the embodiments of the first aspect.
[0021] The method, device, system, equipment and storage medium for allocating security resources in the embodiments of the present application, by obtaining the first detection image corresponding to the first detection object at the security checkpoint within the target time range, and inputting the image of the first detection object into the Gaussian mixture model, realizes the flow analysis of the first detection object, thereby obtaining accurate flow analysis results. In addition, the second detection object within the target time range in the security checkpoint can be detected for prohibited objects to obtain the prohibited object detection results. The flow analysis results, the prohibited object detection results and the target time range are further used to determine the risk attributes of the security checkpoint. It can be understood that in the embodiments of the present application, the flow analysis results, the prohibited object detection results and the detection time of the security checkpoint can be used to obtain the risk attributes that meet the actual conditions of each security checkpoint, which provides a strong basis for judging the actual conditions of each security checkpoint. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 A schematic diagram of a risk management method according to an embodiment of the present invention is shown;
[0024] Figure 2 A schematic diagram showing a flow chart of a risk handling method provided by another embodiment of the present application is shown;
[0025] Figure 3 A schematic diagram showing a flow chart of a risk handling method provided by another embodiment of the present application is shown;
[0026] Figure 4 A schematic diagram showing a flow chart of a risk handling method provided by another embodiment of the present application is shown;
[0027] Figure 5 A schematic diagram showing a flow chart of a risk handling method provided by another embodiment of the present application is shown;
[0028] Figure 6 A schematic diagram showing security inspection information provided by an embodiment of the present application is shown;
[0029] Figure 7 It is a flowchart of a Gaussian mixture model training method provided by an embodiment of the present application;
[0030] Figure 8 is a schematic diagram of the structure of a risk management device provided by another embodiment of the present application;
[0031] Fig. 9A schematic diagram of the architecture of the risk management system provided in an embodiment of the present application is shown;
[0032] Fig.10 It is a structural schematic diagram of a risk management device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0033] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0034] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0035] In the field of public safety, security resources are the key to maintaining safety and order in public places. Appropriate security resources can be allocated at various security checkpoints to ensure the safety of public places.
[0036] In the related technology, the risk situation of each security checkpoint can be determined, and security resources can be allocated according to the determined risk situation. However, the traditional way of determining risk levels relies heavily on past experience accumulation, which is often based on an idealized and relatively static assumption and lacks sufficient flexibility and pertinence. Therefore, the traditional risk handling process is not suitable for complex and changeable actual situations, and is not conducive to maintaining public safety and order.
[0037] In order to solve the problems of the prior art, the embodiments of the present application provide a risk management method, device, equipment and computer storage medium. The risk management method provided by the embodiments of the present application is first introduced below.
[0038] Figure 1 FIG. 1 is a flow chart showing a risk management method provided by an embodiment of the present application. Figure 1 As shown, the risk treatment method includes the following steps:
[0039] S110: Acquire a first detection image corresponding to a first detection object within a target time range at a security checkpoint.
[0040] Exemplarily, the security checkpoint may be one or more security checkpoints pre-set in a security area, wherein the security area may be an area where order maintenance or security protection is required.
[0041] In one example, the security area may be an area including some public facilities, for example, the security area may be an area including facilities such as schools, hospitals and subways.
[0042] In another example, the security area may be an area where various large-scale events are held, such as an area where concerts are held.
[0043] Exemplarily, the first detection object may be a crowd, and the first detection image may be an image of the acquired crowd. Among them, the first detection image of the first detection object may be acquired by an image acquisition device. For example, the image information of the crowd in each detection point may be acquired by a camera. It is understandable that the above-mentioned first detection object being a crowd and the first detection image being a crowd image are only used for exemplary explanation, and the first detection object may also be a vehicle, a robot, etc., and the corresponding first detection image may be a vehicle image, a robot image, etc., which is not limited in the embodiments of the present disclosure. Exemplarily, the target time range may be a time period pre-set by a technician. Among them, the target time range may be a time period determined by a technician from a plurality of pre-set time periods based on the actual environment. For example, the target time range may be 10 minutes. That is, the image acquisition device may acquire the first detection image in a cycle of 10 minutes.
[0044] S120 , using a Gaussian mixture model to perform flow analysis of the first detection object on the first detection image to obtain a flow analysis result.
[0045] Exemplarily, the first detection image may be input into a Gaussian Mixture Model (GMM), so that the Gaussian Mixture Model performs flow analysis of the first detection object on the first detection image to obtain a flow analysis result.
[0046] In one example, when the first detection object is a person and the first detection image is an image of a crowd, the flow of people in the image of the crowd can be analyzed by a Gaussian mixture model to obtain an analysis result of the flow of people.
[0047] S130: Perform a prohibited object detection on the second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result.
[0048] Exemplarily, the second detection object may be luggage or a parcel carried by a person. The luggage or parcel carried by a person may be detected for prohibited items.
[0049] In one example, the second detection object may be scanned to obtain a scan result, and further, the scan result may be image recognized to determine the prohibited items in the second detection object. For example, a scanned image may be obtained by an X-ray scanner. The scan result may be obtained by image preprocessing technology and edge computing and other technologies. Furthermore, the prohibited items in the second detection object may be determined by intelligent recognition technology of artificial intelligence (AI).
[0050] In yet another example, prohibited items may be detected through animals, such as dogs.
[0051] It can be understood that the camera, X-ray scanner, etc. involved in the embodiments of the present application are only used for illustrative purposes, and the acquisition of the first detection image and the detection of prohibited objects can also be achieved by other means. This is not limited in the embodiments of the present application.
[0052] S140. Calculate the risk attribute of the security checkpoint according to the flow analysis results, the prohibited object detection results and the target time range.
[0053] For example, the risk attribute of the security checkpoint may be calculated based on the obtained flow analysis results, the prohibited object detection results and the target time range, wherein the risk attribute of the security checkpoint may at least include information such as risk level and risk type.
[0054] In the embodiment of the present application, by obtaining the first detection image corresponding to the first detection object at the security checkpoint within the target time range, and inputting the image of the first detection object into the Gaussian mixture model, the flow analysis of the first detection object is realized, thereby obtaining accurate flow analysis results. In addition, the second detection object within the target time range in the security checkpoint can be detected for prohibited objects to obtain prohibited object detection results. The flow analysis results, prohibited object detection results and target time range are further used to determine the risk level of the security checkpoint, and the security resources of the security checkpoint are determined accordingly. It can be understood that in the embodiment of the present application, the flow analysis results, prohibited object detection results and detection time of the security checkpoint can be used to obtain risk attributes that meet the actual situation of each security checkpoint, which provides a strong basis for judging the actual situation of each security checkpoint.
[0055] In order to ensure that the risk attributes of the security checkpoint are consistent with the actual situation of the security checkpoint, as another implementation method of the present application, the present application also provides another implementation method of the risk handling method, please refer to the following embodiments for details.
[0056] Figure 2 A flow chart of a risk management method provided in another embodiment of the present application is shown.
[0057] like Figure 2 As shown, the risk treatment method includes the following steps:
[0058] S210: Acquire a first detection image corresponding to a first detection object within a target time range at a security checkpoint.
[0059] S220 , using a Gaussian mixture model to perform flow analysis of the first detection object on the first detection image to obtain a flow analysis result.
[0060] S230: Perform a prohibited object detection on the second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result.
[0061] S240. Calculate the risk attribute of the security checkpoint according to the flow analysis results, the prohibited object detection results, the target time range, and their corresponding weights.
[0062] Among them, steps S210-S230 are consistent with steps S110-S130.
[0063] In some embodiments, in S240, the flow analysis results, the prohibited object detection results, and the target time range may be calculated according to their respective corresponding weights to obtain the risk attributes of the security checkpoint.
[0064] For example, the weights corresponding to the flow analysis results, the prohibited object detection results, and the target time range can represent the impact of the flow analysis results, the prohibited object detection results, and the target time range on the risk attribute. In one example, the weights corresponding to the flow analysis results, the prohibited object detection results, and the target time range can be set by a technician based on experience.
[0065] In some optional embodiments, the flow analysis results, the prohibited object detection results, and the target time range can be input into the risk prediction model to obtain the risk attributes predicted by the risk prediction model. The risk prediction model is obtained by training the security inspection risk sample set. The security inspection risk sample set includes: a plurality of security inspection risk samples and their corresponding risk attribute labels, and the features corresponding to the security inspection risk samples at least include any one of the flow analysis result features, the prohibited object detection result features, and the target time range features, so that the risk prediction model determines the weight corresponding to any one of the flow analysis result features, the prohibited object detection result features, and the target time range features during the training process to predict the risk attributes.
[0066] Exemplarily, the risk prediction model can be obtained by training a random forest model. When training the random forest model, a case risk sample set can be obtained first. Among them, the multiple risk samples contained in the case risk sample can be composed of various security event data. Moreover, after feature extraction (including labeling, classification and grading, etc.) of these security event data, at least one of the three features of traffic analysis result feature, contraband detection result feature and target time range feature is extracted. It can be understood that in addition to the above features, features such as attack mode and affected system range can also be extracted.
[0067] Furthermore, the feature information extracted from the above case risk samples is input into the Random Forest model. The Random Forest algorithm completes the model training through self-service sampling, building decision trees, and integrated prediction. Among them, the mathematical description of the random forest involves the construction process of the decision tree, including feature selection, node splitting criteria (such as Gini impurity, information gain, etc.), and the final integrated prediction. During the training process, advanced algorithms such as backpropagation and gradient descent can be used to automatically adjust the model weights. At the same time, by adjusting the number and depth of trees in the random forest, integrated learning is performed to optimize the weight distribution. In addition, during the training process, techniques such as cross-validation can be used to evaluate the generalization ability of the model, which can ensure that the model not only performs well on the training data, but also remains accurate on unseen data.
[0068] Furthermore, to evaluate the performance of the model, an independent validation set can be used, and the prediction effect of the model can be finally verified through the test data set. After determining that the model has been fully trained and verified, the trained random forest model can be deployed to the actual operating environment and its performance can be continuously monitored. Based on new data feedback, technicians can adjust the model in a timely manner to maintain the accuracy and efficiency of its predictions, thereby ensuring that the training data of the model is comprehensive and representative, and that the selection and configuration of the model can flexibly adapt to the changing security risks.
[0069] In an embodiment of the present application, the risk prediction model can be used to determine the weights corresponding to the flow analysis results, contraband detection results, and target time range, which can characterize the impact of the flow analysis results, contraband detection results, and target time range on the risk attributes, and then determine the corresponding weights, so that the risk attributes can be calculated more accurately.
[0070] Exemplarily, after determining the weights corresponding to the flow analysis results, the prohibited object detection results, and the target time range, the risk attribute of the security checkpoint can be calculated.
[0071] In one example, the risk attribute of the security checkpoint can be determined by weighted average calculation. For example, the following formula (1) can be used to calculate the weighted average of the weights corresponding to the flow analysis results, the prohibited object detection results, and the target time range to obtain the risk attribute K of the security checkpoint:
[0072] K=w1*p1+ w2*p2+ w3*p3 (1)
[0073] Among them, p1 can represent the traffic analysis result, and w1 can be the weight corresponding to the traffic analysis result; p12 can represent the prohibited object detection result, and w2 can be the weight corresponding to the prohibited object detection result; p3 can represent the target time range, and w3 can be the weight corresponding to the target time range.
[0074] In the embodiment of the present application, the risk attributes of the security checkpoint can be calculated based on the flow analysis results, the prohibited items detection results, the target time range and their corresponding weights, so that the risk attributes determined in this way can be more in line with the actual situation.
[0075] It is understandable that accurately determining the flow conditions of each security checkpoint is of great significance for accurately determining the risk attributes of the security checkpoint. Therefore, in order to improve the accuracy of the flow analysis results, as another implementation of the present application, the present application also provides another implementation of the risk processing method, which is specifically referred to in the following embodiments.
[0076] Figure 3 A flow chart of a risk management method provided in yet another embodiment of the present application is shown.
[0077] like Figure 3 As shown, the risk treatment method includes the following steps:
[0078] S310: Acquire a first detection image corresponding to a first detection object within a target time range at a security checkpoint.
[0079] S320: Use a background subtraction method to distinguish the foreground and background of the first detection image to obtain foreground data corresponding to the first detection image.
[0080] S330. Perform flow analysis on the foreground data using a Gaussian mixture model to obtain a flow analysis result.
[0081] S340: Perform a prohibited object detection on the second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result.
[0082] S350: Calculate the risk attribute of the security checkpoint according to the flow analysis results, the prohibited object detection results and the target time range.
[0083] Among them, step S310 is consistent with step S110, and steps S340-S350 are consistent with steps S130-S140, which will not be described in detail here.
[0084] In some embodiments, in S320, a background subtraction method may be used to distinguish the foreground and background of the first detection image to obtain foreground data corresponding to the first detection image.
[0085] For example, when the first detection image is an image of a crowd, the foreground may refer to the crowd, and the background may refer to the part other than the crowd. The crowd and the background in the crowd image may be distinguished by a background subtraction method to obtain data corresponding to the crowd.
[0086] In one example, the background subtraction method can obtain the moving area of the foreground target by subtracting two or more consecutive frames of images. In another example, the background subtraction method can collect a certain number of image frames in the initialization phase and calculate the average intensity value of each pixel as a background model. Subsequent image frames are subtracted from the background model to obtain the foreground target. It can be understood that the background subtraction method involved in the above embodiments is only used for adaptive description, and the method for background removal is not limited in the embodiments of the present application.
[0087] In some embodiments, in S330, the foreground data may be input into a Gaussian mixture model, and the Gaussian mixture model may be used to perform flow analysis on the foreground data to obtain a flow analysis result.
[0088] For example, when the foreground data is data corresponding to a crowd, the Gaussian mixture model can perform flow analysis on the data corresponding to the crowd to obtain the flow of people. For example, the Gaussian mixture model can determine that the flow of people is 100.
[0089] In an embodiment of the present application, the background in the first detection image is removed by a background removal method, thereby avoiding the problem of the Gaussian mixture model determining some factors in the background as the first detection object when performing traffic analysis, thereby improving the accuracy of the traffic analysis results determined by the Gaussian mixture model.
[0090] Exemplarily, after determining the risk attributes of each security checkpoint, security resources can be allocated according to the risk attributes of each security checkpoint. As another implementation method of the present application, the present application also provides another implementation method of the risk management method. Please refer to the following embodiments for details.
[0091] Figure 4 A flow chart of a risk management method provided in yet another embodiment of the present application is shown.
[0092] like Figure 4 As shown, the risk treatment method includes the following steps:
[0093] S410: Acquire a first detection image corresponding to a first detection object within a target time range at a security checkpoint.
[0094] S420 , using a Gaussian mixture model to perform flow analysis of the first detection object on the first detection image to obtain a flow analysis result.
[0095] S430: Perform a prohibited object detection on the second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result.
[0096] S440: Calculate the risk attribute of the security checkpoint according to the flow analysis result, the prohibited object detection result and the target time range.
[0097] S450. Determine security resources to be allocated to the security checkpoint based on risk attributes.
[0098] Among them, steps S410-S440 are consistent with steps S110-S140, and will not be described in detail here.
[0099] For example, corresponding security resources may be allocated to the security checkpoints according to the risk attributes corresponding to the security checkpoints. In one example, the risk attributes of multiple security checkpoints may be determined at the same time, and the security resources of each security checkpoint may be comprehensively allocated based on the risk attributes of the multiple security checkpoints.
[0100] For example, security resources can be used to maintain security and order in public areas. For example, security resources can include security personnel, monitoring equipment, and alarm systems. It is understandable that allocating security resources to each security checkpoint can determine the type of security personnel, security equipment, and other resources required for each security check.
[0101] In the embodiment of the present application, the security resources allocated based on the risk attributes of the security checkpoint are allocated using the traffic analysis results, prohibited object detection results and detection time of the security checkpoint. This ensures that the security resources allocated to the security checkpoint can meet the actual environmental requirements and improves the rationality of security resource allocation.
[0102] Furthermore, in order to ensure the timeliness of security resource allocation, as another implementation method of the present application, the present application also provides another implementation method of the risk management method, please refer to the following embodiments for details.
[0103] Figure 5 A flow chart of a risk management method provided in yet another embodiment of the present application is shown.
[0104] like Figure 5 As shown, the risk treatment method includes the following steps:
[0105] S510: Acquire a first detection image corresponding to a first detection object within a target time range at a security checkpoint.
[0106] S520 , using a Gaussian mixture model to perform flow analysis of the first detection object on the first detection image to obtain a flow analysis result.
[0107] S530: Perform a prohibited object detection on the second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result.
[0108] S540: Calculate the risk attribute of the security checkpoint according to the flow analysis result, the prohibited object detection result and the target time range.
[0109] S550: Determine the geographical location information of the security checkpoint and the geographical location information of the candidate security resources.
[0110] S560: Determine the security resources to be allocated to the security checkpoint according to the geographical location information of the security checkpoint, the geographical location information of the candidate security resources, and the risk attributes of the security checkpoint.
[0111] Among them, steps S510-S540 are consistent with steps S110-S140, and will not be described in detail here.
[0112] In some embodiments, in S550 , geographic location information of one or more security checkpoints in the security area and geographic location information of candidate security resources may be determined.
[0113] For example, the geographic location information can be used to describe the geographic locations of the security checkpoints and the candidate security resources in the security area. In addition, the geographic location information can also be used to describe the spatial relationship between each security checkpoint and the candidate security resource.
[0114] In one example, geographic information of one or more security checkpoints and geographic information of candidate security resources may be determined through a geographic information system (GIS).
[0115] Exemplarily, the candidate security resource may be a security resource to be allocated.
[0116] In some embodiments, in S560, the security resources allocated to the security checkpoint may be determined based on the geographical location information of the security checkpoint, the geographical location information of the candidate security resources, and the risk attributes of the security checkpoint.
[0117] For example, the movement mode of the candidate security resources can be determined by the geographical location information of the security checkpoint and the geographical location information of the candidate security resources, and the type and quantity of security resources required for each security checkpoint can be determined by the risk attributes of the security checkpoint.
[0118] In one example, the distance information between the candidate security resources and each security checkpoint can be obtained, and the security resources allocated to the security checkpoint can be determined based on the distance information and the risk attributes of each security checkpoint. For example, security checkpoint A includes security personnel 1, and security checkpoint B includes security personnel 2 and security personnel 3. When it is determined through the risk attributes that a security personnel needs to be added to security checkpoint C, the distances of security personnel 1, 2, and 3 from security checkpoint C can be obtained, and the security personnel with the smallest distance from security checkpoint C (for example, security personnel 3) is selected to move to security checkpoint C.
[0119] In the embodiment of the present application, risk processing is performed through the geographical location information of the security checkpoints and the geographical location information of the candidate security resources, combined with the risk attributes of the security checkpoints. This makes it possible to allocate security resources nearby according to the security resource requirements of each security checkpoint and the location of the candidate security resources, thereby ensuring that the security resources can reach the corresponding security checkpoint in a shorter time and ensuring the timeliness of security resource allocation.
[0120] In some optional embodiments, security check information may be displayed on a display device, wherein the security check information is generated based on at least one of a result of a human flow analysis, a result of a prohibited object detection, and security resources allocated to a security checkpoint.
[0121] In one example, the display device may display security information generated based on any one of the following information: human flow analysis results, prohibited object detection results, and security resources allocated to the security checkpoint.
[0122] In one example, the display device may display security information generated from multiple information including human flow analysis results, prohibited object detection results, and security resources allocated to the security checkpoint.
[0123] Exemplarily, the display device may display security inspection information in a variety of forms.
[0124] In one example, Figure 6 A schematic diagram of security inspection information provided by an embodiment of the present application is shown. Figure 6As shown, in the display device, a map of the entire security area can be displayed, and distribution information of security checkpoints can be displayed in the security area, including security checkpoint A, security checkpoint B, etc. In addition, distribution information of security resources can also be displayed, wherein the security resources can be security personnel, including security personnel 1, security personnel 2, etc.
[0125] In another example, different colors can be used to display different traffic conditions and the number of prohibited items at each security checkpoint. For example, when the traffic is greater than 100, a red dot is marked near the security checkpoint, and when the number of prohibited items exceeds 20, a green box is marked near the security checkpoint. Various security resources are marked on the map, and different security resources can be represented by different patterns, so that the overall situation of the security area can be intuitively displayed.
[0126] In another example, the display device may display the results of the human flow analysis, prohibited items information, and security resource allocation corresponding to one or more security checkpoints in the form of a report. For example, the number of human flows, the number of prohibited items, and the security resources deployed at each security checkpoint, including the types and number of security personnel, security vehicles, and other information, may be displayed in the report.
[0127] In the embodiment of the present application, by displaying the results of human flow analysis, prohibited items information and security resources on the display device, the overall situation of the security area can be intuitively displayed, providing convenience for technical personnel to monitor the status of the security area.
[0128] In some optional embodiments, after determining the security resources allocated to the security checkpoint, a dispatch instruction can be sent to the electronic device corresponding to the security resource, so that the security resource is dispatched to the security checkpoint. It can be understood that the determination of the security resources for each security checkpoint can be determined in real time based on the actual environment, which means that the dispatch of security resources is also dynamically adjusted according to real-time data. This method of dispatching security resources significantly improves the response speed and operational efficiency of the security system, ensuring that the necessary security resources can be quickly deployed in an emergency, thereby effectively maintaining public safety.
[0129] Furthermore, in the risk handling method provided in the embodiment of the present application, it is necessary to use a Gaussian mixture model to perform flow analysis of the first detection object on the first detection image, so as to obtain a flow analysis result. Therefore, the specific implementation method of the training method of the Gaussian mixture model provided in the embodiment of the present application described below in conjunction with the accompanying drawings.
[0130] like Figure 7 As shown, Figure 7 : is a flow chart of a Gaussian mixture model training method provided by an embodiment of the present application, and the Gaussian mixture model training method comprises the following steps:
[0131] S710: Obtain a training sample set, where the training sample set includes multiple training samples.
[0132] S720: Input the training samples into a preset Gaussian mixture model, use the preset Gaussian mixture model to calculate the probability of traffic flow on the training samples, and obtain the traffic flow probability value corresponding to each training sample.
[0133] S730. Calculate the function value of the log-likelihood function of the preset Gaussian mixture model using the traffic probability value corresponding to each training sample.
[0134] S740, determine whether the function value of the log-likelihood function is less than a preset threshold, if so, execute S750; if not, end the training and obtain a trained Gaussian mixture model.
[0135] S750: Adjust parameters in the preset Gaussian mixture model.
[0136] In some embodiments, in step S710, the training samples in the training sample set may be sample data used to train a Gaussian mixture model.
[0137] In one example, the training sample may be feature information obtained by extracting features from image information. In another example, the training sample may be feature information obtained by extracting features from foreground data in image information. The features extracted by the feature extraction technology may include position features, speed features, and the like.
[0138] In some embodiments, in step S720, the training samples can be input into a preset Gaussian mixture model, and the preset Gaussian mixture model can be used to calculate the probability of flow for the training samples to obtain the flow probability value P(x i |θ), where x i represents the i-th data point, and θ represents the model parameters.
[0139] For example, a preset Gaussian mixture model can be modeled by the extracted features. In the preset Gaussian mixture model, each Gaussian component can represent a potential motion pattern or flow distribution. By learning these components, tasks such as density estimation and clustering of the Gaussian mixture model can be achieved.
[0140] Furthermore, in the embodiment of the present application, the expectation-maximization (EM) algorithm can be used for parameter estimation. The EM algorithm includes the following steps: first, initialization is performed to determine the initial parameter values, including the mean μ of each Gaussian distribution. k , variance Σk and mixing coefficient π kThe second step can be the expectation step, i.e., the E step. In the E step, the posterior probability of each data point belonging to each Gaussian distribution can be calculated by the following formula (2) and formula (3):
[0141]
[0142] The variables γ(znk) are often called responsibilities, which describe the responsibilities of each component for each observation, i.e., data point. These parameters can serve as proxies for missing information about the latent variables. n represents the data point, μ is the mean, Σ is the covariance matrix, and D is the data dimension.
[0143] In which, each data point x i The probability P(x i |θ) can be expressed as the weighted sum of all Gaussian components, that is, it can be expressed by the following formula (4):
[0144]
[0145] Among them, x i represents the i-th data point, πk is the mixing coefficient of the k-th Gaussian component, N(x i |μ k ,Σk) is the data point x i Probability density function under the kth Gaussian component.
[0146] In some embodiments, in S730, the function value of the log-likelihood function of the preset Gaussian mixture model may be calculated using the traffic probability value corresponding to each training sample.
[0147] In some optional embodiments, the target probability value can be obtained by weighted summing the flow density probability values corresponding to the training samples using a mixing coefficient; and the function value of the log-likelihood function can be obtained by performing a logarithmic operation on the target probability value.
[0148] Exemplarily, the function value logL((θ|X)) of the log-likelihood function of the preset Gaussian mixture model can be calculated by the following formula (5):
[0149]
[0150] Among them, P(x i |θ) data point x i The probability of; log() represents the logarithmic operation, ∑() represents the summation operation. Further, formula (4), the function value of the log-likelihood function logL((θ|X)) can also be expressed by the following formula (6):
[0151]
[0152] In the embodiments of the present application, in order to directly maximize the likelihood function, its logarithmic form, that is, the logarithmic likelihood function, is usually taken, which makes it easier to maximize the likelihood function.
[0153] In some embodiments, in S740, it can be determined whether the function value of the log-likelihood function is less than a preset threshold, and if so, step S750 is executed, that is, adjusting the parameters in the preset Gaussian mixture model. If not, it is determined that the model training is completed.
[0154] Among them, the preset threshold is usually set by technicians based on the trade-off between algorithm convergence speed and accuracy.
[0155] Exemplarily, after the log-likelihood function is calculated, the maximization step in the EM algorithm, i.e., the M step, can be performed. It can be understood that the M step can be used to determine whether the function value of the log-likelihood function meets the preset threshold. If it does not meet the threshold, the E step and the M step can be repeated to continuously update the model parameters so that the model can better fit the data distribution.
[0156] Exemplarily, updating the parameters in the model may include updating the mean μ k , variance Σk and mixing coefficient π k , where the updating method of each parameter is calculated by the following formulas (7), (8) and (9).
[0157]
[0158] Among them, T represents transpose, and other symbols have been expressed in the above formulas and will not be repeated here.
[0159] In an embodiment of the present application, the training samples in the training sample set can be input into a preset Gaussian mixture model, and the preset Gaussian mixture model can be used to calculate the probability of flow for the training samples, thereby obtaining the flow probability value corresponding to each training sample. And the function value of the log-likelihood function of the preset Gaussian mixture model is calculated using the flow probability value corresponding to each training sample. When it is determined that the function value of the log-likelihood function is greater than the preset threshold, the parameters in the preset Gaussian mixture model are adjusted, and the step of inputting the training samples into the preset Gaussian mixture model is returned, and the flow probability of the training samples is calculated using the preset Gaussian mixture model to obtain the flow probability value corresponding to each training sample, until the preset stop condition is met. In this way, the training of the Gaussian mixture model is realized, and an efficient and accurate flow calculation system is obtained, providing a powerful analysis tool for the field of video surveillance.
[0160] Based on the risk handling method provided in the above embodiment, the present application also provides a specific implementation of the risk handling device. Please refer to the following embodiment.
[0161] See first Figure 8 The risk management device 800 provided in the embodiment of the present application includes the following modules:
[0162] An acquisition module 801 is used to acquire a first detection image corresponding to a first detection object within a target time range in a security checkpoint;
[0163] An analysis module 802 is used to perform flow analysis of a first detection object on the first detection image using a Gaussian mixture model to obtain a flow analysis result;
[0164] A detection module 803 is used to perform a prohibited object detection on a second detection object within a target time range at a security checkpoint to obtain a prohibited object detection result;
[0165] The calculation module 804 is used to calculate the risk attribute of the security checkpoint according to the flow analysis results, the prohibited object detection results and the target time range.
[0166] The risk processing device in the embodiment of the present application obtains the first detection image corresponding to the first detection object within the target time range of the security checkpoint, and inputs the image of the first detection object into the Gaussian mixture model to realize the flow analysis of the first detection object, thereby obtaining accurate flow analysis results. In addition, the second detection object within the target time range in the security checkpoint can be detected for prohibited objects to obtain the prohibited object detection results. The flow analysis results, the prohibited object detection results and the target time range are further used to determine the risk level of the security checkpoint, and the security resources of the security checkpoint are determined accordingly. It can be understood that in the embodiment of the present application, the flow analysis results, the prohibited object detection results and the detection time of the security checkpoint can be used to obtain the risk attributes that meet the actual situation of each security checkpoint, which provides a strong basis for judging the actual situation of each security checkpoint.
[0167] As an implementation method of the present application, in order to ensure that the risk attributes of the security checkpoint are consistent with the actual situation of the security checkpoint, the calculation module 804 calculates the risk attributes of the security checkpoint based on the flow analysis results, the prohibited object detection results and the target time range in the following manner: Calculate the risk attributes of the security checkpoint based on the flow analysis results, the prohibited object detection results, the target time range and their respective corresponding weights.
[0168] In one implementation, in order to improve the accuracy of the traffic analysis results, before using a Gaussian mixture model to perform traffic analysis on a first detection image of a first detection object to obtain the traffic analysis results, the analysis module 802 is also used to: use a background subtraction method to distinguish between the foreground and background of the first detection image to obtain foreground data corresponding to the first detection image; the analysis module 802 uses a Gaussian mixture model to perform traffic analysis on the first detection image of the first detection object to obtain the traffic analysis results in the following manner: use a Gaussian mixture model to perform traffic analysis on the foreground data to obtain the traffic analysis results.
[0169] In one embodiment, in order to achieve model training, before using a Gaussian mixture model to perform flow analysis on a first detection object on a first detection image and obtaining a flow analysis result, the device also includes a training unit for obtaining a training sample set, wherein the training sample set includes multiple training samples; inputting the training samples into a preset Gaussian mixture model, and using the preset Gaussian mixture model to perform flow probability calculation on the training samples to obtain flow probability values corresponding to each training sample; using the flow probability values corresponding to each training sample, calculating the function value of a log-likelihood function of the preset Gaussian mixture model; when it is determined that the function value of the log-likelihood function is greater than a preset threshold, adjusting the parameters in the preset Gaussian mixture model, and returning to the step of inputting the training samples into the preset Gaussian mixture model, and using the preset Gaussian mixture model to perform flow probability calculation on the training samples to obtain flow probability values corresponding to each training sample, until a preset stop condition is met to obtain a trained Gaussian mixture function.
[0170] In one embodiment, in order to ensure the maximization of the likelihood function, the training module uses the traffic probability values corresponding to each training sample in the following manner to calculate the function value of the log-likelihood function of the preset Gaussian mixture model: using the mixing coefficient, the traffic density probability values corresponding to the training samples are weighted summed to obtain the target probability value; by performing a logarithmic operation on the target probability value, the function value of the log-likelihood function is obtained.
[0171] In one embodiment, in order to determine the weights corresponding to the flow analysis results, the prohibited object detection results and the target time range, the calculation module 804 calculates the risk attributes of the security check point according to the flow analysis results, the prohibited object detection results, the target time range and the corresponding weights, in the following manner: the flow analysis results, the prohibited object detection results and the target time range are input into the risk prediction model to obtain the risk attributes predicted by the risk prediction model; wherein the risk prediction model is obtained by training a security risk sample set, wherein the security risk sample set includes: multiple security risk samples and their corresponding risk attribute labels, and the features corresponding to the security risk samples include at least one of the flow analysis result features, the prohibited object detection result features and the target time range features, so that the risk prediction model determines the weight corresponding to any one of the flow analysis result features, the prohibited object detection result features and the target time range features during the training process to predict the risk attributes.
[0172] In one embodiment, in order to implement security resource allocation, after the device calculates the risk attributes of the security checkpoint based on the traffic analysis results, the prohibited object detection results and the target time range, the device also includes an allocation module: for determining the security resources allocated to the security checkpoint based on the risk attributes.
[0173] In one implementation, in order to ensure the timeliness of security resource allocation, the allocation module allocates security resources to security checkpoints based on risk attributes in the following manner: determining the geographical location information of the security checkpoint and candidate security resources; and allocating security resources to the security checkpoint based on the geographical location information of the security checkpoint and candidate security resources and the risk attributes of the security checkpoint.
[0174] In one embodiment, the apparatus further includes a display module: used to display security information on a display device, where the security information is generated based on at least one of a human flow analysis result, a prohibited object detection result, and security resources allocated to the security checkpoint.
[0175] In one embodiment, in order to quickly deploy necessary security resources, after determining the security resources to be allocated to the security checkpoint based on risk attributes, the device also includes a sending module: used to send scheduling instructions to electronic devices related to the security resources, so that the security resources are scheduled to the security checkpoint.
[0176] Fig. 9 The schematic diagram of the architecture of the risk processing system 900 provided in the embodiment of the present application is shown. The risk processing system includes one or more data collection terminals 901 and a security inspection server 902. The security inspection server 902 is used to execute the risk processing method in any of the above examples.
[0177] Fig. 9 A schematic diagram of the hardware structure of risk management provided in an embodiment of the present application is shown.
[0178] The resource allocation device may include a processor 1001 and a memory 1002 storing computer program instructions.
[0179] Specifically, the processor 1001 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0180] The memory 1002 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1002 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory.
[0181] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0182] The processor 1001 implements any one of the risk handling methods in the above embodiments by reading and executing computer program instructions stored in the memory 1002 .
[0183] In one example, the risk processing device may further include a communication interface 1003 and a bus 1010. Fig.10 As shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected via a bus 1010 and communicate with each other.
[0184] The communication interface 1003 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0185] Bus 1010 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1010 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0186] The risk processing device can combine the flow analysis results, the prohibited object detection results and the target time range of the risk processing method in the embodiment of the present application to achieve Figure 1 and Figure 7 Describe the risk management methods and devices.
[0187] In addition, in combination with the risk handling method in the above embodiments, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the risk handling methods in the above embodiments is implemented.
[0188] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the risk management methods in the above embodiments when the computer program is executed by a processor.
[0189] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0190] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0191] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0192] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0193] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A risk management method, characterized in that: include: Acquire a first detection image corresponding to a first detection object within a target time range at a security checkpoint; Using a Gaussian mixture model to perform flow analysis of a first detection object on the first detection image to obtain a flow analysis result; Performing a prohibited object detection on a second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result; The risk attribute of the security checkpoint is calculated according to the flow analysis result, the prohibited object detection result and the target time range.
2. The method according to claim 1, characterized in that The calculating the risk attribute of the security checkpoint according to the flow analysis result, the prohibited object detection result and the target time range includes: The risk attribute of the security checkpoint is calculated according to the flow analysis result, the prohibited object detection result, the target time range and the corresponding weights.
3. The method according to claim 1, characterized in that Before performing flow analysis of the first detection object on the first detection image using the Gaussian mixture model to obtain a flow analysis result, the method further includes: Using a background subtraction method to distinguish the foreground and background of the first detection image, to obtain foreground data corresponding to the first detection image; The using of the Gaussian mixture model to perform flow analysis of the first detection object on the first detection image to obtain a flow analysis result includes: A Gaussian mixture model is used to perform flow analysis on the foreground data to obtain the flow analysis result.
4. The method according to claim 1, characterized in that Before performing flow analysis of the first detection object on the first detection image using the Gaussian mixture model to obtain a flow analysis result, the method further includes: Acquire a training sample set, wherein the training sample set includes a plurality of training samples; Input the training samples into a preset Gaussian mixture model, use the preset Gaussian mixture model to calculate the probability of flow for the training samples, and obtain a flow probability value corresponding to each training sample; Calculating the function value of the log-likelihood function of the preset Gaussian mixture model using the flow probability values corresponding to the training samples; When it is determined that the function value of the log-likelihood function is greater than a preset threshold, the parameters in the preset Gaussian mixture model are adjusted, and the training samples are returned to the preset Gaussian mixture model, and the preset Gaussian mixture model is used to calculate the probability of flow for the training samples to obtain the flow probability values corresponding to each training sample, until the preset stopping condition is met to obtain a trained Gaussian mixture function.
5. The method according to claim 4, characterized in that The calculating the function value of the log-likelihood function of the preset Gaussian mixture model by using the flow probability value corresponding to each training sample includes: Using the mixing coefficient, the flow density probability values corresponding to the training samples are weighted and summed to obtain the target probability value; The function value of the log-likelihood function is obtained by performing a logarithmic operation on the target probability value.
6. The method according to claim 2, characterized in that The calculating the risk attribute of the security checkpoint according to the flow analysis result, the prohibited object detection result, the target time range and the corresponding weights thereof includes: Inputting the flow analysis result, the prohibited object detection result and the target time range into a risk prediction model to obtain the risk attribute predicted by the risk prediction model; The risk prediction model is obtained by training a security risk sample set, wherein the security risk sample set includes: multiple security risk samples and their corresponding risk attribute labels, and the characteristics corresponding to the security risk samples include at least any one of the flow analysis result characteristics, the prohibited object detection result characteristics and the target time range characteristics, so that the risk prediction model determines the weight corresponding to any one of the flow analysis result characteristics, the prohibited object detection result characteristics and the target time range characteristics during the training process to predict the risk attribute.
7. The method according to claim 1, characterized in that After calculating the risk attribute of the security checkpoint according to the flow analysis result, the prohibited object detection result and the target time range, the method further includes: Based on the risk attributes, security resources allocated to the security checkpoint are determined.
8. The method according to claim 7, characterized in that The determining, based on the risk attribute, security resources allocated to the security checkpoint includes: Determining geographic location information of the security checkpoint and geographic location information of candidate security resources; The security resources allocated to the security checkpoint are determined according to the geographical location information of the security checkpoint, the geographical location information of the candidate security resources and the risk attribute of the security checkpoint.
9. The method according to claim 7, characterized in that: The method further comprises: Security check information is displayed on a display device, where the security check information is generated based on at least one of the traffic analysis result, the prohibited object detection result, and the security resources allocated to the security check point.
10. The method according to claim 7, characterized in that After determining the security resources to be allocated to the security checkpoint based on the risk attribute, the method further includes: A dispatch instruction is sent to the electronic device corresponding to the security resource, so that the security resource is dispatched to the security checkpoint.
11. A risk management device, characterized in that: The device comprises: An acquisition module, used to acquire a first detection image corresponding to a first detection object within a target time range in a security checkpoint; An analysis module, configured to perform flow analysis of a first detection object on the first detection image using a Gaussian mixture model to obtain a flow analysis result; A detection module, used to perform a prohibited object detection on a second detection object within the target time range at the security checkpoint to obtain a prohibited object detection result; A calculation module is used to calculate the risk attribute of the security checkpoint according to the flow analysis result, the prohibited object detection result and the target time range.
12. A risk management method system, characterized in that: The system includes a data collection terminal and a security inspection server, and the security inspection server is used to execute the risk handling method described in any one of claims 1-10.
13. A risk management device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the risk management method as described in any one of claims 1-10 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the risk handling method according to any one of claims 1 to 10 is implemented.
15. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the risk handling method as described in any one of claims 1-10.