A method, device and equipment for training accident analysis model

By constructing a Bayesian network model and analyzing the relationship between event types and accidents, the problem of difficulty in analyzing accident influencing factors in the existing technology is solved, and accident prevention and management means are provided.

CN114297911BActive Publication Date: 2024-08-27HANGZHOU DT DREAM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111454628.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2024-08-27
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

Existing technology makes it difficult to effectively analyze the influencing factors of accidents, making it difficult to quantify and prevent accidents.

Method used

By constructing a Bayesian network model and using event types and accident nodes in the accident sample collection, the accident analysis model is trained to analyze the impact relationship between event types and accidents.

Benefits of technology

It achieves quantitative analysis of factors affecting accidents, helps prevent accidents, and provides management methods and emergency decision support based on objective data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297911B
    Figure CN114297911B
Patent Text Reader

Abstract

This specification discloses an accident analysis model training method, device and equipment. The method includes: obtaining an accident sample set for the organization to be analyzed; the accident sample set includes positive accident samples and negative accident samples; different accident samples correspond to different time periods; the label of the positive accident sample is used to characterize that an accident occurred in the organization to be analyzed in the corresponding time period; the characteristics of the positive accident sample include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident; the label of the negative accident sample is used to characterize that no accident occurred in the organization to be analyzed in the corresponding time period; the characteristics of the negative accident sample include: the third event characteristics of the event that occurred in the organization to be analyzed in the corresponding time period; constructing an accident analysis model to be trained; training the accident analysis model to be trained according to the accident sample set to obtain the accident analysis model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer application technology, and in particular, to an accident analysis model training method, device and equipment. Background Art

[0002] In the process of executing various businesses, various accidents usually occur, such as production accidents, leakage accidents, safety accidents, etc.

[0003] In order to facilitate emergency management, it is usually necessary to analyze the factors that affect the occurrence of accidents, so as to facilitate the subsequent prevention of accidents through various improvement measures. Influencing factors include the degree of production safety standards, the effectiveness of confidentiality measures, and the intensity of production process supervision.

[0004] However, at present, it is difficult to analyze the factors that affect the accident. Summary of the invention

[0005] In order to solve the above technical problems, the embodiments of this specification provide an accident analysis model training method and device. The technical solution is as follows.

[0006] A first aspect of the embodiments of this specification provides an accident analysis model training method, comprising:

[0007] For the organization to be analyzed, an accident sample set is obtained; the accident sample set includes positive accident samples and negative accident samples; different accident samples correspond to different time periods;

[0008] The label of the accident positive sample is used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident positive sample include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident;

[0009] The label of the accident negative sample is used to indicate that no accident occurred in the organization to be analyzed in the corresponding time period; the characteristics of the accident negative sample include: the third event characteristics of the event that occurred in the organization to be analyzed in the corresponding time period;

[0010] Constructing an accident analysis model to be trained, specifically comprising: obtaining a number of event types, and creating a corresponding event node for each of the obtained event types in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained; the accident analysis model to be trained is a Bayesian network model;

[0011] The accident analysis model to be trained is trained according to the accident sample set to obtain an accident analysis model; the accident analysis model is at least used to analyze the influence relationship between event types and accidents.

[0012] Optionally, obtaining the accident sample set includes:

[0013] Acquire relevant data of the institution to be analyzed from a number of data sources; the relevant data includes: event information of events related to the institution to be analyzed, and accident information of accidents related to the institution to be analyzed;

[0014] Obtain accident samples from the relevant data and add them to the accident sample set.

[0015] Optionally, the event information includes at least the time of occurrence; the accident information includes at least the time of occurrence;

[0016] The step of obtaining an accident sample from the relevant data and adding the sample to the accident sample set includes:

[0017] Starting from the preset time point, the following steps are executed cyclically until the first stop condition is met:

[0018] When it is determined that there is a related accident in the related data that occurs within a specified time period, a positive accident sample is generated according to the determined accident; the specified time period is a time period of a third preset time length after the current preset time point; and the generated positive accident sample is added to the accident sample set;

[0019] When it is determined that there is no relevant accident with an occurrence time within the specified time period in the relevant data, generating a negative accident sample according to the relevant events with an occurrence time within the specified time period; and adding the generated negative accident sample to the accident sample set;

[0020] A time point that is a fourth preset time length after the current preset time point is determined as the current preset time point.

[0021] Optionally, the obtaining of several event types includes:

[0022] A number of event types are determined from event features of the accident samples in the accident sample set.

[0023] Optionally, determining several event types from the event features of the accident samples in the accident sample set includes:

[0024] For any positive accident sample in the accident sample set, the pre-accident event type is determined from the first event feature of the positive accident sample, and the post-accident event type is determined from the second event feature of the positive accident sample.

[0025] Optionally, the training of the accident analysis model to be trained includes:

[0026] Determine the network structure of the accident analysis model to be trained through training;

[0027] Based on the determined network structure, the parameters of the accident analysis model to be trained are determined through training.

[0028] Optionally, determining the network structure of the accident analysis model to be trained through training includes:

[0029] Determining the initial network structure of the accident analysis model to be trained;

[0030] The following steps are executed repeatedly until the second stop condition is met:

[0031] Scoring the network structure of the current accident analysis model to be trained based on a preset scoring function;

[0032] Update the network structure of the current accident analysis model to be trained through a preset heuristic algorithm.

[0033] Optionally, the preset scoring function is a Bayesian scoring function, and the preset heuristic algorithm is a simulated annealing search algorithm.

[0034] Optionally, determining the parameters of the accident analysis model to be trained through training includes:

[0035] In the case that any event type in the accident analysis model to be trained does not exist in the accident sample set, the parameters of the accident analysis model to be trained are determined using an expectation maximization algorithm based on a preset prior distribution.

[0036] Optionally, the accident analysis model is also used to: determine the marginal probability distribution of any other node by using a belief propagation algorithm when the values ​​of random variables corresponding to some nodes are determined.

[0037] A second aspect of the embodiments of this specification provides an accident analysis model training device, comprising:

[0038] A sample acquisition unit is used to acquire a set of accident samples for the organization to be analyzed; the set of accident samples includes positive accident samples and negative accident samples; different accident samples correspond to different time periods;

[0039] The label of the accident positive sample is used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident positive sample include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident;

[0040] The label of the accident negative sample is used to indicate that no accident occurred in the organization to be analyzed in the corresponding time period; the characteristics of the accident negative sample include: the third event characteristics of the event that occurred in the organization to be analyzed in the corresponding time period;

[0041] The model building unit is used to build an accident analysis model to be trained, specifically including: obtaining a number of event types, and creating a corresponding event node for each event type obtained in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained; the accident analysis model to be trained is a Bayesian network model;

[0042] The training unit is used to train the accident analysis model to be trained according to the accident sample set to obtain an accident analysis model; the accident analysis model is at least used to analyze the influence relationship between event types and accidents.

[0043] Optionally, the sample acquisition unit is specifically used to:

[0044] Obtain relevant data of the institution to be analyzed from a number of data sources; the relevant data includes: event information of events related to the institution to be analyzed, and accident information of accidents related to the institution to be analyzed;

[0045] Obtain accident samples from the relevant data and add them to the accident sample set.

[0046] Optionally, the event information includes at least the time of occurrence; the accident information includes at least the time of occurrence;

[0047] The sample acquisition unit is specifically used for:

[0048] Starting from the preset time point, the following steps are executed cyclically until the first stop condition is met:

[0049] When it is determined that there is a related accident in the related data that occurs within a specified time period, a positive accident sample is generated according to the determined accident; the specified time period is a time period of a third preset time length after the current preset time point; and the generated positive accident sample is added to the accident sample set;

[0050] When it is determined that there is no relevant accident with an occurrence time within the specified time period in the relevant data, generating a negative accident sample according to the relevant events with an occurrence time within the specified time period; and adding the generated negative accident sample to the accident sample set;

[0051] A time point that is a fourth preset time length after the current preset time point is determined as the current preset time point.

[0052] Optionally, the model building unit includes:

[0053] The event type determination subunit is used to determine a number of event types from the event features of the accident samples in the accident sample set.

[0054] Optionally, the event type determination subunit is specifically used to:

[0055] For any positive accident sample in the accident sample set, the pre-accident event type is determined from the first event feature of the positive accident sample, and the post-accident event type is determined from the second event feature of the positive accident sample.

[0056] Optionally, the model training unit includes:

[0057] A network structure training subunit, used for determining the network structure of the accident analysis model to be trained through training;

[0058] The parameter training subunit is used to determine the parameters of the accident analysis model to be trained through training based on the determined network structure.

[0059] Optionally, the network structure training subunit is specifically used for:

[0060] Determining the initial network structure of the accident analysis model to be trained;

[0061] The following steps are executed repeatedly until the second stop condition is met:

[0062] Scoring the network structure of the current accident analysis model to be trained based on a preset scoring function;

[0063] Update the network structure of the current accident analysis model to be trained through a preset heuristic algorithm.

[0064] Optionally, the preset scoring function is a Bayesian scoring function, and the preset heuristic algorithm is a simulated annealing search algorithm.

[0065] Optionally, the parameter training subunit is specifically used to:

[0066] In the case that any event type in the accident analysis model to be trained does not exist in the accident sample set, the parameters of the accident analysis model to be trained are determined using an expectation maximization algorithm based on a preset prior distribution.

[0067] Optionally, the accident analysis model is also used to: determine the marginal probability distribution of any other node by using a belief propagation algorithm when the values ​​of random variables corresponding to some nodes are determined.

[0068] A third aspect of an embodiment of the present specification provides an electronic device, comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein when the processor executes the program, the accident analysis model training method as described in any of the above embodiments is implemented.

[0069] A fourth aspect of the embodiments of this specification provides a machine-readable storage medium having a program stored thereon, which, when executed by a processor, implements the accident analysis model training method as described in any of the aforementioned embodiments.

[0070] The above technical solution constructs a Bayesian network model as an accident analysis model for training based on event types and accidents, thereby obtaining an accident analysis model based on event types. The accident analysis model can be used to analyze the influence relationship between event types and accidents, thereby facilitating the analysis of the influencing factors of accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0072] Figure 1 It is a flowchart of an accident analysis model training method provided in an embodiment of this specification;

[0073] Figure 2 It is a structural schematic diagram of an accident analysis model provided in an embodiment of this specification;

[0074] Figure 3 It is a structural schematic diagram of an accident analysis model training device provided in an embodiment of this specification;

[0075] Figure 4 It is a structural diagram of a device used to configure the method of the embodiment of this specification. DETAILED DESCRIPTION

[0076] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the technical solutions in the embodiments of this specification will be described in detail below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field should belong to the scope of disclosure.

[0077] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0078] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0079] It should be understood that although the terms first, second, third, etc. may be used to describe various objects in the present invention, this information should not be limited to these terms. These terms are only used to distinguish objects of the same type from each other. For example, without departing from the scope of the present invention, the first object may also be referred to as the second object, and similarly, the second object may also be referred to as the first object. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0080] In the process of executing various businesses, various accidents usually occur, such as production accidents, leakage accidents, safety accidents, etc.

[0081] In order to facilitate emergency management, it is usually necessary to analyze the factors that affect the occurrence of accidents, so as to prevent accidents by improving the factors in the future. Influencing factors include the degree of production safety standards, the effectiveness of confidentiality measures, and the intensity of production process supervision.

[0082] For ease of understanding, in a specific application example, a company keeps confidential data of its customers, but leaks occur from time to time. After expert analysis, the influencing factors include at least: the degree of employee operation standardization, the confidentiality of equipment, the value of confidential data, the severity of leak penalties, etc. For example, if the penalty for leaks is relatively light, it may affect the occurrence of leaks; if the value of confidential data is relatively high, it may affect the occurrence of leaks. Afterwards, improvements can be made on various influencing factors such as employee operation standards and leak penalty systems to prevent leaks.

[0083] However, in existing schemes, influencing factors are usually difficult to quantify. For example, the degree of production safety standards is difficult to evaluate in a relatively objective manner and can only be determined subjectively; the severity of penalties for leaks can also only be determined subjectively.

[0084] Correspondingly, the relationship between influencing factors that are difficult to quantify and the occurrence of accidents is also difficult to determine through quantitative means, making it difficult to analyze the accidents.

[0085] For example, when there are dozens of influencing factors in a factory's production accidents (for example, assembly line operation specifications, packaging operation specifications, employee production specifications, etc.), it is difficult to improve dozens of influencing factors at the same time, and it is usually necessary to identify the key influencing factors for improvement.

[0086] However, many influencing factors are difficult to quantify. For example, it is difficult to give objective quantitative indicators for the strictness of employee protection measures and the degree of production standardization. Therefore, it is also difficult to determine the influence of dozens of influencing factors on accidents through quantitative means, and it is difficult to relatively objectively determine the key influencing factors and effectively prevent accidents from happening.

[0087] In order to solve the above technical problems, an embodiment of this specification provides an accident analysis model training method.

[0088] Since many influencing factors are difficult to quantify, quantifiable data that can reflect the influencing factors can be selected for accident analysis.

[0089] In this method, accident analysis can be performed through quantifiable events. The quantified data of the event can at least include whether the event occurred and the number of times the event occurred. Of course, optionally, the event itself can also be regarded as an influencing factor, which has a certain impact on the occurrence of the accident.

[0090] For the organization to be analyzed (specifically, it can be an enterprise, group, agency, administrative department, etc.), the events that occurred in the organization to be analyzed can be obtained for accident analysis. The events obtained can include business events, administrative events, personnel change events, etc. For example, employee salary payment, industrial and commercial changes, administrative penalty records, senior personnel changes, production standard publicity, award records, etc.

[0091] For the sake of convenience of explanation, in the embodiments of this specification, optionally, an event may be a relevant event that occurs in the organization to be analyzed, which may specifically include administrative events, reward and punishment events, personnel change events, etc. Optionally, an accident may be an event in which the organization to be analyzed suffers a loss, which may specifically include property loss, life loss, reputation loss, etc. In other words, optionally, an event may include an accident.

[0092] In addition, optionally, for the sake of easy distinction, the events may not include accidents but only include non-accident events.

[0093] Optionally, the acquired events may reflect the conditions of various influencing factors to a certain extent.

[0094] For example, regarding the influencing factor of production standardization, if a company is often punished for production standardization and there are many production standardization punishment events, it can reflect to a certain extent that the company's production standardization is low. If an agency is rewarded for production standardization by a higher-level agency and there are production standardization reward events, it can reflect to a certain extent that the agency's production standardization is high.

[0095] For another example, with regard to the influencing factor of enterprise stability, if the senior personnel of a certain enterprise change frequently and there are many senior personnel change events, it can reflect to a certain extent that the enterprise stability of the enterprise is low.

[0096] The events obtained can usually be quantified through simple statistical methods, such as whether the event occurred, the number of times the event occurred, the number of people involved, the amount of money involved, etc.

[0097] To facilitate understanding, several specific examples are given below.

[0098] For example, the administrative penalty records of the institution to be analyzed can be obtained to determine the production standard penalty events. Specifically, the number of production standard handling events and the amount of penalties in a certain year can be counted. Among them, the number of occurrences and the amount of penalties can quantitatively reflect the degree of production standardization of the influencing factors to a certain extent.

[0099] For example, by obtaining the enterprise change records of the organization to be analyzed, the high-level personnel change events can be determined. Specifically, the number of high-level personnel change events and the number of people changed in a certain year can be counted. The number of occurrences and the number of people changed can quantitatively reflect the degree of enterprise stability of the influencing factors to a certain extent.

[0100] In addition to the quantification of the above events, accidents can also be quantified. For example, whether an accident occurred, how much loss the accident caused, the amount of money involved in the accident, the number of people involved in the accident, etc.

[0101] Since both events and accidents can be quantified, the impact of events on accidents can be determined by quantitative means.

[0102] In this method, accident analysis is performed through quantifiable events, and specifically, the impact relationship between event types and accidents can be analyzed.

[0103] For example, for production standard punishment event types, high-level personnel change event types, safety knowledge publicity event types, etc., analyze the impact of these types of events on accidents.

[0104] Since these types of events can be quantified, quantitative methods can be used to analyze the impact of these types of events on accidents.

[0105] In this method, a Bayesian network model can be used to analyze the impact of event types on accidents.

[0106] Specifically, nodes can be constructed for different event types and accidents in the Bayesian network model, and each node can correspond to a random variable. Then, the probability distribution of the random variable corresponding to the node can be determined through training, so that the conditional probability distribution of the accident can be determined, and the different probabilities of accidents under different value conditions of several event types can be determined, so as to facilitate the analysis of the impact relationship between event types and accidents.

[0107] The Bayesian network model can then be used to predict and trace accidents. Specifically, after determining the values ​​of random variables of some nodes, the marginal probability distribution of other nodes can be calculated through the belief propagation algorithm.

[0108] For example, the random variable values ​​of the corresponding nodes in the Bayesian network model can be determined for the types of events that occurred within a certain period of time, so that the marginal probability distribution of the nodes corresponding to the accident can be calculated through the belief propagation algorithm to determine the marginal probability distribution of the accident. The random variable values ​​of the nodes corresponding to the accident in the Bayesian network model can also be determined according to the circumstances of the accident, so that the marginal probability distribution of the nodes corresponding to other event types can be calculated through the belief propagation algorithm, and then the type of event that may have caused the accident can be determined.

[0109] For example, there are 10 high-level personnel change events in a certain year, and the random variable of the node corresponding to the high-level personnel change event type in the Bayesian network model is the number of high-level personnel change events. Therefore, the value of the corresponding node can be directly determined to be 10.

[0110] Then, the marginal probability distribution of the node corresponding to the accident can be determined by the belief propagation algorithm according to the random variable value of the node corresponding to the determined event type. Specifically, the random variable of the node corresponding to the accident can be whether the accident occurs, and the marginal probability distribution can be the marginal probability of the accident occurring and the marginal probability of the accident not occurring.

[0111] For example, after a production accident occurs, the value of the random variable (whether the accident occurred) of the node corresponding to the accident in the Bayesian network model can be determined as "yes", so that the marginal probability distribution of other event type nodes in the Bayesian network model can be determined according to the belief propagation algorithm, so as to analyze whether events of other event types occur, which is convenient for analyzing the cause of this production accident.

[0112] In summary, in an accident analysis model training method provided in an embodiment of the present specification, a Bayesian network model can be constructed as an accident analysis model for training according to event types and accidents to obtain an accident analysis model based on event types.

[0113] The accident analysis model can be used to analyze the impact relationship between event types and accidents in a variety of ways, making it easier to analyze accidents and thus prevent them from happening.

[0114] The following is a detailed explanation of an accident analysis model training method provided in an embodiment of this specification in conjunction with the accompanying drawings.

[0115] like Figure 1 As shown, it is a flow chart of an accident analysis model training method provided by an embodiment of this specification. It may include at least the following steps. In an optional embodiment, the method flow can be applied to a production accident scenario to analyze a production accident.

[0116] S101: Obtain a set of accident samples for the organization to be analyzed.

[0117] The accident sample set may include positive accident samples and negative accident samples; different accident samples may correspond to different time periods.

[0118] The label of the positive accident sample can be used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the positive accident sample may include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident.

[0119] The label of the accident negative sample can be used to characterize that no accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident negative sample can include: the third event characteristics of the event that occurred in the organization to be analyzed within the corresponding time period.

[0120] S102: Constructing an accident analysis model to be trained, specifically including: obtaining a number of event types, and creating a corresponding event node for each obtained event type in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained.

[0121] Among them, the accident analysis model to be trained can be a Bayesian network model.

[0122] S103: Training the accident analysis model to be trained according to the accident sample set to obtain an accident analysis model.

[0123] The accident analysis model can at least be used to determine the impact relationship between event types and accidents.

[0124] The above method process can train the Bayesian network model through the event characteristics and accident labels of the accident samples in the accident sample set to obtain an accident analysis model based on the event type, so as to facilitate the analysis of accidents of the organization to be analyzed. Specifically, it can include determining the impact relationship of the event type on the accident, and it can also include using the belief propagation algorithm to determine the edge probability distribution of other nodes for some nodes with determined values, so as to facilitate accident prediction or accident tracing.

[0125] In addition, since the features of the positive samples in the accident sample set used to train the accident analysis model include the event features of the events that occurred after the accident, the accident analysis model can also learn the impact of the occurrence of an accident on other event types.

[0126] The following is a detailed explanation of each step.

[0127] S101: Obtain a set of accident samples for the organization to be analyzed.

[0128] The following explains the two points respectively, namely the institution to be analyzed and the accident sample set.

[0129] 1. Institutions to be analyzed.

[0130] In an optional embodiment, the organization to be analyzed may be an organization that needs to conduct an accident analysis, and the organization may specifically be an enterprise, a group, an institution, an administrative department, and the like.

[0131] In an optional embodiment, for each of the multiple institutions to be analyzed, an accident sample set may be obtained for training the accident analysis model.

[0132] Optionally, a set of accident samples may be obtained for multiple institutions to be analyzed. Specifically, accident samples of multiple institutions to be analyzed may be combined to obtain an accident sample set for training the accident analysis model.

[0133] Optionally, the different institutions to be analyzed may be in the same industry or similar industries or institutions with similar businesses, so that accident samples of multiple institutions to be analyzed can be integrated to increase the number of accident samples and improve the effect of the accident analysis model.

[0134] 2. Accident sample collection.

[0135] In an optional embodiment, the accident sample set may include several accident samples. Optionally, the features of the accident samples may include event-related features, and the labels of the accident samples may be used to characterize accident-related information. For ease of description, the features of the accident samples are referred to as event features, and the labels of the accident samples are referred to as accident labels.

[0136] Optionally, the event features of the accident samples can be used to characterize the features of accident-related events, specifically the features of events without accidents, or the features of events before and after accidents. Optionally, the event features of the accident samples can include event types and corresponding event-related quantitative data, so as to facilitate the subsequent training of accident analysis models for determining the impact relationship between event types and accidents. Event-related quantitative data may include: whether the event occurred, the number of times the event occurred, the number of people involved in the event, etc.

[0137] Optionally, the accident label of the accident sample can be used to characterize relevant information of the accident, such as whether the accident occurred, the type of accident, the level of the accident, the number of people involved in the accident, etc.

[0138] In an optional embodiment, accident samples can be distinguished as to whether an accident has occurred. Optionally, the accident sample set may include positive accident samples and negative accident samples, specifically, may include a plurality of positive accident samples and a plurality of negative accident samples. For the positive accident samples and the negative accident samples, the determined event features may be different.

[0139] Optionally, different accident samples may correspond to different time periods, wherein the different time periods corresponding to different accident samples may have overlapping parts. The different time periods corresponding to different accident samples may also have different lengths.

[0140] Optionally, if an accident occurs in the organization to be analyzed within a certain time period, the accident sample corresponding to the time period can be determined as a positive accident sample. The accident label of the accident sample can be determined based on the relevant information of the accident, and the event characteristics of the accident sample can be determined based on the events before and after the accident, so as to facilitate the determination of the impact of the event type before the accident on the accident, and also facilitate the determination of the impact of the accident on the event type after the accident.

[0141] Therefore, optionally, the label of the positive accident sample can be used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period. The characteristics of the positive accident sample may include: a first event characteristic of an event that occurred in the organization to be analyzed within a first preset time period before the accident, and a second event characteristic of an event that occurred in the organization to be analyzed within a second preset time period after the accident. The first preset time period and the second preset time period are not specifically limited, and can be specified based on expert experience or determined by data statistical methods.

[0142] Optionally, the first event feature may be a feature of one or more event types. Specifically, the first event feature may be determined based on a number of events that occurred in the to-be-analyzed mechanism within a first preset time period before the accident. The second event feature may be a feature of one or more event types. Specifically, the second event feature may be determined based on a number of events that occurred in the to-be-analyzed mechanism within a second preset time period after the accident.

[0143] Optionally, if no accident occurs in the organization to be analyzed within a certain time period, the accident sample corresponding to the time period can be determined as a negative accident sample. Since there is no accident within the time period, the accident label of the accident sample can indicate that no accident occurs in the organization to be analyzed within the corresponding time period, and all events within the time period corresponding to the accident sample can be regarded as events before the accident occurs, and the event characteristics of the accident sample can be determined based on the events that occurred in the organization to be analyzed within the corresponding time period.

[0144] Therefore, optionally, the label of the accident negative sample can be used to characterize that no accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident negative sample can include: a third event feature of an event that occurred in the organization to be analyzed within the corresponding time period.

[0145] Optionally, the second event feature may be a feature of one or more event types. Specifically, the third event feature may be determined based on a number of events that occurred in the organization to be analyzed within a corresponding time period.

[0146] For ease of understanding, an example of an accident sample is given below.

[0147] The characteristics of an accident sample may be: 3 administrative penalties, 2 production standard publicity, 4 senior personnel changes. The label of the accident sample may be: no accident occurred.

[0148] Another accident sample may have the following characteristics: 10 administrative penalties before the accident, 0 production standard publicity before the accident, 9 senior personnel changes before the accident, and 3 legal proceedings after the accident. The labels of this accident sample may be: an accident occurred, the accident level was level 2, and 5 people were involved in the accident.

[0149] Another accident sample may have the following characteristics: abnormal business operations, illegal or irregular events, and no industrial and commercial changes. The label of this accident sample may be: no accident occurred.

[0150] Of course, the method flow does not limit the feature form or label form of the accident sample, and the above example is only used for illustrative purposes. Among them, whether an accident occurs or not can be replaced by data, specifically, 1 can be used to represent an accident, and 0 can be used to represent no accident.

[0151] After the accident samples are identified, the process of this method does not limit the source of the accident sample set. It can be obtained directly from the organization to be analyzed, or it can be obtained from multiple data sources through data fusion.

[0152] In an optional embodiment, obtaining the accident sample set may include: obtaining relevant data of the organization to be analyzed from several data sources. From the relevant data of the organization to be analyzed, accident samples may be obtained and added to the accident sample set.

[0153] Optionally, the data sources may include regulatory departments or administrative departments, from which the operating data and penalty information of the institution to be analyzed can be easily obtained. The data sources may also include websites related to the institution to be analyzed. For example, data may be obtained from the official website of the institution to be analyzed, which may specifically include reward information, senior personnel changes, etc.

[0154] Optionally, the relevant data of the organization to be analyzed may include: event information of events related to the organization to be analyzed, and accident information of accidents related to the organization to be analyzed.

[0155] In addition, optionally, the obtained data related to the organization to be analyzed may be in the form of text or pictures. Therefore, it is necessary to extract information from the relevant data through feature engineering, so as to facilitate the subsequent acquisition of accident samples from the relevant data of the organization to be analyzed.

[0156] For example, through text structured parsing, accident-related information such as the punishment authority, penalty amount, etc. can be extracted from the accident report.

[0157] This method flow does not limit the method of obtaining accident samples from relevant data of the organization to be analyzed.

[0158] Optionally, several time periods may be directly determined, and accident samples may be obtained based on accidents and events within the time periods. Specifically, after several time periods are determined, for any time period, if relevant data show that an accident occurred in the organization to be analyzed within the time period, a positive accident sample may be obtained; if relevant data show that no accident occurred in the organization to be analyzed within the time period, a negative accident sample may be obtained.

[0159] In an optional embodiment, the events and accidents of the organization to be analyzed may be sorted by time, and then accident samples may be obtained through a sliding window.

[0160] Optionally, in the relevant information of the organization to be analyzed, the event information at least includes the occurrence time, and the accident information at least includes the occurrence time; obtaining accident samples from the relevant data of the organization to be analyzed and adding them to the accident sample set may include the following steps.

[0161] Starting from the preset time point, the following steps S1-S3 are executed cyclically until the first stop condition is met. This embodiment does not specifically limit the first stop condition. Optionally, the first stop condition may be that the number of samples in the accident sample set reaches an upper limit, or the number of cycles reaches an upper limit, or there is no event or accident within a specified time period, or the specified time period includes the current time point. The specified time period is a time period of the third preset duration after the current preset time point.

[0162] S1: When it is determined that there are relevant accidents occurring within a specified time period in the relevant data of the organization to be analyzed, a positive accident sample is generated according to the determined accident; and the generated positive accident sample is added to the accident sample set.

[0163] S2: When it is determined that there are no relevant accidents that occurred within the specified time period in the relevant data of the organization to be analyzed, generate accident negative samples based on relevant events that occurred within the specified time period; and add the generated accident negative samples to the accident sample set.

[0164] S3: Determine a time point that is a fourth preset time length after the current preset time point as the current preset time point.

[0165] Optionally, the third preset time length may be regarded as the length of the sliding window, and the fourth preset time length may be regarded as the step length of the sliding window. The third preset time length and the fourth preset time length may be different.

[0166] In this embodiment, accident samples are obtained by sliding windows, so that the number of accident samples can be increased, thereby facilitating improving the effect of subsequent model training.

[0167] In an optional embodiment, the positive accident sample is generated specifically according to the determined accident, and the positive accident sample may be generated according to a single accident.

[0168] Optionally, when it is determined that there are related accidents that occurred within a specified time period in the relevant data of the organization to be analyzed, positive accident samples are generated based on the determined accidents, and one positive accident sample can be generated for each existing accident.

[0169] For example, if there are three accidents, the accident labels of the positive samples of the accidents can be determined for each accident according to the relevant information of the accident, and the first event features of the positive samples of the accidents can be obtained according to the events that occurred in the to-be-analyzed organization within the first preset time period before the accident; the second event features of the positive samples of the accidents can be obtained according to the events that occurred in the to-be-analyzed organization within the second preset time period after the accident. Thus, three positive samples of accidents can be obtained.

[0170] In addition, optionally, when specifically acquiring accident samples and determining event features of the accident samples, it is possible to avoid using other accidents as event features. Of course, in other optional embodiments, it is also possible to use other accidents as event features.

[0171] S102: Constructing an accident analysis model to be trained, specifically including: obtaining a number of event types, and creating a corresponding event node for each obtained event type in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained.

[0172] Among them, the accident analysis model to be trained can be a Bayesian network model.

[0173] In an optional embodiment, since the accident analysis model can be used to determine the impact relationship between event types and accidents, it is usually necessary to select event types that may affect accidents for creating event nodes.

[0174] Therefore, optionally, several event types are obtained, specifically, several event types that may affect the accident are obtained based on expert experience.

[0175] Optionally, obtaining several event types may also be determined based on the objective data obtained, specifically, based on the accident sample set. Specifically, obtaining several event types may include: determining several event types from event features of accident samples in the accident sample set.

[0176] Optionally, the event characteristics may include an event type.

[0177] Therefore, the event type is specifically determined from the event characteristics, and the included event type can be directly obtained from the event characteristics.

[0178] In this embodiment, several event types are determined through the accident sample set, and corresponding event nodes are created, which can facilitate the subsequent training of the accident analysis model to be trained based on the accident sample set.

[0179] In addition, since the features of the accident positive samples include the features of events occurring before the accident and the features of events occurring after the accident, different event types can be distinguished, which can specifically include the types of events occurring before the accident and the types of events occurring after the accident.

[0180] Optionally, determining several event types from event features of accident samples in the accident sample set may include: for any positive accident sample in the accident sample set, determining the pre-accident event type from the first event feature of the positive accident sample, and determining the post-accident event type from the second event feature of the positive accident sample.

[0181] Correspondingly, optionally, the event features of the accident negative samples can be regarded as the features of the events that occurred before the accident.

[0182] In an optional embodiment, when creating a node in a Bayesian network model, since the node in the Bayesian network model needs to correspond to the probability distribution of a random variable, when specifically creating the node, the random variable corresponding to the node needs to be specified.

[0183] The method flow of this method does not specifically limit the method of specifying the random variable corresponding to the node, which can be manually specified or determined according to a preset "whether an event or accident occurs" random variable.

[0184] In an optional embodiment, the accident sample characteristics in the accident sample set may include quantitative data of events and quantitative data of accidents, and the random variables corresponding to the event nodes or the random variables corresponding to the accident nodes may be determined based on the accident sample characteristics in the accident sample set.

[0185] Optionally, a corresponding event node is created for each acquired event type in the accident analysis model to be trained. There is no specific limit on the number of event nodes created for each event type. One or more corresponding event nodes can be created for each event type to correspond to different random variables.

[0186] For example, for the high-level personnel change event type, you can create an event node corresponding to the random variable "whether the high-level personnel change event occurs", you can also create an event node corresponding to the random variable "the number of people involved in the high-level personnel change event", and you can also create an event node corresponding to the random variable "the number of times the high-level personnel change event occurs".

[0187] Optionally, an accident node corresponding to the accident is created in the accident analysis model to be trained. One or more accident nodes corresponding to the accident may be created to correspond to different random variables.

[0188] For example, when creating an accident node, multiple accident nodes can be created, corresponding to the random variables of whether an accident occurred, the random variables of the accident level, the random variables of the accident department, etc. Of course, a single accident node can also be created.

[0189] In addition, optionally, other nodes that may have an impact on the accident can be created in the accident analysis to be trained model. Optionally, an information node can be created in the accident analysis to be trained model for relevant information of the organization to be analyzed. The relevant information of the organization to be analyzed may include the size, industry, number of employees, etc. of the organization to be analyzed.

[0190] In an optional embodiment, nodes have been created in the accident analysis model to be trained in S102, and the edges between the nodes can be pre-specified, specifically, they can be specified based on manual experience or expert guidance. It should be noted that the Bayesian network model contains nodes and edges, forming a directed acyclic graph. In addition, the edges in the Bayesian network model can represent the probabilistic dependency relationship between the connected nodes.

[0191] Therefore, based on experience, the possible probabilistic dependencies between the random variables corresponding to the nodes can be determined to obtain the initial accident analysis model to be trained, so as to facilitate subsequent model training.

[0192] S103: Training the accident analysis model to be trained according to the accident sample set to obtain an accident analysis model.

[0193] Among them, the accident analysis model can at least be used to determine the impact relationship between event types and accidents.

[0194] For ease of understanding, Figure 2 The figure is a schematic diagram of the structure of an accident analysis model provided in an embodiment of this specification.

[0195] The accident analysis model may include four event nodes 1-4 and one accident node.

[0196] Event node 1 corresponds to the type of administrative penalty event before the accident, and also corresponds to the random variable "whether the administrative penalty event before the accident occurred".

[0197] Event node 2 corresponds to the event type of personnel change before the accident, and also corresponds to the random variable "whether the personnel change event occurred before the accident".

[0198] Event node 3 corresponds to the type of post-accident administrative penalty event, and also corresponds to the random variable "whether a post-accident administrative penalty event occurs".

[0199] Event node 4 corresponds to the post-accident legal proceedings event type, and also corresponds to the random variable "whether the post-accident legal proceedings event occurs".

[0200] The accident node corresponds to the random variable "whether an accident occurs".

[0201] In addition, there are directed edges from event node 1 to accident node, directed edges from event node 2 to accident node, directed edges from accident node to event node 3, and directed edges from accident node to event node 4 in the accident analysis model.

[0202] It should be noted that the parameters in the accident analysis model are the conditional probability distribution of the random variables corresponding to each node.

[0203] For example, the conditional probability distribution of the random variable corresponding to the accident node can be the probability distribution under the condition of whether the administrative penalty event occurred before the accident and whether the personnel change event occurred before the accident. Based on this probability distribution, it is convenient to determine the influence relationship between the administrative penalty event before the accident and the personnel change event before the accident on the occurrence of the accident.

[0204] It can be seen that in the above accident analysis model example, whether the administrative penalty event occurred before the accident, and whether the personnel change event occurred before the accident, have a certain influence on whether the accident occurs, and the specific influence relationship can be analyzed according to the conditional probability distribution. In addition, whether the accident occurs, whether the administrative penalty event occurs after the accident, and whether the legal litigation event occurs after the accident also have a certain influence relationship, and the specific influence relationship can be analyzed according to the conditional probability distribution.

[0205] In an optional embodiment, training the accident analysis model to be trained may include: determining a network structure of the accident analysis model to be trained through training; and determining parameters of the accident analysis model to be trained through training based on the determined network structure.

[0206] In other words, when training a Bayesian network model, you need to first determine the network structure through training, and then determine the model parameters.

[0207] 1. Network structure.

[0208] In an optional embodiment, the network structure of the accident analysis model to be trained is determined through training, a Bayesian scoring function can be set to determine the loss, and then the network structure is updated and iterated through a preset search algorithm (specifically, the number and position of directed edges can be updated) until a stopping condition is met. The stopping condition can specifically be that the Bayesian score meets the condition, or finally converges, or the number of iterations reaches a preset upper limit.

[0209] Optionally, the preset search algorithm may include a simulated annealing search algorithm, a hill climbing algorithm, and the like.

[0210] Optionally, a simulated annealing search algorithm based on a Bayesian scoring function can be used to qualitatively analyze the topological relationship between factors: f:D→G.

[0211] Where D is the data set and G is the Bayesian network structure. The specific steps may include: 1) Determine the initial structure of the model based on expert experience. 2) Optimize the structure through machine learning. First, the degree of influence between factors is obtained through the Bayesian scoring function; secondly, the next structure with a higher score is iteratively found through the simulated annealing heuristic search algorithm. 3) When the structure tends to be stable, the final structure is corrected according to expert experience. In this way, the network structure of the accident analysis model can be constructed by combining objective data and business experience, and since each node has a corresponding random variable, it is more interpretable.

[0212] Optionally, determining the network structure of the accident analysis model to be trained through training may include: determining the initial network structure of the accident analysis model to be trained; looping the following steps until a second stop condition is met: scoring the network structure of the current accident analysis model to be trained based on a preset scoring function, and updating the network structure of the current accident analysis model to be trained through a preset heuristic algorithm.

[0213] Optionally, to determine the initial network structure of the accident analysis model to be trained, it is necessary to determine the directed edges between the nodes in the accident analysis model to be trained.

[0214] Optionally, based on business experience and expert guidance, directed edges can be constructed between different nodes in the accident analysis model to be trained for possible impacts between nodes. For example, after expert guidance, it is believed that the high-level personnel change event before the accident has a greater impact on the accident. Therefore, directed edges can be constructed from the event node to the accident node for the event node and the accident node corresponding to the high-level personnel change event type before the accident. In this way, an initial network structure can be obtained to facilitate subsequent model training.

[0215] Optionally, an analysis may be performed on the accident sample set to preliminarily determine different nodes with greater impact relationships, construct directed edges, and obtain an initial network structure.

[0216] This embodiment does not limit the second stopping condition, which may be that the network structure tends to converge, or the number of cycles reaches a preset upper limit, or the score obtained based on the Bayesian scoring function is greater than a preset scoring threshold, meets certain requirements, etc.

[0217] Optionally, when scoring the network structure of the accident analysis model to be trained, the preset scoring function may be a Bayesian scoring function or other scoring functions.

[0218] Optionally, the preset heuristic algorithm may be an ant colony algorithm or a simulated annealing algorithm, etc.

[0219] In an optional embodiment, after the loop stops, the network structure of the accident analysis model to be trained can be determined to facilitate subsequent parameter learning. Optionally, since the random variables corresponding to the nodes in the accident analysis model to be trained have practical meanings, the network structure of the accident analysis model to be trained can be further modified with the help of business experience and expert guidance. For example, after the loop stops, in the network structure of the accident analysis model to be trained, there is a directed edge from the node corresponding to the post-accident event type to the node corresponding to the pre-accident event type, but in reality, due to the existence of a temporal relationship, there is no impact of the post-accident event on the pre-accident event, so the directed edge can be deleted, or the direction of the directed edge can be modified.

[0220] It should be noted that the Bayesian network model can reflect the probabilistic dependency between different nodes. In other words, in the accident analysis model, in addition to reflecting the probabilistic dependency between event nodes and accident nodes, for example, the impact of event types on accidents, the impact of accidents on event types, etc., it can also reflect the probabilistic dependency between different event nodes, that is, the impact between different event types, so as to facilitate the analyzed organization to analyze the causes of accidents from a global perspective and make targeted improvements.

[0221] For example, the accident analysis model can be used to determine the impact relationship between event types and accidents, which can specifically include the impact relationship between the event type before the accident and the impact relationship between the accident and the event type after the accident. In addition, the impact relationship between event types can also be included. Specifically, there may be an impact relationship between illegal event types and abnormal business event types.

[0222] 2. Model parameters.

[0223] The goal of parameter learning is to determine the conditional probability distribution of random variables corresponding to each node of the Bayesian network model given the network structure G and the training sample set D (i.e., the accident sample set).

[0224] Among them, if the accident sample set contains random variable related data corresponding to each node in the Bayesian network model, that is, the accident sample set is a complete data set for the accident analysis model to be trained, then the conditional probability distribution can be directly determined based on the accident sample set.

[0225] Optionally, when each event type in the accident analysis model to be trained exists in the accident sample set, parameter learning can be performed using a maximum likelihood estimation method and a Bayesian estimation method.

[0226] Optionally, the accident sample set contains each event type in the accident analysis model to be trained. Specifically, the accident sample set may contain event features related to each event type in the accident analysis model to be trained, thereby facilitating determination of the probability distribution of each event node in the accident analysis model to be trained based on objective data.

[0227] For example, when constructing an accident analysis model to be trained, when determining the event type for creating the corresponding event node based on the event features of the accident samples in the accident sample set, each event type in the accident analysis model to be trained exists in the accident sample set.

[0228] Optionally, the accident sample set may not contain any event type in the accident analysis model to be trained. Specifically, the accident sample set may not contain event features related to any event type in the accident analysis model to be trained. The accident sample set may not contain event features related to one or more event types in the accident analysis model to be trained.

[0229] Optionally, when constructing the accident analysis model to be trained, several event types may be obtained, specifically, the event types may be obtained based on expert experience. However, relevant data of these event types may be difficult to collect, so some of the obtained event types may not exist in the accident sample set.

[0230] For event types that are missing from these accident sample sets, it is difficult to determine the probability distribution of the corresponding event nodes based on objective data.

[0231] In an optional embodiment, when any event type in the accident analysis model to be trained does not exist in the accident sample set, an expectation maximization algorithm can be used to determine the parameters of the accident analysis model to be trained.

[0232] The principle of the expectation maximization algorithm is to first assume a set of model parameters to determine the probability distribution of missing data. Then, based on the probability distribution of missing data and other data, new model parameters can be determined by maximizing the likelihood function, and then the above steps are repeated to determine the probability distribution of missing data based on the new model parameters until the loop stop condition is met. The loop stop condition can specifically be reaching the convergence condition.

[0233] Optionally, a set of model parameters may be assumed through a preset prior distribution, which may be a Dirichlet prior distribution.

[0234] In an optional embodiment, determining the parameters of the accident analysis model to be trained through training may include: when any event type in the accident analysis model to be trained does not exist in the accident sample set, determining the parameters of the accident analysis model to be trained using an expectation maximization algorithm based on a preset prior distribution.

[0235] Optionally, the expectation-maximization algorithm may include the following steps: the following steps are executed cyclically, and the E step and the M step are executed alternately and iteratively until a preset loop stop condition is met.

[0236] Step E: Calculate the conditional probability expectation of the joint probability distribution in the accident analysis model to be trained.

[0237] Specifically, it can be calculated by the following formula:

[0238] Q(Z)=P(Z|D,θ i )

[0239] The accident sample set is D, the event type missing from the accident sample set is Z, and the parameter of the accident analysis model to be trained is θ, where θ i The current model parameters can be represented by . The model parameters in the first loop can be assumed.

[0240] Then the likelihood function about θ can be determined based on Q(Z):

[0241] l(θ)=Q(Z)log P(D,Z|θ)

[0242] Step M: Maximize the likelihood function to obtain new model parameters θ i+1 . It can be calculated by the following formula:

[0243]

[0244] Alternatively, if θ i+1 If convergence has been achieved, the algorithm ends and the final model parameter θ is output, otherwise the iterative process continues.

[0245] Then we can use the new model parameters θ i+1 The loop executes step E until the loop stop condition is met.

[0246] The loop stop condition can be that the model parameters converge or the loop reaches a preset upper limit.

[0247] The method flow does not limit the form of the likelihood function, and the above is only used for exemplary description.

[0248] Optionally, the expected maximum EM algorithm is used to iteratively calculate the probability distribution. The specific steps are to execute the following steps in a loop, with the E step and the M step being executed alternately.

[0249] Among them, the E step is:

[0250] Q(Z)=P(Z|D,θ i )

[0251] The accident sample set is D, the event type missing from the accident sample set is Z, and the parameter of the accident analysis model to be trained is θ, where θ i The current model parameters can be represented by . The model parameters in the first loop can be assumed.

[0252] The M step is:

[0253]

[0254] Alternatively, if θ i+1 If convergence has been achieved, the algorithm ends and the final model parameter θ is output, otherwise the iterative process continues.

[0255] Then we can use the new model parameters θ i+1 The loop executes step E until the loop stop condition is met.

[0256] The loop stop condition can be that the model parameters converge or the loop reaches a preset upper limit.

[0257] The likelihood function with respect to θ can be determined according to the following inequality.

[0258]

[0259] When the parameter θ is fixed, the above inequality can be equal.

[0260] After the model parameters are determined through the above embodiments, an accident analysis model can be obtained.

[0261] Optionally, the accident analysis model can determine the influence of other event nodes on the accident based on the conditional probability distribution of the accident node, thereby determining the influence of the event type on the accident, and the influence of the accident on other event types.

[0262] Furthermore, it is possible to identify impact relationships between different event types.

[0263] It can be seen that the accident analysis model can grasp the impact relationship between event types and accidents from a global perspective, thereby facilitating the analysis of accidents.

[0264] In an optional embodiment, by determining the values ​​of random variables of some nodes, the marginal probability distribution of other nodes can be determined according to the accident analysis model, thereby facilitating prediction and tracing.

[0265] Optionally, the accident analysis model can also be used to: determine the marginal probability distribution of any other node using the belief propagation algorithm when the values ​​of random variables corresponding to some nodes are determined.

[0266] Optionally, when the values ​​of random variables corresponding to one or more nodes are determined, the belief propagation algorithm can be used to determine the marginal probability distribution of any other node.

[0267] Specifically, when determining the values ​​of random variables of some event nodes, for example, determining that events of some event types have occurred, the values ​​of random variables of event nodes corresponding to these event types can be determined, and then the marginal probability distribution of random variables of accident nodes can be determined through the belief propagation algorithm, so as to determine the probability distribution of accident-related situations under the condition that some event types have occurred, which can specifically be the probability distribution of whether an accident has occurred, and thus can help analyze and predict whether an accident will occur.

[0268] Of course, accident-related situations can also include random variables such as accident level, accident department, number of people involved in the accident, etc., and the marginal probability distribution can be determined based on the belief propagation algorithm to help analyze and predict possible accident situations.

[0269] Of course, when an accident has already occurred, the random variable value of the accident node can be determined based on the relevant information of the accident, and then the marginal probability distribution of other event nodes can be determined through the belief propagation algorithm. Specifically, the marginal probability distribution of whether other event nodes occur can be determined, thereby helping to analyze and determine the cause of the accident.

[0270] The belief propagation algorithm can calculate the marginal probability distribution of each random variable in the accident analysis model. The influence of random variables can be propagated in the network structure of the accident analysis model. When the values ​​of a part of the random variables are observed, the marginal probability distribution of the target variable can be inferred. According to the marginal probability distribution of the target variable (which can be a random variable related to the accident or a random variable of other event types), analysis can be performed. Specifically, since each variable has a clear meaning and is highly interpretable, it can be combined with subjective business experience or expert guidance to help conduct a comprehensive analysis. Specifically, the results of the accident analysis model and subjective experience can be combined to verify each other, so as to facilitate a comprehensive analysis of the accident and provide auxiliary suggestions for emergency management.

[0271] In summary, the accident analysis model can be used to analyze the impact relationship between accidents and event types from multiple perspectives, determine the degree of influence of event types on accidents, and use belief propagation algorithms to make predictions and trace causes based on conditions, etc., to facilitate comprehensive analysis of accidents.

[0272] The above method process constructs a Bayesian network model for event types and accidents as an accident analysis model to assist in accident analysis. It can observe the impact of event types on accidents under different conditions from a global perspective, and can explicitly express the meaning of each random variable. It has strong interpretability, which makes it possible to analyze and verify the results of the accident analysis model in combination with expert guidance or business experience, and also to interpret and correct it.

[0273] For example, the conditional probability distribution of the accident node in the accident analysis model (when a high-level personnel change event occurs, the probability of an accident occurring is 90%, and the probability of no accident occurring is 10%) can be explained and corrected in combination with business experience. Specifically, the conditional probability distribution can be explained, and high-level personnel changes can easily lead to accidents. This explanation can also be verified by business experience.

[0274] Therefore, the accident analysis model of the above method process is obtained based on objective data training, which realizes the quantification of the impact of different event types on accidents. It not only deeply reveals the laws of accidents, but also provides a means of measurement and management. By controlling the conditions of different event types, it can achieve refined management and precise law enforcement.

[0275] At the same time, it can also facilitate the provision of dual-driven learning and conclusion verification capabilities for emergency management based on a large amount of objective data and expert experience.

[0276] In addition, the above method process can dynamically observe the impact between event types and accidents under different conditions through the belief propagation algorithm, providing an interactive working mode for emergency management and able to infer conclusions through incomplete evidence.

[0277] In addition, the above method process is highly scalable. When adding new event nodes or accident nodes (specifically, adding new event types or new accident information), training can be quickly performed directly based on the existing network structure without significantly changing the model configuration.

[0278] For ease of understanding, the embodiments of this specification also provide an application embodiment.

[0279] In the scenario of production safety accidents, a production accident analysis model to be trained can be constructed to analyze the impact relationship between the event type of any organization and production accidents.

[0280] Specifically, a set of production accident samples can be obtained for the organization to be analyzed.

[0281] The production accident sample set may include positive accident samples and negative accident samples; different accident samples may correspond to different time periods.

[0282] The label of the positive accident sample can be used to characterize that a production accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the positive accident sample may include: the first event characteristic of the event that occurred in the organization to be analyzed within the first preset time period before the production accident occurred, and the second event characteristic of the event that occurred in the organization to be analyzed within the second preset time period after the production accident occurred.

[0283] The label of the accident negative sample can be used to characterize that no production accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident negative sample may include: the third event characteristics of the events that occurred in the organization to be analyzed within the corresponding time period.

[0284] Afterwards, a production accident analysis model to be trained can be constructed, specifically including: obtaining several event types, and creating corresponding event nodes for each obtained event type in the production accident analysis model to be trained, and creating accident nodes corresponding to production accidents in the production accident analysis model to be trained.

[0285] Among them, the model to be trained for production accident analysis can be a Bayesian network model.

[0286] Specifically, the acquired event types may include: daily inspection events for production specifications, punishment events for production specifications, safety knowledge publicity events, safety facility construction events, etc. These event types may be determined based on business experience and expert guidance, or based on event characteristics of accident samples in a production accident sample set.

[0287] Specifically, for creating a corresponding accident node for a production accident, you can specify random variables such as whether the production accident occurs, the level of the production accident, the number of people involved in the production accident, and the department where the production accident is located to create the corresponding accident node.

[0288] Finally, the production accident analysis model to be trained can be trained based on the production accident sample set to obtain a production accident analysis model.

[0289] The production accident analysis model can at least be used to determine the impact relationship between event types and production accidents.

[0290] The specific explanation of the above application embodiment can refer to the explanation of the above method flow.

[0291] Corresponding to the above method flow, the embodiments of this specification also provide a device embodiment.

[0292] like Figure 3 The figure is a schematic diagram of the structure of an accident analysis model training device provided in an embodiment of the present specification, which may include the following units.

[0293] The sample acquisition unit 301 is used to acquire a set of accident samples for the organization to be analyzed.

[0294] The accident sample set includes positive accident samples and negative accident samples; different accident samples correspond to different time periods.

[0295] The label of the positive accident sample is used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the positive accident sample include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident.

[0296] The label of the accident negative sample is used to characterize that no accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident negative sample include: the third event characteristics of the event that occurred in the organization to be analyzed within the corresponding time period.

[0297] The model building unit 302 is used to build an accident analysis model to be trained, specifically including: obtaining a number of event types, and creating a corresponding event node for each acquired event type in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained.

[0298] The accident analysis model to be trained is a Bayesian network model.

[0299] The training unit 303 is used to train the accident analysis model to be trained according to the accident sample set to obtain the accident analysis model.

[0300] The accident analysis model is at least used to analyze the impact relationship between event types and accidents.

[0301] Optionally, the sample acquisition unit 301 can be specifically used to: acquire relevant data of the organization to be analyzed from several data sources; the relevant data includes: event information of events related to the organization to be analyzed, and accident information of accidents related to the organization to be analyzed. From the relevant data, an accident sample is acquired and added to the accident sample set.

[0302] Optionally, the event information includes at least the time of occurrence; the accident information includes at least the time of occurrence.

[0303] The sample acquisition unit 301 can be specifically used to: start from the preset time point, loop and execute the following steps until the first stop condition is met: when it is determined that there is a related accident with an occurrence time within the specified time period in the related data, generate a positive accident sample according to the determined accident; the specified time period is a time period of the third preset time length after the current preset time point; add the generated positive accident sample to the accident sample set; when it is determined that there is no related accident with an occurrence time within the specified time period in the related data, generate a negative accident sample according to the related events with an occurrence time within the specified time period; add the generated negative accident sample to the accident sample set. Determine the time point of the fourth preset time length after the current preset time point as the current preset time point.

[0304] Optionally, the model building unit 302 includes: an event type determination subunit 302a, configured to determine a number of event types from event features of accident samples in the accident sample set.

[0305] Optionally, the event type determination subunit 302a is specifically used to: for any positive accident sample in the accident sample set, determine the pre-accident event type from the first event feature of the positive accident sample, and determine the post-accident event type from the second event feature of the positive accident sample.

[0306] Optionally, the model training unit 303 includes: a network structure training subunit 303a, which is used to determine the network structure of the accident analysis model to be trained through training.

[0307] The parameter training subunit 303b is used to determine the parameters of the accident analysis model to be trained through training based on the determined network structure.

[0308] Optionally, the network structure training subunit 303a is specifically used to: determine the initial network structure of the accident analysis model to be trained; loop the following steps until the second stop condition is met: score the network structure of the current accident analysis model to be trained based on a preset scoring function; update the network structure of the current accident analysis model to be trained by a preset heuristic algorithm.

[0309] Optionally, the preset scoring function may be a Bayesian scoring function, and the preset heuristic algorithm may be a simulated annealing search algorithm.

[0310] Optionally, the parameter training subunit 303b is specifically used to: determine the parameters of the accident analysis model to be trained using an expectation maximization algorithm according to a preset prior distribution when any event type in the accident analysis model to be trained does not exist in the accident sample set.

[0311] Optionally, the accident analysis model is also used to: determine the marginal probability distribution of any other node by using a belief propagation algorithm when the values ​​of random variables corresponding to some nodes are determined.

[0312] The specific explanation of the above device embodiment can refer to the explanation of the above method flow.

[0313] An embodiment of the present specification also provides an electronic device, including a processor and a memory; the memory stores a program that can be called by the processor; wherein, when the processor executes the program, the accident analysis model training method described in any of the above method embodiments is implemented.

[0314] The embodiments of this specification also provide a machine-readable storage medium on which a program is stored. When the program is executed by a processor, the accident analysis model training method described in any of the above method embodiments is implemented.

[0315] An embodiment of the present specification also provides a computer device, which includes at least a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the accident analysis model training method as described in any of the above method embodiments is implemented.

[0316] Figure 4 A more specific hardware structure diagram of a computer device provided in an embodiment of this specification is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0317] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0318] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0319] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0320] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0321] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0322] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0323] The embodiments of this specification also provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the accident analysis model training method described in any of the above method embodiments is implemented.

[0324] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0325] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the embodiments of this specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of this specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments of this specification.

[0326] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0327] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0328] The above is only a specific implementation of the embodiments of this specification. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiments of this specification. These improvements and modifications should also be regarded as protection for the embodiments of this specification.

Claims

1. An accident analysis model training method, comprising: For the organization to be analyzed, obtain a collection of accident samples; The accident sample set includes positive accident samples and negative accident samples; Different accident samples correspond to different time periods; The label of the accident positive sample is used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident positive sample include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident; The label of the accident negative sample is used to indicate that no accident occurred in the organization to be analyzed in the corresponding time period; the characteristics of the accident negative sample include: the third event characteristics of the event that occurred in the organization to be analyzed in the corresponding time period; Constructing an accident analysis model to be trained, specifically comprising: obtaining a number of event types, and creating a corresponding event node for each of the obtained event types in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained; the accident analysis model to be trained is a Bayesian network model; The accident analysis model to be trained is trained according to the accident sample set to obtain an accident analysis model; the accident analysis model is at least used to analyze the influence relationship between event types and accidents.

2. According to the method of claim 1, the step of obtaining the accident sample set comprises: Obtain relevant data on the institution to be analyzed from several data sources; The relevant data includes: event information of events related to the organization to be analyzed, and accident information of accidents related to the organization to be analyzed; Obtain accident samples from the relevant data and add them to the accident sample set.

3. The method according to claim 2, wherein the event information at least includes the occurrence time; The accident information at least includes the time of occurrence; The step of obtaining an accident sample from the relevant data and adding the sample to the accident sample set includes: Starting from the preset time point, the following steps are executed cyclically until the first stop condition is met: When it is determined that there is a related accident in the related data that occurs within a specified time period, a positive accident sample is generated according to the determined accident; the specified time period is a time period of a third preset time length after the current preset time point; and the generated positive accident sample is added to the accident sample set; When it is determined that there is no relevant accident with an occurrence time within the specified time period in the relevant data, generating a negative accident sample according to the relevant events with an occurrence time within the specified time period; and adding the generated negative accident sample to the accident sample set; A time point that is a fourth preset time length after the current preset time point is determined as the current preset time point.

4. The method according to claim 1, wherein obtaining a plurality of event types comprises: From the event features of the accident samples in the accident sample set, Identify several event types.

5. The method according to claim 4, wherein determining a plurality of event types from the event features of the accident samples in the accident sample set comprises: For any positive accident sample in the accident sample set, the pre-accident event type is determined from the first event feature of the positive accident sample, and the post-accident event type is determined from the second event feature of the positive accident sample.

6. The method according to claim 1, wherein the training of the accident analysis model to be trained comprises: Determine the network structure of the accident analysis model to be trained through training; Based on the determined network structure, the parameters of the accident analysis model to be trained are determined through training.

7. The method according to claim 6, wherein determining the network structure of the accident analysis model to be trained through training comprises: Determining the initial network structure of the accident analysis model to be trained; The following steps are executed repeatedly until the second stop condition is met: Scoring the network structure of the current accident analysis model to be trained based on a preset scoring function; Update the network structure of the current accident analysis model to be trained through a preset heuristic algorithm.

8. The method according to claim 7, wherein the preset scoring function is a Bayesian scoring function, and the preset heuristic algorithm is a simulated annealing search algorithm.

9. The method according to claim 6, wherein determining the parameters of the accident analysis model to be trained through training comprises: In the case that any event type in the accident analysis model to be trained does not exist in the accident sample set, the parameters of the accident analysis model to be trained are determined using an expectation maximization algorithm based on a preset prior distribution.

10. According to the method of claim 1, the accident analysis model is also used to: determine the marginal probability distribution of any other node by using a belief propagation algorithm when the values ​​of random variables corresponding to some nodes are determined.

11. An accident analysis model training device, comprising: A sample acquisition unit, used to acquire a set of accident samples for the organization to be analyzed; The accident sample set includes positive accident samples and negative accident samples; Different accident samples correspond to different time periods; The label of the accident positive sample is used to characterize that an accident occurred in the organization to be analyzed within the corresponding time period; the characteristics of the accident positive sample include: the first event characteristics of the event that occurred in the organization to be analyzed within the first preset time period before the accident, and the second event characteristics of the event that occurred in the organization to be analyzed within the second preset time period after the accident; The label of the accident negative sample is used to indicate that no accident occurred in the organization to be analyzed in the corresponding time period; the characteristics of the accident negative sample include: the third event characteristics of the event that occurred in the organization to be analyzed in the corresponding time period; The model building unit is used to build an accident analysis model to be trained, specifically including: obtaining a number of event types, and creating a corresponding event node for each event type obtained in the accident analysis model to be trained, and creating an accident node corresponding to the accident in the accident analysis model to be trained; the accident analysis model to be trained is a Bayesian network model; The training unit is used to train the accident analysis model to be trained according to the accident sample set to obtain an accident analysis model; the accident analysis model is at least used to analyze the influence relationship between event types and accidents.

12. An electronic device, comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein: When the processor executes the program, it implements the accident analysis model training method as described in any one of claims 1-10.

13. A machine-readable storage medium having a program stored thereon, which, when executed by a processor, implements the accident analysis model training method as described in any one of claims 1 to 10.