Data display method and device, computer equipment, readable storage medium and program product
Through the entity sentiment analysis model, the news data is processed, and various corporate entities and their emotional labels are extracted and displayed, which solves the problem of incomplete and accurate emotion analysis in the existing technology, and realizes accurate display and tracking of corporate emotional tendencies.
Patent Information
- Application Number
- CN202411138374.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-29
AI Technical Summary
The prior art is not comprehensive or accurate enough when analyzing the overall emotional tendency of news data, making it difficult to accurately display the emotional tendency of the enterprise dimension.
The entity sentiment analysis model is used to process news data, and fine-tune the pre-training model to extract and display each enterprise entity and its emotional labels, respectively, and display it on the corresponding data display page of each enterprise, avoiding the fusion of multiple models. Error passing problem.
It realizes fine-grained analysis of news data, accurately and intuitively displays the emotional tendencies of each company in the news, and facilitates enterprise dynamic tracking and risk assessment.
Smart Images

Figure CN119045696A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data display method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] With the development of artificial intelligence technology, emotion recognition technology has emerged. Emotion recognition technology is used to analyze the emotional tendencies in text data and map text data to emotional labels such as positive, negative, and neutral.
[0003] In some related technologies, the emotion recognition problem is converted into a classification problem, and machine learning algorithms such as logistic regression and support vector machine are used to analyze news data. In other related technologies, deep learning models such as convolutional neural network (CNN) and long short-term memory network (LSTM) are used to automatically learn the characteristics of news data and output emotion recognition results.
[0004] However, related technologies usually analyze the overall sentiment tendency of the entire news, and the obtained sentiment tendency is not comprehensive or accurate enough. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for accurately displaying news data and its corporate dimension emotional tendencies in response to the above-mentioned technical problems.
[0006] In a first aspect, the present application provides a method for displaying data, comprising:
[0007] Get the news data to be displayed;
[0008] Input the news data to be displayed into the entity sentiment analysis model, and output each business entity in the news data to be displayed and the sentiment labels corresponding to each business entity; wherein the entity sentiment analysis model is obtained by fine-tuning the pre-trained model based on the correspondence between the sample news data and the sentiment labels;
[0009] The news data to be displayed and the emotion tags corresponding to each business entity are displayed on the data display page corresponding to each business entity.
[0010] In one embodiment, the step of displaying the news data to be displayed and the emotion tags corresponding to each business entity on a data display page corresponding to each business entity includes:
[0011] According to the emotion tag corresponding to the target enterprise entity in the news data to be displayed, determining the display format of the emotion tag corresponding to the target enterprise entity in the data display page corresponding to the target enterprise entity;
[0012] The title of the news data to be displayed is displayed in the data display page corresponding to the target enterprise entity, and the emotion label corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format.
[0013] In one embodiment, the data display page includes a label selection control, the title of the news data to be displayed is displayed in the data display page corresponding to the target enterprise entity, and the emotional label corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format, and then includes:
[0014] In response to a triggering operation on a label selection control in the data display page, displaying each emotion label and the quantity of news data to be displayed corresponding to each emotion label;
[0015] In response to a selection operation of a target emotion tag, target news data corresponding to the target emotion tag is screened out from the plurality of news data to be displayed;
[0016] The title of the target news data is displayed on the data display page corresponding to the target enterprise entity, and the emotion tag corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format corresponding to the target emotion tag.
[0017] In one embodiment, before inputting the news data to be displayed into the entity sentiment analysis model and outputting each business entity in the news data to be displayed and the sentiment label corresponding to each business entity, the method includes:
[0018] Acquire sample news data and pre-configured prompt information; wherein the sample news data corresponds to a standard enterprise entity and a sentiment label corresponding to the standard enterprise entity, and the prompt information includes text for instructing the entity sentiment analysis model to identify the enterprise entity in the news data and determine the sentiment label corresponding to the enterprise entity;
[0019] Inputting the sample news data and the prompt information into a pre-trained model, and outputting a predicted business entity and a sentiment label corresponding to the predicted business entity;
[0020] Based on the error between the predicted business entity and the standard business entity, and the error between the sentiment label corresponding to the predicted business entity and the sentiment label corresponding to the standard business entity, the pre-trained model is supervised and fine-tuned to obtain an entity sentiment analysis model.
[0021] In one embodiment, the step of inputting the news data to be displayed into an entity sentiment analysis model and outputting each business entity in the news data to be displayed and the sentiment labels corresponding to each business entity respectively comprises:
[0022] The prompt information and the news data to be displayed are converted into a character stream format and input into an entity sentiment analysis model, and each business entity in the news data to be displayed and the sentiment labels corresponding to each business entity are output in a character stream format.
[0023] In one embodiment, the training method of the pre-trained model includes:
[0024] Probabilistic modeling is performed using unsupervised data to obtain a base model; the framework of the base model adopts an autoencoder structure;
[0025] The training objective of the base model is set to maximize the likelihood function, and the base model is optimized based on the maximized likelihood function to obtain a pre-trained model.
[0026] In a second aspect, the present application also provides a data display device, including:
[0027] An acquisition module is used to acquire news data to be displayed;
[0028] A processing module, used for inputting the news data to be displayed into an entity sentiment analysis model, and outputting each enterprise entity in the news data to be displayed and the sentiment labels corresponding to each enterprise entity; wherein the entity sentiment analysis model is obtained by fine-tuning a pre-trained model based on the correspondence between sample news data and sentiment labels;
[0029] The display module is used to display the news data to be displayed and the emotion tags corresponding to each enterprise entity on the data display page corresponding to each enterprise entity.
[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above-described methods when executing the computer program.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the methods described above when executed by a processor.
[0032] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0033] The above-mentioned data display method, device, computer equipment, computer-readable storage medium and computer program product can process enterprise-related news through a single entity sentiment analysis model, so as to simultaneously extract enterprise entities in the news and determine the sentiment tags corresponding to the enterprise entities in the news, and can achieve fine-grained analysis of the news, determine the separate sentiment tendencies of different enterprise entities in the same news, and avoid the error transmission problem caused by model fusion when multiple models perform entity extraction and sentiment recognition separately; by displaying the news related to each enterprise on the data display page corresponding to each enterprise, it is convenient to track the enterprise dynamics according to the news; by displaying the sentiment tags corresponding to the enterprise in each news on the data display page corresponding to each enterprise, the sentiment tendencies of each enterprise in the news can be accurately and intuitively displayed. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0035] FIG1 is an application environment diagram of a data display method in one embodiment;
[0036] FIG2 is a schematic diagram of a flow chart of a method for displaying data in one embodiment;
[0037] FIG3 is a schematic diagram of a flow chart of step S206 in one embodiment;
[0038] FIG4 is a schematic diagram of a flow chart of step S206 in another embodiment;
[0039] FIG5 is a schematic diagram of a data display page in one embodiment;
[0040] FIG6 is a schematic flow chart of a method for displaying data in another embodiment;
[0041] FIG7 is a schematic diagram of a flow chart of a training method of a pre-training model in one embodiment;
[0042] FIG8 is a structural block diagram of a data display device in one embodiment;
[0043] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail 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 used to limit the present application.
[0045] The data display method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can call the entity sentiment analysis model to process the news data, and respond to the display request of the terminal 102 for the target enterprise entity data display page, and send the data display page corresponding to the target enterprise to the terminal 102 for display. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0046] In an exemplary embodiment, as shown in FIG2 , a data display method is provided, which is described by taking the method applied to the server 104 in FIG1 as an example, and includes the following steps S202 to S206 . Among them:
[0047] Step S202, obtaining news data to be displayed.
[0048] The news data to be displayed may include the identification information of the enterprise. The identification information of the enterprise may include the enterprise name, enterprise representative, etc. For example, the news data to be displayed may be news of litigation announcements, including the winning party and the losing party.
[0049] For example, the server 104 can periodically visit public news websites through crawler tools such as Scrapy and Beautiful Soup to obtain news data related to the enterprise to be displayed, as well as news titles, links, release time, and other related information. Here, the format of the obtained news data to be displayed can include at least one of the following: text, JSON (JavaScript Object Notation), XML (Extensible Markup Language), etc.
[0050] Step S204, input the news data to be displayed into the entity sentiment analysis model, and output each business entity in the news data to be displayed and the sentiment label corresponding to each business entity; wherein the entity sentiment analysis model is obtained by fine-tuning the pre-trained model based on the correspondence between the sample news data and the sentiment label.
[0051] The entity sentiment analysis model may be an end-to-end (End2End) model stored on the server 104. The entity sentiment analysis model may be obtained by fine-tuning a pre-trained model based on the correspondence between sample news data and corporate entities, and the correspondence between sample corporate entities and sentiment tags. The pre-trained model may be a large language model (LLM). For example, the pre-trained large language model may be Baichuan, Qwen, LLama1 / 2 / 3, etc.
[0052] Exemplarily, the server 104 may pre-process the news data to be displayed and then input it into the entity sentiment analysis model, so that the entity sentiment analysis model can identify multiple business entities in the news data to be displayed, determine the sentiment tag corresponding to each business entity, and correspond the news data to be displayed with the business entity, and the business entity of the news data with the sentiment tag, and store them in a structured data format to facilitate downstream data analysis and display. Specifically, one piece of news data to be displayed can correspond to multiple business entities. For each piece of news data, one business entity corresponds to one sentiment tag.
[0053] Step S206, the news data to be displayed and the emotion tags corresponding to each business entity are displayed on the data display page corresponding to each business entity.
[0054] For example, the server 104 may generate a data display page corresponding to each business entity based on the correspondence between the news to be displayed and the business entity, and the correspondence between the business entity of the news to be displayed and the emotional tag, and display the data display page corresponding to the target business entity in response to a display request for the data display page of the target business entity. Specifically, the data display page corresponding to each business entity may display multiple news data and the emotional tag corresponding to each news data.
[0055] It is understandable that the same news data to be displayed can be displayed on data display pages corresponding to different business entities, and the emotional tags corresponding to the news data to be displayed for different business entities can be the same or different.
[0056] In the above data display method, by processing enterprise-related news through a single entity sentiment analysis model, it is possible to simultaneously extract enterprise entities in the news and determine the sentiment labels corresponding to the enterprise entities in the news, so as to achieve fine-grained analysis of the news and determine the separate sentiment tendencies of different enterprise entities in the same news. In addition, it avoids the problem of error transmission caused by model fusion when multiple models perform entity extraction and sentiment recognition separately. By displaying the news related to each enterprise separately on the data display page corresponding to each enterprise, it is possible to track the dynamics of the enterprise according to the news. By displaying the sentiment labels corresponding to the enterprise in each news on the data display page corresponding to each enterprise, the sentiment tendencies of each enterprise in the news can be accurately and intuitively displayed.
[0057] In an exemplary embodiment, as shown in FIG3 , for any target enterprise entity among the enterprise entities, the above step S206 may include:
[0058] Step S601, according to the emotion tag corresponding to the target enterprise entity in the news data to be displayed, determining the display format of the emotion tag corresponding to the target enterprise entity in the data display page corresponding to the target enterprise entity.
[0059] Among them, different emotional labels correspond to different display formats. The display format may include font format, background format, border format, etc. In one implementation, the emotional label may include positive labels, negative labels, and neutral labels. The display format of the positive label may be used to display the positive label in green, the display format of the negative label may be used to display the negative label in red, and the display format of the neutral label may be used to display the neutral label in gray.
[0060] Step S602: Display the title of the news data to be displayed in the data display page corresponding to the target enterprise entity, and display the emotion label corresponding to the target enterprise entity in the adjacent area of the title according to the display format.
[0061] For example, the target enterprise entity may correspond to multiple news data to be displayed, and the titles of the multiple news data to be displayed may be displayed in a list on the data display page corresponding to the target enterprise entity. The titles of the news data to be displayed may be used to jump to the original page of the news data to be displayed in response to a click operation on the titles.
[0062] Optionally, in an area adjacent to the title of the news data to be displayed, the source of the news, the release time, etc. may also be displayed.
[0063] In this embodiment, by displaying news data in the form of titles, the display space of the news data can be saved, and by displaying emotional tags in different display formats, the news data can be classified and labeled according to emotional tendencies.
[0064] Further, as shown in FIG4 , the above step S602 may include:
[0065] Step S6031, in response to the triggering operation of the tag selection control in the data display page, display each emotion tag and the number of news data to be displayed corresponding to each emotion tag.
[0066] For example, please refer to Figure 5, which is a schematic diagram of a data display page in an embodiment. The data display page includes a label selection control C2.
[0067] Step S6032, in response to the selection operation of the target emotion tag, the target news data corresponding to the target emotion tag is screened out from the multiple news data to be displayed.
[0068] Optionally, the server 104 may respond to the absence of a trigger operation on the tag selection control in the data display page (as shown in FIG. 5 ), or, in response to a selection operation on all emotion tags, display the titles of all news data to be displayed corresponding to the target enterprise entity in the data display page corresponding to the target enterprise entity, and display the corresponding emotion tag (such as emotion tag C1 in FIG. 5 ) in the adjacent area of each title.
[0069] Step S6033, displaying the title of the target news data in the data display page corresponding to the target enterprise entity, and displaying the emotion tag corresponding to the target enterprise entity in the adjacent area of the title according to the display format corresponding to the target emotion tag.
[0070] Exemplarily, server 104 may periodically obtain news data to be displayed that is related to the enterprise, input it into an entity sentiment analysis model, and store each enterprise entity in the output news data to be displayed and the sentiment tags corresponding to each enterprise entity in a database; in response to a display request for a target enterprise entity data display page, filter out the news data to be displayed corresponding to the target enterprise entity for display; in response to a trigger operation on a tag selection control and a selection operation on a target sentiment tag, filter out the target news data corresponding to the target sentiment tag from the news data to be displayed corresponding to the target enterprise entity for display.
[0071] In this embodiment, by displaying the news data of the enterprise according to the emotional tags, it is convenient to trace the news data of the specific emotional tags. For example, by displaying the news data of the negative tags, it is convenient to conduct risk assessment on the enterprise.
[0072] In an exemplary embodiment, as shown in FIG6 , before the above step S204, the following steps may be included:
[0073] Step S2011, obtaining sample news data and pre-configured prompt information; wherein the sample news data corresponds to standard corporate entities and sentiment tags corresponding to the standard corporate entities, and the prompt information includes text for instructing the entity sentiment analysis model to identify corporate entities in the news data and determine sentiment tags corresponding to the corporate entities.
[0074] Specifically, the format of the standard output corresponding to the sample news data may include "[{enterprise: entity 1, sentiment: positive}, {enterprise: entity 2, sentiment: neutral}, {enterprise: entity 3, sentiment: negative}]".
[0075] Step S2012, input the sample news data and prompt information into the pre-training model, and output the predicted business entity and the sentiment label corresponding to the predicted business entity.
[0076] Specifically, the data format of the sample news data may include “prompt information+news data text content.” For example, the prompt information may be “extract a company entity from the following news text, and determine the sentiment of the corresponding company entity.”
[0077] Step S2013, based on the error between the predicted enterprise entity and the standard enterprise entity, and the error between the sentiment label corresponding to the predicted enterprise entity and the sentiment label corresponding to the standard enterprise entity, the pre-trained model is supervised and fine-tuned to obtain an entity sentiment analysis model.
[0078] Specifically, the pre-trained model can be subjected to full-parameter supervised fine-tuning (SFT) based on a set of labeled sample news data to obtain an entity sentiment analysis model, so as to improve the performance of the entity sentiment analysis model in the task of simultaneously identifying corporate entities in news data and determining the text of sentiment labels corresponding to the corporate entities.
[0079] In this embodiment, the entity sentiment analysis model is obtained by performing supervised fine-tuning on the pre-trained model, which can improve the accuracy and adaptability of the entity sentiment analysis model in processing news data.
[0080] Further, please continue to refer to FIG. 6 , the above step S204 may include:
[0081] Step S2041, converting the prompt information and the news data to be displayed into a character stream format and inputting them into an entity sentiment analysis model, outputting each enterprise entity in the news data to be displayed in the character stream format and the sentiment labels corresponding to each enterprise entity.
[0082] In one possible implementation, the prompt information and the news data to be processed may be preprocessed, and the prompt information and the news data to be processed may be converted into a character stream format. In another possible implementation, the acquired news data to be displayed may be in a character stream format. The character stream format may be in a JSON format. In this way, by converting the output of the entity sentiment analysis model into a character stream format, the input and output of the entity sentiment analysis model may maintain a complete data structure.
[0083] In an exemplary embodiment, as shown in FIG7 , the training method of the pre-trained model may include:
[0084] Step A1, using unsupervised data for probability modeling to obtain a base model; the framework of the base model adopts an autoencoder structure.
[0085] Among them, the self-encoder is used to perform probability modeling on the input word sequence (a sentence) and evaluate its probability of appearing in the real world.
[0086] Step A2, setting the training objective of the base model to maximize the likelihood function, and optimizing the base model based on the maximized likelihood function to obtain a pre-trained model.
[0087] Specifically, the base model is used to predict the probability of the next single word based on the existing words. The formula of the maximum likelihood function can include:
[0088] ;
[0089] in, Represents the words in the sequence.
[0090] In this embodiment, probabilistic modeling is performed through unsupervised data and the base model is optimized to obtain a pre-trained model, which can reduce the dependence on labeled samples and improve the robustness of the model.
[0091] To sum up, in the above data display method, by processing enterprise-related news through a single entity sentiment analysis model, it is possible to simultaneously extract enterprise entities in the news and determine the sentiment labels corresponding to the enterprise entities in the news, and to achieve fine-grained analysis of the news, determine the separate sentiment tendencies of different enterprise entities in the same news, and avoid the problem of error transmission caused by model fusion when multiple models perform entity extraction and sentiment recognition separately; by displaying the news related to each enterprise separately on the data display page corresponding to each enterprise, it is possible to track the dynamics of the enterprise according to the news; by displaying the sentiment labels corresponding to the enterprise in each news on the data display page corresponding to each enterprise, the sentiment tendencies of each enterprise in the news can be accurately and intuitively displayed.
[0092] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0093] Based on the same inventive concept, the embodiment of the present application also provides a data display device for implementing the data display method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations of one or more data display device embodiments provided below can refer to the limitations of the data display method above, and will not be repeated here.
[0094] In an exemplary embodiment, as shown in FIG8 , a data display device 300 is provided, including: an acquisition module 301, a processing module 302 and a display module 303, wherein:
[0095] The acquisition module 301 is used to acquire news data to be displayed.
[0096] Processing module 302 is used to input the news data to be displayed into the entity sentiment analysis model, and output each business entity in the news data to be displayed and the sentiment label corresponding to each business entity; wherein the entity sentiment analysis model is obtained by fine-tuning the pre-trained model based on the correspondence between the sample news data and the sentiment label.
[0097] The display module 303 is used to display the news data to be displayed and the emotion tags corresponding to each enterprise entity on the data display page corresponding to each enterprise entity.
[0098] In an exemplary embodiment, the display module 303 is further used to:
[0099] According to the emotion tag corresponding to the target enterprise entity in the news data to be displayed, determining the display format of the emotion tag corresponding to the target enterprise entity in the data display page corresponding to the target enterprise entity;
[0100] The title of the news data to be displayed is displayed on the data display page corresponding to the target enterprise entity, and the sentiment label corresponding to the target enterprise entity is displayed in an area adjacent to the title according to the display format.
[0101] In an exemplary embodiment, the display module 303 is further used to:
[0102] In response to a triggering operation on a label selection control in a data display page, each emotion label and the number of news data to be displayed corresponding to each emotion label are displayed;
[0103] In response to a selection operation of a target emotion tag, target news data corresponding to the target emotion tag is screened out from a plurality of news data to be displayed;
[0104] The title of the target news data is displayed on the data display page corresponding to the target enterprise entity, and the emotional label corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format corresponding to the target emotional label.
[0105] In an exemplary embodiment, the data display device 300 further includes:
[0106] A fine-tuning module is used to obtain sample news data and pre-configured prompt information; wherein the sample news data corresponds to standard corporate entities and sentiment labels corresponding to the standard corporate entities, and the prompt information includes text for instructing the entity sentiment analysis model to identify corporate entities in the news data and determine the sentiment labels corresponding to the corporate entities.
[0107] The above-mentioned fine-tuning module is also used to input sample news data and prompt information into the pre-training model, and output the predicted business entity and the sentiment label corresponding to the predicted business entity.
[0108] The above-mentioned fine-tuning module is also used to supervise the fine-tuning of the pre-trained model based on the error between the predicted enterprise entity and the standard enterprise entity, and the error between the sentiment label corresponding to the predicted enterprise entity and the sentiment label corresponding to the standard enterprise entity, so as to obtain an entity sentiment analysis model.
[0109] In an exemplary embodiment, the processing module 302 is further configured to:
[0110] The prompt information and the news data to be displayed are converted into a character stream format and input into the entity sentiment analysis model, and each enterprise entity in the news data to be displayed in the character stream format and the sentiment label corresponding to each enterprise entity are output.
[0111] In an exemplary embodiment, the training method of the above pre-trained model includes:
[0112] The base model is obtained by using unsupervised data for probabilistic modeling; the framework of the base model adopts an autoencoder structure;
[0113] The training objective of the base model is set to maximize the likelihood function, and the base model is optimized based on the maximized likelihood function to obtain a pre-trained model.
[0114] Each module in the above data display device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0115] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for displaying data is implemented.
[0116] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0119] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0120] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0121] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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 application.
[0123] 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 the present application. 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 protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for displaying data, characterized in that: The method comprises: Get the news data to be displayed; Input the news data to be displayed into the entity sentiment analysis model, and output each business entity in the news data to be displayed and the sentiment labels corresponding to each business entity; wherein the entity sentiment analysis model is obtained by fine-tuning the pre-trained model based on the correspondence between the sample news data and the sentiment labels; The news data to be displayed and the emotion tags corresponding to each business entity are displayed on the data display page corresponding to each business entity.
2. The method according to claim 1, characterized in that The step of displaying the news data to be displayed and the emotion tags corresponding to each business entity on the data display page corresponding to each business entity comprises: According to the emotion tag corresponding to the target enterprise entity in the news data to be displayed, determining the display format of the emotion tag corresponding to the target enterprise entity in the data display page corresponding to the target enterprise entity; The title of the news data to be displayed is displayed in the data display page corresponding to the target enterprise entity, and the emotion label corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format.
3. The method according to claim 2, characterized in that The data display page includes a label selection control, the title of the news data to be displayed is displayed in the data display page corresponding to the target enterprise entity, and the emotional label corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format, and then includes: In response to a triggering operation on a label selection control in the data display page, displaying each emotion label and the quantity of news data to be displayed corresponding to each emotion label; In response to a selection operation of a target emotion tag, target news data corresponding to the target emotion tag is screened out from the plurality of news data to be displayed; The title of the target news data is displayed on the data display page corresponding to the target enterprise entity, and the emotion tag corresponding to the target enterprise entity is displayed in the adjacent area of the title according to the display format corresponding to the target emotion tag.
4. The method according to claim 1, characterized in that: The step of inputting the news data to be displayed into the entity sentiment analysis model and outputting each business entity in the news data to be displayed and the sentiment labels respectively corresponding to each business entity comprises: Acquire sample news data and pre-configured prompt information; wherein the sample news data corresponds to a standard enterprise entity and a sentiment tag corresponding to the standard enterprise entity, and the prompt information includes text for instructing the entity sentiment analysis model to identify the enterprise entity in the news data and determine the sentiment tag corresponding to the enterprise entity; Inputting the sample news data and the prompt information into a pre-trained model, and outputting a predicted business entity and a sentiment label corresponding to the predicted business entity; Based on the error between the predicted business entity and the standard business entity, and the error between the sentiment label corresponding to the predicted business entity and the sentiment label corresponding to the standard business entity, the pre-trained model is fine-tuned to obtain an entity sentiment analysis model.
5. The method according to claim 4, characterized in that The step of inputting the news data to be displayed into an entity sentiment analysis model and outputting each business entity in the news data to be displayed and the sentiment labels corresponding to each business entity respectively comprises: The prompt information and the news data to be displayed are converted into a character stream format and input into an entity sentiment analysis model, and each business entity in the news data to be displayed and the sentiment labels corresponding to each business entity are output in a character stream format.
6. The method according to claim 1, characterized in that The training method of the pre-trained model includes: Probabilistic modeling is performed using unsupervised data to obtain a base model; the framework of the base model adopts an autoencoder structure; The training objective of the base model is set to maximize the likelihood function, and the base model is optimized based on the maximized likelihood function to obtain a pre-trained model.
7. A data display device, characterized in that: The device comprises: An acquisition module is used to acquire news data to be displayed; A processing module, used for inputting the news data to be displayed into an entity sentiment analysis model, and outputting each enterprise entity in the news data to be displayed and the sentiment labels corresponding to each enterprise entity; wherein the entity sentiment analysis model is obtained by fine-tuning a pre-trained model based on the correspondence between sample news data and sentiment labels; The display module is used to display the news data to be displayed and the emotion tags corresponding to each enterprise entity on the data display page corresponding to each enterprise entity.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
