Article data processing method, device, computer readable medium and electronic device
By identifying and adjusting the modifier characteristics of emotional word characteristics in public opinion analysis, the problem of inaccurate recognition of emotional tendency in public opinion analysis is solved, and the accuracy of recognition of emotional tendency is improved.
Patent Information
- Application Number
- CN201910275174.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-06-16
AI Technical Summary
The problem of inaccurate recognition of emotional tendency in public opinion analysis in the prior art is especially due to the failure to effectively consider the influence of modifier characteristics on emotional tendencies.
By identifying the object entities in the article to be processed, extracting the emotional word characteristics and modifier characteristics, and adjusting the weight of the emotional word characteristics based on the modifier characteristics, the emotional score of the article is calculated to determine its emotional tendency.
It improves the accuracy of the recognition of emotional tendencies in the article and ensures that emotional tendencies are more objective and accurate.
Smart Images

Figure CN110162597B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer and communication technology, and in particular to an article data processing method, device, computer-readable medium and electronic device. Background Art
[0002] Public opinion analysis is the process of in-depth processing and analysis of public opinion on a certain focus point to obtain relevant conclusions. The focus of public opinion analysis is to identify the emotional tendency of relevant information articles. However, the inventors have found that the solutions proposed in the relevant technologies usually have the problem of inaccurate emotional tendency identification. Summary of the invention
[0003] The embodiments of the present application provide an article data processing method, device, computer-readable medium and electronic device, which can adjust the influence of sentiment word features on the sentiment tendency of the article by modifying word features at least to a certain extent, thereby improving the recognition accuracy of the sentiment tendency of the article.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to one aspect of an embodiment of the present application, a method for processing article data is provided, comprising: identifying an object entity contained in an article to be processed; extracting sentiment word features and modifier word features for the sentiment word features from the article to be processed; and determining the sentiment tendency of the article to be processed with respect to the object entity based on the sentiment word features and the modifier word features.
[0006] According to one aspect of an embodiment of the present application, an article data processing device is provided, comprising: an identification unit, used to identify an object entity contained in an article to be processed; a first processing unit, used to extract sentiment word features and modifier word features for the sentiment word features from the article to be processed; and a second processing unit, used to determine the sentiment tendency of the article to be processed with respect to the object entity based on the sentiment word features and the modifier word features.
[0007] In some embodiments of the present application, based on the aforementioned scheme, the identification unit is configured to: extract the target object name contained in the object name library from the article to be processed according to a preset object name library; and based on the correspondence between the object name and the object entity, determine the object entity corresponding to the target object name as the object entity contained in the article to be processed.
[0008] In some embodiments of the present application, based on the aforementioned scheme, the recognition unit is also used to: before determining the object entity corresponding to the target object name as the object entity contained in the article to be processed, count the target words contained in the article to be processed whose occurrence times are greater than or equal to a predetermined number; and filter the target object name according to the correlation between the target words and the target object name.
[0009] In some embodiments of the present application, based on the aforementioned scheme, the first processing unit is configured to: extract the sentiment words contained in the sentiment word library from the article to be processed according to a preset sentiment word library as the sentiment word feature; identify the words in the article to be processed that have a predetermined syntactic relationship with the sentiment words according to the sentiment words extracted from the article to be processed; extract modifier words from the words that have a predetermined syntactic relationship with the sentiment words as the modifier word feature.
[0010] In some embodiments of the present application, based on the aforementioned scheme, the second processing unit includes: an adjustment unit, used to adjust the weight of the sentiment word feature modified by the modifier feature according to the modifier feature contained in the article to be processed, so as to obtain the corrected weight of the sentiment word feature; a sentiment score calculation unit, used to calculate the sentiment score of the article to be processed according to the corrected weight of the sentiment word feature; and a determination unit, used to determine the sentiment tendency of the article to be processed towards the object entity based on the sentiment score of the article to be processed.
[0011] In some embodiments of the present application, based on the aforementioned scheme, the adjustment unit is configured as follows: if the modification attribute of the modifier feature is negative modification or inversion modification, the weight of the sentiment word feature modified by the modifier feature is adjusted to the weight of the target word feature, and the sentiment tendency of the target word feature is opposite to the sentiment tendency of the sentiment word feature; if the modification attribute of the modifier feature is question modification, the weight of the sentiment word feature modified by the modifier feature is reset to a set value; if the modification attribute of the modifier feature is degree modification, the weight of the sentiment word feature is adjusted according to the degree of modification of the sentiment word feature by the modifier feature.
[0012] In some embodiments of the present application, based on the aforementioned scheme, the sentiment score calculation unit is configured to: determine the various sentiment word features contained in each paragraph of the article to be processed, and calculate the sentiment score of each paragraph according to the modified weights of the various sentiment word features; determine the sentiment tendency of each paragraph according to the sentiment score of each paragraph; and calculate the sentiment score of the article to be processed according to the sentiment tendency of each paragraph.
[0013] In some embodiments of the present application, based on the aforementioned scheme, the determination unit is configured as: if the sentiment score of the article to be processed is in the score interval corresponding to positive sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be positive; if the sentiment score of the article to be processed is in the score interval corresponding to negative sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be negative; if the sentiment score of the article to be processed is in the score interval corresponding to neutral sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be neutral.
[0014] In some embodiments of the present application, based on the aforementioned scheme, the second processing unit is also used for: if it is not determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative based on the sentiment score of the article to be processed, then identifying the sentiment tendency of the article to be processed with respect to the object entity through a sentiment tendency recognition model; if it cannot be determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative based on the recognition result of the sentiment tendency recognition model, then determining that the sentiment tendency of the article to be processed with respect to the object entity is neutral.
[0015] In some embodiments of the present application, based on the aforementioned scheme, when the sentiment tendency recognition model includes multiple recognition models, the second processing unit is configured as follows: if one of the multiple recognition models recognizes that the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then it is determined that the sentiment tendency of the article to be processed with respect to the object entity is recognized by the sentiment tendency recognition model; if one of the multiple recognition models does not recognize whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the recognition is continued through the next recognition model among the multiple recognition models.
[0016] In some embodiments of the present application, based on the aforementioned scheme, the article data processing device also includes: a third processing unit, used to determine the target object entity to be recommended according to the number of articles and emotional tendencies associated with each object entity, and perform any one or more of the following operations according to the target object entity: recommending the target object entity to be recommended to the user; extracting key sentences from the articles with specified emotional tendencies associated with the target object entity, and recommending the key sentences to the user; extracting keywords from the articles with specified emotional tendencies associated with the target object entity, and recommending the keywords to the user.
[0017] In some embodiments of the present application, based on the aforementioned scheme, the third processing unit is configured to: use as the target object entity an object entity that exists in any one of the following object entity sets or exists in multiple object entity sets at the same time: a first object entity set ranked in the top n1 in popularity, a second object entity set ranked in the top n2 in public opinion index, and a third object entity set ranked in the top n3 in positive sentiment index; or
[0018] Obtain a first object entity set ranked in the top n1 in terms of popularity, obtain a second object entity set ranked in the top n2 in terms of public opinion index from the first object entity set, and obtain object entities ranked in the top n3 in terms of positive sentiment index from the second object entity set as the target object entity; or
[0019] Obtain a first object entity set ranked in the top n1 in terms of popularity, obtain a second object entity set ranked in the top n2 in terms of positive sentiment index from the first object entity set, and obtain object entities ranked in the top n3 in terms of public opinion index from the second object entity set as the target object entity; or
[0020] Obtain a first set of object entities ranked in the top n1 in terms of popularity, and obtain object entities ranked in the top n2 in terms of public opinion index or positive sentiment index from the first set of object entities as the target object entities;
[0021] Among them, the popularity represents the number of related articles that appear in a predetermined time period, the public opinion index represents the difference between the proportion of articles with positive sentiment tendencies and the proportion of articles with negative sentiment tendencies, and the positive sentiment index represents the proportion of articles with positive sentiment tendencies.
[0022] In some embodiments of the present application, based on the aforementioned scheme, the third processing unit is configured to: extract target sentences containing sentiment word features from the article with the specified sentiment tendency; cluster the target sentences based on the similarity between the sentiment word features contained in the target sentences to obtain multiple first clusters; merge the multiple first clusters according to the similarity of the target sentences contained in the multiple first clusters to obtain at least one second cluster; select a target cluster from the at least one second cluster, and extract the key sentences from the target cluster.
[0023] In some embodiments of the present application, based on the aforementioned scheme, the third processing unit is configured to: perform word segmentation processing on the article of the specified emotional tendency, and filter the words obtained by the word segmentation processing to obtain candidate words; calculate the importance score of the candidate word, and determine the relevance score of the candidate word according to the inclusion relationship between the title of the article of the specified emotional tendency and the candidate word; calculate the final score of the candidate word according to the importance score and the relevance score of the candidate word; and select a predetermined number of candidate words as the keywords according to the final score of the candidate word.
[0024] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the article data processing method described in the above embodiment is implemented.
[0025] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the article data processing method as described in the above embodiments.
[0026] In the technical solutions provided in some embodiments of the present application, sentiment word features and modifier word features for the sentiment word features are extracted from the article to be processed, and the sentiment tendency of the article to be processed toward the object entity is determined based on the sentiment word features and the modifier word features, so that the influence of the sentiment word features on the sentiment tendency of the article can be adjusted through the modifier word features, thereby effectively improving the recognition accuracy of the sentiment tendency of the article.
[0027] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0029] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;
[0030] Figure 2 A flowchart of an article data processing method according to an embodiment of the present application is shown;
[0031] Figure 3 A flowchart of identifying object entities contained in an article to be processed according to an embodiment of the present application is shown;
[0032] Figure 4 A flow chart of extracting sentiment word features and modifier word features for the sentiment word features from an article to be processed according to an embodiment of the present application is shown;
[0033] Figure 5 A flow chart of determining the sentiment tendency of a to-be-processed article with respect to an object entity according to sentiment word features and modifier word features according to an embodiment of the present application is shown;
[0034] Figure 6 A flow chart showing the calculation of the sentiment score of a to-be-processed article according to the modified weights of sentiment word features according to an embodiment of the present application is shown;
[0035] Figure 7 A flowchart of an article data processing method according to an embodiment of the present application is shown;
[0036] Figure 8 A flowchart of an article data processing method according to an embodiment of the present application is shown;
[0037] Fig. 9 A flowchart of extracting key sentences from an article with a specified sentiment tendency associated with a target object entity according to an embodiment of the present application is shown;
[0038] Fig.10 A flowchart of extracting keywords from an article with a specified sentiment tendency according to an embodiment of the present application is shown;
[0039] Fig.11 A flowchart of an article data processing method according to an embodiment of the present application is shown;
[0040] Fig.12 A flowchart of individual stock public opinion analysis according to an embodiment of the present application is shown;
[0041] Fig.13 A schematic diagram of extracting modifier features according to an embodiment of the present application is shown;
[0042] Fig.14 A flowchart of sentiment feature analysis according to an embodiment of the present application is shown;
[0043] Fig.15 A schematic diagram showing a modified sentiment word feature according to an embodiment of the present application is shown;
[0044] Fig.16A schematic diagram of the structure of a CNN model according to an embodiment of the present application is shown;
[0045] Fig.17 A flowchart of extracting favorable topics for individual stocks according to an embodiment of the present application is shown;
[0046] Fig.18 A flowchart of extracting public opinion keywords according to an embodiment of the present application is shown;
[0047] Fig.19 and Fig. 20 A schematic diagram showing a terminal display interface obtained by applying the technical solution of an embodiment of the present application is shown;
[0048] Fig.21 A block diagram of an article data processing device according to an embodiment of the present application is shown;
[0049] Fig. 22 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0051] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0053] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0054] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.
[0055] like Figure 1 As shown, the system architecture may include terminal devices (such as Figure 1 The embodiment of the present invention is a schematic diagram of a mobile phone 101, a tablet computer 102, a portable computer 103, a desktop computer, etc., a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the terminal device and the server 105. The network 104 may include various connection types, such as a wired communication link, a wireless communication link, etc.
[0056] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.
[0057] In one embodiment of the present application, the server 105 can collect Figure 1 The information articles published by the terminal device 105 (such as the smart phone 101, tablet computer 102 or portable computer 103 shown in the figure) can be directed to certain object entities, such as stocks, celebrities, hot topics, etc. After the server 105 collects the information articles published by the terminal device, it can identify the object entities contained in these information articles, and then extract the sentiment word features and the modifier word features for the sentiment word features from the information articles, and then determine the sentiment tendency of the collected information articles for the object entity based on the sentiment word features and the modifier word features. It can be seen that since the technical solution of the embodiment of the present application not only considers the sentiment word features contained in the information articles when determining the sentiment tendency of the information articles, but also considers the modifier word features for the sentiment word features, the influence of the sentiment word features on the sentiment tendency of the article can be adjusted by the modifier word features, thereby effectively improving the recognition accuracy of the sentiment tendency of the article.
[0058] It should be noted that the article data processing method provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the article data processing device is generally set in the server 105. However, in other embodiments of the present application, the terminal device may also have similar functions as the server, so as to execute the article data processing method provided in the embodiment of the present application.
[0059] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0060] Figure 2 A flowchart of an article data processing method according to an embodiment of the present application is shown. The article data processing method can be executed by a server, which can be Figure 1 The server 105 shown in FIG. Figure 2 As shown, the article data processing method at least includes steps S210 to S230, which are described in detail as follows:
[0061] In step S210, the object entities contained in the article to be processed are identified.
[0062] In one embodiment of the present application, the articles to be processed may be news information articles, current affairs information articles, commentary articles, article data on content interaction platforms (such as Weibo, Moments, etc.), etc.
[0063] In one embodiment of the present application, the object entity can be anything that needs to be studied, which can not only represent specific things, but also abstract rules, plans or events, etc. For example, the object entity can be a certain stock, a certain celebrity, a certain hot topic, a certain IP (Intellectual Property) entity, etc. IP in a broad sense includes patents, trademarks, copyrights, and copyrights, but in the game, animation, entertainment, literature and film and television industries, IP generally refers mainly to copyrights, and IP works refer to works protected by copyright, including but not limited to film and television works of the same name, literary works, game works, comic works, peripheral works, etc. The form of IP can be varied, it can be a complete story, or it can be a concept, an image or even a sentence, and can be applied to multiple fields such as music, film and television, and games.
[0064] In one embodiment of the present application, Figure 3 As shown, the process of identifying the object entity contained in the article to be processed in step S210 may include the following steps:
[0065] Step S310: According to a preset object name library, the target object name contained in the object name library is extracted from the article to be processed.
[0066] In one embodiment of the present application, the object name is used to represent the name of the object entity, and the object name library may be set in advance according to the object entity to be analyzed, or may be set based on all object entities.
[0067] In one embodiment of the present application, after the target object names contained in the object name library are extracted from the article to be processed, the extracted target object names can also be filtered. For example, the target words contained in the article to be processed whose occurrence times are greater than or equal to a predetermined number can be counted, that is, the high-frequency words contained in the article to be processed can be counted, and then the target object names can be filtered according to the correlation between the target words and the target object names.
[0068] Specifically, since there is a correlation between the high-frequency words contained in the article to be processed and the object name, for example, the object name is "apple", which may refer to Apple or fruit. If the high-frequency words contained in the article to be processed include "mobile phone", "computer", etc., it means that the article is about Apple; if the high-frequency words contained in the article to be processed include "variety", "place of origin", etc., it can be said that the article is about the fruit "apple". Therefore, if the object entity to be analyzed is related to Apple, then if the high-frequency words in the article are "variety", "place of origin", etc., then the object name "apple" extracted from the article to be processed can be filtered out.
[0069] Step S320: Based on the correspondence between the object name and the object entity, the object entity corresponding to the target object name is determined as the object entity included in the article to be processed.
[0070] In one embodiment of the present application, the correspondence between the object name and the object entity can be a one-to-one relationship or a many-to-one relationship, that is, an object entity may have one or more names. For example, the object names "Journey to the West" and "Journey to the West" both correspond to the object entity "Journey to the West".
[0071] Continue to refer to Figure 2 As shown, in step S220, sentiment word features and modifier word features for the sentiment word features are extracted from the article to be processed. Figure 2 The execution order between step S220 and step S210 shown in the figure is not specifically limited. For example, step S210 may be executed first, and then step S220; or step S220 may be executed first, and then step S210; of course, step S210 and step S220 may also be executed simultaneously.
[0072] In one embodiment of the present application, the sentiment word feature represents the sentiment tendency of the article with respect to the object entity, such as "high growth", "risk warning", etc. The modifier word feature for the sentiment word feature is used to modify the sentiment tendency of the sentiment word feature, such as negation modification, question modification, reversal modification, degree modification, etc.
[0073] In one embodiment of the present application, Figure 4 As shown, the process of extracting sentiment word features and modifier word features for the sentiment word features from the article to be processed in step S220 may include the following steps:
[0074] Step S410: extracting the sentiment words contained in the preset sentiment word library from the article to be processed as the sentiment word features.
[0075] In one embodiment of the present application, the sentiment word library can be generated by counting the sentiment words that are more common in a certain field or certain fields. For example, if the object entity is a stock, the sentiment word library can be generated by counting the sentiment words that are more common in the stock field.
[0076] Step S420: identifying words in the article to be processed that have a predetermined syntactic relationship with the sentiment words extracted from the article to be processed.
[0077] In one embodiment of the application, since the modifier modifies the sentiment word, in this case, there is usually a certain syntactic relationship between the modifier and the sentiment word, such as a subject-predicate relationship, a verb-object relationship, etc. Therefore, words that have a predetermined syntactic relationship with the sentiment word can be identified to facilitate extracting the modifier from them.
[0078] Step S430: extracting modifiers from words that have a predetermined syntactic relationship with the sentiment word to serve as the modifier features.
[0079] In one embodiment of the present application, the process of extracting modifiers from words that have a predetermined syntactic relationship with sentiment words can be performed based on a preset modifier word library, or part-of-speech analysis can be performed on the words that have a predetermined syntactic relationship with the sentiment words, and then words with a predetermined part-of-speech (such as adjectives, etc.) are selected as the extracted modifiers.
[0080] Continue to refer to Figure 2 As shown, in step S230, the sentiment tendency of the article to be processed with respect to the object entity is determined according to the sentiment word feature and the modifier word feature.
[0081] In one embodiment of the present application, the sentiment tendency of the article to be processed with respect to the object entity is used to indicate the evaluation tendency of the article to be processed with respect to the object entity, for example, it may be positive (i.e., positive sentiment), neutral (i.e., neutral sentiment), negative (i.e., negative sentiment), etc.
[0082] In one embodiment of the present application, Figure 5 As shown, the process of determining the sentiment tendency of the article to be processed for the object entity according to the sentiment word features and the modifier word features in step S230 includes the following steps S510 to S530, which are described in detail as follows:
[0083] In step S510, according to the modifier word feature contained in the article to be processed, the weight of the sentiment word feature modified by the modifier word feature is adjusted to obtain the modified weight of the sentiment word feature.
[0084] In one embodiment of the present application, modifier features usually have modification attributes, such as negation modification, inversion modification, question modification, degree modification, etc. Due to the different modification attributes, the emotional tendency of the emotional word feature after modification will also change. Therefore, the weight of the emotional word feature modified by the modifier feature can be adjusted according to the modifier feature, which is beneficial to improve the accuracy of the determined emotional tendency of the article.
[0085] In one embodiment of the present application, if the modification attribute of the modifier feature is negative modification or inversion modification, the weight of the sentiment word feature modified by the modifier feature is adjusted to the weight of the target word feature, and the sentiment tendency of the target word feature is opposite to the sentiment tendency of the sentiment word feature.
[0086] It should be noted that negation and inversion modification can convert positive sentiment word features into negative sentiment word features, or vice versa. For example, "xx company's performance failed to achieve rapid growth", where "rapid growth" is a positive sentiment word feature, but adding the negation modifier "failed" turns it into a negative sentiment word; another example is "xx company revokes risk warning", when the negative sentiment word "risk warning" is modified by the inversion word "revoke", it becomes the opposite of the original sentiment tendency.
[0087] In one embodiment of the present application, when the modification attribute of the modifier feature is negative modification or inversion modification, if the sentiment word feature modified by the modifier feature is positive, then the sentiment tendency of the target word feature is negative; if the sentiment word feature modified by the modifier feature is negative, then the sentiment tendency of the target word feature is positive.
[0088] For example, assuming that the weight of the positive sentiment word feature is 1 and the weight of the negative sentiment word feature is -1, then when the modification attribute of the modifier feature is negative modification or inversion modification, if the sentiment word feature modified by the modifier feature is positive, the weight of the sentiment word feature is adjusted from 1 to -1; if the sentiment word feature modified by the modifier feature is negative, the weight of the sentiment word feature is adjusted from -1 to 1.
[0089] For another example, assuming that the weight of the positive sentiment word feature is 3 and the weight of the negative sentiment word feature is 1, then when the modification attribute of the modifier feature is negative modification or inversion modification, if the sentiment word feature modified by the modifier feature is positive, the weight of the sentiment word feature is adjusted from 3 to 1; if the sentiment word feature modified by the modifier feature is negative, the weight of the sentiment word feature is adjusted from 1 to 3.
[0090] In one embodiment of the present application, if the modification attribute of the modifier feature is question modification, the weight of the sentiment word feature modified by the modifier feature is reset to a set value.
[0091] It should be noted that question modification can convert positive or negative sentiment word features into neutral sentiment word features. For example, in the sentence “Can the xx industry still make rapid progress after subsidy reduction?”, the positive sentiment word “make rapid progress” becomes a neutral sentiment word after being modified by question.
[0092] In one embodiment of the present application, resetting the weight of the sentiment word feature modified by the modifier feature to a set value may be resetting the weight of the sentiment word feature modified by the modifier feature to the weight of the neutral sentiment word feature. For example, assuming that the weight of the positive sentiment word feature is 1, the weight of the negative sentiment word feature is -1, and the weight of the neutral sentiment word feature is 0, then in the case where the modification attribute of the modifier feature is interrogative modification, the weight of the sentiment word feature modified by the modifier feature is reset to 0. For another example, assuming that the weight of the positive sentiment word feature is 3, the weight of the negative sentiment word feature is 1, and the weight of the neutral sentiment word feature is 2, then in the case where the modification attribute of the modifier feature is interrogative modification, the weight of the sentiment word feature modified by the modifier feature is reset to 2.
[0093] In one embodiment of the present application, if the modification attribute of the modifier feature is degree modification, the weight of the sentiment word feature is adjusted according to the degree of modification of the modifier feature on the sentiment word feature. For example, if the degree of modification of the sentiment word feature by the modifier feature is higher, the weight adjustment of the sentiment word feature is greater. Specifically, for example, the weight interval of the positive sentiment word feature is 1-5, and the initial weight of the positive sentiment word feature "growth" is 1, then when the modifier feature "slightly" modifies the positive sentiment word feature "growth", the weight of the sentiment word feature "growth" can be adjusted to 2; when the modifier feature "rapidly" modifies the positive sentiment word feature "growth", the weight of the sentiment word feature "growth" can be adjusted to 4.
[0094] Continue to refer to Figure 5 As shown, in step S520, the sentiment score of the article to be processed is calculated according to the modified weight of the sentiment word feature.
[0095] In one embodiment of the present application, the modified weights of the various sentiment word features contained in the article to be processed can be accumulated to obtain the sentiment score of the article to be processed. However, it should be noted that since the number of sentiment word features contained in each paragraph of the article to be processed is different, if a certain paragraph / some paragraphs contain more sentiment word features, then the sentiment score of the article to be processed calculated at last will be greatly affected by this / these paragraphs, which may result in the calculated sentiment score of the article to be processed not being able to objectively reflect the actual sentiment tendency of the article.
[0096] Based on the problems existing in the above embodiments, in one embodiment of the present application, Figure 6 As shown, the process of calculating the sentiment score of the article to be processed according to the modified weight of the sentiment word feature in step S520 may include the following steps:
[0097] Step S610, determining each sentiment word feature contained in each paragraph of the article to be processed, and calculating the sentiment score of each paragraph according to the modified weight of each sentiment word feature.
[0098] In one embodiment of the present application, the modified weights of the sentiment word features contained in each paragraph of the article to be processed can be accumulated to obtain the sentiment score of each paragraph. Alternatively, other statistical values (such as variance, square difference, etc.) can be calculated based on the modified weights of the sentiment word features contained in each paragraph to obtain the sentiment score of each paragraph.
[0099] Step S620: determining the sentiment tendency of each paragraph according to the sentiment score of each paragraph.
[0100] In one embodiment of the present application, different sentiment scores correspond to different sentiment tendencies. For example, a score interval corresponding to positive sentiment, a score interval corresponding to negative sentiment, and a score interval corresponding to neutral sentiment can be set, and then the sentiment tendency of each paragraph is determined based on the interval in which the sentiment score of each paragraph is located.
[0101] Step S630, calculating the sentiment score of the article to be processed according to the sentiment tendency of each paragraph.
[0102] In one embodiment of the present application, the sentiment tendencies of each paragraph in the article to be processed can be counted, and then the sentiment score of the article to be processed can be determined according to the number of paragraphs with various sentiment tendencies. For example, if the number of paragraphs with positive sentiment is the largest, the number of paragraphs with positive sentiment can be used as the sentiment score of the article to be processed; if the number of paragraphs with negative sentiment is the largest, the opposite of the number of paragraphs with negative sentiment can be used as the sentiment score of the article to be processed; if the number of paragraphs with neutral sentiment is the largest, the sentiment score of the article to be processed can be set to a set value (such as 0).
[0103] In one embodiment of the present application, the weight of each paragraph can also be determined according to the sentiment tendency of each paragraph, and then the sentiment score of the article to be processed can be calculated according to the weight of each paragraph. For example, the weight of a paragraph with positive sentiment is 1, the weight of a paragraph with negative sentiment is -1, and the weight of a paragraph with neutral sentiment is 0, then the weights of each paragraph contained in the article to be processed can be accumulated to calculate the sentiment score of the article to be processed.
[0104] Figure 6 The technical solution of the illustrated embodiment can first determine the sentiment tendency of each paragraph, and then calculate the sentiment score of the article to be processed according to the sentiment tendency of each paragraph. Compared with the solution of directly accumulating the modified weights of each sentiment word feature to calculate the sentiment score of the article to be processed, Figure 6 The technical solution of the illustrated embodiment enables the calculated sentiment score of the article to be processed to more objectively and accurately reflect the actual sentiment tendency of the entire article.
[0105] Continue to refer to Figure 5 As shown, in step S530, the sentiment tendency of the article to be processed with respect to the object entity is determined based on the sentiment score of the article to be processed.
[0106] In one embodiment of the present application, score intervals corresponding to various sentiment tendencies can be pre-set, and then the sentiment tendency of the article to be processed can be determined according to the score interval in which the sentiment score of the article to be processed is located. For example, if the sentiment score of the article to be processed is in the score interval corresponding to positive sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be positive; if the sentiment score of the article to be processed is in the score interval corresponding to negative sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be negative; if the sentiment score of the article to be processed is in the score interval corresponding to neutral sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be neutral.
[0107] based on Figure 5 The technical solution of the embodiment shown in the figure, in one embodiment of the present application, as Figure 7 As shown, the following steps may also be included:
[0108] Step S710, if it is not determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative based on the sentiment score of the article to be processed, the sentiment tendency of the article to be processed with respect to the object entity is identified by a sentiment tendency identification model.
[0109] In one embodiment of the present application, the emotion tendency recognition model may be a machine learning model, such as an XGBoost (eXtreme Gradient Boosting) model, a CNN (Convolutional Neural Networks) model, and the like.
[0110] In one embodiment of the present application, assuming that the sentiment tendency recognition model is an XGBoost model, then when training the model, it is necessary to extract feature vectors for multiple sample articles, and then generate training samples based on the feature vectors of the sample articles and the sentiment tendencies of the sample articles, and then train the XGBoost model through the training samples. After the training is completed, feature vectors can be extracted for the articles to be processed, and then the feature vectors of the articles to be processed are input into the trained XGBoost model, and then the model outputs the predicted sentiment tendency.
[0111] In one embodiment of the present application, assuming that the sentiment tendency recognition model is a CNN model, when training the model, training samples can be generated based on multiple sample articles and the sentiment tendencies of the sample articles, and then the CNN model can be trained using the training samples. After the training is completed, the article to be processed can be input into the trained CNN model, and then the model outputs the predicted sentiment tendency.
[0112] In one embodiment of the present application, if the sentiment tendency recognition model only includes one recognition model, then the sentiment tendency of the article to be processed can be directly identified by this one recognition model. If the sentiment tendency recognition model includes multiple recognition models, then if one of the multiple recognition models recognizes that the sentiment tendency of the article to be processed for the object entity is positive or negative, then it is determined that the sentiment tendency of the article to be processed for the object entity is identified by the sentiment tendency recognition model; if one of the multiple recognition models does not recognize that the sentiment tendency of the article to be processed for the object entity is positive or negative, then the next recognition model in the multiple recognition models is used to continue the recognition. For example, the XGBoost model can be used for recognition first. If the XGBoost model does not recognize that the sentiment tendency of the article to be processed for the object entity is positive or negative, then the CNN model is used for recognition again; if the XGBoost model recognizes that the sentiment tendency of the article to be processed for the object entity is positive or negative, then the recognition result can be directly output without the need for recognition by the CNN model.
[0113] Step S720, if it cannot be determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative according to the recognition result of the sentiment tendency recognition model, then it is determined that the sentiment tendency of the article to be processed with respect to the object entity is neutral.
[0114] In one embodiment of the present application, assuming that multiple recognition models cannot determine whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the sentiment tendency of the article to be processed with respect to the object entity can be determined as neutral.
[0115] After determining the sentiment tendency of the article towards the object entity, such as Figure 8 As shown, in one embodiment of the present application, the following steps S810 and S820 may also be included, which are described in detail as follows:
[0116] In step S810, the target object entity to be recommended is determined according to the number of articles and sentiment tendency associated with each object entity.
[0117] In one embodiment of the present application, before introducing how to determine the current entity to be recommended, the following indicators are introduced:
[0118] Popularity: indicates the number of articles related to the object entity that appear in a predetermined time period.
[0119] Public opinion index: represents the difference between the proportion of articles with positive sentiment and the proportion of articles with negative sentiment related to the object entity. For example, the public opinion index can be: (number of articles with positive sentiment - number of articles with negative sentiment) / (number of articles with positive sentiment + number of articles with negative sentiment).
[0120] Positive sentiment index: indicates the proportion of articles with positive sentiment related to the object entity. For example, the positive sentiment index can be: the number of articles with positive sentiment / (the number of articles with positive sentiment + the number of articles with neutral sentiment + the number of articles with negative sentiment).
[0121] In one embodiment of the present application, the first object entity set ranked in the top n1 in popularity can be used as the target object entities to be recommended; or the second object entity set ranked in the top n2 in public opinion index can be used as the target object entities to be recommended; or the third object entity set ranked in the top n3 in positive sentiment index can be used as the target object entities to be recommended.
[0122] In one embodiment of the present application, a first object entity set ranked in the top n1 in popularity and a second object entity set ranked in the top n2 in public opinion index may be obtained, and then the intersection of the first object entity set and the second object entity set may be used as the target object entity to be recommended.
[0123] In one embodiment of the present application, a first object entity set ranked in the top n1 in popularity and a third object entity set ranked in the top n3 in positive sentiment index may be obtained, and then the intersection of the first object entity set and the third object entity set may be used as the target object entity to be recommended.
[0124] In one embodiment of the present application, a second object entity set ranked in the top n2 of the public opinion index and a third object entity set ranked in the top n3 of the positive sentiment index can be obtained, and then the intersection of the second object entity set and the third object entity set can be used as the target object entity to be recommended.
[0125] In one embodiment of the present application, a first object entity set ranked in the top n1 in popularity can be obtained, a second object entity set ranked in the top n2 in public opinion index can be obtained from the first object entity set, and object entities ranked in the top n3 in positive sentiment index can be obtained from the second object entity set as target object entities to be recommended.
[0126] In one embodiment of the present application, a first object entity set ranked in the top n1 in popularity can be obtained, a second object entity set ranked in the top n2 in positive sentiment index can be obtained from the first object entity set, and object entities ranked in the top n3 in public opinion index can be obtained from the second object entity set as target object entities to be recommended.
[0127] In one embodiment of the present application, a first object entity set ranked in the top n1 in popularity may be obtained, and object entities ranked in the top n2 in public opinion index or positive sentiment index may be obtained from the first object entity set as target object entities to be recommended.
[0128] Continue to refer to Figure 8 As shown, in step S820, the target object entity to be recommended is recommended to the user.
[0129] In one embodiment of the present application, the target object entity to be recommended may be recommended to the user by sending a push message, or by displaying the target object entity at a corresponding recommendation position.
[0130] In one embodiment of the present application, after determining the target object entity to be recommended, key sentences can also be extracted from articles with specified sentiment tendencies associated with the target object entity and recommended to the user. Fig. 9 As shown, in one embodiment of the present application, the process of extracting key sentences from an article with a specified sentiment tendency associated with a target object entity may include the following steps:
[0131] Step S910: extracting target sentences containing sentiment word features from the article with the specified sentiment tendency.
[0132] In one embodiment of the present application, the sentences in the article with the specified sentiment tendency can be broken up, and then the target sentences containing sentiment word features can be extracted. Alternatively, the target sentences containing sentiment word features can be directly extracted from the article. The article with the specified sentiment tendency can be an article with a positive sentiment tendency, or an article with a negative sentiment tendency.
[0133] Step S920: clustering the target sentence based on the similarity between the sentiment word features contained in the target sentence to obtain a plurality of first clusters.
[0134] In one embodiment of the present application, if the similarity between two sentiment word features is high, the sentences containing the two sentiment words can be clustered into a cluster. The similarity between the sentiment word features can be determined by calculating the distance between the sentiment word features, such as Euclidean distance, Hamming distance, etc., or by calculating cosine similarity, etc. to determine the similarity between the sentiment word features.
[0135] Step S930: merging the plurality of first clusters according to the similarities of the target sentences included in the plurality of first clusters to obtain at least one second cluster.
[0136] In one embodiment of the present application, the similarities between the sentences included in the two first-category clusters can be calculated one by one, and then the maximum similarity calculated is used as the similarity between the two first-category clusters. The similarity between the two sentences can also be determined by calculating the distance between the two sentences (such as Euclidean distance, Hamming distance, etc.), or by calculating the cosine similarity.
[0137] Step S940: Select a target cluster from the at least one second cluster, and extract the key sentence from the target cluster.
[0138] In one embodiment of the present application, at least one second cluster containing the most sentences may be used as a target cluster.
[0139] In one embodiment of the present application, when extracting key sentences from the target cluster, the frequency of occurrence, length, number of sentiment words, object entities, and whether they are related to the article title of the sentences in the target cluster can be considered for selection. For example, quantification processing can be performed on each dimension, and then the score of the sentence can be calculated by combining the weights set for each dimension, and finally the key sentence can be selected based on the score.
[0140] Fig. 9 The technical solution of the illustrated embodiment enables automatic extraction of key sentences from articles of designated sentiment tendency associated with the target object entity, and can improve the accuracy of the extracted key sentences.
[0141] In one embodiment of the present application, after determining the target object entity to be recommended, keywords can also be extracted from articles with specified sentiment tendencies associated with the target object entity and recommended to the user. Fig.10 As shown, in one embodiment of the present application, the process of extracting keywords from an article with a specified sentiment tendency may include the following steps:
[0142] Step S1001, performing word segmentation processing on the article with the specified sentiment tendency, and filtering the words obtained by the word segmentation processing to obtain candidate words.
[0143] In one embodiment of the present application, the words obtained by the word segmentation process can be filtered according to the stop word list, that is, the words included in the stop word list are filtered out. Of course, the filtering process of the words obtained by the word segmentation process can also be a deduplication process.
[0144] Step S1002, calculating the importance score of the candidate word, and determining the relevance score of the candidate word according to the inclusion relationship between the title of the article with the specified sentiment tendency and the candidate word.
[0145] In one embodiment of the present application, the importance score of the candidate word can be calculated by a scoring model, for example, the importance score of the candidate word can be calculated by a TF-IDF (Term Frequency-Inverse Document Frequency) algorithm model, a TextRank algorithm model, a Word2vec (a related model for generating word vectors) algorithm model, etc.
[0146] In one embodiment of the present application, the candidate words may be scored respectively by using multiple scoring models, and then the importance score of each candidate word may be calculated by weighted summation.
[0147] In one embodiment of the present application, the relevance score of a candidate word is determined based on the inclusion relationship between the title of an article associated with the target object entity and the candidate word. Specifically, if a candidate word is included in the title of an article associated with the target object entity, the relevance score of the candidate word may be a first value (for example, a value greater than 1); if a candidate word is not included in the title of an article associated with the target object entity, the relevance score of the candidate word may be a second value (for example, 1).
[0148] Step S1003, calculating the final score of the candidate word according to the importance score and the relevance score of the candidate word.
[0149] In one embodiment of the present application, the product of the candidate word's importance score and the relevance score may be used as the final score of the candidate word, or the sum of the candidate word's importance score and the relevance score may be used as the final score of the candidate word.
[0150] Step S1004: selecting a predetermined number of candidate words as the keywords according to the final scores of the candidate words.
[0151] In one embodiment of the present application, a predetermined number of candidate words may be selected as keywords in descending order of their final scores. If there are multiple words with similar meanings among the selected keywords, only one of the multiple words may be selected.
[0152] Fig.10 The technical solution of the illustrated embodiment enables automatic extraction of keywords from articles associated with the target object entity and can improve the accuracy of the extracted keywords.
[0153] The following takes the case where the object entity is a stock entity and the article to be processed is a stock-related article as an example to describe the technical solution of the embodiment of the present application in detail:
[0154] In one embodiment of the present application, Fig.11 As shown, the technical solution of the embodiment of the present application may include the following three parts: individual stock public opinion analysis part 1101, news hot stock selection part 1102 and topic and keyword extraction part 1103. The following describes these parts respectively:
[0155] Individual stock public opinion analysis part 1101:
[0156] In one embodiment of the present application, Fig.11 As shown, the main functions of the individual stock public opinion analysis part 1101 include stock entity recognition, article sentiment analysis and public opinion statistics of individual stock related articles. Specifically, the individual stock public opinion analysis part 1101 is mainly used to analyze the sentiment tendency and the stock entity corresponding to the sentiment in paragraphs for each article, and then synthesize the paragraphs to obtain the stock entity involved in the entire article and its positive / negative tendency. Among them, positive means information that causes the stock market to rise, and negative means information that can cause the stock price to fall.
[0157] In one embodiment of the present application, Fig.12 As shown, the individual stock public opinion analysis part 1101 may include step S1201 (i.e., feature extraction step), step S1202 (i.e., sentiment classification step) and step S1203 (i.e., public opinion statistics step). Among them, the feature extraction process in step S1201 is mainly used to extract sentiment features, wherein the sentiment features include not only sentiment word features, but also modifier features. The modifier features can be extracted through 5 (only for example) sub-modules, and the extracted modifier features include 5 feature clusters, namely, negation modification features, question modification features, inversion word modification features, degree word modification features, and regulatory entity word features. After the modifier features are extracted, the sentiment tendency of the sentiment word features towards the stock entity can be corrected through the modifier features.
[0158] In one embodiment of the present application, a sentence containing a negative modifier may be, for example, "xx company's performance failed to achieve rapid growth", where "rapid growth" is a positive sentiment word, but it becomes a negative sentiment word after adding a negative modifier. The negative modification feature can be achieved through a negative element extraction tool.
[0159] In one embodiment of the present application, a sentence containing question modification may be, for example: "With the reduction of subsidies, can the xx industry still make rapid progress?", wherein the positive word "make rapid progress" becomes a neutral word after being modified by the question. The question modification feature can be realized by a question element extraction tool.
[0160] In one embodiment of the present application, a sentence modified with inversion words may be, for example, "xx company withdraws risk warning reminder", wherein the negative word "risk warning" is modified by the inversion word "cancel" to have the opposite sentiment tendency to the original one, and the inversion word modification feature can be extracted based on a manually summarized word list.
[0161] In one embodiment of the present application, a sentence containing a degree word feature may be, for example, "xx's performance increased slightly by 0.5%", "xx's performance increased greatly by 0.5%", wherein these two sentences are modified by the degree word feature, so that the former has a neutral sentiment and the latter has a strong positive tendency. The degree word modification feature can be extracted based on a manually summarized degree word list.
[0162] In one embodiment of the present application, a sentence containing regulatory entity word features may be, for example, "The China Securities Regulatory Commission vigorously promotes xx regulatory matters." Although "vigorously promotes" is a positive word, for some individual stocks, the positive aspect of the regulatory aspect is the negative public opinion about the individual stock.
[0163] In one embodiment of the present application, the extraction of sentiment word features can be performed based on a sentiment word list. After the sentiment word features are extracted, the LTP (Language Technology Platform) dependency syntax analysis module can be used to obtain words that have corresponding syntactic relationships (such as subject-predicate relationships, verb-object relationships, etc.) with the sentiment word features, and then the modifier features of the sentiment word features can be extracted from these words. For example, Fig.13As shown, the negation modification feature can be obtained by using the LTP dependency syntax analysis module to obtain the words that have a corresponding syntactic relationship with the sentiment word feature, and then extracting it through the negation element extraction tool; the question modification feature can be obtained by using the LTP dependency syntax analysis module to obtain the words that have a corresponding syntactic relationship with the sentiment word feature, and then extracting it through the question element extraction tool; the inversion word modification feature can be obtained by using the LTP dependency syntax analysis module to obtain the words that have a corresponding syntactic relationship with the sentiment word feature, and then extracting it through the manually summarized inversion word list (the inversion word list can include, for example, "cancel", " The degree word modification feature can be directly extracted through the manually summarized inversion word list (the inversion word list can, for example, include degree words such as "slightly", "a little", "slightly"), or it can be first obtained through the LTP dependency syntactic analysis module to obtain the words that have the corresponding syntactic relationship with the sentiment word features, and then extracted through the manually summarized inversion word list; the regulatory entity word feature can be extracted through the manually summarized regulatory entity word list (the regulatory entity word list can include regulatory entity words such as "CSRC", "CBRC", and "IPO Examination Committee").
[0164] In one embodiment of the present application, the sentiment word feature can be either a single word or a phrase consisting of multiple words.
[0165] In one embodiment of the present application, Fig.12 The sentiment classification process of step S1202 shown in may include stock entity recognition, sentiment feature analysis, XGBoost model processing, CNN model processing, and the like.
[0166] In one embodiment of the present application, the main process of stock entity identification includes:
[0167] 1. According to the basic stock name dictionary, extract the stock nouns that appear in the article and normalize them to a unified stock entity. For example, the stock nouns "Alibaba" and "Ali" extracted from the article are normalized to a unified stock entity "Alibaba".
[0168] 2. Disambiguate the obtained stock entity. Specifically, the context of the article can be used to determine whether the extracted noun belongs to the stock entity. For example, "apple" refers to Apple Inc. only in a specific context, and refers to fruit in other cases. In an embodiment of the present application, high-frequency feature words in the context of the article can be counted as a basis for determination. For example, if the high-frequency feature words in the article are "mobile phone", "computer", etc., then the "apple" in the article may refer to Apple Inc.
[0169] In one embodiment of the present application, after the stock entity is identified, the sentiment analysis of the article can be performed based on the identified stock entity and the extracted features. The result of the sentiment analysis of the article is mainly obtained by integrating the results of the sentiment feature analysis, XGBoost model and CNN model.
[0170] In one embodiment of the present application, the fusion strategy of sentiment feature analysis, XGBoost model and CNN model may include: giving priority to the results of sentiment feature analysis; if the results of sentiment feature analysis cannot determine whether the article has a positive or negative sentiment tendency, then using the classification results of the XGBoost model; if the classification results of the XGBoost model still cannot determine whether the article has a positive or negative sentiment tendency, then using the classification results of the CNN model; if the classification results of the CNN model still cannot determine whether the article has a positive or negative sentiment tendency, then judging the article to have a neutral sentiment tendency.
[0171] In one embodiment of the present application, the sentiment feature analysis process is mainly used to modify the weight of the sentiment word feature according to the modifier word feature based on the feature extraction in the above embodiment, and then calculate the sentiment tendency of the article. Fig.14 As shown, it mainly includes the following steps:
[0172] Step S1401, sentiment word weight correction.
[0173] In one embodiment of the present application, the weight modification of sentiment words is to adjust the initial weight of each sentiment word according to the modifier. Assuming that the initial weight of positive sentiment words is positive, the initial weight of negative sentiment words is negative, and the initial weight of neutral sentiment words is 0, then Fig.15 As shown, the weight correction of sentiment words mainly includes: for sentiment words modified by negative words, the weight is reversed, that is, the initial weight of the sentiment word is multiplied by -1; for sentiment words modified by question words, the weight is reset to 0; for sentiment words modified by reverse words, the weight is reversed, that is, the initial weight of the sentiment word is multiplied by -1; for sentiment words modified by degree words, the initial weight of the sentiment word can be adjusted according to the degree of modification of the degree words, for example, the initial weight of the sentiment word modified by the degree words can be multiplied by a coefficient, the size of the coefficient is positively correlated with the degree of modification of the degree words, that is, the higher the degree of modification, the larger the value of the coefficient.
[0174] Step S1402: sentiment words are counted to obtain the sentiment tendency of the paragraph.
[0175] In one embodiment of the present application, after the weight of the sentiment word is corrected, the weight of the sentiment word contained in each paragraph of the article can be accumulated to obtain the sentiment score of each paragraph, and then the sentiment tendency of each paragraph is determined according to the sentiment score of each paragraph. For example, if the weight of the positive sentiment word is 1, the weight of the neutral sentiment word is 0, and the weight of the negative sentiment word is -1, then if the sentiment score of the paragraph is greater than 3, it means that the sentiment tendency of the paragraph is positive; if the sentiment score of the paragraph is less than -3, it means that the sentiment tendency of the paragraph is negative; if the sentiment score of the paragraph is greater than or equal to -3 and less than or equal to 3, it means that the sentiment tendency of the paragraph is neutral.
[0176] Step S1403: The sentiment tendency of the article is obtained by analyzing the sentiment statistics of the paragraphs.
[0177] In one embodiment of the present application, the weight of each paragraph can be determined according to the sentiment tendency of each paragraph, and then the sentiment score of the article can be calculated by accumulating the weights of each paragraph, and then the sentiment tendency of the article can be determined according to the sentiment score of the article. For example, if the sentiment tendency of a paragraph is positive, the weight of the paragraph is 1; if the sentiment tendency of the paragraph is neutral, the weight of the paragraph is 0; if the sentiment tendency of the paragraph is negative, the weight of the paragraph is -1, and then the sentiment score of the article can be calculated by accumulating the weights of each paragraph, and the sentiment tendency of the article can be determined according to the interval in which the sentiment score of the article is located.
[0178] In one embodiment of the present invention, the sentiment scores of each paragraph may be directly accumulated to obtain the sentiment score of the article, and then the sentiment tendency of the article may be determined according to the interval in which the sentiment score of the article is located.
[0179] In one embodiment of the present application, if the emotional tendency of the article is not determined to be positive or negative by the mode of emotional feature analysis, it can be determined by the XGBoost model. In an embodiment of the present application, the XGBoost model can use 8539 emotional words (the number of emotional words extracted in one embodiment of the present application, only examples here), negative modifiers, interrogative modifiers, inversion words corresponding to positive emotional words, inversion words corresponding to negative emotional words, degree words corresponding to positive emotional words, degree words corresponding to negative emotional words, regulatory words, article paragraphs, article stock entity number, etc., a total of 8755 features (the number of features extracted in one embodiment of the present application, only examples here), using one-hot (Chinese interpretation is "only hot", a way for representing words, words) embedding (word embedding) mode training to obtain the XGBoost model. Specifically, a training sample is generated according to the feature vector of the sample article and the emotional tendency of the sample article, and then the XGBoost model is trained by the training sample. After the XGBoost model is trained, the features of the article whose sentiment tendency needs to be determined can be input into the XGBoost model, and then the XGBoost model can output the score of the article belonging to a certain sentiment tendency.
[0180] In one embodiment of the present application, in order to ensure the accuracy of the determined sentiment tendency of the article, articles with low positive tendency and negative tendency scores output by the XGBoost model can still be classified as neutral articles for further determination through the CNN model.
[0181] In one embodiment of the present application, Fig.16 As shown in the figure, the architecture of the CNN model includes: a word representation layer for extracting article features, a convolution layer for performing convolution operations, a max pooling layer for reducing the size of the parameter matrix to reduce the amount of calculation, a concatenate layer for fusing features, a dense layer for classification processing, and a normalization layer (softmax layer) for normalizing the output results. When training the CNN model, training samples can be generated based on multiple sample articles and the sentiment tendencies of the sample articles, and then the CNN model can be trained using the training samples. After the training is completed, the article to be processed can be input into the trained CNN model, and the model outputs the predicted sentiment tendencies.
[0182] Based on the technical solution of the above embodiment of the present application, in one embodiment of the present application, the effect of the technical solution of the embodiment of the present application was tested through 958 test samples (i.e., 958 articles), and the specific test results are shown in Table 1:
[0183]
[0184]
[0185] Table 1
[0186] Table 1 shows the difference between the machine judgment result (i.e. the result output by the sentiment feature analysis) and the labeled result (i.e. the actual sentiment tendency of the article) when the sentiment tendency of the article is determined by sentiment feature analysis; and shows the difference between the machine judgment result (i.e. the result output after the sentiment feature analysis and XGBoost model processing) and the labeled result (i.e. the actual sentiment tendency of the article) when the sentiment tendency of the article is determined by sentiment feature analysis and XGBoost model; and also shows the difference between the machine judgment result (i.e. the result output after the sentiment feature analysis, XGBoost model and CNN model processing) and the labeled result (i.e. the actual sentiment tendency of the article) when the sentiment tendency of the article is determined by sentiment feature analysis, XGBoost model and CNN model.
[0187] Referring to Table 1, it can be seen that the sentiment tendency of the article determined only by sentiment feature analysis has the highest accuracy, but the recall rate is low; while the scheme determined by sentiment feature analysis, XGBoost model and CNN model has a high recall rate but a low accuracy rate. Therefore, in actual use, the corresponding method can be selected according to the requirements of accuracy and recall rate to determine the sentiment tendency of the article for stock entities.
[0188] In one embodiment of the present application, Fig.12 The public opinion statistics process of step S1203 shown in the figure mainly counts the public opinions of each stock entity according to the sentiment tendencies of each article towards the stock entity determined in the above embodiment, and then displays the public opinion trends of the stocks, such as displaying the public opinion changes and public opinion ranking information within a period of time (such as 10 days).
[0189] The following introduction Fig.11 The news hot stock selection section shown in section 1102:
[0190] In one embodiment of the present application, the news hot stock selection part 1102 mainly selects hot stocks based on statistics, and then selects favorable stocks based on public opinion analysis. Specifically, favorable hot stocks can be selected based on three indicators of individual stocks, including heat, public opinion index and favorable proportion. Among them, "heat" represents the total amount of news about individual stocks in a fixed time period; "public opinion index" is (number of positive emotions-number of negative emotions) / (number of positive emotions+number of negative emotions); "favorable proportion" is the number of positive emotions / (number of positive emotions+number of neutral emotions+number of negative emotions).
[0191] In one embodiment of the present application, the top 50 in popularity ranking, the top 50 in public opinion index ranking, and the top 50 in favorable share ranking can be selected, and then a list of favorable stock entities can be selected by taking the intersection method (the specific values in this embodiment are only examples).
[0192] The following introduction Fig.11 The topic and keyword extraction part 1103 shown in FIG.
[0193] In one embodiment of the present application, the topic and keyword extraction part 1103 mainly includes a process of extracting favorable topics for individual stocks and a process of extracting keywords for public opinion on individual stocks.
[0194] like Fig.17 As shown, in one embodiment of the present application, the process of extracting favorable topics for individual stocks is to extract key sentences from articles related to individual stocks, which may include the following steps:
[0195] Step S1701, sentence clustering based on sentiment words.
[0196] In one embodiment of the present application, after selecting favorable stocks based on the above embodiment, all favorable news articles about the stock within a period of time (such as the day) can be obtained, these favorable news articles can be broken down into sentences, and sentences containing sentiment words can be extracted, and then the sentences containing sentiment words can be clustered according to the similarity between the sentiment words.
[0197] Step S1702: clustering based on sentence similarity.
[0198] In one embodiment of the present application, after clustering the sentences to obtain multiple clusters, the similarities between the sentences contained in two clusters can be calculated one by one, and then the calculated maximum similarity can be used as the similarity between the two clusters, and the clusters can be further clustered based on the similarity between the clusters.
[0199] Step S1703, selecting a representative sentence in the cluster as a favorable topic for individual stocks.
[0200] In one embodiment of the present application, a representative sentence (i.e., a key sentence) can be selected from the cluster containing the most sentences as a favorable topic for individual stocks. When selecting a representative sentence, the frequency of occurrence, length, number of sentiment words contained, object entities contained, and whether it is related to the title of the article of each sentence in the cluster can be considered for comprehensive selection. For example, each dimension can be quantified, and then the score of the sentence can be calculated in combination with the weights set for each dimension, and finally the representative sentence can be selected based on the score.
[0201] like Fig.18 As shown, in one embodiment of the present application, the process of extracting keywords for public opinion on individual stocks may include the following steps:
[0202] Step S1801, segment the article body and remove the stop words to obtain a candidate word set S seg .
[0203] In one embodiment of the present application, a word segmenter may be used to perform word segmentation processing on the article body, and then stop words therein may be filtered out according to a stop word list.
[0204] Step S1802, performing relevance calculation based on the obtained candidate words and the article title to obtain the relevance score of each candidate word.
[0205] In one embodiment of the present application, for the candidate word set S seg Each candidate word in i If it does not appear in the article title, its relevance score is i is 1; if it appears in the article title, its relevance score is i Set to a value greater than 1. The specific numerical values in this embodiment are just examples.
[0206] It should be noted that the embodiment of the present application does not specifically limit the execution order of step S1801 and step S1802. For example, step S1801 may be executed first, and then step S1802; or step S1802 may be executed first, and then step S1801; or step S1801 and step S1802 may be executed at the same time.
[0207] Step S1803, scoring each candidate word using multiple scoring models.
[0208] In one embodiment of the present application, for example, each candidate word can be scored using a TF-IDF algorithm model, a TextRank algorithm model, or a Word2vec algorithm model, and the three scores obtained for each candidate word are: s1, s2, and s3.
[0209] Step S1804, calculating the importance score of each candidate word according to the scoring results of multiple scoring models.
[0210] In one embodiment of the present application, the importance score of each candidate word is where w j Indicates the fraction s j The weight of imp i Represents the importance score of the i-th candidate word.
[0211] Step S1805, calculating the final score of each candidate word according to the importance score and relevance score of each candidate word.
[0212] In one embodiment of the present application, the final score of each candidate word can be expressed as: final_score i =imp i ×rele i , where final_score i Represents the final score of the i-th candidate word.
[0213] Step S1806, post-processing is performed according to the final score of each candidate word, and finally the obtained keywords are output.
[0214] In one embodiment of the present application, post-processing of each candidate word includes: (a) de-duplication, that is, only one identical candidate word is retained; (b) part-of-speech screening, that is, screening out words that can be used for display, such as nouns, verbs, and adjectives; (c) sorting, that is, sorting the candidate words according to the final score final_score i (d) Sort in descending order; (d) Sort by final_score i In descending order, output the top k words, where k is the number of keywords to be displayed. Considering the diversity of keywords, only one of the keywords with similar meanings can be displayed.
[0215] Fig.18 The technical solution of the illustrated embodiment can extract keywords from an article by combining the scoring results of multiple scoring models and the relationship between candidate words and article titles, thereby effectively improving the accuracy of the extracted keywords.
[0216] Fig.19 and Fig. 20 The following is a schematic diagram showing a terminal display interface obtained by applying the technical solution of the embodiment of the present application. Fig.19As shown, in one embodiment of the present application, a stock list 1901 can be displayed on the stock selection interface of the application, and each piece of information in the stock list 1901 includes: the stock name, public opinion articles 1902 related to the stock, public opinion keywords 1903, and the public opinion percentage 1904 obtained by statistics. Fig. 20 As shown, after selecting any stock, the detailed interface of the stock can be displayed, which displays public opinion statistical information 2001, public opinion keywords 2002, related article information, and key sentences 2003 extracted from the article information.
[0217] In one embodiment of the present application, Fig. 20 As shown, when the user clicks the "locate and view" control near the key sentence 2003, the user can jump to the display interface of the article and directly locate the location of the key sentence, so that the user can read the key sentence in the article and reduce the time cost of reading.
[0218] In the above embodiments, the technical solution of the embodiments of the present application is explained by taking the object entity as a stock entity as an example. It should be noted that in other embodiments of the present application, the object entity may also be other entities, such as a celebrity, a hot topic, an IP entity, etc.
[0219] The following describes an apparatus embodiment of the present application, which can be used to execute the article data processing method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the article data processing method of the present application.
[0220] Fig.21 A block diagram of an article data processing device according to an embodiment of the present application is shown.
[0221] Reference Fig.21 As shown, according to an embodiment of the present application, an article data processing device 2100 includes: an identification unit 2102 , a first processing unit 2104 and a second processing unit 2106 .
[0222] Among them, the identification unit 2102 is used to identify the object entity contained in the article to be processed; the first processing unit 2104 is used to extract sentiment word features and modifier word features for the sentiment word features from the article to be processed; the second processing unit 2106 is used to determine the sentiment tendency of the article to be processed towards the object entity based on the sentiment word features and the modifier word features.
[0223] In some embodiments of the present application, the identification unit 2102 is configured to: extract the target object name contained in the object name library from the article to be processed according to a preset object name library; and determine the object entity corresponding to the target object name as the object entity contained in the article to be processed based on the correspondence between the object name and the object entity.
[0224] In some embodiments of the present application, the identification unit 2102 is also used to: before determining the object entity corresponding to the target object name as the object entity contained in the article to be processed, count the target words contained in the article to be processed whose occurrence times are greater than or equal to a predetermined number; and filter the target object name according to the correlation between the target words and the target object name.
[0225] In some embodiments of the present application, the first processing unit 2104 is configured to: extract the sentiment words contained in the sentiment word library from the article to be processed according to a preset sentiment word library as the sentiment word feature; identify the words in the article to be processed that have a predetermined syntactic relationship with the sentiment words according to the sentiment words extracted from the article to be processed; extract modifier words from the words that have a predetermined syntactic relationship with the sentiment words as the modifier word feature.
[0226] In some embodiments of the present application, the second processing unit 2106 includes: an adjustment unit, used to adjust the weight of the sentiment word feature modified by the modifier feature according to the modifier feature contained in the article to be processed, so as to obtain the corrected weight of the sentiment word feature; a sentiment score calculation unit, used to calculate the sentiment score of the article to be processed according to the corrected weight of the sentiment word feature; and a determination unit, used to determine the sentiment tendency of the article to be processed towards the object entity based on the sentiment score of the article to be processed.
[0227] In some embodiments of the present application, the adjustment unit is configured as follows: if the modification attribute of the modifier feature is negative modification or inversion modification, the weight of the sentiment word feature modified by the modifier feature is adjusted to the weight of the target word feature, and the sentiment tendency of the target word feature is opposite to the sentiment tendency of the sentiment word feature; if the modification attribute of the modifier feature is question modification, the weight of the sentiment word feature modified by the modifier feature is reset to a set value; if the modification attribute of the modifier feature is degree modification, the weight of the sentiment word feature is adjusted according to the degree of modification of the sentiment word feature by the modifier feature.
[0228] In some embodiments of the present application, the sentiment score calculation unit is configured to: determine the sentiment word features contained in each paragraph of the article to be processed, and calculate the sentiment score of each paragraph based on the modified weights of the each sentiment word features; determine the sentiment tendency of each paragraph based on the sentiment score of each paragraph; and calculate the sentiment score of the article to be processed based on the sentiment tendency of each paragraph.
[0229] In some embodiments of the present application, the determination unit is configured as follows: if the sentiment score of the article to be processed is in the score interval corresponding to positive sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be positive; if the sentiment score of the article to be processed is in the score interval corresponding to negative sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be negative; if the sentiment score of the article to be processed is in the score interval corresponding to neutral sentiment, then the sentiment tendency of the article to be processed with respect to the object entity is determined to be neutral.
[0230] In some embodiments of the present application, the second processing unit 2106 is also used for: if it is not determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative based on the sentiment score of the article to be processed, then identifying the sentiment tendency of the article to be processed with respect to the object entity through a sentiment tendency recognition model; if it cannot be determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative based on the recognition result of the sentiment tendency recognition model, then determining that the sentiment tendency of the article to be processed with respect to the object entity is neutral.
[0231] In some embodiments of the present application, when the sentiment tendency recognition model includes multiple recognition models, the second processing unit 2106 is configured as follows: if one of the multiple recognition models recognizes that the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then it is determined that the sentiment tendency of the article to be processed with respect to the object entity is recognized by the sentiment tendency recognition model; if one of the multiple recognition models does not recognize whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the recognition is continued by the next recognition model among the multiple recognition models.
[0232] In some embodiments of the present application, the article data processing device 2100 also includes: a third processing unit, used to determine the target object entity to be recommended based on the number of articles and sentiment tendencies associated with each object entity, and perform any one or more of the following operations based on the target object entity: recommending the target object entity to be recommended to the user; extracting key sentences from articles with specified sentiment tendencies associated with the target object entity, and recommending the key sentences to the user; extracting keywords from articles with specified sentiment tendencies associated with the target object entity, and recommending the keywords to the user.
[0233] In some embodiments of the present application, the third processing unit is configured to: use as the target object entity an object entity that exists in any one of the following object entity sets or exists in multiple object entity sets at the same time: a first object entity set ranked in the top n1 in popularity, a second object entity set ranked in the top n2 in public opinion index, and a third object entity set ranked in the top n3 in positive sentiment index; or
[0234] Obtain a first object entity set ranked in the top n1 in terms of popularity, obtain a second object entity set ranked in the top n2 in terms of public opinion index from the first object entity set, and obtain object entities ranked in the top n3 in terms of positive sentiment index from the second object entity set as the target object entity; or
[0235] Obtain a first object entity set ranked in the top n1 in terms of popularity, obtain a second object entity set ranked in the top n2 in terms of positive sentiment index from the first object entity set, and obtain object entities ranked in the top n3 in terms of public opinion index from the second object entity set as the target object entity; or
[0236] Obtain a first set of object entities ranked in the top n1 in terms of popularity, and obtain object entities ranked in the top n2 in terms of public opinion index or positive sentiment index from the first set of object entities as the target object entities;
[0237] Among them, the popularity represents the number of related articles that appear in a predetermined time period, the public opinion index represents the difference between the proportion of articles with positive sentiment tendencies and the proportion of articles with negative sentiment tendencies, and the positive sentiment index represents the proportion of articles with positive sentiment tendencies.
[0238] In some embodiments of the present application, the third processing unit is configured to: extract target sentences containing sentiment word features from the article with the specified sentiment tendency; cluster the target sentences based on the similarity between the sentiment word features contained in the target sentences to obtain multiple first clusters; merge the multiple first clusters according to the similarity of the target sentences contained in the multiple first clusters to obtain at least one second cluster; select a target cluster from the at least one second cluster, and extract the key sentence from the target cluster.
[0239] In some embodiments of the present application, the third processing unit is configured to: perform word segmentation on the article with the specified emotional tendency, and filter the words obtained by the word segmentation to obtain candidate words; calculate the importance score of the candidate word, and determine the relevance score of the candidate word based on the inclusion relationship between the title of the article with the specified emotional tendency and the candidate word; calculate the final score of the candidate word based on the importance score and the relevance score of the candidate word; and select a predetermined number of candidate words as the keywords based on the final score of the candidate word.
[0240] Fig. 22 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0241] It should be noted that Fig. 22 The computer system 2200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0242] like Fig. 22 As shown, the computer system 2200 includes a central processing unit (CPU) 2201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 2202 or the program loaded from the storage part 2208 to the random access memory (RAM) 2203, such as executing the method described in the above embodiment. In the RAM 2203, various programs and data required for system operation are also stored. The CPU 2201, ROM 2202 and RAM 2203 are connected to each other through a bus 2204. An input / output (I / O) interface 2205 is also connected to the bus 2204.
[0243] The following components are connected to the I / O interface 2205: an input section 2206 including a keyboard, a mouse, etc.; an output section 2207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 2208 including a hard disk, etc.; and a communication section 2209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 2209 performs communication processing via a network such as the Internet. A drive 2210 is also connected to the I / O interface 2205 as needed. A removable medium 2211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 2210 as needed so that a computer program read therefrom is installed into the storage section 2208 as needed.
[0244] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 2209, and / or installed from the removable medium 2211. When the computer program is executed by the central processing unit (CPU) 2201, various functions defined in the system of the present application are executed.
[0245] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0246] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0247] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0248] As one aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0249] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0250] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0251] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0252] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for processing article data, characterized in that: include: Identify an object entity contained in an article to be processed, wherein the article to be processed is a stock-related article, and the object entity is a stock entity; Extracting sentiment word features and modifier word features for the sentiment word features from the article to be processed; Determining the sentiment tendency of the article to be processed with respect to the object entity according to the sentiment word feature and the modifier word feature; If it is not determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the sentiment tendency of the article to be processed with respect to the object entity is identified in sequence by using multiple sentiment tendency recognition models, and whenever one of the multiple sentiment tendency recognition models fails to identify whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the next sentiment tendency recognition model is used to continue identifying the sentiment tendency of the article to be processed with respect to the object entity; If it cannot be determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative according to the recognition results of the multiple sentiment tendency recognition models, it is determined that the sentiment tendency of the article to be processed with respect to the object entity is neutral.
2. The article data processing method according to claim 1, characterized in that: Identify the object entities contained in the article to be processed, including: According to a preset object name library, extracting the target object name contained in the object name library from the article to be processed; Based on the correspondence between the object name and the object entity, the object entity corresponding to the target object name is determined as the object entity included in the article to be processed.
3. The article data processing method according to claim 2, characterized in that: Before determining the object entity corresponding to the target object name as the object entity included in the article to be processed, the method further includes: Counting target words in the article to be processed whose occurrence times are greater than or equal to a predetermined number; The target object name is filtered according to the correlation between the target word and the target object name.
4. The article data processing method according to claim 1, characterized in that: Extracting sentiment word features and modifier word features for the sentiment word features from the article to be processed includes: According to a preset sentiment word library, sentiment words contained in the sentiment word library are extracted from the article to be processed to serve as the sentiment word features; According to the sentiment words extracted from the article to be processed, identifying words in the article to be processed that have a predetermined syntactic relationship with the sentiment words; Modifiers are extracted from words that have a predetermined syntactic relationship with the sentiment word to serve as the modifier features.
5. The article data processing method according to claim 1, characterized in that: Determining the sentiment tendency of the article to be processed with respect to the object entity according to the sentiment word feature and the modifier word feature includes: According to the modifier word feature contained in the article to be processed, the weight of the sentiment word feature modified by the modifier word feature is adjusted to obtain the modified weight of the sentiment word feature; Calculating the sentiment score of the article to be processed according to the modified weight of the sentiment word feature; The sentiment tendency of the article to be processed with respect to the object entity is determined based on the sentiment score of the article to be processed.
6. The article data processing method according to claim 5, characterized in that: According to the modifier word features contained in the article to be processed, the weight of the sentiment word features modified by the modifier word features is adjusted, including: If the modification attribute of the modifier feature is negative modification or inversion modification, the weight of the sentiment word feature modified by the modifier feature is adjusted to the weight of the target word feature, and the sentiment tendency of the target word feature is opposite to the sentiment tendency of the sentiment word feature; If the modification attribute of the modifier feature is question modification, the weight of the sentiment word feature modified by the modifier feature is reset to a set value; If the modification attribute of the modifier feature is degree modification, the weight of the sentiment word feature is adjusted according to the degree of modification of the sentiment word feature by the modifier feature.
7. The article data processing method according to claim 5, characterized in that: Calculating the sentiment score of the article to be processed according to the modified weight of the sentiment word feature includes: Determine each sentiment word feature contained in each paragraph of the article to be processed, and calculate the sentiment score of each paragraph according to the modified weight of each sentiment word feature; Determining the sentiment tendency of each paragraph according to the sentiment score of each paragraph; The sentiment score of the article to be processed is calculated according to the sentiment tendencies of the various paragraphs.
8. The article data processing method according to any one of claims 1 to 7, characterized in that: Also includes: According to the number of articles and sentiments associated with each object entity, determine the target object entity to be recommended, and perform one or more of the following operations according to the target object entity: Recommending the target object entity to be recommended to the user; extracting key sentences from articles with designated sentiment tendencies associated with the target object entity, and recommending the key sentences to the user; Keywords are extracted from articles with designated sentiment tendencies associated with the target object entity, and the keywords are recommended to users.
9. The article data processing method according to claim 8, characterized in that: According to the number of articles and sentiments associated with each object entity, the target object entity to be recommended is determined, including: Take as the target object entity any object entity set or object entities that exist in multiple object entity sets at the same time: the first object entity set ranked in the top n1 in popularity, the second object entity set ranked in the top n2 in public opinion index, and the third object entity set ranked in the top n3 in positive sentiment index; or Obtain a first object entity set ranked in the top n1 in terms of popularity, obtain a second object entity set ranked in the top n2 in terms of public opinion index from the first object entity set, and obtain object entities ranked in the top n3 in terms of positive sentiment index from the second object entity set as the target object entity; or Obtain a first object entity set ranked in the top n1 in terms of popularity, obtain a second object entity set ranked in the top n2 in terms of positive sentiment index from the first object entity set, and obtain object entities ranked in the top n3 in terms of public opinion index from the second object entity set as the target object entity; or Obtain a first set of object entities ranked in the top n1 in terms of popularity, and obtain object entities ranked in the top n2 in terms of public opinion index or positive sentiment index from the first set of object entities as the target object entities; Among them, the popularity represents the number of related articles that appear in a predetermined time period, the public opinion index represents the difference between the proportion of articles with positive sentiment tendencies and the proportion of articles with negative sentiment tendencies, and the positive sentiment index represents the proportion of articles with positive sentiment tendencies.
10. The article data processing method according to claim 8, characterized in that: Extract key sentences from articles with specified sentiment tendency associated with the target object entity, including: Extracting target sentences containing sentiment word features from the article with the specified sentiment tendency; Clustering the target sentences based on the similarity between the sentiment word features contained in the target sentences to obtain a plurality of first-category clusters; According to the similarities of the target sentences included in the plurality of first clusters, the plurality of first clusters are merged to obtain at least one second cluster; A target cluster is selected from the at least one second cluster, and the key sentence is extracted from the target cluster.
11. The article data processing method according to claim 8, characterized in that: Extracting keywords from articles with specified sentiment tendencies associated with the target object entity includes: Performing word segmentation processing on the article with the specified sentiment tendency, and filtering the words obtained by the word segmentation processing to obtain candidate words; Calculating the importance score of the candidate word, and determining the relevance score of the candidate word according to the inclusion relationship between the title of the article with the specified sentiment tendency and the candidate word; Calculating a final score of the candidate word according to the importance score of the candidate word and the relevance score; A predetermined number of candidate words are selected as the keywords according to the final scores of the candidate words.
12. An article data processing device, characterized in that: include: An identification unit, used for identifying an object entity contained in a to-be-processed article, wherein the to-be-processed article is a stock-related article, and the object entity is a stock entity; A first processing unit is used to extract sentiment word features and modifier word features for the sentiment word features from the article to be processed; A second processing unit, configured to determine the sentiment tendency of the article to be processed with respect to the object entity according to the sentiment word feature and the modifier word feature; The device is also used for: If it is not determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the sentiment tendency of the article to be processed with respect to the object entity is identified in sequence by using multiple sentiment tendency recognition models, and whenever one of the multiple sentiment tendency recognition models fails to identify whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative, then the next sentiment tendency recognition model is used to continue identifying the sentiment tendency of the article to be processed with respect to the object entity; If it cannot be determined whether the sentiment tendency of the article to be processed with respect to the object entity is positive or negative according to the recognition results of the multiple sentiment tendency recognition models, it is determined that the sentiment tendency of the article to be processed with respect to the object entity is neutral.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the article data processing method according to any one of claims 1 to 11 is implemented.
14. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the article data processing method according to any one of claims 1 to 11.
