Method and device for unified reply to private messages on multiple social media
By using private message management programs, databases and interface layers on multi-social media platforms, the differences between different platforms are solved, and unified responses to private messages on multi-platforms are achieved, improving the response efficiency and quality.
Patent Information
- Application Number
- CN202411792833.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-08
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-08
AI Technical Summary
In the process of unified response to private messages on multiple social media, the prior art faces problems such as inconsistent API design standards, different permission management mechanisms, API frequency limitations and error handling mechanisms, resulting in complex and inefficient reply.
Obtain the user's authorization token through the private message management program, build a database to store private information records, set the interface layer to obtain messages to be replied, match them based on the message matching function and the database, obtain historical data to generate response data, and publish responses on the social media platform through the interface layer.
It realizes unified responses to private messages from multiple social media platforms, improves adaptability and accuracy, solves the differences between different platforms, and improves the efficiency and quality of responses.
Smart Images

Figure CN119276827B_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 uniformly replying to private messages on multiple social media. Background Art
[0002] Social media private messaging refers to private communication between users on social media platforms. This form of communication is usually only visible between the sender and the receiver of the message and will not be publicly displayed on the user's personal homepage or timeline.
[0003] The prior art has the following problems in the process of unified reply to private messages on multiple social media:
[0004] 1. Due to the inconsistent API design standards and specifications used by different platforms, there are differences in data structure and operation methods.
[0005] 2. The permission management mechanisms of different platforms are based on different authentication and authorization frameworks, such as OAuth, JWT, APIKey, etc., which leads to authorization failure or insufficient permissions.
[0006] 3. The frequency limit and rate limit strategies of each platform API are different, which limits high-frequency API calls and may adopt technical means such as current limiting and quota control.
[0007] 4. The error handling and feedback mechanisms of each platform adopt different standards and protocols, and the error codes and error types of different platforms are also inconsistent.
[0008] The above problems become technical problems that need to be solved. Summary of the invention
[0009] In view of this, the embodiments of the present invention provide a method, device and electronic device for unified replying to private messages on multiple social media, which at least partially solve the problems existing in the prior art.
[0010] In a first aspect, an embodiment of the present invention provides a method for uniformly replying to private messages on multiple social media platforms, including:
[0011] Obtain the authorization token P(u,s)=Fh(A,u,s) of user u on social media platform s through the private message management program A and the message verification function Fh(A,u,s);
[0012] Construct a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) contains private information content m, sender us and sending time t, Msg is the set of all private information, U is the set of all users, and Tm is the set of time;
[0013] An interface layer Jis is set in the message management program A, and based on the interface layer Jis and the authorization token P(u, s), a message set DH={DH1, DH2, ...DHn} in a state to be replied to on the social media platform is obtained;
[0014] Based on the message matching function Fp and the database DB, a matching operation is performed on the message set DH to obtain first response data DX1=Fp(DB,DH) corresponding to the message set DH;
[0015] The historical data DY of user u on the social media platform s is obtained, and based on the summary extraction function Fj, the message set DH and the historical data DY, the second response data DX2=Fj(DY,DH) corresponding to the message set DH is generated; after the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s.
[0016] According to a specific implementation of an embodiment of the present invention, obtaining the authorization token P(u, s) of user u on social media platform s through the private message management program A and the message verification function Fh(A,u,s) includes:
[0017] User u initiates an authorization request through private message management program A;
[0018] After receiving the authorization request from user u, the private message management program A generates an authorization request, which includes access parameters and constructs the authorization request as a URL pointing to the authorization server of the social media platform s;
[0019] The authorization server of the social media platform s verifies the identity of the user u and the validity of the authorization request. If the verification is successful, the authorization server generates an authorization code and returns the authorization code to the private message management program A through the redirection URI;
[0020] After receiving the authorization code, the private message management program A calls the message verification function Fh(A,u,s) to verify the validity of the authorization code. The message verification function Fh(A,u,s) checks the format and validity period of the authorization code and whether it matches the user u and the social media platform s.
[0021] If the message verification function F_h(A,u,s) passes the verification, the private message management program A uses the authorization code to send a request to the token endpoint of the social media platform s in exchange for an access token. The token endpoint of the social media platform s verifies the validity of the authorization code and returns the access token P(u,s) to the private message management program A;
[0022] After receiving the access token P(u,s), the private message management program A stores it in the database.
[0023] According to a specific implementation of the embodiment of the present invention, the construction of the database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm} includes:
[0024] Create one or more record tables Msa for storing private information records, and set multiple fields for the record table Msa;
[0025] For each private information m, determine its sender us and sending time t, and insert the private information into the Msa table;
[0026] Create a table named Ues to store user information. In the Msa table, the SenderID field and the ReceiverID field refer to the UserID field in the Ues table respectively.
[0027] According to a specific implementation of an embodiment of the present invention, based on the interface layer Jis and the authorization token P(u, s), obtaining a message set DH={DH1, DH2, ...DHn} in a waiting-to-reply state on a social media platform includes:
[0028] Use the authorization token P(u,s) to initialize the API interface layer Jis of the social media platform s;
[0029] Call the corresponding API method through the API interface layer Jis to obtain all private information of user u on the social media platform s;
[0030] From the acquired private information list M, filter out the messages with the status of "pending reply", and put the filtered messages with the status of "pending reply" into the set DH.
[0031] According to a specific implementation of an embodiment of the present invention, the matching operation is performed on the message set DH based on the message matching function Fp and the database DB to obtain the first response data DX1=Fp(DB,DH) corresponding to the message set DH, including:
[0032] Initialize the database DB:
[0033]
[0034] The database DB contains all private message records, each record contains the private message content m, sender us and sending time t;
[0035] Initialize the message set to be replied to DH:
[0036]
[0037] DH contains all messages DHi in the waiting-for-reply state, each of which contains private message content mi, sender usi and sending time ti;
[0038] For each message DHi to be replied, extract the keyword set Ki and the weight set Wi, the keyword set Ki contains the words in the message DHi, and the weight set Wi contains the importance weight of each keyword;
[0039] For each message to be replied DHi and each historical message Mj in the database DB, calculate the keyword matching score :
[0040]
[0041] Represents the frequency of occurrence of keyword Ki(k) in message Mj.
[0042] According to a specific implementation of an embodiment of the present invention, the matching operation is performed on the message set DH based on the message matching function Fp and the database DB to obtain the first response data DX1=Fp(DB,DH) corresponding to the message set DH, and further includes:
[0043] Use the pre-trained language model to convert messages DHi and Mj into vector representations V(DHi) and V(Mj) and calculate the semantic similarity score :
[0044]
[0045] Represents the cosine similarity between two vectors;
[0046] Combine the keyword matching score and semantic similarity to calculate the comprehensive similarity score S(DHi,Mj):
[0047]
[0048] is the weight coefficient;
[0049] For each message to be replied DHi, select the historical message Mj with the highest comprehensive similarity score as the match:
[0050]
[0051] The response data of the matching message Mj is added to the first response data set DX1.
[0052] According to a specific implementation of an embodiment of the present invention, the generating of the second response data DX2=Fj(DY, DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY comprises:
[0053] For each reply message DHi, extract the context information Ci and calculate the context similarity score :
[0054]
[0055] represents the similarity between context information c and record Dyj;
[0056] For each message to be replied DHi, extract the user's historical interaction record Hi and calculate the user's historical similarity score :
[0057]
[0058] fh(h,Dyj) represents the similarity between user history record h and record Dyj.
[0059] According to a specific implementation of an embodiment of the present invention, the method of generating second response data DX2=Fj(DY, DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY also includes:
[0060] For each message to be replied DHi and each record Dyj in the historical data DY, sentiment analysis is performed to calculate sentiment scores E(DHi) and E(Dyj), and sentiment similarity scores are calculated. :
[0061]
[0062] Combining context similarity, user history similarity and sentiment similarity, we calculate the comprehensive similarity score S(DHi,Dyj):
[0063]
[0064] is the weight coefficient;
[0065] For each message DHi to be replied, select the historical record Dyj with the highest comprehensive similarity score, and use the summary generation algorithm G to generate summary information Zi from the selected historical record Dyj:
[0066] Zi = G(Dyj)
[0067] The extracted summary information Zi is used as part of the second response data DX2:
[0068] .
[0069] In a second aspect, an embodiment of the present invention provides a device for uniformly replying to private messages on multiple social media platforms, including:
[0070] The acquisition module obtains the authorization token P(u,s)=Fh(A,u,s) of user u on the social media platform s through the private message management program A and the message verification function Fh(A,u,s);
[0071] Construct a module, construct a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) contains private information content m, sender us and sending time t, Msg is the set of all private information, U is the set of all users, and Tm is the set of time;
[0072] A setting module is used to set an interface layer Jis in the message management program A, and obtain a message set DH={DH1, DH2, ...DHn} in a waiting-to-reply state on the social media platform based on the interface layer Jis and the authorization token P(u, s);
[0073] A matching module performs a matching operation on the message set DH based on a message matching function Fp and the database DB to obtain first response data DX1=Fp(DB,DH) corresponding to the message set DH;
[0074] The publishing module obtains the historical data DY of user u on the social media platform s, and generates the second response data DX2=Fj(DY,DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY. After the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s.
[0075] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0076] at least one processor; and,
[0077] a memory communicatively connected to the at least one processor; wherein,
[0078] 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 unified reply method for multi-social media private messages in any of the aforementioned first aspects or any of the implementations of the first aspect.
[0079] 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 unified reply method for multi-social media private messages in the aforementioned first aspect or any implementation of the first aspect.
[0080] 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 unified reply method for multi-social media private messages in the aforementioned first aspect or any implementation of the first aspect.
[0081] The unified reply scheme for private messages on multiple social media in an embodiment of the present invention includes: obtaining an authorization token P(u,s)=Fh(A,u,s) of a user u on a social media platform s through a private message management program A and a message verification function Fh(A,u,s); constructing a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) includes private information content m, sender us and sending time t, Msg is a set of all private information, U is a set of all users, and Tm is a set of time; setting an interface layer Jis in the message management program A, and based on the interface layer Jis and the authorization token P(u,s), Obtain a message set DH={DH1, DH2,…DHn} in a state of waiting for reply on a social media platform; perform a matching operation on the message set DH based on a message matching function Fp and the database DB, and obtain first response data DX1=Fp(DB,DH) corresponding to the message set DH; obtain historical data DY of user u on a social media platform s, and generate second response data DX2=Fj(DY,DH) corresponding to the message set DH based on a summary extraction function Fj, the message set DH and the historical data DY; after the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s. The present invention can improve the adaptability and accuracy of private message replies on social media. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] 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.
[0083] Figure 1 A schematic diagram of a flow chart of a method for uniformly replying to private messages on multiple social media provided by an embodiment of the present invention;
[0084] Figure 2 A schematic flow chart of another method for uniformly replying to private messages on multiple social media provided by an embodiment of the present invention;
[0085] Figure 3 A schematic diagram of the structure of a device for uniformly replying to private messages on multiple social media provided by an embodiment of the present invention;
[0086] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0087] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] The embodiment of the present disclosure provides a unified reply method for private messages on multiple social media. The unified reply method for private messages on multiple social media provided by the 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.
[0093] See also Figure 1 and Figure 2 The embodiment of the present disclosure provides a method for uniformly replying to private messages on multiple social media platforms, including:
[0094] S101, obtain the authorization token P(u,s)=Fh(A,u,s) of user u on the social media platform s through the private message management program A and the message verification function Fh(A,u,s).
[0095] Specifically, user u initiates an authorization request through private message management program A, hoping to access his private information data on social media platform s.
[0096] After receiving the authorization request from user u, the private message manager A generates an authorization request containing necessary parameters, such as client ID (ClientID), redirect URI (RedirectURI), etc. This authorization request will be constructed as a URL pointing to the authorization server of the social media platform s.
[0097] User u is redirected to the authorization page of social media platform s. User u reviews the details of the authorization request on the authorization page and decides whether to authorize. If user u agrees to the authorization, click the "Agree" button.
[0098] The authorization server of social media platform s verifies the identity of user u and the validity of the authorization request. If the verification is successful, the authorization server generates an authorization code (AuthorizationCode) and returns the authorization code to the private message manager A through the redirection URI.
[0099] After receiving the authorization code, the private message manager A calls the message verification function Fh(A,u,s) to verify the validity of the authorization code. The message verification function Fh(A,u,s) may check the format of the authorization code, its validity period, and whether it matches the user u and the social media platform s.
[0100] If the message verification function Fh(A,u,s) passes the verification, the private message manager A uses the authorization code to send a request to the token endpoint of the social media platform s in exchange for an access token (AccessToken). The token endpoint of the social media platform s verifies the validity of the authorization code and returns the access token P(u,s) to the private message manager A.
[0101] After receiving the access token P(u,s), the private message manager A stores it securely in a database or other secure storage for subsequent use.
[0102] Through the above steps, the private message management program A successfully obtains the authorization token P(u,s) of user u on the social media platform s, so that it can access and manage the private information data of user u on the social media platform s on behalf of user u.
[0103] S102, construct a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) contains private information content m, sender us and sending time t, Msg is the set of all private information, U is the set of all users, and Tm is the set of time.
[0104] After building the database DB, you can create one or more tables to store private information records. Assume that you create a table named Messages, which can include the following fields:
[0105] MessageID: Unique identifier (primary key) of a private message.
[0106] MessageContent: Private message content.
[0107] SenderID: The sender's user ID.
[0108] ReceiverID: The user ID of the receiver.
[0109] Timestamp: The time when the private information is sent.
[0110] For each private message m, determine its sender us and sending time t. Insert this information into the Messages table.
[0111] Create a table named Users to store user information. The fields include: UserID, Username, SocialMediaAccountID, etc. In the Messages table, the SenderID and ReceiverID fields reference the UserID field in the Users table.
[0112] Through the above steps, a database DB is defined to store and manage the user's private information content. The database contains two main tables: the Messages table is used to store private information records, and the Users table is used to store user information. These two tables are associated through the user ID to ensure that private information records can be correctly associated with user accounts.
[0113] S103, setting an interface layer Jis in the message management program A, and obtaining a message set DH={DH1, DH2, ...DHn} in a waiting-to-reply state on the social media platform based on the interface layer Jis and the authorization token P(u, s).
[0114] In order to obtain the message set DH in the waiting-to-reply state on the social media platform based on the interface layer Jis and the authorization token P(u,s), the following definition is made:
[0115] Jis: API interface layer for social media platforms.
[0116] P(u,s): The authorization token of user u on social media platform s.
[0117] DH: A collection of messages in the waiting-for-reply state.
[0118] DHi: The i-th message in the waiting-for-reply state.
[0119] M(m,us,t): Private information record, including private information content m, sender us and sending time t.
[0120] S: Collection of social media platforms.
[0121] U: user set.
[0122] Tm: time set.
[0123] Status: A collection of message statuses, including "pending reply", "replied", etc.
[0124] Steps may include:
[0125] Use the authorization token P(u,s) to initialize the API interface layer Jis of social media platform s. This step ensures that the application can access the private information data of social media platform s through the API interface layer Jis.
[0126] By calling the corresponding API method through the API interface layer Jis, all private information of user u on the social media platform s is obtained. Assume that the API method is getMessages(P(u,s)), and the return value is the private information list M.
[0127] From the obtained private information list M, filter out the messages with the status "pending reply". Assume that each private information record M(m,us,t) contains a status field status, which can be expressed as M(m,us,t,status).
[0128] The filtered "pending reply" state messages are put into the set DH. The set DH contains all the pending reply state messages DHi.
[0129] Through the above steps, the message set DH in the waiting-to-reply state on the social media platform is successfully obtained based on the interface layer Jis and the authorization token P(u,s). These steps ensure that the application can efficiently manage and process the user's private information data.
[0130] S104, performing a matching operation on the message set DH based on the message matching function Fp and the database DB, and obtaining first response data DX1=Fp(DB,DH) corresponding to the message set DH.
[0131] Specifically, you can initialize the database DB:
[0132]
[0133] The database DB contains all private message records, each record contains the private message content m, sender us and sending time t.
[0134] Initialize the message set to be replied to DH:
[0135]
[0136] DH contains all messages DHi in the waiting-to-reply state. Each message contains the private message content mi, the sender usi and the sending time ti.
[0137] The goal of Fp(DB,DH) is to find the historical response data from database DB that is most similar to the message in DH.
[0138] The message matching function Fp can be implemented based on keyword matching, semantic similarity, context information and user historical interaction records.
[0139] For each message to be replied DHi, a keyword set Ki and a weight set Wi are extracted.
[0140] The keyword set Ki contains important words in the message DHi.
[0141] The weight set Wi contains the importance weight of each keyword.
[0142] For each message to be replied DHi and each historical message Mj in the database DB, calculate the keyword matching score S_{kw}(DHi,Mj).
[0143]
[0144] Indicates the frequency or importance of keyword Ki(k) in message Mj.
[0145] Use a pre-trained language model such as BERT to convert messages DHi and Mj into vector representations V(DHi) and V(Mj).
[0146] Calculating semantic similarity score .
[0147]
[0148] Represents the cosine similarity between two vectors.
[0149] Combine the keyword matching score and semantic similarity to calculate the comprehensive similarity score S(DHi,Mj).
[0150]
[0151] It is the weight coefficient and can be adjusted according to actual conditions.
[0152] For each message to be replied DHi, the historical message Mj with the highest comprehensive similarity score is selected as the best match.
[0153]
[0154] The response data of the best matching message Mj is added to the first response data set DX1.
[0155] Message matching function Fp:
[0156]
[0157] Through the above steps, a message matching function Fp is designed, which combines multiple factors such as keyword matching and semantic similarity to improve the accuracy of matching. These steps ensure that the application can generate more appropriate reply suggestions for users.
[0158] S105, obtain the historical data DY of user u on the social media platform s, and generate the second response data DX2=Fj(DY,DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY. After the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s.
[0159] The symbol definition is as follows:
[0160] DH: A collection of messages in the waiting-for-reply state.
[0161] DHi: The i-th message in the waiting-for-reply state.
[0162] DY: A collection of historical data, including past messages and their responses.
[0163] DX2: Second response data set.
[0164] Fj(DY,DH): Summary extraction function, used to extract summary information related to the message in DH from the historical data DY.
[0165] K: Keyword set.
[0166] W: weight set.
[0167] S: Similarity score.
[0168] V: vector representation.
[0169] Z: Summary information.
[0170] C: Contextual information.
[0171] H: User historical interaction records.
[0172] E: Sentiment analysis score.
[0173] G: Summary generation algorithm.
[0174] The goal of Fj(DY, DH) is to extract summary information related to the messages in DH from the historical data DY. The summary extraction function Fj can be implemented based on context information, user historical interaction records, sentiment analysis, and summary generation algorithms.
[0175] For each message to be replied DHi, context information Ci is extracted.
[0176] Contextual information may include conversation history before the message, user background, etc.
[0177] Calculating context similarity score .
[0178]
[0179] Represents the similarity between context information c and record Dyj.
[0180] For each message to be replied DHi, extract the user's historical interaction record Hi. The user's historical interaction record may include the user's previous behavior patterns, preferences, etc. Calculate the user's historical similarity score :
[0181]
[0182] fh(h,Dyj) represents the similarity between user history record h and record Dyj.
[0183] For each message to be replied DHi and each record Dyj in the historical data DY, sentiment analysis is performed to calculate sentiment scores E(DHi) and E(Dyj), and sentiment similarity scores are calculated. .
[0184]
[0185] Combining context similarity, user history similarity and sentiment similarity, the comprehensive similarity score S(DHi,Dyj) is calculated.
[0186]
[0187] It is the weight coefficient and can be adjusted according to actual conditions.
[0188] For each message DHi to be replied, select the historical record Dyj with the highest comprehensive similarity score, and use the summary generation algorithm G to generate summary information Zi from the selected historical records Dyj.
[0189] Zi = G(Dyj)
[0190] The extracted summary information Zi is used as a part of the second response data DX2.
[0191]
[0192] As another implementation, the summary extraction function Fj extracts summary information related to the message in DH from the historical data DY through steps S1051-S1055:
[0193] S1051, obtaining the user's original data from the social media platform, performing data preprocessing operations on the original data, and obtaining historical data DY={DY1, DY2, ...DYn}.
[0194] Select the social media platforms from which to scrape data, such as Weibo, WeChat, etc. You can use API interfaces, web crawler tools, or other data scraping tools to obtain data. Determine the time range, frequency, and user group for data collection. For example, you can collect posts and comments of active users in the past month.
[0195] For the collected data, you can remove records without content, remove records containing advertising and promotional information, remove duplicate records to ensure the uniqueness of each piece of data, and remove special characters in the text, such as HTML tags, emojis, etc.
[0196] Convert all text to a unified format, such as converting it all to lowercase. Remove common stop words, such as "de", "shi", "zai", etc. Stemming and lemmatization,还原单词为其基本形式,如将“running”还原为“run”。Replace synonyms with a unified form to reduce lexical diversity.
[0197] Classify the text into different categories according to factors such as the theme and sentiment tendency of the text. You can use natural language processing techniques (such as TF-IDF, LDA) to perform topic classification on the text and classify the text into different topic categories. Use sentiment analysis tools to perform sentiment classification on the text and label the text as positive, negative, or neutral. Extract keywords from the text for subsequent analysis and processing.
[0198] Organize the processed data into a structured format for easy management and query. Generate a unique identifier for each record, such as user ID, publication time, etc. Organize the processed data into a structured format, such as JSON, CSV, etc. Store the structured data in a database or file for subsequent use.
[0199] S1052, perform a data screening operation on the historical data DY based on the constructed content screening vector Sn = [Ft, Hc, Rc, Fl] and the evaluation function Fp to obtain the screening data DS = {DS1, DS2,... DSn} stored in string form, where Ft represents the user's creation time, Hc represents the content interaction volume, Rc represents the content relevance value, and Fl represents the content attention volume.
[0200] The process of performing a data screening operation on the historical data DY based on the constructed content screening vector Sn = [Ft, Hc, Rc, Fl] and the evaluation function Fp to obtain the screening data DS stored in string form can be described in detail as follows:
[0201] Define the content screening vector Sn, and the content screening vector Sn includes four dimensions:
[0202] Ft: The user's creation time It should be noted that in the translation of "还原单词为其基本形式,如将‘running’还原为‘run’", there is an incorrect expression in the original Chinese. It should be "Restore the word to its basic form, such as restoring 'running' to 'run'". The above translation has made corresponding corrections.
[0203] Hc: Content interaction (such as likes, comments, and shares)
[0204] Rc: content relevance value (such as relevance to a specific topic)
[0205] Fl: Content attention (such as the number of followers of the user)
[0206] The evaluation function Fp is used to evaluate the quality of each piece of historical data DYi. The specific formula is as follows:
[0207]
[0208] in: is the weight of each dimension.
[0209] : Take the square root of the user creation time to smooth out the effect of time.
[0210] : Take the logarithm of content interaction to reduce the impact of extreme values.
[0211] : Normalize the content-related values to between 0 and 1, and max() is the maximum value function.
[0212] : Normalize the content attention to between 0 and 1.
[0213] For each piece of historical data DYi, calculate its evaluation score Fp(DYi):
[0214]
[0215] The historical data DYi is filtered according to the evaluation score Fp(DYi). A threshold can be set. Only data with an evaluation score greater than or equal to the threshold will be retained. All retained data DS_i are combined into a filtered data set DS:
[0216]
[0217] in, It is the filter data in string form.
[0218] S1053, tokenize the screening data DS through the token library provided by the AI processing engine to obtain a token list TL, calculate the length of the token list TL, and obtain the number of tokens Nt=|TL|. When the number of tokens Nt is less than the first threshold N0, calculate the compression rate Ctk=Nt / N0 of the token. When the compression rate Ctk is less than the second threshold C0, perform token verification on the token list to obtain a verification result Vy.
[0219] Through the token library provided by the AI processing engine, the screening data DS is tokenized to obtain a token list TL, the length of the token list TL is calculated, and the number of tokens Nt=|TL| is obtained. When the number of tokens Nt is less than the first threshold N0, the compression rate Ctk=Nt / N0 of the token is calculated. When the compression rate Ctk is less than the second threshold C0, the token list is token verified. The process of obtaining the verification result Vy can be divided into the following steps:
[0220] Select a token library that is suitable for the current application scenario, such as the vocabulary of pre-trained models such as BERT, T5, etc. Load the token library into memory for fast lookup and matching during the tokenization process.
[0221] Use the tokenizer provided by the AI processing engine to initialize a token initializer. Perform a tokenization operation on each piece of filtered data DSi (i=1,2,...,n) to split the text into individual tokens. Map each word or phrase after tokenization to a unique identifier (usually an integer ID) in the token library.
[0222] All tokens in the filtered data DS are combined in order into a token list TL. The total length of the generated token list TL is counted to obtain the token number Nt.
[0223] Set the first threshold N0: Determine an expected token quantity threshold N0 and calculate the token compression rate Ctk. The formula is:
[0224]
[0225] A compression rate threshold C0 is determined. If the compression rate Ctk is less than the second threshold C0, the token verification step is performed; otherwise, the verification step is skipped.
[0226] Perform token verification on the token list to ensure the quality and validity of the token list, including:
[0227] Check the validity of the token: Check each token in the token list TL one by one and remove invalid or erroneous tokens.
[0228] Evaluate the representativeness of tokens: Analyze the keywords in the token list to ensure that they can represent the main content of the original text.
[0229] Check the number of tokens: Make sure the length of the token list is within a reasonable range, neither too long nor too short.
[0230] Generate verification result Vy: According to the above verification process, generate verification result Vy. Verification result Vy can be a Boolean value (True or False), indicating whether the token list has passed the verification.
[0231] If the token list passes the verification, set the verification result Vy to True; if the token list fails the verification, set the verification result Vy to False.
[0232] Through the above steps, the screening data DS can be tokenized, a token list TL can be generated, the number of tokens Nt and the compression rate Ctk can be calculated, and token verification can be performed when the compression rate Ctk is less than the second threshold C0, and finally a verification result Vy can be obtained. These steps ensure that the generated token list is both effective and representative, providing high-quality input data for the subsequent summary generation task.
[0233] S1054, generate a model matching parameter PC=[Tx, Ls, Cc] corresponding to the verification result Vy, where Tx represents the temperature coefficient T, Ls represents the maximum output length L, and Cc represents the sampling strategy P.
[0234] In order to generate the model matching parameter PC=[Tx, Ls, Cc] corresponding to the verification result Vy, it is necessary to adjust the temperature coefficient Tx, the maximum output length Ls and the sampling strategy Cc according to the verification result Vy.
[0235] Model matching parameters can be defined. Model matching parameters PC include three parts:
[0236] Tx: Temperature coefficient T
[0237] Ls: Maximum output length L
[0238] Cc: Sampling strategy P
[0239] The temperature coefficient Tx controls the diversity and randomness of the generated summary. The temperature coefficient Tx is adjusted according to the verification result Vy. The maximum output length Ls defines the maximum length of the generated summary. The maximum output length Ls is adjusted according to the verification result Vy. The sampling strategy Cc specifies the sampling method of the model when generating the summary. The sampling strategy Cc is adjusted according to the verification result Vy.
[0240] Based on the above adjustments, the final model matching parameters PC=[Tx,Ls,Cc] are generated.
[0241] Among them, the temperature coefficient adjustment formula is:
[0242]
[0243] For example, is the indicator function.
[0244] Maximum output length adjustment formula:
[0245]
[0246] For example, .
[0247] Sampling strategy selection formula:
[0248]
[0249] For example, , representing different sampling strategies respectively.
[0250] Through the above steps and mathematical formulas, the model matching parameters PC=[Tx,Ls,Cc] corresponding to the verification result Vy can be generated to ensure that the generated summary is both accurate and representative.
[0251] S1055: construct a summary processing engine ZP based on the AI processing engine by using the model matching parameters PC, configure an API processing interface for the summary processing engine ZP, and after receiving the text to be processed Tdc, the API processing interface sends the text to be processed Tdc to the summary processing engine ZP, so as to generate a content summary Tnc corresponding to the text to be processed Tdc in the summary processing engine ZP.
[0252] Select a pre-trained model suitable for the task of generating summaries, such as BERT, T5, GPT, etc., load the pre-trained model into memory, and prepare for inference.
[0253] Configure the model according to the model matching parameters PC generated by the verification result Vy. Use the configured model matching parameters PC to initialize the summary processing engine ZP. Design the input processing logic to convert the text to be processed Tdc into a format acceptable to the model; design the output processing logic to convert the token sequence generated by the model into a readable text summary Tnc.
[0254] Configure the API processing interface for the summary processing engine ZP so that it can receive external requests and return the generated summary. Define the URL path, request method (such as POST), request parameters (such as the text to be processed Tdc), and response format (such as JSON) of the API interface. Pass the received text to be processed Tdc to the summary processing engine ZP and return the generated summary Tnc.
[0255] Through the above steps, the summary extraction function Fj is designed, which combines multiple factors such as context information, user historical interaction records, sentiment analysis and summary generation algorithm to improve the quality and accuracy of summary generation. These steps ensure that the application can generate more appropriate summary information for users, thereby improving the quality of replies and user experience.
[0256] According to a specific implementation of an embodiment of the present invention, obtaining the authorization token P(u, s) of user u on social media platform s through the private message management program A and the message verification function Fh(A,u,s) includes:
[0257] User u initiates an authorization request through private message management program A;
[0258] After receiving the authorization request from user u, the private message management program A generates an authorization request, which includes access parameters and constructs the authorization request as a URL pointing to the authorization server of the social media platform s;
[0259] The authorization server of the social media platform s verifies the identity of the user u and the validity of the authorization request. If the verification is successful, the authorization server generates an authorization code and returns the authorization code to the private message management program A through the redirection URI;
[0260] After receiving the authorization code, the private message management program A calls the message verification function Fh(A,u,s) to verify the validity of the authorization code. The message verification function Fh(A,u,s) checks the format and validity period of the authorization code and whether it matches the user u and the social media platform s.
[0261] If the message verification function F_h(A,u,s) passes the verification, the private message management program A uses the authorization code to send a request to the token endpoint of the social media platform s in exchange for an access token. The token endpoint of the social media platform s verifies the validity of the authorization code and returns the access token P(u,s) to the private message management program A;
[0262] After receiving the access token P(u,s), the private message management program A stores it in the database.
[0263] According to a specific implementation of the embodiment of the present invention, the construction of the database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm} includes:
[0264] Create one or more record tables Msa for storing private information records, and set multiple fields for the record table Msa;
[0265] For each private information m, determine its sender us and sending time t, and insert the private information into the Msa table;
[0266] Create a table named Ues to store user information. In the Msa table, the SenderID field and the ReceiverID field refer to the UserID field in the Ues table respectively.
[0267] According to a specific implementation of an embodiment of the present invention, based on the interface layer Jis and the authorization token P(u, s), obtaining a message set DH={DH1, DH2, ...DHn} in a waiting-to-reply state on a social media platform includes:
[0268] Use the authorization token P(u,s) to initialize the API interface layer Jis of the social media platform s;
[0269] Call the corresponding API method through the API interface layer Jis to obtain all private information of user u on the social media platform s;
[0270] From the acquired private information list M, filter out the messages with the status of "pending reply", and put the filtered messages with the status of "pending reply" into the set DH.
[0271] According to a specific implementation of an embodiment of the present invention, the matching operation is performed on the message set DH based on the message matching function Fp and the database DB to obtain the first response data DX1=Fp(DB,DH) corresponding to the message set DH, including:
[0272] Initialize the database DB:
[0273]
[0274] The database DB contains all private message records, each record contains the private message content m, sender us and sending time t;
[0275] Initialize the message set to be replied to DH:
[0276]
[0277] DH contains all messages DHi in the waiting-for-reply state, each of which contains private message content mi, sender usi and sending time ti;
[0278] For each message DHi to be replied, extract the keyword set Ki and the weight set Wi, the keyword set Ki contains the words in the message DHi, and the weight set Wi contains the importance weight of each keyword;
[0279] For each message to be replied DHi and each historical message Mj in the database DB, calculate the keyword matching score :
[0280]
[0281] Represents the frequency of occurrence of keyword Ki(k) in message Mj.
[0282] According to a specific implementation of an embodiment of the present invention, the matching operation is performed on the message set DH based on the message matching function Fp and the database DB to obtain the first response data DX1=Fp(DB,DH) corresponding to the message set DH, and further includes:
[0283] Use the pre-trained language model to convert messages DHi and Mj into vector representations V(DHi) and V(Mj) and calculate the semantic similarity score :
[0284]
[0285] Represents the cosine similarity between two vectors;
[0286] Combine the keyword matching score and semantic similarity to calculate the comprehensive similarity score S(DHi,Mj):
[0287]
[0288] is the weight coefficient;
[0289] For each message to be replied DHi, select the historical message Mj with the highest comprehensive similarity score as the match:
[0290]
[0291] The response data of the matching message Mj is added to the first response data set DX1.
[0292] According to a specific implementation of an embodiment of the present invention, the generating of the second response data DX2=Fj(DY, DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY comprises:
[0293] For each reply message DHi, extract the context information Ci and calculate the context similarity score :
[0294]
[0295] represents the similarity between context information c and record Dyj;
[0296] For each message to be replied DHi, extract the user's historical interaction record Hi and calculate the user's historical similarity score :
[0297]
[0298] fh(h,Dyj) represents the similarity between user history record h and record Dyj.
[0299] According to a specific implementation of an embodiment of the present invention, the method of generating second response data DX2=Fj(DY, DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY also includes:
[0300] For each message to be replied DHi and each record Dyj in the historical data DY, sentiment analysis is performed to calculate sentiment scores E(DHi) and E(Dyj), and sentiment similarity scores are calculated. :
[0301]
[0302] Combining context similarity, user history similarity and sentiment similarity, we calculate the comprehensive similarity score S(DHi,Dyj):
[0303]
[0304] is the weight coefficient;
[0305] For each message DHi to be replied, select the historical record Dyj with the highest comprehensive similarity score, and use the summary generation algorithm G to generate summary information Zi from the selected historical record Dyj:
[0306] Zi = G(Dyj)
[0307] The extracted summary information Zi is used as part of the second response data DX2:
[0308] .
[0309] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a device 30 for uniformly replying to private messages on multiple social media platforms, including:
[0310] The acquisition module 301 acquires the authorization token P(u,s)=Fh(A,u,s) of the user u on the social media platform s through the private message management program A and the message verification function Fh(A,u,s);
[0311] Constructing module 302, constructing a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) includes private information content m, sender us and sending time t, Msg is the set of all private information, U is the set of all users, and Tm is the set of time;
[0312] The setting module 303 sets the interface layer Jis in the message management program A, and obtains the message set DH={DH1, DH2, ...DHn} in the waiting reply state on the social media platform based on the interface layer Jis and the authorization token P(u, s);
[0313] The matching module 304 performs a matching operation on the message set DH based on the message matching function Fp and the database DB to obtain the first response data DX1=Fp(DB,DH) corresponding to the message set DH;
[0314] The publishing module 305 obtains the historical data DY of the user u on the social media platform s, and generates the second response data DX2=Fj(DY,DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY. After the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s.
[0315] See also Figure 4The embodiment of the present invention further provides an electronic device 60, the electronic device comprising:
[0316] at least one processor; and,
[0317] a memory communicatively connected to the at least one processor; wherein,
[0318] 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 unified reply method for multi-social media private messages in the aforementioned method embodiment.
[0319] 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.
[0320] 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 unified reply method for multi-social media private messages in the aforementioned method embodiment.
[0321] 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.
[0322] 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.
[0323] 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.
[0324] 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.
[0325] 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 unified replying to private messages on multiple social media, characterized in that: include: Obtain the authorization token P(u,s)=Fh(A,u,s) of user u on social media platform s through the private message management program A and the message verification function Fh(A,u,s); Construct a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) contains private information content m, sender us and sending time t, Msg is the set of all private information, U is the set of all users, and Tm is the set of time; An interface layer Jis is set in the message management program A, and based on the interface layer Jis and the authorization token P(u, s), a message set DH={DH1, DH2, ...DHn} in a state to be replied to on the social media platform is obtained; Based on the message matching function Fp and the database DB, a matching operation is performed on the message set DH to obtain first response data DX1=Fp(DB,DH) corresponding to the message set DH; The historical data DY of user u on the social media platform s is obtained, and based on the summary extraction function Fj, the message set DH and the historical data DY, the second response data DX2=Fj(DY,DH) corresponding to the message set DH is generated; after the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s.
2. The method according to claim 1, characterized in that The method of obtaining the authorization token P(u,s) of user u on social media platform s through the private message management program A and the message verification function Fh(A,u,s) includes: User u initiates an authorization request through private message management program A; After receiving the authorization request from user u, the private message management program A generates an authorization request, which includes access parameters and constructs the authorization request as a URL pointing to the authorization server of the social media platform s; The authorization server of the social media platform s verifies the identity of the user u and the validity of the authorization request. If the verification is successful, the authorization server generates an authorization code and returns the authorization code to the private message management program A through the redirection URI; After receiving the authorization code, the private message management program A calls the message verification function Fh(A,u,s) to verify the validity of the authorization code. The message verification function Fh(A,u,s) checks the format and validity period of the authorization code and whether it matches the user u and the social media platform s. If the message verification function F_h(A,u,s) passes the verification, the private message management program A uses the authorization code to send a request to the token endpoint of the social media platform s in exchange for an access token. The token endpoint of the social media platform s verifies the validity of the authorization code and returns the access token P(u,s) to the private message management program A; After receiving the access token P(u,s), the private message management program A stores it in the database.
3. The method according to claim 2, characterized in that The construction database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm} includes: Create one or more record tables Msa for storing private information records, and set multiple fields for the record table Msa; For each private information m, determine its sender us and sending time t, and insert the private information into the Msa table; Create a table named Ues to store user information. In the Msa table, the SenderID field and the ReceiverID field refer to the UserID field in the Ues table respectively.
4. The method according to claim 3, characterized in that The method of obtaining a message set DH={DH1, DH2, ...DHn} in a waiting-to-reply state on a social media platform based on the interface layer Jis and the authorization token P(u, s) comprises: Use the authorization token P(u,s) to initialize the API interface layer Jis of the social media platform s; Call the corresponding API method through the API interface layer Jis to obtain all private information of user u on the social media platform s; From the acquired private information list M, filter out the messages with the status of "pending reply", and put the filtered messages with the status of "pending reply" into the set DH.
5. The method according to claim 4, characterized in that The matching operation is performed on the message set DH based on the message matching function Fp and the database DB to obtain the first response data DX1=Fp(DB,DH) corresponding to the message set DH, including: Initialize the database DB: The database DB contains all private message records, each record contains the private message content m, sender us and sending time t; Initialize the message set to be replied to DH: DH contains all messages DHi in the waiting-for-reply state, each of which contains private message content mi, sender usi and sending time ti; For each message DHi to be replied, extract the keyword set Ki and the weight set Wi, the keyword set Ki contains the words in the message DHi, and the weight set Wi contains the importance weight of each keyword; For each message to be replied DHi and each historical message Mj in the database DB, calculate the keyword matching score : Represents the frequency of occurrence of keyword Ki(k) in message Mj.
6. The method according to claim 5, characterized in that The method of performing a matching operation on the message set DH based on the message matching function Fp and the database DB to obtain first response data DX1=Fp(DB,DH) corresponding to the message set DH also includes: Use the pre-trained language model to convert messages DHi and Mj into vector representations V(DHi) and V(Mj) and calculate the semantic similarity score : Represents the cosine similarity between two vectors; Combine the keyword matching score and semantic similarity to calculate the comprehensive similarity score S(DHi,Mj): is the weight coefficient; For each message to be replied DHi, select the historical message Mj with the highest comprehensive similarity score as the match: The response data of the matching message Mj is added to the first response data set DX1.
7. The method according to claim 6, characterized in that The method of generating second response data DX2=Fj(DY, DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY comprises: For each reply message DHi, extract the context information Ci and calculate the context similarity score : represents the similarity between context information c and record Dyj; For each message to be replied DHi, extract the user's historical interaction record Hi and calculate the user's historical similarity score : fh(h,Dyj) represents the similarity between user history record h and record Dyj.
8. The method according to claim 7, characterized in that The method of generating second response data DX2=Fj(DY, DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY further includes: For each message to be replied DHi and each record Dyj in the historical data DY, sentiment analysis is performed to calculate sentiment scores E(DHi) and E(Dyj), and sentiment similarity scores are calculated. : Combining context similarity, user history similarity and sentiment similarity, we calculate the comprehensive similarity score S(DHi,Dyj): is the weight coefficient; For each message DHi to be replied, select the historical record Dyj with the highest comprehensive similarity score, and use the summary generation algorithm G to generate summary information Zi from the selected historical record Dyj: Zi = G(Dyj) The extracted summary information Zi is used as part of the second response data DX2: 。 9. A device for unified reply of private messages on multiple social media, characterized in that: include: The acquisition module obtains the authorization token P(u,s)=Fh(A,u,s) of user u on the social media platform s through the private message management program A and the message verification function Fh(A,u,s); Construct a module, construct a database DB={M(m,us,t)|m∈Msg,us∈U,t∈Tm}, wherein the database DB stores private information records, each private information record M(m,us,t) contains private information content m, sender us and sending time t, Msg is the set of all private information, U is the set of all users, and Tm is the set of time; A setting module is used to set an interface layer Jis in the message management program A, and obtain a message set DH={DH1, DH2, ...DHn} in a waiting-to-reply state on the social media platform based on the interface layer Jis and the authorization token P(u, s); A matching module, based on a message matching function Fp and the database DB, performs a matching operation on the message set DH to obtain first response data DX1=Fp(DB,DH) corresponding to the message set DH; The publishing module obtains the historical data DY of user u on the social media platform s, and generates the second response data DX2=Fj(DY,DH) corresponding to the message set DH based on the summary extraction function Fj, the message set DH and the historical data DY. After the second response data DX2 and the first response data DX1 are merged into the overall response data DX, the interface layer Jis publishes the response data DX on the social media platform s.
10. 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 to enable the at least one processor to execute the unified reply method for multi-social media private messages as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for sending messages on multiple social media platforms through one key
CN117155891A
Analysis of social media messages
US20160092771A1