A suicide detection method and device based on multi-feature fusion and label association

By using multi-feature fusion and tag association methods in the detection of suicidal thoughts, combined with Chinese suicide dictionary, posting time and social information features, a suicidal tendency detection model is constructed, which solves the applicability and complexity issues of existing detection methods and achieves Efficient identification and accurate detection of Chinese social media users.

CN114722298BActive Publication Date: 2024-09-13LANZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210470578.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2024-09-13
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

Existing suicidal ideation detection methods have problems such as limited applicable groups, complex detection methods and possible negative impacts. In addition, detection methods based on social media have poor accuracy in the Chinese environment, model complexity, and high training costs.

Method used

Using a suicide detection method based on multi-feature fusion and tag association, by obtaining social media user data, using a convolutional neural network to extract text features, and combining the Chinese suicide dictionary, posting time and social information features to build a suicide tendency detection model and simplify the model structure, reduce training costs and improve detection accuracy.

Benefits of technology

It achieves effective identification of users with suicidal thoughts on Chinese social media, improves detection accuracy, simplifies the model structure, reduces training costs, and weakens the impact of misclassification by a single model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722298B
    Figure CN114722298B
Patent Text Reader

Abstract

The present application discloses a suicide detection method and device based on multi-feature fusion and label association. In terms of the construction of a suicidal tendency detection model, the data of known users with suicidal thoughts are firstly subjected to feature extraction, and the obtained user text feature vectors are respectively spliced ​​with feature vectors based on a Chinese suicide dictionary, feature vectors of posting time, and feature vectors of social information to obtain three fusion vectors. Then, neural network models are respectively established according to the features of the three fusion vectors, and they are fused into a final suicidal tendency detection model. In terms of the calculation of suicidal tendency probability, a suicidal tendency label is obtained through the three suicidal tendency probabilities output by the suicidal tendency detection model, and then the three suicidal tendency labels are label-associated to finally output a comprehensive suicidal tendency label. The suicidal tendency detection model set in the present application has a simple structure and low training cost. It combines the advantages of multiple neural network models during detection, thereby improving the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of network technology, and in particular to a suicide detection method and device based on multi-feature fusion and label association. Background Art

[0002] For the detection of suicidal thoughts, traditional detection methods mainly use psychological methods or clinical detection methods, which require subjects to complete questionnaires, fill out risk behavior assessment scales, or have face-to-face interviews with professional psychologists. However, these methods are applicable to a very limited population, because many people who really have suicidal thoughts may deliberately hide their thoughts and are unwilling to reveal their inner thoughts to others. Some researchers bluntly stated that traditional methods of detecting suicidal thoughts have not made significant progress in the past 50 years. In addition, some researchers have tried to use certain physiological indicators to detect suicidal thoughts in subjects, such as measuring the heart rate of subjects at rest, comparing the event-related potentials of subjects, etc. These methods require subjects to wear measuring instruments, which are complicated to operate and may cause resistance from patients, have negative effects, and even accelerate the implementation of their suicide plans.

[0003] More and more studies have shown that natural language processing detection methods can detect users' suicidal thoughts based on the content they post on social media platforms. Most methods of detecting users' suicidal thoughts using social media are based on the texts posted by users on social platforms, from which the user's suicide probability is calculated. However, for Chinese social media platforms, on the one hand, because Chinese expressions are richer and more diverse, this detection method is often more unable to judge the user's true inner thoughts. On the other hand, because the texts posted by users on social media contain less information on judging suicidal thoughts, it is necessary to use a multimodal method to fuse multiple feature information of users on social media to judge the user's suicidal thoughts during detection. However, this method has an obvious disadvantage, that is, the model is usually more complex, the training cost is often very high, and the model reproducibility is poor. Summary of the invention

[0004] To solve the above problems, the present application provides a suicide detection method and device based on multi-feature fusion and label association.

[0005] In a first aspect, the present application proposes a suicide detection method, the steps comprising:

[0006] Obtaining user data posted on social media by known users with suicidal intentions;

[0007] Using three convolutional layers to extract features from the user data to obtain a user text feature vector;

[0008] Extracting a dictionary feature vector from the user data according to a Chinese suicide dictionary, and generating a posting time vector and a social information feature vector of the known user according to the posting time feature and the social information feature of the known user respectively;

[0009] The dictionary feature vector is fused with the user text feature vector to construct a first convolutional neural network model that outputs a dictionary feature label; the posting time feature vector is fused with the user text feature vector to construct a second convolutional neural network model that outputs a posting time feature label; the social information feature vector is fused with the user text feature vector to construct a third convolutional neural network model that outputs a social information feature label; the first convolutional neural network model, the second convolutional neural network model and the third convolutional neural network model are fused to obtain a suicidal tendency detection model;

[0010] The test data posted by the test user on social media is input into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user.

[0011] Furthermore, after obtaining the user data posted on social media by a known user with suicidal intentions, the method further includes: deleting text content in the user data according to a preset publishing tool of the social media and keywords contained in the social media.

[0012] Furthermore, the deleting the text content in the user data includes:

[0013] Deleting the URL link included in the text content of the user data;

[0014] Delete other users mentioned by @ symbol in the text content of said User Data;

[0015] removing emoticons from text content of the user data;

[0016] Deleting symbols and words that are meaningless to text classification work from the text content of the user data;

[0017] Deleting the user's current geographic location from the text content of the user data;

[0018] Using a regular expression to delete all topics that appear in the text content of the user data;

[0019] Check and delete user data whose text content is too small.

[0020] Furthermore, the three convolutional layers are used to extract features from the user data to obtain a user text feature vector, including:

[0021] Three convolutional layers are used to extract features from the user data respectively, and the convolution results extracted by the three convolutional layers are spliced ​​to obtain the user text feature vector.

[0022] Furthermore, the fusing of the dictionary feature vector with the user text feature vector includes:

[0023] Performing a full connection operation on the dictionary feature vector to obtain a dictionary fully connected vector;

[0024] Concatenating the dictionary fully connected vector with the user text feature vector to obtain a first fusion vector for training the first convolutional neural network model;

[0025] The fusing the posting time feature vector with the user text feature vector comprises:

[0026] Perform a full connection operation on the posting time feature vector to obtain a posting time fully connected vector;

[0027] Concatenating the posting time fully connected vector with the user text feature vector to obtain a second fusion vector for training the second convolutional neural network model;

[0028] The fusing the social information feature vector with the user text feature vector includes:

[0029] Performing a full connection operation on the social information feature vector to obtain a social information fully connected vector;

[0030] The social information fully connected vector is concatenated with the user text feature vector to obtain a third fusion vector for training the third convolutional neural network model.

[0031] Furthermore, the step of inputting the test data posted by the test user on social media into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user includes:

[0032] The data to be tested is input into the suicidal tendency detection model, and the three convolutional neural network models in the suicidal tendency detection model respectively perform probability detection, and obtain the dictionary suicidal tendency probability, the posting time suicidal tendency probability, and the social information suicidal tendency probability in the suicidal tendency detection model;

[0033] According to the suicidal tendency probability of the dictionary, the suicidal tendency probability of the posting time, and the suicidal tendency probability of the social information, respectively, a suicidal tendency label is determined to obtain a suicidal tendency label of the dictionary, a suicidal tendency label of the posting time, and a suicidal tendency label of the social information;

[0034] The dictionary suicidal tendency label, the posting time suicidal tendency label, and the social information suicidal tendency label are associated to obtain a comprehensive suicidal tendency label.

[0035] Furthermore, the loss function of the suicidal tendency detection model is implemented using the following formula:

[0036]

[0037] Among them, user i∈{1,2,…,N}, y i represents the true label of sample i, p i represents the probability of predicting sample i as having suicidal tendency, and L represents the loss value. Further, the suicidal tendency label judgment is performed according to the suicidal tendency probability of the dictionary, the suicidal tendency probability of the posting time, and the suicidal tendency probability of the social information, including:

[0038] Set the threshold for judging the suicidal tendency label;

[0039] If one of the suicidal tendency probability in the dictionary, the suicidal tendency probability in the posting time, and the suicidal tendency probability in the social information exceeds the threshold, the corresponding suicidal tendency label is set as having suicidal tendency.

[0040] Furthermore, the dictionary suicide tendency label, the posting time suicide tendency label, and the social information suicide tendency label are associated with each other to obtain a comprehensive suicide tendency label, including:

[0041] If at least two of the dictionary suicidal tendency label, the posting time suicidal tendency label, and the social information suicidal tendency label are suicidal tendency, the comprehensive suicidal tendency label is set to be suicidal tendency.

[0042] On the other hand, the present application proposes a suicide detection device, the structure of which includes:

[0043] A data acquisition module, used to acquire user data posted on social media by known users with suicide intentions;

[0044] A first feature extraction module, used to extract features from the user data using three convolutional layers to obtain a user text feature vector;

[0045] A second feature extraction module is used to extract a dictionary feature vector from the user data according to a Chinese suicide dictionary, and to generate a posting time vector and a social information feature vector of the known user according to the posting time feature and the social information feature of the known user;

[0046] A detection model generation module, used to fuse the dictionary feature vector with the user text feature vector to construct a first convolutional neural network model that outputs a dictionary feature label; fuse the posting time feature vector with the user text feature vector to construct a second convolutional neural network model that outputs a posting time feature label; fuse the social information feature vector with the user text feature vector to construct a third convolutional neural network model that outputs a social information feature label; fuse the first convolutional neural network model, the second convolutional neural network model and the third convolutional neural network model to obtain a suicidal tendency detection model;

[0047] The prediction module is used to input the test data released by the test user on the social media into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user.

[0048] The present invention identifies users with suicidal thoughts on social media through a Chinese suicide detection dataset, and constructs a new multi-feature text convolutional neural network model through three features of text information based on user social media content (such as features of the Chinese suicide dictionary, features of posting time, and features of social information). It is further combined with a label association mechanism to obtain the final suicidal tendency detection model - a multi-feature label association text convolutional neural network, which can be modeled based on suicide detection data from Chinese social media, and has a simple model structure and low training cost. It can also combine the advantages of multiple independent models, reduce the influence of a single model on the misclassification of certain special samples, and improve the classification accuracy, thereby achieving the purpose of improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0050] Figure 1 This is a flowchart of a suicide detection method based on multi-feature fusion and label association in this application;

[0051] Figure 2 This is a data logic block diagram of a suicide detection model for this application;

[0052] Figure 3 This is a flowchart of step S500 of a suicide detection method based on multi-feature fusion and label association in this application;

[0053] Figure 4 The present invention relates to a schematic structural diagram of a suicide detection device. DETAILED DESCRIPTION

[0054] In order to explain the technical solution of the present application, some embodiments will now be described in detail. The embodiments described in the following embodiments do not represent all embodiments consistent with the content disclosed in the present application. On the contrary, they are only examples of methods and systems consistent with some aspects of the content disclosed in the present application as detailed in the attached claims.

[0055] In a first aspect, the present application provides a suicide detection method based on multi-feature fusion and label association.

[0056] Figure 1 This is a flow chart of a suicide detection method based on multi-feature fusion and label association provided by the present application.

[0057] Figure 2 It is a data logic block diagram of a suicide detection model provided by this application.

[0058] like Figure 1 and Figure 2 As shown, the suicide detection method provided by the present application includes the following steps S100-S500:

[0059] S100, obtaining user data posted on social media by a known user who has suicidal intentions.

[0060] In some embodiments, before obtaining user data posted by known users with suicidal intentions on social media, it is necessary to screen known users with suicidal intentions. Among the large amount of user posted content on social media platforms, there may be user data with suicidal intentions and there may also be normal user data. In this case, we use manual screening to find users who really have suicidal intentions.

[0061] Furthermore, the screening work was completed by a screening team composed of six experienced psychology experts. The screening team was asked to comprehensively consider all the content posted by each user on social media, and choose one of the two categories of labels (suicidal or normal) to label each user. In order to ensure the accuracy of the screening, the screening team will carefully check all the content posted by each user on social media when labeling. Every time a new user is selected for labeling of suicidal thoughts, all the content posted by this user on social media will be independently checked and labeled by three experts. After independent labeling, the three experts will summarize their respective labeling results and summarize the final label of the user (suicidal or normal).

[0062] Furthermore, the criteria for marking a user as suicidal is that the content posted by the user on social media can clearly show the user's suicidal intention. Whether the user expresses suicidal thoughts or has already committed suicidal behavior, it is judged to contain suicidal thoughts. The content posted by users marked as suicidal on social media has the following characteristics:

[0063] One or more of the user’s posts on social media contain obvious suicidal words, such as: “I don’t want to live anymore,” “I want to commit suicide,” “I want to leave this world,” etc.

[0064] The user has engaged in serious self-harm or unsuccessful suicide attempts, or has discussed suicide plans with others on Weibo.

[0065] Furthermore, the criteria for labeling a user as normal is that the user's posts on social media do not contain any evidence of suicidal intent, but may contain words related to suicide without real suicidal intent, such as comments on suicide news reports or expressions when the user is angry or nervous. The posts on social media labeled as normal by users have the following characteristics:

[0066] There are no words related to suicide in the user's social media posts.

[0067] The user's social media posts contain words related to suicide but do not express any suicidal intentions. For example, the user expresses his inner feelings when he is angry or nervous, such as: "The interview made me so nervous that I wanted to die."

[0068] Objectively describe social news containing suicide keywords.

[0069] There is no reasonable evidence that there is a risk of suicide. For example, the user may have used suicide keywords in the lyrics or poems they shared.

[0070] Furthermore, social media can be a web page, mobile phone software, computer software, etc., which can provide a network platform so that social media users on the Internet can view and obtain text, pictures, videos, audio or files and other content shared by other users on this social media.

[0071] Furthermore, user data refers to the text content posted by users on social media, and does not include pictures, videos, audio or files posted by the user.

[0072] In some embodiments, after obtaining user data posted on social media by a known user with suicidal intentions, the method further includes: deleting text content in the user data according to a preset social media publishing tool and keywords contained in the social media, including:

[0073] Removes URL links from the text content of user data.

[0074] Delete other users mentioned by @ symbol in the text content of user data.

[0075] Remove emojis from text content in user data.

[0076] Delete the symbols and words in the text content of the user data that are not meaningful for text classification.

[0077] Remove the user's current geographic location from the text content of the user data.

[0078] Use a regular expression to remove all occurrences of the topic in the text content of the user data.

[0079] Check and delete user data that has too little text content.

[0080] Furthermore, when users of social media use certain publishing tools and software to share content on social media, fixed publishing tool names or keywords are automatically generated. Such characters are of no help to the suicide detection task, so such automatically generated characters need to be deleted. The deletion method is to first count the publishing tool names or keywords automatically generated by various publishing tools and software, generate a publishing tool vocabulary library, and use the vocabulary in the publishing tool vocabulary library to compare the content posted by users on social media. If there are identical words, they will be deleted. Examples of publishing tool names include: a certain membership center, a certain red envelope activity, a certain game channel, a certain brand activity, a certain video account, a certain power list, a certain fan red envelope, a certain birthday dynamic, a certain lottery activity, etc.; keywords include: a certain music, a certain live broadcast platform, a certain mobile game, a certain question and answer, etc.

[0081] Furthermore, a URL link is a string of characters composed of symbols, letters, and notations, and this string of characters has a click attribute. When a user clicks on a URL link, the user can jump to the website pointed to by the URL link or open a file stored in the network pointed to by the URL link. Since the string of characters displayed by a URL link only represents a website or domain name, and this string of characters itself has no textual meaning, deleting it can save resources and does not affect the detection effect of the suicide detection method of the present application.

[0082] Furthermore, the other users mentioned by the @ symbol are a string of characters composed of symbols, letters, notation forms, texts, and emoticons, and this string of characters has a clickable attribute. When users click on other users mentioned by the @ symbol, they can jump to the social media homepage of the other users mentioned by the @ symbol. Since the string of characters displayed by other users mentioned by the @ symbol only represents the network name of other users, such characters are of no help to the suicide detection task, so deleting them can save resources and does not affect the detection effect of the suicide detection method of the present application.

[0083] Furthermore, an emoticon is a picture or a piece of code, and the emoticons that appear in social media usually represent the user's psychological state at the time. However, the present invention focuses on the detection of pure text. Since emoticon pictures are not text content and the coded characters of emoticons themselves have no textual meaning, deleting them can save resources and does not affect the detection effect of the suicide detection method of the present application.

[0084] Furthermore, the symbols and words that are meaningless to the text classification work are a piece of text. Due to the characteristics of social media, some meaningless symbols and words will appear when users post content. For example, when a user sends content with pictures, the text "Share picture" will appear in the body of the content. Such characters are of no help to the suicide detection task, so deleting them can save resources and does not affect the detection effect of the suicide detection method of this application.

[0085] Furthermore, the user's current geographic location is a piece of text, which means a region name. Such characters are of no help to the suicide detection task, so deleting them can save resources and does not affect the detection effect of the suicide detection method of the present application.

[0086] Furthermore, all topics that appear in the text content of the user data are a segment of characters composed of punctuation marks, letters, etc., generally starting with a symbol, connecting a segment of text, and ending with a symbol. The topic has a click attribute, and the user clicks on the topic to jump to certain news or promotional web pages. Since the string of characters displayed by the topic only represents the name of the promotional content of the social media, such characters are of no help to the suicide detection task, so deleting them can save resources and does not affect the detection effect of the suicide detection method of the present application. The way to delete is to use regular expressions to match the topic and then delete it. Since the topic text in social media contains symbols such as "#" before and after, such as "#Depression Super Topic#", the use of regular expressions can effectively delete all topics that appear in social media. Regular expressions are a logical formula for string operations, that is, some pre-defined specific characters and combinations of these specific characters are used to express a filtering logic for strings.

[0087] Furthermore, if the amount of text content in user data is too small, it means that the social media account of this user was established a short time ago or the social media account is in a cancelled or deactivated state. Too little published content means that the sample data volume is small, and the only published content is not representative. It is easy to make false detections when conducting suicide detection on such users, so it is necessary to check and delete user data with too little text content.

[0088] Furthermore, after deleting the text content in the user data according to the preset social media publishing tool and the keywords contained in the social media, it also includes: aggregating the deleted user data and adding it to the Chinese suicide detection data set, and all the data in the Chinese suicide detection data set are user data published on social media by known users who are determined to have suicidal thoughts.

[0089] S200, use three convolutional layers to extract features from user data to obtain a user text feature vector.

[0090] In some embodiments, step S200 may be implemented in the following manner:

[0091] Use three convolutional layers to extract features from user data respectively, and concatenate the convolution results extracted by the three convolutional layers to obtain the user text feature vector.

[0092] Furthermore, the convolution layer is the convolution kernel. When the convolution layer is used for text processing, the embedded representation of each word in the input text is weighted averaged to extract the text representation, where the weight is defined by a function or matrix, which is called a convolution layer. In this application, feature extraction includes: first converting the text content in the user data into text embeddings, and then performing feature extraction on the text embeddings. Feature extraction is a sliding local addition and multiplication calculation process between the text embeddings and the convolution kernel. When extracting features from the content posted by social media users, the present application scheme is set to use three convolution layers to extract features from user data separately.

[0093] Furthermore, for each social media user, all the content published by this user is regarded as a piece of user data to distinguish whether this user has suicidal thoughts. Three convolution layers are used at the same time, and the three convolution results are concatenated to obtain a user text feature vector. The user text feature vector is implemented using the following formula:

[0094] Y1=[g1(x)|g2(x)|g3(x)]

[0095] Among them, Y1 represents the user text feature vector; x represents the user data; g1(x), g2(x), and g3(x) respectively represent the three convolution vectors obtained after feature extraction of user data using three convolution layers.

[0096] S300, extracting a dictionary feature vector from user data according to a Chinese suicide dictionary, and generating a posting time vector and a social information feature vector of a known user according to posting time features and social information features of the known user.

[0097] In some embodiments, although the neural network model can automatically extract features, due to factors such as differences in the distribution of user data and limitations of the model structure, the neural network usually only focuses on the text information of the published content and cannot fully extract other features in the user data that contain suicidal thoughts. Therefore, it is very important to extract some specific features from the user data. Therefore, the present application is set to extract feature vectors based on suicidal dictionaries, feature vectors based on posting time, and feature vectors based on social information from user data. Among them, the dictionary feature vector is a thirteen-dimensional feature vector, the posting time feature vector is a six-dimensional feature vector, and the social information feature vector is a four-dimensional feature vector.

[0098] Furthermore, the Chinese suicide dictionary contains more than 2,000 words related to suicide in thirteen categories. When extracting features based on the Chinese suicide dictionary, a thirteen-dimensional feature vector can be extracted from the user data, and each dimension represents a word related to suicide.

[0099] Furthermore, the posting time of the content posted by users with suicidal thoughts is also an important feature of suicide detection. For people who do not have suicidal thoughts, the posting time is usually during the day and evening, while users with suicidal thoughts post more frequently in the early morning due to depression, insomnia or interference from the external environment. The posting time of users with suicidal thoughts and users without suicidal thoughts is shown in the table below.

[0100] Users who have suicidal thoughts Users who do not have the intention to commit suicide Proportional Difference 23:00-03:00 2.87 / 4.67% 4.94 / 3.38% 1.29% 03:00-07:00 7.45 / 12.13% 18.15 / 12.41% -0.28% 07:00-11:00 10.24 / 16.67% 26.03 / 17.80% -1.13% 11:00-15:00 11.54 / 18.78% 27.97 / 19.13% -0.35% 15:00-19:00 16.43 / 26.74% 38.49 / 26.33% 0.41% 19:00-23:00 12.93 / 21.04% 30.62 / 20.94% 0.10% Average number of posts 61.44 146.20

[0101] The above table divides the posting time into six time periods, each of which is four hours, and each time period is used as a dimension to construct the posting time feature vector. When extracting features based on posting time, a six-dimensional feature vector can be extracted from user data, and each dimension represents a time period. From the above table, it can be seen that in each time period, the average number of posts by users who do not have suicidal thoughts is higher than that of users with suicidal thoughts, indicating that users who do not have suicidal thoughts are generally more active on social media than users with suicidal thoughts. In the 23:00-03:00 time period, most users who do not have suicidal thoughts have rested, while users with suicidal thoughts may post content more frequently due to insomnia and other reasons; in the 07:00-11:00 time period, due to lack of sleep and other reasons, the mental state of users with suicidal thoughts is poor, so they are not active enough in the 07:00-11:00 time period.

[0102] Furthermore, for users with suicidal thoughts, their social information may be different from that of users without suicidal thoughts. For example, users with suicidal thoughts may interact less with others and may post more and longer emotional content. Therefore, the social information of the content posted by users with suicidal thoughts is also an important feature of suicide detection. Social information includes the number of reposts, the number of comments, the number of likes, and the length of microblogs, each representing a dimension. When extracting features based on social information, a four-dimensional feature vector can be extracted from user data, and each dimension represents one of the number of reposts, the number of comments, the number of likes, and the length of microblogs.

[0103] S400, the dictionary feature vector is merged with the user text feature vector to construct a first convolutional neural network model that outputs the dictionary feature label; the posting time feature vector is merged with the user text feature vector to construct a second convolutional neural network model that outputs the posting time feature label; the social information feature vector is merged with the user text feature vector to construct a third convolutional neural network model that outputs the social information feature label; the first convolutional neural network model, the second convolutional neural network model and the third convolutional neural network model are merged to obtain a suicidal tendency detection model.

[0104] In some embodiments, the fusion of the dictionary feature vector and the user text feature vector may specifically include the following steps S311-S312:

[0105] S311, performing a full connection operation on the dictionary feature vector to obtain a dictionary fully connected vector.

[0106] S312, concatenating the dictionary fully connected vector with the user text feature vector to obtain a first fusion vector for training a first convolutional neural network model.

[0107] In some embodiments, the posting time feature vector is merged with the user text feature vector, which may specifically include the following steps S321-S322:

[0108] S321, perform a full connection operation on the posting time feature vector to obtain a posting time fully connected vector.

[0109] S322, concatenate the posting time fully connected vector with the user text feature vector to obtain a second fusion vector for training a second convolutional neural network model.

[0110] In some embodiments, the social information feature vector is fused with the user text feature vector, including, specifically, the following steps S331-S332:

[0111] S331, performing a full connection operation on the social information feature vector to obtain a social information fully connected vector.

[0112] S332, concatenating the social information fully connected vector with the user text feature vector to obtain a third fusion vector for training a third convolutional neural network model.

[0113] Furthermore, the posting time fully connected vector, the posting time fully connected vector, and the social information fully connected vector are fused with the user text feature vector respectively, using the following formula:

[0114]

[0115] Where i∈{1,2,3}; Y1 represents the user text feature vector; y1, y2, y3 represent the dictionary feature vector, posting time feature vector, and social information feature vector respectively; h1(y1), h2(y2), h3(y3) represent the dictionary fully connected vector, posting time fully connected vector, and social information fully connected vector respectively; They represent the fused dictionary feature vector, the fused posting time feature vector, and the fused social information feature vector respectively.

[0116] Furthermore, the dictionary fully connected vector, the posting time fully connected vector, and the social information fully connected vector are obtained by: performing fully connected calculations on the dictionary feature vector, the posting time feature vector, and the social information feature vector respectively through a fully connected layer. The fully connected layer is a component of the convolutional neural network, and plays a role in mapping distributed features to the sample label space in the entire convolutional neural network.

[0117] S500: Input the test data posted by the test user on the social media into a suicidal tendency detection model to obtain the suicidal tendency probability of the test user.

[0118] Figure 3 FIG. 5 is a flowchart of step S500 of a suicide detection method based on multi-feature fusion and label association provided in an embodiment of the present application. Figure 3 As shown, in some embodiments, step S500 may specifically include the following steps:

[0119] S501, input the data to be tested into the suicide tendency detection model, and the three convolutional neural network models inside the suicide tendency detection model perform probability detection respectively, and obtain the dictionary suicide tendency probability, the posting time suicide tendency probability, and the social information suicide tendency probability inside the suicide tendency detection model.

[0120] S502, judging suicide tendency labels according to the dictionary suicide tendency probability, the posting time suicide tendency probability, and the social information suicide tendency probability, and obtaining the dictionary suicide tendency label, the posting time suicide tendency label, and the social information suicide tendency label.

[0121] S503, the dictionary suicide tendency label, the posting time suicide tendency label, and the social information suicide tendency label are associated to obtain a comprehensive suicide tendency label.

[0122] Further, then, using the three fused feature vectors The three models are trained and optimized, and the loss function of the model is implemented using the following formula:

[0123]

[0124] Where i∈{1,2,…,N} represents the i-th user, N represents the number of users, and y i represents the true label of sample i, p i It represents the probability of predicting sample i as having suicidal tendency, and L represents the loss value.

[0125] Furthermore, the suicide tendency label is judged according to the probability of suicide tendency in the dictionary, the probability of suicide tendency in the posting time, and the probability of suicide tendency in the social information, including:

[0126] Set the threshold for judging suicidal tendency labels.

[0127] If one of the probability of suicidal tendency in the dictionary, the probability of suicidal tendency in the posting time, and the probability of suicidal tendency in the social information exceeds the threshold, the corresponding suicidal tendency label is set to have suicidal tendency.

[0128] Furthermore, the dictionary suicide tendency label, posting time suicide tendency label, and social information suicide tendency label are associated to obtain a comprehensive suicide tendency label, including:

[0129] If at least two of the dictionary suicidal tendency labels, posting time suicidal tendency labels, and social information suicidal tendency labels are suicidal, the comprehensive suicidal tendency label will be set to suicidal.

[0130] Furthermore, the dictionary suicide tendency label is set to Set the post time suicide tag to Set the suicide tag of social messages to Set the comprehensive suicide tendency label to The above four suicidal tendency labels can all be regarded as a binary parameter, and the suicidal detection of user data can be regarded as a binary classification problem. The final result of the detection in this application is If the value of A value of 1 indicates that the user has suicidal tendencies; A value of 0 means that the user does not have suicidal tendencies.

[0131] In a second aspect, the present application provides a suicide detection device.

[0132] Figure 4 It is a structural schematic diagram of a suicide detection device provided by the present application.

[0133] like Figure 4 As shown, the suicide detection device comprises:

[0134] The data acquisition module 601 is used to acquire user data posted on social media by known users with suicidal intentions.

[0135] The first feature extraction module 602 is used to extract features from user data using three convolutional layers to obtain a user text feature vector.

[0136] The second feature extraction module 603 is used to extract a dictionary feature vector from the user data according to the Chinese suicide dictionary, and to generate a posting time vector and a social information feature vector of the known user according to the posting time feature and social information feature of the known user.

[0137] The detection model generation module 604 is used to fuse the dictionary feature vector with the user text feature vector to construct a first convolutional neural network model that outputs the dictionary feature label; fuse the posting time feature vector with the user text feature vector to construct a second convolutional neural network model that outputs the posting time feature label; fuse the social information feature vector with the user text feature vector to construct a third convolutional neural network model that outputs the social information feature label; and fuse the first convolutional neural network model, the second convolutional neural network model, and the third convolutional neural network model to obtain a suicidal tendency detection model.

[0138] The prediction module 605 is used to input the test data posted by the test user on the social media into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user.

[0139] In a specific embodiment, a technician screens out a user u who has suicidal thoughts on a social media. i , where u i ∈U, i=1,2,...,N, i represents the user's serial number, N represents the total number of users in the Chinese suicide detection dataset, and user u i The total content posted on this social media is represented by j means u i The serial number of the user's published content, M represents user u iThe total number of published contents of user u, P represents all the data in the Chinese suicide detection dataset; i All data published Summarize into one piece of data This data is input into the constructed suicide tendency detection model, and the user u is obtained through probability calculation and label association in the suicide tendency detection model. i Comprehensive suicide tendency label like If the value of is 1, the user has the intention to commit suicide. If the value of is 0, the user does not have any suicidal thoughts.

[0140] The present invention identifies users with suicidal thoughts on social media through a Chinese suicide detection dataset, and constructs a new multi-feature text convolutional neural network model through three features of text information based on user social media content (such as features of the Chinese suicide dictionary, features of posting time, and features of social information). It is further combined with a label association mechanism to obtain the final suicidal tendency detection model - a multi-feature label association text convolutional neural network, which can be modeled based on the suicide detection dataset of Chinese social media, and has a simple model structure and low training cost. It can also combine the advantages of multiple independent models, reduce the influence of a single model on the misclassification of certain special samples, and improve the classification accuracy, thereby achieving the purpose of improving the detection accuracy.

[0141] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and this program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, CD-ROM, etc.

[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of each embodiment.

Claims

1. A suicide detection method based on multi-feature fusion and label association, characterized in that the steps include: Obtaining user data posted on social media by known users with suicidal intentions; Using three convolutional layers to extract features from the user data to obtain a user text feature vector; Extracting a dictionary feature vector from the user data according to a Chinese suicide dictionary, and generating a posting time vector and a social information feature vector of the known user according to the posting time feature and the social information feature of the known user respectively; The dictionary feature vector is fused with the user text feature vector to construct a first convolutional neural network model that outputs a dictionary feature label; the posting time feature vector is fused with the user text feature vector to construct a second convolutional neural network model that outputs a posting time feature label; the social information feature vector is fused with the user text feature vector to construct a third convolutional neural network model that outputs a social information feature label; the first convolutional neural network model, the second convolutional neural network model and the third convolutional neural network model are fused to obtain a suicidal tendency detection model; The test data posted by the test user on social media is input into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user.

2. The method according to claim 1, characterized in that After obtaining the user data posted on social media by the known user with suicidal intentions, the method further includes: deleting text content in the user data according to a preset publishing tool of the social media and keywords contained in the social media.

3. The method according to claim 2, characterized in that The deleting the text content in the user data includes: Deleting the URL link included in the text content of the user data; Delete other users mentioned by @ symbol in the text content of said User Data; removing emoticons from text content of the user data; Deleting symbols and words that are meaningless to text classification work from the text content of the user data; Deleting the user's current geographic location from the text content of the user data; Using a regular expression to delete all topics that appear in the text content of the user data; Check and delete user data whose text content is too small.

4. The method according to claim 1, characterized in that: The three convolutional layers are used to extract features from the user data to obtain a user text feature vector, including: Three convolutional layers are used to extract features from the user data respectively, and the convolution results extracted by the three convolutional layers are spliced ​​to obtain the user text feature vector.

5. The method according to claim 1, characterized in that: The fusing the dictionary feature vector with the user text feature vector comprises: Performing a full connection operation on the dictionary feature vector to obtain a dictionary full connection vector; Concatenating the dictionary fully connected vector with the user text feature vector to obtain a first fusion vector for training the first convolutional neural network model; The fusing the posting time feature vector with the user text feature vector comprises: Perform a full connection operation on the posting time feature vector to obtain a posting time fully connected vector; Concatenating the posting time fully connected vector with the user text feature vector to obtain a second fusion vector for training the second convolutional neural network model; The fusing the social information feature vector with the user text feature vector includes: Performing a full connection operation on the social information feature vector to obtain a social information fully connected vector; The social information fully connected vector is concatenated with the user text feature vector to obtain a third fusion vector for training the third convolutional neural network model.

6. The method according to claim 1, characterized in that The step of inputting the test data posted by the test user on the social media into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user includes: The data to be tested is input into the suicidal tendency detection model, and the three convolutional neural network models in the suicidal tendency detection model respectively perform probability detection, and obtain the dictionary suicidal tendency probability, the posting time suicidal tendency probability, and the social information suicidal tendency probability in the suicidal tendency detection model; According to the suicidal tendency probability of the dictionary, the suicidal tendency probability of the posting time, and the suicidal tendency probability of the social information, respectively, a suicidal tendency label is determined to obtain a suicidal tendency label of the dictionary, a suicidal tendency label of the posting time, and a suicidal tendency label of the social information; The dictionary suicidal tendency label, the posting time suicidal tendency label, and the social information suicidal tendency label are associated to obtain a comprehensive suicidal tendency label.

7. The method according to claim 6, characterized in that The loss function of the suicide tendency detection model is implemented using the following formula: Where i∈{1,2,…,N} represents the i-th user, N represents the number of users, and y i represents the true label of sample i, p i It represents the probability of predicting sample i as having suicidal tendency, and L represents the loss value.

8. The method according to claim 6, characterized in that The determining of the suicide tendency label according to the suicidal tendency probability of the dictionary, the suicidal tendency probability of the posting time, and the suicidal tendency probability of the social information respectively includes: Set the threshold for judging the suicidal tendency label; If one of the suicidal tendency probability in the dictionary, the suicidal tendency probability in the posting time, and the suicidal tendency probability in the social information exceeds the threshold, the corresponding suicidal tendency label is set as having suicidal tendency.

9. The method according to claim 6, characterized in that The step of associating the dictionary suicide tendency label, the posting time suicide tendency label, and the social information suicide tendency label to obtain a comprehensive suicide tendency label includes: If at least two of the dictionary suicidal tendency label, the posting time suicidal tendency label, and the social information suicidal tendency label are suicidal tendency, the comprehensive suicidal tendency label is set to be suicidal tendency.

10. A suicide detection device based on multi-feature fusion and label association, characterized in that: include: A data acquisition module, used to acquire user data posted on social media by known users with suicide intentions; A first feature extraction module, used to extract features from the user data using three convolutional layers to obtain a user text feature vector; A second feature extraction module is used to extract a dictionary feature vector from the user data according to a Chinese suicide dictionary, and to generate a posting time vector and a social information feature vector of the known user according to the posting time feature and the social information feature of the known user; A detection model generation module, used to fuse the dictionary feature vector with the user text feature vector to construct a first convolutional neural network model that outputs a dictionary feature label; fuse the posting time feature vector with the user text feature vector to construct a second convolutional neural network model that outputs a posting time feature label; fuse the social information feature vector with the user text feature vector to construct a third convolutional neural network model that outputs a social information feature label; fuse the first convolutional neural network model, the second convolutional neural network model and the third convolutional neural network model to obtain a suicidal tendency detection model; The prediction module is used to input the test data released by the test user on the social media into the suicidal tendency detection model to obtain the suicidal tendency probability of the test user.