Psychological detection method for conflict actors based on multi-dimensional psychological characteristics modeling

By constructing a multi-dimensional psychological characteristic scale and a pre-trained language model, the problem of insufficient analysis of the psychological characteristics of disputers in the existing technology is solved, efficient prediction and early warning of conflict and dispute risks are achieved, and early intervention in conflict and dispute events is provided. support.

CN118467740BActive Publication Date: 2024-09-24UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410841048.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-24
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

The existing technology mainly analyzes conflicts and disputes from the perspective of the victim, making it difficult to predict and prevent the occurrence of conflicts and disputes. It lacks effective modeling and data support for the psychological characteristics of conflict persons, resulting in insufficient risk prediction of conflicts and disputes.

Method used

By integrating social media data, a multi-dimensional psychological characteristic scale is constructed, and a pre-trained language model is used to annotate and analyze the speech data of conflicting disputers to generate six categories: traumatic experience, bad conduct, personality deviation, emotional imbalance, cognitive bias and conflict tendency. A large-dimensional feature scale is used to establish a multi-label linear classifier to identify the psychological characteristics of people involved in conflicts and disputes.

Benefits of technology

It provides a standardized method for assessing the psychological characteristics of conflict participants, which improves the accuracy and efficiency of predicting the risk of conflicts and disputes, enables timely detection of potential conflicts, takes intervention measures, prevents conflicts and disputes, and builds a more harmonious social environment. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467740B
    Figure CN118467740B
Patent Text Reader

Abstract

The present invention discloses a psychological detection method for conflict and dispute actors based on multi-dimensional psychological feature modeling, including S1, constructing an unlabeled conflict and dispute actor speech aggregation data set; S2, generating a multi-dimensional psychological feature scale of six dimensions; S3, using the multi-dimensional psychological feature scale to divide the conflict and dispute actor speech aggregation data set after labeling and analysis; S4, dividing the collated conflict and dispute actor speech aggregation data set to generate a training set, a validation set and a test set respectively; S5, calculating and obtaining the final text feature representation; S6, completing the construction of a conflict and dispute actor psychological feature recognition model. The present invention provides a standardized way to evaluate the psychological characteristics of conflict and dispute actors, ensures the quality and comparability of the data, and helps to reveal the potential psychological mechanism leading to conflicts and disputes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of psychology technology, and in particular to a method for detecting the psychology of conflict and dispute actors based on multi-dimensional psychological characteristic modeling. Background Art

[0002] In the context of deepening the promotion of the diversified conflict resolution mechanism, the conflict issue, as a serious and multi-layered social conflict, has also attracted widespread attention. However, when we dig deeper into the causes of conflict incidents, we will find that the core often lies in the complex psychological structure of the conflict parties. Existing research mainly focuses on post-conflict intervention and psychological rehabilitation of victims, and there are relatively few psychological characteristics analysis and preventive measures for conflict parties. It is far from enough to rely solely on post-processing of conflict incidents. It is necessary to strengthen the modeling of the psychological characteristics of conflict parties in order to predict and prevent potential conflict risks in advance.

[0003] Traditional psychological research on conflicts and disputes is mostly based on the perspective of victims, studying the psychological consequences of conflict and dispute experiences on the victim groups and the impact of conflict and dispute events on society. Although such research has revealed the profound impact of conflicts and disputes on victims, it is difficult to analyze the potential manifestations and causes of conflicts and disputes from the perspective of the conflict parties, and cannot provide support for predicting the risk of conflicts and disputes in advance and reducing social conflicts. In addition, the analysis of the psychological characteristics of conflict and dispute parties is limited by the source of data. There is a general lack of open source conflict and dispute party data sets at home and abroad. A small number of scholars have cooperated with relevant government departments to use the data in the database to conduct a comprehensive analysis of conflict and dispute events, and predict the risk of conflict and dispute recidivism for people with conflict and dispute records in the database.

[0004] Therefore, how to provide a psychological detection method for conflict actors based on multi-dimensional psychological feature modeling is an urgent problem that technicians in this field need to solve. Summary of the invention

[0005] One purpose of the present invention is to propose a psychological detection method for conflict and dispute actors based on multi-dimensional psychological characteristic modeling. The present invention provides a standardized way to evaluate the psychological characteristics of conflict and dispute actors, ensures the quality and comparability of the data, and helps to reveal the potential psychological mechanisms that lead to conflicts and disputes.

[0006] According to an embodiment of the present invention, a method for detecting the psychology of conflict actors based on multi-dimensional psychological feature modeling includes the following steps:

[0007] S1. Integrate the relevant psychological description data of the disputers, obtain data with specific dispute labels from social media platforms, filter and clean the data, and construct an unlabeled aggregated dataset of the disputers' speeches;

[0008] S2. Construct a multidimensional psychological characteristic scale based on the aggregated speech data set of conflict and dispute participants. Invite psychology experts to annotate and analyze the aggregated speech data set of conflict and dispute participants. According to the statistics and selection of keywords, generate a multidimensional psychological characteristic scale with six dimensions: traumatic experience, bad conduct, personality deviation, emotional disorder, cognitive bias and conflict tendency.

[0009] S3. Use a multi-dimensional psychological characteristic scale to divide the annotated and analyzed speech aggregation data set of the conflict disputers, and use the presence or absence of the psychological characteristic label column corresponding to each data in the conflict disputers' speech aggregation data set in the text as the true value of the psychological characteristic label;

[0010] S4, dividing the sorted speech aggregation data set of the conflict disputers into a training set, a validation set and a test set, respectively, for the training, validation and testing of the pre-trained language model;

[0011] S5. Use the pre-trained language model to model the training set, validation set, and test set, obtain the word unit representation with contextual semantic information through word unit embedding, paragraph embedding, and position embedding, and use the multi-layer self-attention mechanism to calculate the final text feature representation;

[0012] S6. Create a multi-label linear classifier based on the six categories of psychological characteristics defined in the multi-dimensional psychological characteristic scale, input the text feature representation into the multi-label linear classifier, and use the binary cross entropy loss function and Adam optimization algorithm to train the classifier to complete the construction of the psychological characteristic recognition model of conflict parties.

[0013] Optionally, the S1 includes the following steps:

[0014] S11. Obtain data with specific conflict and dispute labels from social media platforms and collect data using crawler tools developed by social media platforms;

[0015] S12. Conduct a preliminary screening of the collected data, retain the data containing the description of the relevant characteristics of the conflicting parties, and delete advertisements, related news and irrelevant content;

[0016] S13. Clean the data after preliminary screening, remove duplicate and invalid data, and retain speech data that meets the requirements;

[0017] S14, formatting the cleaned speech data according to pre-set fields, wherein the pre-set fields include user ID, content and download link, and converting the data into a required format;

[0018] S15. Construct an unlabeled dataset of speech aggregation of conflicting parties:

[0019] ;

[0020] in, represents the i-th speech data, and n is the total number of speeches in the data set;

[0021] S16. Aggregate the constructed unlabeled data set to form the final speech data set of the conflict disputers:

[0022] ;

[0023] in, represents the jth aggregated dataset, and m is the number of aggregated datasets.

[0024] Optionally, S2 includes the following steps:

[0025] S21. Aggregation dataset based on speech of conflicting parties , preliminarily construct a multi-dimensional psychological characteristic scale and define the speech aggregation data set of conflict disputers Each speech data in The eigenvector of is represented as:

[0026] ;

[0027] in, represents the jth word in the i-th speech data, and N is the total number of words;

[0028] S22: Invite psychology experts to aggregate the speech data set of those involved in the conflict Label and analyze, define the keywords corresponding to each type of psychological characteristics according to keyword statistics and selection, and define the corresponding keyword set for each psychological characteristic k as , then each speech data The keyword matching degree on psychological feature k is expressed as:

[0029] ;

[0030] in, represents the keyword matching degree of the i-th speech data on the psychological feature k, represents the indicator function, when Belongs to keyword collection , the value is 1, otherwise it is 0. represents the jth word in the i-th speech data, The set of keywords representing the psychological feature k, Indicates the timestamp of the current speech data. Indicates keywords The timestamp of the occurrence, represents the time decay factor;

[0031] S23. Generate a multidimensional psychological characteristic scale containing six dimensions based on the data annotated by psychology experts. For each psychological characteristic dimension k, define the label value for:

[0032] ;

[0033] Where L represents the total number of psychological characteristic categories, represents the feature weight matrix given by psychology experts, represents the score value related to psychological characteristic m in the i-th speech data, and M represents the total number of score values ​​related to psychological characteristics;

[0034] S24. Data for each speech , based on each speech data Whether the content contains keywords in the six dimensions, the presence or absence of the corresponding psychological feature label in the text is used as the true value of the psychological feature label to form a labeled speech dataset of the conflicting parties :

[0035] ;

[0036] in, represents the label value of the traumatic experience in the i-th speech data, represents the label value of bad conduct in the i-th speech data, Represents the label value of personality deviation in the i-th speech data, represents the label value of emotional disorder in the i-th speech data, Represents the label value of the cognitive bias in the i-th speech data, represents the label value of the conflict tendency in the i-th speech data, and n represents the total number of speeches in the dataset.

[0037] Optionally, the six-dimensional multidimensional psychological characteristic scale includes:

[0038] Traumatic Experience A: Mark the keywords of traumatic experience mentioned in the speech;

[0039] Bad Conduct B: Mark the bad behavior keywords mentioned in the speech;

[0040] Personality Deviation P: Mark the personality deviation keywords mentioned in the speech;

[0041] Emotional Disorder E: Mark the emotional disorder keywords mentioned in the speech;

[0042] Cognitive bias C: mark the cognitive bias keywords mentioned in the speech;

[0043] Conflict Tendency V: Mark the conflict tendency keywords mentioned in the speech.

[0044] Optionally, S3 includes the following steps:

[0045] S31. Using the multi-dimensional psychological characteristic scale to annotate and analyze the speech data set of the conflicting parties Perform detailed annotation and calculate the corresponding psychological characteristic label based on the keyword matching degree in each speech data;

[0046] S32, taking the presence or absence of the psychological feature label corresponding to each piece of data in the conflict disputer speech aggregation data set in the text as the true value of the psychological feature label, and defining the label vector for:

[0047] ;

[0048] in, Represents the label value of the kth psychological feature in the i-th speech data;

[0049] S34, the calculated label vector As the true value of the annotated psychological feature label, the final conflict disputers’ speech aggregation data set is formed:

[0050] ;

[0051] Here, n represents the total number of speeches in the dataset.

[0052] Optionally, S4 includes the following steps:

[0053] S41. Aggregate dataset of the speech of the conflicting parties after sorting Divide and aggregate the speech data sets of the conflicting parties Divide into training set , validation set and test set ;

[0054] S42, define the division ratio, set the division ratio of the training set, validation set and test set to be, , , , in ;

[0055] S44, for the training set Preprocess each speech data Convert to the input format of a pre-trained language model, including tokenization, adding special tags, and generating token sequences.

[0056] Optionally, S5 includes the following steps:

[0057] S51. Use the improved BERT pre-trained language model to model the training set, validation set, and test set, and convert each speech data into the model input format, including word embedding, paragraph embedding, and position embedding;

[0058] S52, performing lemma processing on the speech data, dividing the text into lemmas;

[0059] S53, embed each word into a word Convert to word embedding vector , define the word embedding matrix E as:

[0060] ;

[0061] S54. Add paragraph embedding to distinguish different sentences and position embedding , paragraph embedding is used to distinguish the positions of different sentences, and position embedding is used to represent the position of word in the sentence. The paragraph embedding matrix P and the position embedding matrix POS are defined as:

[0062] ;

[0063] ;

[0064] S55. Add the word unit embedding, paragraph embedding and position embedding to obtain the final word unit representation matrix X:

[0065] ;

[0066] S56, introduce the sentiment analysis module, use the sentiment analysis model to classify the sentiment of each speech data, and convert the sentiment vector As an additional embedding input, the sentiment embedding matrix A is defined as:

[0067] ;

[0068] Sentiment embedding represents sentiment polarity and intensity, obtained through the sentiment analysis module;

[0069] S57, combine the word unit representation matrix X with the sentiment embedding matrix A to form the final input matrix :

[0070] ;

[0071] S58, the final input matrix The input is fed into the improved BERT pre-trained language model, and the word is contextually modeled through a multi-layer self-attention mechanism. The self-attention mechanism is defined as:

[0072] ;

[0073] in, represents the context representation of the i-th word after the self-attention mechanism is calculated, Q is the query vector, K is the key vector, and V is the value vector. The function calculates the self-attention weight and generates the contextual representation of each token;

[0074] S59. Introduce a dual self-attention mechanism into the improved BERT pre-trained language model, perform self-attention calculations on word embedding and sentiment embedding respectively, and fuse the results. Define the calculation formula of the dual self-attention mechanism as:

[0075] ;

[0076] ;

[0077] ;

[0078] in, are the query, key, and value vectors of the word embedding, respectively. are the query, key, and value vectors of sentiment embedding, respectively. represents the word embedding context representation after the self-attention mechanism is calculated. represents the sentiment embedding context representation after calculation by the self-attention mechanism, The final representation after the fusion of the context representation of word embedding and sentiment embedding;

[0079] S510: Perform nonlinear transformation on the input hidden state through multi-layer self-attention mechanism and fully connected layer to obtain the final text feature representation :

[0080] ;

[0081] S511. Use the text embedding representation corresponding to the output layer of the first special word "[CLS]" as the feature representation of the input text of the improved BERT pre-trained language model to obtain the final text feature representation with contextual semantic information and sentiment information. .

[0082] Optionally, the S6 comprises the following steps:

[0083] S61. Create a multi-label linear classifier based on the six psychological characteristics defined in the multi-dimensional psychological characteristics scale, design a binary classifier for each psychological characteristic k, and define the input of the classifier as the final text feature representation. ;

[0084] S62, the final text feature representation Input into each binary classifier, and define the classifier of the kth psychological feature as , the output is , represents the predicted value of the kth psychological characteristic:

[0085] ;

[0086] S63. Use the binary cross entropy loss function L to calculate the predicted value of each psychological feature With the true value The error between

[0087] S64, summing the loss functions of all psychological features to obtain a total loss function;

[0088] S65. Use the Adam optimization algorithm to train the multi-label linear classifier, adjust the model parameters by minimizing the total loss function, and optimize the performance of the classifier;

[0089] S66. The final psychological characteristics recognition model of the conflict disputers is expressed as:

[0090] ;

[0091] in, It is the final psychological characteristic identification model for the parties involved in the conflict.

[0092] The beneficial effects of the present invention are:

[0093] (1) Based on the aggregated speech data set of conflict and dispute parties, this paper invites psychology experts to annotate and analyze the data in detail, and generates a multidimensional psychological characteristic scale containing six dimensions: traumatic experience, bad conduct, personality deviation, emotional disorder, cognitive bias and conflict tendency. This scale provides a standardized way to evaluate the psychological characteristics of conflict and dispute parties, ensures the quality and comparability of the data, and helps to reveal the potential psychological mechanisms that lead to conflicts and disputes.

[0094] (2) The present invention demonstrates significant superiority in the detection of psychological characteristics of conflict parties through the improved BERT pre-trained language model. Through deep semantic understanding, the fusion of multiple embedding methods, dual self-attention mechanism, model robustness and efficient training optimization, the accuracy and efficiency of psychological characteristics identification of conflict parties are significantly improved, providing important technical support for early warning and intervention of conflicts.

[0095] (3) The present invention can timely detect potential conflicting parties from social media posts, and then take corresponding monitoring and intervention measures to prevent conflicts and disputes from happening at the source. By discovering potential conflict and dispute risks in advance, relevant agencies can take targeted intervention measures before the situation escalates, protect victims, and build a more harmonious and stable social environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0097] Figure 1 The present invention proposes a flow chart of a method for detecting the psychology of conflict actors based on multi-dimensional psychological characteristics modeling. DETAILED DESCRIPTION

[0098] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0099] refer to Figure 1 A psychological detection method for conflict actors based on multi-dimensional psychological characteristics modeling includes the following steps:

[0100] S1. Integrate the relevant psychological description data of the disputers, obtain data with specific dispute labels from social media platforms, filter and clean the data, and construct an unlabeled aggregated dataset of the disputers' speeches;

[0101] In this implementation, S1 includes the following steps:

[0102] S11. Obtain data with specific conflict and dispute labels from social media platforms and collect data using crawler tools developed by social media platforms;

[0103] S12. Conduct a preliminary screening of the collected data, retain the data containing the description of the relevant characteristics of the conflicting parties, and delete advertisements, related news and irrelevant content;

[0104] S13. Clean the data after preliminary screening, remove duplicate and invalid data, and retain speech data that meets the requirements;

[0105] S14, formatting the cleaned speech data according to pre-set fields, the pre-set fields including user ID, content and download link, and converting the data into a required format;

[0106] S15. Construct an unlabeled dataset of speech aggregation of conflicting parties:

[0107] ;

[0108] in, represents the i-th speech data, and n is the total number of speeches in the data set;

[0109] S16. Aggregate the constructed unlabeled data set to form the final speech data set of the conflict disputers:

[0110] ;

[0111] in, represents the jth aggregated dataset, and m is the number of aggregated datasets.

[0112] S2. Construct a multidimensional psychological characteristic scale based on the aggregated speech data set of conflict and dispute participants. Invite psychology experts to annotate and analyze the aggregated speech data set of conflict and dispute participants. According to the statistics and selection of keywords, generate a multidimensional psychological characteristic scale with six dimensions: traumatic experience, bad conduct, personality deviation, emotional disorder, cognitive bias and conflict tendency.

[0113] In this implementation, S2 includes the following steps:

[0114] S21. Aggregation dataset based on speech of conflicting parties , preliminarily construct a multi-dimensional psychological characteristic scale and define the speech aggregation data set of conflict disputers Each speech data in The eigenvector of is represented as:

[0115] ;

[0116] in, represents the jth word in the i-th speech data, and N is the total number of words;

[0117] S22: Invite psychology experts to aggregate the speech data set of those involved in the conflict Label and analyze, define the keywords corresponding to each type of psychological characteristics according to keyword statistics and selection, and define the corresponding keyword set for each psychological characteristic k as , then each speech data The keyword matching degree on psychological feature k is expressed as:

[0118] ;

[0119] in, represents the keyword matching degree of the i-th speech data on the psychological feature k, represents the indicator function, when Belongs to keyword collection , the value is 1, otherwise it is 0. represents the jth word in the i-th speech data, The set of keywords representing the psychological feature k, Indicates the timestamp of the current speech data. Indicates keywords The timestamp of the occurrence, represents the time decay factor;

[0120] S23. Generate a multidimensional psychological characteristic scale containing six dimensions based on the data annotated by psychology experts. For each psychological characteristic dimension k, define the label value for:

[0121] ;

[0122] Where L represents the total number of psychological characteristic categories, represents the feature weight matrix given by psychology experts, represents the score value related to psychological characteristic m in the i-th speech data, and M represents the total number of score values ​​related to psychological characteristics;

[0123] S24. Data for each speech , based on each speech data Whether the content contains keywords in the six dimensions, the presence or absence of the corresponding psychological feature label in the text is used as the true value of the psychological feature label to form a labeled speech dataset of the conflicting parties :

[0124] ;

[0125] in, represents the label value of the traumatic experience in the i-th speech data, represents the label value of bad conduct in the i-th speech data, Represents the label value of personality deviation in the i-th speech data, represents the label value of emotional disorder in the i-th speech data, Represents the label value of the cognitive bias in the i-th speech data, represents the label value of the conflict tendency in the i-th speech data, and n represents the total number of speeches in the dataset.

[0126] In this embodiment, the six-dimensional multidimensional psychological characteristic scale includes:

[0127] Traumatic Experience A: Mark the keywords of traumatic experience mentioned in the speech;

[0128] Bad Conduct B: Mark the bad behavior keywords mentioned in the speech;

[0129] Personality Deviation P: Mark the personality deviation keywords mentioned in the speech;

[0130] Emotional Disorder E: Mark the emotional disorder keywords mentioned in the speech;

[0131] Cognitive bias C: mark the cognitive bias keywords mentioned in the speech;

[0132] Conflict Tendency V: Mark the conflict tendency keywords mentioned in the speech.

[0133] S3. Use a multi-dimensional psychological characteristic scale to divide the annotated and analyzed speech aggregation data set of the conflict disputers, and use the presence or absence of the psychological characteristic label column corresponding to each data in the conflict disputers' speech aggregation data set in the text as the true value of the psychological characteristic label;

[0134] In this implementation, S3 includes the following steps:

[0135] S31. Using the multi-dimensional psychological characteristic scale to annotate and analyze the speech data set of the conflicting parties Perform detailed annotation and calculate the corresponding psychological characteristic label based on the keyword matching degree in each speech data;

[0136] S32, taking the presence or absence of the psychological feature label corresponding to each piece of data in the conflict disputer speech aggregation data set in the text as the true value of the psychological feature label, and defining the label vector for:

[0137] ;

[0138] in, Represents the label value of the kth psychological feature in the i-th speech data;

[0139] S34, the calculated label vector As the true value of the annotated psychological feature label, the final conflict disputers’ speech aggregation data set is formed:

[0140] ;

[0141] Here, n represents the total number of speeches in the dataset.

[0142] S4, dividing the sorted speech aggregation data set of the conflict disputers into a training set, a validation set and a test set, respectively, for the training, validation and testing of the pre-trained language model;

[0143] In this implementation, S4 includes the following steps:

[0144] S41. Aggregate dataset of the speech of the conflicting parties after sorting Divide and aggregate the speech data sets of the conflicting parties Divide into training set , validation set and test set ;

[0145] S42, define the division ratio, set the division ratio of the training set, validation set and test set to be, , , ,in ;

[0146] S44, for the training set Preprocess each speech data Convert to the input format of a pre-trained language model, including tokenization, adding special tags, and generating token sequences.

[0147] S5. Use the pre-trained language model to model the training set, validation set, and test set, obtain the word unit representation with contextual semantic information through word unit embedding, paragraph embedding, and position embedding, and use the multi-layer self-attention mechanism to calculate the final text feature representation;

[0148] In this implementation, S5 includes the following steps:

[0149] S51. Use the improved BERT pre-trained language model to model the training set, validation set, and test set, and convert each speech data into the model input format, including word embedding, paragraph embedding, and position embedding;

[0150] S52, performing lemma processing on the speech data, dividing the text into lemmas;

[0151] S53, embed each word into Convert to word embedding vector , define the word unit embedding matrix E as:

[0152] ;

[0153] S54. Add paragraph embedding to distinguish different sentences and position embedding , paragraph embedding is used to distinguish the positions of different sentences, and position embedding is used to represent the position of word in the sentence. The paragraph embedding matrix P and the position embedding matrix POS are defined as:

[0154] ;

[0155] ;

[0156] S55. Add the word unit embedding, paragraph embedding and position embedding to obtain the final word unit representation matrix X:

[0157] ;

[0158] S56, introduce the sentiment analysis module, use the sentiment analysis model to classify the sentiment of each speech data, and convert the sentiment vector As an additional embedding input, the sentiment embedding matrix A is defined as:

[0159] ;

[0160] Sentiment embedding represents sentiment polarity and intensity, obtained through the sentiment analysis module;

[0161] S57, combine the word unit representation matrix X with the sentiment embedding matrix A to form the final input matrix :

[0162] ;

[0163] S58, the final input matrix The input is fed into the improved BERT pre-trained language model, and the word is contextually modeled through a multi-layer self-attention mechanism. The self-attention mechanism is defined as:

[0164] ;

[0165] in, represents the context representation of the i-th word after the self-attention mechanism is calculated, Q is the query vector, K is the key vector, and V is the value vector. The function calculates the self-attention weight and generates the contextual representation of each token;

[0166] S59. Introduce a dual self-attention mechanism into the improved BERT pre-trained language model, perform self-attention calculations on word embedding and sentiment embedding respectively, and fuse the results. Define the calculation formula of the dual self-attention mechanism as:

[0167] ;

[0168] ;

[0169] ;

[0170] in, are the query, key, and value vectors of the word embedding, respectively. are the query, key, and value vectors of sentiment embedding, respectively. represents the word embedding context representation after the self-attention mechanism is calculated. represents the sentiment embedding context representation after calculation by the self-attention mechanism, The final representation after the fusion of the context representation of word embedding and sentiment embedding;

[0171] S510: Perform nonlinear transformation on the input hidden state through multi-layer self-attention mechanism and fully connected layer to obtain the final text feature representation :

[0172] ;

[0173] S511. Use the text embedding representation corresponding to the output layer of the first special word "[CLS]" as the feature representation of the input text of the improved BERT pre-trained language model to obtain the final text feature representation with contextual semantic information and sentiment information. .

[0174] S6. Create a multi-label linear classifier based on the six categories of psychological characteristics defined in the multi-dimensional psychological characteristic scale, input the text feature representation into the multi-label linear classifier, and use the binary cross entropy loss function and Adam optimization algorithm to train the classifier to complete the construction of the psychological characteristic recognition model of conflict parties.

[0175] In this implementation, S6 includes the following steps:

[0176] S61. Create a multi-label linear classifier based on the six psychological characteristics defined in the multi-dimensional psychological characteristics scale, design a binary classifier for each psychological characteristic k, and define the input of the classifier as the final text feature representation. ;

[0177] S62, the final text feature representation Input into each binary classifier, and define the classifier of the kth psychological feature as , the output is , represents the predicted value of the kth psychological characteristic:

[0178] ;

[0179] S63. Use the binary cross entropy loss function L to calculate the predicted value of each psychological feature With the true value The error between

[0180] S64, summing the loss functions of all psychological features to obtain a total loss function;

[0181] S65. Train the multi-label linear classifier using the Adam optimization algorithm, adjust the model parameters by minimizing the total loss function, and optimize the performance of the classifier.

[0182] S66. The final psychological feature recognition model for conflict disputants is expressed as:

[0183] ;

[0184] where is the final psychological feature recognition model for conflict disputants.

[0185] Example 1:

[0186] Example 1:

[0187] In City A, conflict dispute incidents occur frequently, seriously affecting community safety and residents' sense of happiness. To effectively contain this phenomenon, the Municipal Public Security Bureau and the Mental Health Research Center jointly decided to apply a psychological detection method for conflict dispute actors based on multi-dimensional psychological feature modeling to conduct early identification and intervention on potential conflict disputants. The project team selected a community with frequent dispute incidents as a pilot and collected data from local social media platforms and the public remarks of community residents to conduct research on the identification of the psychological features of conflict disputants.

[0188] In this scenario, the project team first obtained data with specific conflict dispute labels from social media platforms (such as Xiaohongshu, Weibo, WeChat, and forums). These labels include "#conflict dispute", "#anti-conflict dispute", etc. By developing a crawler tool, the team collected more than 100,000 relevant speech data within a month. Then, the team screened and cleaned this data, retained the data containing descriptions of the relevant traits of the conflict parties, and deleted advertisements, news, and irrelevant content. Finally, an aggregated dataset of 50,000 unlabeled conflict disputant remarks was constructed.

[0189] Next, the team invited 10 psychology experts to annotate and analyze the dataset. Based on keyword statistics and selection, a multi-dimensional psychological feature scale including six dimensions of traumatic experience, bad conduct, personality deviation, emotional disorder, cognitive bias, and conflict tendency was generated. Each expert annotated an average of 5,000 pieces of data, and finally, a high-quality annotated dataset was formed.

[0190] In terms of data set division, the team divided the annotated data set into training set, validation set and test set, with the ratios of 70%, 15% and 15% respectively. The training set is used to train the pre-trained language model, the validation set is used to evaluate the intermediate performance of the model, and the test set is used to evaluate the final effect of the model. The team chose BERT as the pre-trained language model, and modeled each speech data through word embedding, paragraph embedding and position embedding to obtain word representation with contextual semantic information.

[0191] The specific testing process is as follows:

[0192] Data preparation and preprocessing: Obtain speech data with specific conflict and dispute labels from social media platforms, perform data screening, cleaning and formatting, and construct an unlabeled speech aggregation dataset of conflict and dispute participants.

[0193] Construction of a multidimensional psychological characteristic scale: Invite psychology experts to annotate and analyze the data, generate a multidimensional psychological characteristic scale containing six dimensions, and annotate each speech data to form an annotated data set.

[0194] Dataset division and model training: The annotated dataset is divided into training set, validation set and test set. The training set is modeled using the BERT pre-trained language model. The word representation with contextual semantic information is obtained through word embedding, paragraph embedding and position embedding.

[0195] Construction and optimization of multi-label linear classifier: Based on the multi-dimensional psychological characteristic scale, a multi-label linear classifier is created, a binary classifier is designed for each psychological characteristic, and the binary cross entropy loss function and Adam optimization algorithm are used for training, and finally a psychological characteristic recognition model for conflict parties is constructed.

[0196] Model evaluation and application: Use the validation set to evaluate the model's intermediate performance, and use the test set to evaluate the model's final effect to ensure the model's accuracy and generalization ability. After the model is deployed, conduct real-time detection of newly collected social media speech data to identify potential conflicting parties and take timely intervention measures.

[0197] In order to verify the superiority of the method of the present invention over the traditional method, the project team compared the effects of the two methods in practical applications. The traditional method mainly relies on expert interviews and psychological scale surveys to identify and evaluate the parties involved in the conflict.

[0198] During the one-month pilot, the project team used the method of the present invention and the traditional method to analyze and detect the social media comments of 200 residents in the community. The results are shown in Table 1 below:

[0199]

[0200] According to Table 1 above, it can be seen that the method of the present invention is significantly superior to the traditional method in terms of recognition accuracy, recall rate and F1 value, and the average processing time is greatly shortened, which improves the detection efficiency. At the same time, through early identification and timely intervention, the intervention success rate of conflict and dispute incidents is also significantly improved, effectively curbing the occurrence of conflicts and disputes. Through the method of the present invention, the number of conflict and dispute incidents in the community has been significantly reduced, and the sense of security and happiness of residents has been significantly improved.

[0201] Based on the aggregated speech data set of conflict and dispute parties, the present invention invites psychology experts to conduct detailed annotation and analysis of the data, and generates a multidimensional psychological characteristic scale containing six dimensions: traumatic experience, bad conduct, personality deviation, emotional disorder, cognitive bias and conflict tendency. This scale provides a standardized way to evaluate the psychological characteristics of conflict and dispute parties, ensures the quality and comparability of the data, and helps to reveal the potential psychological mechanisms that lead to conflicts and disputes.

[0202] The present invention demonstrates significant superiority in the method of detecting psychological characteristics of conflict and dispute parties through the improved BERT pre-trained language model. Through deep semantic understanding, the fusion of multiple embedding methods, dual self-attention mechanism, model robustness and efficient training optimization, it significantly improves the accuracy and efficiency of psychological characteristic identification of conflict and dispute parties, providing important technical support for early warning and intervention of conflicts and disputes.

[0203] The present invention can timely detect potential conflictors from social media speeches, and then take corresponding monitoring and intervention measures to prevent conflicts and disputes from happening at the source. By discovering potential conflict and dispute risks in advance, relevant agencies can take targeted intervention measures before the situation escalates, protect victims, and build a more harmonious and stable social environment.

[0204] In summary, the existing technology has many deficiencies in the analysis and prediction of the psychological characteristics of conflict and dispute parties, and it is difficult to achieve early warning and intervention of potential conflict and dispute risks. The present invention can effectively solve the defects of the existing technology by constructing a multi-dimensional psychological characteristic scale and using an advanced pre-trained language model for modeling and classification, and provides a comprehensive, accurate and efficient psychological detection method for conflict and dispute parties.

[0205] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A psychological detection method for conflict actors based on multi-dimensional psychological feature modeling, characterized in that: The steps include: S1. Integrate the relevant psychological description data of the disputers, obtain data with specific dispute labels from social media platforms, filter and clean the data, and construct an unlabeled aggregated dataset of the disputers' speeches; S2. Construct a multi-dimensional psychological characteristic scale based on the aggregated speech data set of the conflict and dispute participants. Invite psychology experts to annotate and analyze the aggregated speech data set of the conflict and dispute participants, and generate a multi-dimensional psychological characteristic scale with six dimensions based on keyword statistics and selection; The S2 comprises the following steps: S21. Aggregation dataset based on speech of conflicting parties , preliminarily construct a multi-dimensional psychological characteristic scale and define the speech aggregation data set of conflict disputers Each speech data in The eigenvector of is represented as: ; in, represents the jth word in the i-th speech data, and N is the total number of words; S22: Invite psychology experts to aggregate the speech data set of those involved in the conflict Label and analyze, define the keywords corresponding to each type of psychological characteristics according to keyword statistics and selection, and define the corresponding keyword set for each psychological characteristic k as , then each speech data The keyword matching degree on psychological feature k is expressed as: ; in, represents the keyword matching degree of the i-th speech data on the psychological feature k, represents the indicator function, when Belongs to keyword collection , the value is 1, otherwise it is 0. represents the jth word in the i-th speech data, The set of keywords representing the psychological feature k, Indicates the timestamp of the current speech data. Indicates keywords The timestamp of the occurrence, represents the time decay factor; S23. Generate a multidimensional psychological characteristic scale containing six dimensions based on the data annotated by psychology experts. For each psychological characteristic dimension k, define the label value for: ; Where L represents the total number of psychological characteristic categories, represents the feature weight matrix given by psychology experts, represents the score value related to psychological characteristic m in the i-th speech data, and M represents the total number of score values ​​related to psychological characteristics; S24. Data for each speech , based on each speech data Whether the content contains keywords in the six dimensions, the presence or absence of the corresponding psychological feature label in the text is used as the true value of the psychological feature label to form a labeled speech dataset of the conflicting parties : ; in, represents the label value of the traumatic experience in the i-th speech data, represents the label value of bad conduct in the i-th speech data, Represents the label value of personality deviation in the i-th speech data, represents the label value of emotional disorder in the i-th speech data, Represents the label value of the cognitive bias in the i-th speech data, represents the label value of the conflict tendency in the i-th speech data, and n represents the total number of speeches in the dataset; S3. Use a multi-dimensional psychological characteristic scale to divide the annotated and analyzed speech aggregation data set of the conflict disputers, and use the presence or absence of the psychological characteristic label column corresponding to each data in the conflict disputers' speech aggregation data set in the text as the true value of the psychological characteristic label; The S3 comprises the following steps: S31. Using the multi-dimensional psychological characteristic scale to annotate and analyze the speech data set of the conflicting parties Perform detailed annotation and calculate the corresponding psychological characteristic label based on the keyword matching degree in each speech data; S32, taking the presence or absence of the psychological feature label corresponding to each piece of data in the conflict disputer speech aggregation data set in the text as the true value of the psychological feature label, and defining the label vector for: ; in, Represents the label value of the kth psychological feature in the i-th speech data; S34, the calculated label vector As the true value of the annotated psychological feature label, the final conflict disputers’ speech aggregation data set is formed: ; Where n represents the total number of speeches in the dataset; S4, dividing the sorted speech aggregation data set of the conflict disputers into a training set, a validation set and a test set, respectively, for the training, validation and testing of the pre-trained language model; S5. Use the pre-trained language model to model the training set, validation set, and test set, obtain the word unit representation with contextual semantic information through word unit embedding, paragraph embedding, and position embedding, and use the multi-layer self-attention mechanism to calculate the final text feature representation; S6. Create a multi-label linear classifier based on the six types of psychological characteristics defined in the multi-dimensional psychological characteristics scale, input the text feature representation into the multi-label linear classifier, and use the binary cross entropy loss function and Adam optimization algorithm to train the classifier to complete the construction of the psychological characteristics recognition model of the conflict disputers; The S6 comprises the following steps: S61. Create a multi-label linear classifier based on the six psychological characteristics defined in the multi-dimensional psychological characteristics scale, design a binary classifier for each psychological characteristic k, and define the input of the classifier as the final text feature representation. ; S62, the final text feature representation Input into each binary classifier, and define the classifier of the kth psychological feature as , the output is , represents the predicted value of the kth psychological characteristic: ; S63. Use the binary cross entropy loss function L to calculate the predicted value of each psychological feature With the true value The error between S64, summing the loss functions of all psychological features to obtain a total loss function; S65. Use the Adam optimization algorithm to train the multi-label linear classifier, adjust the model parameters by minimizing the total loss function, and optimize the performance of the classifier; S66. The final psychological characteristics recognition model of the conflict disputers is expressed as: ; in, It is the final psychological characteristic identification model for the parties involved in the conflict.

2. According to claim 1, a method for detecting the psychology of conflict actors based on multi-dimensional psychological characteristics modeling is characterized by: The S1 comprises the following steps: S11. Obtain data with specific conflict and dispute labels from social media platforms and collect data using crawler tools developed by social media platforms; S12. Conduct a preliminary screening of the collected data, retain the data containing the description of the relevant characteristics of the conflicting parties, and delete advertisements, related news and irrelevant content; S13. Clean the data after preliminary screening, remove duplicate and invalid data, and retain speech data that meets the requirements; S14, formatting the cleaned speech data according to pre-set fields, wherein the pre-set fields include user ID, content and download link, and converting the data into a required format; S15. Construct an unlabeled dataset of speech aggregation of conflicting parties: ; in, represents the i-th speech data, and n is the total number of speeches in the data set; S16. Aggregate the constructed unlabeled data set to form the final speech data set of the conflict disputers: ; in, represents the jth aggregated dataset, and m is the number of aggregated datasets.

3. According to claim 1, a method for detecting the psychology of conflict actors based on multi-dimensional psychological characteristics modeling is characterized by: The six-dimensional multidimensional psychological characteristic scale includes: Traumatic Experience A: Mark the keywords of traumatic experience mentioned in the speech; Bad Conduct B: Mark the bad behavior keywords mentioned in the speech; Personality Deviation P: Mark the personality deviation keywords mentioned in the speech; Emotional Disorder E: Mark the emotional disorder keywords mentioned in the speech; Cognitive bias C: mark the cognitive bias keywords mentioned in the speech; Conflict Tendency V: Mark the conflict tendency keywords mentioned in the speech.

4. According to claim 1, a method for detecting the psychology of conflict actors based on multi-dimensional psychological characteristics modeling is characterized by: The S4 comprises the following steps: S41. Aggregate dataset of the speech of the conflicting parties after sorting Divide and aggregate the speech data sets of the conflicting parties Divide into training set , validation set and test set ; S42. Define the division ratio, and set the division ratio of the training set, validation set, and test set to be , , ,in ; S44, for the training set Preprocess each speech data Convert to the input format of a pre-trained language model, including tokenization, adding special tags, and generating token sequences.

5. The method for detecting the psychology of conflict actors based on multi-dimensional psychological characteristics modeling according to claim 4 is characterized in that: The S5 comprises the following steps: S51. Use the improved BERT pre-trained language model to model the training set, validation set, and test set, and convert each speech data into the model input format, including word embedding, paragraph embedding, and position embedding; S52, performing lemma processing on the speech data, dividing the text into lemmas; S53, embed each word into a word Convert to word embedding vector , define the word embedding matrix E as: ; S54. Add paragraph embedding to distinguish different sentences and position embedding , paragraph embedding is used to distinguish the positions of different sentences, and position embedding is used to represent the position of word in the sentence. The paragraph embedding matrix P and the position embedding matrix POS are defined as: ; ; S55. Add the word unit embedding, paragraph embedding and position embedding to get the final word unit representation matrix X: ; S56, introduce the sentiment analysis module, use the sentiment analysis model to classify the sentiment of each speech data, and convert the sentiment vector As an additional embedding input, the sentiment embedding matrix A is defined as: ; Sentiment embedding represents sentiment polarity and intensity, obtained through the sentiment analysis module; S57, combine the word unit representation matrix X with the sentiment embedding matrix A to form the final input matrix : ; S58, the final input matrix The input is fed into the improved BERT pre-trained language model, and the word is contextually modeled through a multi-layer self-attention mechanism. The self-attention mechanism is defined as: ; in, represents the context representation of the i-th word after the self-attention mechanism is calculated, Q is the query vector, K is the key vector, and V is the value vector. The function calculates the self-attention weight and generates the contextual representation of each token; S59. Introduce a dual self-attention mechanism into the improved BERT pre-trained language model, perform self-attention calculations on word embedding and sentiment embedding respectively, and fuse the results. Define the calculation formula of the dual self-attention mechanism as: ; ; ; in, are the query, key, and value vectors of the word embedding, respectively. are the query, key, and value vectors of sentiment embedding, respectively. represents the word embedding context representation after the self-attention mechanism is calculated. represents the sentiment embedding context representation after calculation by the self-attention mechanism, The final representation after the fusion of the context representation of word embedding and sentiment embedding; S510: Perform nonlinear transformation on the input hidden state through multi-layer self-attention mechanism and fully connected layer to obtain the final text feature representation : ; S511. Use the text embedding representation corresponding to the output layer of the first special word "[CLS]" as the feature representation of the input text of the improved BERT pre-trained language model to obtain the final text feature representation with contextual semantic information and sentiment information. .