WO2023108980A1 - 基于文本对抗样例的信息推送方法及装置 - Google Patents

基于文本对抗样例的信息推送方法及装置 Download PDF

Info

Publication number
WO2023108980A1
WO2023108980A1 PCT/CN2022/089693 CN2022089693W WO2023108980A1 WO 2023108980 A1 WO2023108980 A1 WO 2023108980A1 CN 2022089693 W CN2022089693 W CN 2022089693W WO 2023108980 A1 WO2023108980 A1 WO 2023108980A1
Authority
WO
WIPO (PCT)
Prior art keywords
sentiment analysis
text information
text
training
model
Prior art date
Application number
PCT/CN2022/089693
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 WO2023108980A1 publication Critical patent/WO2023108980A1/zh

Links

Images

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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Definitions

  • the present application relates to the technical field of artificial intelligence, in particular to an information push method and device based on text confrontation examples.
  • the inventor realizes that most of the evaluations made by users on different medical products and projects are text data.
  • text data belongs to continuous Type data, after being processed by means of rotation and shearing, can still maintain the characteristics of the original data, but text data is discrete type data, after traditional replacement, deletion and other means of processing, the contextual coherence and content of the text may change.
  • the semantic context of the expression Therefore, effectively generating text adversarial examples has become one of the hot tasks of the recommendation module in the intelligent management system.
  • this application provides an information push method and device based on text confrontation examples, the main purpose of which is to improve the existing technical problems of low effectiveness of information push caused by the inability to effectively generate text confrontation examples.
  • the evaluation text information is classified and processed to obtain the sentiment classification result.
  • the text sentiment analysis model is obtained by training the training samples obtained by combining the expanded text information and the original text information, so The above-mentioned extended text information is used to characterize the text confrontation examples generated based on the masked language model;
  • the first obtaining module is used to obtain the evaluation text information of the target object
  • the classification module is used to classify the evaluation text information based on the text sentiment analysis model that has completed the model training to obtain the sentiment classification result.
  • the text sentiment analysis model is a training sample obtained by combining the expanded text information and the original text information Obtained by training, the extended text information is used to characterize the text confrontation example generated based on the masked language model;
  • the search module is used to extract the management category and keywords of the target object if the emotion classification result is positive emotion, and search for the target object under the same management category as the target object in the preset classification management database.
  • Associated objects whose similarity between the keywords is greater than a preset similarity threshold;
  • a computer-readable storage medium on which computer-readable instructions are stored, wherein, when the computer-readable instructions are executed by a processor, an information push method based on text confrontation examples is implemented ,include:
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and operable on the processor, wherein, when the computer-readable instructions are executed by the processor Implement an information push method based on text confrontation examples, including:
  • the evaluation text information is classified and processed to obtain the sentiment classification result.
  • the text sentiment analysis model is obtained by training the training samples obtained by combining the expanded text information and the original text information, so The above-mentioned extended text information is used to characterize the text confrontation examples generated based on the masked language model;
  • sorting is performed based on the similarity value, and the associated object is output according to the sorting result.
  • the present application provides an information push method and device based on text confrontation examples. Compared with the prior art, the embodiment of the present application obtains text sentiment analysis by using training samples obtained by combining expanded text information and original text information. The model classifies the evaluation text information of the target object, which greatly improves the accuracy of the evaluation text information classification processing, so that the effectiveness of information push according to the classification processing results is also improved accordingly.
  • Figure 1 shows a flow chart of an information push method based on a text confrontation example provided by an embodiment of the present application
  • FIG. 2 shows a flow chart of another information push method based on text confrontation examples provided by the embodiment of the present application
  • Fig. 4 shows a composition block diagram of an information pushing device based on a text confrontation example provided by an embodiment of the present application
  • AI artificial intelligence
  • the embodiments of the present application may acquire and process relevant data based on artificial intelligence technology.
  • artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • the executor may be an intelligent management system with an information push function, for example, an intelligent medical evaluation system, an intelligent library management system, and the like.
  • the current execution subject may be an intelligent book management system with evaluation and push functions
  • the target object may be the target book evaluated by the current user
  • the evaluation text information may be the text evaluation made by the current user on the target icon information.
  • the main thing is to carry out emotional evaluation on the content of the book, so as to match the books of the same category according to whether the user is interested in the content of the book, and further push it to the user.
  • the text information of the evaluation is "the author expounds historical events in a humorous tone, and he can't stop watching”, then the sentiment classification based on this evaluation text information is positive emotion, and further to user A Recommend the history books whose key words are "relaxed or humorous".
  • the evaluation text information in the embodiment of the present application can be obtained based on the user client of the intelligent book management system, wherein the intelligent book management system can be an intelligent supporting system of the library to facilitate users to borrow books; It is an e-book sales platform equipped with evaluation and push functions. After the user completes the purchase of the e-book or returns the paper book, he can evaluate the book and upload it to the book intelligent management system.
  • the intelligent book management system can be an intelligent supporting system of the library to facilitate users to borrow books; It is an e-book sales platform equipped with evaluation and push functions.
  • the text sentiment analysis model is trained by training samples obtained by combining the expanded text information and the original text information, and the expanded text information is used to represent the text adversarial examples generated based on the masked language model.
  • the text sentiment analysis model may be a text sentiment analysis model constructed based on a convolutional neural network model, for example, a TextCNN model and the like.
  • the text sentiment analysis model based on the convolutional neural network model is a text classification model based on the convolutional neural network. Generating text adversarial examples based on the masked language model can double the original text, and then train the text sentiment analysis model with the expanded text composed of adversarial examples and the training samples of the original text, which can effectively improve text sentiment analysis. The accuracy of the result. Since it is sentiment analysis, the obtained classification results include positive sentiment and negative sentiment, so it can be determined whether the user is interested in the target object or not.
  • the emotion classification result represents whether the user is interested in the target object or not
  • the emotion classification result of the user's evaluation text information for the target object is positive emotion
  • Object probabilities of the same class are also of interest.
  • the category of the target object and the keywords in the content introduction can be extracted, and under the same management category as the target object in the book classification management database, the similarity between the search and the keyword is greater than the preset similarity The associated object of the degree threshold.
  • the book classification management database can be set up by the library's intelligent supporting system to classify and manage the books stored in the library for easy reference by users; it can also be set up by the e-book sales platform for convenience when selling to users.
  • Retrieval For example, "Tomb Raider Notes Series” and “Ghost Blowing Lamp Series” are all stored in the category of "Suspense, Adventure” in the book classification management database, and the keyword is "Tomb Raider". If the emotion classification result is positive emotion, then the category "suspense, yarn” is extracted, the keyword “grave robbery” is found, and the related book “Ghost Blowing Lamp Series” is found.
  • an associated object that is the same category as the target object and associated with a keyword if it is found, it will be sorted based on the similarity value, and the associated object will be output according to the sorting result, which can be output in order from high to low , can also be output in order from low to high, which can be set by the user, and is not specifically limited in this embodiment of the present application.
  • the associated objects associated with the keyword can be one item or multiple items, and outputting them according to the similarity sorting results can enable the user to first see the related objects according to their own choice. It is easier to click and view the related objects with a high degree of correlation with the target object of interest.
  • the i-th evaluation text information can be expressed as Among them, w ij represents the jth word or token after the preprocessing of the evaluation text information x i , and l represents the length of the preprocessed text, then the data set G can be represented as D after preprocessing.
  • the embodiment of the application uses the TextCNN model to train the evaluation text information to generate an initial text sentiment analysis model M 1 .
  • the model M1 can effectively predict the probability that the evaluation text information belongs to positive and negative emotions.
  • the probability N i of sample x i belonging to negative emotion can be expressed as:
  • the evaluation text information is the evaluation text information in the sentiment analysis training original sample set.
  • p i [ ⁇ j] represents the score obtained by inputting x i [ ⁇ j] into the model M 1
  • y i represents the real label of the sample x i
  • S ij represents the mark word w ij in the evaluation text information x i
  • the importance in which reflects the degree of influence of the tagged word w ij on the sample label y i , and the larger S ij is, the more important w ij is to the evaluation text information x i .
  • the model structure is shown in Figure 3 shown. Input the replacement text x i * of the evaluation text information x i into the pre-trained language representation model to predict the tag word w i* corresponding to the position of the seed word. After the model prediction, obtain the preset number of tag words at the position to replace the original evaluation text information.
  • the seed words of xi to generate new text That is, the adversarial example to be measured for evaluating the text information xi .
  • the training samples obtained by combining the extended sample set for sentiment analysis training generated in step 206 and the original sample set for sentiment analysis training obtained in step 202 are trained to obtain the text sentiment analysis model for the basic text sentiment analysis model obtained in step 203 . Due to the expansion of the original training sample, the accuracy of the text sentiment analysis model can be greatly improved.
  • the sentiment classification result of the user's evaluation text information on the target object is negative emotion, it means that the user does not like or is not interested in the target object, and there is a high probability that he does not want to receive the information push associated with it.
  • an inquiry box may be output to the user for determining whether to block all other objects associated with the target object. If the feedback of determining the shielding is received, the shielding operation is performed, and the matching replacement object is queried from the classification management database based on the user characteristic information and pushed, so as to improve the user experience.
  • the user feature information may include user age, user gender, and borrowing records. For example, user A is a 23-year-old female user with the highest proportion of "urban romance" books borrowed in the borrowing records, and then pushes matching books of urban romance in the book classification management database.
  • basic information such as the user's age and gender in the user characteristic information can be obtained when the user registers in the system, and the borrowing records need to be updated in time after each login operation of the user to ensure the timeliness of the information.
  • the method of this embodiment further includes: if there is no associated object, then outputting a attention ranking list, which is used to represent the degree of attention of all objects in the classification management database leaderboard.
  • This application provides an information push method based on text confrontation examples.
  • the evaluation text information of the target object is obtained;
  • the evaluation text information is classified and processed to obtain the sentiment classification result ,
  • the text sentiment analysis model is obtained by training the training samples obtained by combining the expanded text information and the original text information, and the expanded text information is used to characterize the text adversarial examples generated based on the masked language model; again if the emotion If the classification result is positive emotion, the management category and keywords of the target object are extracted, and under the same management category as the target object in the preset classification management database, the similarity between the keyword and the keyword is greater than the preset.
  • the embodiment of the present application uses the text sentiment analysis model trained by the training samples obtained by combining the expanded text information and the original text information to classify the evaluation text information of the target object, which greatly improves the evaluation performance.
  • the accuracy of text information classification processing so that the effectiveness of information push according to the classification processing results is also improved accordingly.
  • the embodiment of the present application provides an information push device based on text confrontation examples, as shown in Figure 4, the device includes:
  • a first acquisition module 31 a classification module 32 , a search module 33 , and a first output module 34 .
  • the classification module 32 is used to classify the evaluation text information based on the text sentiment analysis model that has completed the model training, and obtain the sentiment classification result.
  • the text sentiment analysis model is the training obtained by combining the expanded text information and the original text information. Obtained by sample training, the extended text information is used to characterize the text adversarial examples generated based on the masked language model;
  • the search module 33 is used to extract the management category and keywords of the target object if the emotional classification result is positive emotion, and search for the same management category as the target object in the preset classification management database. Associated objects whose similarity between the keywords is greater than a preset similarity threshold;
  • the first output module 34 is configured to sort based on the similarity value if the associated objects exist, and output the associated objects according to the sorting results.
  • the device before the classification module 32, the device also includes:
  • the second acquisition module is used to acquire the full amount of initial evaluation text information, and obtain the original sample set for sentiment analysis training;
  • the construction module is used to construct an initial text sentiment analysis model based on a convolutional neural network, and perform model training on the initial text sentiment analysis model based on the sentiment analysis training original sample set to obtain a basic text sentiment analysis model.
  • the device further includes:
  • a calculation module configured to calculate the importance parameters of the marked words in the evaluation text information based on the basic text sentiment analysis model, and select the marked words corresponding to the maximum value of the importance parameters as the seed words of the evaluation text information, the
  • the evaluation text information is the evaluation text information in the sentiment analysis training original sample set;
  • the prediction module is used to predict the corresponding tagged word of the seed word position based on the pre-trained language representation model, obtain a preset number of tagged words to replace the seed word, and generate the adversarial example to be measured of the evaluation text information;
  • a measurement module configured to measure a similarity parameter between the adversarial example to be measured and the evaluation text information based on a semantic similarity model, and select the adversarial example to be measured corresponding to the maximum value of the similarity parameter as the evaluation
  • Adversarial examples of text information generate an expanded sample set for sentiment analysis training.
  • the device further includes:
  • the training module is used to train the basic text sentiment analysis model based on the training samples obtained by combining the sentiment analysis training original sample set and the sentiment analysis training expansion sample set to obtain a text sentiment analysis model.
  • An acquisition unit configured to acquire a full amount of initial evaluation text information
  • the screening unit is configured to screen the target character strings on the initial evaluation text information to obtain an original sample set for sentiment analysis training.
  • the device also includes:
  • the second output module is used to output an inquiry box if the emotion classification result is negative emotion, and the inquiry box is used to inquire whether to shield all objects under the management category of the target object;
  • the matching module is configured to match a replacement object from the classification management database based on user characteristic information, and push the replacement object if shielded, and the user characteristic information includes user age, user gender and borrowing records.
  • the device also includes:
  • This application provides an information push device based on text confrontation examples. Firstly, the evaluation text information of the target object is obtained; secondly, based on the text sentiment analysis model that has completed model training, the evaluation text information is classified and processed to obtain the sentiment classification result , the text sentiment analysis model is obtained by training the training samples obtained by combining the expanded text information and the original text information, and the expanded text information is used to characterize the text adversarial examples generated based on the masked language model; again if the emotion If the classification result is positive emotion, the management category and keywords of the target object are extracted, and under the same management category as the target object in the preset classification management database, the similarity between the keyword and the keyword is greater than the preset.
  • the embodiment of the present application uses the text sentiment analysis model trained by the training samples obtained by combining the expanded text information and the original text information to classify the evaluation text information of the target object, which greatly improves the evaluation performance.
  • the accuracy of text information classification processing so that the effectiveness of information push according to the classification processing results is also improved accordingly.
  • a computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute the information push based on the text confrontation example in any of the above method embodiments method.
  • the computer-readable storage medium may be non-volatile or volatile.
  • FIG. 5 shows a schematic structural diagram of a computer device provided according to an embodiment of the present application.
  • the specific embodiment of the present application does not limit the specific implementation of the computer device.
  • the computer device may include: a processor (processor) 402, a communication interface (Communications Interface) 404, a memory (memory) 406, and a communication bus 408.
  • processor processor
  • Communication interface Communication Interface
  • memory memory
  • the processor 402 , the communication interface 404 , and the memory 406 communicate with each other through the communication bus 408 .
  • the communication interface 404 is used to communicate with network elements of other devices such as clients or other servers.
  • the processor 402 is configured to execute the program 410, specifically, may execute the relevant steps in the above embodiment of the method for pushing information based on text confrontation examples.
  • the program 410 may include program codes including computer operation instructions.
  • the processor 402 may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the one or more processors included in the computer device may be of the same type, such as one or more CPUs, or may be different types of processors, such as one or more CPUs and one or more ASICs.
  • the program 410 can specifically be used to make the processor 402 perform the following operations:
  • the evaluation text information is classified and processed to obtain the sentiment classification result.
  • the text sentiment analysis model is obtained by training the training samples obtained by combining the expanded text information and the original text information, so The above-mentioned extended text information is used to characterize the text confrontation examples generated based on the masked language model;
  • sorting is performed based on the similarity value, and the associated object is output according to the sorting result.
  • each module or each step of the above-mentioned application can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here
  • the steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation.
  • the present application is not limited to any specific combination of hardware and software.

Abstract

本申请公开了一种基于文本对抗样例的信息推送方法及装置,涉及人工智能技术领域,主要目的在于改善现有由于无法有效生成文本对抗样例而导致的信息推送有效性低下的技术问题。包括:获取目标对象的评价文本信息;基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果;若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。主要用于信息的推送。

Description

基于文本对抗样例的信息推送方法及装置
本申请要求与2021年12月15日提交中国专利局、申请号为202111536773.8申请名称为“基于文本对抗样例的信息推送方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及一种人工智能技术领域,特别是涉及一种基于文本对抗样例的信息推送方法及装置。
背景技术
随着人工智能技术的飞速发展,大部分的智能医疗系统引入了文本智能管理系统。通常情况下,可以预先收集大量文本的标注数据,利用机器学习或者深度学习的方法训练模型,然后为用户推荐与其兴趣相匹配的信息。那么模型的精度直接影响了用户针对文本进行信息推送的体验,因此大数据是机器学习的前提,只有大量的标注数据才能有效的提高模型的精度。但是现实中往往仅有少量文本的标注数据,而采用人工标注的成本又极高,因此,目前大多采用基于原始数据生成对抗样例的方式。
发明人意识到目前由于用户针对不同医疗产品、项目作出的评价大多为文本数据,针对自然语言处理领域,文本对抗样例的生成较为困难,主要原因在于针对图像处理领域而言,图像数据属于连续型数据,经过旋转、剪切等手段处理后,依旧能够保持原始数据的特征,但文本数据属于离散型数据,经过传统的替换、删除等手段处理后,可能改变文本的上下文连贯性和文本所表达的语义情境。因此,有效的生成文本对抗样例成为智能管理系统中推荐模块的热点任务之一。
发明内容
有鉴于此,本申请提供一种基于文本对抗样例的信息推送方法及装置,主要目的在于改善现有由于无法有效生成文本对抗样例而导致的信息推送有效性低下的技术问题。
依据本申请一个方面,提供了一种基于文本对抗样例的信息推送方法,包括:
获取目标对象的评价文本信息;
基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并 在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
依据本申请另一个方面,提供了一种基于文本对抗样例的信息推送装置,包括:
第一获取模块,用于获取目标对象的评价文本信息;
分类模块,用于基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
查找模块,用于若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
第一输出模块,用于若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
根据本申请的又一方面,提供了一种计算机可读存储介质,其上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现基于文本对抗样例的信息推送方法,包括:
获取目标对象的评价文本信息;
基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
根据本申请的再一方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可处理器上运行的计算机可读指令,其中,所述计算机可读指令被处理器执行时实现基于文本对抗样例的信息推送方法,包括:
获取目标对象的评价文本信息;
基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并 在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
借由上述技术方案,本申请实施例提供的技术方案至少具有下列优点:
本申请提供了一种基于文本对抗样例的信息推送方法及装置,与现有技术相比,本申请实施例通过利用由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的文本情感分析模型对目标对象的评价文本信息进行分类处理,大大的提高了对评价文本信息分类处理的准确度,以使得根据分类处理结果进行信息推送的有效性也得到了相应的提高。
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了本申请实施例提供的一种基于文本对抗样例的信息推送方法流程图;
图2示出了本申请实施例提供的另一种基于文本对抗样例的信息推送方法流程图;
图3示出了本申请实施例提供的种子词位置对应标记词的预测模型结构示意图;
图4示出了本申请实施例提供的一种基于文本对抗样例的信息推送装置组成框图;
图5示出了本申请实施例提供的一种计算机设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算 机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
基于此,在一个实施例中,如图1所示,提供了一种基于文本对抗样例的信息推送方法,以该方法应用于服务器等计算机设备为例进行说明,其中,服务器可以是独立的服务器,也可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器,如智能医疗系统、数字医疗平台等。上述方法包括以下步骤:
101、获取目标对象的评价文本信息。
本申请实施例中,执行主体可以是带有信息推送功能的智能管理系统,例如,智能医疗评价系统,图书馆智能管理系统等。示例性的,当前执行主体可以是带有评价以及推送功能的图书智能管理系统,目标对象可以为当前用户进行评价的目标图书,评价文本信息可以为当前用户对目标图示做出的文本类评价信息。当用户完成电子书的购买,或者归还纸版图书后,管理系统会向用户提供关于目标图书的评价服务,以对目标图书的内容、购买或租借体验进行评价。其中,主要的是针对图书内容进行情感上的评价,以根据用户对图书内容的感兴趣与否进行相同类别图书的匹配,并进一步向用户进行推送。例如,用户A在归还图书B后,评价的文本信息为“作者以诙谐的口吻阐述历史事件,看得停不下来”,那么基于这一评价文本信息的情感分类为正面情感,进一步向用户A推荐关键词为“轻松或幽默”的历史类丛书。
需要说明的是,本申请实施例中的评价文本信息可以基于图书智能管理系统的用户客户端获取到,其中,图书智能管理系统可以为图书馆的智能配套系统,以方便用户借阅图书;也可以为配有评价以及推送功能的电子书售卖平台。用户在完成电子书的购买,或者归还纸版图书后,可以对图书进行评价,以上传至图书智能管理系统中。
102、基于已完成模型训练的文本情感分析模型对评价文本信息进行分类处理,得到情感分类结果。
其中,文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例。
本申请实施例中,文本情感分析模型可以为基于卷积神经网络模型构建的文本情感分析模型,例如,TextCNN模型等。且由基于掩码语言模型生成的文本对抗样例(扩充文本信息)与原始文本信息组合得到的训练样本,完成模型训练的。其中。基于卷积神经网络模型构建的文本情感分析模型为基于卷积神经网络的一种文本分类模型。基于掩码语言模型生成文本对抗样例,可以将原始文本扩充一倍,然后将由对抗样例构成的扩充文本以及原始文本组成的训练样本,对文本情感分析模型进行训练可以有效的提高文本情感分析结果的准确率。由于是情感分析,因此得到的分类结果包括正面情感与负面情感,因此,可以确定出用户针对目标对象的感兴趣与否。
103、若情感分类结果为正面情感,则提取目标对象的管理类别以及关键词,并在预设分类管理数据库中与目标对象相同的管理类别下,查找与关键词之间相似度大于预设相似度阈值的关联对象。
本申请实施例中,由于情感分类结果代表用户对于目标对象的感兴趣与否,若用户针对目标对象的评价文本信息的情感分类结果为正面情感,说明该用户对目标对象为喜欢情感,那么对相同类别的对象大概率也是感兴趣的。为了提高用户的阅读体验感,可以提取目标对象的类别以及内容简介中的关键词,并在图书分类管理数据库中与目标对象相同的管理类别下,查找与关键词之间相似度大于预设相似度阈值的关联对象。其中,图书分类管理数据库可以由图书馆的智能配套系统进行设置,用于对馆存图书进行分类管理,以便于用户查阅;也可以由电子书售卖平台进行设置,以在向用户进行售卖时方便调取。例如,“盗墓笔记系列”“鬼吹灯系列”均存储在图书分类管理数据库中“悬疑、冒险”类别下,关键词为“盗墓”,当用户A对“盗墓笔记系列”图书的评价文本信息的情感分类结果为正面情感,则提取类别“悬疑、毛线”,关键词“盗墓”,查找到关联图书“鬼吹灯系列”。
104、若存在关联对象,则基于相似度值进行排序,按照排序结果输出关联对象。
本申请实施例中,若查找到了与目标对象类别相同,关键词相关联的关联对象,则基于相似度值进行排序,按照排序结果将关联对象进行输出,可以按照由高到低的顺序进行输出,也可以按照由低到高的顺序进行输出,具体可以由用户自行设定,本申请实施例不做具体限定。
需要说明的是,目标对象类别相同,关键词相关联的关联对象可以是1项也可以是多项,将其按照相似度排序结果进行输出,可以使用户根据自己的选择,首先看到与自己感兴趣的目标对象关联度高的关联对象,更容易点击查看。
本申请实施例提供了另一种基于文本对抗样例的信息推送方法,如图2所示,该方法包括:
201、获取全量初始评价文本信息;
本申请实施例中,以带有评价以及推送功能的图书智能管理系统为例,在构建模型之前,首先获取全量初始评价文本信息。其中,图书智能管理系统中存储的所有图书的评价文本信息,经过标注后,作为全量初始评价文本信息。
202、对初始评价文本信息进行目标字符串的筛选,得到情感分析训练原始样本集。
本申请实施例中,全量初始评价文本信息具体可表示为:G={(x 1,y 1),...,(x i,y i),...,(x n,y n)},其中,(x i,y i)分别表示数据集G中第i条评价文本信息和其对应的正负面类别标签,n表示数据集总数量,对于任一条评价文本信息,y i∈{0,1},0表示正面标签,1表示负面标签。由于原始图书的文本信息中蕴含着大量的无用字符,因此需要评价文本信息做数据预处理,主要包括分词、去停用词、去标点符号等操作,最终第i条评价文本信息,可表示为
Figure PCTCN2022089693-appb-000001
其中,w ij表示为评价文本信息x i预处理后的第j个词或者词语(token),l表示预处理后的文本长度,则数据集G经 过预处理后可表示为D。
203、基于卷积神经网络构建初始文本情感分析模型,并基于情感分析训练原始样本集对初始文本情感分析模型进行模型训练,得到基础文本情感分析模型。
本申请实施例中,基于步骤202预处理的评价文本信息D,示例性的,本申请实施例采用TextCNN模型训练该评价文本信息,生成初始文本情感分析模型M 1。模型训练完成后,模型M 1可以有效的预测评价文本信息属于正负面情感的概率。
样本x i属于正面情感的概率P i可表述为:
P i=M 1(x i)
样本x i属于负面情感的概率N i可表述为:
N i=1-P i
204、基于基础文本情感分析模型,计算评价文本信息中标记词的重要性参数,选取重要性参数最大值对应的标记词作为评价文本信息的种子词。
其中,评价文本信息为所述情感分析训练原始样本集中的评价文本信息。
本申请实施例中,对于评价文本信息
Figure PCTCN2022089693-appb-000002
中任一标记词w ij的重要性参数计算如下:
从评价文本信息x i中删除w ij,记作x i[≠j],然后将x i[≠j]输入到模型M 1中预测其分数,公式如下:
Figure PCTCN2022089693-appb-000003
其中,p i[≠j]表示将x i[≠j]输入到模型M 1中获取的分数,y i表示样本x i的真实标签,S ij表示将标记词w ij在评价文本信息x i中的重要性,它反映了标记词w ij对样本标签y i的影响程度,同时S ij越大表示w ij对评价文本信息x i越重要。
统计评价文本信息D中每条样本中每个标记词的重要性参数,选取每条评价文本信息中重要性参数最大的标记词作为该评价文本信息的种子词。
205、基于预训练语言表示模型预测种子词位置的对应标记词,获取预设数量的标记词替换种子词,生成评价文本信息的待度量对抗样例。
本申请实施例中,假设评价文本信息x i的种子词标记为w ij,将评价文本信息w ij替换为[MASK],则替换后的评价文本信息x i可表示为x i*=[w i1,w i2,...,[MASK],...,w il],然后将x i*输入到预训练的语言表示模型中,预测种子词位置所对应的词,模型结构如下图3所示。将评价文本信息x i的替换文本x i*输入到预训练的语言表示模型预测种子词位置对应标记词w i*,经过模型预测后,获取该位置预设数量的标记词替换原始评价文本信息x i的种子词,生成新的文本
Figure PCTCN2022089693-appb-000004
即为评价文本信息x i的待度量对抗样例。
206、基于语义相似度模型度量待度量对抗样例和评价文本信息之间的相似度参数,选取相似度参数最大值对应的待度量对抗样例作为评价文本信息的对抗样例,生成情感分析训练扩充样本集。
基于步骤205预训练模型生成的待度量对抗样例,保证了文本上下文的连贯性,为了进一步保证对抗样例的与原评价文本信息的语义相似性,本申请实施例中,基于语义 相似度模型度量待度量对抗样例和评价文本信息之间的相似度参数,选取相似度参数最大值对应的待度量对抗样例作为评价文本信息的对抗样例,并生成情感分析训练扩充样本集。
207、基于由所述情感分析训练原始样本集以及情感分析训练扩充样本集组合得到的训练样本对基础文本情感分析模型进行训练,得到文本情感分析模型。
本申请实施例中,将步骤206生成的情感分析训练扩充样本集与步骤202得到情感分析训练原始样本集组合得到的训练样本,对步骤203得到基础文本情感分析模型进行训练,得到文本情感分析模型。由于将原始训练样本扩充了一本,以使得文本情感分析模型的准确度得以大幅度提升。
另一个实施例中,为了进一步说明及限定,本实施例方法还包括:若情感分类结果为负面情感,则输出询问框,询问框用于询问是否屏蔽目标对象的管理类别下的所有对象;若屏蔽,则基于用户特征信息从分类管理数据库中匹配替换对象,将替换对象进行推送,用户特征信息包括用户年龄、用户性别以及借阅记录。
具体的,若用户对于目标对象的评价文本信息的情感分类结果为负面情感,则说明该用户对目标对象不喜欢或者不感兴趣,那么大概率也是不希望接收到与之相关联的信息推送的,为了确定用户是否真的不希望接收相关推送,此时,可以向用户输出询问框,用于确定是否屏蔽与目标对象相关联的其他所有对象。若接收到确定屏蔽的反馈,则执行屏蔽操作,并基于用户特征信息从分类管理数据库中查询与之相匹配的替换对象进行推送,以提升用户的体验感。其中用户特征信息可以包括用户年龄、用户性别以及借阅记录等。例如,用户A为23岁女性用户,借阅记录中“都市言情类”图书借阅的比例最高,则在图书分类管理数据库中匹配都市言情类的图书进行推送。
需要说明的是,用户特征信息中用户年龄、用户性别等基础信息可以在用户进行系统注册时获得,借阅记录需要在用户的每次登录操作后及时更新,以确保信息的时效性。
另一个实施例中,为了进一步说明及限定,本实施例方法还包括:若不存在关联对象,则输出关注度排行榜,关注度排行榜用于表征分类管理数据库中所有对象的被关注程度的排行榜。
具体的,若在分类管理数据库中为查找到与目标对象相匹配的关联对象时,为了保证用户的体验感,可以向用户输出关注度排行榜。其中,关注度排行榜用于表征分类管理数据库中所有对象的被关注程度的排行榜,例如,热门图书借阅榜,图书热销榜等。
本申请提供了一种基于文本对抗样例的信息推送方法,首先获取目标对象的评价文本信息;其次基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;再次若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述 关键词之间相似度大于预设相似度阈值的关联对象;最后若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。与现有技术相比,本申请实施例通过利用由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的文本情感分析模型对目标对象的评价文本信息进行分类处理,大大的提高了对评价文本信息分类处理的准确度,以使得根据分类处理结果进行信息推送的有效性也得到了相应的提高。
进一步的,作为对上述图1所示方法的实现,本申请实施例提供了一种基于文本对抗样例的信息推送装置,如图4所示,该装置包括:
第一获取模块31,分类模块32,查找模块33,第一输出模块34。
第一获取模块31,用于获取目标对象的评价文本信息;
分类模块32,用于基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
查找模块33,用于若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
第一输出模块34,用于若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
在具体的应用场景中,所述分类模块32之前,所述装置还包括:
第二获取模块,用于获取全量初始评价文本信息,得到情感分析训练原始样本集;
构建模块,用于基于卷积神经网络构建初始文本情感分析模型,并基于所述情感分析训练原始样本集对所述初始文本情感分析模型进行模型训练,得到基础文本情感分析模型。
在具体的应用场景中,所述构建模块之后,所述装置还包括:
计算模块,用于基于所述基础文本情感分析模型,计算所述评价文本信息中标记词的重要性参数,选取重要性参数最大值对应的标记词作为所述评价文本信息的种子词,所述评价文本信息为所述情感分析训练原始样本集中的评价文本信息;
预测模块,用于基于预训练语言表示模型预测所述种子词位置的对应标记词,获取预设数量的标记词替换所述种子词,生成所述评价文本信息的待度量对抗样例;
度量模块,用于基于语义相似度模型度量所述待度量对抗样例和所述评价文本信息之间的相似度参数,选取相似度参数最大值对应的所述待度量对抗样例作为所述评价文本信息的对抗样例,生成情感分析训练扩充样本集。
在具体的应用场景中,所述度量模块之后,所述装置还包括:
训练模块,用于基于由所述情感分析训练原始样本集以及所述情感分析训练扩充样本集组合得到的训练样本对所述基础文本情感分析模型进行训练,得到文本情感分析模 型。
在具体的应用场景中,所述第二获取模块,具体包括:
获取单元,用于获取全量初始评价文本信息;
筛选单元,用于对所述初始评价文本信息进行目标字符串的筛选,得到情感分析训练原始样本集。
在具体的应用场景中,所述装置还包括:
第二输出模块,用于若所述情感分类结果为负面情感,则输出询问框,所述询问框用于询问是否屏蔽所述目标对象的管理类别下的所有对象;
匹配模块,用于若屏蔽,则基于用户特征信息从所述分类管理数据库中匹配替换对象,将所述替换对象进行推送,所述用户特征信息包括用户年龄、用户性别以及借阅记录。
在具体的应用场景中,所述装置还包括:
第三输出模块,用于若不存在所述关联对象,则输出关注度排行榜,所述关注度排行榜用于表征所述分类管理数据库中所有对象的被关注程度的排行榜。
本申请提供了一种基于文本对抗样例的信息推送装置,首先获取目标对象的评价文本信息;其次基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;再次若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;最后若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。与现有技术相比,本申请实施例通过利用由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的文本情感分析模型对目标对象的评价文本信息进行分类处理,大大的提高了对评价文本信息分类处理的准确度,以使得根据分类处理结果进行信息推送的有效性也得到了相应的提高。
根据本申请一个实施例提供了一种计算机可读存储介质,所述存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的基于文本对抗样例的信息推送方法。所述计算机可读存储介质可以是非易失性,也可以是易失性。
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。
图5示出了根据本申请一个实施例提供的一种计算机设备的结构示意图,本申请具体实施例并不对计算机设备的具体实现做限定。
如图5所示,该计算机设备可以包括:处理器(processor)402、通信接口 (Communications Interface)404、存储器(memory)406、以及通信总线408。
其中:处理器402、通信接口404、以及存储器406通过通信总线408完成相互间的通信。
通信接口404,用于与其它设备比如客户端或其它服务器等的网元通信。
处理器402,用于执行程序410,具体可以执行上述基于文本对抗样例的信息推送方法实施例中的相关步骤。
具体地,程序410可以包括程序代码,该程序代码包括计算机操作指令。
处理器402可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。计算机设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。
存储器406,用于存放程序410。存储器406可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
程序410具体可以用于使得处理器402执行以下操作:
获取目标对象的评价文本信息;
基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
存储介质中还可以包括操作系统、网络通信模块。操作系统是管理上述基于文本对抗样例的信息推送的实体设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与信息处理实体设备中其它硬件和软件之间通信。
本说明书中各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似的部分相互参见即可。对于系统实施例而言,由于其与方法实施例基本对应,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
可能以许多方式来实现本申请的方法和系统。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本申请的方法和系统。用于所述方法的步骤的上述顺序仅是为了进行说明,本申请的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本申请实施为记录在记录介质中的程序, 这些程序包括用于实现根据本申请的方法的机器可读指令。因而,本申请还覆盖存储用于执行根据本申请的方法的程序的记录介质。
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。

Claims (20)

  1. 一种基于文本对抗样例的信息推送方法,其中,包括:
    获取目标对象的评价文本信息;
    基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
    若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
    若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
  2. 根据权利要求1所述的方法,其中,所述基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理之前,所述方法还包括:
    获取全量初始评价文本信息,得到情感分析训练原始样本集;
    基于卷积神经网络构建初始文本情感分析模型,并基于所述情感分析训练原始样本集对所述初始文本情感分析模型进行模型训练,得到基础文本情感分析模型。
  3. 根据权利要求2所述的方法,其中,所述得到基础文本情感分析模型之后,所述方法还包括:
    基于所述基础文本情感分析模型,计算所述评价文本信息中标记词的重要性参数,选取重要性参数最大值对应的标记词作为所述评价文本信息的种子词,所述评价文本信息为所述情感分析训练原始样本集中的评价文本信息;
    基于预训练语言表示模型预测所述种子词位置的对应标记词,获取预设数量的标记词替换所述种子词,生成所述评价文本信息的待度量对抗样例;
    基于语义相似度模型度量所述待度量对抗样例和所述评价文本信息之间的相似度参数,选取相似度参数最大值对应的所述待度量对抗样例作为所述评价文本信息的对抗样例,生成情感分析训练扩充样本集。
  4. 根据权利要求3所述的方法,其中,所述生成情感分析训练扩充样本集之后,所述方法还包括:
    基于由所述情感分析训练原始样本集以及所述情感分析训练扩充样本集组合得到的训练样本对所述基础文本情感分析模型进行训练,得到文本情感分析模型。
  5. 根据权利要求2所述的方法,其中,所述获取全量初始评价文本信息,得到情感分析训练原始样本集,具体包括:
    获取全量初始评价文本信息;
    对所述初始评价文本信息进行目标字符串的筛选,得到情感分析训练原始样本集。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    若所述情感分类结果为负面情感,则输出询问框,所述询问框用于询问是否屏蔽所述目标对象的管理类别下的所有对象;
    若屏蔽,则基于用户特征信息从所述分类管理数据库中匹配替换对象,将所述替换对象进行推送,所述用户特征信息包括用户年龄、用户性别以及借阅记录。
  7. 根据权利要求1所述的方法,其中,所述方法还包括:
    若不存在所述关联对象,则输出关注度排行榜,所述关注度排行榜用于表征所述分类管理数据库中所有对象的被关注程度的排行榜。
  8. 一种基于文本对抗样例的信息推送装置,其中,包括:
    第一获取模块,用于获取目标对象的评价文本信息;
    分类模块,用于基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
    查找模块,用于若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
    第一输出模块,用于若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
  9. 一种计算机可读存储介质,其上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现基于文本对抗样例的信息推送方法,包括:
    获取目标对象的评价文本信息;
    基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
    若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
    若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
  10. 根据权利要求9所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行时实现基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理之前,所述方法还包括:
    获取全量初始评价文本信息,得到情感分析训练原始样本集;
    基于卷积神经网络构建初始文本情感分析模型,并基于所述情感分析训练原始样本 集对所述初始文本情感分析模型进行模型训练,得到基础文本情感分析模型。
  11. 根据权利要求10所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行时实现得到基础文本情感分析模型之后,所述方法还包括:
    基于所述基础文本情感分析模型,计算所述评价文本信息中标记词的重要性参数,选取重要性参数最大值对应的标记词作为所述评价文本信息的种子词,所述评价文本信息为所述情感分析训练原始样本集中的评价文本信息;
    基于预训练语言表示模型预测所述种子词位置的对应标记词,获取预设数量的标记词替换所述种子词,生成所述评价文本信息的待度量对抗样例;
    基于语义相似度模型度量所述待度量对抗样例和所述评价文本信息之间的相似度参数,选取相似度参数最大值对应的所述待度量对抗样例作为所述评价文本信息的对抗样例,生成情感分析训练扩充样本集。
  12. 根据权利要求11所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行时实现方法还包括:
    基于由所述情感分析训练原始样本集以及所述情感分析训练扩充样本集组合得到的训练样本对所述基础文本情感分析模型进行训练,得到文本情感分析模型。
  13. 根据权利要求10所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行时实现获取全量初始评价文本信息,得到情感分析训练原始样本集,具体包括:
    获取全量初始评价文本信息;
    对所述初始评价文本信息进行目标字符串的筛选,得到情感分析训练原始样本集。
  14. 根据权利要求9所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行时实现方法还包括:
    若所述情感分类结果为负面情感,则输出询问框,所述询问框用于询问是否屏蔽所述目标对象的管理类别下的所有对象;
    若屏蔽,则基于用户特征信息从所述分类管理数据库中匹配替换对象,将所述替换对象进行推送,所述用户特征信息包括用户年龄、用户性别以及借阅记录。
  15. 一种计算机设备,包括存储器、处理器及存储在存储器上并可处理器上运行的计算机可读指令,其中,所述计算机可读指令被处理器执行时实现基于文本对抗样例的信息推送方法,包括:
    获取目标对象的评价文本信息;
    基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理,得到情感分类结果,所述文本情感分析模型是由扩充文本信息以及原始文本信息组合得到的训练样本训练得到的,所述扩充文本信息用于表征基于掩码语言模型生成的文本对抗样例;
    若所述情感分类结果为正面情感,则提取所述目标对象的管理类别以及关键词,并 在预设分类管理数据库中与所述目标对象相同的管理类别下,查找与所述关键词之间相似度大于预设相似度阈值的关联对象;
    若存在所述关联对象,则基于相似度值进行排序,按照排序结果输出所述关联对象。
  16. 根据权利要求15所述的计算机设备,其中,所述计算机可读指令被处理器执行时实现基于已完成模型训练的文本情感分析模型对所述评价文本信息进行分类处理之前,所述方法还包括:
    获取全量初始评价文本信息,得到情感分析训练原始样本集;
    基于卷积神经网络构建初始文本情感分析模型,并基于所述情感分析训练原始样本集对所述初始文本情感分析模型进行模型训练,得到基础文本情感分析模型。
  17. 根据权利要求16所述的计算机设备,其中,所述计算机可读指令被处理器执行时实现得到基础文本情感分析模型之后,所述方法还包括:
    基于所述基础文本情感分析模型,计算所述评价文本信息中标记词的重要性参数,选取重要性参数最大值对应的标记词作为所述评价文本信息的种子词,所述评价文本信息为所述情感分析训练原始样本集中的评价文本信息;
    基于预训练语言表示模型预测所述种子词位置的对应标记词,获取预设数量的标记词替换所述种子词,生成所述评价文本信息的待度量对抗样例;
    基于语义相似度模型度量所述待度量对抗样例和所述评价文本信息之间的相似度参数,选取相似度参数最大值对应的所述待度量对抗样例作为所述评价文本信息的对抗样例,生成情感分析训练扩充样本集。
  18. 根据权利要求17所述的计算机设备,其中,所述计算机可读指令被处理器执行时实现生成情感分析训练扩充样本集之后,所述方法还包括:
    基于由所述情感分析训练原始样本集以及所述情感分析训练扩充样本集组合得到的训练样本对所述基础文本情感分析模型进行训练,得到文本情感分析模型。
  19. 根据权利要求16所述的计算机设备,其中,所述计算机可读指令被处理器执行时实现获取全量初始评价文本信息,得到情感分析训练原始样本集,具体包括:
    获取全量初始评价文本信息;
    对所述初始评价文本信息进行目标字符串的筛选,得到情感分析训练原始样本集。
  20. 根据权利要求15所述的计算机设备,其中,所述计算机可读指令被处理器执行时实现方法还包括:
    若所述情感分类结果为负面情感,则输出询问框,所述询问框用于询问是否屏蔽所述目标对象的管理类别下的所有对象;
    若屏蔽,则基于用户特征信息从所述分类管理数据库中匹配替换对象,将所述替换对象进行推送,所述用户特征信息包括用户年龄、用户性别以及借阅记录。
PCT/CN2022/089693 2021-12-15 2022-04-27 基于文本对抗样例的信息推送方法及装置 WO2023108980A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111536773.8 2021-12-15
CN202111536773.8A CN114238573B (zh) 2021-12-15 2021-12-15 基于文本对抗样例的信息推送方法及装置

Publications (1)

Publication Number Publication Date
WO2023108980A1 true WO2023108980A1 (zh) 2023-06-22

Family

ID=80756511

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/089693 WO2023108980A1 (zh) 2021-12-15 2022-04-27 基于文本对抗样例的信息推送方法及装置

Country Status (2)

Country Link
CN (1) CN114238573B (zh)
WO (1) WO2023108980A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116882412A (zh) * 2023-06-29 2023-10-13 易方达基金管理有限公司 一种基于nlp分类的语义推理方法及系统
CN117093782A (zh) * 2023-10-20 2023-11-21 国网智能科技股份有限公司 一种电力人工智能模型系统及方法
CN117574981A (zh) * 2024-01-16 2024-02-20 城云科技(中国)有限公司 一种信息分析模型的训练方法及信息分析方法
CN117574981B (zh) * 2024-01-16 2024-04-26 城云科技(中国)有限公司 一种信息分析模型的训练方法及信息分析方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114238573B (zh) * 2021-12-15 2023-09-22 平安科技(深圳)有限公司 基于文本对抗样例的信息推送方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684478A (zh) * 2018-12-18 2019-04-26 腾讯科技(深圳)有限公司 分类模型训练方法、分类方法及装置、设备和介质
CN112507735A (zh) * 2020-12-18 2021-03-16 北京百度网讯科技有限公司 机器翻译模型的训练方法、装置和电子设备
US20210165960A1 (en) * 2019-12-02 2021-06-03 Asapp, Inc. Modifying text according to a specified attribute
CN113705697A (zh) * 2021-08-31 2021-11-26 平安科技(深圳)有限公司 基于情感分类模型的信息推送方法、装置、设备及介质
CN114238573A (zh) * 2021-12-15 2022-03-25 平安科技(深圳)有限公司 基于文本对抗样例的信息推送方法及装置

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2665239C2 (ru) * 2014-01-15 2018-08-28 Общество с ограниченной ответственностью "Аби Продакшн" Автоматическое извлечение именованных сущностей из текста
CN105677769B (zh) * 2015-12-29 2018-01-05 广州神马移动信息科技有限公司 一种基于潜在狄利克雷分配(lda)模型的关键词推荐方法和系统
US11151175B2 (en) * 2018-09-24 2021-10-19 International Business Machines Corporation On-demand relation extraction from text
CN110162770B (zh) * 2018-10-22 2023-07-21 腾讯科技(深圳)有限公司 一种词扩展方法、装置、设备及介质
US20200151246A1 (en) * 2018-11-13 2020-05-14 International Business Machines Corporation Labeling Training Set Data
CN111221962B (zh) * 2019-11-18 2023-05-26 重庆邮电大学 一种基于新词扩展与复杂句式扩展的文本情感分析方法
US11544472B2 (en) * 2020-01-17 2023-01-03 Samsung Electronics Co., Ltd. Structured adversarial, training for natural language machine learning tasks
CN111950254B (zh) * 2020-09-22 2023-07-25 北京百度网讯科技有限公司 搜索样本的词特征提取方法、装置、设备以及存储介质
CN112598039B (zh) * 2020-12-15 2024-01-16 禾量科技(上海)有限公司 获取nlp分类领域阳性样本方法及相关设备
CN112883193A (zh) * 2021-02-25 2021-06-01 中国平安人寿保险股份有限公司 一种文本分类模型的训练方法、装置、设备以及可读介质
CN113420145B (zh) * 2021-05-11 2023-05-23 杭州未名信科科技有限公司 一种基于半监督学习的招标文本分类方法与系统
CN113486670B (zh) * 2021-07-23 2023-08-29 平安科技(深圳)有限公司 基于目标语义的文本分类方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684478A (zh) * 2018-12-18 2019-04-26 腾讯科技(深圳)有限公司 分类模型训练方法、分类方法及装置、设备和介质
US20210165960A1 (en) * 2019-12-02 2021-06-03 Asapp, Inc. Modifying text according to a specified attribute
CN112507735A (zh) * 2020-12-18 2021-03-16 北京百度网讯科技有限公司 机器翻译模型的训练方法、装置和电子设备
CN113705697A (zh) * 2021-08-31 2021-11-26 平安科技(深圳)有限公司 基于情感分类模型的信息推送方法、装置、设备及介质
CN114238573A (zh) * 2021-12-15 2022-03-25 平安科技(深圳)有限公司 基于文本对抗样例的信息推送方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116882412A (zh) * 2023-06-29 2023-10-13 易方达基金管理有限公司 一种基于nlp分类的语义推理方法及系统
CN117093782A (zh) * 2023-10-20 2023-11-21 国网智能科技股份有限公司 一种电力人工智能模型系统及方法
CN117093782B (zh) * 2023-10-20 2024-03-12 国网智能科技股份有限公司 一种电力人工智能模型系统及方法
CN117574981A (zh) * 2024-01-16 2024-02-20 城云科技(中国)有限公司 一种信息分析模型的训练方法及信息分析方法
CN117574981B (zh) * 2024-01-16 2024-04-26 城云科技(中国)有限公司 一种信息分析模型的训练方法及信息分析方法

Also Published As

Publication number Publication date
CN114238573A (zh) 2022-03-25
CN114238573B (zh) 2023-09-22

Similar Documents

Publication Publication Date Title
US11347963B2 (en) Systems and methods for identifying semantically and visually related content
US11036791B2 (en) Computerized system and method for determining non-redundant tags from a user's network activity
CN106649818B (zh) 应用搜索意图的识别方法、装置、应用搜索方法和服务器
US8073877B2 (en) Scalable semi-structured named entity detection
WO2023108980A1 (zh) 基于文本对抗样例的信息推送方法及装置
US20170091838A1 (en) Product recommendation using sentiment and semantic analysis
US10535106B2 (en) Selecting user posts related to trending topics on online social networks
CN107918644B (zh) 声誉管理框架内的新闻议题分析方法和实施系统
CN107844533A (zh) 一种智能问答系统及分析方法
CN113297457B (zh) 一种高精准性的信息资源智能推送系统及推送方法
CN111723256A (zh) 一种基于信息资源库的政务用户画像构建方法及其系统
CN110110218B (zh) 一种身份关联方法及终端
WO2021210992A9 (en) Systems and methods for determining entity attribute representations
Rafail et al. Natural language processing
CN109271624A (zh) 一种目标词确定方法、装置及存储介质
CN116010552A (zh) 一种基于关键词词库的工程造价数据解析系统及其方法
CN112685452B (zh) 企业案例检索方法、装置、设备和存储介质
CN114328800A (zh) 文本处理方法、装置、电子设备和计算机可读存储介质
US10504145B2 (en) Automated classification of network-accessible content based on events
CN113535949A (zh) 基于图片和句子的多模态联合事件检测方法
tong et al. Mining and analyzing user feedback from app reviews: An econometric approach
US20240037375A1 (en) Systems and Methods for Knowledge Distillation Using Artificial Intelligence
Ziv et al. CompanyName2Vec: Company Entity Matching Based on Job Ads
TWI693524B (zh) 專屬個性化圖片搜尋優化方法
CN113343012A (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: 22905748

Country of ref document: EP

Kind code of ref document: A1