Event warning method, device, equipment, storage medium and computer product

By obtaining the risk prediction model and dealing with the maximum difference in influencing factors, an automatic and accurate warning of campus stampede accidents is achieved, and the problems of high dependence and insufficient accuracy of manual monitoring in the existing technology are solved, and the prevention of stampede accidents is improved. Effect.

CN114492937BActive Publication Date: 2024-11-08ZHENGZHOU XUEAN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111631795.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-11-08
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The existing technology cannot automatically and accurately warn of stampede accidents in campuses, and relies on manual monitoring and is not very accurate, making it difficult to prevent stampede accidents.

Method used

By obtaining the risk prediction model, training based on multiple sets of specified data values, obtaining the maximum difference in influencing factors, processing the data value to input the model, predicting the probability of stampede event and providing early warning, using neural network model for training and prediction, realizing stampede event accurate warning.

Benefits of technology

Automatic and accurate warnings for stampede incidents are achieved, manual intervention is reduced, and the accuracy and reliability of the warnings are improved, which effectively prevents the occurrence of stampede accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114492937B_ABST
    Figure CN114492937B_ABST
Patent Text Reader

Abstract

The present application discloses an event warning method, device, equipment, storage medium and computer product, which belongs to the field of artificial intelligence technology. It includes: obtaining a risk prediction model; collecting data values ​​of multiple influencing factors from the second environment to obtain multiple first data values; processing multiple first data values ​​according to the difference between the maximum values ​​that multiple influencing factors can reach in the first environment and the maximum values ​​that can be reached in the second environment to obtain multiple second data values; inputting multiple second data values ​​into the risk prediction model to obtain the probability of the target event occurring in the second environment; and warning the target event according to the probability. In the present application, multiple second data values ​​can be applied to the input of the risk prediction model, so that the risk prediction model can accurately predict the probability of the target event occurring in the second environment when multiple second data values ​​are input, and the target event can be warned according to the probability, thereby effectively preventing the occurrence of the target event.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an event warning method, device, equipment, storage medium and computer product. Background Art

[0002] At present, stampede accidents frequently occur on campus, mainly when students go up and down the stairs. When there are a large number of students, they cannot see the situation ahead clearly when going up and down the stairs. Once a student falls, the students behind him will step on the fallen student, thus causing a stampede accident. Stampede accidents are very serious accidents in campus safety and will endanger the lives of students, so stampede accidents need to be prevented.

[0003] In the related technology, a camera can be installed at the stairwell to collect video. The monitoring personnel monitor the flow of people in the video screen. Once the monitoring personnel find that the flow of people is too large, the alarm will be sounded to warn of possible stampede accidents.

[0004] However, once this method is separated from human intervention, it is impossible to provide early warning of stampede accidents, and thus this method is highly dependent on human intervention. In addition, the manual monitoring method requires the monitoring personnel to subjectively judge whether a stampede accident will occur, and thus the accuracy is not high enough. Summary of the invention

[0005] The present application provides an event warning method, device, equipment, storage medium and computer product, which can accurately warn of target events and prevent the occurrence of target events. The technical solution is as follows:

[0006] In a first aspect, an event warning method is provided, the method comprising:

[0007] Obtain a risk prediction model, wherein the risk prediction model is used to predict the probability of occurrence of a target event, the target event has multiple influencing factors, the risk prediction model is trained based on multiple groups of specified data values, each group of specified data values ​​in the multiple groups of specified data values ​​is a data value of each of the multiple influencing factors collected from the first environment when the target event occurs in the first environment, or is a data value of each of the multiple influencing factors collected from the first environment when the target event does not occur in the first environment, and the first environment is an environment where the target event has occurred;

[0008] Obtaining a maximum value that each of the multiple influencing factors can reach in the first environment and a maximum value that each influencing factor can reach in a second environment, where the second environment is an environment where an early warning of the target event is required;

[0009] Collecting a data value of each of the multiple influencing factors from the second environment to obtain multiple first data values;

[0010] Processing each of the plurality of first data values ​​according to a difference between a maximum value that each of the plurality of influencing factors can reach in the first environment and a maximum value that each of the plurality of influencing factors can reach in the second environment to obtain a plurality of second data values;

[0011] Inputting the plurality of second data values ​​into the risk prediction model to obtain the probability of the target event occurring in the second environment;

[0012] An early warning of the target event is issued according to the probability of the target event occurring in the second environment.

[0013] In the present application, a risk prediction model that can be used to predict the probability of occurrence of a target event is obtained, and the risk prediction model is obtained by training based on multiple groups of specified data values ​​collected from the first environment, and each group of specified data values ​​in the multiple groups of specified data values ​​is the data value of each of the multiple influencing factors of the target event collected from the first environment when the target event occurs in the first environment or when the target event does not occur. After that, the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment are obtained, and the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment can be obtained, and then each of the multiple first data values ​​collected from the second environment is processed according to this difference to obtain multiple second data values, that is, the data values ​​when the multiple first data values ​​collected from the second environment are mapped to the first environment are obtained, and the multiple second data values ​​can be applied to the input of the risk prediction model, so that the risk prediction model can accurately predict the probability of the target event occurring in the second environment when the multiple second data values ​​are input, and then the target event can be warned according to the probability of the target event occurring in the second environment, so as to effectively prevent the occurrence of the target event.

[0014] Optionally, before obtaining the risk prediction model, the method further includes:

[0015] Acquire multiple training samples, each of the multiple training samples includes input data and sample labels, the input data in each training sample is a set of specified data values, and the sample label in each training sample is a target probability corresponding to the set of specified data values, and the target probability is the probability of the target event occurring; wherein, when the set of specified data values ​​is collected when the target event occurs in the first environment, the target probability corresponding to the set of specified data values ​​is greater than or equal to a first probability threshold; when the set of specified data values ​​is collected when the target event does not occur in the first environment, the target probability corresponding to the set of specified data values ​​is less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold;

[0016] The neural network model is trained using the multiple training samples to obtain the risk prediction model.

[0017] Optionally, the processing each of the multiple first data values ​​according to a difference between a maximum value that can be achieved by each of the multiple influencing factors in the first environment and a maximum value that can be achieved in the second environment to obtain a plurality of second data values ​​includes:

[0018] For each of the multiple influencing factors, divide the maximum value that can be achieved by the influencing factor in the first environment by the maximum value that can be achieved by the influencing factor in the second environment to obtain a target ratio corresponding to the influencing factor;

[0019] A target ratio corresponding to the one influencing factor is multiplied by a first data value of the one influencing factor to obtain a second data value of the one influencing factor.

[0020] Optionally, the method further comprises:

[0021] Within a preset time period after the risk prediction model is acquired and before the risk prediction model is used for prediction, or within each detection cycle after the risk prediction model is used for prediction, multiple groups of first target data values ​​are collected, each group of first target data values ​​in the multiple groups of first target data values ​​includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event occurs in the second environment, or includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event does not occur in the second environment;

[0022] The risk prediction model is trained according to the multiple groups of first target data values.

[0023] Optionally, the training the risk prediction model according to the multiple groups of first target data values ​​includes:

[0024] According to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that each influencing factor can reach in the second environment, each of the multiple groups of first target data values ​​is processed to obtain multiple groups of second target data values ​​corresponding to the multiple groups of first target data values ​​one by one;

[0025] For each group of the multiple groups of first target data values, if the group of first target data values ​​is collected when the target event occurs in the second environment, the target probability corresponding to the group of first target data values ​​is set to be greater than or equal to a first probability threshold, and the target probability is the probability of the occurrence of the target event; if the group of first target data values ​​is collected when the target event does not occur in the second environment, the target probability corresponding to the group of first target data values ​​is set to be less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold;

[0026] Using a group of second target data values ​​corresponding to the group of first target data values ​​as input data in a target sample, and using the target probabilities corresponding to the group of first target data values ​​as sample labels in the target sample, so as to obtain the target sample;

[0027] The risk prediction model is trained using the obtained multiple target samples.

[0028] Optionally, the target event is a stampede, and the multiple influencing factors include at least two of the number of people, ambient humidity, ambient illumination, floor, number of people walking against the flow, and crowd moving speed.

[0029] In a second aspect, an event warning device is provided, the device comprising:

[0030] A first acquisition module is used to acquire a risk prediction model, wherein the risk prediction model is used to predict the probability of occurrence of a target event, wherein the target event has multiple influencing factors, and wherein the risk prediction model is obtained by training based on multiple groups of specified data values, wherein each group of specified data values ​​in the multiple groups of specified data values ​​is a data value of each of the multiple influencing factors collected from the first environment when the target event occurs in the first environment, or is a data value of each of the multiple influencing factors collected from the first environment when the target event does not occur in the first environment, and the first environment is an environment where the target event has occurred;

[0031] A second acquisition module is used to obtain a maximum value that each of the multiple influencing factors can reach in the first environment and a maximum value that each influencing factor can reach in a second environment, where the second environment is an environment where an early warning of the target event is required;

[0032] A first collection module, configured to collect a data value of each of the plurality of influencing factors from the second environment to obtain a plurality of first data values;

[0033] a processing module, configured to process each of the plurality of first data values ​​according to a difference between a maximum value that can be achieved by each of the plurality of influencing factors in the first environment and a maximum value that can be achieved by each of the plurality of influencing factors in the second environment, so as to obtain a plurality of second data values;

[0034] An input module, used for inputting the plurality of second data values ​​into the risk prediction model to obtain the probability of the target event occurring in the second environment;

[0035] The early warning module is used to issue an early warning for the target event according to the probability of the target event occurring in the second environment.

[0036] Optionally, the device further comprises:

[0037] A third acquisition module is used to acquire multiple training samples, each of the multiple training samples includes input data and sample tags, the input data in each training sample is a set of specified data values, and the sample tag in each training sample is a target probability corresponding to the set of specified data values, and the target probability is the probability of the target event occurring; wherein, when the set of specified data values ​​is collected when the target event occurs in the first environment, the target probability corresponding to the set of specified data values ​​is greater than or equal to a first probability threshold; when the set of specified data values ​​is collected when the target event does not occur in the first environment, the target probability corresponding to the set of specified data values ​​is less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold;

[0038] The first training module is used to train the neural network model using the multiple training samples to obtain the risk prediction model.

[0039] Optionally, the processing module is used to:

[0040] For each of the multiple influencing factors, divide the maximum value that can be achieved by the influencing factor in the first environment by the maximum value that can be achieved by the influencing factor in the second environment to obtain a target ratio corresponding to the influencing factor;

[0041] A target ratio corresponding to the one influencing factor is multiplied by a first data value of the one influencing factor to obtain a second data value of the one influencing factor.

[0042] Optionally, the device further comprises:

[0043] A second acquisition module is used to collect multiple groups of first target data values ​​within a preset time period after the risk prediction model is acquired and before the risk prediction model is used for prediction, or within each detection cycle after the risk prediction model is used for prediction, each group of first target data values ​​in the multiple groups of first target data values ​​includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event occurs in the second environment, or includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event does not occur in the second environment;

[0044] The second training module is used to train the risk prediction model according to the multiple groups of first target data values.

[0045] Optionally, the second training module is used to:

[0046] According to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that each influencing factor can reach in the second environment, each of the multiple groups of first target data values ​​is processed to obtain multiple groups of second target data values ​​corresponding to the multiple groups of first target data values ​​one by one;

[0047] For each group of the multiple groups of first target data values, if the group of first target data values ​​is collected when the target event occurs in the second environment, the target probability corresponding to the group of first target data values ​​is set to be greater than or equal to a first probability threshold, and the target probability is the probability of the occurrence of the target event; if the group of first target data values ​​is collected when the target event does not occur in the second environment, the target probability corresponding to the group of first target data values ​​is set to be less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold;

[0048] Using a group of second target data values ​​corresponding to the group of first target data values ​​as input data in a target sample, and using the target probabilities corresponding to the group of first target data values ​​as sample labels in the target sample, so as to obtain the target sample;

[0049] The risk prediction model is trained using the obtained multiple target samples.

[0050] Optionally, the target event is a stampede, and the multiple influencing factors include at least two of the number of people, ambient humidity, ambient illumination, floor, number of people walking against the flow, and crowd moving speed.

[0051] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned event warning method when executed by the processor.

[0052] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned event warning method is implemented.

[0053] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the above-mentioned event warning method.

[0054] It can be understood that the beneficial effects of the second, third, fourth and fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 is a flow chart of an event warning method provided by an embodiment of the present application;

[0057] Figure 2 It is a structural schematic diagram of an event warning device provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0060] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.

[0061] Before explaining the embodiments of the present application in detail, the application scenarios of the embodiments of the present application are first described.

[0062] The event warning method provided in the embodiment of the present application is applied to the scenario of warning the target event. By obtaining the risk prediction model trained by multiple groups of specified data values ​​of the first environment, and processing the multiple first data values ​​collected from the second environment according to the difference between the first environment and the second environment, a plurality of second data values ​​suitable for input of the risk prediction model are obtained, and then the plurality of second data values ​​are input into the risk prediction model to obtain the probability of the target event, and the target event is warned according to the probability of the target event, thereby preventing the occurrence of the target event.

[0063] The event warning method provided in the embodiment of the present application is explained in detail below.

[0064] Figure 1 is a flow chart of an event warning method provided by an embodiment of the present application. Figure 1 , the method comprises the following steps.

[0065] Step 101: The terminal obtains a risk prediction model.

[0066] The risk prediction model is used to predict the probability of a target event occurring. The target event has multiple influencing factors, and each of the multiple influencing factors will affect the probability of the target event occurring. The risk prediction model is trained based on multiple groups of specified data values, each of which is a data value of each of the multiple influencing factors collected from the first environment when the target event occurs in the first environment, or a data value of each of the multiple influencing factors collected from the first environment when the target event does not occur in the first environment, and the first environment is an environment where the target event has occurred. That is, the multiple groups of specified data values ​​are multiple groups of data values ​​collected in the first environment where the target event has occurred. The multiple groups of specified data values ​​include at least one group of data values ​​collected when the target event occurs in the first environment, and at least one group of data values ​​collected when the target event does not occur in the first environment. A group of specified data values ​​includes multiple data values ​​collected when the target event occurs in the first environment or when the target event does not occur, and these multiple data values ​​are data values ​​of each of the multiple influencing factors.

[0067] The target event is an event that may cause danger. Optionally, when the target event is a stampede, the multiple influencing factors may include at least two of the number of people, ambient humidity, ambient illumination, floor, number of people walking against the flow, and speed of movement of people.

[0068] In this case, the terminal obtains the risk prediction model and can use the risk prediction model to predict the probability of the target event occurring in an environment similar to the first environment, thereby determining whether the target event will occur in an environment similar to the first environment.

[0069] It is worth noting that before the terminal obtains the risk prediction model, it needs to be trained to obtain the risk prediction model. Specifically, the terminal obtains multiple training samples; the neural network model is trained using the multiple training samples to obtain the risk prediction model.

[0070] The multiple training samples may be pre-set. Each of the multiple training samples includes input data and a sample tag, the input data in each training sample is a set of specified data values, and the sample tag in each training sample is the target probability corresponding to the set of specified data values, and the target probability is the probability of the target event occurring. Wherein, when the set of specified data values ​​is collected when the target event occurs in the first environment, the target probability corresponding to the set of specified data values ​​is greater than or equal to the first probability threshold; when the set of specified data values ​​is collected when the target event does not occur in the first environment, the target probability corresponding to the set of specified data values ​​is less than or equal to the second probability threshold, and the second probability threshold is less than the first probability threshold.

[0071] The first probability threshold can be set in advance, and the first probability threshold can be set relatively large. When the set of specified data values ​​is collected when the target event occurs in the first environment, the target probability corresponding to the set of specified data values ​​is greater than or equal to the first probability threshold, that is, the corresponding target probability set for the set of specified data values ​​is relatively large, that is, the probability of the target event occurring corresponding to the set of specified data values ​​is relatively large, thereby ensuring that the set of specified data collected when the target event occurs in the first environment is input into the neural network model, and the output probability of the target event occurring is relatively large.

[0072] The second probability threshold can be set in advance, and the second probability threshold can be set to be smaller. When the set of specified data values ​​is collected when the target event does not occur in the first environment, the target probability corresponding to the set of specified data values ​​is less than or equal to the second probability threshold, that is, the corresponding target probability set for the set of specified data values ​​is smaller, that is, the probability of the target event occurring corresponding to the set of specified data values ​​is smaller, thereby ensuring that the set of specified data collected when the target event does not occur in the first environment is input into the neural network model, and the output probability of the target event occurring is smaller.

[0073] The neural network model may include multiple network layers, including an input layer, multiple hidden layers, and an output layer. The input layer is responsible for receiving input data; the output layer is responsible for outputting processed data; multiple hidden layers are located between the input layer and the output layer, responsible for processing data, and multiple hidden layers are invisible to the outside. For example, the neural network model may be a BP neural network model, a deep neural network, etc., and may be a convolutional neural network in a deep neural network, etc.

[0074] When the terminal uses multiple training samples to train the neural network model, for each training sample in the multiple training samples, the input data in the training sample can be input into the neural network model to obtain output data; the loss value between the output data and the sample label in the training sample is determined by the loss function; and the parameters in the neural network model are adjusted according to the loss value. After the parameters in the neural network model are adjusted based on each training sample in the multiple training samples, the neural network model with the adjusted parameters is the risk prediction model.

[0075] Among them, the operation of the terminal adjusting the parameters in the neural network model according to the loss value can refer to the relevant technology, and the embodiment of the present application will not elaborate on this in detail.

[0076] For example, the terminal can use the formula To adjust any parameter in the neural network model. is the adjusted parameter. W is the parameter before adjustment. α is the learning rate, which can be preset, such as α can be 0.001, 0.000001, etc., and this embodiment of the present application does not make a sole limitation on this. dW is the partial derivative of the loss function with respect to W, which can be obtained based on the loss value.

[0077] In this case, the terminal obtains multiple training samples including input data and sample labels, and uses each of the multiple training samples to train the neural network model, so that the neural network model continuously adjusts the weight parameters in the neural network model according to the loss value between the output data and the sample label in this training sample, thereby training a risk prediction model that can predict the probability of the target event occurring, so that the risk prediction model can predict the probability of the target event occurring in an environment similar to the first environment.

[0078] Step 102: The terminal obtains the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that each influencing factor can reach in the second environment.

[0079] The maximum value that each of the multiple influencing factors can reach in the first environment is the limit value of each influencing factor in the first environment.

[0080] The maximum value that each of the multiple influencing factors can reach in the second environment is the limit value of each influencing factor in the second environment. The second environment is an environment where an early warning of a target event is required.

[0081] It is worth noting that before the terminal obtains the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment, it is necessary to determine the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment.

[0082] The operation of the terminal determining the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment is similar to the operation of the terminal determining the maximum value that a certain factor can reach in a certain environment in the related technology, and the embodiments of the present application will not elaborate on this.

[0083] In this case, the terminal obtains the maximum value that each of the multiple influencing factors can reach in the first environment, that is, obtains the limit value of each influencing factor in the first environment, and at the same time, the terminal obtains the maximum value that each of the multiple influencing factors can reach in the second environment, that is, obtains the limit value of each of the multiple influencing factors in the second environment. If the limit value corresponding to each of the multiple influencing factors is a fixed data value, the terminal can use the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment as reference data to continue to perform the following step 103.

[0084] For example: the target event is a stampede, and the multiple influencing factors may include the number of people and the number of people walking against the flow. The first environment is an environment with a staircase width of 1 meter. Through calculation, it is determined that the maximum number of people that can be reached in the first environment is 10, and the maximum number of people walking against the flow is 5; the second environment is an environment with a staircase width of 2 meters. Through calculation, it is determined that the maximum number of people that can be reached in the second environment is 20, and the maximum number of people walking against the flow is 10. Afterwards, the terminal obtains the maximum value of the number of influencing factors that can be reached in the first environment, 10, and the maximum value of the number of people walking against the flow that can be reached in the first environment, 5, and the maximum value of the number of influencing factors that can be reached in the second environment, 20, and the maximum value of the number of people walking against the flow that can be reached in the second environment, 10.

[0085] Step 103: The terminal collects data values ​​of each of the multiple influencing factors from the second environment to obtain multiple first data values.

[0086] The multiple first data values ​​are data values ​​in the second environment, and the multiple first data values ​​are data values ​​of each of the multiple influencing factors in the second environment collected by the terminal at a certain moment.

[0087] In this case, the terminal collects data values ​​of each of the multiple influencing factors from the second environment at a certain moment, and based on this, the probability of the target event occurring in the second environment at this moment can be predicted through the risk prediction model.

[0088] Optionally, the terminal can collect the data value of each of the multiple influencing factors from the second environment by installing a camera device and various sensor devices in the second environment, the camera device and various sensors can communicate with the terminal, and the terminal can obtain the data value of each of the multiple influencing factors in the second environment from the video data collected by the camera device and the sensor data collected by various sensors.

[0089] It is worth noting that, due to the difference between the first environment and the second environment, the risk prediction model is trained based on multiple sets of specified data values ​​collected from the first environment, so the risk prediction model is applicable to the first environment, but cannot be accurately applied to the second environment. In this case, for multiple first data values ​​collected from the second environment, inputting them into the risk prediction model will not result in accurate prediction values, so it is necessary to first process the multiple first data values ​​to obtain input data values ​​applicable to the risk prediction model, that is, perform the following step 104.

[0090] Step 104: The terminal processes each of the multiple first data values ​​according to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that each of the multiple influencing factors can reach in the second environment to obtain multiple second data values.

[0091] The multiple second data values ​​are data values ​​obtained after processing the multiple first data values, and the multiple second data values ​​are multiple data values ​​obtained by mapping each first data value of the multiple first data values ​​collected from the second environment to the first environment.

[0092] In this case, the terminal processes each of the multiple first data values ​​according to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that it can reach in the second environment, to obtain multiple second data values, that is, each first data value of the multiple first data values ​​collected from the second environment is mapped to the first environment, to obtain multiple input data suitable for the risk prediction model, that is, the multiple second data values ​​are input into the risk prediction model, and the risk prediction model can accurately predict the probability of the target event occurring in the second environment.

[0093] Specifically, the operation of step 104 may be implemented in the following two possible ways.

[0094] The first possible way is that, for each of the multiple influencing factors, the terminal divides the maximum value that the influencing factor can reach in the first environment by the maximum value that the influencing factor can reach in the second environment to obtain a target ratio corresponding to the influencing factor; and multiplies the target ratio corresponding to the influencing factor by a first data value of the influencing factor to obtain a second data value of the influencing factor.

[0095] The target ratio is used to represent the difference between the maximum value that any one of the multiple influencing factors can achieve in the first environment and the maximum value that can be achieved in the second environment.

[0096] In this case, the terminal divides the maximum value that an influencing factor can reach in the first environment by the maximum value that the influencing factor can reach in the second environment to obtain the target ratio corresponding to the influencing factor, that is, to obtain the difference between the influencing factor in the first environment and the second environment, that is, the mapping relationship between the influencing factor in the first environment and the second environment. The target ratio corresponding to the influencing factor is multiplied by a first data value of the influencing factor to obtain a second data value of the influencing factor, that is, to obtain the data value of the influencing factor in the second environment mapped to the corresponding data value in the first environment. In this way, the second data value of the influencing factor obtained is suitable for the input of the risk prediction model. Performing the above operation on each of the multiple influencing factors can obtain a second data value for each influencing factor, that is, to obtain multiple second data values.

[0097] For example: the target event is a stampede, and the multiple influencing factors may include the number of people and the number of people walking against the flow. The terminal obtains the maximum value of 10 that the number of people can reach in the first environment, the maximum value of 5 that the number of people walking against the flow can reach in the first environment, and the maximum value of 20 that the number of people walking against the flow can reach in the second environment, the maximum value of 10 that the number of people walking against the flow can reach in the second environment. The number of people collected by the terminal from the second environment is 10, and the number of people walking against the flow is 4. Then the terminal divides the maximum value of the number of people that can be reached in the first environment by the maximum value of the number of people that can be reached in the second environment: 10÷20=0.5, and obtains the target ratio corresponding to the number of people as 0.5, and then multiplies the target ratio corresponding to the number of people by the number of people collected by the terminal in the second environment: 0.5×10=5, and obtains a second data value of the number of people, that is, the number of people when the number of people in the second environment is mapped to the first environment is 5. The terminal divides the maximum value of the number of people walking against the flow in the first environment by the maximum value of the number of people walking against the flow in the second environment: 5÷10=0.5, and obtains a target ratio corresponding to the number of people walking against the flow, which is 0.5. Then, the target ratio corresponding to the number of people walking against the flow is multiplied by the value of the number of people walking against the flow collected by the terminal in the second environment: 0.5×4=2, and a second data value of the number of people walking against the flow is obtained, that is, the value of the number of people walking against the flow in the second environment is mapped to the value of the number of people walking against the flow in the first environment, which is 2.

[0098] The second possible method is that for each of the multiple influencing factors, the terminal divides the maximum value that the influencing factor can reach in the second environment by the maximum value that the influencing factor can reach in the first environment to obtain a difference value corresponding to the influencing factor; and divides a first data value of the influencing factor by the difference value corresponding to the influencing factor to obtain a second data value of the influencing factor.

[0099] The difference value is used to represent the difference between the maximum value that any one of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment.

[0100] For example: the target event is a stampede, and the multiple influencing factors may include the number of people and the number of people walking against the flow. The terminal obtains the maximum value of 10 that the number of people can reach in the first environment, the maximum value of 5 that the number of people walking against the flow can reach in the first environment, and the maximum value of 20 that the number of people can reach in the second environment, the maximum value of 10 that the number of people walking against the flow can reach in the second environment. The number of people collected by the terminal from the second environment is 10, and the number of people walking against the flow is 4. The terminal then divides the maximum value of the number of people that can be reached in the second environment by the maximum value of the number of people that can be reached in the first environment: 20÷10=2, and obtains the difference value corresponding to the number of people as 2, and then divides the collected number of people in the second environment by the difference value corresponding to the number of people: 10÷2=5, and obtains a second data value of the number of people, that is, the number of people when the number of people in the second environment is mapped to the first environment is 5. The terminal divides the maximum value of the number of people walking against the flow in the second environment by the maximum value of the number of people walking against the flow in the first environment: 10÷5=2, and obtains a difference value corresponding to the number of people walking against the flow of 2. Then, the collected value of the number of people walking against the flow in the second environment is divided by the difference value corresponding to the number of people walking against the flow of 4÷2=2, and a second data value of the number of people walking against the flow of 2 is obtained, that is, the value of the number of people walking against the flow in the second environment is mapped to the value of the number of people walking against the flow in the first environment, and the value of the number of people walking against the flow of 2 is obtained.

[0101] Step 105: The terminal inputs the multiple second data values ​​into the risk prediction model to obtain the probability of the target event occurring in the second environment.

[0102] In this case, each of the multiple second data values ​​is a data value of the first environment mapped to each of the multiple first data values ​​of the second environment, that is, the multiple second data values ​​are suitable for input of the risk prediction model, so the terminal inputs the multiple second data values ​​into the risk prediction model, and the risk prediction model can accurately predict the probability of the target event occurring in the second environment based on the multiple second data values ​​and output it.

[0103] Furthermore, after obtaining the probability of the target event occurring in the second environment, the terminal may also execute the following step 106 according to the probability of the target event occurring in the second environment predicted by the risk prediction model.

[0104] Step 106: The terminal issues an early warning of the target event according to the probability of the target event occurring in the second environment.

[0105] In this case, the terminal issues an early warning of the target event based on the probability of the target event occurring in the second environment, so that the staff can be informed of the target event in advance and then implement measures to prevent the target event, thereby preventing the target event from occurring.

[0106] Optionally, the terminal may provide a target event warning in the following ways: activating an alarm, sending a warning message to a staff member, etc.

[0107] Specifically, the operation of step 106 may be: if the terminal detects that the probability of the target event occurring in the second environment is greater than or equal to a third probability threshold, then an early warning of the target event is issued; if the terminal detects that the probability of the target event occurring in the second environment is less than the third probability threshold, then the probability of the target event occurrence continues to be monitored without issuing an early warning of the target event.

[0108] The third probability threshold can be set in advance, and the third probability threshold can be set larger. If the terminal detects that the probability of the target event occurring in the second environment is greater than or equal to the third probability threshold, it means that the probability of the target event occurring in the second environment is greater, that is, there is a very high possibility that the target event will occur in the second environment, and the terminal needs to warn the target event. If the terminal detects that the probability of the target event occurring in the second environment is less than the third probability threshold, it means that the probability of the target event occurring in the second environment is small, that is, at this moment, the target event is very likely not to occur in the second environment, and the terminal does not need to warn the target event, and can continue to monitor the probability of the target event occurring in the second environment.

[0109] For example: the third probability threshold is 0.9, the target event is a stampede, and the risk prediction model outputs that the probability of a stampede occurring in the second environment is 0.92. The terminal detects that the probability of a stampede occurring in the second environment is 0.92, which is greater than the third probability threshold 0.9. Therefore, the terminal needs to send an early warning message to the staff to warn of the stampede.

[0110] It is worth noting that after the terminal obtains the risk prediction model, it can use the risk prediction model to continuously monitor the second environment and predict whether the target event will occur. That is, the terminal can continuously execute the above steps 103-106. For example, the terminal can periodically execute step 103 to collect multiple first data values ​​from the second environment, and then execute steps 104-106 based on the multiple first data values ​​and the risk prediction model to implement early warning of the target event in the second environment.

[0111] Furthermore, the terminal can not only issue an early warning for the target event in the second environment through the above steps 101 to 106, but also perform online update training for the risk prediction model.

[0112] In this case, during the process of online updating and training of the risk prediction model, the terminal can continuously adjust the weight parameters in the risk prediction model, thereby improving the accuracy of the risk prediction model in predicting the probability of the target event occurring in the second environment.

[0113] Specifically, the terminal collects multiple sets of first target data values ​​within a preset time period after acquiring the risk prediction model and before starting to use the risk prediction model for prediction, or within each detection cycle after starting to use the risk prediction model for prediction; and trains the risk prediction model based on the multiple sets of first target data values.

[0114] The preset time period can be set in advance, and the preset time period can be set relatively large to ensure that there is sufficient time to perform online update training on the risk prediction model and accurately adjust the weight parameters of the risk prediction model, thereby improving the accuracy of the risk prediction model in predicting the probability of the target event occurring in the second environment. For example, the preset time period can be set to 1 month, that is, after the terminal obtains the risk prediction model and before the risk prediction model is used for prediction within 1 month, the risk prediction model is updated and trained online, and the prediction function of the model is enabled after 1 month.

[0115] Each detection cycle is a time period preset when the risk prediction model is started to be used, that is, after the risk prediction model is started to be used for prediction, the risk prediction model is updated and trained online every other time period using multiple sets of first target data values ​​collected in the current time period. For example, the detection cycle can be set to 5 days, that is, after the risk prediction model is started to be used for prediction, the risk prediction model is updated and trained online every 5 days using multiple sets of first target data values ​​collected in the last 5 days.

[0116] Each group of first target data values ​​in the multiple groups of first target data values ​​includes the data value of each influencing factor among the multiple influencing factors collected from the second environment when the target event occurs in the second environment, or includes the data value of each influencing factor among the multiple influencing factors collected from the second environment when the target event does not occur in the second environment. That is, the multiple groups of first target data values ​​are multiple groups of data values ​​collected in the second environment. The multiple groups of first target data values ​​include at least one group of data values ​​collected when the target event occurs in the second environment, and at least one group of data values ​​collected when the target event does not occur in the second environment. A group of first target data values ​​includes multiple data values ​​collected when the target event occurs or does not occur in the second environment, and these multiple data values ​​are the data values ​​of each influencing factor among the multiple influencing factors.

[0117] Among them, the operation of the terminal to train the risk prediction model according to the multiple groups of first target data values ​​can be as follows: according to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment, each group of first target data values ​​in the multiple groups of first target data values ​​is processed to obtain multiple groups of second target data values ​​corresponding one by one to the multiple groups of first target data values; for each group of first target data values ​​in the multiple groups of first target data values, if this group of first target data values ​​is collected when the target event occurs in the second environment, the target probability corresponding to this group of first target data values ​​is set to be greater than or equal to the first probability threshold; if this group of first target data values ​​is collected when the target event does not occur in the second environment, the target probability corresponding to this group of first target data values ​​is set to be less than or equal to the second probability threshold; a group of second target data values ​​corresponding to this group of first target data values ​​is used as input data in a target sample, and the target probability corresponding to this group of first target data values ​​is used as a sample label in this target sample to obtain this target sample; and the risk prediction model is trained using the obtained multiple target samples.

[0118] Each group of second target data values ​​in the plurality of groups of second target data values ​​is a plurality of groups of data values ​​obtained by mapping each group of first target data values ​​in the plurality of groups of first target data values ​​collected in the second environment to the first environment.

[0119] Among them, the terminal processes each group of first target data values ​​in the multiple groups of first target data values ​​according to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment to obtain multiple groups of second target data values ​​corresponding one to one to the multiple groups of first target data values. The operation of the terminal processing each of the multiple first data values ​​in the multiple first data values ​​according to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment to obtain multiple second data values ​​in the above-mentioned step 104 is similar to the operation, which is not repeated in the embodiments of the present application.

[0120] The multiple target samples may be pre-set. Each of the multiple target samples includes input data and a sample label, the input data of each target sample includes a set of second target data values ​​corresponding to a set of first target data values, and the sample label is a target probability corresponding to the set of first target data values.

[0121] Among them, the operation of the terminal using multiple target samples to train the risk prediction model is similar to the operation of the above-mentioned terminal using multiple training samples to train the neural network model, and the embodiment of the present application will not be repeated here.

[0122] In this case, the terminal maps each set of first target data values ​​among the multiple sets of first target data values ​​collected from the second environment to the first environment based on the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment, so as to obtain multiple sets of second target data values. The multiple sets of second target data values ​​are input data suitable for the risk prediction model. Thereafter, the weight parameters of the risk prediction model are continuously updated by using the multiple sets of second target data values ​​during the online update training process, so that the risk prediction model can adapt to the second environment, thereby improving the accuracy of the risk prediction model in predicting the probability of the target event occurring in the second environment.

[0123] In an embodiment of the present application, a terminal obtains a risk prediction model that can be used to predict the probability of occurrence of a target event, and the risk prediction model is obtained by training based on multiple groups of specified data values ​​collected from a first environment, and each group of specified data values ​​in the multiple groups of specified data values ​​is a data value of each of the multiple influencing factors of the target event collected from the first environment when the target event occurs in the first environment or when the target event does not occur. Afterwards, the terminal obtains the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment, and the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment can be obtained. Afterwards, each of the multiple first data values ​​collected from the second environment is processed according to this difference to obtain multiple second data values, that is, the data values ​​when the multiple first data values ​​collected from the second environment are mapped to the first environment are obtained, and the multiple second data values ​​can be applied to the input of the risk prediction model, so that the risk prediction model can accurately predict the probability of the target event occurring in the second environment when the multiple second data values ​​are input, and then the target event can be warned according to the probability of the target event occurring in the second environment, thereby effectively preventing the occurrence of the target event.

[0124] Figure 2 1 is a schematic diagram of the structure of an event warning device provided in an embodiment of the present application. The event warning device can be implemented as part or all of a computer device by software, hardware, or a combination of both. The computer device can be the following Figure 3 Computer equipment shown. Figure 2 The device includes: a first acquisition module 201, a second acquisition module 202, a first acquisition module 203, a processing module 204, an input module 205, and an early warning module 206.

[0125] The first acquisition module 201 is used to acquire a risk prediction model, which is used to predict the probability of occurrence of a target event. The target event has multiple influencing factors. The risk prediction model is trained based on multiple groups of specified data values. Each group of specified data values ​​in the multiple groups of specified data values ​​is a data value of each of the multiple influencing factors collected from the first environment when the target event occurs in the first environment, or is a data value of each of the multiple influencing factors collected from the first environment when the target event does not occur in the first environment. The first environment is an environment where the target event has occurred;

[0126] A second acquisition module 202 is used to obtain a maximum value that each of the multiple influencing factors can reach in a first environment and a maximum value that each influencing factor can reach in a second environment, where the second environment is an environment where an early warning of a target event is required;

[0127] A first collection module 203 is used to collect the data value of each of the multiple influencing factors from the second environment to obtain multiple first data values;

[0128] a processing module 204, configured to process each of the plurality of first data values ​​according to a difference between a maximum value that can be achieved by each of the plurality of influencing factors in the first environment and a maximum value that can be achieved by each of the plurality of influencing factors in the second environment, so as to obtain a plurality of second data values;

[0129] An input module 205 is used to input the plurality of second data values ​​into the risk prediction model to obtain a probability of a target event occurring in the second environment;

[0130] The early warning module 206 is used to issue an early warning of the target event according to the probability of the target event occurring in the second environment.

[0131] Optionally, the device further comprises:

[0132] A third acquisition module is used to acquire multiple training samples, each of the multiple training samples includes input data and sample tags, the input data in each training sample is a set of specified data values, and the sample tag in each training sample is a target probability corresponding to the set of specified data values, and the target probability is the probability of the target event occurring; wherein, when the set of specified data values ​​is collected when the target event occurs in the first environment, the target probability corresponding to the set of specified data values ​​is greater than or equal to a first probability threshold; when the set of specified data values ​​is collected when the target event does not occur in the first environment, the target probability corresponding to the set of specified data values ​​is less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold;

[0133] The first training module is used to train the neural network model using the multiple training samples to obtain the risk prediction model.

[0134] Optionally, the processing module 204 is used to:

[0135] For each of the multiple influencing factors, a maximum value that can be achieved by the influencing factor in the first environment is divided by a maximum value that can be achieved by the influencing factor in the second environment to obtain a target ratio corresponding to the influencing factor;

[0136] The target ratio corresponding to the influencing factor is multiplied by a first data value of the influencing factor to obtain a second data value of the influencing factor.

[0137] Optionally, the device further comprises:

[0138] A second acquisition module is used to collect multiple groups of first target data values ​​within a preset time period after the risk prediction model is acquired and before the risk prediction model is used for prediction, or within each detection cycle after the risk prediction model is used for prediction, each group of first target data values ​​in the multiple groups of first target data values ​​includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event occurs in the second environment, or includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event does not occur in the second environment;

[0139] The second training module is used to train the risk prediction model according to the multiple groups of first target data values.

[0140] Optionally, the second training module is used to:

[0141] According to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that each of the multiple influencing factors can reach in the second environment, each of the multiple groups of first target data values ​​is processed to obtain multiple groups of second target data values ​​that correspond one to one with the multiple groups of first target data values;

[0142] For each group of first target data values ​​in the multiple groups of first target data values, if a group of first target data values ​​is collected when a target event occurs in the second environment, the target probability corresponding to the group of first target data values ​​is set to be greater than or equal to a first probability threshold, and the target probability is the probability of the target event occurring; if the group of first target data values ​​is collected when the target event does not occur in the second environment, the target probability corresponding to the group of first target data values ​​is set to be less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold;

[0143] Taking a group of second target data values ​​corresponding to the group of first target data values ​​as input data in a target sample, and taking the target probabilities corresponding to the group of first target data values ​​as sample labels in the target sample, so as to obtain the target sample;

[0144] The risk prediction model is trained using the obtained multiple target samples.

[0145] Optionally, the target event is a stampede event, and the multiple influencing factors include at least two of the number of people, ambient humidity, ambient illumination, floor, number of people walking against the flow, and crowd moving speed.

[0146] In an embodiment of the present application, a risk prediction model that can be used to predict the probability of occurrence of a target event is obtained, and the risk prediction model is obtained by training based on multiple groups of specified data values ​​collected from the first environment, and each group of specified data values ​​in the multiple groups of specified data values ​​is the data value of each of the multiple influencing factors of the target event collected from the first environment when the target event occurs in the first environment or when the target event does not occur. Afterwards, the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment are obtained, and the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment can be obtained, and then each of the multiple first data values ​​collected from the second environment is processed according to this difference to obtain multiple second data values, that is, the data values ​​when the multiple first data values ​​collected from the second environment are mapped to the first environment are obtained, and the multiple second data values ​​can be applied to the input of the risk prediction model, so that the risk prediction model can accurately predict the probability of the target event occurring in the second environment when the multiple second data values ​​are input, and then the target event can be warned according to the probability of the target event occurring in the second environment, so as to effectively prevent the occurrence of the target event.

[0147] It should be noted that: when the event warning device provided in the above embodiment warns of a target event, it only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0148] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0149] The event warning device and event warning method embodiments provided in the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought about can be found in the method embodiment part and will not be repeated here.

[0150] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 3 As shown, the computer device 3 includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in the event warning method in the above embodiment are implemented.

[0151] The computer device 3 may be a general-purpose computer device or a dedicated computer device. In a specific implementation, the computer device 3 may be a desktop computer, a portable computer, etc. The embodiment of the present application does not limit the type of the computer device 3. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, etc.

[0152] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0153] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader, data, and other programs. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0154] An embodiment of the present application also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the above-mentioned method embodiments are implemented.

[0155] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0156] An embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the steps in the above-mentioned method embodiments.

[0157] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above method embodiments, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device. The computer-readable storage medium mentioned in the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.

[0158] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.

[0159] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0160] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0161] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0162] The units described as separate components may or may not be physically separated, and the components shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0163] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An event early warning method, characterized in that: The method comprises: Obtain a risk prediction model, wherein the risk prediction model is used to predict the probability of occurrence of a target event, the target event has multiple influencing factors, the risk prediction model is trained based on multiple groups of specified data values, each group of specified data values ​​in the multiple groups of specified data values ​​is a data value of each of the multiple influencing factors collected from the first environment when the target event occurs in the first environment, or is a data value of each of the multiple influencing factors collected from the first environment when the target event does not occur in the first environment, and the first environment is an environment where the target event has occurred; Obtaining a maximum value that each of the multiple influencing factors can reach in the first environment and a maximum value that each influencing factor can reach in a second environment, where the second environment is an environment where an early warning of the target event is required; Collecting a data value of each of the multiple influencing factors from the second environment to obtain multiple first data values; Processing each of the plurality of first data values ​​according to a difference between a maximum value that each of the plurality of influencing factors can reach in the first environment and a maximum value that each of the plurality of influencing factors can reach in the second environment to obtain a plurality of second data values; Inputting the plurality of second data values ​​into the risk prediction model to obtain the probability of the target event occurring in the second environment; Producing an early warning of the target event according to the probability of the target event occurring in the second environment; Within a preset time period after the risk prediction model is acquired and before the risk prediction model is used for prediction, or within each detection cycle after the risk prediction model is used for prediction, multiple groups of first target data values ​​are collected, each group of first target data values ​​in the multiple groups of first target data values ​​includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event occurs in the second environment, or includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event does not occur in the second environment; The risk prediction model is trained according to the multiple groups of first target data values, including: processing each group of first target data values ​​in the multiple groups of first target data values ​​according to the difference between the maximum value that each of the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment, so as to obtain multiple groups of second target data values ​​corresponding to the multiple groups of first target data values ​​one by one; for each group of first target data values ​​in the multiple groups of first target data values, if the group of first target data values ​​is collected when the target event occurs in the second environment, setting the target probability corresponding to the group of first target data values ​​to be greater than or equal to 0. is equal to a first probability threshold, and the target probability is the probability of occurrence of the target event; if the group of first target data values ​​is collected when the target event does not occur in the second environment, the target probability corresponding to the group of first target data values ​​is set to be less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold; a group of second target data values ​​corresponding to the group of first target data values ​​are used as input data in a target sample, and the target probability corresponding to the group of first target data values ​​is used as a sample label in the target sample to obtain the target sample; the risk prediction model is trained using the obtained multiple target samples.

2. The method according to claim 1, characterized in that Before obtaining the risk prediction model, the method further includes: Acquire multiple training samples, each of the multiple training samples includes input data and sample labels, the input data in each training sample is a set of specified data values, and the sample label in each training sample is a target probability corresponding to the set of specified data values, and the target probability is the probability of the target event occurring; wherein, when the set of specified data values ​​is collected when the target event occurs in the first environment, the target probability corresponding to the set of specified data values ​​is greater than or equal to a first probability threshold; when the set of specified data values ​​is collected when the target event does not occur in the first environment, the target probability corresponding to the set of specified data values ​​is less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold; The neural network model is trained using the multiple training samples to obtain the risk prediction model.

3. The method according to claim 1, characterized in that The step of processing each of the plurality of first data values ​​according to a difference between a maximum value that each of the plurality of influencing factors can reach in the first environment and a maximum value that each of the plurality of influencing factors can reach in the second environment to obtain a plurality of second data values ​​comprises: For each of the multiple influencing factors, divide the maximum value that can be achieved by the influencing factor in the first environment by the maximum value that can be achieved by the influencing factor in the second environment to obtain a target ratio corresponding to the influencing factor; A target ratio corresponding to the one influencing factor is multiplied by a first data value of the one influencing factor to obtain a second data value of the one influencing factor.

4. The method according to any one of claims 1 to 3, characterized in that: The target event is a stampede, and the multiple influencing factors include at least two of the number of people, ambient humidity, ambient illumination, floor, number of people walking against the flow, and crowd moving speed.

5. An event warning device, characterized in that: The device comprises: A first acquisition module is used to acquire a risk prediction model, wherein the risk prediction model is used to predict the probability of occurrence of a target event, wherein the target event has multiple influencing factors, and wherein the risk prediction model is obtained by training based on multiple groups of specified data values, wherein each group of specified data values ​​in the multiple groups of specified data values ​​is a data value of each of the multiple influencing factors collected from the first environment when the target event occurs in the first environment, or is a data value of each of the multiple influencing factors collected from the first environment when the target event does not occur in the first environment, and the first environment is an environment where the target event has occurred; A second acquisition module is used to obtain a maximum value that each of the multiple influencing factors can reach in the first environment and a maximum value that each influencing factor can reach in a second environment, where the second environment is an environment where an early warning of the target event is required; A first collection module, configured to collect a data value of each of the plurality of influencing factors from the second environment to obtain a plurality of first data values; a processing module, configured to process each of the plurality of first data values ​​according to a difference between a maximum value that can be achieved by each of the plurality of influencing factors in the first environment and a maximum value that can be achieved by each of the plurality of influencing factors in the second environment, so as to obtain a plurality of second data values; An input module, used for inputting the plurality of second data values ​​into the risk prediction model to obtain the probability of the target event occurring in the second environment; An early warning module, used for issuing an early warning for the target event according to the probability of the target event occurring in the second environment; A second acquisition module is used to collect multiple groups of first target data values ​​within a preset time period after the risk prediction model is acquired and before the risk prediction model is used for prediction, or within each detection cycle after the risk prediction model is used for prediction, each group of first target data values ​​in the multiple groups of first target data values ​​includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event occurs in the second environment, or includes the data value of each influencing factor of the multiple influencing factors collected from the second environment when the target event does not occur in the second environment; The second training module is used to train the risk prediction model according to the multiple groups of first target data values, including: processing each group of first target data values ​​in the multiple groups of first target data values ​​according to the difference between the maximum value that each influencing factor in the multiple influencing factors can reach in the first environment and the maximum value that can be reached in the second environment, so as to obtain multiple groups of second target data values ​​corresponding to the multiple groups of first target data values ​​one by one; for each group of first target data values ​​in the multiple groups of first target data values, if the group of first target data values ​​is collected when the target event occurs in the second environment, setting the target probability corresponding to the group of first target data values The target probability is greater than or equal to a first probability threshold, and the target probability is the probability of occurrence of the target event; if the group of first target data values ​​is collected when the target event does not occur in the second environment, the target probability corresponding to the group of first target data values ​​is set to be less than or equal to a second probability threshold, and the second probability threshold is less than the first probability threshold; a group of second target data values ​​corresponding to the group of first target data values ​​are used as input data in a target sample, and the target probability corresponding to the group of first target data values ​​is used as a sample label in the target sample to obtain the target sample; and the risk prediction model is trained using the obtained multiple target samples.

6. A computer device, characterized in that: The computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 4 when executed by the processor.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

8. A computer program product, characterized in that The computer program product includes computer instructions, and when the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 4.