Method, device, electronic device and storage medium for determining risk events

By building and using pre-trained extraction models, we can automatically extract core texts from news texts and determine risk event types and subjects, solving the problem of time-consuming and labor-intensive manual reading and achieving efficient and accurate risk event determination.

CN111177319BActive Publication Date: 2024-08-27CHINA CONSTRUCTION BANK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN201911347550.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-24
Publication Date
2024-08-27
Estimated Expiration
2039-12-24

AI Technical Summary

Technical Problem

In the existing technology, the method of manually reading news texts to determine risk events requires professional knowledge and is time-consuming and labor-intensive, resulting in high costs.

Method used

Construct the feature vector of the target text, extract the core text through the pre-trained extraction model, and determine the risk event type and risk subject, thereby automatically determining the risk event.

Benefits of technology

It reduces manual intervention, improves the efficiency and accuracy of risk event determination, and reduces time and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111177319B
    Figure CN111177319B
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for determining risk events, and relates to the field of computer technology. A specific implementation of the method includes: constructing a feature vector of a target text; extracting a core text of the target text through an extraction model according to the feature vector, wherein the extraction model is pre-trained; determining the risk event type and risk subject in the core text; and determining the risk event of the target text according to the risk type and the risk subject. This implementation can solve the problem of high labor and time costs in deriving risk events in news texts through manual reading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for determining a risk event. Background Art

[0002] With the rapid development of computer technology, public opinion analysis of various information has been widely used. In order to understand the main content of the news as soon as possible and grasp the risk events included in the news text in a timely manner, public opinion analysis of news texts has also become a need.

[0003] At present, public opinion analysis of news texts is usually done by manually reading the news texts and then summarizing and recording the risk events in the news texts.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] However, the method of deriving risk events from news texts through manual reading requires personnel with certain professional knowledge and reading a large amount of news texts to ensure accuracy, so this method has high labor and time costs. Summary of the invention

[0006] In view of this, the embodiments of the present invention provide a method, device, system and storage medium for determining risk events, which can solve the problem of high labor and time costs in deriving risk events in news texts through manual reading.

[0007] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for determining a risk event is provided.

[0008] A method for determining risk events in an embodiment of the present invention includes: constructing a feature vector of a target text; extracting a core text of the target text through an extraction model based on the feature vector, wherein the extraction model is pre-trained; determining the risk event type and risk subject in the core text; and determining the risk event of the target text based on the risk type and the risk subject.

[0009] In one embodiment, constructing a feature vector of the target text includes:

[0010] Segmenting the target text according to preset identifiers to obtain multiple text segments;

[0011] Constructing a feature vector for each of the multiple text segments respectively;

[0012] The step of extracting the core text of the target text by using an extraction model according to the feature vector includes:

[0013] Extracting the core text of each text segment through an extraction model according to the feature vector of each text segment;

[0014] The core text of the target text is filtered from the core text of each text segment.

[0015] In yet another embodiment, extracting the core text of each text segment by using an extraction model according to the feature vector of each text segment includes:

[0016] For each text segment in the plurality of text segments, the following process is performed:

[0017] Inputting the feature vector of the text segment into the extraction model, and calculating the probability of each character in the text segment being the starting position of the core text and the probability of each character being the ending position of the core text;

[0018] Determining the starting character of the core text in the text segment according to the probability that each character in the text segment is the starting position of the core text;

[0019] The end character of the core text in the text segment is determined according to the probability that each character in the text segment is the end position of the core text.

[0020] In yet another embodiment, screening the core text of the target text from the core text of each text segment includes:

[0021] For each text segment, calculating the sum of the probability that the starting character is the starting position of the core text and the probability that the ending character is the ending position of the core text as the core text probability;

[0022] The core text of the target text is screened according to the core text probability of each text segment.

[0023] In yet another embodiment, before constructing the feature vector of the target text, the method further includes:

[0024] The target text is screened according to the risk subject, and the target text represents a text including a risk event.

[0025] To achieve the above objective, according to another aspect of the present invention, a device for determining a risk event is provided.

[0026] A device for determining risk events of the present invention includes: a construction unit, which is used to construct a feature vector of a target text; an extraction unit, which is used to extract a core text of the target text through an extraction model based on the feature vector, and the extraction model is pre-trained; a determination unit, which is used to determine the risk type and risk subject in the core text; the determination unit is also used to determine the risk event of the target text based on the risk type and the risk subject.

[0027] In one embodiment, the construction unit is specifically used for:

[0028] Segmenting the target text according to preset identifiers to obtain multiple text segments;

[0029] Constructing a feature vector for each of the multiple text segments respectively;

[0030] The extraction unit is specifically used for:

[0031] Extracting the core text of each text segment through an extraction model according to the feature vector of each text segment;

[0032] The core text of the target text is filtered from the core text of each text segment.

[0033] In yet another embodiment, the extraction unit is specifically configured to:

[0034] For each text segment in the plurality of text segments, the following process is performed:

[0035] Inputting the feature vector of the text segment into the extraction model, and calculating the probability of each character in the text segment being the starting position of the core text and the probability of each character being the ending position of the core text;

[0036] Determining the starting character of the core text in the text segment according to the probability that each character in the text segment is the starting position of the core text;

[0037] The end character of the core text in the text segment is determined according to the probability that each character in the text segment is the end position of the core text.

[0038] In yet another embodiment, the extraction unit is specifically configured to:

[0039] For each text segment, calculating the sum of the probability that the starting character is the starting position of the core text and the probability that the ending character is the ending position of the core text as the core text probability;

[0040] The core text of the target text is screened according to the core text probability of each text segment.

[0041] In yet another embodiment, the apparatus further comprises:

[0042] A screening unit is used to screen the target text according to the risk subject, and the target text represents a text including a risk event.

[0043] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.

[0044] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining risk events provided by the embodiment of the present invention.

[0045] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0046] A computer-readable medium according to an embodiment of the present invention stores a computer program, which, when executed by a processor, implements the method for determining a risk event provided by an embodiment of the present invention.

[0047] One embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, for the target text, the feature vector can be constructed and then input into the extraction model to extract the core text in the target text, and then the risk event type and the risk subject can be determined from the core text, thereby determining the risk event of the target text. In this way, in the embodiment of the present invention, when determining the risk event in the news text, the core text in the news text can be extracted, and then the risk event can be determined based on the core text, so that manual execution is not required, labor costs are avoided, and the efficiency of determining the risk event is improved, and the time spent is reduced.

[0048] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0050] Figure 1 is a schematic diagram of a main process of a method for determining a risk event according to an embodiment of the present invention;

[0051] Figure 2 is a schematic diagram of a NER model structure according to an embodiment of the present invention;

[0052] Figure 3 is a schematic diagram of another main process of a method for determining a risk event according to an embodiment of the present invention;

[0053] Figure 4 is a flow chart of a method for constructing a feature vector according to an embodiment of the present invention;

[0054] Figure 5 is a schematic diagram of a method for calculating a starting position according to an embodiment of the present invention;

[0055] Figure 6 is a schematic diagram of a method for calculating an end position according to an embodiment of the present invention;

[0056] Figure 7 is a schematic diagram of main units of a device for determining a risk event according to an embodiment of the present invention;

[0057] Figure 8 is another exemplary system architecture diagram to which the embodiments of the present invention can be applied;

[0058] Fig. 9 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0060] It should be pointed out that the embodiments of the present invention and the features in the embodiments may be combined with each other if there is no conflict.

[0061] The method for determining risk events provided in the embodiment of the present invention can be used in scenarios where risk events need to be extracted from text. For example, for news texts, in order to accurately grasp the negative event reports about various companies in the news so as to be able to understand these negative events in a timely manner and respond to them, it is necessary to accurately determine the negative events related to various companies in the news texts. Therefore, the negative reports that need to be grasped can be determined as risk events. Through the method for determining risk events provided in the embodiment of the present invention, the risk events in the news texts can be accurately determined.

[0062] The embodiment of the present invention is described by taking the determination of risk events related to negative reports about various companies in news texts as an example, and the target text is the news text.

[0063] An embodiment of the present invention provides a method for determining a risk event, which can be executed by a computing device, such as Figure 1As shown, the method includes the following steps.

[0064] S101: Construct a feature vector of the target text.

[0065] The target text is the text for which the risk event needs to be determined. For example, to determine the scenario of the risk event in the news text, the target text is the news text for which the risk event needs to be determined.

[0066] For the scenario of determining risk events in news texts, the amount of news text data is huge and the range of text topics is extremely wide. For example, it can involve various topics such as companies, stock markets, futures, comments, etc. Therefore, in order to improve the efficiency and accuracy of determining risk events, the news text can be filtered first to filter out the text that includes risk events, and then perform this step on the filtered text.

[0067] In an embodiment of the present invention, risk events are risk events related to each company, and all news texts including risk events are usually related to the company. Therefore, before this step, the news texts can be first classified into "company related-company irrelevant" to filter out news texts related to the company, that is, filter out the target texts.

[0068] In an embodiment of the present invention, a text classification model can be constructed to achieve the binary classification of "company related-company irrelevant" for news text, and then achieve the screening of target text. This text classification model pays more attention to the recall rate. Specifically, the text classification model can use BiLSTM (bidirectional long short-term memory) combined with Attention (attention mechanism) model. BiLSTM can simultaneously consider the preceding and succeeding text features of a specific position when modeling a text sequence, and the attention mechanism can ensure that the text classification model can automatically assign appropriate weights to different contexts when classifying. The combination of BiLSTM and Attention is a mature model that has been tested in practice. The input and output of the text classification model can be shown in Table 1.

[0069] Table 1

[0070]

[0071] AA represents the company name. As shown in Table 1, the text in the first input reports that AA company was issued a new antitrust fine, which is a negative report about the company, so it belongs to the type related to the company, that is, the target text. The text in the second input reports that it is not related to the company, so it belongs to the type not related to the company, and is not the target text.

[0072] In one implementation of the present invention, the news text is usually a news report, which usually includes one or more paragraphs. In order to reduce the computational complexity of the subsequent core text extraction process and the complexity of model training, the target text can be divided into multiple text segments, and then a feature vector is constructed based on each text segment, and then the subsequent steps are performed.

[0073] Specifically, this step can be performed as follows: segment the target text according to a preset identifier to obtain multiple text segments; and construct a feature vector for each of the multiple text segments. The preset identifier can be a period, that is, the target text is segmented into multiple text segments according to the period, and each text segment is a sentence of the target text.

[0074] S102: Extracting the core text of the target text through an extraction model according to the feature vector.

[0075] The extraction model is pre-trained. In this step, the feature vector of the target text is input into the extraction model, and then the core text of the target text is extracted based on the result calculated by the extraction model.

[0076] It should be noted that when a news text reports a news event, the usual way of writing is: first use one sentence or as few sentences as possible to briefly explain the current event, and then sort out the cause and effect of the event in the subsequent paragraphs. Therefore, based on the text that briefly explains the current event, the risk event of the target text can be determined, and the text that briefly explains the current event in the news text can be used as the core text of the target text. In the embodiment of the present invention, it can be assumed that the news text has the following characteristics: there must be a core text in the news text, and the core text appears in a continuous position in the text, that is, an article will not have multiple core texts. Therefore, in the embodiment of the present invention, the core text in the target text can be determined first, and then the risk event can be determined based on the core text. When sorting out the cause and effect of the event in the news text, sometimes the description of the past risk event will appear. Therefore, in the embodiment of the present invention, after extracting the core text of the target text, the risk event is determined based on the core text, which can avoid determining the past risk event that appears in the news text as the risk event in the news text, thereby improving the accuracy of determining the risk event.

[0077] In one implementation of an embodiment of the present invention, in step S101, the target text is divided into multiple text segments, and a feature vector of each text segment is constructed. In this step, the core text of each text segment can be extracted through an extraction model based on the feature vector of each text segment, and then the core text of the target text can be filtered from the core text of each text segment.

[0078] After the target text is divided into multiple text segments, the core text of each text segment can be extracted based on the extraction model, and then the core text of the target text can be filtered out from the core text of each text segment. This reduces the computational complexity of the extraction model and the complexity of model training.

[0079] S103: Determine the risk event types and risk subjects in the core text.

[0080] In this step, the risk event type and risk subject are determined from the core text, without the need to determine the risk event type and risk subject from the full text of the target text, thereby reducing the complexity and amount of calculation in determining the risk event.

[0081] In order to determine the risk event type, this step can pre-set risk event labels, each risk event label can correspond to a risk event type, and then determine the risk event label corresponding to the core text through the risk event classification model, and then determine the risk event type corresponding to the core text. The risk event classification model can be a multi-classification model for text, which is used to determine the risk event label to which the input text belongs. Specifically, risk event labels can include: operating events, management events, financial events, administrative penalties, project events, credit events, and other risk events.

[0082] In this step, the risk event label to which the core text belongs can be determined through the risk event classification model, and then the risk event type can be determined. In the embodiment of the present invention, the risk event label to which the core text belongs can be determined in fine granularity to determine the type of risk event to which the target text belongs. In this step, a text multi-classification task is constructed to determine the label to which the core text belongs from multiple risk event labels.

[0083] For example, assuming the core text is "Recently, BB quoted three people familiar with the matter as saying that after being fined 997 million euros last year for obstructing other CC suppliers, AA may face a new EU antitrust fine again." From its content, we can know that the risk event label it belongs to is administrative penalty and other penalties. After inputting the above core text into the trained risk event classification model, the output result can be obtained as: administrative penalty-other penalties.

[0084] The risk event classification model needs to consider text semantic information more to accurately determine the risk event label. In this step, the BERT+Dense (fully connected network structure)+softmax model can be used to implement the risk event classification model, and the model is trained in advance so that it can determine the risk event label of the core text. Among them, the BERT pre-training model can give the full-text semantic vector representation of the text characters while considering the previous and following contexts; the Dense and subsequent softmax activation function layers are used to obtain the probability distribution of the category and then determine the risk event label of the core text.

[0085] In the embodiment of the present invention, in order to determine the risk events related to the negative reports of each company, the risk subject is the company name. This step of determining the risk subject is equivalent to the named entity recognition (NER) task in the text. The risk subject can be automatically located from the core text (i.e., the event subject company corresponding to the risk event is found from the core text) by building an NER model, thereby realizing the mining and determination of the risk subject.

[0086] The determination of the risk subject in this step is different from the NER task of text company name recognition. In this step, only the company name corresponding to the risk time is determined. Events in news reports often involve more than one company. Compared with directly extracting all company names (general entities), this step requires accurately determining the risk subject among the multiple company names that appear in the core text, so the NER model that needs to be constructed has the ability to model context.

[0087] The NER model constructed in this step can be a BERT+BiLSTM+CRF model, and the model structure can be as follows: Figure 2 shown.

[0088] In such Figure 2 In the model structure shown, BERT is used to obtain the embedding matrix of the core text, and BiLSTM models the text context features from front to back and from back to front at the same time. The input of this layer is the core text embedding matrix, and the output is the text feature matrix; the Dense layer uses the nonlinear fitting ability of the fully connected network to perform feature fitting and dimensionality reduction on the text feature matrix; the Droupot layer can effectively prevent the overfitting of the model by randomly discarding some training samples; finally, the conditional random field (CRF) performs probability correction on the output result to obtain the final NER result, that is, to determine the risk subject.

[0089] For example, assuming the core text is "Recently, BB quoted three people familiar with the matter as saying that after being fined 997 million euros last year for obstructing other CC suppliers, AA may face a new EU antitrust fine again." From its content, we can know that the risk subject is AA. After inputting the above core text into the trained NER model, the output result can be obtained: AA.

[0090] In the above risk event classification model and NER model training stage, the complete text used for training can be segmented into sentences using periods as separators. Each sentence is used as a sample to annotate the corresponding risk event label (the training data label of the risk event classification model) and risk subject (the training data label of the NER model), thereby improving the utilization of training data. At the same time, the length of the segmented text is smaller, which reduces the memory requirements for model training and lowers the hardware threshold for model training.

[0091] In the above process of determining the risk event type and risk subject, BERT is embedded in the model, and a pre-trained Chinese BERT model can be used, which can use less training data to get better results. Therefore, the use of the BERT pre-trained model in this step can effectively reduce the demand for training data in this method.

[0092] For example, the original text of the news text used as training data is "Recently, BB quoted three people familiar with the matter as saying that after being fined 997 million euros last year for obstructing other CC suppliers, AA may face a new EU antitrust fine again. It is reported that the EU is investigating 3G chips sold by AA between 2009 and 2011."

[0093] After segmenting the above text according to the period, the text fragments that can be obtained are: the first text fragment is "Recently, BB quoted three insiders as saying that after being fined 997 million euros for obstructing other CC suppliers last year, AA may face a new EU antitrust fine again", and the second text fragment is "It is reported that the EU is investigating 3G chips sold by AA between 2009 and 2011". The risk event label for the first text fragment is administrative penalty and the risk subject is AA; the risk event label for the second text fragment is business event and the risk subject is AA. In this way, the above-mentioned annotated text fragments can be used as training data for risk event classification models and NER models.

[0094] S104: Determine the risk events of the target text based on the risk type and risk subject.

[0095] After the risk type and risk subject are determined in step S103, the risk events of the target text can be determined.

[0096] In the embodiment of the present invention, for the target text, the extraction model can be input after the feature vector is constructed, so as to extract the core text in the target text, and then determine the risk event type and the risk subject from the core text, so as to determine the risk event of the target text. In this way, in the embodiment of the present invention, when determining the risk event in the news text, the core text in the news text can be extracted, and then the risk event can be determined based on the core text, so that manual execution is not required, labor costs are avoided, and the efficiency of determining the risk event is improved, and the time spent is reduced.

[0097] In the embodiment of the present invention, the extraction of core text needs to comprehensively consider the text context semantic information, so the framework of machine reading comprehension can be used as a reference to build a core text extraction model based on the BERT pre-training model to extract the core text in the target text.

[0098] Combine the following Figure 1 The embodiment shown in FIG. 1 specifically describes the process of extracting the core text in step S101 and step S102. Figure 3 As shown, the method includes the following steps.

[0099] S301: Segment the target text according to preset tags to obtain multiple text segments.

[0100] Here, taking the preset mark as a period as an example, the target text can be segmented according to the period to obtain multiple text segments, each of which is a sentence of the target text.

[0101] S302: construct a feature vector for each of the multiple text segments respectively.

[0102] After obtaining multiple text segments, a feature vector is constructed for each text segment.

[0103] In the embodiment of the present invention, taking a text segment as an example, the process of constructing a feature vector can be as follows: Figure 4 As shown. The text is composed of a sequence of words. In this step, the text fragment can be input into the BERT model. With the help of the word embedding capability of the BERT model, the characters of the natural language can be converted into vectors of a specific length. The physical meaning of the vector is the position of the semantics of the character in the natural language semantic space, so that the word vector corresponding to each character in the text fragment can be obtained. Then the word vector is input into a bidirectional long short-term memory (LSTM) model. The LSTM model can correct the word vector obtained by word embedding so that the word vector can take into account the context. The corrected word vector corresponding to each character in the text fragment is the feature vector of the text fragment.

[0104] It should be noted that if Figure 4 As shown in FIG, after obtaining the feature vector of the text segment, it can be input into the start position prediction model to obtain the prediction result of the start position of the core text of the text segment, and then the prediction result of the start position and the feature vector of the text segment are input into the end position prediction model to obtain the end position of the core text of each segment, that is, Figure 4 The ending position shown in is used to extract the core text of the text fragment.

[0105] S303: Extracting the core text of each text segment through an extraction model according to the feature vector of each text segment.

[0106] Among them, according to the feature vector of the text segment, the extraction model can calculate the starting position and the ending position of the core text of the text segment, and then extract the core text.

[0107] The result output by the extraction model is probability, that is, the probability that each character in the text segment is the starting position of the core text and the probability that it is the ending position of the core text can be calculated, and then the core text can be determined based on the probability of the starting position and the probability of the ending position of each character.

[0108] Specifically, for each text segment, this step can be performed as follows: input the feature vector of the text segment into the extraction model, calculate the probability that each character in the text segment is the starting position of the core text and the probability that it is the ending position of the core text; determine the starting character of the core text in the text segment based on the probability that each character in the text segment is the starting position of the core text; determine the ending character of the core text in the text segment based on the probability that each character in the text segment is the ending position of the core text.

[0109] In an embodiment of the present invention, the extraction model may include a starting position prediction model and an ending position prediction model, the starting position prediction model is used to predict the probability that each character in the text segment is the starting position of the core text, and the ending position prediction model is used to predict the probability that each character in the text segment is the ending position of the core text. After the probability that each character is the starting position of the core text is obtained, the character with the highest probability of the starting position can be used as the starting position of the core text, thereby determining the starting character of the core text in the text segment; after the probability that each character is the ending position of the core text is obtained, the character with the highest probability of the ending position can be used as the ending position of the core text, thereby determining the ending character of the core text in the text segment.

[0110] In the embodiment of the present invention, the method for calculating the starting position according to the feature vector of the text segment can be as follows: Figure 5As shown. The starting position prediction module model may include a fully connected network layer and a softmax layer. The feature vector of the text segment is input into the fully connected network layer and the softmax layer. The probability of each character being the starting position of the core text can be calculated, and finally a probability vector with a length equal to the number of characters included in the text segment is obtained, which is called the "initial probability vector". The position of the character corresponding to the element with the maximum value in the initial probability vector is determined as the starting position of the core text.

[0111] In the embodiment of the present invention, the method for calculating the end position according to the feature vector of the text segment can be as follows: Figure 6 As shown. The end position prediction model may include a fully connected network layer and a softmax layer. In this step, the feature vector and the initial probability of each character in the text segment may be connected and spliced ​​and then input into the end position prediction model, and then the probability of each character being the end position of the core text is obtained, and finally a probability vector having a length equal to the number of characters included in the text segment is obtained, which is called the "end probability vector", and the position of the character corresponding to the element with the maximum value in the end probability vector is determined as the end position of the core text.

[0112] It should be noted that when the extraction model is trained, the loss function of the model is the sum of the start position prediction loss and the end position prediction loss, as shown in Formula 1.

[0113]

[0114] In formula 1, p start represents the distribution of the starting position probability, δp start It represents the absolute value of the difference between the predicted distribution of the starting position probability and the true distribution. end represents the distribution of the end position probability, δp end It represents the absolute value of the difference between the predicted distribution of the end position probability and the true distribution. The overall model fitting is achieved by minimizing the loss function shown in Formula 1.

[0115] S304: Filter the core text of the target text from the core text of each text segment.

[0116] After extracting the core text from each text segment, we can get the probability that the starting character at the starting position of each core segment is the starting position, and the probability that the ending character at the ending position of each core segment is the ending position. Thus, for each text segment, we calculate the sum of the probability that the starting character at the starting position is the starting position of the core text and the probability that the ending character at the ending position is the ending position of the core text, as the core text probability. Then, based on the core text probability of each text segment, we filter the core text of the target text. Specifically, we can determine that the text segment with the highest core text probability is the core text and the core text of the target text.

[0117] The embodiment of the present invention can extract the core text of the target text through the above process. The above implementation process can be implemented by the extraction model, that is, the extraction model can be input as the target text, and the output is the starting position and the ending position of the core text. For example, the target text is "Recently, BB quoted three insiders as saying that after being fined 997 million euros for obstructing other CC suppliers last year, AA may face a new EU antitrust fine again. It is reported that the EU is investigating 3G chips sold by AA between 2009 and 2011." After inputting the extraction model, the output result is: Start position = 0, End position = 76. Start position indicates the starting position of the core text, and Start position = 0 indicates that the starting position of the core text is the 0th character of the target. Start position indicates the starting position of the core text, and End position = 0 indicates that the ending position of the core text is the 62nd character of the target. Therefore, the result is "Recently, BB quoted three insiders as saying that after being fined 997 million euros for obstructing other CC suppliers last year, AA may face a new EU antitrust fine again."

[0118] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a device 700 for determining a risk event, such as Figure 7 As shown, the device 700 includes:

[0119] A construction unit 701 is used to construct a feature vector of a target text;

[0120] An extraction unit 702, configured to extract the core text of the target text through an extraction model according to the feature vector, wherein the extraction model is pre-trained;

[0121] A determination unit 703, used to determine the risk type and risk subject in the core text;

[0122] The determining unit 703 is further configured to determine the risk event of the target text according to the risk type and the risk subject.

[0123] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 The method of the illustrated embodiment is the same and will not be repeated here.

[0124] In one implementation of the embodiment of the present invention, the construction unit 701 is specifically used to:

[0125] Segmenting the target text according to preset identifiers to obtain multiple text segments;

[0126] Constructing a feature vector for each of the multiple text segments respectively;

[0127] The extraction unit 702 is specifically used for:

[0128] Extracting the core text of each text segment through an extraction model according to the feature vector of each text segment;

[0129] The core text of the target text is filtered from the core text of each text segment.

[0130] In another implementation of the embodiment of the present invention, the extraction unit 702 is specifically configured to:

[0131] For each text segment in the plurality of text segments, the following process is performed:

[0132] Inputting the feature vector of the text segment into the extraction model, and calculating the probability of each character in the text segment being the starting position of the core text and the probability of each character being the ending position of the core text;

[0133] Determining the starting character of the core text in the text segment according to the probability that each character in the text segment is the starting position of the core text;

[0134] The end character of the core text in the text segment is determined according to the probability that each character in the text segment is the end position of the core text.

[0135] In another implementation of the embodiment of the present invention, the extraction unit 702 is specifically configured to:

[0136] For each text segment, calculating the sum of the probability that the starting character is the starting position of the core text and the probability that the ending character is the ending position of the core text as the core text probability;

[0137] The core text of the target text is screened according to the core text probability of each text segment.

[0138] In another implementation of the embodiment of the present invention, the device 700 further includes:

[0139] A screening unit is used to screen the target text according to the risk subject, and the target text represents a text including a risk event.

[0140] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 or Figure 3 The method of the illustrated embodiment is the same and will not be repeated here.

[0141] In the embodiment of the present invention, for the target text, the extraction model can be input after the feature vector is constructed, so as to extract the core text in the target text, and then determine the risk event type and the risk subject from the core text, so as to determine the risk event of the target text. In this way, in the embodiment of the present invention, when determining the risk event in the news text, the core text in the news text can be extracted, and then the risk event can be determined based on the core text, so that manual execution is not required, labor costs are avoided, and the efficiency of determining the risk event is improved, and the time spent is reduced.

[0142] According to an embodiment of the present invention, the present invention also provides an electronic device and a readable storage medium.

[0143] The electronic device of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the method for determining risk events provided in an embodiment of the present invention.

[0144] Figure 8 An exemplary system architecture 800 is shown to which the method for determining a risk event or the apparatus for determining a risk event according to the embodiments of the present invention can be applied.

[0145] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0146] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0147] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0148] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as product information - only an example) to the terminal device.

[0149] It should be noted that the method for determining a risk event provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for determining a risk event is generally disposed in the server 805 .

[0150] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0151] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 suitable for implementing an embodiment of the present invention. Fig. 9 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0152] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0153] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0154] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0155] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0157] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes a construction unit, an extraction unit and a determination unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the construction unit may also be described as a "unit of the function of the construction unit".

[0158] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the method for determining risk events provided by the present invention.

[0159] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for determining risk events, It is characterized in that include: Constructing a feature vector of a target text, wherein the target text is obtained by screening through a text classification model; According to the feature vector, extracting the core text of the target text through an extraction model, wherein the extraction model is pre-trained; Determine the risk event types and risk subjects in the core text; Determining the risk event of the target document according to the risk type and the risk subject; The step of constructing a feature vector of the target text includes: Segmenting the target text according to preset identifiers to obtain multiple text segments; Constructing a feature vector for each of the multiple text segments respectively, wherein the feature vector is obtained by modifying a word vector of each character in the text segment, and the word vector represents a position of the character in the text segment in a semantic space; The step of extracting the core text of the target text by using an extraction model according to the feature vector includes: According to the feature vector of each text segment, extract the core text of each text segment through an extraction model, wherein the extraction model includes a fully connected layer and a softmax layer; Filtering the core text of the target text from the core text of each text segment; The extraction model includes a start position prediction model and an end position prediction model, and extracting the core text of each text segment through the extraction model according to the feature vector of each text segment includes: For each text segment in the plurality of text segments, the following process is performed: Input the feature vector of the text segment into the start position prediction model, calculate the probability that each character in the text segment is the start position of the core text, connect the feature vector of each character in the text segment with the initial probability and input them into the end position prediction model, calculate the probability that each character in the text segment is the end position of the core text; According to the probability that each character in the text segment is the starting position of the core text, the character with the highest probability of the starting position is used as the starting position of the core text to determine the starting character of the core text in the text segment; According to the probability that each character in the text segment is the end position of the core text, the character with the highest probability of the end position is used as the end position of the core text to determine the end character of the core text in the text segment.

2. The method according to claim 1, It is characterized in that The step of screening the core text of the target text from the core text of each text segment includes: For each text segment, calculating the sum of the probability that the starting character is the starting position of the core text and the probability that the ending character is the ending position of the core text as the core text probability; The core text of the target text is screened according to the core text probability of each text segment.

3. The method according to claim 1, It is characterized in that Before constructing the feature vector of the target text, the method further includes: The target text is screened according to the risk subject, and the target text represents a text including a risk event.

4. A device for determining a risk event, It is characterized in that include: A construction unit, used to construct a feature vector of a target text, wherein the target text is obtained by screening through a text classification model; An extraction unit, configured to extract the core text of the target text through an extraction model according to the feature vector, wherein the extraction model is pre-trained; A determination unit, used to determine the risk type and risk subject in the core text; The determining unit is further used to determine the risk event of the target text according to the risk type and the risk subject; the constructing unit is specifically used to: Segmenting the target text according to preset identifiers to obtain multiple text segments; Constructing a feature vector for each of the multiple text segments respectively, wherein the feature vector is obtained by modifying a word vector of each character in the text segment, and the word vector represents a position of the character in the text segment in a semantic space; The extraction unit is specifically used for: According to the feature vector of each text segment, extract the core text of each text segment through an extraction model, wherein the extraction model includes a fully connected layer and a softmax layer; Filtering the core text of the target text from the core text of each text segment; The extraction model includes a start position prediction model and an end position prediction model, and the extraction unit is specifically used to: For each text segment in the plurality of text segments, the following process is performed: Input the feature vector of the text segment into the start position prediction model, calculate the probability that each character in the text segment is the start position of the core text, connect the feature vector of each character in the text segment with the initial probability and input them into the end position prediction model, calculate the probability that each character in the text segment is the end position of the core text; According to the probability that each character in the text segment is the starting position of the core text, the character with the highest probability of the starting position is used as the starting position of the core text to determine the starting character of the core text in the text segment; According to the probability that each character in the text segment is the end position of the core text, the character with the highest probability of the end position is used as the end position of the core text to determine the end character of the core text in the text segment.

5. An electronic device, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.

6. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Hot event classification method, device and storage medium

    CN108595519A

  • Method and device for outputting information

    CN109582954A

  • Hot event extraction method and device, readable storage medium and electronic equipment

    CN109739975A

  • Method for discovering news special events

    CN110162632A

  • Element extraction method, device and equipment and storage medium

    CN110334217A