Method and device for predicting authenticity of social media users based on large language model
Through a large language model, the behavior and geographical characteristics of social media users are deeply analyzed, and combined with the multi-model prediction results, the accuracy and efficiency of user authenticity prediction in the existing technology are solved, and high-precision, real-time and automated users are achieved. Authenticity identification is highly adaptable and reduces operating costs.
Patent Information
- Application Number
- CN202411272630.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-11
AI Technical Summary
The existing technology relies on simple rules and manual review in the prediction of authenticity of social media users, lacks in-depth semantic understanding, does not fully utilize data, is difficult to adapt to emerging fraudulent means, has limited ability to handle large-scale data, has high computing resources and costs, resulting in inefficiency Inconsistent with the results.
A large language model is used to conduct in-depth analysis of the behavior and geographical characteristics of social media users. Through data splitting, behavior feature extraction and geographical feature extraction, user feature vectors are constructed, and weighted averaged with multi-model prediction results to achieve user authenticity prediction.
It improves the accuracy and real-time analysis capabilities of user authenticity identification, reduces the need for manual review, is highly adaptable, reduces operating costs, and improves platform security and user experience.
Smart Images

Figure CN118797277B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and electronic device for predicting the authenticity of social media users based on a large language model. Background Art
[0002] Social media user authenticity prediction refers to determining whether a user's account on a social media platform is real and valid, that is, whether the account is owned and operated by a real person or entity. In the social media environment, there are various types of fake or suspicious accounts, which may be controlled by robot programs or created by individuals or groups for specific purposes. Therefore, determining whether a social media user is authentic is of great significance and can help prevent problems such as online fraud, spam, and false propaganda.
[0003] The existing technology has the following problems in predicting the authenticity of social media users:
[0004] 1. Reliance on simple rules and manual review: Current technologies mostly rely on manual review and simple rule engines to determine the authenticity of users. This method is not only inefficient, but also easily affected by human factors, leading to inconsistent results and misjudgment.
[0005] 2. Lack of deep semantic understanding: Traditional methods often fail to deeply understand the semantic complexity of the content users post on social media. For example, existing technologies have difficulty distinguishing the nuances between carefully designed fake accounts and real users, and these fake accounts may use natural language generation technology to imitate the behavior of real users.
[0006] 3. Insufficient data utilization: Although there is a large amount of data on social media platforms, existing technologies often fail to fully utilize this data for effective authenticity judgment. For example, potential information such as user interaction patterns and the timeline of content releases are often overlooked, which is extremely important for judging the authenticity of an account.
[0007] 4. Insufficient adaptability to emerging fraud methods: As fraud methods continue to evolve, traditional user verification methods often have difficulty adapting to new fraud strategies in a timely manner. For example, some advanced fraud accounts may use AI technology to generate seemingly real user interactions, and traditional methods have difficulty identifying the artificiality of these behaviors.
[0008] 5. Limited ability to process large-scale data: On social platforms with a large user base, traditional methods face performance bottlenecks when processing and analyzing large-scale data. This limitation affects the scalability and real-time processing capabilities of the technology, and reduces the application efficiency in actual operations.
[0009] 6. Computing resources and cost issues: Efficiently processing and analyzing large amounts of social media data requires a lot of computing resources. Existing technologies often face challenges in resource consumption and cost control, especially in scenarios that require real-time analysis and response.
[0010] The above problems become technical problems that need to be solved. Summary of the invention
[0011] In view of this, an embodiment of the present invention provides a method, device and electronic device for predicting the authenticity of social media users based on a large language model, which at least partially solves the problems existing in the prior art.
[0012] In a first aspect, an embodiment of the present invention provides a method for predicting the authenticity of social media users based on a large language model, comprising:
[0013] Perform user extraction on the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, …DUn};
[0014] Based on the first user set DU, the original data is split to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data;
[0015] Using a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn}, to obtain a first feature set DT={DT1, DT2, ...DTn};
[0016] Extracting user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn};
[0017] Based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn}, the authenticity of users in the first user set DU={DU1, DU2, ...DUn} is predicted.
[0018] According to a specific implementation of the embodiment of the present disclosure, the user extraction is performed on the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, ...DUn}, including:
[0019] Performing data cleaning on the original data, and finding information that uniquely identifies the user in the cleaned data;
[0020] Create an index structure to store each user's ID and related information;
[0021] Traverse all cleaned data records and add them to the user index according to the user ID;
[0022] If the same user has activities on different platforms, the user information of the same user on different platforms is merged to build a complete user view.
[0023] According to a specific implementation of the embodiment of the present disclosure, the original data is split based on the first user set DU to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data, including:
[0024] Create an empty set DF to store the split data of each user;
[0025] Traverse each user in the user set DU, and for each user DUi, extract all data related to the user from the original data;
[0026] After the data related to the user DUi is formed into a new data subset DFi, the data subset DFi is added to the split data set DF.
[0027] According to a specific implementation of the embodiment of the present disclosure, the large language model is used to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn}, including:
[0028] Extract the timestamp of each event from DFi, identify the user's active time period, and obtain the user's activity time feature KT;
[0029] Natural language processing technology is used to analyze the social media content posted by users and obtain the user's content style feature KF.
[0030] According to a specific implementation of the embodiment of the present disclosure, the use of a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn} also includes:
[0031] Determine the user's interaction characteristics KH through the frequency and type of interaction between the user and other users;
[0032] Analyze the user's position and connection pattern in the social network to obtain the user's network structure characteristics KN;
[0033] Based on the activity time feature KT, content style feature KF, interaction feature KH and network structure feature KN, construct the user behavior feature vector K=[KT, KF, KH, KN];
[0034] The user behavior feature vectors K of n users are aggregated to form a first feature set DT.
[0035] According to a specific implementation of the embodiment of the present disclosure, the user geographic feature extraction is performed on the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn}, including:
[0036] Parse all the geographical locations of the user from the data in DF;
[0037] Count the number of times a user appears in different geographic locations and generate a list of user geographic preferences;
[0038] Based on the user's geographic preference list, a second feature set DG={DG1, DG2, ...DGn} is generated.
[0039] According to a specific implementation of an embodiment of the present disclosure, the prediction of the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} includes:
[0040] set up represents the predicted feature vector of the i-th user, Depend on and composition, represents the authenticity label of the i-th user, , where 0 represents a fake user, 1 represents a real user, and M represents the model set used. Output a predicted value , and Containing d and g features respectively, the feature vector of the i-th user is expressed as:
[0041] .
[0042] According to a specific implementation of the embodiment of the present disclosure, the prediction of the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} further includes:
[0043] For each model Train on the training set to obtain the trained model :
[0044]
[0045] Tn is the training function, which combines the prediction results of all models by weighted average:
[0046]
[0047] in is the predicted value of the j-th model for the i-th user, is the weight of the jth model;
[0048] Set the threshold T0, if , then predict the user is a real user, otherwise, it is predicted to be a fake user;
[0049] Weight According to the accuracy of each model, the accuracy of the jth model is , then the weight of the j-th model is defined as:
[0050] .
[0051] In a second aspect, an embodiment of the present invention provides a social media user authenticity prediction device based on a large language model, comprising:
[0052] The collection module extracts users from the raw data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, …DUn};
[0053] A splitting module, based on the first user set DU, performs data splitting on the original data to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data;
[0054] A first extraction module uses a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn};
[0055] A second extraction module extracts user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn};
[0056] A prediction module predicts the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn}.
[0057] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0058] at least one processor; and,
[0059] a memory communicatively connected to the at least one processor; wherein,
[0060] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the social media user authenticity prediction method based on a large language model in any of the aforementioned first aspects or any of the implementations of the first aspect.
[0061] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the social media user authenticity prediction method based on a large language model in the aforementioned first aspect or any implementation of the first aspect.
[0062] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the social media user authenticity prediction method based on a large language model in the aforementioned first aspect or any implementation of the first aspect.
[0063] The social media user authenticity prediction scheme based on a large language model in an embodiment of the present invention includes: performing user extraction on raw data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2,…DUn}; based on the first user set DU, performing data splitting on the raw data to obtain a split data set DF={DF1, DF2,…DFn} containing n user data; using a large language model to perform user behavior feature extraction on the split data set DF={DF1, DF2,…DFn} to obtain a first feature set DT={DT1, DT2,…DTn}; performing user geographic feature extraction on the split data set DF={DF1, DF2,…DFn} to obtain a second feature set DG={DG1, DG2,…DGn}; based on the first feature set DT={DT1, DT2,…DTn} and the second feature set DG={DG1, DG2,…DGn}, predicting the authenticity of users in the first user set DU={DU1, DU2,…DUn}.
[0064] The solution of this application has the following beneficial effects:
[0065] High-precision prediction:
[0066] By using advanced machine learning and deep learning technologies, especially large language models, we can deeply understand user behavior and text content, thereby improving the accuracy of identifying genuine and fake users.
[0067] Real-time analysis capabilities:
[0068] Algorithms can analyze and predict user activities in real time, quickly identify and respond to false user behavior, and help stop potential fraud and abuse immediately.
[0069] Automated Processing:
[0070] Significantly reduce the need for manual review, improve efficiency and reduce operating costs through automated processing.
[0071] Wide adaptability:
[0072] The algorithm can be easily adapted to different social media platforms, processing various types of data and user behaviors, and is highly flexible and scalable.
[0073] Improve user experience:
[0074] Reduce the impact of false information and fraud, enhance platform security and user trust, and thus improve the overall user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0076] Figure 1 A schematic flow chart of a method for predicting authenticity of social media users based on a large language model provided by an embodiment of the present invention;
[0077] Figure 2 A schematic flow chart of another method for predicting authenticity of social media users based on a large language model provided by an embodiment of the present invention;
[0078] Figure 3 A schematic diagram of the structure of a social media user authenticity prediction device based on a large language model provided by an embodiment of the present invention;
[0079] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0080] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0081] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0082] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0083] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0084] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0085] The disclosed embodiment provides a social media user authenticity prediction method based on a large language model. The social media user authenticity prediction method based on a large language model provided in this embodiment can be executed by a computing device, which can be implemented as software, or as a combination of software and hardware, and the computing device can be integrated in a server, terminal device, etc.
[0086] See also Figure 1The present disclosure provides a method for predicting the authenticity of social media users based on a large language model, including:
[0087] S101, extracting users from raw data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, ...DUn}.
[0088] Data can be collected from major social media platforms. This includes posts, comments, likes, reposts, and follow lists posted by users. For example, the API interfaces provided by various social platforms can be used for data collection.
[0089] Data processing can be performed on the collected data, including but not limited to:
[0090] Deduplication: Remove duplicate data generated during the collection process to ensure the uniqueness of the data set.
[0091] Filter invalid content: Delete spam, advertising content, and other obviously invalid data, such as automatically generated posts or meaningless garbled characters.
[0092] Data validation: Check data format and integrity to ensure that all collected data fields meet the predetermined format and quality requirements.
[0093] Unify the structure: Unify data from different sources into a standard format, such as JSON or CSV files, including timestamps, user IDs, text content, interaction types, etc.
[0094] Text preprocessing: including removing useless formatting text (such as HTML tags), converting emoticons and special characters, and unifying text encoding.
[0095] Language filtering: If the predictive model is specific to a certain language, you need to filter out content in that language, for example, keeping only English text.
[0096] Authenticity labeling: Data from known real and fake accounts are clearly labeled. Real account data is used as positive samples, and fake account data is used as negative samples.
[0097] Semi-automatic labeling tools: Use simple machine learning models to assist labeling work, reduce labor costs, and improve labeling efficiency. For example, use known fraud behavior patterns to pre-label suspicious accounts.
[0098] Data synthesis: Oversampling minority class samples (e.g., fake accounts) using techniques such as SMOTE, or generating additional training samples via generative adversarial networks (GANs).
[0099] Feature expansion: Introduce external knowledge sources, such as IP address analysis and device usage information, to enhance data features and provide richer contextual information.
[0100] User information can be extracted from the processed data to form a user set, including:
[0101] Build user index: Create an index structure, such as a dictionary or database table, to store each user's ID and related information.
[0102] Traverse data: Traverse all cleaned data records and add them to the user index according to the user ID.
[0103] Merge user information: If the same user has activities on different platforms, you need to merge this information to build a complete user view.
[0104] Forming a user set: converting the user index into a first user set DU.
[0105] S102, based on the first user set DU, the original data is split to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data.
[0106] According to each user ID in the first user set DU, the original data is split into separate data sets for each user. An empty set DF can be created to store the split data of each user. Each user in the user set DU is traversed. For each user DUi, all data related to the user is extracted from the original data. The data related to user DUi is formed into a new data subset DFi, and the data subset DFi is added to the split data set DF.
[0107] S103, using a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn}.
[0108] Large language models such as GPT-4 can be used to understand and extract semantic and sentiment features from text, including:
[0109] Analyze the topic consistency of user posts. Fake users may frequently post around specific propaganda or misleading information.
[0110] Evaluate the sentiment of posts and check for unusual patterns of sentiment expression, such as extremely positive or negative sentiment expressions.
[0111] Evaluate the user’s language consistency, including grammar, spelling, and vocabulary used. Fake accounts may display different language styles over a short period of time.
[0112] Analyze the temporal distribution of user activities. For example, a robot account may be active at a high frequency in a specific time period.
[0113] Analyze the frequency and type of interaction (such as likes, comments, reposts, etc.) between users and other accounts to identify potential automated behaviors or unnatural social patterns.
[0114] Evaluate the frequency and type of interactions a user has with other accounts, including likes, comments, and retweets. Fake accounts may have unnatural interaction patterns, such as high frequency interactions with a specific group of users.
[0115] Analyze users’ locations and connection patterns in social networks. For example, fake accounts may mainly connect to other fake accounts, forming densely interacting groups.
[0116] Newly created accounts that display highly active and extensive social behavior may indicate they are fake accounts.
[0117] Check the ratio of followers to followers of an account, and the authenticity of these accounts. Fake accounts may increase the number of followers quickly, and these followers may also be fake.
[0118] Analyze the diversity and geolocation of devices logging in. Frequent location and device changes may be a sign of a fake account.
[0119] The extracted features mentioned above can be combined into a feature vector, thereby obtaining a first feature set DT={DT1, DT2, ...DTn} of n users.
[0120] S104, extracting user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn}.
[0121] Data with geolocation tags can be extracted from DFi, the latitude and longitude coordinates in the geolocation tags can be parsed, and the specific information of each geolocation tag can be recorded. The number of occurrences of each geolocation can be counted, and a geolocation distribution map can be drawn to find out the location where the user appears most frequently. The number of times a user mentions or appears in different geographic locations can be counted, sorted by the number of mentions or occurrences, and a list of user geographic preferences can be generated. Each user DUi corresponds to a geographic feature vector DGi, which contains the user's geographic feature information, and then a second feature set DG is generated.
[0122] As another way, in order to improve the accuracy of geographic location prediction, the geographic location coordinates are parsed for the split data set, including the following steps:
[0123] S1041, using a large language model to extract an explicit geographic feature set GE={GE1, GE2, ... GEy} and an implicit geographic feature set GY={GY1, GY2, ... GYm} from the text content of the split data set.
[0124] Explicit geographic features refer to specific places, cities, countries and other geographical entities directly mentioned in the text. Extracting these features can identify place name entities from the text.
[0125] Let T represent the text set in the split data set, , where t i is the i-th sentence in the text;
[0126] For each sentence , apply large models To extract place name entities :
[0127]
[0128] gather Contains all place name entities in the sentence;
[0129] Set up a mapping function S to correct spelling errors in set E and map synonymous place name entities to standard names:
[0130] E'=S(E)
[0131] Aggregate the removed duplicate entities into the final set of explicit geographic features GE:
[0132]
[0133] Unique() represents the deduplication function.
[0134] Implicit geographic features refer to geographic information that is not directly mentioned in the text but can be inferred from the context.
[0135] You can use pre-trained language models Parse the contextual meaning of text in a split data set:
[0136]
[0137] Where C represents each sentence The context representation vector of ;
[0138] Let K be the set of keywords, , l is the number of keywords, and the relevance score between keywords and context is calculated:
[0139] ,in , Calculate the function for correlation;
[0140] Select a threshold θ based on the relevance score, filter out keywords below the threshold θ, and obtain the filtered keyword set K':
[0141]
[0142] According to the filtered keyword set K', use the knowledge graph Determine the hidden geographic feature GY:
[0143] .
[0144] S1042, calculate the aggregation value Jf=J(GE) of the explicit geographic feature set GE through the aggregation function J. When the aggregation value Jf is greater than the first preset value J0, perform an aggregation operation on the explicit geographic feature set GE={GE1, GE2,…GEy} to obtain the first target set MF={MF1, MF2,…MFp}.
[0145] A clustering function J can be defined to measure the clustering degree between explicit geographic features. The clustering degree can reflect the correlation or proximity between geographic features.
[0146] For the explicit geographic feature set GE and the preset document set DG, define the aggregation function J:
[0147]
[0148] Representation characteristics and Frequency of co-occurrence in document collection DG:
[0149]
[0150] in, is an indicator function. When document d contains and Returns 1 if yes, otherwise returns 0, |DG| is the size of the document collection;
[0151] Compute the sum of the co-occurrence frequencies of all feature pairs:
[0152]
[0153] Filter out geographic feature pairs with a degree of aggregation higher than the first preset value J0 and combine them with P:
[0154]
[0155] From the selected geographic feature pair set P, generate disjoint subsets, each subset represents a set of highly correlated geographic features;
[0156] Let C be the set of generated subsets, ,in , for all ;
[0157] Each subset Add as an element to the first target set MF:
[0158] .
[0159] S1043, based on the fusion function R and the pre-constructed fusion parameters K=[UG,DM,TS,HE], the implicit geographic feature set GY={GY1,GY2,…GYm} is subjected to a fusion operation R(K,GY) to obtain a second target set MS={MS1,MS2,…MSq}, where UG represents the user's social information, DM represents location information, TS represents time information, and HE represents environmental information.
[0160] Based on the implicit geographic feature set GY and the fusion parameter K, the fusion operation R is defined:
[0161] R(K,GY)=MS
[0162] For each hidden geographic feature Perform feature extraction to obtain latent feature vector , using the preset neural network model to calculate each latent feature vector Weight :
[0163]
[0164] in, is the true label of the kth training sample in the neural network module, is the predicted label, is the regression coefficient, is the weight of the regularization term;
[0165] The feature vectors are fused by weighted summation.
[0166]
[0167] is the integrated feature vector after fusion, all the integrated feature vectors Put them into the second target set MS, and get the second target set MS={MS1,MS2,…MSq}.
[0168] S1044, performing similarity calculation on the first target set MF and the second target set MS to obtain a similarity value DX. When the similarity value is greater than a second preset value DX0, determining the geographic location LS=GP(MF, MS) of the social media user by calculating the function GP, the first target set MF and the second target set MS.
[0169] For each vector in MF and each vector in MS , calculate the similarity between them :
[0170]
[0171] nl is the dimension of the vectors in the first target set MF and the second target set MS, then the similarity value DX between the first target set MF and the second target set MS is expressed as:
[0172] .
[0173] Calculate each dominant geographic feature Weight And each hidden geographic feature Weight , then the geographical location LS of the social media user is expressed as:
[0174]
[0175] and Represents dominant geographical features and implicit geographic features The geographic location coordinates of The function is used to determine the user's final geographic location.
[0176] S105, predicting the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn}.
[0177] set up represents the predicted feature vector of the i-th user, Depend on and composition, represents the authenticity label of the i-th user, , where 0 represents a fake user, 1 represents a real user, and M represents the model set used. Output a predicted value , and Containing d and g features respectively, the feature vector of the i-th user is expressed as:
[0178] .
[0179] According to a specific implementation of the embodiment of the present disclosure, the prediction of the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} further includes:
[0180] For each model Train on the training set to obtain the trained model :
[0181]
[0182] Tn is the training function, which combines the prediction results of all models by weighted average:
[0183]
[0184] in is the predicted value of the j-th model for the i-th user, is the weight of the jth model;
[0185] Set the threshold T0, if , then predict the user is a real user, otherwise, it is predicted to be a fake user;
[0186] Weight According to the accuracy of each model, the accuracy of the jth model is , then the weight of the j-th model is defined as:
[0187] .
[0188] See also Figure 2 The embodiment of the present invention also provides another method for predicting the authenticity of a user based on training data, including:
[0189] S201 Training Data Preparation
[0190] 1. Data Annotation
[0191] Label definition: First, define clear label categories, such as "real users" and "fake users." Make sure all team members involved in data annotation have a unified understanding of these definitions.
[0192] Sample selection: Select a portion of the large amount of unlabeled data collected for manual annotation. Prioritize sample diversity, including different user types, behavior patterns, and social media platforms.
[0193] Manual labeling: Labeling is done by a professional data labeling team or through crowdsourcing. Ensure that appropriate quality control measures are taken during the labeling process, such as regular labeling audits and consistency checks between labelers.
[0194] 2. Dataset Construction
[0195] Training, validation, and test sets: Split the labeled data into training, validation, and test sets. A common allocation is 70% training, 15% validation, and 15% test. This division helps adjust parameters during model development and provides an independent performance evaluation during the final model evaluation.
[0196] Class balance: Make sure each class (real and fake users) is properly represented in all datasets. If there is class imbalance, it can be addressed by oversampling the minority class or undersampling the majority class.
[0197] 3. Feature Engineering
[0198] Feature selection: Based on the pre-feature extraction results, select the features that are most helpful for the model to predict true and false users. This may include NLP features extracted from text, user behavior features, etc.
[0199] Data transformation: Apply necessary data preprocessing steps such as normalization, standardization, or encoding specific features (e.g. one-hot encoding).
[0200] Data augmentation: If the amount of data for some categories is insufficient, consider using data augmentation techniques to increase the diversity of samples, such as generating new samples through synonym replacement, back translation, or slight modification of existing data.
[0201] 4. Data Quality Assurance
[0202] Data cleaning: Continuously monitor data quality and remove or correct any errors or outliers.
[0203] Data review: Before data training, conduct a comprehensive data review to ensure that all data meets the pre-training requirements, such as format consistency and no missing values.
[0204] 5. Iterative Update
[0205] Continuous feedback loop: As model training and application progress, new data is collected and annotated to continuously update the training and validation datasets. This helps the model adapt to the dynamic nature of social media and emerging fraud strategies.
[0206] S202 model training and optimization
[0207] 1. Model selection
[0208] Model type selection: Choose an appropriate model framework based on the nature of the problem and the desired output. For social media user authenticity prediction, you can consider using deep learning models such as convolutional neural networks (CNN) for text processing, or recurrent neural networks (RNN) to process sequence data. In addition, you can combine decision tree models such as random forests or gradient boosting machines (GBM) to process non-sequential features.
[0209] Model complexity: You need to balance the complexity of the model with the accuracy of the predictions to avoid overfitting. Use techniques such as cross-validation to test the performance of the model on unknown data.
[0210] 2. Data Preparation
[0211] Training data preparation: Based on the previous data preparation and feature engineering steps, ensure that the input data is cleaned and the features are appropriately selected and encoded.
[0212] Data splitting: Divide the data into training, validation, and test sets to ensure that the model is not exposed to the test set data during training.
[0213] 3. Model training
[0214] Hyperparameter tuning: Use methods such as GridSearch or RandomSearch to find the optimal model hyperparameters. These parameters include learning rate, number of layers, number of nodes per layer, batch size, etc.
[0215] Regularization techniques: Apply techniques such as L1, L2 regularization or Dropout to prevent the model from overfitting.
[0216] Batching and Iterations: Set a reasonable batch size and number of iterations, and use an appropriate optimization algorithm (such as Adam or SGD) to train the model.
[0217] 4. Performance evaluation and verification
[0218] Cross-validation: K-fold cross-validation was used to evaluate the robustness and generalization ability of the model.
[0219] Performance metrics: Depending on the nature of the problem, choose appropriate performance metrics such as accuracy, recall, F1 score, ROC curve, etc. to comprehensively evaluate the model performance.
[0220] Error Analysis: Perform error analysis on the model’s predictions to identify reasons for poor model performance.
[0221] 5. Model Optimization
[0222] Iteration of feature engineering: re-evaluate and optimize features based on feedback from the model, which may include adding new features, removing unimportant features, or recoding features.
[0223] Algorithm adjustment: adjust algorithm parameters or change the algorithm to improve performance, such as adjusting learning rate decay, modifying activation function, etc.
[0224] Ensemble learning: Consider using ensemble learning methods such as bagging, boosting, or stacking to combine the predictions of multiple models to improve the accuracy and stability of the predictions.
[0225] 6. Continuous Optimization
[0226] Online Learning: For social media data that is constantly changing, apply online learning strategies to regularly update the model to adapt to new data and trends.
[0227] A / B testing: Run different versions of your model in a live environment and perform A / B testing to determine which improvements are effective.
[0228] S203 User authenticity prediction
[0229] 1. Preprocessing of input data
[0230] Data collection: Collect relevant data of the user to be predicted, including but not limited to his / her posts, comments, likes, forwarding records, and interaction data with other users.
[0231] Cleaning and formatting: Clean the collected data, remove noise and irrelevant information, and format the data to ensure that it is consistent with the data format used when training the model.
[0232] Feature extraction: Use the same feature extraction method as in the training phase to extract features from the user’s text and behavior data.
[0233] 2. Model prediction
[0234] Model input: Input the preprocessed feature vector into the trained model.
[0235] Perform predictions: The model calculates and outputs a prediction based on the input features, usually the probability that the user is real or fake.
[0236] Probability threshold judgment: The final user classification is determined based on the set probability threshold. For example, if the model outputs a probability of a fake user exceeding 50%, the user may be marked as fake.
[0237] 3. Result processing
[0238] Result explanation: Provides an explanation of the prediction results, including the main factors why a user is judged as fake or real, which can help further understand the basis of the model's judgment.
[0239] Confidence score: A confidence score can be calculated that takes into account the contribution of various features to the model's predictions to quantify the model's confidence in the prediction results.
[0240] 4. Feedback Mechanism
[0241] User feedback: In practical applications, users are allowed to provide feedback on prediction results. For example, users who are incorrectly labeled can file a complaint.
[0242] Expert review: For accounts that the model predicts to be false but have a low trust score, human review can be introduced to ensure accuracy.
[0243] Model iteration: Use feedback from users and experts to continuously adjust and optimize the model to improve the accuracy and reliability of predictions.
[0244] 5. Real-time monitoring and application
[0245] Automated processing: Set up automated processes to mark, isolate, or delete accounts identified as fake by the model, reducing the need for manual intervention.
[0246] Security and privacy protection: Ensure compliance with relevant data protection regulations and privacy policies when processing user data and performing predictions.
[0247] S204 Result Verification and Feedback
[0248] 1. Result verification
[0249] Performance evaluation: Use the pre-divided test set to regularly evaluate the performance of the model, including key indicators such as accuracy, recall, F1 score, etc. In addition, draw the ROC curve and calculate the AUC value to evaluate the overall effectiveness of the model.
[0250] Compare to true labels: Compare the model’s predictions with the user’s true labels and analyze cases where the predictions were correct and incorrect.
[0251] Error analysis: Perform in-depth analysis of cases where the model made incorrect predictions, identifying which types of users or specific situations the model performs poorly for, and possible reasons.
[0252] 2. User and expert feedback
[0253] Feedback collection mechanism: Design and implement a user feedback mechanism to allow users to provide feedback on prediction results, especially to provide a channel for users to appeal if they are incorrectly marked.
[0254] Expert review: When model predictions are uncertain or user feedback is controversial, experts are introduced to conduct manual review. Expert judgment can be used to adjust the model's predictions or directly correct errors.
[0255] Feedback integration: Integrate and analyze feedback data from users and experts to determine the direction of model update or improvement.
[0256] 3. Model optimization and iteration
[0257] Parameter adjustment: According to the error analysis and feedback results, adjust the model parameters, such as learning rate, number of layers, number of nodes, etc., or optimize the model structure.
[0258] Feature Engineering Iteration: Based on feedback and analysis results, adjust feature selection and processing methods, which may include adding new features or removing unimportant or biased features.
[0259] Continuous learning: Implement online learning or incremental learning mechanisms for models, so that the model can adapt to new data and environmental changes and improve the long-term performance of the model.
[0260] 4. Effect tracking and reporting
[0261] Performance tracking: Generate regular reports on model performance, including key performance indicators and a history of improvements, as well as how the model performs in real-world applications.
[0262] Decision support: Provides detailed data and analysis results to help decision makers understand the effectiveness of the model and make decisions on whether to continue investing resources in model maintenance and development.
[0263] Transparency and explainability: Enhance the transparency and explainability of the model to provide users and internal teams with a clear view of the model’s decision-making process and increase trust.
[0264] According to a specific implementation of the embodiment of the present disclosure, the user extraction is performed on the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, ...DUn}, including:
[0265] Performing data cleaning on the original data, and finding information that uniquely identifies the user in the cleaned data;
[0266] Create an index structure to store each user's ID and related information;
[0267] Traverse all cleaned data records and add them to the user index according to the user ID;
[0268] If the same user has activities on different platforms, the user information of the same user on different platforms is merged to build a complete user view.
[0269] According to a specific implementation of the embodiment of the present disclosure, the original data is split based on the first user set DU to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data, including:
[0270] Create an empty set DF to store the split data of each user;
[0271] Traverse each user in the user set DU, and for each user DUi, extract all data related to the user from the original data;
[0272] After the data related to the user DUi is formed into a new data subset DFi, the data subset DFi is added to the split data set DF.
[0273] According to a specific implementation of the embodiment of the present disclosure, the large language model is used to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn}, including:
[0274] Extract the timestamp of each event from DFi, identify the user's active time period, and obtain the user's activity time feature KT;
[0275] Natural language processing technology is used to analyze the social media content posted by users and obtain the user's content style feature KF.
[0276] According to a specific implementation of the embodiment of the present disclosure, the use of a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn} also includes:
[0277] Determine the user's interaction characteristics KH through the frequency and type of interaction between the user and other users;
[0278] Analyze the user's position and connection pattern in the social network to obtain the user's network structure characteristics KN;
[0279] Based on the activity time feature KT, content style feature KF, interaction feature KH and network structure feature KN, construct the user behavior feature vector K=[KT, KF, KH, KN];
[0280] The user behavior feature vectors K of n users are aggregated to form a first feature set DT.
[0281] According to a specific implementation of the embodiment of the present disclosure, the user geographic feature extraction is performed on the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn}, including:
[0282] Parse all the geographical locations of the user from the data in DF;
[0283] Count the number of times a user appears in different geographic locations and generate a list of user geographic preferences;
[0284] Based on the user's geographic preference list, a second feature set DG={DG1, DG2, ...DGn} is generated.
[0285] According to a specific implementation of an embodiment of the present disclosure, the prediction of the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} includes:
[0286] set up represents the predicted feature vector of the i-th user, Depend on and composition, represents the authenticity label of the i-th user, , where 0 represents a fake user, 1 represents a real user, and M represents the model set used. Output a predicted value , and Containing d and g features respectively, the feature vector of the i-th user is expressed as:
[0287] .
[0288] According to a specific implementation of the embodiment of the present disclosure, the prediction of the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} further includes:
[0289] For each model Train on the training set to obtain the trained model :
[0290]
[0291] Tn is the training function, which combines the prediction results of all models by weighted average:
[0292]
[0293] in is the predicted value of the j-th model for the i-th user, is the weight of the jth model;
[0294] Set the threshold T0, if , then predict the user is a real user, otherwise, it is predicted to be a fake user;
[0295] Weight According to the accuracy of each model, the accuracy of the jth model is , then the weight of the j-th model is defined as:
[0296] .
[0297] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a social media user authenticity prediction device 30 based on a large language model, comprising:
[0298] The collection module 301 performs user extraction on the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, ...DUn};
[0299] A splitting module 302 performs data splitting on the original data based on the first user set DU to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data;
[0300] The first extraction module 303 uses a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn};
[0301] The second extraction module 304 extracts user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn};
[0302] The prediction module 305 predicts the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn}.
[0303] See also Figure 4 The embodiment of the present invention further provides an electronic device 60, the electronic device comprising:
[0304] at least one processor; and,
[0305] a memory communicatively connected to the at least one processor; wherein,
[0306] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the social media user authenticity prediction method based on a large language model in the aforementioned method embodiment.
[0307] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the aforementioned method embodiment.
[0308] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the social media user authenticity prediction method based on a large language model in the aforementioned method embodiment.
[0309] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 60 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0310] like Figure 4 As shown, the electronic device 60 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0311] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, a gage, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 60 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0312] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0313] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for predicting authenticity of social media users based on a large language model, characterized in that: include: Perform user extraction on the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, …DUn}; Based on the first user set DU, the original data is split to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data; Using a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn}, to obtain a first feature set DT={DT1, DT2, ...DTn}; Extracting user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn}; Based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn}, the authenticity of users in the first user set DU={DU1, DU2, ...DUn} is predicted; wherein The predicting the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} includes: set up represents the predicted feature vector of the i-th user, Depend on and composition, represents the authenticity label of the i-th user, , where 0 represents a fake user, 1 represents a real user, and M represents the model set used. Output a predicted value , and Containing d and g features respectively, the feature vector of the i-th user is expressed as: ; For each model Train on the training set to obtain the trained model : ; Tn is the training function, which combines the prediction results of all models by weighted average: ; in is the predicted value of the j-th model for the i-th user, is the weight of the jth model; Set the threshold T0, if , then predict the user is a real user, otherwise, it is predicted to be a fake user; Weight According to the accuracy of each model, the accuracy of the jth model is , then the weight of the j-th model is defined as: 。 2. The method according to claim 1, characterized in that: The user extraction is performed on the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, ...DUn}, including: Performing data cleaning on the original data, and finding information that uniquely identifies the user in the cleaned data; Create an index structure to store each user's ID and related information; Traverse all cleaned data records and add them to the user index according to the user ID; If the same user has activities on different platforms, the user information of the same user on different platforms is merged to build a complete user view.
3. The method according to claim 2, characterized in that The original data is split based on the first user set DU to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data, including: Create an empty set DF to store the split data of each user; Traverse each user in the user set DU, and for each user DUi, extract all data related to the user from the original data; After the data related to the user DUi is formed into a new data subset DFi, the data subset DFi is added to the split data set DF.
4. The method according to claim 3, characterized in that The method of using a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn} includes: Extract the timestamp of each event from DFi, identify the user's active time period, and obtain the user's activity time feature KT; Natural language processing technology is used to analyze the social media content posted by users and obtain the user's content style feature KF.
5. The method according to claim 4, characterized in that The method further comprises: extracting user behavior features from the split data set DF={DF1, DF2, ...DFn} by using a large language model to obtain a first feature set DT={DT1, DT2, ...DTn}; Determine the user's interaction characteristics KH through the frequency and type of interaction between the user and other users; Analyze the user's position and connection pattern in the social network to obtain the user's network structure characteristics KN; Based on the activity time feature KT, content style feature KF, interaction feature KH and network structure feature KN, construct the user behavior feature vector K=[KT, KF, KH, KN]; The user behavior feature vectors K of n users are aggregated to form a first feature set DT.
6. The method according to claim 5, characterized in that The step of extracting user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn} includes: Parse all the geographical locations of the user from the data in DF; Count the number of times a user appears in different geographic locations and generate a list of user geographic preferences; Based on the user's geographic preference list, a second feature set DG={DG1, DG2, ...DGn} is generated.
7. A social media user authenticity prediction device based on a large language model, characterized in that: include: A collection module extracts users from the original data collected from multiple social media platforms to obtain a first user set DU={DU1, DU2, …DUn}; A splitting module, based on the first user set DU, performs data splitting on the original data to obtain a split data set DF={DF1, DF2, ...DFn} containing n user data; A first extraction module uses a large language model to extract user behavior features from the split data set DF={DF1, DF2, ...DFn} to obtain a first feature set DT={DT1, DT2, ...DTn}; A second extraction module extracts user geographic features from the split data set DF={DF1, DF2, ...DFn} to obtain a second feature set DG={DG1, DG2, ...DGn}; A prediction module predicts the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn}; wherein The predicting the authenticity of users in the first user set DU={DU1, DU2, ...DUn} based on the first feature set DT={DT1, DT2, ...DTn} and the second feature set DG={DG1, DG2, ...DGn} includes: set up represents the predicted feature vector of the i-th user, Depend on and composition, represents the authenticity label of the i-th user, , where 0 represents a fake user, 1 represents a real user, and M represents the model set used. Output a predicted value , and Containing d and g features respectively, the feature vector of the i-th user is expressed as: ; For each model Train on the training set to obtain the trained model : ; Tn is the training function, which combines the prediction results of all models by weighted average: ; in is the predicted value of the j-th model for the i-th user, is the weight of the jth model; Set the threshold T0, if , then predict the user is a real user, otherwise, it is predicted to be a fake user; Weight According to the accuracy of each model, the accuracy of the jth model is , then the weight of the j-th model is defined as: 。 8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the social media user authenticity prediction method based on a large language model as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for identifying risk user
CN110147923A
Method for real person detection in man-machine conversation process based on large model
CN117312982A
