Moments information classification method and system
By extracting and analyzing keywords in the text of the circle of friends, classifying them in combination with pictures, and conducting sentiment analysis when necessary to correct the classification results, the classification error problem caused by relying on labels or keywords in the prior art is solved, and the accuracy of information classification is improved.
Patent Information
- Application Number
- CN202510022194.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-11
AI Technical Summary
The existing information classification technology in Moments relies too much on information labels or preset keywords set by users, resulting in errors in the classification results and cannot be corrected.
By obtaining the text of the Moments circle, extracting keywords and analyzing them, and classifying the information in combination with the pictures of the Moments circle. If the information is in a travel or a work category, conduct sentiment analysis to correct for the classification results.
It improves the accuracy and effectiveness of information classification in circle of friends, reduces errors caused by artificially setting preset keywords, and realizes correction of classification results.
Smart Images

Figure CN119807852A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of friend circle information classification, and specifically to a friend circle information classification method and system. Background Art
[0002] The technology of classifying information in Moments refers to the technology of automatically classifying and organizing Moments information on social networking platforms by using technologies such as artificial intelligence and natural language processing. By analyzing the text, pictures, and videos posted by users, the system can classify information, such as by subject, emotional color, and content type, to help users browse and manage Moments information more conveniently. This technology can improve user experience, reduce information overload, and also help the platform to accurately recommend content and advertisements.
[0003] Existing circle of friends information classification technology usually intelligently classifies circle of friends information based on the content or image of circle of friends information, but errors are inevitable in the classification process, resulting in errors in the classification results, and the existing circle of friends information classification technology is difficult to repair or correct such errors, and the existing circle of friends information classification technology is too dependent on information tags set by users themselves, and is usually classified based on information tags, while circle of friends information without information tags is not classified, or is uniformly classified into a certain category, so that the classification results are extremely inaccurate. At the same time, the existing circle of friends information classification technology is too dependent on preset keywords set by humans. There are a large number of keywords in different categories, and it is easy to lose a lot of data through manual setting. For example, in the patent application with publication number CN106682008A, a circle of friends information classification method and device are disclosed. The scheme is to judge the classification of circle of friends information by comparing text information with preset keywords. Classification by preset keywords set by humans can easily lead to errors in the classification results, and the classification results are not corrected. The existing circle of friends information classification technology also has the problem of being too dependent on information tags or preset keywords set by users themselves, resulting in errors in the classification of circle of friends information and being unable to be corrected. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent, by obtaining a text in the circle of friends, extracting keywords from the text in the circle of friends, obtaining text keywords, analyzing the text keywords, and combining the pictures in the circle of friends to divide the information in the circle of friends into travel, food, daily life and work categories; establishing a text classification analysis model, analyzing the text keywords, obtaining the information features of the text in the circle of friends, obtaining pictures in the circle of friends, performing image recognition on the pictures in the circle of friends, extracting image tags from the images in the circle of friends, and analyzing the image features of the images in the circle of friends through the image tags, classifying the information in the circle of friends based on the information features and the image features, if the information in the circle of friends is in the travel category or the work category, performing sentiment analysis on the text keywords of the information in the circle of friends, obtaining the sentiment direction of the information in the circle of friends, and finally correcting the classification of the information in the circle of friends based on the sentiment direction of the information in the circle of friends, so as to solve the problem that the existing classification technology of the information in the circle of friends still relies too much on the information tags or preset keywords set by the user, resulting in the classification of the information in the circle of friends being prone to errors and unable to be corrected.
[0005] To achieve the above objectives, in the first aspect, the present application provides a method for classifying friend circle information, comprising the following steps:
[0006] Get the text of the circle of friends, extract keywords from the text of the circle of friends, and get the text keywords;
[0007] Analyze the keywords in the text and classify the Moments information into travel, food, daily life and work categories based on the Moments pictures.
[0008] If the information in the Moments is about travel or work, sentiment analysis is performed on the text keywords of the Moments information to obtain the sentiment direction of the information;
[0009] Correct the classification of Moments information based on the sentiment direction of the Moments information.
[0010] Further, obtaining the text of the circle of friends, extracting keywords from the text of the circle of friends, and obtaining the text keywords include the following sub-steps:
[0011] When it is detected that the user uploads Moments information, the Moments text is obtained;
[0012] Intelligent word segmentation is performed on the text in the circle of friends through the intelligent word segmentation model to obtain text segmentation;
[0013] Search the stop word library to check whether the text segmentation word exists in the stop word library. If it exists, output an invalid segmentation signal; if not, output a valid segmentation signal;
[0014] If an invalid word segmentation signal is output, the corresponding text word segmentation is removed, and the remaining text word segmentations that output valid word segmentation signals are marked as text keywords.
[0015] Furthermore, analyzing the text keywords and combining the Moments pictures to classify the Moments information into travel, food, daily life, and work categories includes the following sub-steps:
[0016] Establish a text classification analysis model, analyze text keywords, and obtain the information characteristics of the circle of friends text;
[0017] Get the Moments pictures, perform image recognition on the Moments pictures, extract the image tags in the Moments pictures, and analyze the image features of the Moments pictures through the image tags;
[0018] Classify circle of friends information based on information features and image features.
[0019] Furthermore, a text classification analysis model is established to analyze the text keywords and obtain the information features of the circle of friends text, including the following sub-steps:
[0020] Establish a text classification analysis model to obtain samples of Moments with travel tags, food tags, daily tags, and work tags in big data;
[0021] The circle of friends samples with the travel tag are named travel samples, the circle of friends samples with the food tag are named food samples, the circle of friends samples with the daily tag are named daily samples, and the circle of friends samples with the work tag are named work samples;
[0022] Extract the text keywords from travel samples, food samples, daily samples and work samples respectively, and name them travel keywords, food keywords, daily keywords and work keywords in sequence;
[0023] The travel word library is composed of all travel keywords, the food word library is composed of all food keywords, the daily word library is composed of all daily keywords, and the work word library is composed of all work keywords;
[0024] Get the text keywords obtained by intelligent word segmentation, search the vocabulary to which the text keywords belong, if the text keywords belong to the travel vocabulary, output the travel word signal; if the text keywords belong to the food vocabulary, output the food word signal; if the text keywords belong to the daily vocabulary, output the daily word signal; if the text keywords belong to the work vocabulary, output the work word signal; if the text keywords do not belong to any vocabulary, output the no-attribute signal;
[0025] If a non-attribute signal is output, the corresponding text keyword is marked as a non-attribute segmentation word. If all text keywords are non-attribute segmentations, the information feature of the circle of friends information is non-featured.
[0026] Analyze all the extracted text keywords, and count the number of output travel word signals, food word signals, daily word signals, and work word signals, respectively, and name them as travel word count, food word count, daily word count, and work word count;
[0027] Find the maximum value among the number of travel words, the number of food words, the number of daily words, and the number of work words, and name it the maximum number of classification words. If the maximum number of classification words is the number of travel words, the information feature of the circle of friends information is travel information; if the maximum number of classification words is the number of food words, the information feature of the circle of friends information is food information; if the maximum number of classification words is the number of daily words, the information feature of the circle of friends information is daily information; if the maximum number of classification words is the number of work words, the information feature of the circle of friends information is work information;
[0028] If the information feature is travel information, the non-attribute participles are included in the travel vocabulary; if the information feature is food information, the non-attribute participles are included in the food vocabulary; if the information feature is daily information, the non-attribute participles are included in the daily vocabulary; if the information feature is work information, the non-attribute participles are included in the work vocabulary.
[0029] Further, obtaining the Moments pictures, performing image recognition on the Moments pictures, extracting image tags from the Moments pictures, and analyzing image features of the Moments pictures through the image tags include the following sub-steps:
[0030] If the information feature is no feature, the image in the circle of friends is identified by image label recognition technology to extract the image label in the circle of friends image;
[0031] Find the word library to which the image label belongs. If the image label belongs to the travel word library, output the travel label signal; if the image label belongs to the food word library, output the food label signal; if the image label belongs to the daily word library, output the daily label signal; if the image label belongs to the work word library, output the work label signal; if the image label does not belong to any word library, output the label no attribute signal;
[0032] Count and output the number of travel tag signals, food tag signals, daily tag signals, and work tag signals, and find the maximum value among them, which is named the maximum tag number;
[0033] If the maximum number of tags is the number of travel tag signals, the image features of the Moments images are marked as travel images; if the maximum number of tags is the number of food tag signals, the image features of the Moments images are marked as food images; if the maximum number of tags is the number of daily tag signals, the image features of the Moments images are marked as daily images; if the maximum number of tags is the number of work tag signals, the image features of the Moments images are marked as work images.
[0034] Furthermore, classifying the circle of friends information based on information features and image features includes the following sub-steps:
[0035] Get the information features of the circle of friends information. If the information features are travel information, the circle of friends information is classified into the travel category; if the information features are food information, the circle of friends information is classified into the food category; if the information features are daily information, the circle of friends information is classified into the daily category; if the information features are work information, the circle of friends information is classified into the work category;
[0036] If the information feature is no feature, the image feature of the circle of friends image is obtained. If the image feature is a travel image, the circle of friends information is classified into the travel category; if the image feature is a food image, the circle of friends information is classified into the food category; if the image feature is a daily image, the circle of friends information is classified into the daily category; if the image feature is a work image, the circle of friends information is classified into the work category.
[0037] Furthermore, if the circle of friends information is about travel or work, sentiment analysis is performed on the text keywords of the circle of friends information to obtain the sentiment direction of the circle of friends information, including the following sub-steps:
[0038] If the circle of friends information is about travel or work, then obtain the text keywords extracted from the circle of friends information and mark them as sentiment segmentation words;
[0039] Positive emotions such as happiness, emotion, thinking and humor are collectively referred to as positive emotions; negative emotions such as sadness, loss, anger and dissatisfaction are collectively referred to as negative emotions;
[0040] The sentiment segmentation is identified through the text semantic recognition model to determine whether the sentiment segmentation belongs to positive emotion or negative emotion. If the sentiment segmentation belongs to positive emotion, a positive sentiment signal is output; if the sentiment segmentation belongs to negative emotion, a negative sentiment signal is output; otherwise, no sentiment signal is output;
[0041] Identify all sentiment segmentations of the Moments information. If all of them output no sentiment signals, set the sentiment direction of the Moments information to undirected sentiment.
[0042] If there are positive emotion signals or negative emotion signals, count the number of positive emotion signals and name it as positive number, and count the number of negative emotion signals and name it as negative number;
[0043] If the number of positive comments is greater than or equal to the number of negative comments, the sentiment direction of the Moments information is set to positive sentiment; if the number of positive comments is less than the number of negative comments, the sentiment direction of the Moments information is set to negative sentiment;
[0044] If an undirected sentiment signal is output, further sentiment analysis will be performed on the circle of friends information.
[0045] Furthermore, further sentiment analysis of the circle of friends information includes the following sub-steps:
[0046] Based on punctuation marks and spaces, the Moments text is divided into multiple sentences. The sentences are numbered in the order of the sentences, and the symbol S is used to identify the sentences. n It represents, where n is a positive integer and n is the sequence number of S;
[0047] The text sentence is identified through the text semantic recognition model to determine whether the text sentence belongs to positive emotion or negative emotion. If the text sentence belongs to positive emotion, a positive signal of the text is output; if the text sentence belongs to negative emotion, a negative signal of the text is output; otherwise, a non-directional signal of the text is output;
[0048] For all S n Analyze and count the output signals. If they are all text undirected signals, the emotional direction of the Moments information is set to no emotion; if they are not text negative signals, the emotional direction of the Moments information is set to positive emotion; if they are not text positive signals, the emotional direction of the Moments information is set to negative emotion; if there are both text positive signals and text negative signals, the emotional proportion determination signal is output;
[0049] If the sentiment ratio determination signal is output, the number of positive text signals and negative text signals are counted, which are named as the number of positive texts and the number of negative texts respectively. If the number of positive texts is less than the number of negative texts, the sentiment direction of the circle of friends information is set to negative sentiment; if the number of positive texts is greater than the number of negative texts, the sentiment direction of the circle of friends information is set to positive sentiment; if the number of positive texts is equal to the number of negative texts, the sentence sequence number determination signal is output;
[0050] If the output statement number determines the signal, then calculate max(n) / 2, where max(n) is the maximum value of n. The result is named the split value. If the split value is not an integer, the split value is further rounded to an integer, and S1 to S max(n) / 2 The integration is named as the first half of the text, and S max(n) / 2 To S max(n) The integration is named the second half of the text;
[0051] By manually judging the real emotion of the circle of friends information, the real emotion includes positive emotion and negative emotion. Based on the number of positive text signals and negative text signals in the first half of the text, the first half of the text is judged to be positive or negative emotion, which is named the first half emotion. Based on the number of positive text signals and negative text signals in the second half of the text, the second half of the text is judged to be positive or negative emotion, which is named the second half emotion. If the number of positive text signals and negative text signals in the first half of the text is the same and the number of positive text signals and negative text signals in the second half of the text is the same, the emotional direction of the circle of friends information is set to no emotion.
[0052] Find out which of the first half emotion and the second half emotion is the same as the real emotion. If the first half emotion is the same as the real emotion, output the first half real signal; if the second half emotion is the same as the real emotion, output the second half real signal. Count the number of the first half real signal and the second half real signal, and name them as the first half and the second half respectively. When the sum of the first half and the second half reaches the first sample threshold, no manual judgment is required.
[0053] Compare the first half with the second half. If the first half is less than or equal to the second half, output the second half judgment signal; if the first half is greater than the second half, output the first half judgment signal; if the first half judgment signal is output, use the first half emotion as the emotion direction of the circle of friends information; if the second half judgment signal is output, use the second half emotion as the emotion direction of the circle of friends information.
[0054] Furthermore, correcting the classification of the circle of friends information based on the sentiment direction of the circle of friends information includes the following sub-steps:
[0055] If the sentiment direction is positive or no sentiment, the Moments information will be kept in the travel or work category;
[0056] If the sentiment direction is negative, the category of the Moments information will be changed to daily category.
[0057] In the second aspect, the present application provides a circle of friends information classification system, including a keyword extraction module, a classification division module, a sentiment analysis module and a classification correction module; the keyword extraction module, the sentiment analysis module and the classification correction module are respectively connected to the classification division module data;
[0058] The keyword extraction module is used to obtain the text of the circle of friends, extract keywords from the text of the circle of friends, and obtain text keywords;
[0059] The classification module is used to analyze text keywords and classify the Moments information into travel, food, daily life and work categories in combination with Moments pictures;
[0060] The sentiment analysis module is used to perform sentiment analysis on the text keywords of the circle of friends information if the circle of friends information is about travel or work, so as to obtain the sentiment direction of the circle of friends information;
[0061] The classification correction module is used to correct the classification of the circle of friends information based on the emotional direction of the circle of friends information.
[0062] The beneficial effects of the present invention are as follows: the present invention obtains text from the circle of friends, extracts keywords from the text from the circle of friends, obtains text keywords, establishes a text classification analysis model, analyzes the text keywords, obtains information features of the text from the circle of friends, obtains pictures from the circle of friends, performs image recognition on the pictures from the circle of friends, extracts image tags from the pictures from the circle of friends, and analyzes image features of the pictures from the circle of friends through image tags, and classifies the information from the circle of friends based on information features and image features. The advantage of the present invention is that, unlike artificially set preset keywords, the present invention can classify keywords more effectively by integrating keywords of the circle of friends information under various historical categories to form a vocabulary. Although the circle of friends information under various historical categories is also manually determined, the probability of error is smaller than that of setting preset keywords, and the vocabulary can be automatically expanded, thereby improving the accuracy and effectiveness of the classification of the circle of friends information.
[0063] The present invention performs sentiment analysis on text keywords of travel-related and work-related circle of friends information to obtain the sentiment direction of the circle of friends information, and finally corrects the classification of the circle of friends information based on the sentiment direction of the circle of friends information. The advantage is that travel-related and work-related circle of friends information are usually positive or emotionless. Traveling is fun, not spreading negative emotions. Work is usually a company requirement, and managers will not allow content with negative emotions. Therefore, based on sentiment analysis, incorrectly classified circle of friends information can be eliminated and corrected, thereby improving the accuracy and rationality of the classification of circle of friends information. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a functional block diagram of the system of the present invention;
[0065] Figure 2 A flowchart of the steps of analyzing information features of the present invention;
[0066] Figure 3 A flowchart of the steps of the method of the present invention
[0067] Figure 4 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] Example 1, please refer to Figure 1 As shown, the present application provides a circle of friends information classification system, including a keyword extraction module, a classification division module, a sentiment analysis module and a classification correction module; the keyword extraction module, the sentiment analysis module and the classification correction module are respectively connected with the classification division module data;
[0070] The keyword extraction module is used to obtain the text of the circle of friends, extract keywords from the text of the circle of friends, and obtain the text keywords;
[0071] The keyword extraction module is configured with a keyword extraction strategy, which includes:
[0072] When it is detected that the user uploads Moments information, the Moments text is obtained;
[0073] Intelligent word segmentation is performed on the text in the circle of friends through the intelligent word segmentation model to obtain text segmentation;
[0074] Search the stop word library to check whether the text segmentation word exists in the stop word library. If it exists, output an invalid segmentation signal; if not, output a valid segmentation signal;
[0075] If an invalid word segmentation signal is output, the corresponding text word segmentation is removed, and the remaining text word segmentations that output valid word segmentation signals are marked as text keywords;
[0076] In actual applications, the text obtained from the circle of friends is "Boston lobster is just so-so, but gentian grouper is delicious". The intelligent word segmentation model uses Jieba word segmentation technology, and the text segmentation results include "Boston", "lobster", "also", "just", "like", "right", "but", "gentian", "grouper", "quite" and "delicious". The stop word library uses the existing Chinese stop word list. Through searching, it is found that the six text segmentations "also", "just", "like", "right", "but" and "quite" exist in the stop word library, and an invalid segmentation signal is output. The remaining text segmentations output valid segmentation signals, and the text keywords include "Boston", "lobster", "gentian", "grouper" and "delicious".
[0077] The classification module is used to analyze text keywords and classify the Moments information into travel, food, daily life and work categories in combination with Moments pictures; the classification module includes an information feature analysis unit, an image feature analysis unit and a feature classification unit;
[0078] The information feature analysis unit is used to establish a text classification analysis model, analyze text keywords, and obtain information features of the circle of friends text;
[0079] The information feature analysis unit is configured with an information feature analysis strategy, which includes:
[0080] See also Figure 2 As shown in the figure, a text classification analysis model is established to obtain samples of Moments with travel tags, food tags, daily tags, and work tags in the big data. The tags in the Moments samples are tags added by users themselves.
[0081] The circle of friends samples with the travel tag are named travel samples, the circle of friends samples with the food tag are named food samples, the circle of friends samples with the daily tag are named daily samples, and the circle of friends samples with the work tag are named work samples;
[0082] Extract the text keywords from travel samples, food samples, daily samples and work samples respectively, and name them travel keywords, food keywords, daily keywords and work keywords in sequence;
[0083] The travel word library is composed of all travel keywords, the food word library is composed of all food keywords, the daily word library is composed of all daily keywords, and the work word library is composed of all work keywords;
[0084] In practical applications, Figure 2The big data samples therein are travel samples, food samples, daily samples, and work samples; establishing a text classification analysis model and obtaining and analyzing the WeChat Moments samples with travel tags, food tags, daily tags, and work tags in the big data is to count the text keywords in the big data that belong to the four different categories of travel, food, daily, and work. By forming a corresponding word library with them, it is possible to avoid analyzing the keywords of WeChat Moments information with preset keywords set by humans, and thus conduct classification; the travel samples, food samples, daily samples, and work samples can also be determined manually, but the main source of the samples is the data with tags in the public information of various platforms on the Internet. For example, the information with the "#travel" tag on Weibo is a travel sample; the travel sample is the text keywords extracted from the travel sample through the keyword extraction strategy, and then all the travel keywords extracted from the big data form a travel word library, which is used to search for travel-related WeChat Moments information. The sources and functions of the food word library, daily word library, and work word library are the same as those of the travel word library;
[0085] Obtain the text keywords obtained by intelligent word segmentation, and search for the word library to which the text keywords belong. If the text keywords belong to the travel word library, output a travel word signal; if the text keywords belong to the food word library, output a food word signal; if the text keywords belong to the daily word library, output a daily word signal; if the text keywords belong to the work word library, output a work word signal; if the text keywords do not belong to any word library, output an attribute-less signal;
[0086] If an attribute-less signal is output, mark the corresponding text keywords as attribute-less word segmentation. If all text keywords are attribute-less word segmentation, the information feature of the WeChat Moments information is featureless;
[0087] Analyze all the extracted text keywords, and respectively count the number of travel word signals, food word signals, daily word signals, and work word signals output, and name them the travel word count, food word count, daily word count, and work word count in turn;
[0088] In practical applications, the text classification analysis model is used to search for text keywords belonging to different categories through the travel word library, food word library, daily word library, and work word library, and analyze to obtain information features; the text keywords analyzed in this embodiment include "Boston", "lobster", "gentian", "grouper", and "delicious". Enter them into the text classification analysis model in turn. It is found that "Boston" belongs to the travel word library and a travel word signal is output. "Lobster", "grouper", and "delicious" belong to the food word library and a food word signal is output. "Gentian" does not belong to any word library and an attribute-less signal is output. Mark "gentian" as attribute-less word segmentation; through statistics, the travel word count and food word count are 1 and 3 respectively;
[0089] Find the maximum value among the number of travel words, the number of food words, the number of daily words, and the number of work words, and name it the maximum number of classification words. If the maximum number of classification words is the number of travel words, the information feature of the circle of friends information is travel information; if the maximum number of classification words is the number of food words, the information feature of the circle of friends information is food information; if the maximum number of classification words is the number of daily words, the information feature of the circle of friends information is daily information; if the maximum number of classification words is the number of work words, the information feature of the circle of friends information is work information;
[0090] If the information feature is travel information, the non-attribute segmentation words are included in the travel word library; if the information feature is food information, the non-attribute segmentation words are included in the food word library; if the information feature is daily information, the non-attribute segmentation words are included in the daily word library; if the information feature is work information, the non-attribute segmentation words are included in the work word library;
[0091] In actual application, the maximum number of classification words found is the number of food words, so the information feature of the circle of friends information is food information, and the information feature is food information, so the attributeless participle "longdan" is included in the food word library;
[0092] The image feature analysis unit is used to obtain the Moments pictures, perform image recognition on the Moments pictures, extract image tags from the Moments pictures, and analyze image features of the Moments pictures through the image tags;
[0093] The image feature analysis unit is configured with an image feature analysis strategy, which includes:
[0094] If the information feature is no feature, the image in the circle of friends is identified by image label recognition technology to extract the image label in the circle of friends image;
[0095] Find the word library to which the image label belongs. If the image label belongs to the travel word library, output the travel label signal; if the image label belongs to the food word library, output the food label signal; if the image label belongs to the daily word library, output the daily label signal; if the image label belongs to the work word library, output the work label signal; if the image label does not belong to any word library, output the label no attribute signal;
[0096] Count and output the number of travel tag signals, food tag signals, daily tag signals, and work tag signals, and find the maximum value among them, which is named the maximum tag number;
[0097] If the maximum number of tags is the number of travel tag signals, the image features of the Moments images are marked as travel images; if the maximum number of tags is the number of food tag signals, the image features of the Moments images are marked as food images; if the maximum number of tags is the number of daily tag signals, the image features of the Moments images are marked as daily images; if the maximum number of tags is the number of work tag signals, the image features of the Moments images are marked as work images;
[0098] In practical applications, image label recognition technology is an existing image recognition technology, such as Baidu's camera search technology. Recognizing and extracting image labels is actually camera recognition. By analyzing the image, the objective objects contained in the image are extracted. The information feature in this embodiment is food information, so there is no need to perform image recognition. However, for the sake of completeness of the explanation of this embodiment, taking the circle of friends information "God's Private Reserve" as an example, the information feature obtained by analyzing this circle of friends information is featureless, but it comes with 9 attached pictures, that is, 9 circle of friends images. The image labels obtained by recognition and extraction include "grassland", "horse", "person", "stone", "tree", "cloud", "Sky", "bridge", "bird", "lake", "building" and "vehicle". Through searching, we find that "grassland", "horse", "sky", "cloud", "bird" and "lake" belong to the travel vocabulary, and output travel label signals; "sky", "cloud", "bird", "building" and "vehicle" belong to the daily vocabulary, and output daily label signals; "people", "stone", "tree" and "bridge" do not exist in any vocabulary, and output label no attribute signals; among them, the travel label signal is output 6 times in total, and the daily label signal is output 5 times in total, so the maximum number of labels is 6, corresponding to the travel label signal, marking the image feature of the circle of friends image as a travel image;
[0099] The feature classification unit is used to classify the friend circle information based on information features and image features;
[0100] The feature classification unit is configured with a feature classification strategy, which includes:
[0101] Get the information features of the circle of friends information. If the information features are travel information, the circle of friends information is classified into the travel category; if the information features are food information, the circle of friends information is classified into the food category; if the information features are daily information, the circle of friends information is classified into the daily category; if the information features are work information, the circle of friends information is classified into the work category;
[0102] If the information feature is no feature, the image feature of the Moments image is obtained. If the image feature is a travel image, the Moments information is classified as a travel category; if the image feature is a food image, the Moments information is classified as a food category; if the image feature is a daily image, the Moments information is classified as a daily category; if the image feature is a work image, the Moments information is classified as a work category;
[0103] In actual applications, if the information feature of the friend circle message "Boston lobster is so-so, but grouper is delicious" is travel information, the friend circle message is classified as travel; if the information feature of the friend circle message "God's private reserve" is no feature, its image feature is obtained, and the image feature is a travel image, so the friend circle message is classified as travel.
[0104] The sentiment analysis module is used to perform sentiment analysis on the text keywords of the friend circle information if the friend circle information is about travel or work, and obtain the sentiment direction of the friend circle information; the sentiment analysis module includes a primary sentiment analysis unit and a deep sentiment analysis unit;
[0105] The primary sentiment analysis unit is configured with a primary sentiment analysis strategy, which includes:
[0106] If the circle of friends information is about travel or work, then obtain the text keywords extracted from the circle of friends information and mark them as sentiment segmentation words;
[0107] Positive emotions such as happiness, emotion, thinking and humor are collectively referred to as positive emotions; negative emotions such as sadness, loss, anger and dissatisfaction are collectively referred to as negative emotions;
[0108] In practical applications, the text semantic recognition model is implemented using the sentiment analysis method in the existing natural language processing technology. In real life, human emotions can be roughly divided into happiness, emotion, thinking, humor, sadness, loss, anger and dissatisfaction. These emotions cover most of human emotions, and positive emotions are positive, while negative emotions are negative. Therefore, positive emotions such as happiness, emotion, thinking and humor are collectively referred to as positive emotions; negative emotions such as sadness, loss, anger and dissatisfaction are collectively referred to as negative emotions. In general, traveling makes people happy and spreads a positive attitude towards life. Therefore, the emotions spread by travel-related circle of friends information are usually positive emotions, or no emotions, rather than negative emotions. When it comes to work-related circle of friends information, as long as it is required for work, it usually carries positive emotions or no emotions. If it carries negative emotions, first of all, it cannot be recognized by managers, and secondly, it cannot be recognized by users. In general, the work-related copywriting with negative emotions is a complaint about work, which belongs to the daily category, which is the emotion in daily life, and cannot be classified as work.
[0109] The sentiment segmentation is identified through the text semantic recognition model to determine whether the sentiment segmentation belongs to positive emotion or negative emotion. If the sentiment segmentation belongs to positive emotion, a positive sentiment signal is output; if the sentiment segmentation belongs to negative emotion, a negative sentiment signal is output; otherwise, no sentiment signal is output;
[0110] Identify all sentiment segmentations of the Moments information. If all of them output no sentiment signals, set the sentiment direction of the Moments information to undirected sentiment.
[0111] If there are positive emotion signals or negative emotion signals, count the number of positive emotion signals and name it as positive number, and count the number of negative emotion signals and name it as negative number;
[0112] If the number of positive comments is greater than or equal to the number of negative comments, the sentiment direction of the Moments information is set to positive sentiment; if the number of positive comments is less than the number of negative comments, the sentiment direction of the Moments information is set to negative sentiment;
[0113] If an undirected sentiment signal is output, further sentiment analysis is performed on the friend circle information;
[0114] In practical applications, taking the information in Moments "Boston lobster is just so-so, but gentian grouper is delicious" as an example, the sentiment segmentation words include "Boston", "lobster", "gentian", "grouper" and "delicious". Through analysis, it is found that the emotion of "delicious" is happiness, which is a positive emotion, so the positive sentiment signal is output. The remaining sentiment segmentation words are only nouns and do not contain emotions, so no sentiment signal is output. The statistics show that the number of positives is 1 and the number of negatives is 0. Through comparison, it is found that the number of positives is greater than the number of negatives, so the sentiment direction of the Moments information is set to positive sentiment;
[0115] The deep sentiment analysis unit is configured with a deep sentiment analysis strategy, which includes:
[0116] Based on punctuation marks and spaces, the Moments text is divided into multiple sentences. The sentences are numbered in the order of the sentences, and the symbol S is used to identify the sentences. n It represents, where n is a positive integer and n is the sequence number of S;
[0117] The text sentence is identified through the text semantic recognition model to determine whether the text sentence belongs to positive emotion or negative emotion. If the text sentence belongs to positive emotion, a positive signal of the text is output; if the text sentence belongs to negative emotion, a negative signal of the text is output; otherwise, a non-directional signal of the text is output;
[0118] In practical applications, there are certain limitations in analyzing the emotions of Moments information through emotional keywords. It can be applied to most Moments information, but not to a small number of Moments information. The emotions of this type of information are usually not reflected by a certain keyword, but by a whole sentence. Therefore, further analysis is conducted on this small number of Moments information. Taking the Moments information "I have worked hard for two months, but I have never forgotten. I will eventually arrive~ I will take a little six pence and chase the moon with my friends~" as an example, the Moments information outputs an undirected emotional signal. The text sentences S1 to S5 are divided into "I have worked hard for two months", "I have never forgotten", "I will eventually arrive", "I will take a little six pence" and "I will chase the moon with my friends" respectively. The text sentences are identified by the text semantic recognition model, and the emotion of "I will chase the moon with my friends" is happiness, which is a positive emotion, and the text positive signal is output; the emotion of "I have worked hard for two months" is loss, which is a negative emotion, and the text negative signal is output; the remaining text sentences are all text undirected signals;
[0119] For all S n Analyze and count the output signals. If they are all text undirected signals, the emotional direction of the Moments information is set to no emotion; if they are not text negative signals, the emotional direction of the Moments information is set to positive emotion; if they are not text positive signals, the emotional direction of the Moments information is set to negative emotion; if there are both text positive signals and text negative signals, the emotional proportion determination signal is output;
[0120] If the sentiment ratio determination signal is output, the number of positive text signals and negative text signals are counted, which are named as the number of positive texts and the number of negative texts respectively. If the number of positive texts is less than the number of negative texts, the sentiment direction of the circle of friends information is set to negative sentiment; if the number of positive texts is greater than the number of negative texts, the sentiment direction of the circle of friends information is set to positive sentiment; if the number of positive texts is equal to the number of negative texts, the sentence sequence number determination signal is output;
[0121] In actual applications, the emotions expressed in the circle of friends information are usually all non-positive emotions or non-negative emotions. The situation of mixing two emotions is rare but exists. Therefore, when there are both positive text signals and negative text signals, it is necessary to judge the proportion of emotions, and take the emotion with a larger proportion in the circle of friends information as the real emotion of the circle of friends information. When there are both positive text signals and negative text signals, the emotion proportion judgment signal is output; the number of positive texts and the number of negative texts are both 1 through statistics, and the number of positive texts is equal to the number of negative texts through comparison, and the sentence number judgment signal is output; for the circle of friends information with half sad and half happy emotions, it is impossible to make a specific judgment on it through the machine, and manual judgment is required at this time. When people express emotions, they usually have a certain inertial thinking and like to focus the real emotions on the first half or the second half of the information. The sentence number judgment is to analyze whether the real emotions of the circle of friends information are usually expressed in the first half or the second half in the circle of friends information in big data, so as to provide a judgment basis for subsequent machine recognition. After a certain amount of basic data is accumulated, manual judgment can be eliminated and machine judgment can be completely adopted;
[0122] If the output statement number determines the signal, then calculate max(n) / 2, where max(n) is the maximum value of n. The result is named the split value. If the split value is not an integer, the split value is further rounded to an integer, and S1 to S max(n) / 2 The integration is named as the first half of the text, and S max(n) / 2 To S max(n) The integration is named the second half of the text;
[0123] The real emotion of the information in the circle of friends is manually judged. The real emotion includes positive emotion and negative emotion. The first half of the text is judged to be positive or negative emotion based on the number of positive text signals and negative text signals in the first half of the text, which is named the first half emotion. The second half of the text is judged to be positive or negative emotion based on the number of positive text signals and negative text signals in the second half of the text, which is named the second half emotion. If the number of positive text signals and negative text signals in the first half of the text is the same and the number of positive text signals and negative text signals in the second half of the text is the same, the emotional direction of the information in the circle of friends is set to no emotion.
[0124] Find out which of the first half emotion and the second half emotion is the same as the real emotion. If the first half emotion is the same as the real emotion, output the first half real signal; if the second half emotion is the same as the real emotion, output the second half real signal. Count the number of the first half real signal and the second half real signal, and name them as the first half and the second half respectively. When the sum of the first half and the second half reaches the first sample threshold, no manual judgment is required.
[0125] The first half is compared with the second half. If the first half is less than or equal to the second half, the second half judgment signal is output; if the first half is greater than the second half, the first half judgment signal is output; if the first half judgment signal is output, the first half emotion is used as the emotion direction of the circle of friends information; if the second half judgment signal is output, the second half emotion is used as the emotion direction of the circle of friends information;
[0126] In practical applications, 1≤n≤5, that is, max(n)=5, and the calculated split value is 2.5, which is not an integer. Therefore, the split value is further rounded to an integer, and the split value is 3. S1 to S3 are integrated and named the first half of the text, and S3 to S5 are integrated and named the second half of the text. Through manual judgment, the real emotion of the circle of friends information is positive. Taking the first half of the emotion as an example, the number of positive signals and negative signals of the text in S1 to S3 are counted as 0 and 1 respectively, then the first half of the emotion is negative. Similarly, the second half of the emotion is positive, and the second half of the emotion is the same as the real emotion, and the second half of the real signal is output. The circle of friends information of the big data is analyzed to obtain the first sample threshold of circle of friends information as the data basis, and the first The sample threshold i is set to 10000, and the statistics show that the first half and the second half are 2182 and 7818 respectively. By comparison, it is found that the first half is smaller than the second half, and the second half judgment signal is output, and the second half emotion is used as the emotional direction of the circle of friends information. The second half is much larger than the first half, which shows that most people are subconsciously accustomed to using the second half of the information as an expression of their true emotions. Although there will still be a small amount of error, this can maximize the accuracy of the classification of circle of friends information. In this embodiment, the second half of the emotion of the circle of friends information "I have worked hard for two months, and I will arrive eventually~ I will take some six pence and chase the moon with friends~" is a positive emotion, so the emotional direction of the circle of friends information is set to a positive emotion.
[0127] The classification correction module is used to correct the classification of the circle of friends information based on the sentiment direction of the circle of friends information;
[0128] The classification correction module is configured with a classification correction strategy, which includes:
[0129] If the sentiment direction is positive or no sentiment, the Moments information will be kept in the travel or work category;
[0130] If the sentiment direction is negative, the category of the Moments information is changed to daily category;
[0131] In actual applications, if the sentiment directions of the friend circle information listed in this embodiment are all positive and all belong to the travel category, they will all be retained in the travel category.
[0132] Example 2, please refer to Figure 3As shown, this application provides a method for classifying friend circle information, including the following steps:
[0133] Step S1, obtaining the text of the circle of friends, extracting keywords from the text of the circle of friends, and obtaining text keywords; Step S1 includes the following sub-steps:
[0134] Step S101, when it is detected that a user uploads a circle of friends information, the circle of friends text is obtained;
[0135] Step S102, performing intelligent word segmentation on the text in the circle of friends through an intelligent word segmentation model to obtain text segmentation;
[0136] Step S103, searching the stop word library to inquire whether the text segmentation word exists in the stop word library, if so, outputting an invalid segmentation signal; if not, outputting a valid segmentation signal;
[0137] Step S104: if an invalid word segmentation signal is output, the corresponding text word segmentation is removed, and the remaining text word segmentations that output valid word segmentation signals are marked as text keywords;
[0138] Step S2, analyzing the text keywords, and classifying the circle of friends information into travel, food, daily life and work categories in combination with the circle of friends pictures; Step S2 includes the following sub-steps:
[0139] Step S201, establishing a text classification analysis model, analyzing text keywords, and obtaining information features of the circle of friends text;
[0140] Step S201 includes the following sub-steps:
[0141] Step S2011, establishing a text classification analysis model, obtaining circle of friends samples with travel tags, food tags, daily tags, and work tags in the big data, where the tags in the circle of friends samples are tags added by the users themselves;
[0142] Step S2012, naming the friend circle samples with the travel tag as travel samples, the friend circle samples with the food tag as food samples, the friend circle samples with the daily tag as daily samples, and the friend circle samples with the work tag as work samples;
[0143] Step S2013, extracting text keywords from the travel samples, food samples, daily samples, and work samples, respectively, and naming them travel keywords, food keywords, daily keywords, and work keywords in sequence;
[0144] Step S2014, forming a travel word library with all travel keywords, forming a food word library with all food keywords, forming a daily word library with all daily keywords, and forming a work word library with all work keywords;
[0145] Step S2015, obtaining the text keywords obtained by intelligent word segmentation, searching the word library to which the text keywords belong, if the text keywords belong to the travel word library, outputting a travel word signal; if the text keywords belong to the food word library, outputting a food word signal; if the text keywords belong to the daily word library, outputting a daily word signal; if the text keywords belong to the work word library, outputting a work word signal; if the text keywords do not belong to any word library, outputting a no-attribute signal;
[0146] Step S2016: if a non-attribute signal is output, the corresponding text keyword is marked as a non-attribute segmentation word. If all text keywords are non-attribute segmentations, the information feature of the friend circle information is non-featured.
[0147] Step S2017, analyzing all extracted text keywords, and counting the number of output travel word signals, food word signals, daily word signals, and work word signals, respectively, and naming them as the number of travel words, the number of food words, the number of daily words, and the number of work words, respectively;
[0148] Step S2018, finding the maximum value among the number of travel words, the number of food words, the number of daily words and the number of work words, and naming it as the maximum number of classification words. If the maximum number of classification words is the number of travel words, the information feature of the circle of friends information is travel information; if the maximum number of classification words is the number of food words, the information feature of the circle of friends information is food information; if the maximum number of classification words is the number of daily words, the information feature of the circle of friends information is daily information; if the maximum number of classification words is the number of work words, the information feature of the circle of friends information is work information;
[0149] Step S2019: if the information feature is travel information, the non-attribute segmentation words are included in the travel word library; if the information feature is food information, the non-attribute segmentation words are included in the food word library; if the information feature is daily information, the non-attribute segmentation words are included in the daily word library; if the information feature is work information, the non-attribute segmentation words are included in the work word library;
[0150] Step S202, obtaining a circle of friends picture, performing image recognition on the circle of friends picture, extracting image tags from the circle of friends image, and analyzing image features of the circle of friends image through the image tags;
[0151] Step S202 includes the following sub-steps:
[0152] Step S2021, if the information feature is no feature, the friend circle image is identified by image tag recognition technology to extract image tags in the friend circle image;
[0153] Step S2022, searching the word library to which the image tag belongs. If the image tag belongs to the travel word library, a travel tag signal is output; if the image tag belongs to the food word library, a food tag signal is output; if the image tag belongs to the daily word library, a daily tag signal is output; if the image tag belongs to the work word library, a work tag signal is output; if the image tag does not belong to any word library, a tag without attribute signal is output;
[0154] Step S2023, counting and outputting the number of travel tag signals, food tag signals, daily tag signals, and work tag signals, and finding the maximum value therein, which is named as the maximum tag number;
[0155] Step S2024, if the maximum number of tags is the number of travel tag signals, the image feature of the circle of friends image is marked as a travel image; if the maximum number of tags is the number of food tag signals, the image feature of the circle of friends image is marked as a food image; if the maximum number of tags is the number of daily tag signals, the image feature of the circle of friends image is marked as a daily image; if the maximum number of tags is the number of work tag signals, the image feature of the circle of friends image is marked as a work image;
[0156] Step S203, classifying the circle of friends information based on information features and image features;
[0157] Step S203 includes the following sub-steps:
[0158] Step S2031, obtaining information features of the friend circle information, if the information feature is travel information, then classifying the friend circle information into the travel category; if the information feature is food information, then classifying the friend circle information into the food category; if the information feature is daily information, then classifying the friend circle information into the daily category; if the information feature is work information, then classifying the friend circle information into the work category;
[0159] Step S2032, if the information feature is no feature, then obtain the image feature of the friend circle image, if the image feature is a travel image, then classify the friend circle information into the travel category; if the image feature is a food image, then classify the friend circle information into the food category; if the image feature is a daily image, then classify the friend circle information into the daily category; if the image feature is a work image, then classify the friend circle information into the work category;
[0160] Step S3, if the circle of friends information is about travel or work, sentiment analysis is performed on the text keywords of the circle of friends information to obtain the sentiment direction of the circle of friends information; step S3 includes the following sub-steps:
[0161] Step S301, if the friend circle information is about travel or work, then obtain the text keywords extracted from the friend circle information and mark them as sentiment segmentation words;
[0162] Step S302, positive emotions such as happiness, emotion, thinking and humor are collectively referred to as positive emotions; negative emotions such as sadness, loss, anger and dissatisfaction are collectively referred to as negative emotions;
[0163] Step S303, identifying the sentiment segmentation words through the text semantic recognition model, judging whether the sentiment segmentation words belong to positive sentiment or negative sentiment, if the sentiment segmentation words belong to positive sentiment, outputting a positive sentiment signal; if the sentiment segmentation words belong to negative sentiment, outputting a negative sentiment signal; otherwise, outputting no sentiment signal;
[0164] Step S304, identifying all sentiment segmentations of the friend circle information, if all of them output no sentiment signal, then setting the sentiment direction of the friend circle information to undirected sentiment;
[0165] Step S305: If there is a positive emotion signal or a negative emotion signal, the number of positive emotion signals is counted, which is named as the positive number, and the number of negative emotion signals is counted, which is named as the negative number;
[0166] Step S306: If the number of positive messages is greater than or equal to the number of negative messages, the emotional direction of the friend circle information is set to positive emotion; if the number of positive messages is less than the number of negative messages, the emotional direction of the friend circle information is set to negative emotion;
[0167] Step S307: if a non-directional emotion signal is output, further emotion analysis is performed on the friend circle information;
[0168] Step S307 includes the following sub-steps:
[0169] Step S3071, based on punctuation marks and spaces, divide the friend circle text into multiple text sentences; number the text sentences in the order of the text sentences, and use the symbol S n It represents, where n is a positive integer and n is the sequence number of S;
[0170] Step S3072, identifying the text sentence through the text semantic recognition model, judging whether the text sentence belongs to positive emotion or negative emotion, if the text sentence belongs to positive emotion, outputting a text positive signal; if the text sentence belongs to negative emotion, outputting a text negative signal; otherwise, outputting a text undirected signal;
[0171] Step S3073, for all S n Analyze and count the output signals. If they are all text undirected signals, the emotional direction of the Moments information is set to no emotion; if they are not text negative signals, the emotional direction of the Moments information is set to positive emotion; if they are not text positive signals, the emotional direction of the Moments information is set to negative emotion; if there are both text positive signals and text negative signals, the emotional proportion determination signal is output;
[0172] Step S3074, if the emotion ratio determination signal is output, the number of positive text signals and negative text signals is counted, and they are named as the number of positive texts and the number of negative texts respectively. If the number of positive texts is less than the number of negative texts, the emotion direction of the circle of friends information is set to negative emotion; if the number of positive texts is greater than the number of negative texts, the emotion direction of the circle of friends information is set to positive emotion; if the number of positive texts is equal to the number of negative texts, a sentence sequence number determination signal is output;
[0173] Step S3075: If the statement sequence number determination signal is output, then calculate max(n) / 2, where max(n) is the maximum value of n. The calculation result is named the split value. If the split value is not an integer, the split value is further rounded to an integer, and S1 to S max(n) / 2 The integration is named as the first half of the text, and S max(n) / 2 To S max(n) The integration is named the second half of the text;
[0174] Step S3076, manually judging the real emotion of the circle of friends information, the real emotion includes positive emotion and negative emotion, judging whether the first half of the text is positive or negative based on the number of positive text signals and negative text signals in the first half of the text, named as the first half emotion, judging whether the second half of the text is positive or negative based on the number of positive text signals and negative text signals in the second half of the text, named as the second half emotion; if the number of positive text signals and negative text signals in the first half of the text is the same and the number of positive text signals and negative text signals in the second half of the text is the same, then the emotional direction of the circle of friends information is set to no emotion;
[0175] Step S3077, find out which of the first half emotion and the second half emotion is the same as the real emotion, if the first half emotion is the same as the real emotion, output the first half real signal; if the second half emotion is the same as the real emotion, output the second half real signal, count the number of the first half real signal and the second half real signal, respectively named as the first half and the second half, and no longer pass manual judgment when the sum of the first half and the second half reaches the first sample threshold;
[0176] Step S3078, compare the first half with the second half, if the first half is less than or equal to the second half, output the second half judgment signal; if the first half is greater than the second half, output the first half judgment signal; if the first half judgment signal is output, the first half emotion is used as the emotion direction of the friend circle information; if the second half judgment signal is output, the second half emotion is used as the emotion direction of the friend circle information;
[0177] Step S4, correcting the classification of the circle of friends information based on the sentiment direction of the circle of friends information; Step S4 includes the following sub-steps:
[0178] Step S401, if the emotional direction is positive or no emotion, the circle of friends information is retained in the travel category or work category;
[0179] Step S402: If the emotional direction is negative, the category of the circle of friends information is changed to daily category.
[0180] Example 3, please refer to Figure 4 As shown, Figure 4 The structural diagram of an electronic device is illustrated, and the electronic device may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the method for classifying information in the circle of friends are executed to achieve the following functions: obtaining the text in the circle of friends, extracting keywords from the text in the circle of friends, and obtaining text keywords; analyzing the text keywords, and classifying the circle of friends information into travel, food, daily life and work categories in combination with the circle of friends pictures; if the circle of friends information is travel or work, sentiment analysis is performed on the text keywords of the circle of friends information to obtain the sentiment direction of the circle of friends information; and the classification of the circle of friends information is corrected based on the sentiment direction of the circle of friends information.
[0181] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0182] Embodiment 4, the present application also provides a computer-readable storage medium, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method for classifying circle of friends information are executed to achieve the following functions: obtain circle of friends text, extract keywords from the circle of friends text, and obtain text keywords; analyze the text keywords, and divide the circle of friends information into travel, food, daily and work categories in combination with circle of friends pictures; if the circle of friends information is travel or work, perform sentiment analysis on the text keywords of the circle of friends information to obtain the sentiment direction of the circle of friends information; correct the classification of the circle of friends information based on the sentiment direction of the circle of friends information.
[0183] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0184] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for classifying information in a circle of friends, characterized in that: The steps include: Get the text of the circle of friends, extract keywords from the text of the circle of friends, and get the text keywords; Analyze the keywords in the text and classify the Moments information into travel, food, daily life and work categories based on the Moments pictures. If the information in the Moments is about travel or work, sentiment analysis is performed on the text keywords of the Moments information to obtain the sentiment direction of the information; Correct the classification of Moments information based on the sentiment direction of the Moments information.
2. The method for classifying friend circle information according to claim 1, characterized in that: Obtaining the text of the circle of friends, extracting keywords from the text of the circle of friends, and obtaining the text keywords include the following sub-steps: When it is detected that the user uploads Moments information, the Moments text is obtained; Intelligent word segmentation is performed on the text in the circle of friends through the intelligent word segmentation model to obtain text segmentation; Search the stop word library to check whether the text segmentation word exists in the stop word library. If it exists, output an invalid segmentation signal; if not, output a valid segmentation signal; If an invalid word segmentation signal is output, the corresponding text word segmentation is removed, and the remaining text word segmentations that output valid word segmentation signals are marked as text keywords.
3. The method for classifying friend circle information according to claim 2, characterized in that: Analyzing the keywords in the text and combining the pictures in the Moments to classify the Moments information into travel, food, daily life, and work categories includes the following sub-steps: Establish a text classification analysis model, analyze text keywords, and obtain the information characteristics of the circle of friends text; Get the Moments pictures, perform image recognition on the Moments pictures, extract the image tags in the Moments pictures, and analyze the image features of the Moments pictures through the image tags; Classify circle of friends information based on information features and image features.
4. The method for classifying friend circle information according to claim 3, characterized in that: Establishing a text classification analysis model, analyzing text keywords, and obtaining information features of the circle of friends text includes the following sub-steps: Establish a text classification analysis model to obtain samples of Moments with travel tags, food tags, daily tags, and work tags in big data; The circle of friends samples with the travel tag are named travel samples, the circle of friends samples with the food tag are named food samples, the circle of friends samples with the daily tag are named daily samples, and the circle of friends samples with the work tag are named work samples; Extract the text keywords from travel samples, food samples, daily samples and work samples respectively, and name them travel keywords, food keywords, daily keywords and work keywords in sequence; The travel word library is composed of all travel keywords, the food word library is composed of all food keywords, the daily word library is composed of all daily keywords, and the work word library is composed of all work keywords; Get the text keywords obtained by intelligent word segmentation, search the vocabulary to which the text keywords belong, if the text keywords belong to the travel vocabulary, output the travel word signal; if the text keywords belong to the food vocabulary, output the food word signal; if the text keywords belong to the daily vocabulary, output the daily word signal; if the text keywords belong to the work vocabulary, output the work word signal; if the text keywords do not belong to any vocabulary, output the no-attribute signal; If a non-attribute signal is output, the corresponding text keyword is marked as a non-attribute segmentation word. If all text keywords are non-attribute segmentations, the information feature of the circle of friends information is non-featured. Analyze all the extracted text keywords, and count the number of output travel word signals, food word signals, daily word signals, and work word signals, respectively, and name them as travel word count, food word count, daily word count, and work word count; Find the maximum value among the number of travel words, the number of food words, the number of daily words, and the number of work words, and name it the maximum number of classification words. If the maximum number of classification words is the number of travel words, the information feature of the circle of friends information is travel information; if the maximum number of classification words is the number of food words, the information feature of the circle of friends information is food information; If the maximum number of classified words is the number of daily words, the information feature of the friend circle information is daily information; if the maximum number of classified words is the number of work words, the information feature of the friend circle information is work information; If the information feature is travel information, the non-attribute participles are included in the travel vocabulary; if the information feature is food information, the non-attribute participles are included in the food vocabulary; if the information feature is daily information, the non-attribute participles are included in the daily vocabulary; if the information feature is work information, the non-attribute participles are included in the work vocabulary.
5. The method for classifying friend circle information according to claim 4, characterized in that: Obtaining a Moments picture, performing image recognition on the Moments picture, extracting image tags from the Moments picture, and analyzing image features of the Moments picture through image tags includes the following sub-steps: If the information feature is no feature, the image in the circle of friends is identified by image label recognition technology to extract the image label in the circle of friends image; Find the word library to which the image label belongs. If the image label belongs to the travel word library, output the travel label signal; if the image label belongs to the food word library, output the food label signal; if the image label belongs to the daily word library, output the daily label signal; if the image label belongs to the work word library, output the work label signal; if the image label does not belong to any word library, output the label no attribute signal; Count and output the number of travel tag signals, food tag signals, daily tag signals, and work tag signals, and find the maximum value among them, which is named the maximum tag number; If the maximum number of tags is the number of travel tag signals, the image features of the Moments images are marked as travel images; if the maximum number of tags is the number of food tag signals, the image features of the Moments images are marked as food images; if the maximum number of tags is the number of daily tag signals, the image features of the Moments images are marked as daily images; if the maximum number of tags is the number of work tag signals, the image features of the Moments images are marked as work images.
6. The method for classifying friend circle information according to claim 5, characterized in that: Classifying Moments information based on information features and image features includes the following sub-steps: Get the information features of the circle of friends information. If the information features are travel information, the circle of friends information is classified into the travel category; if the information features are food information, the circle of friends information is classified into the food category; if the information features are daily information, the circle of friends information is classified into the daily category; if the information features are work information, the circle of friends information is classified into the work category; If the information feature is no feature, the image feature of the circle of friends image is obtained. If the image feature is a travel image, the circle of friends information is classified into the travel category; if the image feature is a food image, the circle of friends information is classified into the food category; if the image feature is a daily image, the circle of friends information is classified into the daily category; if the image feature is a work image, the circle of friends information is classified into the work category.
7. The method for classifying friend circle information according to claim 6, characterized in that: If the Moments information is about travel or work, sentiment analysis is performed on the text keywords of the Moments information to obtain the sentiment direction of the Moments information, including the following sub-steps: If the circle of friends information is about travel or work, then obtain the text keywords extracted from the circle of friends information and mark them as sentiment segmentation words; Positive emotions such as happiness, emotion, thinking and humor are collectively referred to as positive emotions; negative emotions such as sadness, loss, anger and dissatisfaction are collectively referred to as negative emotions; The sentiment segmentation is identified through the text semantic recognition model to determine whether the sentiment segmentation belongs to positive emotion or negative emotion. If the sentiment segmentation belongs to positive emotion, a positive sentiment signal is output; If the sentiment segmentation word belongs to negative sentiment, then the negative sentiment signal is output; Otherwise, no emotion signal is output; Identify all sentiment segmentations of the Moments information. If all of them output no sentiment signals, set the sentiment direction of the Moments information to undirected sentiment. If there are positive emotion signals or negative emotion signals, count the number of positive emotion signals and name it as positive number, and count the number of negative emotion signals and name it as negative number; If the number of positive comments is greater than or equal to the number of negative comments, the sentiment direction of the Moments information is set to positive sentiment; if the number of positive comments is less than the number of negative comments, the sentiment direction of the Moments information is set to negative sentiment; If an undirected sentiment signal is output, further sentiment analysis will be performed on the circle of friends information.
8. The method for classifying friend circle information according to claim 7, characterized in that: Further sentiment analysis of Moments information includes the following sub-steps: Based on punctuation marks and spaces, the Moments text is divided into multiple sentences. The sentences are numbered in the order of the sentences, and the symbol S is used to identify the sentences. n It represents, where n is a positive integer and n is the sequence number of S; The text sentence is identified through the text semantic recognition model to determine whether the text sentence belongs to positive emotion or negative emotion. If the text sentence belongs to positive emotion, a positive signal of the text is output; if the text sentence belongs to negative emotion, a negative signal of the text is output; otherwise, a non-directional signal of the text is output; For all S n Analyze and count the output signals. If they are all text undirected signals, the emotional direction of the Moments information is set to no emotion; if they are not text negative signals, the emotional direction of the Moments information is set to positive emotion; if they are not text positive signals, the emotional direction of the Moments information is set to negative emotion; if there are both text positive signals and text negative signals, the emotional proportion determination signal is output; If the sentiment ratio determination signal is output, the number of positive text signals and negative text signals are counted, which are named as the number of positive texts and the number of negative texts respectively. If the number of positive texts is less than the number of negative texts, the sentiment direction of the circle of friends information is set to negative sentiment; if the number of positive texts is greater than the number of negative texts, the sentiment direction of the circle of friends information is set to positive sentiment; if the number of positive texts is equal to the number of negative texts, the sentence sequence number determination signal is output; If the output statement number determines the signal, then calculate max(n) / 2, where max(n) is the maximum value of n. The result is named the split value. If the split value is not an integer, the split value is further rounded to an integer, and S1 to S max(n) / 2 The integration is named as the first half of the text, and S max(n) / 2 To S max(n) The integration is named the second half of the text; By manually judging the real emotion of the circle of friends information, the real emotion includes positive emotion and negative emotion. Based on the number of positive text signals and negative text signals in the first half of the text, the first half of the text is judged to be positive or negative emotion, which is named the first half emotion. Based on the number of positive text signals and negative text signals in the second half of the text, the second half of the text is judged to be positive or negative emotion, which is named the second half emotion. If the number of positive text signals and negative text signals in the first half of the text is the same and the number of positive text signals and negative text signals in the second half of the text is the same, the emotional direction of the circle of friends information is set to no emotion. Find out which of the first half emotion and the second half emotion is the same as the real emotion. If the first half emotion is the same as the real emotion, output the first half real signal; if the second half emotion is the same as the real emotion, output the second half real signal. Count the number of the first half real signal and the second half real signal, and name them as the first half and the second half respectively. When the sum of the first half and the second half reaches the first sample threshold, no manual judgment is required. Compare the first half with the second half. If the first half is less than or equal to the second half, output the second half judgment signal; if the first half is greater than the second half, output the first half judgment signal; if the first half judgment signal is output, use the first half emotion as the emotion direction of the circle of friends information; if the second half judgment signal is output, use the second half emotion as the emotion direction of the circle of friends information.
9. The method for classifying friend circle information according to claim 8, characterized in that: Correcting the classification of circle of friends information based on the sentiment direction of the circle of friends information includes the following sub-steps: If the sentiment direction is positive or no sentiment, the Moments information will be kept in the travel or work category; If the sentiment direction is negative, the category of the Moments information will be changed to daily category.
10. A friend circle information classification system, used to implement the friend circle information classification method according to any one of claims 1 to 9, characterized in that: It includes a keyword extraction module, a classification module, a sentiment analysis module and a classification correction module; the keyword extraction module, the sentiment analysis module and the classification correction module are respectively connected with the classification module data; The keyword extraction module is used to obtain the text of the circle of friends, extract keywords from the text of the circle of friends, and obtain text keywords; The classification module is used to analyze text keywords and classify the Moments information into travel, food, daily life and work categories in combination with Moments pictures; The sentiment analysis module is used to perform sentiment analysis on the text keywords of the circle of friends information if the circle of friends information is about travel or work, so as to obtain the sentiment direction of the circle of friends information; The classification correction module is used to correct the classification of the circle of friends information based on the emotional direction of the circle of friends information.
Citation Information
Patent Citations
Friend circle information classification method and device
CN106682008A