Construction method and device of reason analysis model, equipment, storage medium and program product
By mining the relevant data of comprehensive management management events, building a mining data set and training a cause analysis model, the problem of inaccurate event cause analysis in the existing technology is solved, and higher analysis accuracy is achieved.
Patent Information
- Application Number
- CN202410985521.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-12-24
AI Technical Summary
In terms of event cause traceability in the application of comprehensive management management, the existing intelligent model is not accurate enough to analyze the cause of the event.
By mining the relevant data of multiple events, a mining data set is built, including the correlation between events and potential causes, and based on this, the initial cause analysis model is trained to obtain the target cause analysis model to improve events and potential Analysis of correlation between causes.
The accuracy of event cause analysis is significantly improved. By mining the target cause analysis model trained in the data set, it can more accurately correlate events with potential causes, improving the accuracy of the analysis.
Smart Images

Figure CN119179902A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data analysis technology, and in particular to a method, device, equipment, storage medium and program product for constructing a cause analysis model. Background Art
[0002] With the development of artificial intelligence technology, various types of intelligent models can be applied to fields such as intelligent manufacturing, intelligent transportation and smart cities. For example, deep neural networks have demonstrated excellent performance in natural language processing, image recognition, and speech recognition.
[0003] At present, with the rapid development of the combination of social management and scientific and technological applications, the application of intelligent models to comprehensive social security management has become an inevitable trend in the current comprehensive management application. For example, various types of face recognition models can be used to efficiently and accurately identify people involved in social events, and statistical analysis models can be used to conduct efficient census and surveys of the population.
[0004] However, in terms of tracing the causes of incidents in comprehensive management applications, the current intelligent models are not accurate in analyzing the causes of incidents. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, equipment, storage medium and program product for constructing a cause analysis model that can improve the accuracy of event cause analysis in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for constructing a cause analysis model, comprising:
[0007] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0008] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0009] The above method mines the relevant data of the event and then trains the initial analysis model based on the mined data set to obtain the target cause analysis model. Compared with the traditional method of only training the cause classification model based on the acquired relevant data of the event, the present application considers mining the relevant data of the event and then training the analysis model based on the mined data, which greatly improves the analysis accuracy of the target cause analysis model.
[0010] In one embodiment, the data mining of the relevant data of the multiple events is performed to obtain mining data sets of various types of events, including:
[0011] Classify and summarize multiple events to obtain multiple types of events and related data sets of various types of events;
[0012] Data mining is performed on relevant data sets of various types of events to obtain mining data sets of various types of events.
[0013] The data mining method provided in the embodiments of the present application takes into account that different types of events may have a certain negative impact on data mining. Therefore, multiple events are first classified and summarized, and then data mining is performed based on the relevant data sets of each type of events after classification and summary, thereby ensuring that the correlation between the mined events and potential causes is more accurate.
[0014] In one embodiment, the above data sets related to various types of events are mined to obtain mining data sets of various types of events, including:
[0015] Build a tree structure based on relevant data sets of various types of events;
[0016] Data mining is performed on the tree structures corresponding to various types of events to obtain mining data sets of various types of events.
[0017] Compared with the existing method of determining the degree of association between events and potential causes through statistical analysis, the method for obtaining a mining data set for events provided in the embodiments of the present application realizes the association relationship between events and potential causes by constructing a tree structure and performing data mining on the tree structure, thereby greatly improving the data mining efficiency.
[0018] In one embodiment, the tree structure is constructed based on relevant data sets of various types of events, including:
[0019] For each type of event, the relevant data sets are analyzed to obtain the corresponding relationship between each event of the same type and the potential cause;
[0020] A tree structure is constructed based on the correspondence between events of the same type and potential causes.
[0021] The embodiment of the present application provides a method for constructing a tree structure, which determines the tree structure corresponding to the events of the same type by analyzing the relationship between each event and potential causes of the same type, thereby providing a data basis for subsequent analysis of the mining data set corresponding to the events of the same type.
[0022] In one embodiment, data mining is performed on the tree structures corresponding to various types of events to obtain mining data sets of various types of events, including:
[0023] For each type of event, identify multiple potential causes corresponding to the event;
[0024] Determine the search link corresponding to each potential cause from the tree structure;
[0025] Statistics are collected on the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of that type.
[0026] The method for obtaining a mining data set for an event provided in an embodiment of the present application obtains a mining data set for events of the same type by counting the data nodes on the search link corresponding to each potential cause in a tree structure, and then provides a data basis for subsequent training of a cause analysis model based on the correlation between the event and each potential cause according to the correlation between the event and each potential cause.
[0027] In one embodiment, the above data nodes on the search link corresponding to each potential cause are counted to obtain a mining data set of events of the type, including:
[0028] For each search link corresponding to a potential cause, the number of occurrences of the data nodes on the search link is counted to obtain a corresponding relationship between the potential cause and the number of occurrences;
[0029] Based on the correspondence between all potential causes and their occurrence times, the correlation between events and potential causes is determined.
[0030] The embodiment of the present application provides a correlation relationship between events and potential causes. By mining the number of occurrences of each potential cause in the tree structure, the correlation relationship between potential causes and events is analyzed, providing a data basis for subsequent training of event prediction models based on the correlation relationship between potential causes and events.
[0031] In a second aspect, the present application also provides a device for constructing a cause analysis model, comprising:
[0032] A mining module is used to perform data mining on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0033] The training module is used to train the initial cause analysis model according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the degree of correlation between the input events and the corresponding potential causes.
[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0036] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0038] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0039] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0040] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0041] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0042] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0043] The above-mentioned cause analysis model construction method, device, equipment, storage medium and program product, the above-mentioned method mines the relevant data of the event and then trains the initial analysis model based on the mined data set to obtain the target cause analysis model. Compared with the traditional method of obtaining a cause classification model based only on the relevant data of the acquired event, the present application considers mining the relevant data of the event and then training the analysis model based on the mined data, which greatly improves the analysis accuracy of the target cause analysis model. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 An application environment diagram of a method for constructing a cause analysis model in an embodiment;
[0046] Figure 2 A schematic diagram of a process for constructing a cause analysis model in an embodiment;
[0047] Figure 3 A schematic diagram of a process for constructing a cause analysis model in another embodiment;
[0048] Figure 4 A schematic diagram of a process for constructing a cause analysis model in another embodiment;
[0049] Figure 5 A schematic diagram of a process for constructing a cause analysis model in another embodiment;
[0050] Figure 6 is a relationship table between comprehensive public security management events and potential causes in one embodiment;
[0051] Figure 7 A tree structure corresponding to a comprehensive public security management event in an embodiment;
[0052] Figure 8 A schematic diagram of a process for constructing a cause analysis model in another embodiment;
[0053] Fig. 9 A schematic diagram of a process for constructing a cause analysis model in another embodiment;
[0054] Fig.10 A schematic diagram of a process for constructing a cause analysis model in another embodiment;
[0055] Fig.11 It is a structural block diagram of a device for constructing a cause analysis model in an embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] With the development of artificial intelligence technology, various types of intelligent models can be applied to fields such as intelligent manufacturing, intelligent transportation and smart cities. For example, deep neural networks have demonstrated excellent performance in natural language processing, image recognition, and speech recognition. At present, with the rapid development of the combination of social management and scientific and technological applications, the application of intelligent models to comprehensive social security management has also become an inevitable trend in the current comprehensive management application. For example, various types of face recognition models can be used to efficiently and accurately identify people involved in social events, and statistical analysis models can be used to conduct efficient censuses and surveys of the population.
[0058] However, in the aspect of event cause tracing in comprehensive management application, the current intelligent model does not accurately analyze the event cause. The embodiment of the present application aims to solve this problem.
[0059] After introducing the background technology of the method for constructing the cause analysis model provided in the embodiment of the present application, the following briefly describes the implementation environment involved in the method for constructing the cause analysis model provided in the embodiment of the present application. The method for constructing the cause analysis model provided in the embodiment of the present application can be applied to Figure 1 In the computer device shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store sample data of various types of business. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for constructing a cause analysis model is implemented.
[0060] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0061] After introducing the application scenarios of the method for constructing a cause analysis model provided in the embodiments of the present application, the following focuses on introducing the method for constructing a cause analysis model described in the present application.
[0062] In one embodiment, Figure 2 As shown in the figure, a method for constructing a cause analysis model is provided. Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0063] S201. Perform data mining on relevant data of multiple events to obtain mining data sets of various types of events.
[0064] Among them, events refer to comprehensive governance events, and multiple events can be multiple events of the same type or multiple events of different types.
[0065] Among them, relevant data include data generated in the process of comprehensive governance, such as data on hidden problems and contradictions, data on mass incidents and public security, data on labor disputes of human resources and social security, and economic data. Relevant data include offline data and real-time data. Offline data is a large batch of data that is periodically migrated and has low requirements for timeliness. It is generally obtained by distributed batch data synchronization. Real-time data is for low-latency data application scenarios and is generally obtained through incremental logs or notification messages.
[0066] Among them, the mining data set includes the association between events and potential causes, where potential causes refer to the causes that may cause events to occur, and the association between events and potential causes refers to the degree of match between events and potential causes. For example, if the match between events and potential cause 1 is 80%, the match between events and potential cause 2 is 40%, and the match between events and potential cause 3 is 20%, then it can be concluded that the association between events and potential cause 1 is the highest, and the association between events and potential cause 3 is the lowest.
[0067] In an embodiment of the present application, when it is necessary to analyze the relationship between various types of events and the potential causes corresponding to the events, relevant data of multiple events to be analyzed can be obtained first, and the relevant data of multiple events can be classified according to preset types to obtain relevant data of different types of events, and data mining can be performed on the relevant data of each type of event to obtain mining data sets of each type of event. Optionally, the relevant data of multiple events can be first input into a preset classification model for classification to obtain relevant data of different types of events, and then the relevant data of different types of events can be respectively input into the corresponding mining model for data mining to obtain mining data sets of each type of event.
[0068] It should be noted that, based on the data warehouse technology (Extract-Load-Transform, ELT) mode, relevant data of multiple events can be obtained from the database, and after obtaining the relevant data of multiple events, the relevant data of multiple events are preprocessed to obtain the preprocessed data, and then data mining is performed based on the preprocessed data to obtain mining data sets of various types of events.
[0069] Optionally, preprocessing includes data cleaning, data integration, data conversion and data normalization; data cleaning includes removing duplicate values, processing missing values, processing outliers, etc.; data integration refers to integrating data from multiple data sources together, including data connection and merging, etc.; data conversion refers to the conversion of data types and data formats, etc.; data normalization refers to the standardized processing of naming and units, including uppercase and lowercase, symbols, time format, etc.
[0070] S202: Train the initial cause analysis model according to the mining data set to obtain a target cause analysis model.
[0071] Among them, the initial cause analysis model includes a neural network model.
[0072] Among them, the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes. The correlation degree between the input events and different potential causes is different.
[0073] In the embodiment of the present application, after the mining data sets of various types of events are obtained as described above, for any type of event mining data set, the mining data set is input into the initial cause analysis model to train the initial cause analysis model to obtain a target cause analysis model.
[0074] The method for constructing a cause analysis model provided in the embodiments of the present application performs data mining on the relevant data of multiple events to obtain mining data sets of various types of events, trains the initial cause analysis model based on the mining data sets to obtain the target cause analysis model, and the target cause analysis model is used to perform correlation analysis on the input events to obtain the degree of correlation between the input events and the corresponding potential causes. Since the above method mines the relevant data of the events and then trains the initial analysis model based on the mining data sets after mining to obtain the target cause analysis model, compared with the traditional method of obtaining a cause classification model based only on the relevant data of the acquired events, the present application considers mining the relevant data of the events and then training the analysis model based on the mined data, which greatly improves the analysis accuracy of the target cause analysis model.
[0075] In one embodiment, Figure 2Based on the illustrated embodiment, the process of obtaining mining data sets of various types of events can be described, such as Figure 3 As shown, the above S201 "performs data mining on relevant data of multiple events to obtain mining data sets of various types of events" includes:
[0076] S301. Classify and summarize multiple events to obtain multiple types of events and related data sets of various types of events.
[0077] The relevant data set refers to all possible potential causes of the event.
[0078] In the embodiment of the present application, after the multiple events are obtained as described above, the multiple events can be classified according to the event type to obtain the event type corresponding to each event, and then all events in each event type are summarized to obtain multiple events corresponding to each event type and related data sets corresponding to the multiple events. It should be noted that the related data sets of various types of events are the related data sets corresponding to multiple events in each event type.
[0079] For example, multiple events include event 1, event 2, and event 3, and the event types include environmental pollution events and comprehensive public security management events. Event 1 belongs to the environmental pollution event, and event 2 and event 3 belong to the comprehensive public security management event. The relevant data set of the environmental pollution event is the relevant data set of event 1, and the relevant data set of the comprehensive public security management event is the relevant data set of event 2 and event 2.
[0080] S302: Perform data mining on relevant data sets of various types of events to obtain mining data sets of various types of events.
[0081] In the embodiment of the present application, after the relevant data sets of various types of events are obtained as described above, the relevant data sets of various types of events can be input into a preset mining model for data mining to obtain the association between various types of events and potential causes. It should be noted that the preset mining model can be obtained by inputting the calibrated event types and calibrated potential causes into an initial neural network model for training, and the embodiment of the present application will not be elaborated here.
[0082] The data mining method provided in the embodiments of the present application takes into account that different types of events may have a certain negative impact on data mining. Therefore, multiple events are first classified and summarized, and then data mining is performed based on the relevant data sets of each type of events after classification and summary, thereby ensuring that the correlation between the mined events and potential causes is more accurate.
[0083] In one embodiment, Figure 3Based on the illustrated embodiment, the process of obtaining mining data sets of various types of events can be further described, such as Figure 4 As shown, the above S302 "performs data mining on relevant data sets of various types of events to obtain mining data sets of various types of events" includes:
[0084] S401. Construct a tree structure according to relevant data sets of various types of events.
[0085] Among them, the tree structure refers to EP-tree. Generally, the process of constructing the tree structure includes: first, creating a root node. The root node of FP-Tree does not store any information and is only used to connect the paths between the potential causes of different events; second, for any event of the same type of event, starting from the root node of EP-tree, each potential cause in the event is processed in turn; third, for any other event of the same type of event except the above event, if the child node corresponding to the potential cause of the event already exists, the count corresponding to the potential cause is increased by one. If the child node corresponding to the current potential cause does not exist, a new child node is created as the child node corresponding to the potential cause; then, for other events of the same type of event, the above process is repeated until all events are processed, and the EP-tree is constructed according to the corresponding relationship between all events and potential causes in the same type of event; finally, the number of occurrences of each potential cause is counted, the corresponding relationship between each potential cause and its number of occurrences is obtained, and the item header table is obtained.
[0086] In the embodiment of the present application, after multiple events are classified and summarized to obtain relevant data sets of various types of events, for each type of event, a corresponding tree structure is constructed according to the event and the potential cause corresponding to the event.
[0087] S402: Perform data mining on tree structures corresponding to various types of events to obtain mining data sets of various types of events.
[0088] In the embodiment of the present application, after the tree structures corresponding to the various types of events are obtained, data mining can be performed on the tree structures according to the characteristics of the tree structures to obtain mining data sets for the various types of events. Optionally, the number of the same potential causes on the tree structures corresponding to a certain type of event can be counted to determine the number of each potential cause, and the number of each potential cause can be determined as the mining data set for this type of event.
[0089] Compared with the existing method of determining the degree of association between events and potential causes through statistical analysis, the method for obtaining a mining data set for events provided in the embodiments of the present application realizes the association relationship between events and potential causes by constructing a tree structure and performing data mining on the tree structure, thereby greatly improving the data mining efficiency.
[0090] In one embodiment, Figure 4 Based on the embodiment shown, the process of constructing a tree structure can be further described, such as Figure 5 As shown, the above S401 "constructing a tree structure according to relevant data sets of various types of events" includes:
[0091] S501 : Analyze relevant data sets corresponding to each type of event to obtain corresponding relationships between events of the same type and potential causes.
[0092] In an embodiment of the present application, each type of event includes multiple events, and the relevant data corresponding to each event includes multiple potential causes. For all potential causes corresponding to any type of event, all potential causes are analyzed to determine which potential causes are the same event, and then determine which potential causes are included in each event of the same type, and obtain the corresponding relationship between each event of the same type and the potential causes.
[0093] S502: Construct a tree structure according to the corresponding relationship between events of the same type and potential causes.
[0094] In an embodiment of the present application, after the correspondence between events of the same type and potential causes is obtained as described above, a subtree structure of the event is constructed for the potential cause corresponding to any event of the same type, and then the subtree structures corresponding to all events of the same type are merged to obtain a tree structure of the same type.
[0095] For example, for the following Figure 6 The table shows 6 comprehensive public security management events of the same type of event, where one row represents one comprehensive public security management event, and the criminal situation, public security situation and road traffic situation are all potential causes of the comprehensive public security management event. Figure 6 The potential reasons in the tree structure are as follows Figure 7 shown.
[0096] according to Figure 7 It can be seen that after scanning the situation database, each situation is sorted in descending order of frequency: 5 for criminal situations, 4 for public security situations, and 3 for road traffic situations.
[0097] The embodiment of the present application provides a method for constructing a tree structure, which determines the tree structure corresponding to the events of the same type by analyzing the relationship between each event and potential causes of the same type, thereby providing a data basis for subsequent analysis of the mining data set corresponding to the events of the same type.
[0098] In one embodiment, Figure 5 Based on the illustrated embodiment, the process of obtaining mining data sets of various types of events can be further described, such as Figure 8 As shown, the above S402 "performs data mining on the tree structures corresponding to various types of events to obtain mining data sets of various types of events" includes:
[0099] S601: For each type of event, determine multiple potential causes corresponding to the event.
[0100] In the embodiment of the present application, after the same type of tree structure is constructed as above, for each type of multiple events, multiple potential causes corresponding to each event are determined on the tree structure. Figure 7 Potential causes of this type of incident shown include: criminal type situations, public security type situations and road traffic type situations.
[0101] S602: Determine the search link corresponding to each potential cause from the tree structure.
[0102] In the embodiment of the present application, after determining multiple potential causes corresponding to the same type of event, for each potential cause in the tree structure, the same potential cause is linked together to obtain search links corresponding to each potential cause. Figure 7 As shown, the same potential cause is linked by dotted arrows to obtain search links corresponding to each potential cause.
[0103] S603: Count the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of the same type.
[0104] The data nodes on the search link refer to the counts corresponding to the potential causes appearing on the search link.
[0105] In an embodiment of the present application, after the search links corresponding to each potential cause are determined as described above, the data nodes on the search links corresponding to each potential cause are counted to obtain the total number of occurrences of each potential cause, and a mining data set for events of the same type is constructed based on the total number of occurrences of each potential cause.
[0106] Optionally, when mining the counts corresponding to each potential cause in the tree structure, the following three indicators may be considered: support, confidence, and imbalance ratio.
[0107] Among them, the support represents the probability of including both event A and event B in the tree structure. The support formula between event A and event B is as follows: The frequency of potential causes appearing in the tree structure is called the support count. The support count can be used as a condition to measure whether the correlation is strong and can screen out the potential cause set that meets the condition.
[0108] Among them, confidence refers to the potential cause with the highest correlation with the event in the potential cause set, and the potential cause with the highest correlation with other events, which reflects the certainty of the rule. The confidence formula is as follows:
[0109] Among them, the imbalance ratio refers to the association rule The imbalance degree of item sets A and B included in the predecessor and successor of in the transaction database is as follows: Among them, Sup represents the support, which can well evaluate the authenticity of the association rules. When the imbalance ratio is infinitely close to zero, it can be said that the association rules between the item sets are very balanced, and vice versa.
[0110] The method for obtaining a mining data set for an event provided in an embodiment of the present application obtains a mining data set for events of the same type by counting the data nodes on the search link corresponding to each potential cause in a tree structure, and then provides a data basis for subsequent training of a cause analysis model based on the correlation between the event and each potential cause according to the correlation between the event and each potential cause.
[0111] In one embodiment, Figure 8 Based on the illustrated embodiment, the process of obtaining mining data sets of various types of events can be further described, such as Fig. 9 As shown, the above S603 "statisticing the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of the type" includes:
[0112] S701 . For each search link corresponding to a potential cause, count the number of occurrences of the data node on the search link to obtain a corresponding relationship between the potential cause and the number of occurrences.
[0113] The number of occurrences of the data node is the count corresponding to each potential cause.
[0114] In an embodiment of the present application, after the search links corresponding to each potential cause are determined as described above, for any search link corresponding to a potential cause, the counts corresponding to each potential cause on this search link are statistically calculated to obtain the total number of times any potential cause appears in the tree structure. Based on the same method, the total number of times each potential cause appears in the tree structure is obtained, and then the corresponding relationship between each potential cause and the total number of times it appears is obtained.
[0115] For example, Figure 7 As shown, the search links for the potential cause of criminal situation a include: a:4 and a:1, so the total number of occurrences of the potential cause of criminal situation a is 4+1=5; the search links for the potential cause of public security situation b include: b:3 and b:1, so the total number of occurrences of the potential cause of public security situation b is 3+1=4; the search links for the potential cause of road traffic situation c include: c:2, c:1 and c:1, so the total number of occurrences of the potential cause of criminal situation c is 2+1+1=4, and then the corresponding relationship between the potential cause and the number of occurrences is obtained: criminal situation a: 5, public security situation b: 4 and road traffic situation c: 4.
[0116] S702: Determine the association relationship between the event and the potential cause according to the correspondence between all the potential causes and the number of occurrences.
[0117] In the embodiment of the present application, after the correspondence between all potential causes and the number of occurrences is obtained as described above, the ratio between the number of occurrences corresponding to any potential cause and the total number of occurrences of all potential causes is used as the correlation between any potential cause and the event. Continuing with the above example, the correlation between criminal situations and events is determined to be (a:5) / (a:5+b:4+c:4)=0.38, the correlation between public security situations and events is determined to be (b:4) / (a:5+b:4+c:4)=0.31, and the correlation between road traffic situations and events is determined to be (c:4) / (a:5+b:4+c:4)=0.31. Furthermore, it is determined that the potential cause with the highest correlation with the event is the criminal situation.
[0118] The embodiment of the present application provides a correlation relationship between events and potential causes. By mining the number of occurrences of each potential cause in the tree structure, the correlation relationship between potential causes and events is analyzed, providing a data basis for subsequent training of event prediction models based on the correlation relationship between potential causes and events.
[0119] In one embodiment, if the amount of aggregated data gradually increases with the accumulation of the model, for example, from one thousand to one hundred thousand, the FP-growth algorithm is optimized and improved on the premise of inheriting its advantages, aiming at its problems of waste of memory resources, low execution efficiency and large number of frequent itemsets. It is recommended to use an ordered FP-tree structure instead of the traditional FP-tree. Since the nodes in the tree structure are ordered, the number of mining data sets can be effectively reduced, the waste of storage space can be reduced, and the efficiency of program execution can be accelerated.
[0120] The improved FP-tree is used to replace the traditional FP-tree. The nodes in the ordered FP-tree define four domain space contents, namely name, count, pcLink and nLink. Among them, the name domain stores the transaction address value corresponding to the node in the transaction table; the count domain stores the frequent count of the node; the pcLink domain points to the first child node when the tree structure is established, and points to the parent node after the tree building process is completed; the nLink domain points to the sibling node when the tree structure is established, and points to the next node position with the same name after completion. When inserting different child nodes of the same parent node, they need to be arranged in descending order according to the transaction address value of the node, which can reduce the number of visits to the child nodes, thereby achieving the goal of efficient tree building. The nodes in the traditional FP-tree are unordered. The nodes of the ordered FP-tree occupy about 2 / 3 of the memory resources compared with the traditional FP-tree. In the process of tree building, the orderliness of the nodes in the horizontal direction can be used to reduce the number of child node traversals, thereby improving the efficiency of the tree building process. When mining the maximum frequent item set by using the orderliness in the vertical direction, the number of mining can be reduced, thereby improving the efficiency of the mining process.
[0121] In one embodiment, for events of the comprehensive governance type, through the target cause analysis model constructed above, the events of the comprehensive governance type and multiple potential causes of the events can be input into the target cause analysis model for correlation analysis to obtain the correlation between the events of the comprehensive governance type and each potential cause. Based on the frequent item set results calculated and counted based on the traditional FP-tree and the optimized FP-tree, the high frequency in the final frequent item set is the high-incidence inducement of the comprehensive governance events, and vice versa, it is the low-incidence inducement, so the correlation analysis results of the factors that can be regarded as inducements in the multi-dimensional data and the comprehensive governance events can be obtained, which can help the relevant departments to decide on inducement disposal and judgment.
[0122] In one embodiment, Fig.10 As shown in the figure, a complete method for constructing a cause analysis model is also provided, including:
[0123] S10, classifying and summarizing multiple events to obtain multiple types of events and related data sets of various types of events;
[0124] S11, analyzing the relevant data sets corresponding to each type of event to obtain the corresponding relationship between each event of the same type and the potential cause;
[0125] S12, constructing a tree structure according to the corresponding relationship between events of the same type and potential causes;
[0126] S13. For each type of event, determine multiple potential causes corresponding to the event;
[0127] S14, determining the search link corresponding to each potential cause from the tree structure;
[0128] S15, for each search link corresponding to a potential cause, counting the number of occurrences of the data node on the search link, and obtaining a corresponding relationship between the potential cause and the number of occurrences;
[0129] S16, determining the correlation between the event and the potential cause according to the correspondence between all the potential causes and the number of occurrences;
[0130] S17. Train the initial cause analysis model according to the mining data set to obtain the target cause analysis model.
[0131] The above method mines the relevant data of the event and then trains the initial analysis model based on the mined data set to obtain the target cause analysis model. Compared with the traditional method of only training the cause classification model based on the acquired relevant data of the event, the present application considers mining the relevant data of the event and then training the analysis model based on the mined data, which greatly improves the analysis accuracy of the target cause analysis model.
[0132] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0133] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing a cause analysis model for implementing the method for constructing a cause analysis model involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for constructing one or more cause analysis models provided below can refer to the limitations of the method for constructing a cause analysis model above, and will not be repeated here.
[0134] In an exemplary embodiment, Fig.11 As shown, a device for constructing a cause analysis model is provided, comprising: a mining module 10 and a training module 11, wherein:
[0135] The mining module 10 is used to perform data mining on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between the events and potential causes;
[0136] The training module 11 is used to train the initial cause analysis model according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0137] In an exemplary embodiment, the mining module 10 includes: a classification unit and a mining unit, wherein:
[0138] The classification unit is specifically used to classify and summarize multiple events to obtain multiple types of events and related data sets of various types of events;
[0139] The mining unit is specifically used to perform data mining on relevant data sets of various types of events to obtain mining data sets of various types of events.
[0140] In an exemplary embodiment, the mining unit is further used to construct a tree structure according to relevant data sets of various types of events; perform data mining on the tree structures corresponding to various types of events to obtain mining data sets of various types of events.
[0141] In an exemplary embodiment, the above-mentioned mining unit is specifically used to analyze the relevant data sets corresponding to each type of event to obtain the corresponding relationship between each event of the same type and the potential cause; and construct a tree structure according to the corresponding relationship between each event of the same type and the potential cause.
[0142] In an exemplary embodiment, the above-mentioned mining unit is specifically used to determine multiple potential causes corresponding to each type of event; determine the search link corresponding to each potential cause from the tree structure; and count the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of the type.
[0143] In an exemplary embodiment, the above-mentioned mining unit is specifically used to count the number of occurrences of data nodes on the search link corresponding to each potential cause, so as to obtain the corresponding relationship between the potential cause and the number of occurrences; based on the corresponding relationship between all potential causes and the number of occurrences, determine the correlation relationship between the event and the potential cause.
[0144] Each module in the device for constructing the cause analysis model can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0145] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data of the event. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for constructing a cause analysis model is implemented.
[0146] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0148] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0149] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0151] Classify and summarize multiple events to obtain multiple types of events and related data sets of various types of events;
[0152] Data mining is performed on relevant data sets of various types of events to obtain mining data sets of various types of events.
[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0154] Build a tree structure based on relevant data sets of various types of events;
[0155] Data mining is performed on the tree structures corresponding to various types of events to obtain mining data sets of various types of events.
[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0157] For each type of event, the relevant data sets are analyzed to obtain the corresponding relationship between each event of the same type and the potential cause;
[0158] A tree structure is constructed based on the correspondence between events of the same type and potential causes.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] For each type of event, identify multiple potential causes corresponding to the event;
[0161] Determine the search link corresponding to each potential cause from the tree structure;
[0162] Statistics are collected on the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of that type.
[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0164] For each search link corresponding to a potential cause, the number of occurrences of the data nodes on the search link is counted to obtain a corresponding relationship between the potential cause and the number of occurrences;
[0165] Based on the correspondence between all potential causes and their occurrence times, the correlation between events and potential causes is determined.
[0166] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0167] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0168] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0170] Classify and summarize multiple events to obtain multiple types of events and related data sets of various types of events;
[0171] Data mining is performed on relevant data sets of various types of events to obtain mining data sets of various types of events.
[0172] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0173] Build a tree structure based on relevant data sets of various types of events;
[0174] Data mining is performed on the tree structures corresponding to various types of events to obtain mining data sets of various types of events.
[0175] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0176] For each type of event, the relevant data sets are analyzed to obtain the corresponding relationship between each event of the same type and the potential cause;
[0177] A tree structure is constructed based on the correspondence between events of the same type and potential causes.
[0178] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0179] For each type of event, identify multiple potential causes corresponding to the event;
[0180] Determine the search link corresponding to each potential cause from the tree structure;
[0181] Statistics are collected on the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of that type.
[0182] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0183] For each search link corresponding to a potential cause, the number of occurrences of the data nodes on the search link is counted to obtain a corresponding relationship between the potential cause and the number of occurrences;
[0184] Based on the correspondence between all potential causes and their occurrence times, the correlation between events and potential causes is determined.
[0185] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0186] Data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include the association relationship between events and potential causes;
[0187] The initial cause analysis model is trained according to the mining data set to obtain the target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input events to obtain the correlation degree between the input events and the corresponding potential causes.
[0188] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0189] Classify and summarize multiple events to obtain multiple types of events and related data sets of various types of events;
[0190] Data mining is performed on relevant data sets of various types of events to obtain mining data sets of various types of events.
[0191] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0192] Build a tree structure based on relevant data sets of various types of events;
[0193] Data mining is performed on the tree structures corresponding to various types of events to obtain mining data sets of various types of events.
[0194] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0195] For each type of event, the relevant data sets are analyzed to obtain the corresponding relationship between each event of the same type and the potential cause;
[0196] A tree structure is constructed based on the correspondence between events of the same type and potential causes.
[0197] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0198] For each type of event, identify multiple potential causes corresponding to the event;
[0199] Determine the search link corresponding to each potential cause from the tree structure;
[0200] Statistics are collected on the data nodes on the search link corresponding to each potential cause to obtain a mining data set of events of that type.
[0201] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0202] For each search link corresponding to a potential cause, the number of occurrences of the data nodes on the search link is counted to obtain a corresponding relationship between the potential cause and the number of occurrences;
[0203] Based on the correspondence between all potential causes and their occurrence times, the correlation between events and potential causes is determined.
[0204] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0205] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0206] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0207] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for constructing a cause analysis model, characterized in that: The method comprises: Performing data mining on relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include associations between events and potential causes; The initial cause analysis model is trained according to the mining data set to obtain a target cause analysis model; the target cause analysis model is used to perform correlation analysis on input events to obtain the degree of correlation between the input events and the corresponding potential causes.
2. The method according to claim 1, characterized in that The data mining is performed on the relevant data of multiple events to obtain mining data sets of various types of events, including: Classifying and summarizing the multiple events to obtain multiple types of events and related data sets of the various types of events; Data mining is performed on relevant data sets of various types of events to obtain mining data sets of the various types of events.
3. The method according to claim 2, characterized in that The data mining is performed on the relevant data sets of various types of events to obtain the mining data sets of the various types of events, including: Constructing a tree structure according to relevant data sets of the various types of events; Data mining is performed on the tree structures corresponding to the various types of events to obtain mining data sets of the various types of events.
4. The method according to claim 3, characterized in that The step of constructing a tree structure according to the relevant data sets of the various types of events includes: For each type of event, the relevant data set is analyzed to obtain a corresponding relationship between each event of the same type and a potential cause; A tree structure is constructed according to the corresponding relationship between each event of the same type and the potential cause.
5. The method according to claim 3, characterized in that: The data mining of the tree structures corresponding to the various types of events to obtain the mining data sets of the various types of events includes: For each type of event, determining a plurality of potential causes corresponding to the event; Determine the search link corresponding to each of the potential causes from the tree structure; Statistics are collected on the data nodes on the search link corresponding to each of the potential causes to obtain a mining data set of the event type.
6. The method according to claim 5, characterized in that The step of performing statistics on the data nodes on the search link corresponding to each of the potential causes to obtain a mining data set of events of the type includes: For each search link corresponding to the potential cause, count the number of occurrences of the data node on the search link to obtain a corresponding relationship between the potential cause and the number of occurrences; According to the corresponding relationship between all potential causes and the number of occurrences, the correlation relationship between the event and the potential cause is determined.
7. A device for constructing a cause analysis model, characterized in that: The device comprises: A mining module is used to perform data mining on relevant data of multiple events to obtain mining data sets of various types of events; the mining data sets include associations between events and potential causes; The training module is used to train the initial cause analysis model according to the mining data set to obtain a target cause analysis model; the target cause analysis model is used to perform correlation analysis on the input event to obtain the degree of correlation between the input event and the corresponding potential cause.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
