Message sending method
By calculating the sensitivity score of the messages to be sent, deciding whether to send messages is to be sent, the information leakage problem caused by mistakenly sending sensitive messages in social software is solved, and the user's privacy security and experience is improved.
Patent Information
- Application Number
- CN202411435245.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-14
AI Technical Summary
Existing social software cannot take effective remedial measures when users mistakenly send sensitive messages, resulting in leakage of sensitive information and adverse effects.
By obtaining the historical chat records between the user and the object to be sent, the sensitivity score of the message to be sent is calculated based on the familiarity between the user and the object to be sent and the matching degree between the message to be sent and the historical chat records, and based on this score, determine whether to send a message to be sent. .
Effectively avoiding the missed sending of sensitive messages, improving user privacy security and user experience.
Smart Images

Figure CN119449752A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a message sending method. Background Art
[0002] In actual applications, when users use social software, sensitive messages may be accidentally sent due to factors such as the small terminal screen itself and the large number of communication objects in the software.
[0003] In the related art, social software often fails to take effective remedial measures for accidentally sending sensitive messages. Although social software generally sets a function for senders to actively withdraw messages within a limited time (no more than 3 minutes), it is generally difficult for users to detect the behavior of accidentally sending sensitive information. By the time they find out, the time window for active withdrawal has been missed, which can easily lead to the leakage of sensitive information and bring adverse effects. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a message sending method that can solve the problem of sensitive message leakage caused by the accidental sending of sensitive messages.
[0005] In the first aspect, an embodiment of the present application provides a message sending method, the method comprising: obtaining a user who sends a message to be sent, a to-be-sent object of the message to be sent, and a historical chat record between the user and the to-be-sent object; obtaining a sensitivity score of the message to be sent based on the familiarity between the user and the to-be-sent object, and the degree of fit between the message to be sent and the historical chat record of the to-be-sent object; and confirming whether to send the message to be sent to the to-be-sent object based on the sensitivity score. In the second aspect, an embodiment of the present application provides a message sending device, the device comprising: a first acquisition module, for obtaining a user who sends a message to be sent, a to-be-sent object of the message to be sent, and a historical chat record between the user and the to-be-sent object; a second acquisition module, for obtaining a sensitivity score of the message to be sent based on the familiarity between the user and the to-be-sent object, and the degree of fit between the message to be sent and the historical chat record of the to-be-sent object; and a sending module, for confirming whether to send the message to be sent to the to-be-sent object based on the sensitivity score.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0010] In the embodiment of the present application, the user who sends the message to be sent, the recipient of the message to be sent, and the historical chat records between the user and the recipient to be sent can be obtained first; then, based on the familiarity between the user and the recipient to be sent, and the matching degree between the message to be sent and the historical chat records of the recipient to be sent, the sensitivity score of the message to be sent can be obtained; finally, based on the sensitivity score, it is determined whether to send the message to the recipient to be sent. This can not only avoid the accidental sending of sensitive messages, but also improve user privacy security and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A schematic diagram showing a flow chart of a message sending method provided in an embodiment of the present application; Figure 2 A schematic diagram showing a flow chart of another message sending method provided in an embodiment of the present application; Figure 3 A flow chart showing a method for training a message sensitivity prediction model provided by an embodiment of the present application is shown; Figure 4 A schematic diagram showing the structure of a message sending device provided in an embodiment of the present application is shown; Figure 5 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown.
[0012] Figure 6 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0014] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0015] Social software such as instant messaging has the function of sending pictures, texts, voice and other messages. For example, after sending a message or photo to a group, all members of the group can view it. If sensitive messages are sent by mistake, it is easy to cause adverse effects, and the sender cannot remedy it in time. Some social software allows users to actively withdraw within a limited time, and it cannot be processed after the deadline.
[0016] Social software usually allows users to share information. However, with the rapid development of mobile Internet, mobile terminals have become the preferred way for people to communicate in daily life. Due to factors such as the small screen of the terminal itself and the large number of communication objects, it is easy to cause the mis-sending of files. For example, sending a work file to a hobby group by mistake can easily lead to the leakage of company confidential information; sending a sensitive picture to a group by mistake can also easily cause confusion in people's lives and cause adverse effects.
[0017] In related technologies, social software often cannot take effective remedial measures for the accidental sending of sensitive messages. Usually, there are only two ways to reduce the impact: entrusting the group owner to disband the group, or the sender to actively withdraw the message within a limited time (no more than 3 minutes). However, it is generally difficult for the sender to detect the accidental sending behavior. When it is discovered, it is too late. The active withdrawal time window is missed, which can easily cause sensitive information leakage and bring adverse effects.
[0018] The message sending method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0019] Figure 1 A message sending method provided by an exemplary embodiment of the present application is shown. The method 100 can be executed by an electronic device. In other words, the method can be executed by software or hardware installed in the electronic device. The electronic device can be a terminal device such as a mobile phone. Figure 1 As shown, the method mainly includes the following steps: S101: Acquire a user who sends a message to be sent, a recipient to whom the message to be sent is to be sent, and historical chat records between the user and the recipient.
[0020] In an embodiment of the present application, the user who sends the message to be sent, the object to which the message to be sent, and the historical chat records between the user and the object to be sent can be obtained to analyze the specific information of the message to be sent and further obtain the sensitivity of the message to be sent.
[0021] S102: Obtain a sensitivity score of the message to be sent based on the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent.
[0022] In an embodiment of the present application, the sensitivity score of the message to be sent can be obtained according to the familiarity between the user sending the message to be sent and the object to be sent, and the matching degree between the message to be sent and the historical chat record of the object to be sent. By analyzing whether the message content of the message to be sent contains sensitive information, the familiarity between the user and the object to be sent, and the matching degree between the message to be sent and the historical chat record of the object to be sent, a more accurate sensitivity score of the message to be sent can be obtained. For example, the user rarely sends messages in the group (the object to be sent), and suddenly sends a video file, or in the work group, sends entertainment photos that are obviously different from the recent chat record theme, then such messages are often more sensitive and have a higher sensitivity score. The sensitivity score of the message to be sent obtained by the message to be sent, the familiarity between the user and the object to be sent, and the matching degree between the message to be sent and the historical chat record of the object to be sent not only meets the actual needs, but is also more reliable and objective. By performing the next step based on the sensitivity score of the message to be sent, the adverse effects such as data leakage and the spread of sensitive information can be avoided. In practical applications, the message to be sent can be in various forms such as text information, audio files, pictures and videos, which are not specifically limited in the embodiments of the present application. In practical applications, the object to be sent can be a user or a group, which is not specifically limited in the embodiments of the present application.
[0023] In an optional implementation, before obtaining the sensitivity score of the message to be sent, the method further includes: The degree of compatibility between the message to be sent and the historical chat record of the object to be sent is determined according to the frequency of message sending between the user and the object to be sent and whether the sending content of the message to be sent is consistent with the historical chat record.
[0024] In an embodiment of the present application, the degree of fit between the message to be sent and the historical chat record of the object to be sent can be determined based on the frequency of message sending between the user and the object to be sent and whether the content of the message to be sent is consistent with the historical chat record. For example, user A rarely sends messages to interest group B on weekdays, and the messages sent are related to interests. If user A has a work video (message to be sent) that he wants to send to B on weekdays, then the degree of fit between the message and the historical chat record is relatively low. By analyzing the frequency of message sending and whether the content of the message to be sent is consistent with the historical chat record, a more accurate degree of fit between the message to be sent and the historical chat record of the object to be sent can be determined, which helps to obtain a more objective and accurate sensitivity score for the message to be sent.
[0025] In practical applications, the sensitivity score of the message to be sent can be predicted by a deep learning model or calculated by a mathematical formula. The embodiment of the present application adopts a message sensitivity prediction model to obtain the sensitivity score of the message to be sent.
[0026] In an optional implementation, the message sensitivity prediction model is trained in the following manner: (1) Obtain multiple labeled training samples from the training data set, wherein the labels include message sensitivity score labels; the message sensitivity prediction model used in the embodiment of the present application is a supervised learning model, which requires a certain number of labeled training samples during the training process. By using a supervised learning model, the output can be predicted based on previous experience, the calculation process is relatively simple, and the accuracy is relatively high. In practical applications, unsupervised learning models, semi-supervised learning models, etc. may also be used, which are not specifically limited in the embodiment of the present application.
[0027] (2) According to the training sample, characteristic data corresponding to the training sample is obtained; in the embodiment of the present application, the characteristic data corresponding to the training sample can be obtained by performing a series of processing on the training sample, and is used to be input into the subsequent model to obtain a message sensitivity prediction value.
[0028] (3) By inputting the feature data into the Wide&Deep model, the message sensitivity prediction value corresponding to the training sample is obtained; in the embodiment of the present application, the Wide&Deep model can be used to perform message sensitivity training prediction, and then the message sensitivity prediction value corresponding to the training sample is obtained. The Wide&Deep model combines the advantages of logistic regression and deep neural network, can quickly process and memorize a large number of historical behavior features, and has strong expressive power, and can take into account both memorization and generalization capabilities. Moreover, the structure of the model is not complicated, it is relatively easy to implement, and it is convenient for application.
[0029] (4) Determine the loss function by calculating the mean square error between the message sensitivity prediction value and the message sensitivity score label of the plurality of training samples; in the embodiment of the present application, the loss function can be determined based on the mean square error between the message sensitivity prediction value and the message sensitivity score label. , the formula is as follows:
[0030] in, represents the number of training samples, , Indicates the value of the message sensitivity score label (the actual message sensitivity score) and the message sensitivity prediction value. In practical applications, the root mean square error, mean absolute error, etc. can also be used to determine the loss function, which is not specifically limited in the embodiments of the present application. (5) Iteratively train the Wide&Deep model according to the loss function to obtain an updated Wide&Deep model; in the embodiment of the present application, the parameters of the Wide&Deep model can be adjusted based on the above loss function to obtain an updated Wide&Deep model. In practical applications, during iterative training, in order to prevent overfitting problems, dropout can be added; in order to speed up convergence, batch normalization can be introduced; different learning rates and batch sizes can also be tried to ensure the stability and convergence of training, which are not specifically limited in the embodiment of the present application.
[0031] (6) When the model iteration satisfies the preset convergence condition, the updated Wide & Deep model is used as the message sensitivity prediction model. In the embodiment of the present application, when the Wide & Deep model is iteratively trained until the convergence condition is met, the parameters of the updated Wide & Deep model can be saved to obtain the final message sensitivity prediction model. The convergence condition can be the set maximum number of iterations or other conditions, which are not specifically limited in the embodiment of the present application.
[0032] In an optional implementation, obtaining feature data corresponding to the training sample according to the training sample may include the following steps: Step 1, by establishing feature engineering for the training samples, the original features corresponding to the training samples are obtained; in the embodiment of the present application, feature engineering can be established for the training samples to obtain the original features corresponding to the training samples. Feature engineering is the process of converting raw data into features that better express the essence of the problem. Applying these features to the message sensitivity prediction model can improve the model prediction accuracy of invisible data (sensitivity score). In the embodiment of the present application, the original features include: message attribute features, user behavior features, and attribute features of the object to be sent. In actual applications, if the object to be sent is a group, the attribute features of the object to be sent may be group attribute features.
[0033] In the embodiment of the present application, each feature in the original feature includes several attribute factors, taking user behavior features, group attribute features and message attribute features as examples, as shown in Table 1: Table 1
[0034] Among them, semantic feature vector acquisition is one of the important tasks in natural language processing, computer vision, and large language models, which aims to extract corresponding feature vectors through technical means. After large-scale pre-training and reinforcement learning, the large language model can fully understand the semantics and grammatical structure of natural language, and can extract high-quality semantic feature vectors from multimodal corpora such as text, audio, pictures and videos. In practical applications, large language models such as the fourth-generation generative pre-trained transformer 4 (GPT4) model and the contrastive-language-image-pretraining (CLIP) model can be selected to obtain semantic feature vectors.
[0035] In the embodiment of the present application, whether a message is sensitive may be detected using a deep learning model, which is not specifically limited in the embodiment of the present application.
[0036] Step 2, by performing feature expansion on the original features corresponding to the training samples, the cross-features corresponding to the training samples are obtained; in an embodiment of the present application, the original features corresponding to the messages to be sent can be feature expanded, for example, each original feature can be nonlinearly transformed, and nonlinear transformations can be performed between the feature factors of user behavior features, group attribute features, and message attribute features, or between cross-feature attributes, so as to obtain cross-features, so as to capture high-order correlations between sparse features.
[0037] Step 3, by preprocessing and splicing the cross features corresponding to the training samples, the message sensitivity score labels corresponding to the training samples, and the data features corresponding to the training samples, the feature data corresponding to the training samples are obtained. In the embodiment of the present application, the cross features, the message sensitivity score labels, and the original features can be preprocessed and spliced to obtain feature data in a certain format, which can not only save space, but also ensure the consistency of feature data corresponding to multiple training samples, which is convenient for training.
[0038] In practical applications, the content of the message to be sent generally includes text information, audio files, pictures, videos and other forms. The sensitivity of the message to be sent is analyzed in the embodiment of the present application based on artificial intelligence and big data analysis technology. Traditional models are usually for a single mode, such as a single form of picture or text. In the embodiment of the present application, based on the large language model, multimodal data can be uniformly processed at the semantic level to obtain more accurate original features, and then obtain more comprehensive feature data, which can not only meet the actual needs of group chat interaction, but also improve the user experience.
[0039] In the above optional implementation, preprocessing the cross-features corresponding to the training samples, the message sensitivity score labels corresponding to the training samples, and the original features corresponding to the training samples may include: standardizing and normalizing the cross-features corresponding to the training samples, the message sensitivity score labels corresponding to the training samples, and the original features corresponding to the training samples, wherein the message type and the message sensitivity score labels in the original features are uniquely encoded.
[0040] In an embodiment of the present application, the preprocessing may be standardization and normalization. By performing standardization and normalization operations on cross-features, message sensitivity score labels, and original features, data of different scales, different units, and different ranges can be converted into a unified standard value, making the data easier to compare and analyze. In addition, category feature variables such as message types and message sensitivity score labels need to be one-hot encoded. One-hot encoding is used to solve the discrete value problem of categorical data, and to a certain extent, it also plays a role in expanding features. Its values are only 0 and 1, and different types are stored in vertical space. Taking the message sensitivity score label as an example, assuming that the score enumeration values are 1, 2,..., 10, then the corresponding one-hot encoding when the value is 3 is [0,0,1,0,0,0,0,0,0,0,0], and the process can be expressed as
[0041] in, is the one-hot encoding vector corresponding to the message sensitivity score label, Indicates the message sensitivity score value, and one_hot is the one-hot encoding function.
[0042] In the embodiment of the present application, through standardization and normalization operations, the convergence speed and accuracy of the message sensitivity prediction model can be improved, avoiding the situation where the message sensitivity prediction model converges slowly or does not converge due to different data scales.
[0043] In an optional implementation, the step of obtaining a message sensitivity prediction value corresponding to the training sample by inputting the feature data into a Wide&Deep model includes: Obtaining the message sensitivity prediction value in a one-hot encoding form by inputting the feature data into a fully connected Dense layer of the Wide & Deep model; The message sensitivity prediction value in integer form is obtained by performing an inverse transformation of the one-hot encoding on the message sensitivity prediction value in one-hot encoding form.
[0044] In the embodiment of the present application, the Wide & Deep model can be used for message sensitivity training prediction, which consists of an embedding layer, a fully connected (Dense) layer and a linear structure. All pre-processed feature factors are vectorized and concatenated into After obtaining the feature data, the feature factor information can be learned through the Dense layer deep neural network, and the corresponding weight parameters can be updated using back propagation. The process is as follows:
[0045]
[0046] in , and Represents the input feature data, weight matrix and bias, Represents the predicted value of message sensitivity of the Wide&Deep model, represents the activation function, represents the learning rate parameter, represents the loss function.
[0047] Since the message sensitivity prediction value output by the model is in the form of one-hot encoding, it needs to be inversely transformed into the message sensitivity prediction value in integer form, that is,
[0048] in, Indicates The one-hot encoding output of samples (the predicted message sensitivity in one-hot encoding form), is the corresponding predicted value of message sensitivity in integer form, It is the inverse process of the one_hot encoding function.
[0049] In an optional implementation, obtaining the sensitivity score of the message to be sent according to the familiarity between the user and the object to be sent and the degree of fit between the message to be sent and the historical chat records of the object to be sent includes: Obtaining target feature data according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent; The sensitivity score of the message to be sent is obtained by inputting the target feature data into a trained message sensitivity prediction model. In an embodiment of the present application, the target feature data corresponding to the message to be sent can be obtained based on the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent; then the target feature data is input into the trained message sensitivity prediction model to obtain the sensitivity score of the message to be sent. By processing the original data of the message to be sent (the familiarity between the user and the object to be sent and the degree of fit between the message to be sent and the historical chat records of the object to be sent), not only can the original data be converted into target feature data that can be used by the message sensitivity prediction model, but also the quality and accuracy of the data can be guaranteed in this process. Obtaining sensitivity scores through a trained model can not only improve efficiency, but also make the scores obtained more accurate and objective.
[0050] It should be noted that in the embodiment of the present application, the process of obtaining the target feature data corresponding to the message to be sent is roughly consistent with the process of obtaining feature data in the training message sensitivity prediction model, so as to convert the user's familiarity with the object to be sent and the degree of fit between the message to be sent and the historical chat records of the object to be sent into target feature data that can be used by the message sensitivity prediction model, thereby facilitating the acquisition of the sensitivity score of the message to be sent.
[0051] In an optional implementation, obtaining target feature data according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent may include the following steps: Step 1, by establishing feature engineering according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent, the original features corresponding to the message to be sent are obtained, wherein the original features include: message attribute features, sending object behavior features and object attribute features to be sent. When the object to be sent is a group, the object attribute features to be sent are group attribute features. In this embodiment of the present application, feature engineering can be established based on the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent, so as to obtain the original features corresponding to the message to be sent.
[0052] Step 2, by performing feature expansion on the original features corresponding to the message to be sent, the cross features corresponding to the message to be sent are obtained. In an embodiment of the present application, the original features corresponding to the message to be sent can be feature expanded, for example, nonlinear transformation can be performed between the original features to obtain cross features, so as to capture the high-order correlation between sparse features.
[0053] Step 3, obtaining target feature data by preprocessing and splicing the cross feature and the original feature. In an embodiment of the present application, target feature data corresponding to the message to be sent in a certain format can be obtained by preprocessing and splicing the cross feature and the original feature, which can not only save space but also ensure data consistency.
[0054] In the above optional implementation, the user behavior characteristics include: message sending frequency, time from now, and the most recently published content within a specific period of time; The group attribute features include: group name semantics, number of group members, frequency of group message sending, number of group members participating in the interaction, number of group user friends, proportion of users in the same city within the group, and semantics of historical messages within a specific time period of the group; The message attribute features include: message sending time, message type, message length, whether the message is sensitive, and message semantic features.
[0055] In the embodiment of the present application, the process of acquiring the original features corresponding to the message to be sent and the original features corresponding to the training samples is consistent, both are acquired by establishing feature engineering, and the feature factors included are consistent.
[0056] S103: Confirm whether to send the message to be sent to the object to be sent based on the sensitivity score.
[0057] In the embodiment of the present application, whether to send a message to a recipient can be confirmed based on the sensitivity score, which can not only avoid leakage of sensitive information, but also ensure normal communication.
[0058] In an optional implementation, the confirming whether to send the message to be sent to the object to be sent based on the sensitivity score may include: (1) If the sensitivity score of the message to be sent is less than or equal to the threshold, the message to be sent is sent to the object to be sent; in the embodiment of the present application, for the message to be sent whose sensitivity score is not higher than (less than or equal to) the threshold, it is not necessary to consult the object to be sent, and the message to be sent can be directly sent to the object to be sent (such as a group). This can improve the efficiency of communication and avoid wasting resources.
[0059] (2) When the sensitivity score of the message to be sent is greater than the threshold, a prompt is given to confirm whether to send the message to be sent; in the embodiment of the present application, for a message to be sent with a sensitivity score greater than the threshold, a second sending confirmation opinion can be sought from the sending user, indicating that the message to be sent contains sensitive information, so as to avoid the sender from accidentally sending a sensitive message and causing the leakage of the sensitive message.
[0060] In response to the received confirmation instruction, the message to be sent is sent to the object to be sent. In an embodiment of the present application, if the sending object clicks to confirm, the message to be sent is sent normally to the object to be sent, which helps to ensure normal communication. In an optional implementation, after the prompt confirms whether to send the message to be sent, the method also includes: In response to the received non-sending instruction, the to-be-sent message is not sent.
[0061] In the embodiment of the present application, if the recipient does not click to confirm, or does not reply within a certain period of time, it can be regarded as not sent, and the message to be sent does not need to be sent, which can avoid accidentally sending sensitive messages. In an optional implementation, after obtaining the sensitivity score of the message to be sent, the method further includes: When the sensitivity score of the message to be sent is greater than the threshold, encrypting the message to be sent to obtain an encrypted message, wherein the encrypted message carries an encryption identifier; The encrypted message is sent to the object to be sent.
[0062] In an embodiment of the present application, for messages to be sent with a sensitivity score higher than a threshold, they can be sent to the recipient in encrypted form, and an encryption prompt can be given for the message (an encryption mark is added). After the recipient clicks on the message, the recipient can be notified to perform a manual decryption operation, after which the recipient can view the content details, otherwise they cannot view them. For example, a user sends a message to a group, and after calculation, it is confirmed that it is a sensitive message (a message with a sensitivity score greater than a threshold). The message can be encrypted and sent to the group, and then after the group members receive the encrypted message, the user is notified to decrypt it, after which the group members can view the specific content of the message. The specific encryption and decryption process is not specifically limited in the embodiment of the present application.
[0063] In an embodiment of the present application, by performing secondary confirmation or content encryption on the identified sensitive messages, the probability of mistakenly sending sensitive messages can be effectively reduced, thereby reducing the scope of impact of the mistaken sending behavior and avoiding adverse effects such as data leakage.
[0064] In an optional implementation, when the sensitivity score of the message to be sent is greater than a threshold, the processing of the message to be sent can be stored. In an embodiment of the present application, if the sensitivity score of the message to be sent is greater than a threshold, the processing of the message to be sent can be stored for easy traceability. In actual applications, in order to facilitate users to check the processing of sensitive messages, the processing of messages to be sent with a sensitivity score higher than the threshold can be stored on the chain with the help of blockchain distributed ledgers and non-tamperable technical advantages, so that the processing of highly sensitive messages can be checked, controlled, and traceable, increasing the security and credibility of business process data. In specific implementations, other storage methods can also be used, and the embodiments of the present application do not make specific limitations.
[0065] In the embodiment of the present application, the user who sends the message to be sent, the recipient of the message to be sent, and the historical chat records between the user and the recipient to be sent can be obtained; then, based on the familiarity between the user and the recipient to be sent, and the matching degree between the message to be sent and the historical chat records of the recipient to be sent, the sensitivity score of the message to be sent can be obtained; finally, based on the sensitivity score, it is determined whether to send the message to the recipient to be sent. This can not only avoid the accidental sending of sensitive messages, but also improve user privacy security and user experience.
[0066] Figure 2 Another message sending method provided by an exemplary embodiment of the present application is shown. Figure 1 A specific implementation of the message sending method shown in FIG. In this specific implementation, group-sending sensitive messages are mainly processed. Figure 2 As shown, the method mainly includes the following steps: S201: Determine the object attributes of the message to be sent. If the target is an individual, no processing is required and it can be sent directly, and S205 is executed; if the target is a group, S202 is executed. First, the object attributes of the message to be sent by the user are detected to determine whether the message is sent to an individual or a group. If the user sends the message to an individual, even if a sensitive message is sent by mistake, its dissemination range can be controlled, and the information leakage is easy to trace and determine the responsibility. Therefore, in such scenarios, the protection requirements for sensitive information are reduced and it can be sent directly; if the user sends the message to a group, due to the large number of people and the wide range of dissemination, once it is sent by mistake, the adverse impact is large, and it needs to be processed according to the privacy protection needs.
[0067] S202: Determine the user's privacy protection requirements. In actual applications, in order to improve the user's perceived experience, the user is allowed to choose whether to perform privacy protection detection. If protection detection is not required, the message does not require additional processing and can be sent directly to the group. Otherwise, a sensitivity score test is required for the message to be sent. If the user has not set up privacy protection detection, no processing is required and the message can be sent directly, and S205 is executed; if privacy protection detection has been set, enter S203 for detection.
[0068] S203: Predict the sensitivity score of the message to be sent based on the message sensitivity evaluation model. The sensitivity score of the message to be sent can be obtained. If the sensitivity score is higher than the threshold, S204 is executed; if the sensitivity score is higher than the threshold, S205 is executed.
[0069] S204: Send a second confirmation to ask for user's opinion, or send it in encrypted form. By sending a second confirmation prompt or encrypting the message with high sensitivity, the impact of the mis-sending of sensitive messages can be effectively reduced.
[0070] S205: No processing is required, and the messages are sent directly. The messages to be sent that do not meet the conditions can be sent directly, which can improve communication efficiency.
[0071] In actual applications, for users who have set up privacy-sensitive protection detection, when the sensitivity score of the message to be sent is higher than the threshold, the user will be prompted to confirm the message twice, or send it to the group in encrypted form, and encrypt the message. By performing operations such as secondary confirmation and content encryption on identified sensitive messages, the risk of sensitive messages being mistakenly sent to the group can be effectively reduced, thereby reducing the scope of the impact of mistaken messages.
[0072] Figure 3 A flow chart of a method for training a message sensitivity prediction model provided by an exemplary embodiment of the present application is shown. Figure 3 As shown, the method mainly includes the following steps: S301: Obtain labeled training samples from a training data set.
[0073] S302: Establish feature engineering based on training samples. Original features can be obtained through feature engineering, which may include user behavior features, group attribute features, and message attribute features, and each feature includes several attribute factors.
[0074] S303: Feature expansion, adding cross features. By performing feature expansion on the original features, cross features can be obtained to capture high-order correlations between sparse features.
[0075] S304: Preprocessing of feature factors and message sensitivity score labels, and input into initial deep learning model. By preprocessing the original features, cross features and message sensitivity score labels, they can be input into the Wide & Deep model used in the embodiment of the present application for training.
[0076] S305: Determine a loss function according to a mean square error between the message sensitivity prediction value and the message sensitivity score label.
[0077] S306: Iteratively train the deep learning model based on the loss function.
[0078] S307: Model iteration meets convergence conditions. If the model meets the convergence conditions, S308 is performed; if the model does not meet the convergence conditions, S301 can be performed.
[0079] S308: Obtaining a message sensitivity prediction model. When the model iteration meets the convergence condition, a message sensitivity prediction model is obtained, which can be used to predict the sensitivity score of the message to be sent.
[0080] The message sending method provided in the embodiment of the present application can be executed by a message sending device. In the embodiment of the present application, the message sending device provided in the embodiment of the present application is described by taking the message sending method executed by the message sending device as an example.
[0081] Figure 4 A schematic diagram of the structure of a message sending device provided by an exemplary embodiment of the present application is shown. The message sending device can implement the following Figure 1 In the embodiment shown in FIG. 1 , all or part of the contents, the message sending device includes: a first acquisition module 401 , a second acquisition module 402 and a sending module 403 .
[0082] In the embodiment of the present application, the first acquisition module 401 is used to acquire the user who sends the message to be sent, the object to which the message to be sent is to be sent, and the historical chat records between the user and the object to be sent; the second acquisition module 402 is used to acquire the sensitivity score of the message to be sent according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent; the sending module 403 is used to confirm whether to send the message to be sent to the object to be sent based on the sensitivity score. In an optional implementation, the second acquisition module 402 is also used to determine the degree of fit between the message to be sent and the historical chat records of the object to be sent according to the frequency of message sending between the user and the object to be sent, and whether the sending content of the message to be sent is consistent with the historical chat records.
[0083] In an optional implementation, the second acquisition module 402 is used to obtain the sensitivity score of the message to be sent according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat record of the object to be sent, specifically for: Obtaining target feature data according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent; The sensitivity score of the message to be sent is obtained by inputting the target feature data into a trained message sensitivity prediction model.
[0084] In an optional implementation, the second acquisition module 402, when used to obtain the target feature data according to the familiarity between the user and the to-be-sent object, and the degree of fit and match between the to-be-sent message and the historical chat records of the to-be-sent object, is specifically used to: By establishing feature engineering according to the familiarity between the user and the to-be-sent object, and the degree of fit between the to-be-sent message and the historical chat records of the to-be-sent object, the original features corresponding to the to-be-sent message are obtained, wherein the original features include: message attribute features, sending object behavior features, and to-be-sent object attribute features. When the to-be-sent object is a group, the to-be-sent object attribute features are group attribute features; By performing feature expansion on the original features corresponding to the message to be sent, a cross feature corresponding to the message to be sent is obtained; The target feature data is obtained by preprocessing and splicing the cross feature and the original feature.
[0085] In an optional implementation, the group attribute features include: semantics of the group name, number of group members, frequency of group message sending, number of members participating in group interaction, number of group user friends, ratio of users in the same city within the group, and semantics of historical messages within a specific time period of the group; The message attribute features include: message sending time, message type, message length, whether the message is sensitive, and message semantic features.
[0086] In an optional implementation, the message sensitivity prediction model is trained in the following manner: Acquire a plurality of labeled training samples from a training data set, wherein the labels include message sensitivity score labels; According to the training sample, acquiring feature data corresponding to the training sample; By inputting the feature data into the Wide&Deep model, a message sensitivity prediction value corresponding to the training sample is obtained; Determine a loss function by calculating the mean square error between the message sensitivity prediction values and the message sensitivity score labels of the plurality of training samples; Iteratively training the Wide&Deep model according to the loss function to obtain an updated Wide&Deep model; When the model iteration meets the preset convergence condition, the updated Wide&Deep model is used as the message sensitivity prediction model.
[0087] In an optional implementation, the step of obtaining a message sensitivity prediction value corresponding to the training sample by inputting the feature data into a Wide&Deep model includes: Obtaining the message sensitivity prediction value in a one-hot encoding form by inputting the feature data into a fully connected Dense layer of the Wide & Deep model; The message sensitivity prediction value in integer form is obtained by performing an inverse transformation of the one-hot encoding on the message sensitivity prediction value in one-hot encoding form.
[0088] In an optional implementation, when the sending module 403 is used to confirm whether to send the message to be sent to the object to be sent based on the sensitivity score, it is specifically used to: When the sensitivity score of the message to be sent is less than or equal to a threshold, sending the message to be sent to the object to be sent; When the sensitivity score of the message to be sent is greater than the threshold, prompting to confirm whether to send the message to be sent; In response to the received confirmation instruction, the message to be sent is sent to the object to be sent.
[0089] In an optional implementation, when the sending module 403 is used to confirm whether to send the message to be sent to the object to be sent based on the sensitivity score, it is also used to: When the sensitivity score of the message to be sent is greater than the threshold, encrypting the message to be sent to obtain an encrypted message, wherein the encrypted message carries an encryption identifier; The encrypted message is sent to the object to be sent.
[0090] In an optional implementation, the sending module 403 is further configured to not send the message to be sent in response to a received non-sending instruction.
[0091] The message sending device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0092] The message sending device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0093] The message sending device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.
[0094] Alternatively, if Figure 5As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501 and a memory 502, wherein the memory 502 stores programs or instructions that can be executed on the processor 501, and when the program or instructions are executed by the processor 501, the various steps of the method embodiment of the above-mentioned message sending method are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0095] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0096] Figure 6 FIG. 6 is a block diagram of another electronic device 600 according to an exemplary embodiment of the present application. The electronic device 600 may be implemented as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a TV, etc. The electronic device 600 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, etc.
[0097] Typically, the electronic device 600 includes a processor 601 and a memory 602 .
[0098] The processor 601 may include one or more processing cores, such as a 4-core processor, a 10-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0099] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction, which is used to be executed by the processor 601 to implement all or part of the steps in the message sending method shown in the present application.
[0100] In some embodiments, the electronic device 600 may further optionally include: a peripheral device interface 603 and at least one peripheral device. The processor 601, the memory 602 and the peripheral device interface 603 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 603 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607 and a power supply 608.
[0101] In some embodiments, the electronic device 600 further includes one or more sensors 609 , including but not limited to: an acceleration sensor 610 , a gyroscope sensor 611 , a pressure sensor 612 , an optical sensor 613 , and a proximity sensor 614 .
[0102] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the electronic device 600, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0103] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the method embodiment of the above-mentioned message sending method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0104] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0105] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the method embodiment of the above-mentioned message sending method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0106] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0107] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the method embodiment of the above-mentioned message sending method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0108] It should be noted that, in this article, the term "includes", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples. Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application can essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD-ROM), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.
[0109] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A message sending method, characterized in that: include: Obtain the user who sends the message to be sent, the object to which the message to be sent is to be sent, and the historical chat records between the user and the object to be sent; Obtaining a sensitivity score of the message to be sent according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent; Determine whether to send the message to be sent to the object to be sent based on the sensitivity score.
2. The method according to claim 1, characterized in that Before obtaining the sensitivity score of the message to be sent, the method further includes: The degree of compatibility between the message to be sent and the historical chat record of the object to be sent is determined according to the frequency of message sending between the user and the object to be sent and whether the sending content of the message to be sent is consistent with the historical chat record.
3. The method according to any one of claims 1 or 2, characterized in that: The obtaining of the sensitivity score of the message to be sent according to the familiarity between the user and the object to be sent and the matching degree between the message to be sent and the historical chat records of the object to be sent includes: Obtaining target feature data according to the familiarity between the user and the object to be sent, and the degree of fit between the message to be sent and the historical chat records of the object to be sent; The sensitivity score of the message to be sent is obtained by inputting the target feature data into a trained message sensitivity prediction model.
4. The method according to claim 3, characterized in that The obtaining of target feature data according to the familiarity between the user and the object to be sent and the matching degree between the message to be sent and the historical chat records of the object to be sent includes: By establishing feature engineering according to the familiarity between the user and the to-be-sent object, and the degree of fit between the to-be-sent message and the historical chat records of the to-be-sent object, the original features corresponding to the to-be-sent message are obtained, wherein the original features include: message attribute features, sending object behavior features, and to-be-sent object attribute features. When the to-be-sent object is a group, the to-be-sent object attribute features are group attribute features; By performing feature expansion on the original features corresponding to the message to be sent, a cross feature corresponding to the message to be sent is obtained; The target feature data is obtained by preprocessing and splicing the cross feature and the original feature.
5. The method according to claim 4, characterized in that The user behavior characteristics include: message sending frequency, time from now, and the most recently published content within a specific period of time; The group attribute features include: group name semantics, number of group members, frequency of group message sending, number of group members participating in the interaction, number of group user friends, proportion of users in the same city within the group, and semantics of historical messages within a specific time period of the group; The message attribute features include: message sending time, message type, message length, whether the message is sensitive, and message semantic features.
6. The method according to claim 3, characterized in that The message sensitivity prediction model is trained in the following way: Acquire a plurality of labeled training samples from a training data set, wherein the labels include message sensitivity score labels; According to the training sample, acquiring feature data corresponding to the training sample; By inputting the feature data into the Wide&Deep model, a message sensitivity prediction value corresponding to the training sample is obtained; Determine a loss function by calculating the mean square error between the message sensitivity prediction values and the message sensitivity score labels of the plurality of training samples; Iteratively training the Wide&Deep model according to the loss function to obtain an updated Wide&Deep model; When the model iteration meets the preset convergence condition, the updated Wide&Deep model is used as the message sensitivity prediction model.
7. The method according to claim 6, characterized in that The step of inputting the feature data into the Wide&Deep model to obtain a message sensitivity prediction value corresponding to the training sample includes: Obtaining the message sensitivity prediction value in a one-hot encoding form by inputting the feature data into a fully connected Dense layer of the Wide & Deep model; The message sensitivity prediction value in integer form is obtained by performing an inverse transformation of the one-hot encoding on the message sensitivity prediction value in one-hot encoding form.
8. The method according to claim 1, characterized in that The confirming whether to send the message to be sent to the object to be sent based on the sensitivity score includes: When the sensitivity score of the message to be sent is less than or equal to a threshold, sending the message to be sent to the object to be sent; When the sensitivity score of the message to be sent is greater than the threshold, prompting to confirm whether to send the message to be sent; In response to the received confirmation instruction, the message to be sent is sent to the object to be sent.
9. The method according to claim 8, characterized in that The step of confirming whether to send the message to be sent to the object to be sent based on the sensitivity score further includes: When the sensitivity score of the message to be sent is greater than the threshold, encrypting the message to be sent to obtain an encrypted message, wherein the encrypted message carries an encryption identifier; The encrypted message is sent to the object to be sent.
10. The method according to claim 8, characterized in that After the prompt confirms whether to send the message to be sent, the method further includes: In response to the received non-sending instruction, the to-be-sent message is not sent.
Citation Information
Patent Citations
Method and system for sending messages
CN109617795A
Chat group creation method and device, computer device and storage medium
CN110401545A
Instant messaging message processing method and device, equipment and storage medium
CN110730120A
Multi-target recommendation method and device, computing equipment and medium
CN112699305A
Information determination method, device and equipment and computer readable storage medium
CN114780853A