Entity sentiment analysis method, system, storage medium and electronic device

Through the AlBert model and mask mechanism entity sentiment analysis method, the problem of large granularity of corporate entity sentiment analysis in news and public opinion in smart investment promotion is solved, more accurate sentiment analysis and decision-making support is achieved, and business efficiency and accuracy are improved.

CN114003694BActive Publication Date: 2024-11-26BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111283577.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2024-11-26
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

In smart investment projects, the existing news public sentiment analysis methods are relatively large in size, and it is impossible to accurately judge the emotional polarity of each company entity in the news, resulting in business decision-making errors.

Method used

The entity sentiment analysis method based on the AlBert model is adopted to obtain public opinion information through crawler scripts, use entity recognition model to identify the public opinion entity name to be predicted, and build an entity sentiment analysis model through the mask mechanism, process the public opinion entity name and text information to be predicted, and obtain each The emotional polarity of an entity.

Benefits of technology

The accuracy and prediction performance of sentiment analysis are improved, and the model accuracy rate reaches 89%, which can more accurately judge the emotional polarity of the company, help business personnel make more reasonable decisions, and save costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114003694B_ABST
    Figure CN114003694B_ABST
Patent Text Reader

Abstract

The present application discloses an entity sentiment analysis method, system, storage medium and electronic device. The entity sentiment analysis method includes: an acquisition step: obtaining public opinion information from a website through a crawler script, and storing the public opinion information in a database; an identification step: obtaining the public opinion text information to be predicted from the database, using an entity recognition model to identify the public opinion text information to be predicted, and obtaining at least one public opinion entity name to be predicted; a sentiment polarity acquisition step: constructing and using an entity sentiment analysis model to process the public opinion entity name to be predicted and the public opinion text information to be predicted, obtaining the entity sentiment polarity corresponding to each public opinion entity name to be predicted and saving it in a data table. The present invention connects user behavior + WeChat ecological open data + business data + session data to provide key nodes for users in multi-touchpoints and enterprise-micro touchpoint sessions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of entity sentiment analysis, and specifically relates to an entity sentiment analysis method, system, storage medium and electronic device. Background Art

[0002] Modern industrial parks have gradually developed with the development of the economic environment. However, with the continuous changes in the economy, the traditional investment promotion model, which mainly relies on offline face-to-face communication and dissemination such as investment environment assessment reports, investment promotion manuals, and investment promotion videos, has many shortcomings such as large time constraints, small coverage, and high costs. It can no longer meet the investment promotion needs of industrial parks, and the investment promotion model is in urgent need of transformation. Smart investment promotion is a new model of investment promotion that is actively explored by local governments and parks. Smart investment promotion is the application of big data and Internet technology to the practical experience of park investment promotion. It uses modern high-tech means such as big data and cloud computing to solve the problems of investment promotion and operation difficulties for parks and investment difficulties for enterprises. It breaks through the limitations of time and region, improves investment promotion efficiency, and saves a lot of manpower and material costs.

[0003] In the process of smart investment promotion, the main focus is on the relevant dynamics of the enterprise. In news and public opinion, a large amount of enterprise-related dynamics can be obtained, so it has also become an important source of reference information for business personnel to find decision-making. However, the explosive growth of information has significantly increased the difficulty of obtaining useful information from it. For example, in the same news text, there may be different sentiment polarities for different companies. However, how to judge the sentiment polarity of different companies in the same news and public opinion is a technical problem that needs to be solved urgently. However, in the current smart investment promotion projects, there is still a lack of relevant solutions for sentiment analysis of corporate entities in news and public opinion.

[0004] In the current smart investment promotion tasks, sentiment analysis of news public opinion only stays at the chapter level and sentence level. The methods of paragraph-level and sentence-level sentiment analysis only deal with the difference in the length of the object text. They assume that a text has only one sentiment, and analyze the given text to determine whether its overall sentiment polarity is positive, negative, or neutral. Based on the sentiment polarity of the entire news public opinion and the company entities in the current text, the sentiment polarity of the company in the public opinion news is further inferred. At present, the research technology for sentiment analysis of the entire text has become relatively mature and has achieved good performance.

[0005] However, in smart investment promotion, the method of overall sentiment analysis of the text will obscure the specific details in the public opinion news. Moreover, the sentiment of the overall public opinion news cannot reflect the sentiment polarity of the company in the text. The current inference method will cause large errors in the sentiment polarity of the company. If you only focus on the overall sentiment polarity of public opinion and ignore the sentiment polarity of the company entities that appear in the public opinion, it may cause major errors in the decision-making of business personnel. Therefore, in order to obtain more accurate company sentiment polarity, it is a more reliable method to find each company entity in each news public opinion and determine the sentiment polarity of the company in the current public opinion. Summary of the invention

[0006] The embodiments of the present application provide an entity sentiment analysis method, system, storage medium and electronic device to at least solve the problem of large granularity of news public opinion sentiment analysis in smart investment promotion projects using existing entity sentiment analysis methods.

[0007] The present invention provides an entity sentiment analysis method, which includes:

[0008] Acquisition step: acquiring public opinion information from the website through a crawler script, and storing the public opinion information in a database;

[0009] Identification step: obtaining the public opinion text information to be predicted from the database, and using the entity recognition model to identify the public opinion text information to be predicted to obtain at least one public opinion entity name to be predicted;

[0010] Sentiment polarity acquisition step: construct and use an entity sentiment analysis model to process the public opinion entity name to be predicted and the public opinion text information to be predicted, obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted and save it in a data table.

[0011] The above-mentioned entity sentiment analysis method, wherein the identification step includes: reading the data in the database to obtain the public opinion text information to be predicted, identifying the public opinion entity name to be predicted through the entity recognition model, and filtering the public opinion entity name to be predicted through the entity name in the enterprise industrial and commercial database to obtain the final public opinion entity name to be predicted.

[0012] In the above entity sentiment analysis method, the sentiment polarity acquisition step comprises:

[0013] Training data acquisition step: pre-processing the public opinion data and converting the public opinion data into training data in a set format;

[0014] Model building step: after training the AlBert model with the training data, the entity sentiment analysis model is formed;

[0015] Model processing step: Through the entity sentiment analysis model, based on the mask mechanism, the entity sentiment polarity corresponding to each entity name of the public opinion to be predicted and the public opinion text information to be predicted is obtained and saved.

[0016] In the above-mentioned entity sentiment analysis method, the name of the public opinion entity to be predicted and the entity name both include the full name of the enterprise and the abbreviation of the enterprise.

[0017] In the above entity sentiment analysis method, the training data acquisition step includes:

[0018] After removing redundancy and normalizing the public opinion data, the public opinion data is labeled according to the labeling rules, and the labeled public opinion data is converted into the training data.

[0019] In the above entity sentiment analysis method, the model processing step includes:

[0020] After determining the position of the public opinion entity name to be predicted in the public opinion text information to be predicted; intercepting context information from the public opinion text information to be predicted according to the input text length set by the model; masking other entity names in the context information through a mask mechanism; after calculating the coordinates of the public opinion entity name to be predicted in the context information, input the context information with the coordinates and the public opinion entity name to be predicted into the entity sentiment analysis model to obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted.

[0021] In the above-mentioned entity sentiment analysis method, the model processing step also includes: masking other entity names by using a unified symbol.

[0022] The present invention also provides an entity sentiment analysis system, which includes:

[0023] An acquisition module, which acquires public opinion information from a website through a crawler script and stores the public opinion information in a database;

[0024] An identification module, wherein the identification module obtains the public opinion text information to be predicted from the database, and uses an entity recognition model to identify the public opinion text information to be predicted to obtain at least one public opinion entity name to be predicted;

[0025] The sentiment polarity acquisition module constructs and uses an entity sentiment analysis model to process the entity name of the public opinion to be predicted and the public opinion text information to be predicted, obtains the entity sentiment polarity corresponding to each entity name of the public opinion to be predicted and saves it in a data table.

[0026] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the entity sentiment analysis method as described above is implemented.

[0027] The present invention also provides a storage medium on which a computer program is stored, wherein when the program is executed by a processor, the entity sentiment analysis method as described above is implemented.

[0028] The beneficial effects of the present invention are:

[0029] The present invention belongs to the field of natural language processing in deep learning technology. The present invention uses entity-level sentiment analysis based on AlBert plus mask. The invention judges the company's sentiment polarity according to the context of the current company entity. Starting from a smaller granularity, it is more capable of digging out more information from public opinion news, avoiding the problem of focusing on overall sentiment and ignoring the details of public opinion text. Business personnel obtain more information and can make more reasonable decisions. In addition, the present invention has also achieved very significant prediction performance, with the accuracy of the model as high as 89%, and the accuracy has also been improved compared with the model of public opinion sentiment classification. Therefore, this method has been significantly improved both in terms of the recognition granularity of the emotional state and the prediction performance of the emotional state, and is more conducive to business personnel making decisions in smart investment promotion work, improving the work efficiency of business personnel and saving costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0031] In the attached picture:

[0032] Figure 1 is a flow chart of the entity sentiment analysis method of the present invention;

[0033] Figure 2 is a flow chart of processing step S3 of the present invention;

[0034] Figure 3 This is a partial framework diagram of sentiment analysis of company entities;

[0035] Figure 4 It is a scheme design diagram based on entity-level sentiment analysis;

[0036] Figure 5 It is a structural schematic diagram of the entity sentiment analysis system of the present invention;

[0037] Figure 6is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0039] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0040] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0041] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0042] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.

[0043] Before elaborating on each embodiment of the present invention in detail, the core inventive concept of the present invention is summarized and elaborated in detail through the following several embodiments.

[0044] Embodiment 1:

[0045] In order to solve the problem of large granularity of sentiment analysis of news public opinion in smart investment promotion projects, the present invention proposes a sentiment analysis model based on company entities with a smaller granularity. This method can mine more effective information from news public opinion, and by judging the sentiment polarity of all company entities appearing in each piece of news, it can more accurately judge whether the company's related dynamics have an impact on investment promotion. At the same time, the present invention obtains better prediction performance based on entity-level sentiment analysis, improves the accuracy of the model, can more accurately judge the impact of the current company's sentiment polarity on investment promotion, and can help business personnel make more reasonable decisions.

[0046] Please refer to Figure 1 , Figure 1 It is a flowchart of the entity sentiment analysis method. Figure 1 As shown, the entity sentiment analysis method of the present invention includes:

[0047] Acquisition step S1: acquiring public opinion information from a website through a crawler script, and storing the public opinion information in a database;

[0048] Identification step S2: obtaining the public opinion text information to be predicted from the database, and using the entity recognition model to identify the public opinion text information to be predicted to obtain at least one public opinion entity name to be predicted;

[0049] Sentiment polarity acquisition step S3: construct and use an entity sentiment analysis model to process the public opinion entity name to be predicted and the public opinion text information to be predicted, obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted and save it in a data table.

[0050] Among them, the identification step includes: reading the data in the database to obtain the public opinion text information to be predicted, identifying the public opinion entity name to be predicted through the entity recognition model, and filtering the public opinion entity name to be predicted through the entity name in the enterprise industrial and commercial database to obtain the final public opinion entity name to be predicted.

[0051] Please refer to Figure 2 , Figure 2 It is a flowchart of the entity sentiment analysis method. Figure 2 As shown, the emotion polarity acquisition step S3 includes:

[0052] Training data acquisition step S31: pre-processing the public opinion data and converting the public opinion data into training data in a set format;

[0053] Model building step S32: After training the AlBert model with the training data, the entity sentiment analysis model is formed;

[0054] Model processing step S33: The entity sentiment analysis model is used to perform the mask mechanism on the entity name of the public opinion entity to be predicted and the public opinion text information to be predicted, and the entity sentiment polarity corresponding to each entity name of the public opinion entity to be predicted is obtained and saved.

[0055] Among them, the name of the public opinion entity to be predicted and the entity name both include the full name of the enterprise and the abbreviation of the enterprise.

[0056] Wherein, the training data acquisition step S31 includes:

[0057] After removing redundancy and normalizing the public opinion data, the public opinion data is labeled according to the labeling rules, and the labeled public opinion data is converted into the training data.

[0058] Wherein, the model processing step S33 includes:

[0059] After determining the position of the public opinion entity name to be predicted in the public opinion text information to be predicted; intercepting context information from the public opinion text information to be predicted according to the input text length set by the model; masking other entity names in the context information through a mask mechanism; after calculating the coordinates of the public opinion entity name to be predicted in the context information, input the context information with the coordinates and the public opinion entity name to be predicted into the entity sentiment analysis model to obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted.

[0060] In the above-mentioned entity sentiment analysis method, the model processing step also includes: masking other entity names by using a unified symbol.

[0061] Specifically, in the news and public opinion about smart investment promotion, some frameworks for company entity sentiment analysis are as follows: Figure 3 As shown in the figure: In this framework, there are two main aspects. The first part is data acquisition, and the second part is data processing using models. Data acquisition is done by crawling from the official websites of various companies and various third-party platforms through crawler scripts. At present, the news crawling work involving more than 100 websites is involved. The public opinion news crawling is saved in the database for subsequent processing of news public opinion. Entity sentiment analysis in public opinion first reads the public opinion news in the database, and then needs to use the entity recognition model to identify the full name and company abbreviation of the public opinion text. According to the entity association module, the full name and company abbreviation that can match the enterprise in the enterprise industrial and commercial database are saved, and then the associated company keywords and the entire public opinion text are input into the entity sentiment analysis model. Finally, the sentiment polarity corresponding to each company keyword is saved in the data table. Finally, the business personnel judge whether the current company has risks based on whether there is negative information in the calculated company sentiment polarity, and analyze it in combination with other data to determine whether the current company can be used as a target for investment promotion.

[0062] Furthermore, the scheme design of the present invention based on entity-level sentiment analysis is as follows Figure 4 As shown in the figure, it mainly consists of three parts: labeling of news and public opinion data, training of entity sentiment models, and service provision of models in production environments. These three parts are as follows:

[0063] 1. First, you need to collect the original public opinion data, preprocess the public opinion data, reduce data redundancy and normalize it; secondly, according to the data labeling rules, label the preprocessed scripts; finally, convert the labeled data into the required specific format of training data.

[0064] 2. After preparing the training data, use the AlBert model to load the training data, then train the model, and save the generated model for providing model services.

[0065] 3. The third part first needs to use other entity recognition models to identify the company entities in the public opinion text, then match the identified company entities with the company entities in the business database, and finally save the matched companies that appear in the public opinion news, and use the model service to predict the entity sentiment tendency.

[0066] Furthermore, the details of the present invention are the AlBert+mask mechanism, which predicts the entity sentiment polarity in the text by constructing an input sample of a specified format. First, the entity recognition model is used to pass in the company entity to be predicted, and then the position of these company entities to be predicted in the public opinion text is found. Since the input text length set by the model is 128, half of the text is intercepted before and after the company entity and passed into the model as context information. Finally, through the mask mechanism, a unified symbol "[unused3]" is used to block other entities appearing in the text to avoid other entities from affecting the current entity to be predicted. The constructed input text is recalculated to calculate the coordinates of the company entity to be predicted in the current text, and then the constructed text, index and company to be predicted are input into the model together, so as to further improve the prediction effect of the model.

[0067] Embodiment 2:

[0068] Please refer to Figure 5 , Figure 5 Schematic diagram of the structure of the entity sentiment analysis system of the present invention. Figure 5 An entity sentiment analysis system of the present invention is shown, which includes:

[0069] An acquisition module 11, wherein the acquisition module 11 acquires public opinion information from a website through a crawler script and stores the public opinion information in a database;

[0070] An identification module 12, wherein the identification module 12 obtains the public opinion text information to be predicted from the database, and uses an entity recognition model to identify the public opinion text information to be predicted to obtain at least one public opinion entity name to be predicted;

[0071] The sentiment polarity acquisition module 13 constructs and uses an entity sentiment analysis model to process the entity name of the public opinion to be predicted and the public opinion text information to be predicted, obtains the entity sentiment polarity corresponding to each entity name of the public opinion to be predicted and saves it in a data table.

[0072] Embodiment three:

[0073] Combination Figure 6 As shown, this embodiment discloses a specific implementation of an electronic device. The electronic device may include a processor 81 and a memory 82 storing computer program instructions.

[0074] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0075] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0076] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .

[0077] The processor 81 implements any one of the entity sentiment analysis methods in the above embodiments by reading and executing computer program instructions stored in the memory 82.

[0078] In some of the embodiments, the electronic device may further include a communication interface 83 and a bus 80. Figure 6 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.

[0079] The communication interface 83 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 83 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0080] The bus 80 includes hardware, software or both, and couples the components of the electronic device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0081] The electronic device can be based on entity sentiment analysis to achieve integration Figure 1-Figure 3 Entity sentiment analysis method described.

[0082] In addition, in combination with the entity sentiment analysis in the above embodiments, the present application embodiment can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any entity sentiment analysis method in the above embodiments is implemented.

[0083] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0084] In summary, the beneficial effect of the present invention lies in that the present disclosure provides that the present invention uses entity-level sentiment analysis based on AlBert plus mask. The present invention judges the company's sentiment polarity according to the context of the current company entity. Starting from a smaller granularity, it is more capable of digging out more information from public opinion news, avoiding the problem of focusing on overall sentiment and ignoring the details of public opinion text. Business personnel obtain more information and can make more reasonable decisions. In addition, the present invention has also achieved very significant prediction performance, with the accuracy of the model as high as 89%, and the accuracy has also been improved compared to the model of public opinion sentiment classification. Therefore, this method has been significantly improved both in terms of the recognition granularity of the emotional state and the prediction performance of the emotional state, and is more conducive to business personnel making decisions in smart investment promotion work, improving the work efficiency of business personnel and saving costs.

[0085] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of protection of the invention. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the attached claims.

Claims

1. A method for entity sentiment analysis, characterized in that: include: Acquisition step: acquiring public opinion information from the website through a crawler script, and storing the public opinion information in a database; Identification step: obtaining the public opinion text information to be predicted from the database, and using the entity recognition model to identify the public opinion text information to be predicted to obtain at least one public opinion entity name to be predicted; Sentiment polarity acquisition step: construct and use an entity sentiment analysis model to process the public opinion entity name to be predicted and the public opinion text information to be predicted, obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted and save it in a data table; The emotion polarity acquisition step specifically includes: Training data acquisition step: pre-processing the public opinion data and converting the public opinion data into training data in a set format; Model building step: after training the AlBert model with the training data, the entity sentiment analysis model is formed; Model processing step: using the entity sentiment analysis model to perform the public opinion entity name to be predicted and the public opinion text information to be predicted based on a mask mechanism, obtaining and saving the entity sentiment polarity corresponding to each public opinion entity name to be predicted; The model processing step specifically includes: After determining the position of the public opinion entity name to be predicted in the public opinion text information to be predicted; extracting context information from the public opinion text information to be predicted according to the input text length set by the model; masking other entity names in the context information; calculating the coordinates of the public opinion entity name to be predicted in the context information, inputting the context information with the coordinates and the public opinion entity name to be predicted into the entity sentiment analysis model to obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted; masking other entity names by unified symbols.

2. The entity sentiment analysis method according to claim 1, characterized in that: The identification step includes: reading the data in the database to obtain the public opinion text information to be predicted, identifying the public opinion entity name to be predicted through the entity recognition model, and filtering the public opinion entity name to be predicted through the entity name in the enterprise industrial and commercial database to obtain the final public opinion entity name to be predicted.

3. The entity sentiment analysis method according to claim 2, characterized in that: The name of the public opinion entity to be predicted and the entity name both include the full name and the abbreviation of the enterprise.

4. The entity sentiment analysis method according to claim 1, characterized in that: The training data acquisition step comprises: After removing redundancy and normalizing the public opinion data, the public opinion data is labeled according to the labeling rules, and the labeled public opinion data is converted into the training data.

5. An entity sentiment analysis system, characterized in that: include: An acquisition module, which acquires public opinion information from a website through a crawler script and stores the public opinion information in a database; An identification module, wherein the identification module obtains the public opinion text information to be predicted from the database, and uses an entity recognition model to identify the public opinion text information to be predicted to obtain at least one public opinion entity name to be predicted; A sentiment polarity acquisition module, which constructs and uses an entity sentiment analysis model to process the public opinion entity name to be predicted and the public opinion text information to be predicted, obtains the entity sentiment polarity corresponding to each public opinion entity name to be predicted and saves it in a data table; The emotion polarity acquisition module specifically includes: Training data acquisition unit: after pre-processing the public opinion data, convert the public opinion data into training data of a set format; Model building unit: after training the AlBert model with the training data, forming the entity sentiment analysis model; Model processing unit: using the entity sentiment analysis model to process the entity name of the public opinion to be predicted and the public opinion text information to be predicted based on the mask mechanism, obtains the entity sentiment polarity corresponding to each entity name of the public opinion to be predicted and saves it; Wherein, the model processing unit specifically includes: After determining the position of the public opinion entity name to be predicted in the public opinion text information to be predicted; extracting context information from the public opinion text information to be predicted according to the input text length set by the model; masking other entity names in the context information; calculating the coordinates of the public opinion entity name to be predicted in the context information, inputting the context information with the coordinates and the public opinion entity name to be predicted into the entity sentiment analysis model to obtain the entity sentiment polarity corresponding to each public opinion entity name to be predicted; masking other entity names by unified symbols.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the entity sentiment analysis method according to any one of claims 1 to 4 is implemented.

7. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the entity sentiment analysis method as described in any one of claims 1 to 4 is implemented.