WO2022156065A1 - 一种文本情感分析方法、装置、设备及存储介质 - Google Patents

一种文本情感分析方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022156065A1
WO2022156065A1 PCT/CN2021/083804 CN2021083804W WO2022156065A1 WO 2022156065 A1 WO2022156065 A1 WO 2022156065A1 CN 2021083804 W CN2021083804 W CN 2021083804W WO 2022156065 A1 WO2022156065 A1 WO 2022156065A1
Authority
WO
WIPO (PCT)
Prior art keywords
text data
training text
emotion
entity
training
Prior art date
Application number
PCT/CN2021/083804
Other languages
English (en)
French (fr)
Inventor
刘翔
丁甲
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022156065A1 publication Critical patent/WO2022156065A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of artificial intelligence, and in particular, to a text sentiment analysis method, apparatus, device and storage medium.
  • the embodiments of the present application provide a text emotion analysis method, device, device and storage medium, which can automatically identify the emotion categories of different entities, and at the same time can capture the text information corresponding to the entities more clearly, which improves the emotion category of the recognized entities. accuracy.
  • an embodiment of the present application provides a text sentiment analysis method, the method includes: acquiring training text data carrying a specified entity, and adding a sentiment class label to the training text data, wherein the sentiment class label Including a first emotion category label and a second emotion category label, the first emotion category label is used to indicate a positive emotion category, and the second emotion category label is used to indicate a negative emotion category; input the training text data into a preset bert model, obtain the prediction result of the emotion category corresponding to the specified entity in the training text data, and determine the loss function value of the emotion classification of the training text data according to the prediction result; Describe the weight parameters of the bert model, and retrain the bert model after adjusting the weight parameters to obtain a sentiment analysis model; the sentiment analysis model obtained by inputting the text data to be tested is analyzed, and it is determined that it corresponds to the text data to be tested type of emotion.
  • an embodiment of the present application provides a text sentiment analysis device, including: an acquisition unit configured to acquire training text data carrying a specified entity, and add a sentiment category label to the training text data, wherein the sentiment The category labels include a first emotion category label and a second emotion category label, the first emotion category label is used to indicate a positive emotion category, and the second emotion category label is used to indicate a negative emotion category; the determining unit is used to The training text data is input to the preset bert model, the prediction result of the emotion category corresponding to the designated entity in the training text data is obtained, and the loss function value of the emotion classification of the training text data is determined according to the prediction result; training The unit is used to adjust the weight parameter of the bert model according to the loss function value, and retrain the bert model after adjusting the weight parameter to obtain a sentiment analysis model; the test unit is used to input the text data to be tested into training to obtain The sentiment analysis model is analyzed, and the sentiment type corresponding to the text data to be tested is determined.
  • the sentiment The category labels include
  • an embodiment of the present application provides a computer device, including a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used to store A computer program that supports a text sentiment analysis device to perform the above method, the computer program includes a program, and the processor is configured to invoke the program to execute: acquiring training text data carrying a specified entity, and adding to the training text data An emotion category label, wherein the emotion category label includes a first emotion category label and a second emotion category label, the first emotion category label is used to indicate a positive emotion category, and the second emotion category label is used to indicate a negative emotion Category; input the training text data into the preset bert model, obtain the prediction result of the emotion category corresponding to the designated entity in the training text data, and determine the loss of emotion classification of the training text data according to the prediction result function value; adjust the weight parameter of the bert model according to the loss function value, and retrain the bert model
  • an embodiment of the present application provides a computer-readable storage medium, where the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the following method: acquiring training text data carrying a specified entity, and adding an emotion class label to the training text data, wherein the emotion class label includes a first emotion class label and a second emotion class label, the first emotion class label is used to indicate a positive emotion class, and the second emotion class label is used to indicate a positive emotion class.
  • the emotional category label is used to indicate the negative emotional category; the training text data is input into the preset bert model, and the prediction result of the emotional category corresponding to the specified entity in the training text data is obtained, and the prediction result is determined according to the prediction result.
  • the embodiments of the present application can automatically identify emotion categories of different entities, and improve the accuracy of identifying emotion categories of entities.
  • FIG. 1 is a schematic flowchart of a text sentiment analysis method provided by an embodiment of the present application.
  • FIG. 2 is a schematic block diagram of a text sentiment analysis apparatus provided by an embodiment of the present application.
  • FIG. 3 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the technical solutions of the present application relate to the technical field of artificial intelligence and/or big data, so as to realize text sentiment analysis and promote the construction of smart cities.
  • the data involved in this application such as training text data and/or emotion types, may be stored in a database, or may be stored in a blockchain, which is not limited in this application.
  • the text sentiment analysis method provided by the embodiments of the present application can be applied to a text sentiment analysis apparatus.
  • the text sentiment analysis apparatus is provided in a computer device.
  • the computer device includes, but is not limited to, one or more of a smartphone, a tablet, a laptop, and the like.
  • the text sentiment analysis method provided by the embodiment of the present application is schematically described below with reference to FIG. 1 .
  • FIG. 1 is a schematic flowchart of a text sentiment analysis method provided by an embodiment of the present application. As shown in FIG. 1 , the method can be executed by a text sentiment analysis device, and the text sentiment analysis device is set on a computer in the device. Specifically, the method in the embodiment of the present application includes the following steps.
  • S101 Acquire training text data carrying a specified entity, and add an emotion category label to the training text data, wherein the emotion category label includes a first emotion category label and a second emotion category label, and the first emotion category label is used to indicate a positive emotion category, and the second emotion category label is used to indicate a negative emotion category.
  • the text sentiment analysis device may acquire training text data carrying a specified entity, and add sentiment class labels to the training text data, where the sentiment class labels include a first sentiment class label and a second sentiment class tags, the first emotion category tag is used to indicate a positive emotion category, and the second emotion category tag is used to indicate a negative emotion category.
  • the positive emotion categories include neutral emotion categories.
  • the specified entity is an entity of a specified type
  • the specified entity may include but is not limited to a target object
  • the target object may be information such as people, things, events, etc.
  • the specified entity may be Company information
  • the company information may include, but is not limited to, company name, company unified identification code, and the like.
  • the text sentiment analysis device when acquiring the training text data that carries the specified entity, can obtain the text data to be processed that carries the specified entity from the database, or can search for some pending text data about the existence of the specified entity from the external network.
  • the text data is processed, and the to-be-processed text data is divided into training text data and to-be-tested text data according to a specified ratio.
  • the training text data and the test text data may be divided by 4:1.
  • an emotion category label when adding an emotion category label to the training text data, an emotion category label may be manually added to the training text data carrying the specified entity.
  • the emotion category labels include, but are not limited to, one or more of numbers, letters, words, and the like.
  • the emotion category label of the second emotion category may be marked as 0, and the emotion category label of the first emotion category may be marked as 1.
  • S102 Input the training text data into a preset bert model, obtain a prediction result of the emotion category corresponding to the designated entity in the training text data, and determine the loss of emotion classification of the training text data according to the prediction result function value.
  • the text sentiment analysis device may input the training text data into a preset bert model, obtain the prediction result of the emotion category corresponding to the specified entity in the training text data, and determine the emotion category according to the prediction result.
  • the loss function value for sentiment classification of the training text data may be input into a preset bert model, obtain the prediction result of the emotion category corresponding to the specified entity in the training text data, and determine the emotion category according to the prediction result.
  • the text sentiment analysis device may add sentiment category labels to The training text data is classified, and the training text data is divided into three types of data, and the three types of data include training text data carrying designated entities, entity data and label data; and the training text carrying designated entities
  • the text data, entity data and label data are input into the preset bert model, and the prediction result of the emotion category corresponding to the specified entity in the training text data is obtained.
  • the entity data is used to indicate the specified entity, wherein the entity data may include, but is not limited to, an entity name and the like.
  • the text sentiment analysis device inputs the training text data carrying the specified entity, entity data and label data into a preset bert model, and obtains the sentiment category corresponding to the specified entity in the training text data.
  • the training text data, entity data and label data carrying the specified entity in the training text data can be input into the bert model to obtain the word vector of the emotion category corresponding to the specified entity in the training text data; according to The word vector determines a prediction result of an emotion category corresponding to the specified entity in the training text data.
  • the text sentiment analysis apparatus may obtain the distance between the training text data and the specified entity in the training text data. weighted word vector; according to the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model, determine the loss function value of the emotion classification of the training text data.
  • the apparatus when the apparatus for text sentiment analysis obtains the weighted word vector of the distance between the training text data and the specified entity in the training text data, the apparatus may obtain the position index of the specified entity in the training text data ; And calculate the index of the relevant word associated with the designated entity described in the training text data according to the position index of the designated entity in the training text data; And according to the position index of the designated entity and the relative word of the designated entity The index determines the weighted word vector corresponding to the specified entity in the training text data.
  • the text sentiment analysis device determines the sentiment classification of the training text data according to the word vector of the sentiment category corresponding to the designated entity in the training text data obtained according to the weighted word vector and the bert model.
  • loss function value, the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model can be spliced to obtain a target word vector; and according to the target word
  • the vector determines a loss function value for sentiment classification of the training text data, the loss function value includes a first loss function value for a positive sentiment type and a second loss function value for a negative sentiment type.
  • the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model are spliced to obtain the target word vector
  • the weighted word vector of the entity A company is: [0.1, 0.2, 0.3...0.9]
  • the word vector corresponding to the sentiment category of entity A in the training text data obtained by entity A through the bert model is: [1.1, 1.2, 1.3...1.9]
  • right [0.1,0.2,0.3...0.9] and [1.1,1.2,1.3...1.9] are spliced to obtain the target word vector: [0.1,0.2,0.3...1.8,1.9].
  • the text sentiment analysis device may adjust the weight parameters of the bert model according to the loss function value, and retrain the bert model after adjusting the weight parameters to obtain a sentiment analysis model.
  • the text sentiment analysis apparatus may adjust the weight parameters of the bert model according to the first loss function value of the positive sentiment type and the second loss function value of the negative sentiment type, and adjust the weight parameters of the bert model after adjusting the weight parameters.
  • the model is retrained to obtain a sentiment analysis model.
  • S104 Input the text data to be tested into an emotion analysis model obtained by training for analysis, and determine the emotion type corresponding to the text data to be tested.
  • the text sentiment analysis device may input the text data to be tested into the sentiment analysis model obtained by training for analysis, and determine the sentiment type corresponding to the text data to be tested.
  • the text sentiment analysis device when the text sentiment analysis device inputs the text data to be tested into the sentiment analysis model obtained by training for analysis, and determines the sentiment type corresponding to the text data to be tested, the text data to be tested may be input into the text data to be tested.
  • the emotion analysis model obtained by training is analyzed, and the probability of the emotion category corresponding to the text data to be tested is determined; and according to the probability of the emotion category corresponding to the text data to be tested, it is determined that the emotion category with the maximum probability is the Test the sentiment type corresponding to the text data.
  • the text sentiment analysis device may obtain training text data carrying specified entities, add sentiment category labels to the training text data, input the training text data into a preset bert model, and obtain the training text data with the training text data.
  • the prediction result of the emotion category corresponding to the specified entity in the text data, and the loss function value of the emotion classification of the training text data is determined according to the prediction result;
  • the weight parameter of the bert model is adjusted according to the loss function value, and the The bert model after adjusting the weight parameters is retrained to obtain a sentiment analysis model;
  • the text data to be tested is input into the sentiment analysis model obtained by training for analysis, and the sentiment type corresponding to the text data to be tested is determined.
  • FIG. 2 is a schematic block diagram of a text sentiment analysis apparatus provided by an embodiment of the present application.
  • the text sentiment analysis apparatus in this embodiment includes: an acquiring unit 201 , a determining unit 202 , a training unit 203 and a testing unit 204 .
  • the obtaining unit 201 is configured to obtain training text data carrying a specified entity, and add an emotional category label to the training text data, wherein the emotional category label includes a first emotional category label and a second emotional category label, and the An emotion class label is used to indicate a positive emotion class, and the second emotion class label is used to indicate a negative emotion class.
  • Determining unit 202 configured to input the training text data into a preset bert model, obtain a prediction result of an emotion category corresponding to a designated entity in the training text data, and determine the training text data according to the prediction result Loss function value for sentiment classification.
  • the training unit 203 is configured to adjust the weight parameters of the bert model according to the loss function value, and retrain the bert model after adjusting the weight parameters to obtain a sentiment analysis model.
  • the testing unit 204 is configured to input the text data to be tested into an emotion analysis model obtained by training for analysis, and determine the emotion type corresponding to the text data to be tested.
  • the determining unit 202 inputs the training text data into the preset bert model, and before obtaining the prediction result of the emotion category corresponding to the specified entity in the training text data, is also used for: adding an emotion category label.
  • the training text data is classified and processed, and the training text data is divided into three types of data, and the three types of data include training text data carrying designated entities, entity data and label data; the determining unit 202
  • the text data is input to the preset bert model, and the prediction result of the emotion category corresponding to the designated entity in the training text data is obtained, it is specifically used for: inputting the training text data, entity data and label data carrying the designated entity
  • the preset bert model obtains the prediction result of the emotion category corresponding to the specified entity in the training text data.
  • the determination unit 202 inputs the training text data, entity data and label data carrying the specified entity into the preset bert model, and obtains the prediction result of the emotion category corresponding to the specified entity in the training text data. , is specifically used for: inputting the training text data, entity data and label data carrying the specified entity in the training text data into the bert model, to obtain the word vector of the emotion category corresponding to the specified entity in the training text data; according to The word vector determines a prediction result of an emotion category corresponding to the specified entity in the training text data.
  • the determining unit 202 determines the loss function value of the sentiment classification of the training text data according to the prediction result, it is specifically configured to: obtain the distance between the training text data and the designated entity in the training text data. weighted word vector; according to the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model, determine the loss function value of the emotion classification of the training text data.
  • the determining unit 202 acquires the weighted word vector of the specified entity in the training text data from the training text data, it is specifically used for: acquiring the position index of the specified entity in the training text data ; Calculate the index of the relevant word associated with the designated entity described in the training text data according to the position index of the designated entity in the training text data; Determine according to the position index of the designated entity and the index of the relevant word The weighted word vector corresponding to the specified entity in the training text data.
  • the determining unit 202 determines the loss function value of the emotion classification of the training text data according to the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model. is specifically used for: splicing the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model and the weighted word vector to obtain a target word vector; according to the target word vector A loss function value for sentiment classification of the training text data is determined, where the loss function value includes a first loss function value of a positive sentiment type and a second loss function value of a negative sentiment type.
  • the testing unit 204 inputs the text data to be tested into the sentiment analysis model obtained by training, and determines the emotion type corresponding to the text data to be tested, it is specifically used for: inputting the text data to be tested into The emotion analysis model obtained by training is analyzed, and the probability of the emotion category corresponding to the text data to be tested is determined; according to the probability of the emotion category corresponding to the text data to be tested, it is determined that the emotion category with the maximum probability is the emotion category to be tested.
  • the sentiment type corresponding to the text data is specifically used for: inputting the text data to be tested into The emotion analysis model obtained by training is analyzed, and the probability of the emotion category corresponding to the text data to be tested is determined; according to the probability of the emotion category corresponding to the text data to be tested, it is determined that the emotion category with the maximum probability is the emotion category to be tested.
  • the sentiment type corresponding to the text data is specifically used for: inputting the text data to be tested into The emotion analysis model obtained by training is analyzed, and the probability of the emotion
  • the text sentiment analysis device may obtain training text data carrying specified entities, add sentiment category labels to the training text data, input the training text data into a preset bert model, and obtain the training text data with the training text data.
  • the prediction result of the emotion category corresponding to the specified entity in the text data, and the loss function value of the emotion classification of the training text data is determined according to the prediction result;
  • the weight parameter of the bert model is adjusted according to the loss function value, and the The bert model after adjusting the weight parameters is retrained to obtain a sentiment analysis model;
  • the text data to be tested is input into the sentiment analysis model obtained by training for analysis, and the sentiment type corresponding to the text data to be tested is determined.
  • FIG. 3 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the device in this embodiment as shown in the figure may include: one or more processors 301 ; one or more input devices 302 , one or more output devices 303 and a memory 304 .
  • the above-mentioned processor 301 , input device 302 , output device 303 and memory 304 are connected through a bus 305 .
  • the memory 304 is used to store computer programs, the computer programs include programs, and the processor 301 is used to execute the programs stored in the memory 304 .
  • the processor 301 is configured to invoke the program to execute: acquiring training text data carrying a specified entity, and adding an emotion category label to the training text data, wherein the emotion category label includes a first emotion category label and the second emotion category label, the first emotion category label is used to indicate the positive emotion category, and the second emotion category label is used to indicate the negative emotion category; input the training text data into the preset bert model, and get the same the prediction result of the emotion category corresponding to the designated entity in the training text data, and determine the loss function value of the emotion classification of the training text data according to the prediction result; adjust the weight parameter of the bert model according to the loss function value, The bert model after adjusting the weight parameters is retrained to obtain a sentiment analysis model; the text data to be tested is input into the sentiment analysis model obtained by training for analysis, and the sentiment type corresponding to the text data to be tested is determined.
  • the processor 301 inputs the training text data, entity data and label data carrying the specified entity into the preset bert model, and obtains the prediction result of the emotion category corresponding to the specified entity in the training text data. , is specifically used for: inputting the training text data, entity data and label data carrying the specified entity in the training text data into the bert model, to obtain the word vector of the emotion category corresponding to the specified entity in the training text data; according to The word vector determines a prediction result of an emotion category corresponding to the specified entity in the training text data.
  • the processor 301 is specifically configured to: obtain the distance between the training text data and the specified entity in the training text data. weighted word vector; according to the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model, determine the loss function value of the emotion classification of the training text data.
  • the processor 301 acquires the weighted word vector of the specified entity in the training text data from the training text data, it is specifically used for: acquiring the position index of the specified entity in the training text data ; Calculate the index of the relevant word associated with the designated entity described in the training text data according to the position index of the designated entity in the training text data; Determine according to the position index of the designated entity and the index of the relevant word The weighted word vector corresponding to the specified entity in the training text data.
  • the processor 301 determines the loss function value of the emotion classification of the training text data according to the weighted word vector and the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model. is specifically used for: splicing the word vector of the emotion category corresponding to the designated entity in the training text data obtained by the bert model and the weighted word vector to obtain a target word vector; according to the target word vector A loss function value for sentiment classification of the training text data is determined, where the loss function value includes a first loss function value of a positive sentiment type and a second loss function value of a negative sentiment type.
  • the processor 301 inputs the text data to be tested into the sentiment analysis model obtained by training for analysis, and determines the emotion type corresponding to the text data to be tested
  • the processor 301 is specifically used for: inputting the text data to be tested into The emotion analysis model obtained by training is analyzed, and the probability of the emotion category corresponding to the text data to be tested is determined; according to the probability of the emotion category corresponding to the text data to be tested, it is determined that the emotion category with the maximum probability is the emotion category to be tested.
  • the sentiment type corresponding to the text data is specifically used for: inputting the text data to be tested into The emotion analysis model obtained by training is analyzed, and the probability of the emotion category corresponding to the text data to be tested is determined; according to the probability of the emotion category corresponding to the text data to be tested, it is determined that the emotion category with the maximum probability is the emotion category to be tested.
  • the sentiment type corresponding to the text data is specifically used for: inputting the text data to be tested into The emotion analysis model obtained by training is analyzed, and
  • the computer device may acquire training text data carrying a specified entity, add emotional category labels to the training text data, input the training text data into a preset bert model, and obtain the training text data that matches the training text data.
  • the prediction result of the emotion category corresponding to the specified entity in the and determine the loss function value of the emotion classification of the training text data according to the prediction result; adjust the weight parameter of the bert model according to the loss function value, and adjust the weight
  • the parameterized bert model is retrained to obtain a sentiment analysis model; the text data to be tested is input into the sentiment analysis model obtained by training for analysis, and the sentiment type corresponding to the text data to be tested is determined.
  • the so-called processor 301 may be a central processing unit (CenSral Processing UniS, CPU), the processor can also be other general-purpose processors, digital signal processors (DigiSal Signal Processor, DSP), application-specific integrated circuits (ApplicaSion Specific InSegraSed CircuiS, ASIC), off-the-shelf programmable gate array (Field-Programmable GaSe Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP Digital Signal Processor
  • ASIC Application-specific integrated circuits
  • FPGA off-the-shelf programmable gate array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the input device 302 may include a touchpad, a microphone, etc.
  • the output device 303 may include a display (LCD, etc.), a speaker, and the like.
  • the memory 304 which may include read-only memory and random access memory, provides instructions and data to the processor 301 .
  • a portion of memory 304 may also include non-volatile random access memory.
  • memory 304 may also store device type information.
  • the processor 301 , the input device 302 , and the output device 303 described in the embodiments of the present application may execute the implementation manner described in the method embodiment described in FIG. 1 provided in the embodiments of the present application, and may also execute the present application.
  • Application Embodiment The implementation of the text sentiment analysis apparatus described in FIG. 2 will not be repeated here.
  • Embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the text sentiment analysis described in the embodiment corresponding to FIG. 1 is implemented
  • the method can also implement the text sentiment analysis apparatus of the embodiment corresponding to FIG. 2 of the present application, which will not be repeated here.
  • the storage medium involved in this application such as a computer-readable storage medium, may be non-volatile or volatile.
  • the computer-readable storage medium may be an internal storage unit of the text sentiment analysis apparatus described in any of the foregoing embodiments, such as a hard disk or a memory of the text sentiment analysis apparatus.
  • the computer-readable storage medium may also be an external storage device of the text sentiment analysis device, such as a plug-in hard disk, a smart memory card (SmarS Media Card, SMC), a secure digital ( Secure DigiSal, SD) card, flash memory card (Flash Card), etc.
  • the computer-readable storage medium may further include both an internal storage unit of the text sentiment analysis device and an external storage device.
  • the computer-readable storage medium is used for storing the computer program and other programs and data required by the text sentiment analysis apparatus.
  • the computer-readable storage medium can also be used to temporarily store data that has been or will be output.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • a computer-readable storage medium includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
  • the aforementioned computer-readable storage medium includes: U disk, removable hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory)
  • the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; Use the created data, etc.
  • the above data can also be stored in a node of a blockchain.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

一种文本情感分析方法、装置、设备及存储介质,涉及人工智能领域,该方法包括:获取携带指定实体的训练文本数据,对训练文本数据添加情感类别标签;将训练文本数据输入bert模型,得到指定实体的情感类别的预测结果,并确定训练文本数据情感分类的损失函数值;根据损失函数值调整bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入情感分析模型进行分析,确定出与待测试文本数据对应的情感类型。这种方式可以自动识别不同实体的情感类别,提高识别实体的情感类别的准确性。该方法涉及区块链技术,如可将训练文本数据写入区块链中,以用于数据取证等场景。

Description

一种文本情感分析方法、装置、设备及存储介质
本申请要求于2021年1月21日提交中国专利局、申请号为202110084691.8,发明名称为“一种文本情感分析方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种文本情感分析方法、装置、设备及存储介质。
背景技术
互联网多样的时代,在社交平台中呈现了巨量而又丰富的文本情感信息,运用这些文本信息,可以挖掘文本内部信息并作情感分析,这对人机交互和人工智能有重大的现实意义。传统的文本情感分析研究主要面向篇章和句子级别文本,实现相应的情感极性判断。这些研究在一些应用领域都体现了很好的应用价值,例如网络舆论分析、股评分析、服务评价。然而,随着应用的深入,人们提出了更高的要求,例如进一步获取评价对象属性所对应的情感分析结果。
发明人意识到,传统的解决文本情感分析的方法主要有机器学习算法、回归、分类、以及深度学习算法,该些方法对实现不存在实体的文本,仅仅对句子描述的判断正确率可以达到很好的效果。因此,如何实现对于存在不同实体所对应不同的情感识别非常重要。
技术问题
本申请实施例提供了一种文本情感分析方法、装置、设备及存储介质,可以自动识别不同实体的情感类别,同时对实体相对应的文本信息可以捕捉的更清晰,提高了识别实体的情感类别的准确性。
技术解决方案
第一方面,本申请实施例提供了一种文本情感分析方法,所述方法包括:获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
第二方面,本申请实施例提供了一种文本情感分析装置,包括:获取单元,用于获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;确定单元,用于将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;训练单元,用于根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;测试单元,用于将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
第三方面,本申请实施例提供了一种计算机设备,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储支持文本情感分析装置执行上述方法的计算机程序,所述计算机程序包括程序,所述处理器被配置用于调用所述程序执行:获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行以实现以下方法:获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
有益效果
本申请实施例可以自动识别不同实体的情感类别,提高识别实体的情感类别的准确性。
附图说明
图1是本申请实施例提供的一种文本情感分析方法的示意流程图。
图2是本申请实施例提供的一种文本情感分析装置的示意框图。
图3是本申请实施例提供的一种计算机设备的示意框图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的技术方案涉及人工智能和/或大数据技术领域,以实现文本情感分析,推动智慧城市的建设。可选的,本申请涉及的数据如训练文本数据和/或情感类型等可存储于数据库中,或者可以存储于区块链中,本申请不做限定。
本申请实施例提供的文本情感分析方法可以应用于一种文本情感分析装置,在某些实施例中,所述文本情感分析装置设置于计算机设备中。在某些实施例中,所述计算机设备包括但不限于智能手机、平板电脑、膝上型电脑等中的一种或者多种。
下面结合附图1对本申请实施例提供的文本情感分析方法进行示意性说明。
请参见图1,图1是本申请实施例提供的一种文本情感分析方法的示意流程图,如图1所示,该方法可以由文本情感分析装置执行,所述文本情感分析装置设置于计算机设备中。具体地,本申请实施例的所述方法包括如下步骤。
S101:获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别。
本申请实施例中,文本情感分析装置可以获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别。在某些实施例中,所述正面情感类别包括中性情感类别。
在某些实施例中,所述指定实体为指定类型的实体,所述指定实体可以包括但不限于目标对象,所述目标对象可以为人、物、事件等信息,例如,所述指定实体可以为公司信息,所述公司信息可以包括但不限于公司名称、公司统一识别码等。
在一个实施例中,文本情感分析装置在获取携带指定实体的训练文本数据时,可以从数据库中获取携带有指定实体的待处理文本数据,也可以从外网中查找一些关于存在指定实体的待处理文本数据,并按指定比例将所述待处理文本数据划分为训练文本数据和待测试文本数据。例如,在按指定比例将所述待处理文本数据划分为训练文本数据和待测试文本数据时,可以对训练文本数据和测试文本数据进行4:1划分。
在一个实施例中,在对所述训练文本数据添加情感类别标签时,可以对所述携带指定实体的训练文本数据人工添加情感类别标签。在某些实施例中,所述情感类别标签包括但不限于数字、字母、文字等中的一种或多种。在一个示例中,可以对第二情感类别的情感类别标签标记为0,对第一情感类别的情感类别标签标记为1。
S102:将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值。
本申请实施例中,文本情感分析装置可以将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值。
在一个实施例中,文本情感分析装置在将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果之前,可以对添加情感类别标签后的训练文本数据进行分类处理,将所述训练文本数据分为三类数据,所述三类数据包括携带指定实体的训练文本数据、实体数据和标签数据;并将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果。在某些实施例中,所述实体数据用于指示所述指定实体,其中,所述实体数据可以包括但不限于实体名称等。
在一个实施例中,文本情感分析装置在将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果时,可以将所述训练文本数据中携带指定实体的训练文本数据、实体数据和标签数据输入所述bert模型,得到所述训练文本数据中所述指定实体对应情感类别的词向量;根据所述词向量确定与所述训练文本数据中的所述指定实体对应的情感类别的预测结果。
在一个实施例中,文本情感分析装置在根据所述预测结果确定所述训练文本数据情感分类的损失函数值时,可以获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量;根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值。
在一个实施例中,文本情感分析装置在获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量时,可以获取所述训练文本数据中所述指定实体的位置索引;并根据所述训练文本数据中所述指定实体的位置索引计算与所述训练文本数据中所述指定实体关联的相关字的索引;以及根据所述指定实体的位置索引和所述相关字的索引确定所述训练文本数据中所述指定实体对应的权重词向量。
例如,假设实体A公司股票大涨,而实体B公司股票大跌,股票大涨和股票大跌相对于实体A公司,距离分别是近和远,同时相对应的权重也分别是大和小。如果w1、w2分别表示股票大涨和股票大跌的权重,c1、c2分别表示实体A公司股票大涨和实体B公司股票大跌的词向量,则实体A公司股票大涨的词向量变为权重词向量w1*c1,实体B公司股票大跌的词向量变为权重词向量w2*c2。
在一个实施例中,文本情感分析装置在根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值时,可以对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量;并根据所述目标词向量确定所述训练文本数据情感分类的损失函数值,所述损失函数值包括正面情感类型的第一损失函数值和负面情感类型的第二损失函数值。
例如,在对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量时,假设实体A公司的权重词向量为:[0.1,0.2,0.3…0.9],实体A公司通过bert模型得到的所述训练文本数据中所述实体A公司对应情感类别的词向量为:[1.1,1.2,1.3…1.9],对[0.1,0.2,0.3…0.9]和[1.1,1.2,1.3…1.9]进行拼接处理,得到目标词向量:[0.1,0.2,0.3…1.8,1.9]。
S103:根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型。
本申请实施例中,文本情感分析装置可以根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型。
在一个实施例中,文本情感分析装置可以根据所述正面情感类型的第一损失函数值和负面情感类型的第二损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型。
S104:将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
本申请实施例中,文本情感分析装置可以将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
在一个实施例中,文本情感分析装置在将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型时,可以将所述待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类别的概率;并根据所述待测试文本数据对应的情感类别的概率,确定最大概率的情感类别为所述待测试文本数据对应的情感类型。
本申请实施例中,文本情感分析装置可以获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。通过这种实施方式,可以自动识别不同实体的情感类别,提高识别实体的情感类别的准确性。
本申请实施例还提供了一种文本情感分析装置,该文本情感分析装置用于执行前述任一项所述的方法的单元。具体地,参见图2,图2是本申请实施例提供的一种文本情感分析装置的示意框图。本实施例的文本情感分析装置包括:获取单元201、确定单元202、训练单元203以及测试单元204。
获取单元201,用于获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别。
确定单元202,用于将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值。
训练单元203,用于根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型。
测试单元204,用于将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
进一步地,所述确定单元202将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果之前,还用于:对添加情感类别标签后的训练文本数据进行分类处理,将所述训练文本数据分为三类数据,所述三类数据包括携带指定实体的训练文本数据、实体数据和标签数据;所述确定单元202将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果时,具体用于:将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果。
进一步地,所述确定单元202将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果时,具体用于:将所述训练文本数据中携带指定实体的训练文本数据、实体数据和标签数据输入所述bert模型,得到所述训练文本数据中所述指定实体对应情感类别的词向量;根据所述词向量确定与所述训练文本数据中的所述指定实体对应的情感类别的预测结果。
进一步地,所述确定单元202根据所述预测结果确定所述训练文本数据情感分类的损失函数值时,具体用于:获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量;根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值。
进一步地,所述确定单元202获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量时,具体用于:获取所述训练文本数据中所述指定实体的位置索引;根据所述训练文本数据中所述指定实体的位置索引计算与所述训练文本数据中所述指定实体关联的相关字的索引;根据所述指定实体的位置索引和所述相关字的索引确定所述训练文本数据中所述指定实体对应的权重词向量。
进一步地,所述确定单元202根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值时,具体用于:对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量;根据所述目标词向量确定所述训练文本数据情感分类的损失函数值,所述损失函数值包括正面情感类型的第一损失函数值和负面情感类型的第二损失函数值。
进一步地,所述测试单元204将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型时,具体用于:将所述待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类别的概率;根据所述待测试文本数据对应的情感类别的概率,确定最大概率的情感类别为所述待测试文本数据对应的情感类型。
本申请实施例中,文本情感分析装置可以获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。通过这种实施方式,可以自动识别不同实体的情感类别,提高识别实体的情感类别的准确性。
参见图3,图3是本申请实施例提供的一种计算机设备的示意框图。如图所示的本实施例中的设备可以包括:一个或多个处理器301;一个或多个输入设备302,一个或多个输出设备303和存储器304。上述处理器301、输入设备302、输出设备303和存储器304通过总线305连接。存储器304用于存储计算机程序,所述计算机程序包括程序,处理器301 用于执行存储器304存储的程序。其中,处理器301被配置用于调用所述程序执行:获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
进一步地,所述处理器301将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果时,具体用于:将所述训练文本数据中携带指定实体的训练文本数据、实体数据和标签数据输入所述bert模型,得到所述训练文本数据中所述指定实体对应情感类别的词向量;根据所述词向量确定与所述训练文本数据中的所述指定实体对应的情感类别的预测结果。
进一步地,所述处理器301根据所述预测结果确定所述训练文本数据情感分类的损失函数值时,具体用于:获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量;根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值。
进一步地,所述处理器301获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量时,具体用于:获取所述训练文本数据中所述指定实体的位置索引;根据所述训练文本数据中所述指定实体的位置索引计算与所述训练文本数据中所述指定实体关联的相关字的索引;根据所述指定实体的位置索引和所述相关字的索引确定所述训练文本数据中所述指定实体对应的权重词向量。
进一步地,所述处理器301根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值时,具体用于:对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量;根据所述目标词向量确定所述训练文本数据情感分类的损失函数值,所述损失函数值包括正面情感类型的第一损失函数值和负面情感类型的第二损失函数值。
进一步地,所述处理器301将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型时,具体用于:将所述待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类别的概率;根据所述待测试文本数据对应的情感类别的概率,确定最大概率的情感类别为所述待测试文本数据对应的情感类型。
本申请实施例中,计算机设备可以获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。通过这种实施方式,可以自动识别不同实体的情感类别,提高识别实体的情感类别的准确性。
应当理解,在本申请实施例中,所称处理器301可以是中央处理单元 (CenSral Processing UniS,CPU),该处理器还可以是其他通用处理器、数字信号处理器 (DigiSal Signal Processor,DSP)、专用集成电路 (ApplicaSion Specific InSegraSed CircuiS,ASIC)、现成可编程门阵列 (Field-Programmable GaSe Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
输入设备302可以包括触控板、麦克风等,输出设备303可以包括显示器(LCD等)、扬声器等。
该存储器304可以包括只读存储器和随机存取存储器,并向处理器301 提供指令和数据。存储器304的一部分还可以包括非易失性随机存取存储器。例如,存储器304还可以存储设备类型的信息。
具体实现中,本申请实施例中所描述的处理器301、输入设备302、输出设备303可执行本申请实施例提供的图1所述的方法实施例中所描述的实现方式,也可执行本申请实施例图2所描述的文本情感分析装置的实现方式,在此不再赘述。
本申请实施例中还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现图1所对应实施例中描述的文本情感分析方法,也可实现本申请图2所对应实施例的文本情感分析装置,在此不再赘述。
可选的,本申请涉及的存储介质如计算机可读存储介质可以是非易失性的,也可以是易失性的。
所述计算机可读存储介质可以是前述任一实施例所述的文本情感分析装置的内部存储单元,例如文本情感分析装置的硬盘或内存。所述计算机可读存储介质也可以是所述文本情感分析装置的外部存储装置,例如所述文本情感分析装置上配备的插接式硬盘,智能存储卡(SmarS Media Card, SMC),安全数字(Secure DigiSal, SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述文本情感分析装置的内部存储单元也包括外部存储装置。所述计算机可读存储介质用于存储所述计算机程序以及所述文本情感分析装置所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个计算机可读存储介质中,包括若干指令用以使得一台计算机设备 ( 可以是个人计算机,终端,或者网络设备等 ) 执行本申请各个实施例所述方法的全部或部分步骤。而前述的计算机可读存储介质包括:U 盘、移动硬盘、只读存储器 (ROM,Read-Only Memory)、随机存取存储器 (RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。所述的计算机可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
需要强调的是,为进一步保证上述数据的私密和安全性,上述数据还可以存储于一区块链的节点中。其中,本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
以上所述,仅为本申请的部分实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。

Claims (20)

  1. 一种文本情感分析方法,其中,所述方法包括:
    获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;
    将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;
    根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;
    将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
  2. 根据权利要求1所述的方法,其中,所述将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果之前,还包括:
    对添加情感类别标签后的训练文本数据进行分类处理,将所述训练文本数据分为三类数据,所述三类数据包括携带指定实体的训练文本数据、实体数据和标签数据;
    所述将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,包括:
    将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果。
  3. 根据权利要求2所述的方法,其中,所述将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,包括:
    将所述训练文本数据中携带指定实体的训练文本数据、实体数据和标签数据输入所述bert模型,得到所述训练文本数据中所述指定实体对应情感类别的词向量;
    根据所述词向量确定与所述训练文本数据中的所述指定实体对应的情感类别的预测结果。
  4. 根据权利要求3所述的方法,其中,所述根据所述预测结果确定所述训练文本数据情感分类的损失函数值,包括:
    获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量;
    根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值。
  5. 根据权利要求4所述的方法,其中,所述获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量,包括:
    获取所述训练文本数据中所述指定实体的位置索引;
    根据所述训练文本数据中所述指定实体的位置索引计算与所述训练文本数据中所述指定实体关联的相关字的索引;
    根据所述指定实体的位置索引和所述相关字的索引确定所述训练文本数据中所述指定实体对应的权重词向量。
  6. 根据权利要求4所述的方法,其中,所述根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值,包括:
    对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量;
    根据所述目标词向量确定所述训练文本数据情感分类的损失函数值,所述损失函数值包括正面情感类型的第一损失函数值和负面情感类型的第二损失函数值。
  7. 根据权利要求1所述的方法,其中,所述将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型,包括:
    将所述待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类别的概率;
    根据所述待测试文本数据对应的情感类别的概率,确定最大概率的情感类别为所述待测试文本数据对应的情感类型。
  8. 一种文本情感分析装置,包括:
    获取单元,用于获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;
    确定单元,用于将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;
    训练单元,用于根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;
    测试单元,用于将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
  9. 一种计算机设备,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序,所述处理器被配置用于调用所述程序,执行以下方法:
    获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;
    将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;
    根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;
    将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
  10. 根据权利要求9所述的计算机设备,其中,所述将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果之前,所述处理器还用于执行:
    对添加情感类别标签后的训练文本数据进行分类处理,将所述训练文本数据分为三类数据,所述三类数据包括携带指定实体的训练文本数据、实体数据和标签数据;
    所述将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,包括:
    将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果。
  11. 根据权利要求10所述的计算机设备,其中,执行所述将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,包括:
    将所述训练文本数据中携带指定实体的训练文本数据、实体数据和标签数据输入所述bert模型,得到所述训练文本数据中所述指定实体对应情感类别的词向量;
    根据所述词向量确定与所述训练文本数据中的所述指定实体对应的情感类别的预测结果。
  12. 根据权利要求11所述的计算机设备,其中,执行所述根据所述预测结果确定所述训练文本数据情感分类的损失函数值,包括:
    获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量;
    根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值。
  13. 根据权利要求12所述的计算机设备,其中,执行所述获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量,包括:
    获取所述训练文本数据中所述指定实体的位置索引;
    根据所述训练文本数据中所述指定实体的位置索引计算与所述训练文本数据中所述指定实体关联的相关字的索引;
    根据所述指定实体的位置索引和所述相关字的索引确定所述训练文本数据中所述指定实体对应的权重词向量;
    执行所述根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值,包括:
    对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量;
    根据所述目标词向量确定所述训练文本数据情感分类的损失函数值,所述损失函数值包括正面情感类型的第一损失函数值和负面情感类型的第二损失函数值。
  14. 根据权利要求9所述的计算机设备,其中,执行所述将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型,包括:
    将所述待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类别的概率;
    根据所述待测试文本数据对应的情感类别的概率,确定最大概率的情感类别为所述待测试文本数据对应的情感类型。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现以下方法:
    获取携带指定实体的训练文本数据,并对所述训练文本数据添加情感类别标签,其中,所述情感类别标签包括第一情感类别标签和第二情感类别标签,所述第一情感类别标签用于指示正面情感类别,所述第二情感类别标签用于指示负面情感类别;
    将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,并根据所述预测结果确定所述训练文本数据情感分类的损失函数值;
    根据所述损失函数值调整所述bert模型的权重参数,并对调整权重参数后的bert模型进行重新训练,得到情感分析模型;
    将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果之前,所述计算机程序被处理器执行时还用于实现:
    对添加情感类别标签后的训练文本数据进行分类处理,将所述训练文本数据分为三类数据,所述三类数据包括携带指定实体的训练文本数据、实体数据和标签数据;
    所述将所述训练文本数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,包括:
    将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果。
  17. 根据权利要求16所述的计算机可读存储介质,其中,执行所述将所述携带指定实体的训练文本数据、实体数据和标签数据输入预设的bert模型,得到与所述训练文本数据中的指定实体对应的情感类别的预测结果,包括:
    将所述训练文本数据中携带指定实体的训练文本数据、实体数据和标签数据输入所述bert模型,得到所述训练文本数据中所述指定实体对应情感类别的词向量;
    根据所述词向量确定与所述训练文本数据中的所述指定实体对应的情感类别的预测结果。
  18. 根据权利要求17所述的计算机可读存储介质,其中,执行所述根据所述预测结果确定所述训练文本数据情感分类的损失函数值,包括:
    获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量;
    根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值。
  19. 根据权利要求18所述的计算机可读存储介质,其中,执行所述获取所述训练文本数据距离所述训练文本数据中的所述指定实体的权重词向量,包括:
    获取所述训练文本数据中所述指定实体的位置索引;
    根据所述训练文本数据中所述指定实体的位置索引计算与所述训练文本数据中所述指定实体关联的相关字的索引;
    根据所述指定实体的位置索引和所述相关字的索引确定所述训练文本数据中所述指定实体对应的权重词向量;
    执行所述根据所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量,确定所述训练文本数据情感分类的损失函数值,包括:
    对所述权重词向量和所述bert模型得到的所述训练文本数据中所述指定实体对应情感类别的词向量进行拼接处理,得到目标词向量;
    根据所述目标词向量确定所述训练文本数据情感分类的损失函数值,所述损失函数值包括正面情感类型的第一损失函数值和负面情感类型的第二损失函数值。
  20. 根据权利要求15所述的计算机可读存储介质,其中,执行所述将待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类型,包括:
    将所述待测试文本数据输入训练得到的情感分析模型进行分析,确定出与所述待测试文本数据对应的情感类别的概率;
    根据所述待测试文本数据对应的情感类别的概率,确定最大概率的情感类别为所述待测试文本数据对应的情感类型。
PCT/CN2021/083804 2021-01-21 2021-03-30 一种文本情感分析方法、装置、设备及存储介质 WO2022156065A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110084691.8A CN112860841B (zh) 2021-01-21 2021-01-21 一种文本情感分析方法、装置、设备及存储介质
CN202110084691.8 2021-01-21

Publications (1)

Publication Number Publication Date
WO2022156065A1 true WO2022156065A1 (zh) 2022-07-28

Family

ID=76009053

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083804 WO2022156065A1 (zh) 2021-01-21 2021-03-30 一种文本情感分析方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112860841B (zh)
WO (1) WO2022156065A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115878808A (zh) * 2023-03-03 2023-03-31 有米科技股份有限公司 一种层级标签分类模型的训练方法及装置
CN116244440A (zh) * 2023-02-28 2023-06-09 深圳市云积分科技有限公司 文本情感分类方法、装置、设备及介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420122B (zh) * 2021-06-24 2024-06-04 平安科技(深圳)有限公司 分析文本的方法、装置、设备及存储介质
CN113723083B (zh) * 2021-07-15 2023-05-26 东华理工大学 基于bert模型的带权消极监督文本情感分析方法
CN113609390A (zh) * 2021-08-06 2021-11-05 北京金堤征信服务有限公司 信息分析方法及装置、电子设备和计算机可读存储介质
CN113704452B (zh) * 2021-08-31 2023-08-25 平安银行股份有限公司 基于Bert模型的数据推荐方法、装置、设备及介质
CN113722441B (zh) * 2021-08-31 2023-09-05 平安银行股份有限公司 一种相似文本的生成方法、装置、设备及存储介质
CN114003694A (zh) * 2021-11-01 2022-02-01 北京明略软件系统有限公司 实体情感分析方法、系统、存储介质及电子设备
CN114386436B (zh) * 2022-01-21 2023-07-18 平安科技(深圳)有限公司 文本数据的分析方法、模型训练方法、装置及计算机设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034823A1 (en) * 2017-07-27 2019-01-31 Getgo, Inc. Real time learning of text classification models for fast and efficient labeling of training data and customization
CN110442857A (zh) * 2019-06-18 2019-11-12 平安科技(深圳)有限公司 情感智能判断方法、装置及计算机可读存储介质
CN111444709A (zh) * 2020-03-09 2020-07-24 腾讯科技(深圳)有限公司 文本分类方法、装置、存储介质及设备
CN111695033A (zh) * 2020-04-29 2020-09-22 平安科技(深圳)有限公司 企业舆情分析方法、装置、电子设备及介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11580350B2 (en) * 2016-12-21 2023-02-14 Microsoft Technology Licensing, Llc Systems and methods for an emotionally intelligent chat bot
CN110516245A (zh) * 2019-08-27 2019-11-29 蓝盾信息安全技术股份有限公司 细粒度情感分析方法、装置、计算机设备及存储介质
CN110704622A (zh) * 2019-09-27 2020-01-17 北京明略软件系统有限公司 文本情感分类方法、装置及电子设备
CN111950273B (zh) * 2020-07-31 2023-09-01 南京莱斯网信技术研究院有限公司 基于情感信息抽取分析的网络舆情突发事件自动识别方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034823A1 (en) * 2017-07-27 2019-01-31 Getgo, Inc. Real time learning of text classification models for fast and efficient labeling of training data and customization
CN110442857A (zh) * 2019-06-18 2019-11-12 平安科技(深圳)有限公司 情感智能判断方法、装置及计算机可读存储介质
CN111444709A (zh) * 2020-03-09 2020-07-24 腾讯科技(深圳)有限公司 文本分类方法、装置、存储介质及设备
CN111695033A (zh) * 2020-04-29 2020-09-22 平安科技(深圳)有限公司 企业舆情分析方法、装置、电子设备及介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116244440A (zh) * 2023-02-28 2023-06-09 深圳市云积分科技有限公司 文本情感分类方法、装置、设备及介质
CN116244440B (zh) * 2023-02-28 2024-02-13 深圳市云积分科技有限公司 文本情感分类方法、装置、设备及介质
CN115878808A (zh) * 2023-03-03 2023-03-31 有米科技股份有限公司 一种层级标签分类模型的训练方法及装置

Also Published As

Publication number Publication date
CN112860841A (zh) 2021-05-28
CN112860841B (zh) 2023-10-24

Similar Documents

Publication Publication Date Title
WO2022156065A1 (zh) 一种文本情感分析方法、装置、设备及存储介质
CN110163478B (zh) 一种合同条款的风险审查方法及装置
WO2022105115A1 (zh) 问答对匹配方法、装置、电子设备及存储介质
CN112686022A (zh) 违规语料的检测方法、装置、计算机设备及存储介质
WO2021115186A1 (zh) 基于ann的程序检测方法和检测系统及应用
CN112671985A (zh) 基于深度学习的坐席质检方法、装置、设备及存储介质
CN110377733A (zh) 一种基于文本的情绪识别方法、终端设备及介质
CN111581945A (zh) 一种基于舆情分析的数据分析方法、装置和系统
CN108846292A (zh) 脱敏处理方法及装置
CN117112782A (zh) 一种招标公告信息提取方法
CN112989050B (zh) 一种表格分类方法、装置、设备及存储介质
WO2021051957A1 (zh) 司法文本识别方法、文本识别模型获得方法及相关设备
CN113657773A (zh) 话术质检方法、装置、电子设备及存储介质
CN111783425B (zh) 基于句法分析模型的意图识别方法及相关装置
CN113704452B (zh) 基于Bert模型的数据推荐方法、装置、设备及介质
CN116704528A (zh) 票据识别核验方法、装置、计算机设备及存储介质
WO2022227196A1 (zh) 一种数据分析方法、装置、计算机设备及存储介质
CN115719058A (zh) 一种内容分析方法、电子设备和存储介质
Sanchez Optimal threshold estimation for binary classifiers using game theory
CN113420545B (zh) 摘要生成方法、装置、设备及存储介质
CN113591881B (zh) 基于模型融合的意图识别方法、装置、电子设备及介质
CN113220737A (zh) 一种数据推荐方法、装置、电子设备及存储介质
CN113988059A (zh) 一种会话数据类型识别方法、系统、设备及存储介质
CN112329468B (zh) 异质关系网络的构建方法、装置、计算机设备及存储介质
TW202013216A (zh) 文本情緒分析的方法,裝置與電腦程式產品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21920453

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21920453

Country of ref document: EP

Kind code of ref document: A1