Group member identification method and device, computer equipment and storage medium
By obtaining text speeches of individuals and groups from social media platforms, constructing interest topics and keyword collections, constructing interest feature representation vectors, and making consistency judgments, the problem of low recognition accuracy of group members in the existing technology is solved, and higher recognition accuracy and interest topic mining accuracy are achieved.
Patent Information
- Application Number
- CN202510017589.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, in group member recognition, the identification is based on the user's social media related information, which leads to the widespreadness of interest topics, making the mining accuracy low, and the prediction effect is not ideal in the scenario of implicit position tendency characteristic word.
By obtaining text speeches of individuals and groups from social media platforms, constructing text sets and keyword sets of interest topics, constructing interest feature representation vectors of individuals and groups respectively, and making consistency judgments to determine whether an individual belongs to the group.
The accuracy of group member recognition is improved, and the mining accuracy of interest topics is improved through deep semantic text representation model and clustering technology, and the effect of position tendency detection is enhanced through chain prompt technology and large language model.
Smart Images

Figure CN119886154A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a group member identification method, device, computer equipment and storage medium. Background Art
[0002] Group member identification refers to the process of identifying the membership relationship between social media individuals and groups and determining whether the individual belongs to the group. Currently, group member identification is mainly based on the user's social media related information such as interest characteristics. This method uses a shallow semantic model to characterize interest topics, but due to the wide range of interest topics, the mining accuracy is low. In addition, in terms of position tendency analysis of interest topics, the existing technology mainly judges based on explicit position tendency feature words in the text. In the scenario of judging implicit position tendency feature words, the prediction effect is not ideal. Summary of the invention
[0003] Based on this, it is necessary to provide a group member identification method, apparatus, computer device and storage medium that can improve identification accuracy in response to the above technical problems.
[0004] The present invention provides a method for identifying group members, comprising:
[0005] Acquire individual data and group data from a social media platform; wherein the individual data includes first textual speeches corresponding to individual users, and the group data includes second textual speeches corresponding to group members;
[0006] Constructing an interest topic text set and an interest topic keyword set according to the first text speech and the second text speech;
[0007] Based on the first interest topic text set, the second interest topic text set and the interest topic keyword set, respectively, construct an individual interest feature representation vector and a group interest feature representation vector; wherein the first interest topic text set is obtained by filtering out the second text speech from the interest topic text set, and the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set;
[0008] A consistency judgment is performed on the individual interest feature representation vector and the group interest feature representation vector, and whether the individual user belongs to a group is determined according to the output discrimination label.
[0009] The step of constructing an interest topic text set and an interest topic keyword set according to the first text speech and the second text speech includes:
[0010] Encoding the first text speech and the second text speech based on a semantic representation model of a neural network, and performing text segmentation on the first text speech and the second text speech using a word segmentation tool to obtain text representation vectors and word segmentation sets corresponding to the text speech;
[0011] Clustering the text representation vectors to obtain at least one interest topic, respectively summarizing the text speech corresponding to the text representation vector in each interest topic to obtain a text speech set corresponding to the interest topic, and combining the text speech set to obtain an interest topic text set;
[0012] According to the importance scores of the words in the word set corresponding to each of the interest topics, a keyword set corresponding to the interest topic is screened and obtained, and the keyword set is combined to obtain an interest topic keyword set.
[0013] The method of screening a keyword set corresponding to the interest topic according to the importance score of the word in the word set corresponding to each interest topic, and combining the keyword set to obtain the interest topic keyword set includes:
[0014] Counting the word segments of the text speech corresponding to each of the interest topics respectively;
[0015] Based on the number of times a participle appears in the participle set corresponding to the interest topic, the number of participle sets corresponding to the interest topic, the number of interest topics in which the participle is located, and the average number of participles in all participle sets corresponding to the interest topics, the importance score of each participle in each participle set corresponding to the interest topic is calculated in turn;
[0016] According to the importance score, n word segments are selected as the keyword set corresponding to the interest topic; n is a positive integer, n≥1;
[0017] The keyword sets corresponding to all interest topics are combined to obtain an interest topic keyword set.
[0018] The individual data also includes relevant information corresponding to the first text speech, and the relevant information includes any one or more of the publishing time, the number of likes, the number of reposts, the number of comments, and the number of citations; the individual interest feature representation vector constructed based on the first interest topic text set and the interest topic keyword set includes:
[0019] According to the first text speech in the first interest topic text set and the keyword set of the interest topic corresponding to the first text speech in the interest topic keyword set, respectively detecting the interest stance label of the first text speech in the first interest topic text set;
[0020] Encoding the interest stance labels of the first text speech respectively, and constructing a first text interest stance feature vector of the first text speech in the first interest topic text set;
[0021] For each interest topic in the first interest topic text set, respectively aggregate the first text interest stance feature vector corresponding to the first text speech to obtain the first interest topic stance feature representation vector corresponding to each interest topic in the first interest topic text set; wherein the aggregation method includes weighted sum, and the weight of the weighted sum is determined based on the relevant information of the first text speech;
[0022] The first interest topic stance feature representation vectors corresponding to the respective interest topics in the first interest topic text set are concatenated to obtain an individual interest feature representation vector.
[0023] The detecting of the interest stance label of the first text speech in the first interest topic text set according to the first text speech in the first interest topic text set and the keyword set of the interest topic corresponding to the first text speech in the interest topic keyword set includes:
[0024] Constructing a prompt question sentence according to the first text speech and a keyword set of the interest topic corresponding to the first text speech;
[0025] Input the prompt question into a large language model LLM, and the large language model LLM outputs a description segment related to each keyword in the keyword set in the first text speech;
[0026] The first text speech, the keyword set of the interest topic corresponding to the first text speech and the description fragment are input into the large language model LLM, and the large language model LLM outputs the interest stance label of the first text speech.
[0027] The group data also includes relevant information corresponding to the second text speech, and the relevant information includes any one or more of the personal influence, publication time, number of likes, number of reposts, number of comments, and number of citations of the group members corresponding to the second text speech; the group interest feature representation vector constructed based on the second interest topic text set and the interest topic keyword set includes:
[0028] According to the second text speech in the second interest topic text set and the keyword set of the interest topic corresponding to the second text speech in the interest topic keyword set, respectively detecting the interest stance label of the second text speech in the second interest topic text set;
[0029] Encoding the interest stance labels of the second text speech respectively, and constructing a second text interest stance feature vector of the second text speech in the second interest topic text set;
[0030] For each interest topic in the second interest topic text set, respectively aggregate the second text interest stance feature vectors corresponding to the second text speech to obtain the second interest topic stance feature representation vector corresponding to each interest topic in the second interest topic text set; wherein the aggregation method includes weighted sum, and the weight of the weighted sum is determined based on the relevant information of the second text speech;
[0031] The second interest topic stance feature representation vectors corresponding to each interest topic in the second interest topic text set are concatenated to obtain a group interest feature representation vector.
[0032] The step of performing consistency judgment on the individual interest feature representation vector and the group interest feature representation vector, and determining whether the individual user belongs to a group according to the output discrimination label, includes:
[0033] Multiply the predefined individual weight matrix and the individual interest feature representation vector to obtain the individual vector;
[0034] The predefined group weight matrix is multiplied by the group interest feature representation vector to obtain the group vector;
[0035] splicing the individual vector and the group vector to obtain a fusion vector;
[0036] Input the fusion vector into a trained fully connected binary classification network, and the fully connected binary classification network outputs a discriminant label based on the fusion vector;
[0037] It is determined whether the individual user belongs to a group according to the discriminant label.
[0038] The present invention also provides a group member identification device, comprising:
[0039] A data collection module, used to obtain individual data and group data from the social media platform; wherein the individual data includes textual speeches of individual users, and the group data includes textual speeches of group members;
[0040] An interest topic construction module, used to construct an interest topic text set and an interest topic keyword set according to the text speech;
[0041] An interest feature representation module, used to construct an individual interest feature representation vector and a group interest feature representation vector based on a first interest topic text set, a second interest topic text set and the interest topic keyword set respectively; wherein the first interest topic text set is obtained by filtering out the second text speech from the interest topic text set, and the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set;
[0042] The group identification module is used to make consistency judgment on the individual interest feature representation vector and the group interest feature representation vector, and determine whether the individual user belongs to a group according to the output discrimination label.
[0043] The present invention also provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and wherein the processor is configured to implement any one of the group member identification methods described above when executing the computer program.
[0044] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any one of the group member identification methods described above.
[0045] The above-mentioned group member identification method, device, computer equipment and storage medium, after obtaining the first text speech and the second text speech corresponding to the individual user and the group member, constructs an interest topic text set and an interest topic keyword set based on the first text speech and the second text speech, and then respectively constructs an individual interest feature representation vector corresponding to the individual user and a group interest feature representation vector corresponding to the group member, and determines whether the individual member belongs to the group based on whether the individual interest feature representation vector and the group interest feature representation vector are consistent. It can be seen that this method starts from the user's social interests, first mines the user's interests based on the user's text speech, forms corresponding interest topics, and then identifies group members based on interest topics, thereby improving the accuracy of group member identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A diagram of an application environment of a group member identification method in one embodiment.
[0047] Figure 2 The figure is a flowchart of a method for identifying group members in one embodiment.
[0048] Figure 3 The figure is a schematic diagram of the principle of a method for identifying group members in one embodiment.
[0049] Figure 4 It is a structural block diagram of a group member identification device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] The group member identification method provided in this application can be applied to Figure 1 In the application environment shown, the application environment involves a terminal 102 and a server 104 .
[0052] The terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0053] When the terminal 102 receives the group member identification instruction, the terminal 102 can implement the above group member identification method alone. The terminal 102 can also send the group member identification instruction to the communicating server 104, and the server 104 implements the above group member identification method.
[0054] The group member identification method provided in the embodiment of the present application is described below by taking a server as an example.
[0055] refer to Figure 2 , shows a schematic flow chart of a group member identification method provided in an embodiment of the present application, including steps S201-S206:
[0056] Step S201: Acquire individual data and group data from a social media platform; wherein the individual data includes first textual speeches corresponding to individual users, and the group data includes second textual speeches corresponding to group members.
[0057] It is understandable that the server obtains individual data and group data from the social media platform through manual or crawler systems. Individual data includes the speech information publicly published by individual users on the Internet, where individual users refer to single user accounts in social media platforms, and the speech information of individual data includes first text speech, publishing time, number of likes, number of reposts, number of comments, number of citations, etc.; group data includes the speech information publicly published on the Internet by each member of the group, group member list, individual members, group introduction and other group attribute data, where a group refers to an information aggregate composed of several individual users and having group attributes, and the speech information of group data includes second text speech, publishing time, number of likes, number of reposts, number of comments, number of citations, etc.
[0058] In short, reference Figure 3 The group member identification method provided in the embodiment of the present application is mainly used for individual and group analysis in social media platform scenarios. It receives individual characteristics and group characteristics, and characteristic information such as text speech and network structure of social media platforms; then, it identifies group members based on interest cognition to derive the membership relationship between individuals and groups. In addition, based on actual business needs, individual analysis and group analysis can be further performed based on member relationship information.
[0059] Step S202: construct an interest topic text set and an interest topic keyword set according to the first text speech and the second text speech.
[0060] It can be understood that this step mainly describes the process of modeling interest topics of individual users and groups. The input includes the first text speech published by the individual user and the second text speech published by each member of the group. The output includes the interest topic text set s_text and the interest topic keyword set s_focus.
[0061] In an embodiment of the present application, a shallow semantic model or a deep semantic text representation model and clustering technology can be used to represent the interest topics of individual users and groups, thereby obtaining an individual interest topic text set s_text and an individual interest topic keyword set s_focus. Among them, s_text contains Nt topic subsets, and the i-th topic subset represents the text speech set corresponding to the i-th interest topic. s_focus also contains Nt keyword subsets, and the i-th keyword subset represents the keyword set corresponding to the i-th interest topic, i={1,2,…Nt}. It should be noted that due to the extensiveness of interest topics, if the interest topics are represented by a shallow semantic model, the mining accuracy of the interest topics will be low. Therefore, in an embodiment of the present application, in order to improve the mining accuracy of interest topics, a deep semantic text representation model is preferably used.
[0062] In one embodiment, S202 may include: encoding and segmenting text speech based on a language representation model of a neural network to obtain a text representation vector and a segmentation set; clustering the text representation vector to obtain an interest topic; respectively summarizing the text speech corresponding to the text representation vector in each interest topic to obtain a text speech set corresponding to the interest topic, and combining all text speech sets to obtain an interest topic text set; respectively screening a keyword set from the segmentation set corresponding to each interest topic, and combining the keyword sets corresponding to all interest topics to obtain an interest topic keyword set.
[0063] Specifically, first, the server uses a language representation model based on a neural network (language representation model) to encode the text speech corresponding to individual users and groups, so as to obtain a deep semantic representation vector of the text speech. Among them, for each text speech, it is necessary to encode it based on the language representation model of the neural network until the deep semantic representation vector of all text speeches is obtained. The semantic representation model based on the neural network can adopt any existing neural network that can realize text encoding, such as the long short-term memory network LSTM, the text convolutional neural network TextCNN, TextRCNN, etc., and the embodiments of the present application do not impose any restrictions on this.
[0064] Secondly, the server uses a word segmentation tool to perform text segmentation on the text speech to obtain a word segmentation set corresponding to the text speech. In some embodiments, in order to improve the effect of feature words, after text segmentation, the server can further screen the word segmentation set, such as removing stop words that have no practical meaning, and only retaining word segmentations with specific parts of speech. Among them, the word segmentation tool can adopt any existing tool that can realize text segmentation, such as jieba word segmentation, and the embodiments of the present application do not impose any restrictions on this. In the word segmentation process, a named entity recognition model can be used in combination, that is, after a specific type of interest entity word is identified through a named entity recognition model, word segmentation is performed according to the recognition result. This can prevent relatively long keywords from being split, thereby improving the accuracy of word segmentation. Among them, the named entity recognition model can adopt any existing model that can realize named entity recognition, such as HMM, (Maximum Entropy), CRF, etc., which are not limited in any way in the embodiments of the present application.
[0065] Then, the server uses a clustering algorithm to cluster the obtained text representation vectors, thereby obtaining several semantically similar clusters. Different clusters represent different interest topics, and the same interest topic (cluster) includes at least one semantically similar text representation vector. The server then summarizes the text speeches contained in each interest topic based on the correspondence between text speeches and text representation vectors, thereby obtaining the interest topic text set s_text. In other words, if the server obtains Nt interest topics through clustering, then after summarization, there will be Nt topic subsets in s_text, and each topic subset is a text speech set, that is, the i-th topic subset includes all text speeches corresponding to the i-th interest topic.
[0066] Finally, the server obtains the keyword set corresponding to each interest topic based on the word segmentation set corresponding to the text speech, and obtains the interest topic keyword set s_focus. The specific process of obtaining s_focus is: First, the server counts the word segmentation set corresponding to each interest topic. Then, the server calculates the importance score of each word segmentation set corresponding to each interest topic in turn, retains the top n word segments, and the server uses the retained n word segments as the keyword set corresponding to the corresponding interest topic. After obtaining the keyword sets corresponding to all interest topics, the interest topic keyword set s_focus can be obtained by combining them. Among them, n≥1, n is a positive integer, and is a predefined value, which can be set according to actual business needs or experience values. The embodiment of the present application does not impose any restrictions on this. It should be noted that in addition to the top n, the selection of keyword sets in interest topics can also be combined with statistics and neural networks in addition to the top n method.
[0067] In some embodiments, the importance score of a word segment can be calculated using the following expression:
[0068]
[0069] in, Score the importance of word w to interest topic c, is the number of times word w appears in the word set of interest topic c / the number of word sets of interest topic c, is the number of interest topics containing the segmentation w (the number of interest topics where the segmentation is located), The average number of segmentations for all the segmentation sets corresponding to the topics of interest.
[0070] Step S203: constructing an individual interest feature representation vector and a group interest feature representation vector based on the first interest topic text set, the second interest topic text set and the interest topic keyword set, respectively. The first interest topic text set is obtained by filtering out the second text speech from the interest topic text set, and the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set.
[0071] It is understandable that the collected text speech is labeled in advance to characterize whether the text speech is the text speech of an individual user or the text speech of each individual member in the group; then, after completing the construction of the interest topic, the text speech of each individual member in the group can be correspondingly screened out (i.e., screened and deleted) from s_text by the label, so as to obtain the first interest topic text set s1_text including only the text speech of the individual user. Similarly, the text speech of the individual user is correspondingly screened out from s_text by the label, so as to obtain the second interest topic text set s2_text including only the text speech of each individual member in the group. In other words, the first interest topic text set s1_text only includes the first text speech, and the second interest topic text set s2_text only includes the second text speech. Among them, the reasons for obtaining the first and second text speeches from the interest topic text set by screening are as follows: first, the subsequent construction of interest features requires knowing the total number and type of interests contained in individual users and groups; second, the interests of individual users and groups may have intersections, and summary analysis can improve the accuracy of interest topic identification. Therefore, the embodiment of the present application first aggregates and obtains all interest topics included in individual users and groups, and then sequentially obtains interest topic sets of individual users and groups by filtering.
[0072] Step S2031, constructing an individual interest feature representation vector based on a first interest topic text set and an interest topic keyword set; the first interest topic text set is obtained by screening out the second text speech from the interest topic text set.
[0073] It can be understood that this step is the process of characterizing the interest characteristics of an individual. The input is the first interest topic text set s1_text and the interest topic keyword set s_focus corresponding to the individual user, and the output is the constructed individual interest feature representation vector Vs_focus. Among them, the dimension of the individual interest feature representation vector Vs_focus is Nt×Nl, Nt represents the number of interest topics (i.e., clusters obtained by clustering), and Nl represents the number of interest topic stance label types. In the embodiment of the present application, examples of interest topic stance label type definitions include negative, neutral, and positive. Of course, more or fewer types can be defined according to actual needs, and the embodiment of the present application does not impose any restrictions on this.
[0074] Specifically, the server sequentially constructs the first text interest stance feature vector of the first text speech corresponding to each interest topic in s1_text. Taking any first text speech in any interest topic in s1_text as an example, the server performs interest topic stance detection on the first text speech, thereby predicting the interest stance label corresponding to the first text speech, and then encodes the interest stance label corresponding to the first text speech through one-hot and other encoding methods to obtain the first text interest stance feature vector of the first text speech. Among them, the interest topic stance detection can use a trained stance tendency detection model that can be used for stance label prediction to detect the interest stance label. The input of the stance tendency detection model is obtained from s_focus, including the first text speech in each interest topic in s1_text, and the keyword set of the interest topic corresponding to the input first text speech.
[0075] The dimension of the first text interest stance feature vector is the number Nl of defined interest topic stance label types. If the predicted interest stance label of the first text speech is the i-th stance, then the i-th dimension value of the corresponding first text interest stance feature vector is 0, and the remaining dimension values are 1. Exemplarily, taking the predefined three types of negative, neutral, and positive corresponding to a1, a2, and a3 as an example, the first text interest stance feature vector can be represented as {a1, a2, a3}. Furthermore, if the interest stance label corresponding to the first text speech is negative, then the first text interest stance feature vector corresponding to the first text speech is {1, 0, 0}, if the interest stance label corresponding to the first text speech is positive, then the first text interest stance feature vector corresponding to the first text speech is {0, 0, 1}, if the interest stance label is neutral, then the first text interest stance feature vector is {0, 1, 0}. Then, the server aggregates the first text interest stance feature vectors corresponding to each interest topic in s1_text in turn, thereby obtaining the corresponding first interest topic stance feature representation vector. In the embodiment of the present application, the dimension of the first interest topic standpoint feature representation vector is still NI. It should be noted that, because s1_text is a set obtained by filtering out the second text speech from s_text, if there are interest topics with corresponding text speeches in s_text that are all interest topics of the second text speech, then after filtering, there will be interest topics with 0 text speeches in s1_text. Therefore, for interest topics with 0 text speeches in s1_text, the dimension values of each dimension in the first interest topic standpoint feature representation vector corresponding to this interest topic are all 0.
[0076] In some embodiments, the aggregation can be a weighted sum of all first text interest stance feature vectors. The weight of each first text speech can be determined according to the objective attributes of the text speech, including the publication time, number of likes, number of reposts, number of comments, number of citations, etc. corresponding to the text speech. For example, the earlier the publication time of the text speech, the smaller the corresponding weight, and the more likes the text speech has, the larger the corresponding weight can be. Exemplarily, taking the three first text interest stance feature vectors {1,0,0}, {0,0,1} and {0,1,0} as examples, assuming that the weights corresponding to these three first text speeches are b1, b2 and b3 respectively, then the first interest topic stance feature representation vector obtained by weighted sum is:
[0077] {(1×b1+0×b2+0×b3),(0×b1+0×b2+1×b3),(0×b1+1×b2+0×b3)}.
[0078] Finally, the server fuses all the first text interest stance feature vectors through vector fusion methods such as splicing, thereby obtaining an individual interest feature representation vector Vs_focus with a dimension of Nt×Nl.
[0079] In a specific embodiment, the above-mentioned interest topic stance detection can be a stance tendency detection model based on prompt chaining and large language model (LLM). The stance tendency detection model can further stimulate the common sense understanding ability of LLM through chain prompts, mine the rich world knowledge contained in LLM, and then enhance the model's mining ability for hidden stance tendency information and improve the stance tendency detection effect. The main detection process includes: the first step, the server fills the first text speech and the keyword set corresponding to the interest topic corresponding to the first text speech as input information into the prompt question, inputs the prompt question to ask LLM, so as to obtain the description fragments related to each keyword in the keyword set in the first text speech output by LLM; the second step, the first text speech, the corresponding keyword set, and the description fragment obtained in the first step are used as input information, and then the LLM is asked, so as to obtain the stance tendency label expressed by the description fragment output by LLM, so as to obtain the interest stance label of the first text speech. In addition to the above, the stance tendency detection model can also select a specific model structure according to actual needs, and the embodiment of the present application does not make any limitation to this.
[0080] Step S2032: constructing a group interest feature representation vector based on a second interest topic text set and an interest topic keyword set; the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set.
[0081] It can be understood that this step is a process of characterizing the interest characteristics of the group. The input is the second interest theme text set s2_text and the interest theme keyword set s_focus corresponding to the group, and the output is the constructed group interest feature representation vector Vg_focus. Similarly, the dimension of the group interest feature representation vector Vg_focus is also Nt×Nl.
[0082] The construction process of group interest feature representation is as follows: First, the server sequentially constructs the second text interest stance feature vector corresponding to each interest topic in s2_text. That is, the server also performs interest topic stance detection on the second text speech, thereby predicting the interest stance label corresponding to the second text speech. The server then encodes the interest stance label corresponding to the second text speech through one-hot and other encoding methods to obtain the second text interest stance feature vector of the second text speech. Among them, the specific principles and processes of interest topic stance detection can refer to the above-mentioned S2031 records, which will not be repeated. Similarly, the dimension of the second text interest stance feature vector obtained in the embodiment of the present application is also Nl, that is, if the predicted interest stance label of the second text speech is the i-th stance, then the i-th dimension value of the corresponding second text interest stance feature vector is 0, and the remaining dimension values are 1. Then, the server sequentially aggregates the second text interest stance feature vectors corresponding to each interest topic in s2_text, thereby obtaining the corresponding second interest topic stance feature representation vector, and the vector dimension is still N1. It should be noted that if there are interest topics with 0 textual speeches in s2_text, then the dimension values of each dimension in the second interest topic stance feature representation vector corresponding to this interest topic are also 0. Among them, aggregation can also be a weighted sum of all second text interest stance feature vectors. The difference is that the weight of the second text speech can be determined not only by referring to the objective attributes of the text speech, but also based on the influence of the individual member corresponding to the second text speech. For example, the greater the influence of the individual member corresponding to the second text speech, the greater the weight of the second text speech. The influence of an individual member can be evaluated and determined based on factors such as the number of textual speeches published by the individual member. Finally, the server fuses all the second text interest stance feature vectors through vector fusion methods such as splicing to obtain the group interest feature representation vector Vg_focus.
[0083] Step S204: performing consistency judgment on the individual interest feature representation vector and the group interest feature representation vector, and determining whether the individual user belongs to the group according to the output discrimination label.
[0084] It can be understood that this step is a process of determining whether the text speech interest features of an individual user are consistent with the text speech interest features of a group. The input is the individual interest feature representation vector Vs_focus and the group interest feature representation vector Vg_focus, and the output is a discriminant label. In an embodiment of the present application, the discriminant label includes a consistent label and an inconsistent label. In other words, if the output discriminant label is a consistent label, the server can determine that the input individual user belongs to the input group. If the output discriminant label is an inconsistent label, the server can determine that the input individual user does not belong to the input group.
[0085] In the embodiment of the present application, the consistency judgment can be specifically to use a trained discriminant network to predict the discriminant label based on Vs_focus and Vg_focus. The discriminant network can be a trained fully connected binary classification network, that is, the discriminant label is determined by binary classification through a fully connected neural network, or any existing network structure can be used based on actual needs, and the embodiment of the present application does not impose any limitation on this.
[0086] Specifically, the server multiplies the predefined individual weight matrix Wsc1 with the individual interest feature representation vector Vs_focus to obtain the individual vector Vsc1. At the same time, the server multiplies the predefined group weight matrix Wgc1 with the group interest feature representation vector Vg_focus to obtain the group vector Vgc1. Then, the server concatenates and fuses the individual vector Vsc1 and the group vector Vgc1 to obtain the fused vector Vsgc1. Finally, the server inputs the fused vector Vsgc1 into the trained fully connected binary classification network to obtain the discriminant label. According to the discriminant label, it is determined whether the individual user corresponding to the input individual vector Vsc1 belongs to the group corresponding to the input group vector Vgc1. For example, when the discriminant label representation is consistent, it is determined that the individual user belongs to the group. When the discriminant label representation is inconsistent, it is determined that the individual user does not belong to the group. Among them, the discriminant label can be represented by any character, and the embodiment of the present application does not impose any limitation on this. For example, 1 represents consistency and 0 represents inconsistency, or 1 represents inconsistency and 0 represents consistency.
[0087] The above group user identification method starts from the user's social interests, first mines the user's interests through the user's text speech, forms corresponding interest topics, and then identifies group members based on interest topics, thereby improving the accuracy of group member identification. This method also mines the interest topics of groups and individuals by using deep semantic text representation models and clustering technology, thereby improving the accuracy of interest topics and ensuring the accuracy of identification. In addition, the position detection of interest topics through chain prompt technology and large language model LLM can further improve the detection effect of the position tendency of groups and individuals on interest topics and ensure the accuracy of identification.
[0088] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0089] In one embodiment, Figure 4 As shown, a group member identification device is provided, comprising:
[0090] Data collection module 401, used to obtain individual data and group data, individual data includes text speech of individual users, group data includes text speech of group members;
[0091] The interest topic construction module 402 is used to construct an interest topic text set and an interest topic keyword set according to the text speech;
[0092] The interest feature representation module 403 is used to construct an individual interest feature representation vector and a group interest feature representation vector based on the first interest topic text set, the second interest topic text set and the interest topic keyword set respectively; wherein the first interest topic text set is obtained by filtering out the second text speech from the interest topic text set, and the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set;
[0093] The group identification module 404 is used to make consistency judgment between the individual interest feature representation vector and the group interest feature representation vector, and determine whether the individual user belongs to a group according to the output discrimination label.
[0094] In one embodiment, the interest topic construction module 402 is also used to encode the first text speech and the second text speech based on the semantic representation model of the neural network, and to perform text segmentation on the first text speech and the second text speech using a word segmentation tool to obtain a text representation vector and a word segmentation set corresponding to the text speech; cluster the text representation vectors to obtain at least one interest topic, summarize the text speech corresponding to the text representation vector in each interest topic respectively, obtain a text speech set corresponding to the interest topic, and combine the text speech set to obtain an interest topic text set; according to the importance score of the word segmentation in the word segmentation set corresponding to each interest topic, filter out a keyword set corresponding to the interest topic, and combine the keyword set to obtain an interest topic keyword set.
[0095] In one embodiment, the interest topic construction module 402 is also used to count the word segments of the text speech corresponding to each interest topic respectively; based on the number of times the word segment appears in the word segment set corresponding to the interest topic, the number of word segment sets corresponding to the interest topic, the number of interest topics where the word segment is located, and the average number of word segments in all word segment sets corresponding to the interest topics, the importance score of each word segment in the word segment set corresponding to each interest topic is calculated in turn; n word segments are selected as the keyword set corresponding to the interest topic according to the importance score; n is a positive integer, n≥1; and the keyword sets corresponding to all interest topics are combined to obtain the interest topic keyword set.
[0096] In one embodiment, the interest feature characterization module 403 is also used to detect the interest stance label of the first text speech in the first interest topic text set according to the first text speech in the first interest topic text set and the keyword set of the interest topic corresponding to the first text speech in the interest topic keyword set; encode the interest stance label of the first text speech respectively to construct a first text interest stance feature vector of the first text speech in the first interest topic text set; for each interest topic in the first interest topic text set, aggregate the first text interest stance feature vector corresponding to the first text speech respectively to obtain the first interest topic stance feature representation vector corresponding to each interest topic in the first interest topic text set; wherein the aggregation method includes weighted sum, and the weight of the weighted sum is determined based on the relevant information of the first text speech; the first interest topic stance feature representation vectors corresponding to each interest topic in the first interest topic text set are spliced to obtain an individual interest feature representation vector.
[0097] In one embodiment, the interest feature representation module 403 is also used to construct a prompt question based on the first text speech and the keyword set of the interest topic corresponding to the first text speech; the prompt question is input into the large language model LLM, and the large language model LLM outputs the description fragments related to each keyword in the keyword set in the first text speech; the first text speech, the keyword set of the interest topic corresponding to the first text speech and the description fragment are input into the large language model LLM, and the large language model LLM outputs the interest stance label of the first text speech.
[0098] In one embodiment, the interest feature characterization module 403 is also used to detect the interest stance labels of the second text speech in the second interest topic text set respectively according to the second text speech in the second interest topic text set and the keyword set of the interest topic corresponding to the second text speech in the interest topic keyword set; encode the interest stance labels of the second text speech respectively to construct a second text interest stance feature vector of the second text speech in the second interest topic text set; for each interest topic in the second interest topic text set, aggregate the second text interest stance feature vector corresponding to the second text speech respectively to obtain the second interest topic stance feature representation vector corresponding to each interest topic in the second interest topic text set; wherein the aggregation method includes weighted sum, and the weight of the weighted sum is determined based on the relevant information of the second text speech; the second interest topic stance feature representation vectors corresponding to each interest topic in the second interest topic text set are spliced to obtain a group interest feature representation vector.
[0099] In one embodiment, the group identification module 404 is also used to multiply a predefined individual weight matrix with an individual interest feature representation vector to obtain an individual vector; multiply a predefined group weight matrix with a group interest feature representation vector to obtain a group vector; concatenate the individual vector and the group vector to obtain a fusion vector; input the fusion vector into a trained fully connected binary classification network, and the fully connected binary classification network outputs a discriminant label based on the fusion vector; and determine whether the individual user belongs to a group based on the discriminant label.
[0100] For the specific definition of the group member identification device, please refer to the definition of the group member identification method above, which will not be repeated here. Each module in the above-mentioned group member identification device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned group member identification method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form.
[0101] In one embodiment, a computer device is provided, which may be a server, including a processor, a memory and a network interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying group members is implemented. Exemplarily, the computer program can be divided into one or more modules, one or more modules are stored in the memory, and are executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0102] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of a computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0103] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0104] Those skilled in the art will appreciate that the computer device structure shown in this embodiment is merely a partial structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the present invention is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.
[0105] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the group member identification method described in any of the above embodiments when executing the computer program.
[0106] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for identifying group members described in any of the above embodiments is implemented.
[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0108] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for identifying group members, characterized in that: include: Acquire individual data and group data from a social media platform; wherein the individual data includes first textual speeches corresponding to individual users, and the group data includes second textual speeches corresponding to group members; Constructing an interest topic text set and an interest topic keyword set according to the first text speech and the second text speech; Based on the first interest topic text set, the second interest topic text set and the interest topic keyword set, respectively, construct an individual interest feature representation vector and a group interest feature representation vector; wherein the first interest topic text set is obtained by filtering out the second text speech from the interest topic text set, and the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set; A consistency judgment is performed on the individual interest feature representation vector and the group interest feature representation vector, and whether the individual user belongs to a group is determined according to the output discrimination label.
2. The method according to claim 1, characterized in that The step of constructing an interest topic text set and an interest topic keyword set according to the first text speech and the second text speech includes: Encoding the first text speech and the second text speech based on a semantic representation model of a neural network, and performing text segmentation on the first text speech and the second text speech using a word segmentation tool to obtain text representation vectors and word segmentation sets corresponding to the text speech; Clustering the text representation vectors to obtain at least one interest topic, respectively summarizing the text speech corresponding to the text representation vector in each interest topic to obtain a text speech set corresponding to the interest topic, and combining the text speech set to obtain an interest topic text set; According to the importance scores of the words in the word set corresponding to each of the interest topics, a keyword set corresponding to the interest topic is screened and obtained, and the keyword set is combined to obtain an interest topic keyword set.
3. The method according to claim 2, characterized in that The step of screening a keyword set corresponding to each interest topic according to the importance score of the word in the word set corresponding to each interest topic, and combining the keyword set to obtain an interest topic keyword set includes: Counting the word segments of the text speech corresponding to each of the interest topics respectively; Based on the number of times a participle appears in the participle set corresponding to the interest topic, the number of participle sets corresponding to the interest topic, the number of interest topics in which the participle is located, and the average number of participles in all participle sets corresponding to the interest topics, the importance score of each participle in each participle set corresponding to the interest topic is calculated in turn; According to the importance score, n word segments are selected as the keyword set corresponding to the interest topic; n is a positive integer, n≥1; The keyword sets corresponding to all interest topics are combined to obtain an interest topic keyword set.
4. The method according to claim 1, characterized in that: The individual data also includes relevant information corresponding to the first text speech, and the relevant information includes any one or more of the publishing time, the number of likes, the number of reposts, the number of comments, and the number of citations; the individual interest feature representation vector constructed based on the first interest topic text set and the interest topic keyword set includes: According to the first text speech in the first interest topic text set and the keyword set of the interest topic corresponding to the first text speech in the interest topic keyword set, respectively detecting the interest stance label of the first text speech in the first interest topic text set; Encoding the interest stance labels of the first text speech respectively, and constructing a first text interest stance feature vector of the first text speech in the first interest topic text set; For each interest topic in the first interest topic text set, respectively aggregate the first text interest stance feature vector corresponding to the first text speech to obtain the first interest topic stance feature representation vector corresponding to each interest topic in the first interest topic text set; wherein the aggregation method includes weighted sum, and the weight of the weighted sum is determined based on the relevant information of the first text speech; The first interest topic stance feature representation vectors corresponding to the respective interest topics in the first interest topic text set are concatenated to obtain an individual interest feature representation vector.
5. The method according to claim 4, characterized in that The detecting, according to the first text speech in the first interest topic text set and the keyword set of the interest topic corresponding to the first text speech in the interest topic keyword set, the interest stance label of the first text speech in the first interest topic text set comprises: Constructing a prompt question sentence according to the first text speech and a keyword set of the interest topic corresponding to the first text speech; Input the prompt question into a large language model LLM, and the large language model LLM outputs a description segment related to each keyword in the keyword set in the first text speech; The first text speech, the keyword set of the interest topic corresponding to the first text speech and the description fragment are input into the large language model LLM, and the large language model LLM outputs the interest stance label of the first text speech.
6. The method according to claim 4, characterized in that The group data also includes relevant information corresponding to the second text speech, and the relevant information includes any one or more of the personal influence, publication time, number of likes, number of reposts, number of comments, and number of citations of the group members corresponding to the second text speech; the group interest feature representation vector constructed based on the second interest topic text set and the interest topic keyword set includes: According to the second text speech in the second interest topic text set and the keyword set of the interest topic corresponding to the second text speech in the interest topic keyword set, respectively detecting the interest stance label of the second text speech in the second interest topic text set; Encoding the interest stance labels of the second text speech respectively, and constructing a second text interest stance feature vector of the second text speech in the second interest topic text set; For each interest topic in the second interest topic text set, respectively aggregate the second text interest stance feature vectors corresponding to the second text speech to obtain the second interest topic stance feature representation vector corresponding to each interest topic in the second interest topic text set; wherein the aggregation method includes weighted sum, and the weight of the weighted sum is determined based on the relevant information of the second text speech; The second interest topic stance feature representation vectors corresponding to each interest topic in the second interest topic text set are concatenated to obtain a group interest feature representation vector.
7. The method according to claim 4, characterized in that The performing consistency judgment on the individual interest feature representation vector and the group interest feature representation vector, and determining whether the individual user belongs to a group according to the output discrimination label, includes: Multiply the predefined individual weight matrix and the individual interest feature representation vector to obtain the individual vector; The predefined group weight matrix is multiplied by the group interest feature representation vector to obtain the group vector; splicing the individual vector and the group vector to obtain a fusion vector; Input the fusion vector into a trained fully connected binary classification network, and the fully connected binary classification network outputs a discriminant label based on the fusion vector; It is determined whether the individual user belongs to a group according to the discriminant label.
8. A group member identification device, characterized in that: include: A data collection module, used to obtain individual data and group data from the social media platform; wherein the individual data includes textual speeches of individual users, and the group data includes textual speeches of group members; An interest topic construction module, used to construct an interest topic text set and an interest topic keyword set according to the text speech; An interest feature representation module, used to construct an individual interest feature representation vector and a group interest feature representation vector based on a first interest topic text set, a second interest topic text set and the interest topic keyword set respectively; wherein the first interest topic text set is obtained by filtering out the second text speech from the interest topic text set, and the second interest topic text set is obtained by filtering out the first text speech from the interest topic text set; The group identification module is used to make consistency judgment on the individual interest feature representation vector and the group interest feature representation vector, and determine whether the individual user belongs to a group according to the output discrimination label.
9. A computer device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor is used to implement the group member identification method described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying group members described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Information display frequency control method based on user behavior characteristics
CN120832449A