Event alarm method, device, terminal equipment and storage medium
By acquiring and fusing behavioral event data, calculating the fusion characteristics of event streams, judging high-risk event streams and triggering alarms, the problem of alarm accuracy and low efficiency in the existing technology is solved, and efficient and accurate event alarms are achieved.
Patent Information
- Application Number
- CN202411259110.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-10
AI Technical Summary
In the prior art, it is difficult to analyze the correlation between other behavioral events when handling behavioral events, resulting in low alarm accuracy and relying on manual judgment, which makes the alarm efficiency in low.
By obtaining the first event data of the target event, determine the event stream corresponding to the target event, fuse the target event into the event stream, calculate the fusion characteristics of the event stream, and determine whether the event stream is a high-risk event stream based on the fusion characteristics, thereby triggering Alert for high-risk events.
There is no need to rely on manual judgment, which improves the efficiency of alarms, and improves the accuracy of alarms by combining event characteristics in the event stream.
Smart Images

Figure CN118797526B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to an event alarm method, device, terminal equipment and storage medium. Background Art
[0002] With the development of deep learning algorithms, machine learning models have been continuously optimized and iterated, enabling the models to understand and analyze people's behavioral events, and then to intelligently manage behavioral events in different fields, such as smart cities, industrial production and other fields.
[0003] Currently, statistical models can be used to analyze behavioral events and issue alerts for behavioral events that need to be handled with priority. However, since behavioral events are often associated with a series of other behavioral events, and statistical models are difficult to analyze in combination with the correlation between other behavioral events, there is a problem of low accuracy in alerts. Moreover, behavioral events are unstructured and complex, and it is necessary to rely on manual judgment of the priority of behavioral events in order to issue alerts for behavioral events that need to be handled with priority, resulting in low alert efficiency. Summary of the invention
[0004] The embodiments of the present application provide an event alarm method, apparatus, terminal device and storage medium, aiming to solve the problem that the existing processing and alarming of target events rely on manual judgment and have low alarm efficiency.
[0005] In a first aspect, an embodiment of the present application provides an event alarm method, the method comprising:
[0006] Obtain the first event data of the target event;
[0007] Determine an event stream corresponding to the target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain a target event stream;
[0008] Determine an event feature of each event in the target event stream, and calculate a fusion feature of the target event stream according to the event feature of each event in the target event stream;
[0009] When the target event flow is determined to be a high-risk event flow according to the fusion feature, a high-risk event alarm is triggered.
[0010] In a possible implementation manner of the first aspect, before acquiring the first event data of the target event, the method further includes:
[0011] Determine, based on the second event data of the historical event, the information of the subject of the appeal in the historical event, and generate the appeal category information of the historical event;
[0012] Calculating the semantic similarity between every two of the second event data;
[0013] The historical events are classified according to the demand subject information, the demand category information and the semantic similarity to obtain at least one event stream.
[0014] In a possible implementation manner of the first aspect, calculating the fusion feature of the target event stream according to the event feature of each event in the target event stream includes:
[0015] Extracting event features of each of the events in the target event stream, and determining event feature weights corresponding to the event features of each of the events; wherein different event features correspond to different event feature weights;
[0016] determining a time decay coefficient for each of the events in the target event stream;
[0017] The fusion feature of the target event stream is calculated according to the event feature weight and the time decay coefficient.
[0018] In a possible implementation manner of the first aspect, when the event feature includes a tone feature, extracting the event feature of each event in the target event stream includes:
[0019] Extracting a tone text description of each of the events in the target event stream;
[0020] According to the tone text description, an emotion coefficient corresponding to each of the events is generated, and based on the emotion coefficient, a tone feature of each of the events is generated.
[0021] In a possible implementation manner of the first aspect, before calculating the fusion feature of the target event stream according to the event feature of each event in the target event stream, the method further includes:
[0022] Obtain sample data corresponding to historical high-risk events and sample data corresponding to historical non-high-risk events;
[0023] Constructing an initial detection model; wherein the model parameters of the initial detection model include an initial time decay coefficient and an initial event feature weight;
[0024] The initial detection model is trained according to the sample data to obtain a target detection model, so as to execute the step of calculating the fusion features of the target event stream according to the event features of each event in the target event stream based on the target detection model; wherein the model parameters of the target detection model include a target time attenuation coefficient and a target event feature weight.
[0025] In a possible implementation manner of the first aspect, training the initial detection model according to the sample data to obtain the target detection model includes:
[0026] Generate sample features corresponding to the sample data according to the sample data, and input the sample features into the initial detection model to obtain a detection result corresponding to the sample data;
[0027] Determine event loss information between the detection result and the high-risk event, and when the event loss information is greater than or equal to a loss threshold, update the initial time decay coefficient and the initial event feature weight based on the event loss information, and repeat the step of obtaining the detection result corresponding to the sample data according to the updated initial event feature weight and the updated initial time decay coefficient until the event loss information is less than the loss threshold;
[0028] When the event loss information is less than the loss threshold, the trained initial detection model is determined as the target warning model.
[0029] In a possible implementation of the first aspect, when determining that the target event flow is a high-risk event flow according to the fusion feature, triggering a high-risk event alarm includes:
[0030] Inputting the fused features into the target detection model to obtain the urgency information of the target event stream;
[0031] When the urgency information satisfies a preset alarm condition, the target event stream is determined to be a high-risk event stream, and alarm information for high-risk events is generated to issue an alarm based on the alarm information; wherein the alarm information includes a target event list, and the target event list includes all events in the target event stream.
[0032] In a possible implementation manner of the first aspect, before determining the event stream corresponding to the target event according to the first event data, the method further includes:
[0033] identifying event features of the target event according to the first event data;
[0034] Determine the alarm relevance of the event characteristics of each of the target events, filter the first event data according to the alarm relevance to obtain filtered first event data, and perform the step of determining the event flow corresponding to the target event according to the first event data based on the filtered first event data.
[0035] In a second aspect, an embodiment of the present application provides an event alarm device, the device comprising:
[0036] An acquisition module, used for acquiring first event data of a target event;
[0037] a determination module, configured to determine an event stream corresponding to the target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain a target event stream;
[0038] A fusion module, used to determine the event feature of each event in the target event stream, and calculate the fusion feature of the target event stream according to the event feature of each event in the target event stream;
[0039] The alarm module is used to trigger a high-risk event alarm when the target event flow is determined to be a high-risk event flow according to the fusion feature.
[0040] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the event alarm method provided in the first aspect above is implemented.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the event alarm method provided in the first aspect is implemented.
[0042] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0043] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0044] In an embodiment of the present application, by acquiring the first event data of the target event, determining the event stream corresponding to the target event based on the first event data, and merging the target event into the event stream corresponding to the target event, the target event stream is obtained, the event characteristics of each event in the target event stream are determined, and the fusion characteristics of the target event stream are calculated based on the event characteristics of each event in the target event stream. In this way, when the target event stream is determined to be a high-risk event stream based on the fusion characteristics, a high-risk event alarm can be triggered without relying on manual judgment, thereby improving the efficiency of the alarm. Moreover, the alarm can be combined with the events in the target event stream to improve the accuracy of the alarm. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flowchart of a method for providing an event alarm according to an embodiment of the present application;
[0046] Figure 2 This is a flowchart of another event alarm method provided by an embodiment of the present application;
[0047] Figure 3 This is a flowchart of an event alarm method provided by an embodiment of the present application;
[0048] Figure 4 This is a schematic diagram of the architecture of an intelligent agent center provided by an embodiment of the present application;
[0049] Figure 5 It is a structural diagram of an event alarm device provided by an embodiment of the present application;
[0050] Figure 6 It is a structural block diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the technical problems, technical solutions and beneficial effects to be solved by 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.
[0052] See also Figure 1 , Figure 1 A flowchart of an event alarm method provided by an embodiment of the present application is shown, which may specifically include the following steps:
[0053] Step 101: Acquire first event data of a target event.
[0054] Among them, the target event can be a behavioral event that an individual or a group reflects based on their needs, that is, an event in which an individual or a group reflects their own needs. The first event data can be event data related to the target event. The event data can include event features related to the target event. The event features can include event objects, event overviews, occurrence time, occurrence locations, number of people and other features. The event object can be a person, location or organization related to the target event. The event overview can be the content of the target event. The occurrence time can be the time when the target event is initiated. The occurrence location can be the location where the target event occurs.
[0055] When an individual or a group reflects relevant events based on needs, the events that need to be reflected can be described in the form of text, voice, picture, video, etc., and then the text, voice, picture, video and other data reflected by the individual or group can be obtained, that is, the target event reflected by the individual or group and the first event data related to the target event can be obtained.
[0056] In actual applications, when individuals or groups reflect their own needs, they will describe the content of their needs, the objects related to their needs, the time of their needs, and the place of their needs. They will also record data such as the time, place, and number of people when the individuals or groups reflect their needs, thus obtaining data such as the event object, event overview, time of occurrence, place of occurrence, and number of people.
[0057] In a specific implementation, various forms of target events can be converted into text and recorded, so as to facilitate information extraction. For example, target events reflected by individuals or groups through e-mails, text messages, etc. can be converted into text descriptions and recorded, so that the recorded text descriptions can be determined as event data related to the target event, that is, the first event data.
[0058] In an embodiment of the present application, before step 101, the following steps may also be included:
[0059] According to the second event data of the historical event, the subject information of the appeal in the historical event is determined, and the category information of the historical event is generated, the semantic similarity between every two second event data is calculated, and the historical events are classified according to the subject information of the appeal, the category information of the appeal and the semantic similarity to obtain at least one event stream.
[0060] Among them, the historical event can be a behavioral event that occurred in the past period of time and reflected by an individual or group based on needs, and the second event data can be event data related to the historical event. The subject information of the appeal can be the event object in the historical event, and the event object can be a person, place or organization related to the target event, that is, the subject information of the appeal can be information such as people, places, enterprises, etc. related to the historical event. Specifically, the subject information of the appeal should be the most relevant information among the information such as people, places, enterprises, etc. related to the historical event. The category information of the appeal can be the category of the event profile in the historical event. Specifically, the category of the event profile can correspond to the field to which the historical event belongs. For example, the field to which the historical event belongs can include the smart city field and the industrial production field. The category of the event profile in the smart city field can correspond to various applications in the smart city field, such as remote / convenient services for residents, urban environment, etc., and the category of the event profile in the industrial production field can correspond to various applications in the industrial production field, such as production management, production monitoring, abnormal warning, etc. The semantic similarity can be the similarity of the event profile between each two historical events.
[0061] After each behavioral event in which an individual or group reflects a demand, the event data of the behavioral event can be obtained and stored in the cloud platform or local database, and then the event data of the behavioral event occurring within a preset time period can be obtained. The event object can be extracted from the event data of each behavioral event to obtain the subject information of the appeal of each behavioral event, and the category corresponding to the event profile of each behavioral event can be determined to obtain the appeal category information of each behavioral event.
[0062] In practical applications, event data is usually represented as text data, and then text data related to the event object and text data related to the event profile can be identified from the event data. Exemplarily, a pre-trained large model can be used to identify and extract fields such as location, enterprise, and organization in the event data, which are the event objects in the event data. Similarly, a pre-trained large model can also be used to identify the event profile in the event data, and generate a category corresponding to the event profile based on the description of the event profile.
[0063] Specifically, the big model can be a machine learning model with a large number of parameters, and the big model can automatically learn and identify the features in the behavioral events by unsupervised learning. In actual application, the pre-trained big model can be used to build an intelligent body center. The intelligent body center can be a control center that integrates a series of technologies such as sensors, data processing, machine learning, deep learning, and automatic control. It is used to process text data in behavioral events, which includes the task of extracting the subject information of the appeal and the task of generating the category information of the appeal. Among them, the task of extracting the subject information of the appeal can be used to extract the subject information of the appeal in the behavioral event. Specifically, the task of extracting the subject information of the appeal can be used to extract the fields such as location, enterprise, and institution in the behavioral event, and output them in a fixed format. The task of generating the category information of the appeal can be used to generate the category information of the behavioral event. Specifically, the task of generating the category information of the appeal can be used to determine the corresponding category of the appeal category information of the behavioral event from the category of the event profile of each field according to the text description in the behavioral event.
[0064] In the specific implementation, the characteristics of behavioral events can be automatically learned by adopting an unsupervised learning method without relying on a large amount of labeled data, thus reducing the workload and resources of manual data labeling.
[0065] After obtaining the appeal subject information and appeal category information of each second event data, the similarity of the event profiles between the second event data of each two behavioral events may be calculated, that is, the semantic similarity between the two second event data.
[0066] In practical applications, a pre-trained large model can be used to identify the event profile in each event data, and a semantic similarity calculation task can be registered in the large model. The semantic similarity calculation task can be used to calculate the semantic similarity between the event data of each two behavioral events. Specifically, it can be used to compare the text descriptions of the two event profiles, calculate the similarity between the two event profiles, and then obtain the similarity between each two event profiles, that is, the similarity of the event profiles between each two second event data can be obtained.
[0067] For example, the text description of event profile A includes event object a, event location b, and the category of event profile is remote / convenient service for residents, while the text description of event profile B includes event object b, event location b, and the category of event profile is remote / convenient service for residents. It can be calculated that the similarity between event profile A and event profile B can be 66.67%.
[0068] It should be understood that the above-mentioned event features such as the event object, the location where the event occurred, the category of the event overview, etc. may have corresponding weights when calculating the semantic similarity.
[0069] In a specific implementation, the benchmark event data can be determined from all the second event data, and then the semantic similarity between the benchmark event data and other second event data can be determined. Exemplarily, the most recently entered second event data can be determined from all the second event data as the benchmark event data, and the earliest entered second event data can also be determined from all the event data as the benchmark event data.
[0070] After obtaining the semantic similarity between every two second event data, all second event data may be classified according to the demand category information to obtain at least one first data set, that is, second event data with the same demand category information are divided into the same data set.
[0071] For example, the demand category information in all second event data may include categories such as remote / convenient services for residents and urban environment. Then, the second event data with demand category information of remote / convenient services for residents can be divided into the same data set, so that the demand category information of each event data is the first data set of remote / convenient services for residents. Similarly, the demand category information of each event data is the first data set of urban environment.
[0072] After obtaining at least one first data set, for each first data set, all second event data in the first data set can be classified according to the subject information of the claim to obtain at least one second data set, that is, the second event data with the same subject information of the claim in the first data set are divided into the same data set.
[0073] For example, all first data sets may include second event data with claim subject information a, claim subject information b, and claim subject information c. Then, the second event data with claim subject information a can be divided into the same data set to obtain a second data set in which each event data has claim subject information a. Similarly, a second data set in which each event data has claim subject information b can be obtained, and a second data set in which each event data has claim subject information c can be obtained.
[0074] After obtaining at least one second data set, an event stream may be constructed based on second event data in the second data set whose semantic similarity is greater than a preset similarity threshold, thereby obtaining at least one event stream.
[0075] The similarity threshold may be user-defined or obtained based on experience. Specifically, the similarity threshold may be 80%, that is, an event stream may be constructed based on second event data with a semantic similarity greater than 80%.
[0076] As an example, in order to reduce the amount of calculation, after obtaining the appeal subject information and appeal category information of the second event data, all the second event data can be classified to obtain at least one second data set. After obtaining at least one second data set, for each second data set, the benchmark event data in each second data set can be determined, and then the semantic similarity between the benchmark event data and other second event data in the second data set can be calculated, so as to construct an event stream based on the second event data in the second data set whose semantic similarity is greater than a preset similarity threshold, without calculating the semantic similarity between every two second event data.
[0077] Step 102: determine an event stream corresponding to a target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain a target event stream.
[0078] The target event stream may be an event stream including the target event in all event streams.
[0079] After obtaining the first event data, the appeal subject information of the first event data can be extracted, and the appeal category information of the first event data can be determined. Then, based on the appeal subject information and appeal type information of the first event data, a second data set corresponding to the first event data can be determined from a pre-classified second data set, and an event stream constructed according to the second data set corresponding to the first event data can be determined as the event stream corresponding to the target event.
[0080] For example, the second data set may include a second data set in which the appeal category information of each event data is urban environment and the appeal subject information is a, a second data set in which the appeal category information of each event data is urban environment and the appeal subject information is b, and a second data set in which the appeal category information of each event data is remote / convenient service for residents and the appeal subject information is a. If the appeal category information of the first event data is urban environment and the appeal subject information is b, then the second data set corresponding to the target event can be determined as the second data set in which the appeal category information of each event data is urban environment and the appeal subject information is b, and the event stream constructed based on the second data set can be determined as the event stream corresponding to the target event.
[0081] After determining the event stream corresponding to the target event, the target event can be merged into the event stream corresponding to the target event to obtain the target event stream.
[0082] As an example, when the second data set corresponding to the first event data is not included in the second data set, a corresponding second data set can be constructed based on the claim subject information and claim type information of the first event data, and then an event stream can be constructed based on the second event data in the second data set whose semantic similarity is greater than a similarity threshold, and the event stream can be determined as the target event stream corresponding to the target event.
[0083] Specifically, the event flow can be expressed by the following formula:
[0084] X n =[ x 11 , x 12 …x ij ]
[0085] Among them, X n It can be represented as the nth event stream, x 11 It can be expressed as the first event feature of the first event in the nth event stream, that is, the first event feature in the event data of the first event, such as event object, event overview, appeal subject information and other event features, and x i2 It can be expressed as the second event feature of the ith event in the nth event stream, and so on, x ij It can be expressed as the jth event feature of the ith event in the nth event stream.
[0086] In an embodiment of the present application, before determining the event stream corresponding to the target event according to the first event data, the following steps may also be included:
[0087] According to the first event data, event characteristics of the target event are identified, the alarm relevance of the event characteristics of each target event is determined, the first event data is filtered according to the alarm relevance to obtain the filtered first event data, and the step of determining the event flow corresponding to the target event according to the first event data is executed based on the filtered first event data.
[0088] The alarm relevance may be the relevance between the event feature and the urgency of the target event. Specifically, the greater the alarm relevance of the event feature, the greater its relevance to the urgency of the target event.
[0089] After obtaining the first event data, a pre-trained large model can be used to identify the first event data to obtain event features of the target event, such as event object, event overview and other event features. The alarm relevance of each event feature can be determined based on experience or relevant knowledge in each field. The first event data can then be screened according to the alarm relevance to obtain the screened first event data, and the step of determining the event flow corresponding to the target event according to the first event data can be executed based on the screened first event data.
[0090] In practical applications, first event data having an alarm correlation greater than a preset correlation threshold value may be screened out from all first event data to obtain screened first event data.
[0091] Exemplarily, analysis can also be performed based on the correlation of each event feature in the first event data, and a data dimensionality reduction method such as principal component analysis (PCA) can be used to filter out first event data that is not related to the urgency of the target event, that is, to filter out event features whose correlation is less than that of other event features, and the number of event features required can be customized by the user.
[0092] In a specific implementation, the first event data may also be preprocessed, such as deduplicating the first event data to remove duplicate first event data, or completing the first event data, that is, deleting, filling, or interpolating when some data is missing in the first time data, or denoising the first event data to remove abnormal first event data.
[0093] Step 103, determining the event feature of each event in the target event stream, and calculating the fusion feature of the target event stream according to the event feature of each event in the target event stream.
[0094] The fusion feature may be a feature calculated by combining the event features of each event in the target event stream.
[0095] After obtaining the target event stream, the event feature of each event in the target event stream can be identified.
[0096] It should be understood that each event in the target event stream may be a behavior event, and the target event stream may include target events and historical events.
[0097] After obtaining the event feature of each event in the target event stream, the event feature of each event in the target event stream may be fused and calculated to obtain the fused feature of the target event stream.
[0098] Step 104: When the target event flow is determined to be a high-risk event flow according to the fusion feature, a high-risk event alarm is triggered.
[0099] The high-risk event flow may be an event flow in which each event is a high-risk event, and the high-risk event may be a behavior event with an urgent degree of urgency, that is, a behavior event that needs to be handled with priority.
[0100] After obtaining the fusion features of the target event flow, the urgency of the target event flow can be judged according to the fusion features. When the urgency of the target event flow is urgent, the target event flow is determined to be a high-risk event flow. Furthermore, when the target event flow is a high-risk event flow, a high-risk event alarm can be triggered, that is, alarm information of the high-risk event is generated for alarm.
[0101] When the urgency of the target event flow is non-urgent, the target event flow is determined to be a non-high-risk event flow, and there is no need to issue an alarm for the target event flow.
[0102] In an embodiment of the present application, by acquiring the first event data of the target event, determining the event stream corresponding to the target event based on the first event data, and merging the target event into the event stream corresponding to the target event, the target event stream is obtained, the event features of each event in the target event stream are determined, and the fusion features of the target event stream are calculated based on the event features of each event in the target event stream. In this way, when the target event stream is determined to be a high-risk event stream based on the fusion features, a high-risk event alarm can be triggered without relying on manual judgment, thereby improving the efficiency of the alarm. Moreover, since the fusion features combine the features of each event, the alarm can be combined with the features of each event, thereby improving the accuracy of the alarm.
[0103] See also Figure 2 , Figure 2 A flowchart of another event alarm method provided by an embodiment of the present application is shown, which may specifically include the following steps:
[0104] Step 201, obtaining first event data of a target event.
[0105] Step 202: determine an event stream corresponding to a target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain a target event stream.
[0106] For the related descriptions of step 201 to step 202, please refer to step 101 to step 102, and they will not be repeated here.
[0107] Step 203: extract the event feature of each event in the target event stream, and determine the event feature weight corresponding to the event feature of each event.
[0108] The event feature weight may be the weight of the event feature during fusion calculation, and different event features may correspond to different event feature weights.
[0109] After obtaining the target event stream, the pre-trained large model can be used to identify and extract the event features of each event in the target event stream, and determine the event feature weights corresponding to the event features of each event.
[0110] In practical applications, since each event feature has different alarm relevance, that is, each event feature has different relevance to the urgency of the target event, the event feature weight of the event feature can be determined based on the alarm relevance.
[0111] In a specific implementation, the event feature weight of each event feature can be determined in advance, and then after the event feature of each event in the target event stream is extracted, the event feature weight corresponding to each event feature can be directly determined.
[0112] In an embodiment of the present application, the event feature may include a tone feature. In the case where the event feature includes the tone feature, the event feature of each event in the target event stream may be extracted in step 203 in the following manner:
[0113] The tone text description of each event in the target event stream is extracted, and the emotion coefficient corresponding to each event is generated according to the tone text description, and the tone feature of each event is generated based on the emotion coefficient.
[0114] Among them, the tone text description can be a text description used to describe the tone, such as text descriptions such as strong, serious, and excited. The emotion coefficient can represent the emotions of an individual or a group when responding based on needs. The tone feature can be an event feature in the event.
[0115] After obtaining the target event stream, the large model can be used to extract the tone text description of each event in the target event stream, and then the emotion coefficient corresponding to each event can be generated based on the tone text description.
[0116] In practical applications, since individuals or groups can include voice in their responses based on needs, the emotions of individuals or groups when responding can be determined and recorded to obtain the emotion coefficient corresponding to each event. When the response is in the form of text description, the tone text description in the behavioral event can be identified, such as descriptions of intensity, excitement, calmness, etc., and the frequency of occurrence of the tone text description and the degree of expression can be determined to generate the emotion coefficient corresponding to each event, and the emotion coefficient is determined as the tone feature corresponding to the event.
[0117] Specifically, the value of the emotion coefficient may be [0, 1].
[0118] Step 204, determining the time decay coefficient of each event in the target event stream.
[0119] Among them, the time decay coefficient can be expressed as the influence of each behavioral event on the urgency of the target event in the time dimension. The time decay coefficient can be associated with the occurrence time of the behavioral event. Specifically, the greater the distance between the occurrence time of the behavioral event and the current time, the smaller the corresponding time decay coefficient.
[0120] After obtaining the target event stream, the occurrence time and current time of each event in the target event stream can be determined. The time interval between each event and the current time can be determined based on the occurrence time and current time of each event. Furthermore, the time attenuation coefficient of each event can be determined based on the time interval between each event and the current time.
[0121] Specifically, the time decay coefficient of each event can be determined by the following formula:
[0122]
[0123] Wherein, θ(t) can be expressed as the time attenuation coefficient of the event, λ can be the attenuation rate, the attenuation rate can be expressed as the rate of change of the impact of the behavioral event on the urgency of the target event over time, and t can be the time interval of the event.
[0124] Step 205: Calculate the fusion features of the target event stream according to the event feature weights and the time decay coefficient.
[0125] After obtaining the event feature weight and time decay coefficient of each event in the target event stream, the fusion feature of the target event stream can be calculated using the following formula.
[0126]
[0127] Among them, F can be expressed as the fusion feature of the target event stream, N can be expressed as the number of events in the target event stream, K can be expressed as the number of event features in the event, ωk It can be expressed as the event feature weight of the kth event feature, x ik It can be expressed as the kth event feature in the i-th event.
[0128] As an example, before calculating the fusion features of the target event stream, the event features of each event in the target event stream may be standardized to calculate the fusion features based on the standardized event features.
[0129] Specifically, the following formula can be used to standardize event features:
[0130]
[0131] in, It can be expressed as the kth event feature of the i-th event after standardization. It can be expressed as the kth event feature in the i-th event, It can be expressed as the mean of the kth event feature among all events, It can be expressed as the standard deviation of the kth event feature among all events.
[0132] It is necessary to understand that after obtaining the event data, the event data can be encoded in a dictionary manner, that is, the event data can be converted into corresponding numerical data, and then the mean and standard deviation of the numerical values corresponding to each event feature can be obtained.
[0133] In a specific implementation, each event feature in a behavior event can be sorted according to a preset order, thereby ensuring that event features at the same position are event features of the same type.
[0134] For example, event features may include event objects, event overviews, event locations, occurrence times, and other types of event features, and the event objects may be event features of the first location, the event overviews may be event features of the second location, and the occurrence time may be event features of the third location, thereby ensuring that event features of the same location are event features of the same type.
[0135] Step 206: When the target event flow is determined to be a high-risk event flow according to the fusion feature, a high-risk event alarm is triggered.
[0136] For the relevant description of step 206, please refer to step 104 and will not be repeated here.
[0137] In an embodiment of the present application, step 206 may include steps 2061 to 2062:
[0138] Step 2061, input the fused features into the target detection model to obtain the urgency information of the target event stream.
[0139] Among them, the target detection model can be used to detect the probability of whether the fused feature is an event feature of a high-risk event. The target detection model can be a machine learning model trained with high-risk events and non-high-risk events. Non-high-risk events can be behavioral events with non-urgent urgency. The urgency information can be expressed as the urgency of the target event stream. The urgency information can include information with urgent urgency and information with non-urgent urgency. The model parameters of the target detection model can include a target time decay coefficient and a target event feature weight. The target time decay coefficient can be the time decay coefficient of the trained target detection model, and the target event feature weight can be the event feature weight of the trained target detection model.
[0140] After obtaining the fused feature, the fused feature can be input into the target detection model, and the target detection model can generate the probability that the fused feature is the event feature of a high-risk event, and then the urgency information of the target event flow can be determined based on the probability that the fused feature is the event feature of a high-risk event.
[0141] In an embodiment of the present application, before step 2061, the following steps may also be included:
[0142] Obtain sample data corresponding to historical high-risk events and sample data corresponding to historical non-high-risk events, build an initial detection model, train the initial detection model according to the sample data, and obtain a target detection model.
[0143] Among them, historical high-risk events can be high-risk events in the past period of time, historical non-high-risk events can be non-high-risk events in the past period of time, the sample data corresponding to the historical high-risk events can be event data of high-risk events in the past period of time, and the historical non-high-risk events can be event data of non-high-risk events in the past period of time corresponding to the sample data. The initial detection model can be an untrained machine learning model for generating the probability that a behavioral event is a high-risk event. The model parameters of the initial detection model can include an initial time decay coefficient and an initial event feature weight. The target time decay coefficient can be the time decay coefficient of the initial detection model, and the initial event feature weight can be the event feature weight of the initial detection model.
[0144] Before obtaining the first event data, an initial detection model for generating the probability that a behavioral event is a high-risk event can be pre-constructed, and the objective function of the initial detection model can be defined. At least one high-risk event and at least one non-high-risk event in the past period of time can be obtained, and sample data corresponding to each high-risk event can be obtained, as well as sample data corresponding to each non-high-risk event. The initial detection model can then be trained based on each sample data to obtain a target detection model.
[0145] In an embodiment of the present application, the initial detection model is trained according to the sample data to obtain the target detection model in the following manner:
[0146] According to the sample data, sample features corresponding to the sample data are generated, and the sample features are input into the initial detection model to obtain the detection results corresponding to the sample data, and the event loss information between the detection results and the high-risk events is determined. When the event loss information is less than the loss threshold, the initial time decay coefficient and the initial event feature weight are updated based on the event loss information, and the steps of obtaining the detection results corresponding to the sample data are repeated according to the updated initial event feature weight and the updated initial time decay coefficient until the event loss information is greater than or equal to the loss threshold. When the event loss information is greater than or equal to the loss threshold, the trained initial detection model is determined to be the target warning model.
[0147] Among them, the sample features may include positive sample data and negative sample data. The positive sample data may be event data of historical high-risk events, and the negative sample data may be event data of historical non-high-risk events. The sample features may be event features in the sample data, and may specifically include event features in high-risk events and event features in non-high-risk events. The detection result corresponding to the sample data may be the probability of the initial detection model detecting whether the sample data is a high-risk event. The event loss information may be the loss value between the detection result corresponding to the sample data and the historical high-risk event. The loss threshold may be user-defined or determined based on experience.
[0148] After obtaining the initial detection model, at least one high-risk event flow can be generated according to each high-risk event, and at least one non-high-risk event flow can be generated according to each non-high-risk event. Then, sample features of each high-risk event flow can be generated according to sample data corresponding to the high-risk events, and sample features of each non-high-risk event flow can be generated according to sample data corresponding to the non-high-risk events. Specifically, the generation of sample features can refer to the generation method of the above-mentioned fusion features.
[0149] After obtaining the sample features of each high-risk event flow and the sample features of each non-high-risk event flow, the sample features of the high-risk event flow can be used as positive sample data, and the sample features of the non-high-risk event flow can be used as negative sample data. The positive sample data can then be input into the initial detection model to obtain the detection result corresponding to the positive sample data, that is, the probability of whether the positive sample data is a high-risk event is obtained, and the negative sample data can be input into the initial detection model to obtain the detection result corresponding to the negative sample data, that is, the probability of whether the negative sample data is a high-risk event is obtained. In other words, the detection result corresponding to the positive sample data and the detection result corresponding to the negative sample data can be obtained.
[0150] Specifically, the objective function can be expressed by the following formula:
[0151]
[0152] in, It can be expressed as a sigmoid function, and b can be the bias coefficient in the sigmoid function. It can be expressed as the time attenuation coefficient of the sample data, It can be expressed as the initial event feature weight matrix of the initial detection model. The initial event feature weight matrix includes the initial event feature weights corresponding to each event feature. X can be the sample feature corresponding to the sample data, that is, the event feature in the sample data, and N can be expressed as the number of sample data.
[0153] After obtaining the detection results corresponding to the positive sample data and the detection results corresponding to the negative sample data, the event loss information between the detection results corresponding to the positive sample data and the historical high-risk events can be determined, as well as the event loss information between the detection results corresponding to the negative sample data and the historical high-risk events, thereby obtaining the event loss information corresponding to the positive sample data and the event loss information corresponding to the negative sample data.
[0154] It needs to be understood that for positive sample data, the initial detection model should output the detection result that the positive sample data is a high-risk event, that is, the output detection result that the probability of the positive sample data being a high-risk event is 100%, and for negative sample data, the initial detection model should output the detection result that the negative sample data is a non-high-risk event, that is, the output detection result that the probability of the negative sample data being a high-risk event is 0.
[0155] In practical applications, since the model parameters in the initial detection model may not be the optimal model parameters, based on this, there is a difference between the detection results output by the initial detection model and the expected detection results. Then, the difference between the detection results output by the initial detection model and the expected detection results can be determined, which is the event loss information.
[0156] After obtaining the event loss information corresponding to each positive sample data and the event loss information corresponding to each negative sample data, the event loss information can be compared with the loss threshold. When the event loss information is greater than or equal to the loss threshold, the initial time decay coefficient and the initial event feature weight in the initial detection model can be updated based on the event loss information, and the steps of obtaining the detection result corresponding to the sample data can be repeated according to the updated initial event feature weight and the updated initial time decay coefficient until the event loss information is less than the loss threshold. When the event loss information is less than the loss threshold, the trained initial detection model can be determined as the target warning model, the trained initial time decay coefficient can be determined as the target time decay coefficient, and the initial event feature weight can be determined as the target event feature weight.
[0157] In practical applications, the default model learning rate can be set, and the gradient descent method can be used to iteratively update the initial time decay coefficient and the initial event feature weight to find the optimal initial time decay coefficient and the initial event feature weight, that is, the target time decay coefficient and the target event feature weight.
[0158] Specifically, the updating of the initial time attenuation coefficient may be to update the attenuation rate λ, and the value range of the attenuation rate λ may be a value greater than or equal to 1.
[0159] As an example, the detection result corresponding to the positive sample data may be that the probability that the positive sample data is a high-risk event is 98%, and the expected detection result may be that the probability that the positive sample data is a high-risk event is 100%. Then, it can be preliminarily determined that the event loss information corresponding to the positive sample data is 2%, and the loss threshold can be defined as 1%. Then, it can be determined that the event loss information corresponding to the positive sample data is greater than the loss threshold, and then it is necessary to update the initial time decay coefficient and the initial event feature weight in the initial detection model based on the event loss information, and repeat the steps of obtaining the detection result corresponding to the sample data according to the updated initial event feature weight and the updated initial time decay coefficient until the event loss information is less than the loss threshold.
[0160] It should be understood that the above determination of the event loss information is exemplary. Specifically, a loss function of the initial detection model may be predefined to calculate the event loss information based on the loss function. The loss function may be expressed by the following formula:
[0161]
[0162] Wherein, in the case of training based on positive sample data, M can be the total number of high-risk event flows, It can be expressed as the i-th high-risk event flow, It can be expressed as the detection result of the initial detection model for the i-th high-risk event flow, L can be expressed as the event loss information corresponding to the positive sample data, and in the case of training based on negative sample data, M can be the total number of non-high-risk event flows, It can be expressed as the i-th non-high-risk event flow, It can be expressed as the detection result of the initial detection model for the i-th non-high-risk event flow, and L can be expressed as the event loss information corresponding to the negative sample data.
[0163] In a specific implementation, a default iteration number threshold can also be set, and the number of iterations can be counted each time the initial time attenuation coefficient and the initial event feature weight are updated to obtain the number of iterations. The number of iterations can be compared with the iteration number threshold, and then when the event loss information is less than the loss threshold or the number of iterations is greater than the iteration number threshold, the training of the initial detection model can be exited, and the initial detection model trained for the last time can be determined as the target detection model.
[0164] Step 2062: When the urgency information meets the preset alarm condition, determine that the target event flow is a high-risk event flow, and generate alarm information for the high-risk event, so as to issue an alarm based on the alarm information.
[0165] The alarm condition may be used to determine whether an alarm is required for the target event stream, the alarm information may be information for alarming the target event stream, the alarm information may include a target event list, and the target event list includes all events in the target event stream.
[0166] After obtaining the urgency information of the target event flow, it can be determined based on the urgency information of the target event flow whether the urgency information meets the preset alarm conditions. When the urgency information indicates that it is urgent, it is determined that the urgency information meets the alarm conditions, and the target event flow is determined to be a high-risk event flow. Based on all events in the target event flow, a target event list is generated, and the target event list can be pushed to relevant staff for alarm.
[0167] When the urgency information indicates that it is non-urgent, it can be determined that the urgency information does not meet the alarm condition, and then the target event flow is determined to be a non-high-risk event flow, and the current process is terminated without alarming the target event flow.
[0168] In an embodiment of the present application, by acquiring the first event data of the target event, determining the event stream corresponding to the target event based on the first event data, and merging the target event into the event stream corresponding to the target event, the target event stream is obtained, the event features of each event in the target event stream are extracted, and the event feature weights corresponding to the event features of each event are determined, and the time decay coefficient of each event in the target event stream is determined. The fusion features of the target event stream can be calculated based on the event feature weights and the time decay coefficients of each event, and when the target event stream is determined to be a high-risk event stream based on the fusion features, a high-risk event alarm is triggered, so that an alarm can be issued based on the fusion features. The fusion features combine the time decay coefficient of each event and the event feature weights of each event feature, further improving the accuracy of the alarm, and do not need to rely on manual judgment, thereby improving the efficiency of the alarm.
[0169] See also Figure 3 , Figure 3 The following is a flowchart of an event alarm method according to an embodiment of the present application, which may include the following steps:
[0170] Step 301: Acquire event data of at least one behavior event.
[0171] Step 302: pre-process the event data of each behavior event.
[0172] Among them, the preprocessing operation may include deduplication processing of event data, completion processing of event data, denoising processing of event data, screening of event data according to alarm relevance, and other operations.
[0173] Step 303, input the pre-processed event data into a pre-built agent center to perform a fusion operation on the behavior events to obtain at least one event stream.
[0174] Among them, the operation of fusing behavioral events includes the operation of extracting the appeal subject information in the behavioral events, the operation of generating the appeal category information of the behavioral events, the operation of calculating the semantic similarity between the event data of every two behavioral events, and the operation of extracting the tone features of the behavioral events.
[0175] See also Figure 4 , Figure 4 FIG. 1 shows a schematic diagram of the architecture of an intelligent agent center provided by an embodiment of the present application. Figure 4 As shown, the agent center can include the task of extracting the subject information of the appeal, the task of generating the category information of the appeal, the task of calculating the semantic similarity, and the task of extracting the tone feature. Specifically, the task of extracting the subject information of the appeal can be used to extract the subject information of the appeal in the behavior event, the task of generating the category information of the appeal can be used to generate the category information of the behavior event, the task of calculating the semantic similarity can be used to calculate the semantic similarity between the event data of each two behavior events, and the task of extracting the tone feature can be used to extract the tone feature of the behavior event.
[0176] In practical applications, the event data of each behavioral event can be input into the intelligent agent center in turn, and then the intelligent agent center can perform the task of extracting the subject information of the demand, extracting the location, enterprise, organization and other information from the input event data, and outputting it in a specific format, such as JSON format, to obtain the subject information of the demand.
[0177] Exemplarily, the global prompt corresponding to the task of extracting the main information of the appeal can be expressed as:
[0178] system_prompt = {'role':'system',' content':'You are performing a task to extract information about the subject of a request. Please extract information such as locations, companies, and institutions from the event data entered by the user.'}.
[0179] After inputting the event data of each behavioral event into the intelligent body center in turn, the intelligent body center can also perform the task of generating demand category information. According to the input event data, the corresponding demand category information can be determined from pre-defined categories. For example, in the field of smart cities, the corresponding demand category information can be determined from categories such as remote / convenient services for residents and urban environment.
[0180] Exemplarily, the global prompt corresponding to the demand category information generation task can be expressed as:
[0181] system_prompt = {'role':'system',' content':'You are performing a task to generate demand category information. Please generate the corresponding demand category information based on the event data entered by the user. The generated demand category information is only allowed to be selected from categories such as remote / convenient services for residents and urban environment'}.
[0182] After the event data of each behavior event is input into the agent center, the agent center can also perform a semantic similarity calculation task, determine the benchmark event data from all the input event data, and calculate the semantic similarity between the benchmark event data and the event data other than the benchmark event data. Specifically, the semantic similarity can be a value in the range of [0, 1]. When the semantic similarity value is 1, it means that the event data is exactly the same as the benchmark event data, and when the semantic similarity value is 0, it means that the event data is completely different from the benchmark event data.
[0183] Exemplarily, the global prompt corresponding to the demand category information generation task can be expressed as:
[0184] system_prompt = {'role':'system',' content':'You are performing a semantic similarity calculation task. Please determine the benchmark event data from all the input event data, and calculate the semantic similarity between the benchmark event data and the event data other than the benchmark event data, and output a value between 0 and 1'}.
[0185] After inputting the event data of each behavioral event into the intelligent agent center in turn, the intelligent agent center can also perform the tone feature extraction task, generate the emotion coefficient corresponding to each behavioral event according to the input event data, and generate the tone feature of each behavioral event based on the emotion coefficient.
[0186] Exemplarily, the global prompt corresponding to the tone feature extraction task can be expressed as:
[0187] system_prompt = {'role':'system',' content':'You are performing a tone feature extraction task. Based on the event data input by the user, calculate the emotional index of the behavior event and output a value between 0 and 1, with 1 representing the strongest'}.
[0188] Step 304, calculate the fusion features of each event stream, and input the fusion features of each event stream into the target detection model respectively to obtain the urgency information of each event stream.
[0189] Step 305: for each event stream, when the urgency information of the event stream indicates that it is urgent, a target event list is generated based on all events in the event stream, so as to issue an alarm based on the target event list.
[0190] In an embodiment of the present application, by acquiring event data of at least one behavioral event and performing preprocessing operations on the event data of each behavioral event, abnormal and repeated event data are removed, thereby improving the accuracy and reliability of the event data, and inputting the preprocessed event data into a pre-built intelligent agent center to perform a fusion operation on the behavioral event to obtain at least one event stream, and the intelligent agent center can extract the appeal subject information and appeal category information in the behavioral event and generate semantic similarity, and then can perform a fusion operation based on the appeal subject information, appeal category information and semantic similarity, thereby improving the accuracy of the fusion operation and the reliability of the obtained event stream, calculating the fusion features of each event stream, and inputting the fusion features of each event stream into the target detection model respectively, thereby being able to generate urgency information of each event stream in combination with all events in each event stream, thereby improving the accuracy of generating urgency information, for each event stream, when the urgency information of the event stream is indicated as urgent, a target event list can be generated based on all events in the event stream, so as to issue an alarm based on the target event list, without relying on manual judgment, thereby improving the efficiency of the alarm, and, in addition, an alarm can be issued in combination with the generated urgency information, thereby improving the accuracy of the alarm.
[0191] See also Figure 5 , Figure 5 The following is a schematic diagram showing the structure of an event alarm device provided by an embodiment of the present application. The device may specifically include the following modules:
[0192] The acquisition module 501 is used to acquire first event data of a target event.
[0193] The determination module 502 is used to determine the event stream corresponding to the target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain the target event stream.
[0194] The fusion module 503 is used to determine the event feature of each event in the target event stream, and calculate the fusion feature of the target event stream according to the event feature of each event in the target event stream.
[0195] The alarm module 504 is used to trigger a high-risk event alarm when the target event flow is determined to be a high-risk event flow according to the fusion characteristics.
[0196] In one implementation, the determination module 502 may also be used to determine the appeal subject information in the historical event and generate appeal category information of the historical event based on the second event data of the historical event before acquiring the first event data of the target event.
[0197] In one implementation, the device further includes a calculation module for calculating the semantic similarity between every two second event data.
[0198] In one implementation, the device further includes a classification module for classifying historical events according to claim subject information, claim category information, and semantic similarity to obtain at least one event stream.
[0199] In one implementation, the fusion module 503 may also be used to:
[0200] The event features of each event in the target event stream are extracted, and the event feature weights corresponding to the event features of each event are determined; wherein different event features correspond to different event feature weights.
[0201] Determines the time decay coefficient for each event in the target event stream.
[0202] According to the event feature weights and the time decay coefficient, the fusion features of the target event stream are calculated.
[0203] In one implementation, the fusion module 503 may also be used to:
[0204] In the case where the event features include tone features, a tone text description of each event in the target event stream is extracted.
[0205] According to the tone text description, the emotion coefficient corresponding to each event is generated, and based on the emotion coefficient, the tone feature of each event is generated.
[0206] In one implementation, the acquisition module 501 may also be used to acquire sample data corresponding to historical high-risk events and sample data corresponding to historical non-high-risk events before calculating the fusion features of the target event stream based on the event features of each event in the target event stream.
[0207] In one implementation, the device further includes a training module for constructing an initial detection model before calculating the fusion features of the target event stream according to the event features of each event in the target event stream. The initial detection model is trained according to the sample data to obtain a target detection model. The model parameters of the initial detection model include an initial time decay coefficient and an initial event feature weight, and the model parameters of the target detection model include a target time decay coefficient and a target event feature weight.
[0208] In one implementation, the above training module may also be used for:
[0209] Based on the sample data, sample features corresponding to the sample data are generated, and the sample features are input into the initial detection model to obtain the detection results corresponding to the sample data.
[0210] Determine the event loss information between the detection result and the historical high-risk events. When the event loss information is greater than or equal to the loss threshold, update the initial time decay coefficient and the initial event feature weight based on the event loss information, and repeat the steps of obtaining the detection result corresponding to the sample data according to the updated initial event feature weight and the updated initial time decay coefficient until the event loss information is less than the loss threshold.
[0211] When the event loss information is less than the loss threshold, the trained initial detection model is determined as the target warning model.
[0212] In one implementation, the alarm module 504 may also be used to:
[0213] The fused features are input into the target detection model to obtain the urgency information of the target event stream.
[0214] When the urgency information meets the preset alarm condition, the target event flow is determined to be a high-risk event flow, and alarm information for the high-risk event is generated to issue an alarm based on the alarm information. The alarm information includes a target event list, and the target event list includes all events in the target event flow.
[0215] In one implementation, the device may further include the following modules:
[0216] The identification module is used to identify event features of the target event based on the first event data before determining an event stream corresponding to the target event based on the first event data.
[0217] In one implementation, the device may further include the following modules:
[0218] A screening module is used to determine the alarm relevance of the event characteristics of each target event before determining the event flow corresponding to the target event based on the first event data, screen the first event data according to the alarm relevance to obtain the screened first event data, and execute the step of determining the event flow corresponding to the target event based on the first event data based on the screened first event data.
[0219] In an embodiment of the present application, by acquiring the first event data of the target event, determining the event stream corresponding to the target event based on the first event data, and merging the target event into the event stream corresponding to the target event, the target event stream is obtained, the event characteristics of each event in the target event stream are determined, and the fusion characteristics of the target event stream are calculated based on the event characteristics of each event in the target event stream. In this way, when the target event stream is determined to be a high-risk event stream based on the fusion characteristics, a high-risk event alarm can be triggered without relying on manual judgment, thereby improving the efficiency of the alarm. Moreover, the alarm can be combined with the events in the target event stream to improve the accuracy of the alarm.
[0220] It should be noted that the information interaction, execution process and other contents between the above-mentioned devices are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0221] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0222] See also Figure 6 , Figure 6 A structural block diagram of a terminal device provided by an embodiment of the present application is shown as follows: Figure 6As shown, this embodiment provides a terminal device 61, which includes: at least one processor 611, a memory 612, and a computer program 6121 stored in the memory 612 and executable on at least one processor 611, and when the processor 611 executes the computer program 6121, the steps in any of the above-mentioned method embodiments are implemented.
[0223] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments can be implemented.
[0224] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0225] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the camera device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium.
[0226] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An event alarm method, characterized in that: The method comprises: Obtain the first event data of the target event; Determine an event stream corresponding to the target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain a target event stream; Determine an event feature of each event in the target event stream, and calculate a fusion feature of the target event stream according to the event feature of each event in the target event stream; In the case where the target event flow is determined to be a high-risk event flow according to the fusion feature, triggering a high-risk event alarm; Before obtaining the first event data of the target event, the method further includes: According to the second event data of the historical event, determining the subject information of the appeal in the historical event, and generating the category information of the appeal of the historical event; the subject information of the appeal is the event object in the historical event, and the category information of the appeal is the category of the event overview in the historical event; Calculating the semantic similarity between every two of the second event data; The historical events are classified according to the demand subject information, the demand category information and the semantic similarity to obtain at least one event stream.
2. The event alarm method according to claim 1, characterized in that: The calculating the fusion feature of the target event stream according to the event feature of each event in the target event stream includes: Extracting event features of each of the events in the target event stream, and determining event feature weights corresponding to the event features of each of the events; wherein different event features correspond to different event feature weights; determining a time decay coefficient for each of the events in the target event stream; The fusion feature of the target event stream is calculated according to the event feature weight and the time decay coefficient.
3. The event alarm method according to claim 2, characterized in that: In the case where the event feature includes a tone feature, the extracting the event feature of each event in the target event stream includes: Extracting a tone text description of each of the events in the target event stream; According to the tone text description, an emotion coefficient corresponding to each of the events is generated, and based on the emotion coefficient, a tone feature of each of the events is generated.
4. The event alarm method according to claim 2, characterized in that: Before calculating the fusion feature of the target event stream according to the event feature of each event in the target event stream, the method further includes: Obtain sample data corresponding to historical high-risk events and sample data corresponding to historical non-high-risk events; Constructing an initial detection model; wherein the model parameters of the initial detection model include an initial time decay coefficient and an initial event feature weight; The initial detection model is trained according to the sample data to obtain a target detection model, so as to execute the step of calculating the fusion features of the target event stream according to the event features of each event in the target event stream based on the target detection model; wherein the model parameters of the target detection model include a target time attenuation coefficient and a target event feature weight.
5. The event alarm method according to claim 4, characterized in that: The training of the initial detection model according to the sample data to obtain the target detection model includes: Generate sample features corresponding to the sample data according to the sample data, and input the sample features into the initial detection model to obtain a detection result corresponding to the sample data; Determine event loss information between the detection result and the high-risk event, and when the event loss information is greater than or equal to a loss threshold, update the initial time decay coefficient and the initial event feature weight based on the event loss information, and repeat the step of obtaining the detection result corresponding to the sample data according to the updated initial event feature weight and the updated initial time decay coefficient until the event loss information is less than the loss threshold; When the event loss information is less than the loss threshold, the trained initial detection model is determined as the target warning model.
6. The event alarm method according to claim 4, characterized in that: The triggering of a high-risk event alarm when the target event flow is determined to be a high-risk event flow according to the fusion feature includes: Inputting the fused features into the target detection model to obtain the urgency information of the target event stream; When the urgency information satisfies a preset alarm condition, the target event stream is determined to be a high-risk event stream, and alarm information for high-risk events is generated to issue an alarm based on the alarm information; wherein the alarm information includes a target event list, and the target event list includes all events in the target event stream.
7. The event alarm method according to claim 1, characterized in that: Before determining the event stream corresponding to the target event according to the first event data, the method further includes: identifying event features of the target event according to the first event data; Determine the alarm relevance of the event characteristics of each of the target events, filter the first event data according to the alarm relevance to obtain filtered first event data, and perform the step of determining the event flow corresponding to the target event according to the first event data based on the filtered first event data.
8. An event alarm device, characterized in that: The device comprises: An acquisition module, used for acquiring first event data of a target event; a determination module, configured to determine an event stream corresponding to the target event according to the first event data, and merge the target event into the event stream corresponding to the target event to obtain a target event stream; A fusion module, used to determine the event feature of each event in the target event stream, and calculate the fusion feature of the target event stream according to the event feature of each event in the target event stream; an alarm module, configured to trigger a high-risk event alarm when the target event flow is determined to be a high-risk event flow according to the fusion feature; The determination module is further used to determine the subject information of the appeal in the historical event and generate the appeal category information of the historical event according to the second event data of the historical event before acquiring the first event data of the target event; the subject information of the appeal is the event object in the historical event, and the appeal category information is the category of the event overview in the historical event; The device also includes: A calculation module, used for calculating the semantic similarity between every two second event data; The classification module is used to classify historical events according to the appeal subject information, appeal category information and semantic similarity to obtain at least one event stream.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Target event prediction method and device, terminal equipment and storage medium
CN117196096A