Named entity disambiguation method, device and related equipment
Through the combination of knowledge graph and semantic representation model, multiple meanings of named entities are obtained and matched, which solves the problem of low accuracy of the associated content of named entities, and achieves high accuracy matching between named entities and video information.
Patent Information
- Application Number
- CN202210751323.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-06-28
AI Technical Summary
In the prior art, the related content of named entities is not accurate and cannot accurately link the entity.
By obtaining the target named entity input by the user, using the knowledge graph for searching, multiple meanings are obtained, and inputting them into the pre-established semantic representation model, a vector library matching relationship is established, vector similarity search is performed, and the meanings with the highest similarity between the target named entity and it.
Improve the accuracy of the associated content of named entities and ensure the accuracy of matching between named entities and video information.
Smart Images

Figure CN115048552B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to video processing technology, and in particular to a method, apparatus and related equipment for disambiguating named entities. Background Art
[0002] Named entities are names of entities with specific meanings. The most common entities include names of people and places. In the video industry, these entities mainly include album names, names of people, names of characters, names of songs, and names of games. Each named entity may contain multiple different meanings in the knowledge graph.
[0003] Traditional entity linking methods mainly calculate the similarity between named entities and their contexts and entities and descriptions in the knowledge graph. However, accurate entity linking cannot be achieved for the multiple meanings of named entities, resulting in the problem of low accuracy of named entity association content. Summary of the Invention
[0004] The embodiment of the present invention provides a method for disambiguating named entities, which solves the problem in the prior art that the accuracy of the associated content of named entities is not high.
[0005] In a first aspect, an embodiment of the present invention provides a method for disambiguating named entities, comprising:
[0006] Get the target named entity input by the user;
[0007] Performing a search based on the knowledge graph to obtain multiple meaning items of the target named entity;
[0008] Inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate association relationships between the plurality of meaning items and video information corresponding to the plurality of meaning items;
[0009] Based on the matching relationship, a vector similarity search is performed in the vector library to obtain multiple video information corresponding to the target named entity.
[0010] Optional,
[0011] After obtaining the plurality of meaning items of the target named entity, the method further includes:
[0012] Associating each of the plurality of meaning terms with the first video;
[0013] The first video is associated with the second video based on a length-short association algorithm to obtain video content matching each meaning item, wherein the video content includes the first video and the second video. The length-short association algorithm is used to match the first video with the second video associated with the same meaning item.
[0014] Optionally, before inputting the plurality of meaning items into a pre-established semantic representation model, the method further includes:
[0015] Get sample meaning items;
[0016] Acquire a first video and a second video associated with the sample meaning item based on the sample meaning item;
[0017] Obtaining a video title according to the first video and the second video;
[0018] Acquire positive examples and negative examples matching the video title based on the video title;
[0019] A semantic representation model is established according to the video title, positive examples and negative examples.
[0020] Optionally, establishing a semantic representation model according to the video title, positive examples, and negative examples includes:
[0021] Obtain a pre-trained semantic representation model;
[0022] Inputting training samples into the semantic representation model for training to obtain a trained semantic representation model, wherein the training samples include the video title, positive examples, and negative examples.
[0023] Optionally, inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library includes:
[0024] Establishing a first matching relationship between the video title and the corresponding vector in the vector library based on the semantic representation model;
[0025] Determining, based on the first matching relationship, an association relationship between a plurality of meaning items and video titles corresponding to the plurality of meaning items;
[0026] A second matching relationship between the plurality of meaning items and corresponding vectors in the vector library is obtained.
[0027] Optionally, performing vector similarity retrieval in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity includes:
[0028] Searching the target named entity in the vector library based on the matching relationship to determine a first search scope;
[0029] Within the first search range, a similarity search is performed on each of the meaning items through the vector library to obtain a plurality of video information corresponding to the target named entity.
[0030] Optionally, within the first search scope, performing a similarity search on each of the meaning items through the vector library to obtain multiple video information corresponding to the target named entity includes:
[0031] Performing a similarity search on each of the meaning items using the vector library based on the first search scope to obtain a search result;
[0032] The retrieval results are subjected to similarity analysis, and a plurality of video information corresponding to the target named entity is obtained in descending order of similarity.
[0033] Second invention, an embodiment of the present invention further provides a named entity disambiguation device, comprising:
[0034] An acquisition module is used to obtain the target named entity input by the user;
[0035] A retrieval module, configured to perform retrieval based on a knowledge graph to obtain multiple meaning items of the target named entity;
[0036] an association module, configured to input the plurality of meaning items into a pre-established semantic representation model, and obtain a matching relationship between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate an association relationship between the plurality of meaning items and the video information corresponding to the plurality of meaning items;
[0037] The obtaining module is used to perform vector similarity retrieval in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity.
[0038] Optionally, also include:
[0039] a meaning item associating module, configured to associate each of the plurality of meaning items with the first video;
[0040] The content acquisition module is used to associate the first video with the second video based on a length-short association algorithm to obtain video content matching each meaning item, wherein the video content includes the first video and the second video.
[0041] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for disambiguating named entities described in the first aspect.
[0042] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method for disambiguating named entities described in the first aspect are implemented.
[0043] An embodiment of the present invention provides a method, apparatus and related equipment for disambiguating named entities, the method comprising: obtaining a target named entity input by a user; performing a search based on a knowledge graph to obtain multiple meaning items of the target named entity; inputting the multiple meaning items into a pre-established semantic representation model to obtain a matching relationship between the multiple meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate an association relationship between the multiple meaning items and the video information corresponding to the multiple meaning items; performing a vector similarity search in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity. After obtaining the target named entity input by the user, the solution of the embodiment of the present invention performs vector association on its multiple meaning items through the semantic representation model and the vector library, matches the target named entity with the meaning item with the highest similarity through retrieval, and thereby matches the target named entity with the video information, thereby solving the problem of low accuracy of named entity association content in the prior art and effectively improving the accuracy of named entity association content. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 1 is a flowchart of a method for disambiguating named entities according to an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of the structure of a semantic representation model in an embodiment of the present invention;
[0046] Figure 3 Schematic diagram of the process of the method in the embodiment of the present invention;
[0047] Figure 4 Schematic diagram of vector retrieval in an embodiment of the present invention;
[0048] Figure 5 Schematic diagram of the structure of a named entity disambiguation device according to an embodiment of the present invention;
[0049] Figure 6 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0051] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. A process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0052] In addition, the terms "first", "second", etc. may be used in this document to describe various directions, actions, steps or elements, but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of this application, a first speed difference may be referred to as a second speed difference, and similarly, a second speed difference may be referred to as a first speed difference. Both the first speed difference and the second speed difference are speed differences, but they are not the same speed difference. The terms "first", "second", etc. should not be understood to indicate or imply relative importance or to implicitly indicate the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "multiple" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0053] Figure 1 This is a flowchart of a method for disambiguating a named entity in this embodiment. In this embodiment, the execution subject is a television terminal. The method for disambiguating a named entity provided in this embodiment includes:
[0054] Step 101: Obtain a target named entity input by a user.
[0055] In this embodiment, a named entity generally refers to the name of an entity with a specific meaning. Generally speaking, the most common entities are names of people, places, and organizations. In the video industry, these entities are mainly album names, names of people, characters, songs, games, and so on. Entity linking refers to linking a named entity entered by the user or appearing in the text to a corresponding entity in the knowledge graph. Specifically, in this embodiment, the target named entity entered by the user is the named entity that the user needs to search for to obtain its meaning in the knowledge graph.
[0056] Step 102: Search based on the knowledge graph to obtain multiple meaning items of the target named entity.
[0057] In this example, knowledge graphing is a modern theory that achieves multidisciplinary integration by combining theories and methods from applied mathematics, graphics, information visualization, and information science with methods like citation analysis and co-occurrence analysis. This approach uses visual graphs to vividly display the core structure, development history, cutting-edge fields, and overall knowledge architecture of a discipline. It visualizes complex knowledge domains through data mining, information processing, knowledge metrics, and graphing, revealing the dynamic development patterns of knowledge domains and providing practical and valuable references for disciplinary research.
[0058] Specifically, by searching the knowledge graph, multiple meanings of the target named entity can be obtained, where multiple meanings refer to multiple meanings or forms of the target named entity. For example, for the named entity "Swordsman," the knowledge graph contains: the novel "Swordsman," the 1996 TV series "Swordsman," the 2001 TV series "Swordsman," the 2013 TV series "Swordsman," the 1990 movie "Swordsman," the 1992 movie "Swordsman," the variety show "Swordsman Season 1," the variety show "Swordsman Season 2," the variety show "Swordsman Season 3," the variety show "Swordsman Season 4," etc. By segmenting all album titles, under certain rules, if different albums have the same core title, then the core title is an ambiguous entity, and the corresponding album is a meaning item.
[0059] Step 103: Input the multiple meaning items into a pre-established semantic representation model to obtain a matching relationship between the multiple meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate an association relationship between the multiple meaning items and the video information corresponding to the multiple meaning items.
[0060] In this embodiment, if Figure 2 As shown, Figure 2 The following is a structural diagram of the semantic representation model, where Triplet loss is the loss function, Embedding is the vector, Knowledge-bert is the model, Anchor is the current video title, Positive is a positive example close to the video title, and Negative is a negative example close to the video title. Positive examples refer to other video titles with a high correlation with the video title, and negative examples refer to other video titles with no or low correlation with the video title. After adaptively matching multiple meaning items with their positive and negative examples through the pre-established semantic representation model, the multiple meaning items are matched with the vectors. Each vector contains multiple meaning items and the video information corresponding to the multiple meaning items. Therefore, the effect of matching multiple meaning items with their corresponding video information is achieved through vector matching.
[0061] Step 104: Perform vector similarity search in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity.
[0062] In this embodiment, after the target named entity is identified, entity retrieval is performed through the vector library. It should be noted that the vector library includes multiple vectors, and each vector corresponds to video information. When the target named entity is searched for similarity in the vector library, if the retrieval is successful, it indicates that there is a matching vector for this named entity in the vector library. The entity and its context are then represented by vectors (based on the Kwonledege-BERT model, the same as during training). The vector index corresponding to the entity is then retrieved using the vector, where the vector index is used to obtain the video information corresponding to the vector. The meaning item corresponding to the vector with the highest similarity is the disambiguation result of the entity. Thus, the meaning item is determined to be the meaning item of the target named entity. At this time, multiple video information similar to the meaning item will be recommended to the user. Exemplarily, the video information may include videos, video descriptions, video recommendation content, and the like.
[0063] After obtaining the target named entity input by the user, the solution of the embodiment of the present invention performs vector association on its multiple meaning items through the semantic representation model and the vector library, and matches the target named entity with the meaning item with the highest similarity through retrieval, thereby matching the target named entity with the video information, thereby solving the problem of low accuracy of named entity association content in the prior art and effectively improving the accuracy of named entity association content.
[0064] In another embodiment, see Figure 3 , Figure 3 This is a schematic diagram of the processing flow in this embodiment. Optionally, after step 102, obtaining multiple meaning items of the target named entity, the following is further included:
[0065] Associating each of the plurality of meaning terms with the first video;
[0066] The first video is associated with the second video based on a length-short association algorithm to obtain video content matching each meaning item, wherein the video content includes the first video and the second video. The length-short association algorithm is used to match the first video with the second video associated with the same meaning item.
[0067] In this embodiment, the first video is a long video and the second video is a short video, wherein each long video album entity corresponds to a large amount of short video content. When a user searches for an album name, the search results contain not only the album entity but also a large amount of wonderful short video content. Each of the multiple meaning items can be associated with its corresponding first video by manual labeling or machine recognition. For example, when a certain meaning item corresponds to a certain program, all the first videos corresponding to the program can be retrieved by a search tool and matched with a certain meaning item. The short video can be automatically associated with the long video by a long-short association algorithm. Based on the matching relationship between the first video and each meaning item, each meaning item now includes the first video and the second video corresponding to it. Specifically, long videos and short videos with high similarity can be matched by matching based on video key frames. By adding a large number of content-oriented short video titles, the semantic information of the entity is more richly represented.
[0068] Optionally, before step 103, inputting the plurality of meaning items into the pre-established semantic representation model, the method further includes:
[0069] Get sample meaning items;
[0070] Acquire a first video and a second video associated with the sample meaning item based on the sample meaning item;
[0071] Obtaining a video title according to the first video and the second video;
[0072] Acquire positive examples and negative examples matching the video title based on the video title;
[0073] A semantic representation model is established according to the video title, positive examples and negative examples.
[0074] In this embodiment, sample meaning items are first obtained, and the sample meaning items are used to train the obtained semantic representation model so that the semantic training model meets preset requirements.
[0075] Specifically, the first video is a long video, and the second video is a short video. Each long video album entity corresponds to a large amount of short video content. When a user searches for an album name, the search results contain not only the album entity but also a large amount of exciting short video content. The short videos can be automatically associated with the long video using a long-short association algorithm. Positive examples are short video titles that have high semantic similarity with the video title within the same meaning, while negative examples are short video titles that have low or no semantic similarity with the video title within the same meaning.
[0076] For example, the video title "Hilarious Talk Show 'Relief': Fang Qingping Challenges the Laughing Wanderer for the First Time" has similar titles like: "Sketch 'Relief': Fang Qingping Challenges the Laughing Wanderer Stage, Flattering the Audience," "Stand-up Comedy 'Relief': Fang Qingping Constantly Tells Funny Funny Stories, Enchanting the Audience," and "Fang Qingping's Crosstalk 'Relief': Fang Qingping Jokes About His Entrepreneurial Journey, Hilariously Laughing So Much That His Stomach Aches." Negative examples for these videos are specifically short video titles that contain different meanings within the same named entity. These titles are randomly sampled.
[0077] After obtaining the titles of long and short videos, as well as positive and negative examples, a semantic representation model is built based on them. Using contrastive learning and semantic models, text information can be better represented as vectors. Combined with vector search technology, vector search is performed during the actual disambiguation process, making it easier and faster to find the most semantically similar short video vectors and their corresponding meanings. This achieves both effectiveness and performance requirements.
[0078] Furthermore, establishing a semantic representation model based on the video title, positive examples, and negative examples includes:
[0079] Obtain a pre-trained semantic representation model;
[0080] Inputting training samples into the semantic representation model for training to obtain a trained semantic representation model, wherein the training samples include the video title, positive examples, and negative examples.
[0081] It should be noted that, in this embodiment, a pre-trained semantic representation model is first obtained, and then trained by inputting a large number of training samples into the pre-trained semantic representation model, where the training samples consist of a series of video titles, positive examples and negative examples related to the video titles, so as to further adjust and correct the relevant parameters in the semantic representation model, and finally obtain a trained semantic representation model. At this time, different meaning items are input into the trained semantic representation model to output the matching relationship between the meaning items and the vectors.
[0082] Furthermore, step 103, inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library, includes:
[0083] Establishing a first matching relationship between the video title and the corresponding vector in the vector library based on the semantic representation model;
[0084] Determining, based on the first matching relationship, an association relationship between a plurality of meaning items and video titles corresponding to the plurality of meaning items;
[0085] A second matching relationship between the plurality of meaning items and corresponding vectors in the vector library is obtained.
[0086] Specifically, through the semantic representation model, the vectors in each title can be extracted and represented as the vectors of the text title to construct a hierarchical index. Specifically, a certain video title is first matched with the vectors in the vector library to generate a first matching relationship. According to the first matching relationship, a certain video title is associated with a certain meaning item in a one-to-one correspondence. Thus, a second matching relationship can be generated between the meaning item and the vector. At this time, each meaning item will correspond to a different vector and a different video title. Figure 4 As shown, Figure 4 As shown in the figure, different named entities are connected through vectors and a hierarchical index is established. Specifically, each named entity is connected to the corresponding vector based on the video title, thereby generating multiple connection relationships between named entities and vectors.
[0087] Specifically, step 104, performing vector similarity search in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity, includes:
[0088] Searching the target named entity in the vector library based on the matching relationship to determine a first search scope;
[0089] Within the first search range, a similarity search is performed on each of the meaning items through the vector library to obtain a plurality of video information corresponding to the target named entity.
[0090] First, an index is constructed for the entity, and then an index is constructed for the vectors of all short video titles for each meaning item under each entity. Specifically, a video title is first matched with a vector in the vector library to generate a matching relationship. Based on this matching relationship, a one-to-one association is established between a video title and a meaning item. This creates a matching relationship between the meaning item and the vector. In this case, each meaning item corresponds to a different vector and a different video title. In the actual disambiguation process, the entity is first retrieved to determine the range of the vector, and then the vector index under the entity is retrieved. This has the advantage of narrowing the search scope and reducing errors.
[0091] After identifying the target named entity, entity retrieval is performed using the vector library. If the retrieval is successful, the entity and its context are represented by a vector (based on the Kwonledege-BERT model, the same as during training). The vector is then used to retrieve the vector index corresponding to the entity. The meaning item corresponding to the vector with the highest similarity is the disambiguation result of the entity. At this time, multiple video information with similar meaning items will be recommended to the user. For example, the video information may include the video, video description, video recommendation content, etc. By performing vector retrieval multiple times, the scope of the search can be narrowed, thereby improving the accuracy of the search.
[0092] Optionally, the step of searching each meaning item through the vector library within the first search scope to obtain a plurality of video information corresponding to the target named entity includes:
[0093] Performing a similarity search on each of the meaning items using the vector library based on the first search scope to obtain a search result;
[0094] The retrieval results are subjected to similarity analysis to obtain multiple video information corresponding to the target named entity in descending order of similarity.
[0095] In this embodiment, after obtaining search results using multiple search scopes, the search results are arranged in descending order of relevance based on similarity and presented to the user. For example, when a user enters a named entity, vector search is used to find the most semantically relevant video information, and this video information is presented to the user first. Specifically, multiple video results can be extracted from the search results and recommended to the user. The specific number can be adjusted adaptively based on actual circumstances and is not specifically limited in this embodiment.
[0096] The solution provided by this embodiment can be applied in aspects such as knowledge graph construction, question-answering system or search relevance. Specifically, in knowledge graph construction, entities and entity relationships can be mined more accurately, so as to be used for downstream services. In the question-answering system, it is necessary to know exactly which entity in the knowledge graph the entity in the question refers to, so as to search and retrieve in the graph. The entities in this process also need to be disambiguated. In search relevance, by performing entity disambiguation on the search target and search results, the relevance of entities containing the same meaning can be calculated more accurately.
[0097] After obtaining the target named entity input by the user, the solution of the embodiment of the present invention performs vector association on its multiple meaning items through the semantic representation model and the vector library, and matches the target named entity with the meaning item with the highest similarity through retrieval, thereby matching the target named entity with the video information, thereby solving the problem of low accuracy of named entity association content in the prior art and effectively improving the accuracy of named entity association content.
[0098] Figure 5 : This is a schematic diagram of the structure of a named entity disambiguation device 500 provided in an embodiment of the present invention. The named entity disambiguation device 500 provided in this embodiment includes:
[0099] An acquisition module 510 is used to acquire a target named entity input by a user;
[0100] A retrieval module 520 is configured to perform a search based on the knowledge graph to obtain multiple meaning items of the target named entity;
[0101] an association module 530 for inputting the plurality of meaning items into a pre-established semantic representation model to obtain a matching relationship between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate an association relationship between the plurality of meaning items and the video information corresponding to the plurality of meaning items;
[0102] The obtaining module 540 is configured to perform vector similarity search in the vector library based on the matching relationship to obtain a plurality of video information corresponding to the target named entity.
[0103] Optionally, also include:
[0104] a meaning item associating module, configured to associate each of the plurality of meaning items with the first video;
[0105] A content acquisition module is used to associate the first video with the second video based on a long-short association algorithm to obtain video content that matches each meaning item, wherein the video content includes the first video and the second video, and the long-short association algorithm is used to match the first video with the second video associated with the same meaning item.
[0106] Optionally, also include:
[0107] A sample acquisition module, used to obtain sample meaning items;
[0108] A video association module, configured to obtain a first video and a second video associated with the sample meaning item based on the sample meaning item;
[0109] A title acquisition module, configured to acquire a video title based on the first video and the second video;
[0110] A title matching module, configured to obtain positive examples and negative examples matching the video title based on the video title;
[0111] The model building module is used to build a semantic representation model based on the video title, positive examples and negative examples.
[0112] Optionally, the model building module includes:
[0113] Model acquisition submodule, used to obtain the pre-trained semantic representation model;
[0114] The model training submodule is used to input training samples into the semantic representation model for training to obtain a trained semantic representation model, wherein the training samples include the video title, positive examples, and negative examples.
[0115] Optionally, also include:
[0116] a matching submodule, configured to establish a first matching relationship between a video title and a corresponding vector in a vector library based on the semantic representation model;
[0117] The relationship determination submodule is configured to determine, based on the first matching relationship, an association relationship between a plurality of meaning items and video titles corresponding to the plurality of meaning items.
[0118] The relationship obtaining submodule is used to obtain a second matching relationship between the plurality of meaning items and corresponding vectors in the vector library.
[0119] Optionally, also include:
[0120] An entity retrieval module, configured to search the target named entity in the vector library based on the matching relationship and determine a first search scope;
[0121] The meaning item retrieval module is used to perform similarity retrieval on each of the meaning items through the vector library within the first retrieval range to obtain multiple video information corresponding to the target named entity.
[0122] Optionally, also include:
[0123] a meaning item retrieval submodule, configured to perform a similarity search on each of the meaning items through the vector library based on the first search scope to obtain a search result;
[0124] The similarity analysis submodule is used to perform similarity analysis on the search results, and obtain multiple video information corresponding to the target named entity in descending order of similarity.
[0125] After obtaining the target named entity input by the user, the solution of the embodiment of the present invention performs vector association on its multiple meaning items through the semantic representation model and the vector library, and matches the target named entity with the meaning item with the highest similarity through retrieval, thereby matching the target named entity with the video information, thereby solving the problem of low accuracy of named entity association content in the prior art and effectively improving the accuracy of named entity association content.
[0126] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the electronic device 600 includes a memory 610 and a processor 620. The number of the processor 620 in the electronic device 600 can be one or more. Figure 6 In the example, a processor 620 is used; the memory 610 and the processor 620 in the server can be connected via a bus or other means. Figure 6 The bus connection is taken as an example.
[0127] The memory 610, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the disambiguation method for disambiguating named entities in the embodiment of the present invention. The processor 620 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions and modules stored in the memory 610, thereby realizing the above-mentioned disambiguation method for named entities.
[0128] The processor 620 is configured to execute the computer program stored in the memory 610 to implement the following steps:
[0129] Get the target named entity input by the user;
[0130] Performing a search based on the knowledge graph to obtain multiple meaning items of the target named entity;
[0131] Inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate association relationships between the plurality of meaning items and video information corresponding to the plurality of meaning items;
[0132] Based on the matching relationship, a vector similarity search is performed in the vector library to obtain multiple video information corresponding to the target named entity.
[0133] Optional,
[0134] After obtaining the plurality of meaning items of the target named entity, the method further includes:
[0135] Associating each of the plurality of meaning terms with the first video;
[0136] The first video is associated with the second video based on a length-short association algorithm to obtain video content matching each meaning item, wherein the video content includes the first video and the second video. The length-short association algorithm is used to match the first video with the second video associated with the same meaning item.
[0137] Optionally, before inputting the plurality of meaning items into a pre-established semantic representation model, the method further includes:
[0138] Get sample meaning items;
[0139] Acquire a first video and a second video associated with the sample meaning item based on the sample meaning item;
[0140] Obtaining a video title according to the first video and the second video;
[0141] Acquire positive examples and negative examples matching the video title based on the video title;
[0142] A semantic representation model is established according to the video title, positive examples and negative examples.
[0143] Optionally, establishing a semantic representation model according to the video title, positive examples, and negative examples includes:
[0144] Obtain a pre-trained semantic representation model;
[0145] Inputting training samples into the semantic representation model for training to obtain a trained semantic representation model, wherein the training samples include the video title, positive examples, and negative examples.
[0146] Optionally, inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library includes:
[0147] Establishing a first matching relationship between the video title and the corresponding vector in the vector library based on the semantic representation model;
[0148] Determining, based on the first matching relationship, an association relationship between a plurality of meaning items and video titles corresponding to the plurality of meaning items;
[0149] A second matching relationship between the plurality of meaning items and corresponding vectors in the vector library is obtained.
[0150] Optionally, performing vector similarity retrieval in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity includes:
[0151] Searching the target named entity in the vector library based on the matching relationship to determine a first search scope;
[0152] Within the first search range, a similarity search is performed on each of the meaning items through the vector library to obtain a plurality of video information corresponding to the target named entity.
[0153] Optionally, within the first search scope, performing a similarity search on each of the meaning items through the vector library to obtain multiple video information corresponding to the target named entity includes:
[0154] Performing a similarity search on each of the meaning items using the vector library based on the first search scope to obtain a search result;
[0155] The retrieval results are subjected to similarity analysis, and a plurality of video information corresponding to the target named entity is obtained in descending order of similarity.
[0156] The memory 610 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the terminal, etc. Furthermore, the memory 610 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 610 may further include memory remotely located relative to the processor 620, and these remote memories may be connected to a server / terminal / server via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0157] After obtaining the target named entity input by the user, the solution of the embodiment of the present invention performs vector association on its multiple meaning items through the semantic representation model and the vector library, and matches the target named entity with the meaning item with the highest similarity through retrieval, thereby matching the target named entity with the video information, thereby solving the problem of low accuracy of named entity association content in the prior art and effectively improving the accuracy of named entity association content.
[0158] An embodiment of the present invention further provides a storage medium containing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a method for disambiguating named entities, the method comprising:
[0159] Get the target named entity input by the user;
[0160] Performing a search based on the knowledge graph to obtain multiple meaning items of the target named entity;
[0161] Inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate association relationships between the plurality of meaning items and video information corresponding to the plurality of meaning items;
[0162] Based on the matching relationship, a vector similarity search is performed in the vector library to obtain multiple video information corresponding to the target named entity.
[0163] Optional,
[0164] After obtaining the plurality of meaning items of the target named entity, the method further includes:
[0165] Associating each of the plurality of meaning terms with the first video;
[0166] The first video is associated with the second video based on a length-short association algorithm to obtain video content matching each meaning item, wherein the video content includes the first video and the second video. The length-short association algorithm is used to match the first video with the second video associated with the same meaning item.
[0167] Optionally, before inputting the plurality of meaning items into a pre-established semantic representation model, the method further includes:
[0168] Get sample meaning items;
[0169] Acquire a first video and a second video associated with the sample meaning item based on the sample meaning item;
[0170] Obtaining a video title according to the first video and the second video;
[0171] Acquire positive examples and negative examples matching the video title based on the video title;
[0172] A semantic representation model is established according to the video title, positive examples and negative examples.
[0173] Optionally, establishing a semantic representation model according to the video title, positive examples, and negative examples includes:
[0174] Obtain a pre-trained semantic representation model;
[0175] Inputting training samples into the semantic representation model for training to obtain a trained semantic representation model, wherein the training samples include the video title, positive examples, and negative examples.
[0176] Optionally, inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library includes:
[0177] Establishing a first matching relationship between the video title and the corresponding vector in the vector library based on the semantic representation model;
[0178] Determining, based on the first matching relationship, an association relationship between a plurality of meaning items and video titles corresponding to the plurality of meaning items;
[0179] A second matching relationship between the plurality of meaning items and corresponding vectors in the vector library is obtained.
[0180] Optionally, performing vector similarity retrieval in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity includes:
[0181] Searching the target named entity in the vector library based on the matching relationship to determine a first search scope;
[0182] Within the first search range, a similarity search is performed on each of the meaning items through the vector library to obtain a plurality of video information corresponding to the target named entity.
[0183] Optionally, within the first search scope, performing a similarity search on each of the meaning items through the vector library to obtain multiple video information corresponding to the target named entity includes:
[0184] Performing a similarity search on each of the meaning items using the vector library based on the first search scope to obtain a search result;
[0185] The retrieval results are subjected to similarity analysis, and a plurality of video information corresponding to the target named entity is obtained in descending order of similarity.
[0186] Of course, the storage medium containing computer-executable instructions provided by an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in a named entity disambiguation method provided by any embodiment of the present invention.
[0187] The computer-readable storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0188] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0189] The program code embodied on the storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0190] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0191] After obtaining the target named entity input by the user, the solution of the embodiment of the present invention performs vector association on its multiple meaning items through the semantic representation model and the vector library, and matches the target named entity with the meaning item with the highest similarity through retrieval, thereby matching the target named entity with the video information, thereby solving the problem of low accuracy of named entity association content in the prior art and effectively improving the accuracy of named entity association content.
[0192] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for disambiguating named entities, characterized in that: include: Get the target named entity input by the user; Performing a search based on the knowledge graph to obtain multiple meaning items of the target named entity; Inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate association relationships between the plurality of meaning items and video information corresponding to the plurality of meaning items; Performing vector similarity retrieval in the vector library based on the matching relationship to obtain multiple video information corresponding to the target named entity; The performing a vector similarity search in the vector library based on the matching relationship to obtain a plurality of video information corresponding to the target named entity includes: searching the target named entity in the vector library based on the matching relationship to determine a first search range; Within the first search scope, a similarity search is performed on each of the meaning items through the vector library to obtain multiple video information corresponding to the target named entity. The vector library includes multiple vectors, and each of the vectors corresponds to the video information. The video information includes at least one of the video, video description, and video recommendation content.
2. The method according to claim 1, wherein After obtaining the plurality of meaning items of the target named entity, the method further includes: Associating each of the plurality of meaning terms with the first video; The first video is associated with the second video based on a length-short association algorithm to obtain video content matching each meaning item, wherein the video content includes the first video and the second video. The length-short association algorithm is used to match the first video with the second video associated with the same meaning item.
3. The method according to claim 1, wherein Before inputting the plurality of meaning items into the pre-established semantic representation model, the method further includes: Get sample meaning items; Acquire a first video and a second video associated with the sample meaning item based on the sample meaning item; Obtaining a video title according to the first video and the second video; Acquire positive examples and negative examples matching the video title based on the video title; A semantic representation model is established according to the video title, positive examples and negative examples.
4. The method according to claim 3, wherein The establishing of a semantic representation model according to the video title, positive examples, and negative examples includes: Obtain a pre-trained semantic representation model; Inputting training samples into the semantic representation model for training to obtain a trained semantic representation model, wherein the training samples include the video title, positive examples, and negative examples.
5. The method according to claim 1, wherein Inputting the plurality of meaning items into a pre-established semantic representation model to obtain matching relationships between the plurality of meaning items and corresponding vectors in a vector library includes: Establishing a first matching relationship between the video title and the corresponding vector in the vector library based on the semantic representation model; Determining, based on the first matching relationship, an association relationship between a plurality of meaning items and video titles corresponding to the plurality of meaning items; A second matching relationship between the plurality of meaning items and corresponding vectors in the vector library is obtained.
6. The method according to claim 1, wherein Based on the first search scope, performing similarity search on each of the meaning items through the vector library to obtain multiple video information corresponding to the target named entity includes: Performing a similarity search on each of the meaning items using the vector library based on the first search scope to obtain a search result; The retrieval results are subjected to similarity analysis, and a plurality of video information corresponding to the target named entity is obtained in descending order of similarity.
7. A named entity disambiguation device based on vector retrieval, characterized in that: include: An acquisition module is used to obtain the target named entity input by the user; A retrieval module, configured to perform retrieval based on a knowledge graph to obtain multiple meaning items of the target named entity; an association module, configured to input the plurality of meaning items into a pre-established semantic representation model, and obtain a matching relationship between the plurality of meaning items and corresponding vectors in a vector library, wherein the corresponding vectors are used to indicate an association relationship between the plurality of meaning items and the video information corresponding to the plurality of meaning items; an obtaining module, configured to perform a vector similarity search in the vector library based on the matching relationship to obtain a plurality of video information corresponding to the target named entity, the obtaining module further comprising: an entity retrieval module, configured to search the target named entity in the vector library based on the matching relationship to determine a first retrieval range; A meaning term retrieval module is used to perform similarity retrieval on each meaning term within the first search range through the vector library to obtain multiple video information corresponding to the target named entity. The vector library includes multiple vectors, and each vector corresponds to the video information. The video information includes at least one of the video, video description, and video recommendation content.
8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for disambiguating named entities based on vector retrieval according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The readable storage medium stores a program or instruction, which, when executed by a processor, implements the steps of the method for disambiguating named entities based on vector retrieval according to any one of claims 1 to 6.
Citation Information
Patent Citations
Entity disambiguation method and apparatus
CN106407180A
Entity disambiguation method in complex Chinese text
CN113283236A