An entity recognition method, device, equipment and computer-readable storage medium

HK40084598BActive Publication Date: 2026-07-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
HK · HK
Patent Type
Patents
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2023-05-31
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing technologies for entity recognition are ineffective, resulting in low accuracy in information recommendation.

Method used

By acquiring the text to be processed from the target account, extracting character and image features, identifying candidate entity strings, and determining the entity sentiment category based on sentiment analysis, fine-grained information recommendation is performed.

Benefits of technology

It improves the accuracy of information recommendation, accurately determines the target account's attitude towards each entity string, and achieves finer-grained information recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The application provides an entity recognition method, device and equipment and a computer readable storage medium; is applied to video processing and text processing and other application scenarios; the entity recognition method comprises: obtaining a to-be-processed text corresponding to a target account; performing feature extraction on the to-be-processed text to obtain a character feature corresponding to each character; obtaining each candidate entity string in the to-be-processed text; based on the character feature, identifying each candidate entity string to obtain an entity sentiment category corresponding to each entity string, wherein the entity sentiment category is a category to which a sentiment of the target account for each entity string belongs, and the entity string is the candidate entity string belonging to an entity. Through the application, the entity recognition effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to information recommendation technology in the field of computer applications, and more particularly to an entity recognition method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] Entity recognition is the process of identifying entities within textual information. Generally, when performing entity recognition on textual information, the results are usually limited to the entities contained within the text, resulting in limited content and poor performance. Summary of the Invention

[0003] This application provides an entity recognition method, apparatus, device, and computer-readable storage medium, which can improve the effect of entity recognition.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides an entity recognition method, including:

[0006] Retrieve the text to be processed corresponding to the target account;

[0007] Feature extraction is performed on the text to be processed to obtain the character features corresponding to each character;

[0008] Obtain the string of each candidate entity in the text to be processed;

[0009] Based on the character features, each candidate entity string is identified to obtain the entity sentiment category corresponding to each entity string. The entity sentiment category is the category to which the target account's sentiment towards each entity string belongs, and the entity string is the candidate entity string belonging to the entity.

[0010] This application provides an entity recognition device, including:

[0011] The text acquisition module is used to acquire the text to be processed corresponding to the target account;

[0012] The feature extraction module is used to extract features from the text to be processed, and obtain the character features corresponding to each character;

[0013] The string extraction module is used to obtain the string of each candidate entity in the text to be processed;

[0014] The entity recognition module is used to recognize each candidate entity string based on the character features to obtain the entity sentiment category corresponding to each entity string, wherein the entity sentiment category is the category to which the target account's sentiment towards each entity string belongs, and the entity string is the candidate entity string belonging to the entity.

[0015] In this embodiment of the application, the feature extraction module is further configured to extract text features corresponding to each character in the text to be processed; and determine the text features as the character features.

[0016] In this embodiment of the application, the feature extraction module is further configured to extract image features corresponding to the image in the text to be processed; and enhance the text features based on the image features to obtain the character features.

[0017] In this embodiment of the application, the feature extraction module is further configured to perform dimensional transformation on the image features based on the feature dimensions of the text features to obtain target image features; and to fuse the target image features and the text features to obtain the character features.

[0018] In this embodiment of the application, the string extraction module is further configured to obtain the maximum span, wherein the maximum span is the maximum character length corresponding to the candidate entity string; in the text to be processed, starting from the first character to the last character, the strings are combined according to a span up to the maximum span to obtain each candidate entity string.

[0019] In this embodiment of the application, the entity recognition module is further configured to determine the string features corresponding to the candidate entity string based on the character features of each character in the candidate entity string; perform entity recognition on each candidate entity string based on the string features to obtain each entity string; and perform sentiment analysis on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string.

[0020] In this embodiment of the application, the entity recognition module is further configured to extract content features corresponding to the text to be processed.

[0021] In this embodiment of the application, the entity recognition module is further configured to concatenate at least one of the content feature and the character length corresponding to the candidate entity string with the string feature to obtain the string entity feature; and perform entity recognition on each candidate entity string based on the string entity feature to obtain each entity string.

[0022] In this embodiment of the application, the entity recognition module is further configured to perform sentiment analysis on each entity string based on the concatenation result of the content features and the string features of each entity string, so as to obtain the entity sentiment category corresponding to each entity string.

[0023] In this embodiment of the application, the information recommendation module is further configured to perform content recognition on the text to be processed based on the content features to obtain the text content category; obtain first recommendation information matching the text content category from the first recommendation information database; and recommend the first recommendation information to the target account.

[0024] In this embodiment of the application, the entity recognition device further includes an information recommendation module, configured to determine at least one entity string belonging to the positive sentiment category corresponding to the target account based on the entity sentiment category corresponding to each entity string; obtain second recommendation information matching at least one entity string from the second recommendation information database; and recommend the second recommendation information to the target account.

[0025] In this embodiment of the application, the information recommendation module is further configured to, for each of the at least one entity string, count the target account set; and recommend the second recommendation information to each of the target accounts in the target account set.

[0026] In this embodiment, the entity recognition of each candidate entity string based on the string features to obtain each entity string is implemented through an entity recognition model. Therefore, the entity recognition device further includes a model training module, used to train the entity recognition model through the following steps: obtaining entity training samples, wherein the entity training samples include candidate entity string samples and entity labels; performing entity recognition on the candidate entity string samples using the entity recognition model to be trained to obtain entity prediction results; and performing backpropagation in the entity recognition model to be trained based on the difference between the entity prediction results and the entity labels to obtain the entity recognition model.

[0027] In this embodiment, the sentiment analysis of each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string, and the content recognition of the text to be processed based on the content features to obtain the text content category, are implemented based on a comprehensive classification model. Therefore, the model training module is further used to train the comprehensive classification model through the following steps: obtaining category training samples, wherein the category training samples include text samples, entity string samples corresponding to the text samples, text content category labels, and entity sentiment category labels; classifying the text samples and the entity string samples corresponding to the text samples using the comprehensive classification model to be trained, to obtain the text content prediction category corresponding to the text samples and the entity sentiment prediction category corresponding to the entity string samples of the text samples; and performing backpropagation in the comprehensive classification model to be trained based on the differences between the text content category labels and the text content prediction categories, and the differences between the entity sentiment category labels and the entity sentiment prediction categories, to obtain the comprehensive classification model.

[0028] This application provides an entity recognition device, including:

[0029] Memory, used to store executable instructions;

[0030] The processor, when executing executable instructions stored in the memory, implements the entity recognition method provided in the embodiments of this application.

[0031] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the entity recognition method provided in this application.

[0032] This application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the entity recognition method provided in this application.

[0033] The embodiments of this application have at least the following beneficial effects: by performing entity recognition on the text to be processed and determining the entity sentiment category corresponding to each identified entity string, the attitude tendency of the target account towards each entity string can be accurately determined; and when recommending information based on the attitude tendency of the target account towards each entity string, it is an information recommendation process based on entity granularity, which is finer and thus can improve the accuracy of information recommendation. Attached Figure Description

[0034] Figure 1a This is an optional architecture diagram of the entity recognition system provided in the embodiments of this application;

[0035] Figure 1b This is another optional architecture diagram of the entity recognition system provided in the embodiments of this application;

[0036] Figure 2 This is provided by the embodiments of this application. Figure 1a A schematic diagram illustrating an exemplary component structure of a server;

[0037] Figure 3a This is a flowchart illustrating the entity recognition method provided in an embodiment of this application;

[0038] Figure 3b This is a schematic diagram of the process for obtaining character features provided in an embodiment of this application;

[0039] Figure 4 This is a schematic diagram of the process for obtaining candidate entity strings provided in an embodiment of this application;

[0040] Figure 5a This is another optional flowchart of the entity recognition method provided in the embodiments of this application;

[0041] Figure 5b This is a schematic diagram of an information recommendation process provided in an embodiment of this application;

[0042] Figure 5c This is a schematic diagram of another information recommendation process provided in an embodiment of this application;

[0043] Figure 6 This is a schematic diagram of an exemplary entity recognition process provided in an embodiment of this application;

[0044] Figure 7 This is a schematic diagram illustrating an embodiment of obtaining character features provided in this application;

[0045] Figure 8 This is an exemplary schematic diagram of obtaining an entity string provided in an embodiment of this application;

[0046] Figure 9 This is an exemplary schematic diagram illustrating how to obtain entity sentiment categories and text content categories according to an embodiment of this application;

[0047] Figure 10 This is an exemplary information recommendation diagram provided in an embodiment of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0049] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0050] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0051] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0052] In the implementation of this application, the collection and processing of relevant data should be strictly in accordance with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0053] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0054] 1) Artificial Intelligence (AI) is the theory, methods, 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 that knowledge to obtain optimal results. Therefore, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. In other words, AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. In this application's embodiment, AI technology is used for information recommendation.

[0055] 2) Natural Language Processing (NLP) refers to the technology of using natural language, which is used by humans to communicate, to interact with machines. In other words, NLP is a discipline that takes language as its object and uses computer technology to analyze, understand and process natural language. It studies various theories and methods for effective communication between humans and computers using natural language.

[0056] 3) Named Entity Recognition (NER), also known as entity recognition, entity segmentation, and entity extraction, is used to locate and classify named entities in text into predefined categories, such as people, organizations, locations, time expressions, quantities, currency values, percentages, etc. Typically, the task of named entity recognition is to identify three major categories (entity, time, and number) and seven subcategories (person names, organization names, place names, time, date, currency, and percentage) of named entities in the text to be processed.

[0057] 4) Text sentiment analysis, also known as opinion mining or sentiment analysis, is the process of analyzing, processing, summarizing, and reasoning about subjective texts with emotional content. In this embodiment, text sentiment analysis is used to obtain the emotional category of entities.

[0058] On information display platforms, there are often users who interact with the displayed information, such as videos and articles, by logging in, as well as users who post information by logging in.

[0059] Generally, on information display platforms, in order to recommend information to users corresponding to logged-in accounts, the information generated or published through interactions is often analyzed. The recommendations are then made based on the analysis results. However, in this process, the analysis results refer to the overall sentiment category of the information. For example, regarding the interactive message, "I think A is just so-so, but B sings much better than C!", the analysis result is a positive sentiment category, leading to further recommendations of singing videos for the logged-in account. However, these recommended videos might be about A or B, but neither A nor B are the logged-in account's preferred content. Therefore, when recommending information based on the sentiment category of the entire text, the granularity of the recommendation criteria is too coarse, resulting in low accuracy.

[0060] Based on this, embodiments of this application provide an entity recognition method, apparatus, device, and computer-readable storage medium, which can improve the accuracy of information recommendation. The following describes exemplary applications of the entity recognition device provided in this application. The entity recognition device provided in this application can be implemented as various types of terminals such as smartphones, smartwatches, laptops, tablets, desktop computers, smart TVs, set-top boxes, smart in-vehicle devices, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices, and smart speakers, or it can be implemented as a server. The following will describe exemplary applications when the entity recognition device is implemented as a server.

[0061] See Figure 1a , Figure 1a This is an optional architecture diagram of the entity recognition system provided in this application embodiment; as shown in Figure 1, to support an entity recognition application, in the entity recognition system 100, the server 400 (entity recognition device) is connected to the terminal 200 (terminal 200-1 and terminal 200-2 are shown exemplary) via the network 300. The network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. Here, the entity recognition system 100 also includes a database 500 for providing data support to the server 400 (e.g., a first database of information to be recommended and a second database of information to be recommended). Furthermore, Figure 1a The example shown illustrates a scenario where the database 500 is independent of the server 400. Alternatively, the database 500 can also be integrated into the server 400, but this embodiment does not limit this.

[0062] Server 400 is used to receive text to be processed corresponding to the target account sent by terminal 200 via network 300; extract features from the text to be processed to obtain character features corresponding to each character; obtain each candidate entity string in the text to be processed; and identify each candidate entity string based on the character features to obtain the entity sentiment category corresponding to each entity string, wherein the entity sentiment category is the category to which the target account's sentiment towards each entity string belongs, and the entity string is the candidate entity string belonging to the entity.

[0063] Terminal 200 is used to send the text to be processed corresponding to the target account (such as the information commented by the target account or the information posted by the target account) to server 400 via network 300.

[0064] based on Figure 1a See Figure 1b , Figure 1b This is another optional architecture diagram of the entity recognition system provided in the embodiments of this application; as shown Figure 1bAs shown, server 400 is used to receive text to be processed corresponding to the target account sent by terminal 200 via network 300; extract features from the text to be processed to obtain character features corresponding to each character; obtain each candidate entity string in the text to be processed; identify each candidate entity string based on the character features to obtain the entity sentiment category corresponding to each entity string, wherein the entity sentiment category is the category to which the target account's sentiment towards each entity string belongs; and recommend information to the target account based on the entity sentiment category corresponding to each entity string, that is, send recommendation information (first recommendation information and second recommendation information) to terminal 200 via network 300.

[0065] Terminal 200 is used to send text to be processed (commented information or published information) to server 400 via network 300 when the target account comments on the displayed information (e.g., the target account comments on the displayed information via terminal 200-1) or when the target account publishes information (e.g., the target account publishes information via terminal 200-2); it is also used to display recommendation information received from server 400 via network 300.

[0066] In some embodiments of this application, server 400 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal 200 and server 400 may be directly or indirectly connected via wired or wireless means, and this application embodiment does not limit this.

[0067] See Figure 2 , Figure 2 This is provided by the embodiments of this application. Figure 1a A schematic diagram illustrating an exemplary component structure of a server. Figure 2 The server 400 shown includes at least one processor 410, a memory 450, and at least one network interface 420; in some embodiments of this application, the server 400 also includes a user interface 430. The various components of the server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 440.

[0068] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0069] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0070] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0071] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0072] In some embodiments of this application, memory 450 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below.

[0073] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0074] The network communication module 452 is used to reach other computer devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.

[0075] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 associated with user interface 430 (e.g., a display screen, a speaker, etc.).

[0076] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0077] In some embodiments of this application, the entity recognition device provided in this application can be implemented in software. Figure 2 An entity recognition device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a text acquisition module 4551, a feature extraction module 4552, a string extraction module 4553, an entity recognition module 4554, an information recommendation module 4555, and a model training module 4556. These modules are logically connected and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.

[0078] In some other embodiments of this application, the entity recognition device provided in this application can be implemented in hardware. As an example, the entity recognition device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the entity recognition method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0079] In this embodiment, the entity recognition method provided can be executed by a client running on a terminal or server; that is, the terminal or server can implement the entity recognition method provided in this embodiment by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as an entity recognition APP; it can also be a mini-program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin.

[0080] The entity recognition method provided in this application will be described below with reference to exemplary applications and implementations of the entity recognition device provided in the embodiments of this application.

[0081] See Figure 3a , Figure 3a This is a flowchart illustrating the entity recognition method provided in the embodiments of this application, which will be combined with... Figure 3a The steps shown are explained.

[0082] S301. Obtain the text to be processed corresponding to the target account.

[0083] In this embodiment, the entity recognition device is used to perform entity recognition on the text to be processed corresponding to the target account. The target account refers to the account logged in by a user who has interacted with the displayed information (e.g., commented, participated in a live chat), and the displayed information includes various types of displayable information such as videos, articles, and audio. Here, the entity recognition device obtains the information generated when the target account interacts, thus obtaining the text to be processed. Alternatively, the target account can also refer to the publishing object corresponding to the displayed information; in this case, the text to be processed is the displayed information.

[0084] It should be noted that the text to be processed is information displayed by the target account in response to the displayed information or information published in response to the displayed information. It can be text, or a combination of at least one of images and audio / video with text, or text converted from at least one of images and audio / video. This application embodiment does not limit this.

[0085] S302. Extract features from the text to be processed to obtain the character features corresponding to each character.

[0086] In this embodiment, the entity recognition device analyzes the text to be processed to recommend information to the target account, or to create a user profile for the target account, or to analyze the entities in the text to be processed, or to respond to the search request corresponding to the target account or entity to perform information search (i.e., applied in the information search scenario), etc. This embodiment does not limit this; when the entity recognition device analyzes the text to be processed, it first obtains the features corresponding to each character, thus obtaining character features, and then analyzes the text to be processed based on the character features corresponding to each character.

[0087] S303. Obtain the string of each candidate entity in the text to be processed.

[0088] In this embodiment of the application, the entity recognition device combines the characters in the text to be processed and determines the string consisting of at least one consecutive character in the text to be processed as a candidate entity string; wherein, the candidate entity string may or may not be an entity.

[0089] S304. Based on character features, identify each candidate entity string to obtain the entity sentiment category corresponding to each entity string.

[0090] In this embodiment, the entity recognition device determines at least one character feature corresponding to at least one consecutive character in each candidate entity string based on the character features corresponding to each character in the text to be processed. It then performs entity recognition on each candidate entity string based on the determined at least one character feature to obtain candidate entity strings that are entities, and identifies these candidate entity strings as entity strings. Next, the entity recognition device identifies the sentiment category of each entity string for the target account, thus identifying the corresponding entity sentiment category for each entity string.

[0091] It should be noted that the entity string is the entity; the entity sentiment category is the category to which the target account's sentiment towards each entity string belongs, such as positive sentiment, negative sentiment, neutral sentiment, etc.; the entity string is the candidate entity string that belongs to the entity.

[0092] Understandably, when entity recognition devices perform entity recognition on the text to be processed corresponding to the target account, they not only identify the entities in the text to be processed, but also identify the target account's attitude towards the entities; therefore, the content of the obtained entity recognition results is diverse, which can improve the effect of entity recognition.

[0093] In this embodiment of the application, the entity recognition device is also used for information recommendation; thus, after obtaining the entity sentiment category corresponding to each entity string, the entity recognition device also recommends information to the target account based on the entity sentiment category corresponding to each entity string.

[0094] In this embodiment, the entity recognition device determines the target account's information of interest (e.g., entity strings with positive emotions) based on the entity sentiment category corresponding to each entity string, and then recommends information to the target account.

[0095] It should be noted that entity recognition devices can also determine entity strings based on a rule dictionary and obtain the corresponding entity sentiment category; whereby the rule dictionary is a collection of entity strings. Entity recognition devices can also label each character in the text to be processed with entity tags, obtaining a character sequence corresponding to the text, where the entity tag is the category of the entity string to which each character belongs; from the character sequence, consecutive characters with the same entity tag are obtained to obtain each entity string (e.g., through Conditional Random Fields (CRF) or Long Short-Term Memory (LSTM) networks), and the corresponding entity sentiment category is obtained.

[0096] Understandably, when entity recognition devices analyze the text to be processed corresponding to a target account, they can not only identify the entities in the text, but also obtain the target account's sentiment category for the identified entities. This enables them to accurately and precisely determine the target account's sentiment classification for each entity, and then accurately recommend information to the target account based on the sentiment classification for each entity.

[0097] See Figure 3b , Figure 3b This is a schematic diagram of the process for obtaining character features provided in an embodiment of this application; as shown below. Figure 3b As shown in the embodiments of this application, Figure 3a S302 in the process can be implemented through S3021 and S3022; that is, the entity recognition device extracts features from the text to be processed to obtain the character features corresponding to each character, including S3021 and S3022. The steps are explained below.

[0098] S3021. Extract the text features corresponding to each character in the text to be processed.

[0099] It should be noted that the entity recognition device extracts features from each character in the text to be processed, thus extracting the text features corresponding to each character.

[0100] S3022. Determine the text features as character features.

[0101] In this embodiment of the application, the entity recognition device can directly determine the text features corresponding to each character in the text to be processed as the character features corresponding to each character in the text to be processed.

[0102] See also Figure 3b In this embodiment of the application, when the text to be processed also includes an image, S3021 is followed by S3023 and S3024; that is, after the entity recognition device extracts the text features corresponding to each character in the text to be processed, the entity recognition method further includes S3023 and S3024. Each step is described below.

[0103] S3023. Extract the image features corresponding to the images in the text to be processed.

[0104] It should be noted that if the text to be processed also includes images, the entity recognition device extracts the features of the images in the text to obtain image features, which are then combined with the text features to obtain character features.

[0105] S3024. Enhance text features based on image features to obtain character features.

[0106] In this embodiment of the application, the information processing device combines image features with text features to enhance the text features using image features, and determines the combined result as the character feature corresponding to each character in the text to be processed.

[0107] See also Figure 3b In this embodiment of the application, S3024 can be implemented by S30241 and S30242; that is, the information processing device enhances the text features based on the image features to obtain character features, including S30241 and S30242. The steps are described below.

[0108] S30241. Based on the feature dimension of text features, perform dimensional transformation on image features to obtain target image features.

[0109] It should be noted that in order to combine image features with text features, entity recognition devices first perform dimensional transformation on image features based on the feature dimensions of text features, so that the dimensions of the transformed image features are consistent with the dimensions of the text features; thus, text features and image features can be combined; here, the transformed image features are the target image features.

[0110] In this embodiment, the entity recognition device can use a neural network model to extract features from the image in the text to be processed, obtain image features, and then obtain target image features through dimensionality transformation; alternatively, based on the feature dimension of the text features, it can obtain output features with the same feature dimension as the text features from the output layer of the neural network model to directly obtain target image features; this embodiment does not limit this.

[0111] S30242. Fuse target image features and text features to obtain character features.

[0112] It should be noted that the entity recognition device fuses the target image features with the text features corresponding to each character in the text to be processed. The fused result is the character feature corresponding to each character in the text to be processed.

[0113] Understandably, entity recognition devices use image features corresponding to images in the text to be processed as auxiliary features to enhance the text features of each character in the text to be processed, thereby obtaining character features with higher expressive power; thus, when performing recognition processing based on character features, the accuracy of the recognition results can be improved.

[0114] See Figure 4 , Figure 4 This is a schematic diagram of the process for obtaining candidate entity strings provided in an embodiment of this application; as shown Figure 4 As shown in the embodiment of this application, S303 can be implemented through S3031 and S3032; that is, the entity recognition device obtains each candidate entity string in the text to be processed, including S3031 and S3032. The steps are described below.

[0115] S3031, Obtain the maximum span.

[0116] It should be noted that the maximum span is the maximum character length corresponding to the candidate entity string; in addition, the entity recognition device can determine the maximum span based on the actual implementation situation, or based on the empirical value, or based on the character length of the statement in the text to be processed, or based on the character length of the entity string, etc., and this application embodiment does not limit it in this way.

[0117] S3032. In the text to be processed, starting from the first character to the last character, combine the strings according to a span up to the maximum span to obtain the string of each candidate entity.

[0118] It should be noted that the entity recognition device starts from the first character of the text to be processed and proceeds to the last character of the text to be processed, sequentially obtaining the string corresponding to each character in the order of one span, two spans, ..., the maximum span, and then uses each obtained string as a candidate entity string, thereby obtaining each candidate entity string corresponding to the text to be processed.

[0119] For example, when obtaining candidate entity strings using S3031 and S3032 for the text to be processed, if the maximum span is 6, the obtained candidate entity strings include multiple phrases such as "you", "hello", "hello", "hello, Li", "hello, Li Zhang", "hello, Li Zhangsan", ..., "Li", "Li Zhang", and "Li Zhangsan". In this way, it is possible to identify two types of entities: the movie / TV show title "hello, Li Zhangsan" and the personal name "Li Zhangsan".

[0120] Understandably, by extracting each candidate entity string from the text to be processed based on the span, it is possible to identify nested entities, thereby improving the recall rate.

[0121] See Figure 5a , Figure 5a This is another optional flowchart illustrating the entity recognition method provided in the embodiments of this application; as shown below. Figure 5a As shown in the embodiment of this application, S304 in Figure 3 can be implemented by S3041 to S3043. That is, the entity recognition device identifies each candidate entity string based on character features to obtain the entity sentiment category corresponding to each entity string, including S3041 to S3043. The steps are described below.

[0122] S3041. Based on the character features of each character in the candidate entity string, determine the string features corresponding to the candidate entity string.

[0123] It should be noted that, since each candidate entity string includes at least one character, the entity recognition device determines the character features of each character in each candidate entity string based on the character features corresponding to each character in the text to be processed. Then, the entity recognition device can combine the character features of each character in the candidate entity string to obtain the string features corresponding to the candidate entity string. Here, the entity recognition device can perform a weighted summation of the character features of each character in the candidate entity string to obtain the string features; alternatively, it can calculate the average of at least one character feature corresponding to at least one character in the candidate entity string to obtain the string features; this embodiment of the application does not limit this approach.

[0124] S3042. Entity recognition is performed on each candidate entity string based on string features to obtain each entity string.

[0125] It should be noted that the entity recognition device can directly perform entity recognition on string features to recognize each candidate entity string; it can also combine string features with other features and then perform entity recognition on the combined features to recognize each candidate entity string. Other features may be, for example, the character length feature of the candidate entity string, or the content feature of the text to be processed; this application embodiment does not limit this.

[0126] S3043. Perform sentiment analysis on each entity string based on string features to obtain the entity sentiment category corresponding to each entity string.

[0127] It should be noted that entity recognition devices can directly perform sentiment analysis on string features to perform sentiment analysis on each entity string; they can also combine string features with the content features of the text to be processed, and then perform sentiment analysis on the combined features; this application embodiment does not limit this.

[0128] See also Figure 5a In this embodiment of the application, S3044 is included before S3042; that is, before the entity recognition device performs entity recognition on each candidate entity string based on string features and obtains each entity string, the entity recognition method further includes S3044, which will be described below.

[0129] S3044. Extract the content features corresponding to the text to be processed.

[0130] It should be noted that the content features extracted by entity recognition devices refer to the overall semantic features of the text to be processed.

[0131] See also Figure 5a Accordingly, in the embodiments of this application, S3042 can be implemented by S30421 and S30422; that is, the entity recognition device performs entity recognition on each candidate entity string based on string features to obtain the entity category corresponding to each entity string, including S30421 and S30422. The steps are described below.

[0132] S30421. At least one of the content features and the character lengths corresponding to the candidate entity strings is concatenated with the string features to obtain the string entity features.

[0133] It should be noted that entity recognition devices can identify string features as string entity features, concatenate content features and string features into string entity features, concatenate the character length and string features corresponding to candidate entity strings into string entity features, and concatenate content features, character length, and string features into string entity features.

[0134] S30422. Based on the string entity features, perform entity recognition on each candidate entity string to obtain each entity string.

[0135] In this embodiment of the application, the entity recognition device performs entity recognition on the entity features of the string to achieve entity recognition for each candidate entity string.

[0136] See also Figure 5a Accordingly, in the embodiments of this application, S3043 can be implemented through S30431; that is, the entity recognition device performs sentiment analysis on each entity string based on string features to obtain the entity sentiment category corresponding to each entity string, including S30431, which will be described below.

[0137] S30431. Based on the concatenation result of content features and string features of each entity string, perform sentiment analysis on each entity string to obtain the entity sentiment category corresponding to each entity string.

[0138] It should be noted that entity recognition devices can determine the entity sentiment category corresponding to each entity string by performing sentiment analysis on string features, or by performing sentiment analysis on the concatenation result of content features and string features. This application embodiment does not limit this.

[0139] See Figure 5b , Figure 5b This is a schematic diagram of an information recommendation process provided in an embodiment of this application; for example... Figure 5b As shown in the embodiments of this application, Figure 5a The method includes steps S3045 to S3047 after step S3044; that is, after the entity recognition device extracts the content features corresponding to the text to be processed, the entity recognition method also includes steps S3045 to S3047. Each step is explained below.

[0140] S3045. Based on content features, perform content recognition on the text to be processed to obtain the text content category.

[0141] It should be noted that entity recognition devices determine the category to which the text to be processed belongs by performing content recognition on content features; the category to which the text to be processed belongs is the text content category, such as attitude posts (including entity strings and the entity sentiment categories corresponding to the entity strings), information posts (the main content is the published information, that is, in the entity sentiment categories corresponding to the entity strings, the number of entity strings in the neutral sentiment category is greater than the number threshold), etc.

[0142] S3046. Obtain the first recommendation information that matches the text content category from the first database of information to be recommended.

[0143] S3047. Recommend the first recommendation information to the target account.

[0144] It should be noted that the first recommended information database refers to the correspondence between information and text content categories. Based on the correspondence between information and text content categories, the entity recognition device obtains the first recommended information that matches the text content category and recommends the first recommended information to the target account, thereby realizing information recommendation.

[0145] See Figure 5c , Figure 5c This is another information recommendation process diagram provided in the embodiments of this application; such as Figure 5c As shown in the embodiment of this application, the entity recognition device recommends information to the target account based on the entity sentiment category corresponding to each entity string, including S3051 to S3053. Each step is described below.

[0146] S3051. Based on the entity sentiment category corresponding to each entity string, determine at least one entity string belonging to the positive sentiment category corresponding to the target account.

[0147] It should be noted that the entity recognition device, based on the entity sentiment category corresponding to each entity string, extracts at least one entity string belonging to the positive sentiment category from the various entity strings corresponding to the text to be processed. It is easy to see that at least one entity string belonging to the positive sentiment category is the entity that the target account is interested in.

[0148] S3052. Obtain second recommendation information that matches at least one entity string from the second recommendation information database.

[0149] S3053, Recommend the second recommendation information to the target account.

[0150] It should be noted that the second recommendation information database refers to the correspondence between information and entity strings. Based on the correspondence between information and entity strings, the entity recognition device obtains the second recommendation information that matches at least one entity string, and recommends the second recommendation information to the target account to achieve information recommendation.

[0151] See also Figure 5c In this embodiment of the application, S3051 is followed by S3054 and S3055; that is, the entity recognition device determines at least one entity string belonging to the positive sentiment category corresponding to the target account based on the entity sentiment category corresponding to each entity string, including S3054 and S3055. Each step is described below.

[0152] S3054. For each entity string in at least one entity string, count the target account set.

[0153] It should be noted that the entity recognition device analyzes the text to be processed for each target account to obtain at least one entity string belonging to the positive sentiment category for each target account; and based on the at least one entity string for each target account, it determines the set of target accounts corresponding to each entity string. It is easy to see that the set of target accounts corresponding to each entity string in the at least one entity string is of interest to that entity string.

[0154] S3055. Recommend second recommendation information to each target account in the target account set.

[0155] Understandably, the entity recognition device obtains a set of target accounts corresponding to each entity string in at least one entity string, and recommends second recommendation information to each target account in the target account set, thereby achieving the recommendation of multiple target accounts and improving the efficiency of information recommendation.

[0156] In this embodiment, S3042 can be implemented through a network model; that is, the entity recognition device performs entity recognition on each candidate entity string based on string features to obtain each entity string, which is achieved through an entity recognition model; wherein, the entity recognition model is trained through the following steps: the entity recognition device obtains entity training samples, which include candidate entity string samples and entity labels; the entity recognition model to be trained performs entity recognition on the candidate entity string samples to obtain entity prediction results; based on the difference between the entity prediction results and the entity labels, backpropagation is performed in the entity recognition model to be trained to obtain the entity recognition model.

[0157] It should be noted that candidate entity string samples are string samples to be identified; entity labels refer to whether the candidate entity string samples are entities; and entity prediction results refer to the output results of the entity recognition model to be trained.

[0158] Understandably, entity recognition devices train entity recognition models as a separate task to improve the accuracy and recall of entity strings.

[0159] In this embodiment, S3043 and S3045 can be implemented through a network model; that is, the entity recognition device performs sentiment analysis on each entity string based on string features to obtain the entity sentiment category corresponding to each entity string, and performs content recognition on the text to be processed based on content features to obtain the text content category, which is implemented based on a comprehensive classification model; wherein, the comprehensive classification model is trained through the following steps: the entity recognition device obtains category training samples, which include text samples, entity string samples corresponding to the text samples, text content category labels, and entity sentiment category labels; the comprehensive classification model to be trained is used to classify the text samples and the entity string samples corresponding to the text samples respectively to obtain the text content prediction category corresponding to the text samples and the entity sentiment prediction category corresponding to the entity string samples of the text samples; based on the differences between the text content category labels and the text content prediction categories, and the differences between the entity sentiment category labels and the entity sentiment prediction categories, backpropagation is performed in the comprehensive classification model to be trained to obtain the comprehensive classification model.

[0160] It should be noted that the text sample refers to the text used for content recognition; the corresponding entity string sample is the string belonging to the entity within the text sample; the text content category label is the category to which the text sample belongs; and the entity sentiment category label is the sentiment category to which the corresponding entity string sample belongs. Furthermore, the text content prediction category refers to the result output by the comprehensive classification model to be trained, corresponding to the text sample; and the entity sentiment prediction category refers to the result output by the comprehensive classification model to be trained, corresponding to the entity string sample of the text sample.

[0161] Understandably, training the model by treating entity emotion category recognition and text content category recognition as a single task can improve recognition efficiency while ensuring the model's learning effectiveness.

[0162] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0163] See Figure 6 , Figure 6 This is a schematic diagram of an exemplary entity recognition process provided in an embodiment of this application; as shown... Figure 6 As shown, in the entity recognition process, this exemplary entity recognition process can be executed by an entity recognition device. Here, we will take the execution of the entity recognition process by a server as an example for illustration.

[0164] S601, Begin.

[0165] S602. Obtain the image and text post (text to be processed).

[0166] S603. Obtain the input features (character features) for each word (character, "token").

[0167] It should be noted that the server (e.g., Figure 1a The server 400 encodes the text information in the image-text post to obtain the embedded representation (text feature, "embedding") corresponding to each character in the text information, denoted as emb_c; where, the encoding can be implemented through a pre-trained "Albert" model. Here, when the text information of the image-text post is: "Zhang San, go for it, give me a thumbs up", the character sequence length of the text information is 9. After encoding, a 9*ndim matrix is ​​obtained, where ndim is the dimension of the embedded representation, for example, 128.

[0168] It should also be noted that if the image post also includes images, the server will extract features from the images (for example, by extracting image features through the residual network "resnet" model) to obtain image features; at the same time, the server will convert the dimension of the image features to 128, and the converted image features will be represented by emb_img; and the converted image features will be added to the input features of each character respectively to obtain the input features of each character, represented by emb_char, as shown in equation (1):

[0169] (1)

[0170] If the image is not included in the image-text patch, then the embedded representation emb_c corresponding to each character is the input feature emb_char of each character, as shown in equation (2):

[0171] (2)

[0172] See Figure 7 , Figure 7 This is a schematic diagram illustrating the acquisition of character features provided in an embodiment of this application; as shown... Figure 7 As shown, model 7-11 (e.g., the "Albert" model) is used to encode each character in the text information 7-21 (start sequence and "Zhang Sanchongya, niweidianzan") of the image-text post 7-2, resulting in text features 7-31 for each character; simultaneously, model 7-12 (e.g., the "ResNet" model) is used to extract and transform features from the image 7-22 of the image-text post 7-2, resulting in target image features 7-32; each text feature 7-31 is added to the target image feature 7-32 to obtain the input feature 7-33 for each character.

[0173] S604. Extract entity words (entity strings).

[0174] It should be noted that entity words refer to entities such as names of people, places, movie and TV series titles, song titles, and organization names extracted from image and text posts; the server can use sequence labeling methods (such as LSTM+CRF) to extract entity words, and the server can also use span-based entity word extraction methods to extract entity words.

[0175] When the span-based entity word extraction method extracts entity words, based on Figure 7 See Figure 8 , Figure 8 This is an exemplary schematic diagram of obtaining an entity string provided in an embodiment of this application; as shown... Figure 8 As shown, by the maximum span from Figure 7 In the image and text post 7-2, the text information 7-21 (“Zhang San, go for it! Thumbs up for you”) is used to extract candidate entity words 8-1 (candidate entity strings). When the maximum span is 6, the obtained candidate entity words include: “Zhang”, “Zhang San”, “Zhang San, go for it”, “Zhang San, go for it”, “Thumbs up”, and “Thumbs up”. Then, based on... Figure 7 The input features 7-33 of each character obtained are averaged for each input feature 7-33 corresponding to each candidate entity word 8-1 to obtain the word group feature 8-2 (string feature) corresponding to the candidate entity word 8-1. Additionally, through... Figure 7 Model 7-11 can also obtain the overall feature 8-3 (content feature) corresponding to the text information 7-21 of the image-text post 7-2. Here, because the encoder of model 7-11 uses an attention mechanism, it can represent the overall feature 8-3 corresponding to the text information 7-21 through an additional "token". In addition, it can also obtain the phrase length 8-4 (character length) corresponding to the candidate entity word 8-1. Model 8-5 determines the entity category based on the concatenation result of phrase feature 8-2, overall feature 8-3, and phrase length 8-4 (string entity feature), and determines whether the candidate entity word 8-1 is an entity word based on the entity category.

[0176] S605. Identify the attitude tendency of entity words (entity sentiment category) and identify the content type of image / text post (text content category).

[0177] It should be noted that after the server obtains the entity words, it identifies the attitude towards the entity words and the content type of the image and text post.

[0178] based on Figure 7 and Figure 8 See Figure 9 , Figure 9 This is an exemplary schematic diagram illustrating the acquisition of entity sentiment categories and text content categories provided in an embodiment of this application; as shown... Figure 9As shown, for each entity word 9-1, model 9-4 determines the attitude tendency 9-3 based on the concatenation result of phrase feature 8-2 and overall feature 8-3. Additionally, model 9-2 determines the content type 9-5 based on overall feature 8-3. Models 9-2 and 9-4 correspond to the comprehensive classification model described above.

[0179] S606, End.

[0180] The following describes the application process after identifying attitude tendency 9-3 and content type 9-5. Based on Figures 7-9 See Figure 10 , Figure 10 This is an exemplary information recommendation diagram provided in an embodiment of this application; such as Figure 10 As shown, based on attitude tendency 9-3, entity word 10-1 (at least one entity string) of the positive sentiment category is obtained; then, information 10-31 (second recommended information) matching entity word 10-1 is obtained from information database 10-2 (second recommended information database). Additionally, information 10-32 (first recommended information) matching content type 9-5 is obtained from information database 10-4 (first recommended information database). Information database 10-2 contains the correspondence between entity words and information, while information database 10-4 contains the correspondence between content type and information. Finally, information 10-31 and information 10-32 are used as recommended information 10-3 and recommended to user 10-5 (target account); here, the image and text post 7-2 published by user 10-5, as well as attitude tendency 9-3 and content type 9-5, are obtained through analysis of image and text post 7-2.

[0181] The following description continues to illustrate the exemplary structure of the entity recognition device 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software module stored in the entity recognition device 455 in the memory 450 may include:

[0182] The text acquisition module 4551 is used to acquire the text to be processed corresponding to the target account;

[0183] Feature extraction module 4552 is used to extract features from the text to be processed to obtain character features corresponding to each character;

[0184] String extraction module 4553 is used to obtain each candidate entity string in the text to be processed;

[0185] The entity recognition module 4554 is used to recognize each candidate entity string based on the character features to obtain the entity sentiment category corresponding to each entity string, wherein the entity sentiment category is the category to which the target account's sentiment towards each entity string belongs, and the entity string is the candidate entity string belonging to the entity.

[0186] In this embodiment of the application, the feature extraction module 4552 is further configured to extract text features corresponding to each character in the text to be processed; and determine the text features as the character features.

[0187] In this embodiment of the application, the feature extraction module 4552 is further configured to extract image features corresponding to the image in the text to be processed; and enhance the text features based on the image features to obtain the character features.

[0188] In this embodiment of the application, the feature extraction module 4552 is further configured to perform dimensional transformation on the image features based on the feature dimensions of the text features to obtain target image features; and to fuse the target image features and the text features to obtain the character features.

[0189] In this embodiment of the application, the string extraction module 4553 is further used to obtain the maximum span, wherein the maximum span is the maximum character length corresponding to the candidate entity string; in the text to be processed, from the first character to the last character, the strings are combined according to a span up to the maximum span to obtain each candidate entity string.

[0190] In this embodiment of the application, the entity recognition module 4554 is further configured to determine the string features corresponding to the candidate entity string based on the character features of each character in the candidate entity string; perform entity recognition on each candidate entity string based on the string features to obtain each entity string; and perform sentiment analysis on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string.

[0191] In this embodiment of the application, the entity recognition module 4554 is further used to extract the content features corresponding to the text to be processed.

[0192] In this embodiment of the application, the entity recognition module 4554 is further configured to concatenate at least one of the content feature and the character length corresponding to the candidate entity string with the string feature to obtain the string entity feature; and perform entity recognition on each candidate entity string based on the string entity feature to obtain each entity string.

[0193] In this embodiment of the application, the entity recognition module 4554 is further configured to perform sentiment analysis on each entity string based on the concatenation result of the content features and the string features of each entity string, so as to obtain the entity sentiment category corresponding to each entity string.

[0194] In this embodiment of the application, the entity recognition device 455 further includes an information recommendation module 4555, which is used to perform content recognition on the text to be processed based on the content features to obtain the text content category; obtain first recommendation information matching the text content category from the first recommendation information database; and recommend the first recommendation information to the target account.

[0195] In this embodiment of the application, the information recommendation module 4555 is further configured to determine at least one entity string belonging to the positive sentiment category corresponding to the target account based on the entity sentiment category corresponding to each entity string; obtain second recommendation information matching at least one entity string from the second recommendation information database; and recommend the second recommendation information to the target account.

[0196] In this embodiment of the application, the information recommendation module 4555 is further configured to, for each of the at least one entity string, count the target account set; and recommend the second recommendation information to each of the target accounts in the target account set.

[0197] In this embodiment, the entity recognition of each candidate entity string based on the string features to obtain each entity string is implemented through an entity recognition model. Therefore, the entity recognition device 455 further includes a model training module 4556, used to train the entity recognition model through the following steps: obtaining entity training samples, wherein the entity training samples include candidate entity string samples and entity labels; performing entity recognition on the candidate entity string samples using the entity recognition model to be trained to obtain entity prediction results; and performing backpropagation in the entity recognition model to be trained based on the difference between the entity prediction results and the entity labels to obtain the entity recognition model.

[0198] In this embodiment, the sentiment analysis of each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string, and the content recognition of the text to be processed based on the content features to obtain the text content category, are implemented based on a comprehensive classification model. Therefore, the model training module 4556 is further configured to train the comprehensive classification model through the following steps: obtaining category training samples, wherein the category training samples include text samples, entity string samples corresponding to the text samples, text content category labels, and entity sentiment category labels; classifying the text samples and the entity string samples corresponding to the text samples using the comprehensive classification model to be trained, to obtain the text content prediction category corresponding to the text samples and the entity sentiment prediction category corresponding to the entity string samples of the text samples; and performing backpropagation in the comprehensive classification model to be trained based on the differences between the text content category labels and the text content prediction categories, and the differences between the entity sentiment category labels and the entity sentiment prediction categories, to obtain the comprehensive classification model.

[0199] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. The processor of an entity recognition device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the entity recognition device to perform the entity recognition method described in this application.

[0200] This application provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by a processor, the processor will execute the entity recognition method provided in this application, such as the entity recognition method shown in FIG3.

[0201] In some embodiments of this application, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a device that includes one or any combination of the above-mentioned memories.

[0202] In some embodiments of this application, executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0203] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0204] As an example, executable instructions can be deployed to execute on a single computer device (in which case, this single computer device is an entity recognition device), or to execute on multiple computer devices located in one location (in which case, multiple computer devices located in one location are entity recognition devices), or to execute on multiple computer devices distributed across multiple locations and interconnected via a communication network (in which case, multiple computer devices distributed across multiple locations and interconnected via a communication network are entity recognition devices).

[0205] In summary, the embodiments of this application, by performing entity recognition on the text to be processed and determining the entity sentiment category corresponding to each identified entity string, can accurately determine the target account's attitude towards each entity string, thus improving the entity recognition effect. Furthermore, when recommending information based on the target account's attitude towards each entity string, it is a granular information recommendation process based on entity size, which improves the accuracy of information recommendation. Additionally, identifying entity strings by extracting candidate entity strings with the maximum span improves recall; and determining entity strings through an entity recognition model and determining entity sentiment category and text content category through a comprehensive classification model improves the accuracy of entity recognition and enhances classification efficiency while maintaining classification accuracy.

[0206] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. An entity recognition method, characterized in that, include: Retrieve the text to be processed corresponding to the target account; Feature extraction is performed on the text to be processed to obtain the character features corresponding to each character; Obtain the string of each candidate entity in the text to be processed; Based on the character features of each character in the candidate entity string, determine the string features corresponding to the candidate entity string; The overall semantic features of the text to be processed, the character length corresponding to the candidate entity string, and the string features are concatenated to obtain the string entity features; Based on the string entity features, entity recognition is performed on each candidate entity string to obtain an entity string, wherein the entity string is the candidate entity string belonging to the entity; Sentiment analysis is performed on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string. The entity sentiment category is the category to which the target account's sentiment towards each entity string belongs. At least one entity string belonging to the positive sentiment category is an entity that the target account is interested in.

2. The method according to claim 1, characterized in that, The step of extracting features from the text to be processed to obtain character features corresponding to each character includes: Extract the text features corresponding to each character in the text to be processed; The text features are identified as the character features.

3. The method according to claim 2, characterized in that, After extracting the text features corresponding to each character in the text to be processed, the method further includes: Extract image features corresponding to the images in the text to be processed; The text features are enhanced based on the image features to obtain the character features.

4. The method according to claim 3, characterized in that, The enhancement of text features based on the image features to obtain the character features includes: Based on the feature dimensions of the text features, the image features are transformed to obtain the target image features; The character features are obtained by fusing the target image features and the text features.

5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining each candidate entity string in the text to be processed includes: Obtain the maximum span, wherein the maximum span is the maximum character length corresponding to the candidate entity string; In the text to be processed, starting from the first character to the last character, strings are combined according to a span up to the maximum span to obtain each candidate entity string.

6. The method according to claim 1, characterized in that, The step of performing sentiment analysis on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string includes: Based on the concatenation result of the overall semantic features and the string features of each entity string, sentiment analysis is performed on each entity string to obtain the entity sentiment category corresponding to each entity string.

7. The method according to claim 1, characterized in that, The method further includes: Based on the overall semantic features, the text to be processed is subjected to content recognition to obtain the text content category; Obtain first recommendation information that matches the text content category from the first database of information to be recommended; The first recommendation information is recommended to the target account.

8. The method according to any one of claims 1 to 4, characterized in that, After performing sentiment analysis on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string, the method further includes: Based on the entity sentiment category corresponding to each entity string, determine at least one entity string belonging to the positive sentiment category corresponding to the target account; Obtain second recommendation information that matches at least one of the entity strings from the second recommendation information database; The second recommendation information is recommended to the target account.

9. The method according to claim 8, characterized in that, After obtaining second recommendation information matching at least one of the entity strings from the second recommendation information database, the method further includes: For each of the at least one of the entity strings, count the target account set; The second recommendation information is recommended to each of the target accounts in the target account set.

10. The method according to claim 1, characterized in that, The entity recognition of each candidate entity string based on the entity features of the string to obtain the entity string is achieved through an entity recognition model; The entity recognition model is trained through the following steps: Obtain entity training samples, wherein the entity training samples include candidate entity string samples and entity labels; The candidate entity string samples are identified using the entity recognition model to be trained, and the entity prediction results are obtained. Based on the difference between the entity prediction result and the entity label, backpropagation is performed in the entity recognition model to be trained to obtain the entity recognition model.

11. The method according to claim 7, characterized in that, The step of performing sentiment analysis on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string, and the step of performing content recognition on the text to be processed based on the overall semantic features to obtain the text content category, are implemented based on a comprehensive classification model. The comprehensive classification model is trained through the following steps: Obtain category training samples, wherein the category training samples include text samples, entity string samples corresponding to the text samples, text content category labels, and entity sentiment category labels; The text sample and the corresponding entity string sample are classified using the comprehensive classification model to be trained, so as to obtain the text content prediction category corresponding to the text sample and the entity sentiment prediction category corresponding to the entity string sample of the text sample. Based on the differences between the text content category label and the text content predicted category, and the differences between the entity sentiment category label and the entity sentiment predicted category, backpropagation is performed in the comprehensive classification model to be trained to obtain the comprehensive classification model.

12. An entity recognition device, characterized in that, include: The text acquisition module is used to acquire the text to be processed corresponding to the target account; The feature extraction module is used to extract features from the text to be processed, and obtain the character features corresponding to each character; The string extraction module is used to obtain the string of each candidate entity in the text to be processed; An entity recognition module is used to determine the string features corresponding to the candidate entity string based on the character features of each character in the candidate entity string; The overall semantic features of the text to be processed, the character length corresponding to the candidate entity string, and the string features are concatenated to obtain the string entity features; Entity recognition is performed on each candidate entity string based on the string entity features to obtain an entity string, wherein the entity string is the candidate entity string belonging to an entity; sentiment analysis is performed on each entity string based on the string features to obtain the entity sentiment category corresponding to each entity string, wherein the entity sentiment category is the category to which the target account's sentiment towards each entity string belongs, and at least one entity string belonging to the positive sentiment category is an entity of interest to the target account.

13. An entity recognition device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the entity recognition method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, It stores executable instructions for implementing the entity recognition method according to any one of claims 1 to 11 when executed by a processor.

15. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the entity recognition method according to any one of claims 1 to 11.