Metaphor video understanding enhancement method based on metaphor knowledge graph
By using a metaphor knowledge graph-based approach, explicit objects in videos are identified and multi-hop queries are performed. Combined with a large model, metaphor interpretation text is generated, which solves the problem of inaccurate metaphor understanding in existing technologies and achieves efficient metaphor interpretation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-24
AI Technical Summary
Existing methods for understanding video metaphors lack structured metaphorical knowledge support, making it difficult to accurately identify metaphorical meanings in videos, especially when faced with complex visual elements, and thus unable to reveal deep abstract semantics.
By employing a metaphor-based knowledge graph approach, we identify explicit things as source words, use multi-hop queries to obtain related concept words, and combine them with a large model to generate metaphor interpretation text, thereby achieving hierarchical reasoning from concrete things to abstract semantics.
It improves the accuracy and efficiency of metaphor interpretation, reduces hallucination output, and ensures the controllability and efficiency of reasoning.
Smart Images

Figure CN122454479A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of multimedia technology, and in particular to a metaphor video understanding enhancement method based on metaphor knowledge graph. Background Technology
[0002] With the rapid development of social media platforms, many video creators are using metaphors to express profound ideas such as social critique and life insights. For example, they use anthropomorphic animal scenarios to indirectly reflect abstract issues such as class stratification and unequal resource allocation. In application scenarios such as content moderation, public opinion analysis, and intelligent recommendation, accurately understanding the metaphorical meaning of videos is of great value for grasping users' true intentions and improving the accuracy of content processing.
[0003] Currently, mainstream video metaphor understanding methods directly employ multimodal large language models for end-to-end processing. Specifically, this method obtains keyframe image sequences by sampling frames from the video, extracts image features using a visual encoder, and then inputs the image features and textual prompts into a large model, which directly generates interpretations of the video content based on its pre-trained knowledge.
[0004] However, since metaphorical understanding usually requires starting from specific visual elements (such as "pig") and going through conceptual associations (such as "pig → greed") to reveal deeper meanings, the above methods lack structured metaphorical knowledge support, making it difficult to conduct effective reasoning. As a result, when faced with metaphorical expressions such as "pig in a tuxedo" or "cat under the table," we can often only identify the surface visual elements and cannot accurately reveal the abstract semantics such as social class differentiation behind them, that is, the metaphorical understanding is inaccurate. Summary of the Invention
[0005] This disclosure provides a metaphor video understanding enhancement based on a metaphor knowledge graph, which integrates explicit knowledge retrieval with a large model, thereby improving both the accuracy of metaphor interpretation and processing efficiency. The technical solution of this disclosure is as follows: According to one aspect of the embodiments of this disclosure, a metaphor video understanding enhancement method based on a metaphor knowledge graph is provided, comprising: The input information is identified to obtain multiple source words, each source word representing the things that appear explicitly in the input information; For any one of the multiple source words, the node where the source word is located is determined from the metaphor knowledge graph. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node is used to represent an entity concept word or an abstract concept word. The entity concept word refers to a thing with a physical form. The abstract concept word is a general expression of the commonalities, characteristics or relationships of a class of things. Each edge is used to indicate that there is a metaphorical mapping relationship between the concept words represented by the two connected nodes. Starting from the node where the source word is located, a multi-hop query is performed on the metaphor knowledge graph a preset number of times to obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than the preset number of edges. The large model processes the input information and the multiple first target words corresponding to the multiple source words to obtain the metaphor interpretation text, which is used to interpret the metaphorical semantics in the input information.
[0006] According to another aspect of the embodiments of this disclosure, a metaphor video understanding enhancement device based on a metaphor knowledge graph is provided, comprising: The recognition unit is configured to perform recognition of input information to obtain multiple source words, each source word representing something that appears explicitly in the input information; The determining unit is configured to perform the following operation for any one of the plurality of source words: determine the node where the source word is located from the metaphor knowledge graph. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node is used to represent an entity concept word or an abstract concept word. The entity concept word refers to a thing with a physical form. The abstract concept word is a general expression of the commonalities, characteristics, or relationships of a class of things. Each edge is used to indicate that there is a metaphorical mapping relationship between the concept words represented by the two connected nodes. The query unit is configured to perform a multi-hop query in the metaphor knowledge graph, starting from the node where the source word is located, and to obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than the preset number of edges. The generation unit is configured to perform processing on the input information and multiple first target words corresponding to the multiple source words through a large model to obtain metaphor interpretation text, which is used to interpret the metaphorical semantics in the input information.
[0007] In some embodiments, each node in the metaphorical knowledge graph stores a concept word text; The determining unit is configured to perform string matching between any one of the plurality of source words and the concept words stored in each node for any one of the source words. If there is a node that matches successfully, then the node is determined as the node where the source word is located.
[0008] In some embodiments, each node in the metaphorical knowledge graph is associated with a concept word vector, which is obtained by semantic embedding of the concept word; The determining unit is configured to perform the following actions for any one of the plurality of source words: convert the source word into a source word vector, obtain the semantic similarity between the source word vector and the concept word vector of each node, and select at least one node whose similarity satisfies the condition as the node where the source word is located.
[0009] In some embodiments, the generating unit includes: The acquisition subunit is configured to perform an operation on any one of the multiple first target words corresponding to the multiple source words, and acquire the correlation degree between the first target word and the multiple source words, wherein the correlation degree is used to represent the degree of association between the first target word and the multiple source words; The filtering subunit is configured to perform a correlation-based filtering process to select at least one reference word from multiple first target words corresponding to the multiple source words, wherein the correlation degree of each selected reference word is higher than that of the remaining unselected first target words. The processing subunit is configured to perform processing on the input information and the at least one reference word through a large model to obtain the metaphor interpretation text.
[0010] In some embodiments, the acquisition subunit is configured to perform the following actions: for any first target word among a plurality of first target words corresponding to the plurality of source words, determine from the metaphor knowledge graph an association path between the first target word and the plurality of source words, wherein the starting point of the association path is the node where any of the plurality of source words is located, and the ending point of the association path is the node where the first target word is located; determine the degree of association between the first target word and the plurality of source words based on at least one of the number of association paths, the length of the association paths, and the weight of the association paths, wherein the degree of association is positively correlated with the number of association paths, negatively correlated with the length of the association paths, and positively correlated with the weight of the association paths, and the weight of the association paths is determined based on the weight of all edges in the association paths, wherein the weight of each edge in the metaphor knowledge graph is used to represent the strength of the corresponding metaphor mapping.
[0011] In some embodiments, the apparatus further includes: A creation unit is configured to retrieve multiple metaphorical statements, each representing a metaphorical mapping from at least one source word to a first target word. For any one of the multiple metaphorical statements, at least one metaphorical concept pair is extracted from the statement. Each metaphorical concept pair includes a source word and a first target word, indicating that the source word represents the first target word. Each word in each metaphorical concept pair is either an entity concept word or an abstract concept word. Based on the concept words in at least one metaphorical concept pair, nodes are created. Based on at least one metaphorical concept pair, first-type edges are created between the created nodes. The concept words corresponding to the two nodes connected by each first-type edge belong to a metaphorical concept pair, and each first-type edge indicates that there is a direct metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
[0012] In some embodiments, the creation unit is further configured to perform at least one of the following: For any two first target words that have the same source word, create a second type of edge between the nodes corresponding to the two first target words; For any two source words that have the same first target word, create the second type of edge between the nodes corresponding to the two source words; In this context, each edge of type II represents an indirect metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
[0013] In some embodiments, the creation unit is further configured to perform the following: for any created node, obtain the semantic similarity between the concept word corresponding to the node and the concept words corresponding to each other node, wherein the other nodes are nodes other than the created node; if the semantic similarity between the concept word corresponding to the node and the concept word corresponding to any other node reaches a semantic threshold, then create a third type of edge between the node and the other nodes, wherein the third type of edge is used to indicate that there is a semantic similarity association between the concept words corresponding to the two connected nodes.
[0014] In some embodiments, the determining unit is further configured to perform, for any one of the plurality of source words, determine a similar node corresponding to the source word from a metaphor knowledge graph, wherein the semantic similarity between the concept word represented by the similar node and the source word reaches a semantic threshold; The query unit is further configured to perform a multi-hop query in the metaphor knowledge graph, starting from the similar node and following a preset number of times, to obtain multiple second target words. The multiple second target words include concept words represented by all nodes that start from the starting node and traverse no more than the preset number of edges. The generation unit is configured to execute a large model to process the input information, multiple first target words and multiple second target words corresponding to the multiple source words, and obtain metaphor interpretation text.
[0015] In some embodiments, the preset number of times is dynamically determined based on the type of the starting node or the degree of the starting node in the metaphorical knowledge graph; Wherein, when the concept word represented by the starting node is an entity concept word, a first preset number of times is used, and when the concept word represented by the starting node is an abstract concept word, a second preset number of times is used, wherein the first preset number of times is greater than the second preset number of times; Alternatively, the preset number of times is negatively correlated with the degree of the starting node in the metaphorical knowledge graph.
[0016] In some embodiments, the generation unit is further configured to output an interpretation strategy text based on the output of the metaphor interpretation text, the interpretation strategy text being used to describe the reasons for outputting the metaphor interpretation text.
[0017] According to another aspect of the embodiments of this disclosure, an electronic device is provided, the electronic device comprising: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the aforementioned metaphor video understanding enhancement method based on metaphor knowledge graph.
[0018] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which, when the program code in the computer-readable storage medium is executed by a processor of an electronic device, enables the electronic device to perform the above-described metaphor video understanding enhancement method based on metaphor knowledge graph.
[0019] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instruction that, when executed by a processor, implements the above-described metaphor video understanding enhancement method based on metaphor knowledge graph.
[0020] This disclosure provides a metaphor video understanding enhancement method based on a metaphor knowledge graph. It directly extracts explicitly occurring things from input information (such as videos) as source words, avoiding complex semantic parsing and reducing computational overhead. Then, using a pre-constructed metaphor knowledge graph, it performs a preset number of multi-hop queries, systematically acquiring all relevant concepts reachable from the source words within a finite number of steps. This achieves hierarchical reasoning from concrete things to abstract semantics, overcoming the shortcomings of large models that rely solely on implicit parameter knowledge and struggle with cross-domain multi-hop reasoning. Finally, the multiple target words obtained from the queries are input together with the original input into the large model, guiding the model to focus on the structured metaphor knowledge provided by the graph, effectively reducing illusionary output and improving the accuracy of metaphor interpretation. Compared to purely end-to-end methods, this solution integrates explicit knowledge retrieval with a large model (generative model), ensuring both the controllability of reasoning and improving processing efficiency.
[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0023] Figure 1 This is a schematic diagram illustrating the implementation environment of a metaphor video understanding enhancement method based on a metaphor knowledge graph, according to an exemplary embodiment.
[0024] Figure 2 This is a flowchart illustrating a metaphor-based video understanding enhancement method according to an exemplary embodiment.
[0025] Figure 3 This is a flowchart illustrating another metaphorical video understanding enhancement method based on a metaphorical knowledge graph, according to an exemplary embodiment.
[0026] Figure 4 This is a block diagram illustrating a metaphor video understanding enhancement device based on a metaphor knowledge graph, according to an exemplary embodiment.
[0027] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0029] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0030] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the input information and metaphorical statements involved in this disclosure were obtained with full authorization.
[0031] Figure 1 This is a schematic diagram illustrating an implementation environment for a metaphorical video understanding enhancement method based on a metaphorical knowledge graph, according to an exemplary embodiment. Taking an electronic device provided as a server as an example, see [link to example]. Figure 1 The implementation environment specifically includes: terminal 101 and server 102.
[0032] In some embodiments, terminal 101 is at least one of devices such as a smartphone, smartwatch, desktop computer, laptop, MP3 player, MP4 player, and laptop computer. Terminal 101 runs an application that supports metaphor understanding, and users can log in to the application through terminal 101 to access the services provided by the application. This application may be a video sharing application, a content moderation platform, an intelligent writing assistant, etc., and this disclosure does not limit this specific application. Terminal 101 can connect to server 102 via a wireless or wired network, and can then send input information (such as video) to be recognized to server 102, whereby server 102 parses the metaphorical content in the input information.
[0033] Terminal 101 generally refers to one of a plurality of terminals; this embodiment uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. For example, there may be several terminals, or dozens or hundreds of terminals, or even more. This disclosure does not limit the number of terminals or the type of device.
[0034] Server 102 can be at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 102 can connect to terminal 101 and other terminals via a wireless or wired network. Server 102 receives input information sent by terminal 101, performs source word extraction, knowledge graph query, and large model processing on the input information, and finally generates metaphor interpretation text. Server 102 can also return the generated metaphor interpretation text to terminal 101 for user viewing or downstream applications (such as content moderation, public opinion analysis, and intelligent recommendation). In some embodiments, the number of servers can be more or less, and this disclosure does not limit this. Of course, server 102 may also include other functional servers to provide more comprehensive and diversified services.
[0035] Figure 2 This is a flowchart illustrating a metaphorical video understanding enhancement method based on a metaphorical knowledge graph, according to an exemplary embodiment. See also... Figure 2 The metaphor video understanding enhancement method based on metaphor knowledge graph is applied to the server and includes the following steps.
[0036] In step 201, the server identifies the input information and obtains multiple source words, each source word representing something that appears explicitly in the input information.
[0037] In this embodiment of the disclosure, the input information can be any form of information, including but not limited to video, images, text, or audio. Taking video as an example, the server first extracts keyframes from the video, and then uses an object detection model to identify specific objects that appear explicitly in the frames, such as "pig," "cat," "tuxedo," and "banquet table." If the input information is text, nouns or noun phrases are extracted as source words through word segmentation and part-of-speech tagging. The source words are characterized by being intuitive and perceptible, and can be directly obtained from the input without relying on any metaphorical reasoning. For example, for a video showing "a pig in a tuxedo eating at a banquet, while a cat wanders under the table," the source words extracted in step 201 include "pig," "tuxedo," "banquet," and "cat." These words constitute the starting point for subsequent metaphorical queries.
[0038] In step 202, for any one of the multiple source words, the server determines the node where the source word is located from the metaphor knowledge graph.
[0039] In this embodiment, the metaphor knowledge graph is a pre-constructed knowledge structure specifically designed to support metaphorical reasoning. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node represents an entity concept word or an abstract concept word. Entity concept words refer to things with physical forms, such as "pig," "cat," and "table." Abstract concept words are general expressions of the commonalities, characteristics, or relationships of a class of things, such as "greed," "exploiter," and "class stratification." Each edge indicates a metaphorical mapping relationship between the concept words represented by the two connected nodes. For example, the edge between "pig" and "greed" indicates that "pig can metaphorically represent greed."
[0040] After obtaining the set of source words, the server matches each source word (e.g., "pig") with all the concept words stored in the nodes of the graph. Matching methods can include exact string matching (e.g., directly searching for "pig") or semantic vector similarity matching (e.g., "piglet" matches "pig"). Once a corresponding node is located, that node becomes the starting node for subsequent queries. If a source word fails to match any node, the server can ignore the source word or search for similar nodes through semantic expansion.
[0041] In step 203, the server takes the node where the source word is located as the starting node and performs multi-hop queries in the metaphor knowledge graph a preset number of times to obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than a preset number of edges.
[0042] In this embodiment, the preset number of hops (e.g., 2 or 3 hops) is a configurable hyperparameter used to control the depth of the query. Multi-hop query means: starting from the starting node, moving forward along the edges (i.e., metaphorical mapping relationships) in the graph, each movement is counted as one hop, and all nodes traversed during the movement (excluding the starting node itself) are collected as target words. For example, suppose the preset number of hops is 2, and the starting node is "pig". Starting from "pig", hop 1 leads to the nodes: "greedy", "lazy", and "dirty"; continuing from these nodes, hop 2 leads to the nodes: from "greedy" to "exploiter" and "ruler", from "lazy" to "poverty" and "incompetent", and from "dirty" to "base" and "inferior". Then all nodes reached by hop 1 and hop 2 (i.e., "greedy", "lazy", "dirty", "exploiter", "ruler", "poverty", "incompetent", "base", and "inferior") are the first target words. These target words represent the abstract concepts that can be associated from the source word through a finite number of metaphorical reasoning steps, providing rich candidate material for the subsequent generation of interpretive text.
[0043] In step 204, the server processes the input information and multiple first target words corresponding to multiple source words through a large model to obtain metaphor interpretation text, which is used to interpret the metaphorical semantics in the input information.
[0044] In this embodiment, the large model can be any model with multimodal understanding and text generation capabilities. The server combines the original input information (e.g., a video frame sequence or original text) and all the first target words obtained in step 203 into an input sequence according to a preset prompt template. For example, the prompt template can be designed as: "Based on the following video content and related metaphorical candidate concepts: {target word list}, interpret the deep metaphorical meaning expressed by this video." After receiving this prompt, the large model uses its powerful semantic understanding and generation capabilities to fuse visual or textual elements with candidate concepts and output a natural language description.
[0045] For example, in the aforementioned video featuring "pigs, cats, and a banquet," the server inputs a list of primary target words (including "greed," "exploiters," "rulers," and "vulnerable groups") along with the video frames into a large model. The model generates an interpretive text: "This video uses animal anthropomorphism to criticize social stratification and unequal resource allocation. The pig in a tuxedo symbolizes the ruling class that controls social resources, while the cat under the table symbolizes the marginalized lower class." This interpretive text reveals the metaphorical semantics hidden in the input information and can be used for downstream tasks such as content moderation, public opinion analysis, and intelligent recommendation.
[0046] This disclosure provides a metaphor video understanding enhancement method based on a metaphor knowledge graph. It directly extracts explicit terms from the input information as source words, avoiding complex semantic parsing and reducing computational overhead. Then, it utilizes a pre-constructed metaphor knowledge graph to perform a predetermined number of multi-hop queries, systematically acquiring all relevant concepts reachable from the source words within a finite number of steps. This achieves hierarchical reasoning from concrete things to abstract semantics, overcoming the limitation of large models relying solely on implicit parameter knowledge and struggling with cross-domain multi-hop reasoning. Finally, the multiple target words obtained from the queries are input together with the original input into the large model, guiding the model to focus on the structured metaphor knowledge provided by the graph, effectively reducing illusory outputs and improving the accuracy of metaphor interpretation. Compared to purely end-to-end methods, this solution integrates explicit knowledge retrieval with a large model, ensuring both the controllability of reasoning and improving processing efficiency.
[0047] In some embodiments, each node in a metaphorical knowledge graph stores a concept word text; For any one of multiple source words, determine the node containing the source word from the metaphorical knowledge graph, including: For any one of the multiple source words, perform string matching between the source word and the concept words stored in each node. If a matching node exists, then that node is determined as the node containing the source word.
[0048] The solution provided in this disclosure stores concept words in text form as nodes in a metaphorical knowledge graph and uses exact string matching to locate the node containing the source word. This method is simple to implement, has low computational cost, and can quickly map source words to nodes, making it particularly suitable for scenarios where the source words are standard vocabulary and the graph size is moderate. Because exact matching is used, there is no semantic ambiguity, ensuring the determinism of the query starting point, thereby improving the stability and accuracy of subsequent multi-hop queries. Furthermore, this method requires no additional vector computation or model inference, significantly improving overall execution efficiency.
[0049] In some embodiments, each node in the metaphorical knowledge graph is associated with a concept word vector, which is obtained by semantic embedding of the concept word; For any one of multiple source words, determine the node containing the source word from the metaphorical knowledge graph, including: For any one of multiple source words, convert the source word into a source word vector, obtain the semantic similarity between the source word vector and the concept word vector of each node, and select at least one node whose similarity satisfies the condition as the node where the source word is located.
[0050] The scheme provided in this disclosure associates nodes in a metaphor knowledge graph with concept word vectors and uses semantic similarity matching to locate source word nodes. This scheme can handle cases where the source word and a concept word in the graph are synonyms, near-synonyms, or have word form variations (e.g., "little pig" and "pig"). By calculating vector similarity, it finds at least one semantically similar node, thereby improving the recall rate and robustness of source word matching. Even if the source word does not appear precisely in the graph, metaphor queries can still be triggered through similar nodes, avoiding recognition failures due to missing vocabulary. This approach effectively expands the applicability of the method and improves the accuracy of metaphor understanding in real open text.
[0051] In some embodiments, a large model is used to process the input information and multiple first target words corresponding to multiple source words to obtain metaphor interpretation text, including: For any first target word among multiple first target words corresponding to multiple source words, obtain the correlation degree between the first target word and multiple source words. The correlation degree is used to represent the degree of correlation between the first target word and multiple source words. Based on relevance, at least one reference word is selected from multiple first target words corresponding to multiple source words. The relevance of each selected reference word is higher than that of the remaining unselected first target words. The metaphor interpretation text is obtained by processing the input information and at least one reference word through a large model.
[0052] The solution provided in this disclosure significantly reduces noise information input to the large model by filtering the first target word based on its relevance before feeding it into the large model. Only reference words with high relevance to the source word are retained for subsequent generation. Since multi-hop queries may return a large number of target words with weak semantic relevance to the source word, directly inputting all of them into the large model would distract the model, increase computational burden, and potentially mislead the generated results. This solution filters the most relevant target words by ranking them based on relevance, enabling the large model to focus on the most valuable metaphorical cues, thereby improving the accuracy of metaphor interpretation and generation efficiency.
[0053] In some embodiments, for any first target word among multiple first target words corresponding to multiple source words, the correlation degree between the first target word and the multiple source words is obtained, including: For any first target word among multiple first target words corresponding to multiple source words, determine the association path between the first target word and multiple source words from the metaphor knowledge graph. The starting point of the association path is the node where any source word is located among the multiple source words, and the ending point of the association path is the node where the first target word is located. The degree of association between the first target word and multiple source words is determined based on at least one of the number of association paths, the length of association paths, and the weight of association paths. The degree of association is positively correlated with the number of association paths, negatively correlated with the length of association paths, and positively correlated with the weight of association paths. The weight of association paths is determined based on the weight of all edges in the association path. The weight of each edge in the metaphor knowledge graph is used to represent the strength of the corresponding metaphor mapping.
[0054] The solution provided in this disclosure comprehensively considers multiple factors, including the number, length, and weight of associated paths, to determine the degree of association. The number of paths reflects the frequency of metaphorical mapping between the source word set and the target word; the path length reflects the depth of reasoning between concepts, with shorter paths implying more direct metaphorical associations; and the edge weight quantifies the strength of each mapping relationship. Through multi-factor fusion, the true semantic association between the target word and the source word can be more accurately assessed, avoiding misjudgments caused by relying on a single indicator. This calculation method results in higher quality selected reference words, thereby further improving the accuracy of metaphor interpretation.
[0055] In some embodiments, the process of creating a metaphorical knowledge graph includes: Obtain multiple metaphor statements, each metaphor statement representing a metaphorical mapping from at least one source word to a first target word; For any metaphorical statement among multiple metaphorical statements, extract at least one metaphorical concept pair from the metaphorical statement. Each metaphorical concept pair includes a source word and a first target word. The metaphorical concept pair is used to indicate that the source word is used to represent the first target word. Each word in each metaphorical concept pair is an entity concept word or an abstract concept word. Create a node based on the concept word in at least one metaphorical concept pair among multiple metaphorical statements; Based on at least one metaphorical concept pair from multiple metaphorical statements, create first-class edges between the created nodes. The two nodes connected by each first-class edge correspond to a metaphorical concept pair. Each first-class edge is used to indicate that there is a direct metaphorical mapping relationship between the two nodes.
[0056] The solution provided in this disclosure extracts metaphorical concept pairs (source word - target word) from a large number of metaphorical statements and creates nodes and first-type edges (direct metaphorical mappings) accordingly, providing a high-quality structured knowledge foundation for subsequent metaphor understanding. This construction method fully utilizes explicit metaphorical expressions in the corpus, explicitly transforming implicit mapping relationships in natural language into a graph structure, enabling the graph to accurately reflect the semantic jump from the source domain to the target domain. Compared to general knowledge graphs, this solution is specifically designed for metaphor understanding needs, covering rich abstract concepts and their associations, thereby ensuring the effectiveness of multi-hop queries and the accuracy of understanding.
[0057] In some embodiments, the process of creating a metaphorical knowledge graph further includes at least one of the following: For any two first target words that share the same source word, create a second type of edge between the nodes corresponding to the two first target words; For any two source words that have the same first target word, create a second type of edge between the nodes corresponding to the two source words; In this context, each edge of type II represents an indirect metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
[0058] The solution provided in this disclosure adds a second type of edge to the direct metaphor mapping, used to connect different target words with the same source word, as well as different source words with the same target word. These second type of edges reflect the aggregation relationship in metaphor: the same source word can be mapped to multiple target words (e.g., "pig" can metaphorically represent "greed" and "laziness"), and the same target word can be metaphorically represented by multiple source words (e.g., "ruling class" can be metaphorically represented by "pig," "wolf," and "eagle"). By introducing indirect mapping edges, the connectivity of the graph is enhanced, enabling multi-hop queries to reason among richer concepts, thereby discovering deeper and more hidden metaphorical associations and improving the recall and accuracy of metaphor understanding.
[0059] In some embodiments, the process of creating a metaphorical knowledge graph further includes: For any created node, obtain the semantic similarity between the concept word corresponding to the node and the concept words corresponding to each other node. The other nodes are the nodes other than the node that has been created. If the semantic similarity between the concept word corresponding to a node and the concept word corresponding to any other node reaches a semantic threshold, then a third type of edge is created between the node and other nodes. The third type of edge is used to indicate that there is a semantic similarity association between the concept words corresponding to the two connected nodes.
[0060] The solution provided in this disclosure creates a third type of edge based on the semantic similarity between concept words, connecting nodes that are not directly connected in the graph but are semantically similar. For example, "greed" and "greed" are highly similar semantically. After establishing a connection through the third type of edge, starting from the source word "pig" along the metaphor edge, one can reach "greed," and then along the third type of edge, one can reach "greed," thereby expanding the coverage of target words. This method utilizes external semantic knowledge to enhance the reasoning ability of the graph, enabling it to be retrieved even if some abstract concepts do not co-occur directly with the source word in the original corpus, through semantic similarity propagation. This significantly improves the generalization ability and accuracy of metaphor understanding for new words and variant words.
[0061] In some embodiments, the method further includes: For any one of multiple source words, the similarity node corresponding to the source word is determined from the metaphor knowledge graph. The semantic similarity between the concept word represented by the similarity node and the source word reaches the semantic threshold. Starting with similar nodes, perform multi-hop queries in the metaphor knowledge graph according to a preset number of times to obtain multiple second target words. These multiple second target words include concept words represented by all nodes that start from the starting node and traverse no more than a preset number of edges. By processing the input information and multiple first target words corresponding to multiple source words using a large model, the metaphor interpretation text is obtained, including: By using a large model, the input information, multiple source words, multiple first target words, and multiple second target words are processed to obtain the metaphor interpretation text.
[0062] The solution provided in this disclosure expands the query by introducing similar nodes of the source word, further enriching the source of the target word. When the source word itself has limited association information in the graph (such as the word not being included in the graph or having a low degree), other semantically similar nodes can be found as alternative starting points for multi-hop queries, thereby obtaining a second target word that was not originally directly obtainable. For example, if the source word is "pig," and the graph only contains the "pig" node, after finding the "pig" node through semantic similarity, the rich metaphorical associations of "pig" can be used for reasoning. This approach effectively solves the problem of lexical sparsity and improves the robustness of the method to non-standard expressions or low-frequency words and the accuracy of metaphorical understanding.
[0063] In some embodiments, the preset number of times is dynamically determined based on the type of the starting node or the degree of the starting node in the metaphorical knowledge graph; Specifically, when the concept word represented by the starting node is an entity concept word, a first preset number of times is used; when the concept word represented by the starting node is an abstract concept word, a second preset number of times is used; the first preset number of times is greater than the second preset number of times. Alternatively, the preset number of occurrences is negatively correlated with the degree of the starting node in the metaphorical knowledge graph.
[0064] The solution provided in this disclosure implements a dynamic adaptive adjustment of the preset number of hops, determining the step size of multi-hop queries based on the type (entity / abstract) or degree of the starting node. Entity concept words typically have rich specific attributes and can maintain semantic coherence even after a large number of hops; therefore, a larger preset number of hops is used to uncover more metaphorical associations. Abstract concept words, on the other hand, are already at a higher semantic level, and excessively deep queries can easily introduce noise, so a smaller number of hops is used. Similarly, a high node degree indicates rich direct associations, and reducing the number of hops is sufficient to obtain enough target words, avoiding information redundancy; a low degree requires more hops to expand the context. This dynamic adjustment mechanism ensures both the sufficiency of query results and avoids invalid traversal, thus achieving the best balance between accuracy and efficiency.
[0065] In some embodiments, the method further includes: Based on the output metaphor interpretation text, an interpretation reasoning text is also output. The interpretation reasoning text describes the rationale for outputting the metaphor interpretation text.
[0066] The solution provided in this disclosure, while outputting the metaphor interpretation text, also outputs an interpretation reasoning text, which describes the rationale for outputting the interpretation (e.g., "Starting from the source word 'pig,' after two hop queries, we obtain 'greed' and 'exploiter,' therefore it is interpreted as a critique of the ruling class"). This interpretable output allows users or downstream systems to understand the reasoning process of the recognition result, facilitating manual review, error tracing, and model debugging. Simultaneously, the reasoning text can serve as feedback information to optimize the knowledge graph or query parameters, forming a closed-loop improvement.
[0067] The above Figure 2 The diagram shown is merely the basic process of this disclosure. The following section will further elaborate on the solution provided in this disclosure based on a specific implementation method. Figure 3 This is a flowchart illustrating another metaphorical video understanding enhancement method based on a metaphorical knowledge graph, according to an exemplary embodiment. Taking an electronic device provided as a server as an example, see [link to example]. Figure 3 The metaphor video understanding enhancement method based on metaphor knowledge graph includes the following steps.
[0068] In step 301, the server identifies the input information and obtains multiple source words, each source word representing something that appears explicitly in the input information.
[0069] In this embodiment of the disclosure, the input information can be any form of multimedia resource such as video, image, plain text, or audio, and this embodiment of the disclosure does not limit this. The server first preprocesses the input information: if it is video, frame sampling is performed and the physical entities or scenes (environment) existing in the screen are extracted using an object detection model; if it is text, word segmentation and named entity recognition are performed. Source words refer to the names of specific things that can be directly obtained from the input without any background knowledge and only through senses, such as "cat," "pig," "banquet table," "tuxedo," and "banquet." These source words are the "anchor points" for subsequent metaphorical reasoning. The essence of step 301 is to complete the mapping from the original input to symbolic concept words, providing a clear starting point for subsequent graph queries.
[0070] To improve the robustness of source word extraction, the server can employ various strategies. For example, for video input, in addition to object detection, optical character recognition can be used to extract text labels appearing in the scene, or speech recognition can be used to extract nouns from the narration. For text input, dependency parsing can be used to identify noun phrases in the subject and object, and pronouns and function words can be filtered out. Taking a video showing "a pig in a tuxedo feasting at a banquet, while a cat lurks under the table" as an example, the server, after object detection and tracking, stably outputs a set of source words: {"pig", "tuxedo", "banquet", "cat", "table"}. These words constitute the initial node candidates for subsequent queries. It is worth noting that if the same thing appears in multiple frames, the server will perform deduplication to ensure that each source word is retained only once, avoiding redundant queries.
[0071] In step 302, for any one of the multiple source words, the server determines the node where the source word is located from the metaphor knowledge graph. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node is used to represent an entity concept word or an abstract concept word. An entity concept word refers to a thing with a physical form, while an abstract concept word is a general expression of the commonalities, characteristics, or relationships of a class of things. Each edge is used to indicate that there is a metaphorical mapping relationship between the concept words represented by the two connected nodes.
[0072] In this embodiment, the metaphor knowledge graph is a pre-built graph structure specifically designed to store metaphorical mapping relationships between concept words. Each node represents a concept word, which is divided into entity concept words (such as "pig," "cat," and "table") and abstract concept words (such as "greed," "exploitation," and "class differentiation"). Each edge represents a metaphorical mapping from a source domain concept to a target domain concept; for example, an edge from "pig" to "greed" means "pig can metaphorically represent greed." The task of step 302 is to map each source word (such as "pig") obtained in step 301 to a corresponding node in the graph. If a source word has a corresponding node in the graph, that node is marked as the starting node for subsequent multi-hop queries; if it does not exist, the server can ignore the source word or attempt to find an approximate node through semantic expansion.
[0073] In some embodiments, each node in the metaphor knowledge graph stores a concept word text. In this case, the server uses exact string matching to locate the node. Specifically, for any one of multiple source words, the server traverses all nodes in the metaphor knowledge graph, performing string matching between the source word and the concept words stored in each node. If a matching node exists, that node is identified as the node containing the source word. That is, if a completely identical node exists (e.g., the source word "pig" matches the node "pig"), that node is identified as the node containing the source word. If the source word contains modifiers (e.g., "kitten"), the server can pre-normalize the source word (e.g., remove adjectives, convert to singular form) before matching; this embodiment does not limit this approach. The solution provided in this embodiment stores concept words in text form in the nodes of the metaphor knowledge graph and uses exact string matching to locate the node containing the source word. This method is simple to implement, has low computational cost, and can quickly complete the mapping from source words to nodes, making it particularly suitable for scenarios where the source words are standard vocabulary and the graph size is moderate. Because it uses exact matching, there is no semantic ambiguity, ensuring the determinacy of the query starting point, thereby improving the stability and accuracy of subsequent multi-hop queries. At the same time, this method requires no additional vector computation or model inference, significantly improving overall execution efficiency.
[0074] In other embodiments, each node in the metaphor knowledge graph is associated with a concept word vector, which is obtained by semantically embedding the concept word. For example, Word2Vec, BERT, or Sentence-BERT models are used to map concept words into dense vectors and store them in the nodes of the metaphor knowledge graph. In this case, the server uses semantic similarity matching to locate nodes. Specifically, for any one of multiple source words, the server converts the source word into a source word vector, then obtains the semantic similarity (cosine similarity or Euclidean distance) between the source word vector and the concept word vectors of each node, and finally selects at least one node whose similarity meets the condition as the node containing the source word. This can be done by selecting at least one node with a similarity greater than a similarity threshold as the node containing the source word, or by selecting the top Y nodes with the highest similarity, where Y is any positive integer. The advantage of this approach is that it can handle synonyms, near-synonyms, word form variations, or spelling differences between the source word and the graph vocabulary. For example, the source word "pig" can be matched with the node "pig," and the source word "dinner" can be matched with the node "banquet." Furthermore, even if the source word doesn't have an exact match in the graph, this method can still return the semantically closest node, thus improving query recall and robustness. For example, if the input source word is "suit," and the graph only has the node for "tuxedo," but the word vectors of the two have a high similarity (e.g., 0.85), the server will use the "tuxedo" node as the source word node, thus still triggering queries for metaphorical concepts such as "elite." Even if the source word doesn't appear precisely in the graph, metaphor queries can still be triggered through similar nodes, avoiding comprehension failures due to missing vocabulary. This method effectively expands the applicability of the approach and improves the accuracy of metaphor comprehension in real open text.
[0075] In practical applications, to ensure the accuracy and coverage of multi-hop queries, metaphorical knowledge graphs need to be constructed in advance using a systematic approach. To more clearly illustrate the origins of nodes and edges in the metaphorical knowledge graph, and to ensure the reliability of the metaphorical mapping relationships upon which subsequent multi-hop queries rely, a feasible construction method for this graph is further described below.
[0076] In some embodiments, the process of creating a metaphorical knowledge graph includes: a server acquiring multiple metaphorical statements. These metaphorical statements can be collected from corpora such as literary works, social media comments, and film and television scripts; the source of the metaphorical statements is not limited in this embodiment. Each metaphorical statement represents a metaphorical mapping from at least one source word to a first target word. For any one of the multiple metaphorical statements, the server performs dependency parsing and semantic role labeling on each metaphorical statement, extracting at least one metaphorical concept pair from the metaphorical statement. Each metaphorical concept pair includes a source word and a first target word. The metaphorical concept pair represents the use of a source word to represent the first target word, and each word in each metaphorical concept pair is an entity concept word or an abstract concept word. The process of extracting metaphorical concept pairs from the metaphorical statements can be implemented using a large model; this embodiment does not limit this. Then, the server creates nodes (i.e., one node corresponding to each unique concept word) based on the concept words in at least one metaphorical concept pair among the multiple metaphorical statements. Then, based on at least one metaphorical concept pair from multiple metaphorical statements, the server creates first-type edges between the created nodes. Each first-type edge connects two nodes whose corresponding concept words belong to a metaphorical concept pair. Each first-type edge is used to indicate that there is a direct metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
[0077] The solution provided in this disclosure extracts metaphorical concept pairs (source word - target word) from a large number of metaphorical statements and creates nodes and first-type edges (direct metaphorical mappings) accordingly, providing a high-quality structured knowledge foundation for subsequent metaphor understanding. This construction method fully utilizes explicit metaphorical expressions in the corpus, explicitly transforming implicit mapping relationships in natural language into a graph structure, enabling the graph to accurately reflect the semantic jump from the source domain to the target domain. Compared to general knowledge graphs, this solution is specifically designed for metaphor understanding needs, covering rich abstract concepts and their associations, thereby ensuring the effectiveness of multi-hop queries and the accuracy of metaphor understanding.
[0078] In some embodiments, during the creation of the metaphorical knowledge graph, the server can also create a second type of edge between the nodes corresponding to any two first target words that share the same source word; and create a second type of edge between the nodes corresponding to any two source words that share the same first target word. Each second type of edge represents an indirect metaphorical mapping relationship between the concept words corresponding to the two connected nodes, which helps to discover the implicit relationship between "same source target words" or "same target source words" in subsequent multi-hop queries.
[0079] The solution provided in this disclosure adds a second type of edge to the direct metaphor mapping, used to connect different target words with the same source word, as well as different source words with the same target word. These second type of edges reflect the aggregation relationship in metaphor: the same source word can be mapped to multiple target words (e.g., "pig" can metaphorically represent "greed" and "laziness"), and the same target word can be metaphorically represented by multiple source words (e.g., "ruling class" can be metaphorically represented by "pig," "wolf," and "eagle"). By introducing indirect mapping edges, the connectivity of the graph is enhanced, enabling multi-hop queries to reason among richer concepts, thereby discovering deeper and more hidden metaphorical associations and improving the recall and accuracy of metaphor understanding.
[0080] In other embodiments, during the creation of a metaphorical knowledge graph, the server can also obtain the semantic similarity between the concept word corresponding to any created node and the concept words corresponding to other nodes, where other nodes are all nodes other than the node itself. If the semantic similarity between the concept word corresponding to the node and the concept word corresponding to any other node reaches a semantic threshold, a third-type edge is created between the node and other nodes. The third-type edge indicates that there is a semantic similarity association between the concept words corresponding to the two connected nodes. That is, for the third-type edge: the server can use pre-trained word vectors to calculate the semantic similarity between the concept words of any two nodes. If the similarity reaches a preset semantic threshold (e.g., 0.8), a third-type edge is created between these two nodes, indicating that they are semantically similar. For example, "greed" and "greed," or "exploiter" and "oppressor" can be connected by a third-type edge. The third-type edge can associate semantically similar concepts that do not co-occur in the original corpus, thereby expanding the scope of the query.
[0081] The solution provided in this disclosure creates a third type of edge based on the semantic similarity between concept words, connecting nodes that are not directly connected in the graph but are semantically similar. For example, "greed" and "greed" are highly similar semantically. After establishing a connection through the third type of edge, starting from the source word "pig" along the metaphor edge, one can reach "greed," and then along the third type of edge, one can reach "greed," thereby expanding the coverage of target words. This method utilizes external semantic knowledge to enhance the reasoning ability of the graph, enabling it to be retrieved even if some abstract concepts do not co-occur directly with the source word in the original corpus, through semantic similarity propagation. This significantly improves the generalization ability and accuracy of metaphor understanding for new words and variant words.
[0082] The set of metaphorical statements obtained by the server is as follows: , which includes Each metaphorical statement. Then, the server can extract metaphorical concept pairs from each metaphorical statement using the following formula.
[0083] Formula 1:
[0084] in, For the set of extracted metaphorical concept pairs, For the first A metaphorical statement; For the first A metaphorical concept pair extracted from a metaphorical statement. The source word, or source domain concept, The first target word, or target domain concept, can be extracted. For example, from the metaphorical statement "He is a cunning fox," the source domain concept "fox" and the target domain concept "cunning person" can be extracted.
[0085] Then, the server uses all the extracted concepts as nodes in the graph, establishes the edges connecting the concepts, and forms a metaphorical knowledge graph, as shown in Formula 2 below:
[0086] in, Metaphorical knowledge graph; A set of nodes; Let it be the set of edges; Indicates two conceptual terms and Whether there is a relationship between them (direct metaphorical mapping relationship, indirect metaphorical mapping relationship, or semantic similarity relationship).
[0087] In step 303, the server takes the node where the source word is located as the starting node and performs multi-hop queries in the metaphor knowledge graph a preset number of times to obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than a preset number of edges.
[0088] In this embodiment, multi-hop query is the core operation of metaphorical reasoning. Given a starting node (e.g., "pig"), the server performs a breadth-first traversal along the edges in the graph (i.e., the metaphorical mapping direction), with each edge traversed being counted as a hop. A preset number of hops (e.g., 2 or 3) limits the maximum depth of the traversal. The query results collect all nodes reached from the starting node after 1 hop, 2 hops, ..., up to the preset number of hops (typically excluding the starting node itself). The conceptual words corresponding to these nodes are the first target words. These target words represent the abstract concepts that can be associated with the source words through a finite number of metaphorical reasoning steps, providing rich candidate material for subsequent interpretation.
[0089] The aforementioned preset number of times can be a fixed number configured manually, or it can be dynamically determined based on the type of the starting node or the degree of the starting node in the metaphorical knowledge graph. This disclosure does not limit this.
[0090] In some embodiments, a first preset number of queries is used when the concept word represented by the starting node is an entity concept word (such as "pig" or "cat"), and a second preset number of queries is used when the concept word represented by the starting node is an abstract concept word (such as "banquet"). The first preset number of queries is greater than the second preset number of queries. Entity concept words usually have rich specific attributes and can maintain semantic coherence even after a large number of hops, so a larger preset number of queries is used to uncover more metaphorical associations. Abstract concept words are already at a higher semantic level, and excessively deep queries can easily introduce noise, so a smaller number of queries is used.
[0091] In other embodiments, the preset number of hops is negatively correlated with the degree of the starting node in the metaphorical knowledge graph. The degree of the starting node (i.e., the number of edges directly connected to it) reflects the connectivity richness of the corresponding concept word in the metaphorical knowledge graph. The preset number of hops is negatively correlated with the degree; that is, the higher the degree, the smaller the preset number of hops, and vice versa. For example, the node "pig" has a degree of 20 (20 direct metaphorical associations), indicating it is very active. Only one or two hops are needed to obtain enough target words. Increasing the number of hops would lead to an explosion of results and a decrease in quality. In this case, reducing the number of hops is sufficient to obtain enough target words and avoid information redundancy. The node "horse" has a degree of only 2, requiring three or even four hops to expand its metaphorical context to obtain enough candidate concepts. This dynamic adjustment mechanism ensures both the sufficiency of query results and avoids invalid traversals, thus achieving an optimal balance between accuracy and efficiency.
[0092] The server can also pre-set a mapping table based on the statistical information of the graph before running the query. For example, degrees 0-5 correspond to a preset number of times (4), degrees 6-15 correspond to a preset number of times (3), degrees 16-30 correspond to a preset number of times (2), and degrees above 30 correspond to a preset number of times (1). Alternatively, a continuous function can be used: preset number of times = max(1, floor(a / (degree + 1))), where a is an empirical constant. This method makes the query process more intelligent and adaptable to the characteristics of different source words.
[0093] In addition to the multi-hop neighborhood query approach mentioned above, the server can also use graph neural networks for association reasoning. In this approach, the server first uses a graph neural network (GNN), such as a graph convolutional network or a graph attention network, to learn the representation of the metaphorical knowledge graph. Specifically, the server inputs the node features (which can be the initial word vectors of concept words) and edge structure information from the graph into the GNN. Through a multi-layer message passing mechanism, the final embedding vector of each node can incorporate information from its multi-hop neighbor nodes. After training, each concept word in the graph (such as "pig," "greed," and "ruler") obtains an embedding vector containing metaphorical associations. During the inference phase, the server uses the source word (or its corresponding visual features) extracted in step 301 as the query input, calculates the similarity between the query vector and all node embedding vectors output by the graph neural network, or directly outputs the most relevant metaphorical concept through a trained classification layer. The advantage of this approach is that it can learn high-order structural information in the graph end-to-end, automatically capture multi-hop metaphorical associations, and eliminates the need to manually specify a preset number of iterations. With sufficient training data and computing resources, this scheme can achieve higher accuracy than multi-hop queries. In practical applications, the server can select any of the above query strategies according to the specific scenario, or combine multiple strategies (e.g., first use vector retrieval for coarse screening, then use graph neural networks for fine ranking), and this disclosure does not limit this.
[0094] In step 304, for any first target word among multiple first target words corresponding to multiple source words, the server obtains the correlation degree between the first target word and the multiple source words. The correlation degree is used to represent the degree of correlation between the first target word and the multiple source words.
[0095] In this embodiment of the disclosure, after the multi-hop query in step 303, the server typically obtains multiple first target words (potentially as many as dozens). The "metaphorical association strength" between these target words and source words varies: some target words have direct edge connections with multiple source words, while others are only weakly associated with a single source word through a long path. The purpose of step 304 is to quantify the tightness between each first target word and the entire set of source words, so that subsequent steps can perform filtering. The association degree is a comprehensive numerical value; the higher it is, the more likely the target word is to truly express the metaphorical meaning that the input information intends to convey.
[0096] In some embodiments, the server calculates the relevance by analyzing association paths in a metaphorical knowledge graph. Specifically, for any first target word among multiple first target words corresponding to multiple source words, the server determines the association path between the first target word and the multiple source words from the metaphorical knowledge graph. The starting point of the association path is the node containing any of the multiple source words, and the ending point of the association path is the node containing the first target word. Each association path has three measurable attributes: the number of paths, the length of the path (i.e., the number of edges), and the weight of the path. The server determines the relevance between the first target word and the multiple source words based on at least one of the number of association paths, the length of the association paths, and the weight of the association paths.
[0097] The degree of relevance is positively correlated with the number of associated paths. If multiple source words can reach the same target word T through different paths, it means that T is the common metaphorical focus pointed to by these source words, and should therefore have a higher degree of relevance. For example, if both the source words "pig" and "tuxedo" have paths to "ruling class," then "ruling class" has two paths, which is a higher degree of relevance than a target word with only a single path (such as "greed"). The degree of relevance is negatively correlated with the length of the associated paths. The shorter the path, the more direct the metaphorical mapping, and the higher the degree of relevance. For example, jumping from "pig" to "greed" is more direct than jumping to "exploiter" (two steps), so "greed" should have a higher weight in terms of relevance. This is because shorter paths often represent more common and core metaphorical relationships. The degree of relevance is positively correlated with the weight of the associated paths. The weight of an associated path is determined based on the weight of all edges in the associated path. The weight of each edge in the metaphor knowledge graph is used to represent the strength of the corresponding metaphorical mapping. Each edge can be assigned a weight to represent the strength or frequency of that metaphorical mapping. For example, if the edge from "pig" to "greedy" appears 100 times in the corpus (multiple metaphorical statements), its weight is set to 0.9; while the edge from "pig" to "stupid" appears only 5 times, its weight is set to 0.3. Therefore, the target word reached through the edge with the higher weight contributes more to the relevance. The weight of a relevance path can be defined as the sum or product of the weights of all edges on the path (usually the product is used because continuous passage through strongly related edges is necessary to maintain semantic coherence).
[0098] This disclosure does not limit the method for obtaining edge weights. The server can count the number of times the same source word and target word co-occur in a large-scale metaphorical statement, normalize the count, and use the normalized result as the weight; or, it can use the vector cosine similarity between the source word and target word as the weight; or it can integrate manually labeled metaphor typicality scores. The server can pre-calculate and store the weight of each edge when constructing the graph, and directly retrieve it during querying.
[0099] The solution provided in this disclosure comprehensively considers multiple factors, including the number, length, and weight of associated paths, to determine the degree of association. The number of paths reflects the frequency of metaphorical mapping between the source word set and the target word; the path length reflects the depth of reasoning between concepts, with shorter paths implying more direct metaphorical associations; and the edge weight quantifies the strength of each mapping relationship. Through multi-factor fusion, the true semantic association between the target word and the source word can be more accurately assessed, avoiding misjudgments caused by relying on a single indicator. This calculation method results in higher quality selected reference words, thereby further improving the accuracy of metaphor interpretation.
[0100] For example, suppose the source word set is {"pig", "cat"}. The first target word "vulnerable group" is reached through two paths: ① "cat" 1 hop → "vulnerable group" (edge weight 0.8); ② "pig" 2 hops → "oppressed" → 1 hop → "vulnerable group" (first hop edge weight 0.5, second hop edge weight 0.6, path weight product 0.3). Then the number of paths is 2, the path lengths are 1 and 2 respectively, and the path weights are 0.8 and 0.3 respectively. The server can design a comprehensive formula, for example: relevance = Σ(path weight / path length). The calculation yields: 0.8 / 1 + 0.3 / 2 = 0.8 + 0.15 = 0.95. The other target word "greedy" has only one path ("pig" 1 hop, weight 0.9), and the relevance = 0.9 / 1 = 0.9. Therefore, "vulnerable group" has a higher relevance than "greedy" and will be prioritized in subsequent filtering. Through this multi-factor fusion calculation, the metaphorical relevance of each target word can be more accurately evaluated.
[0101] In step 305, the server selects at least one reference word from multiple first target words corresponding to multiple source words based on relevance. The relevance of each selected reference word is higher than the relevance of the remaining unselected first target words.
[0102] In this embodiment of the disclosure, after determining the relevance of each first target word, the server can select several of the most relevant target words as "reference words" for the final generation of the large model. This embodiment of the disclosure does not limit the selection method.
[0103] In some embodiments, the server can sort all first target words from highest to lowest relevance and select the top K as reference words. Here, K can be a fixed value (such as 10 or 20), or it can be dynamically adjusted according to the number of source words (such as K = number of source words × 3).
[0104] In other embodiments, the server can also set a relevance threshold (e.g., 0.6) and retain all target words with a relevance greater than this threshold as reference words. This approach can adaptively retain truly relevant concepts, avoiding the possibility that a fixed K might miss high-scoring items or include low-scoring items.
[0105] To ensure the stability of the filtering results, the server also uses both a threshold and a maximum quantity limit: first, target words with a relevance greater than the threshold are filtered out; if the number exceeds the preset upper limit (e.g., 30), only the maximum number of highest-scoring items are retained. The resulting set of reference words is of moderate size (usually 5-20), which retains the core metaphorical concepts while controlling the input length.
[0106] Following the example from step 304, assume the first target words and their relevance are: {"ruling class": 0.95, "vulnerable groups": 0.93, "greed": 0.90, "exploiters": 0.85, "poverty": 0.70, "laziness": 0.60, "dirty": 0.40}. With a server threshold of 0.7, the selected reference words are "ruling class," "vulnerable groups," "greed," "exploiters," and "poverty," a total of five. These words will be sent to the large model generation stage in step 306. Through this filtering, the server effectively eliminates noisy concepts such as "laziness" and "dirtyness" that have weak relevance to the source word set, improving the accuracy of subsequent generation.
[0107] In some embodiments, the server may determine the reference term using the following Formula 3.
[0108] Formula 3:
[0109] in, Represents the set of source words. From the video in the input information and title Extracted from, where extracted One source word, This indicates information splicing; This indicates that from the metaphor knowledge graph, from the source words Departure, at All nodes reachable within the next hop, i.e., multiple first target words. This indicates the number of association paths between the first target word and the source word set. This means retaining the top z most relevant target words as reference words; This refers to a set of reference words.
[0110] In step 306, the server processes the input information and at least one reference word using a large model to obtain the metaphor interpretation text.
[0111] In this embodiment, the large model possesses powerful multimodal understanding and text generation capabilities. The server combines the original input information (such as video keyframe sequences, original text, etc.) and the set of reference words selected in step 305 into the model's input according to a carefully designed prompt template. The prompt template typically includes a task description, a list of reference words, a reference to the original input, and output format requirements. Based on this information and combined with the semantic knowledge learned during its pre-training, the large model generates a natural language text that is used to interpret the metaphorical semantics in the input information. For example, for the aforementioned video of "pig, cat, banquet," with reference words {"ruling class," "vulnerable group," "greed," "exploiter," "poverty"}, the large model might output: "This video, through the anthropomorphism of animals, profoundly reveals the social stratification and unfair distribution of resources: the pig in the tuxedo represents the greedy ruling class, while the cat under the table symbolizes the marginalized vulnerable group." In this way, the metaphorical interpretation text contains both specific mapping relationships and forms a coherent semantic description, which can be directly used by downstream applications (such as content moderation and public opinion analysis).
[0112] In some embodiments, to enhance model interpretability, the server outputs an additional interpretation reasoning text in addition to the metaphor interpretation text. The interpretation reasoning text describes the rationale behind the output metaphor interpretation text. For example: "Starting from the source word 'pig,' hopping along the metaphor edge 1 leads to 'greed,' hopping 2 leads to 'exploiter'; combining the two, we infer that the video's theme is a critique of social class." The interpretation reasoning text can be generated by a large model (requiring the model to output the inference chain along with the interpretation) or automatically generated by the server based on the query path. This reasoning text allows users or moderators to understand the basis for the output metaphor interpretation text, facilitating error tracing and model optimization, and is particularly suitable for scenarios requiring interpretability, such as content moderation.
[0113] The server can generate large models using the following formula (Formula 4).
[0114]
[0115] in, This indicates the text's interpretive approach; This indicates a metaphorical interpretation of the text; Indicates a set of reference words; This refers to the video in the input information; This refers to the video title in the input information; This indicates information splicing.
[0116] In some embodiments, to further enhance the coverage and robustness of metaphor understanding, the server also introduces source word similarity node extension queries. Specifically, for any one of multiple source words, the server determines the similarity node corresponding to the source word from the metaphor knowledge graph. The semantic similarity between the concept word represented by the similar node and the source word reaches a semantic threshold. Then, the server uses the similar node as the starting node and performs multi-hop queries in the metaphor knowledge graph a preset number of times to obtain multiple second target words. The multiple second target words include concept words represented by all nodes starting from the starting node and traversing no more than a preset number of edges. The query method for the second target words is exactly the same as in step 303, and will not be repeated here. The second target words are essentially metaphorical concepts mined from synonyms or related words of the source words, which can make up for the lack of information of the original source words in the graph. Then, the server processes the input information, the multiple first target words corresponding to the multiple source words, and the multiple second target words through a large model to obtain the metaphor interpretation text. The server can also select suitable reference words from multiple primary target words and multiple secondary target words based on relevance, and then input the reference words into the large model to generate metaphor interpretation text. The selection method is the same as that in step 305, and will not be repeated here.
[0117] The solution provided in this disclosure expands the query by introducing similar nodes of the source word, further enriching the source of the target word. When the source word itself has limited association information in the graph (such as the word not being included in the graph or having a low degree), other semantically similar nodes can be found as alternative starting points for multi-hop queries, thereby obtaining a second target word that was originally unavailable directly. For example, if the source word is "pig," and the graph only contains the "pig" node, after finding the "pig" node through semantic similarity, the rich metaphorical associations of "pig" can be used for inference. This approach effectively solves the problem of lexical sparsity and improves the robustness of the method to non-standard expressions or low-frequency words and the accuracy of metaphorical understanding.
[0118] In addition to integrating reference words into prompt words in natural language form, embodiments of this disclosure may also employ other information injection methods to guide large models to generate metaphor interpretation text.
[0119] In some embodiments, reference words are input into the model as additional context tokens. In this approach, the server does not provide a natural language description of the reference words; instead, it directly appends the corresponding embedding vectors (e.g., concept word vectors obtained from a metaphorical knowledge graph) as additional context tokens to the beginning or end of the large model's input sequence. Specifically, the server uses a large model architecture that supports multimodal or scalable token input. For example, the server encodes the visual features of the input video into a set of visual tokens and uses the concept vectors corresponding to the reference words (such as "ruling class," "vulnerable group," and "greed") as another set of virtual tokens. The two sets of tokens are then concatenated and fed into the self-attention layer of the large model. When generating interpretive text, the model can directly utilize the semantic information of these concept vectors without needing to "describe" these concepts through natural language prompts. The advantage of this approach is that it avoids the ambiguity and length limitations of natural language prompts, allowing reference words to be injected into the model in a more precise vector form, while reducing the workload of prompt word engineering.
[0120] In other embodiments, a retrieval-augmented generation (RAG) framework is used. In this approach, the server does not directly input reference words into the large model; instead, it employs a RAG framework. Specifically, the server pre-builds a metaphor interpretation corpus containing a large amount of paired data of "metaphorical statements - metaphor interpretation texts." After the input information obtains reference words through steps 301-305, the server uses these reference words as queries to retrieve several metaphor interpretation examples from the corpus that are semantically most relevant to the reference words (e.g., retrieving interpretation text fragments related to "greed" and "ruling class"). Then, the server uses these retrieved examples as in-context examples, concatenating them with the original input information to form prompt words, which are then fed into the large model to guide the model in generating the metaphor interpretation text of the current input based on the format and style of the reference examples. The advantages of the RAG framework are twofold: firstly, it eliminates the need to explicitly list reference words, implicitly conveying metaphorical mapping patterns to the model through examples; secondly, by retrieving specific interpretation texts, the model can obtain richer expressions and more accurate semantic references, thereby improving the quality and diversity of the generated text. This approach is particularly suitable for scenarios requiring the generation of consistent and authentic metaphorical interpretations, such as literary reviews or social media content analysis. In practical deployments, the server can flexibly choose any of the above-mentioned reference information injection methods according to application requirements, or combine them with the original scheme; this disclosure does not limit this approach.
[0121] The aforementioned metaphorical interpretation texts reveal the metaphorical semantics hidden in the input information, which can be used for downstream tasks such as content moderation (e.g., identifying non-compliant or sensitive information from massive amounts of videos), public opinion analysis (e.g., identifying the public's metaphorical attitudes toward policies from massive amounts of comments), and intelligent recommendation (e.g., recommending more profound works based on users' preferences for metaphorical content).
[0122] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
[0123] Figure 4 This is a block diagram illustrating a metaphorical video understanding enhancement device based on a metaphorical knowledge graph, according to an exemplary embodiment. See also Figure 4 The metaphor video understanding enhancement device based on metaphor knowledge graph includes: The recognition unit 401 is configured to perform recognition of the input information to obtain multiple source words, each source word being used to represent the things that appear explicitly in the input information; The determining unit 402 is configured to perform the following operation: for any one of multiple source words, determine the node where the source word is located from the metaphor knowledge graph. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node is used to represent an entity concept word or an abstract concept word. An entity concept word refers to a thing with a physical form, while an abstract concept word is a general expression of the commonalities, characteristics, or relationships of a class of things. Each edge is used to indicate that there is a metaphorical mapping relationship between the concept words represented by the two connected nodes. The query unit 403 is configured to perform a multi-hop query in the metaphor knowledge graph starting from the node where the source word is located, and obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than a preset number of edges. The generation unit 404 is configured to process the input information and multiple first target words corresponding to multiple source words through a large model to obtain metaphor interpretation text, which is used to interpret the metaphorical semantics in the input information.
[0124] In some embodiments, each node in a metaphorical knowledge graph stores a concept word text; The determining unit 402 is configured to perform string matching between any one of the multiple source words and the concept words stored in each node for any one of the source words. If there is a node that matches successfully, then the node is determined as the node where the source word is located.
[0125] In some embodiments, each node in the metaphorical knowledge graph is associated with a concept word vector, which is obtained by semantic embedding of the concept word; The determining unit 402 is configured to perform the following operations for any one of multiple source words: convert the source word into a source word vector, obtain the semantic similarity between the source word vector and the concept word vector of each node, and select at least one node whose similarity satisfies the condition as the node where the source word is located.
[0126] In some embodiments, the generation unit 404 includes: The sub-unit is configured to perform an operation on any one of the multiple first target words corresponding to multiple source words, and obtain the correlation degree between the first target word and the multiple source words. The correlation degree is used to represent the degree of association between the first target word and the multiple source words. The filtering subunit is configured to perform a function based on relevance, filtering at least one reference word from multiple first target words corresponding to multiple source words, wherein the relevance of each filtered reference word is higher than the relevance of the remaining unfiltered first target words; The processing subunit is configured to perform processing on the input information and at least one reference word through a large model to obtain the metaphor interpretation text.
[0127] In some embodiments, the acquisition subunit is configured to perform the following: for any one of a plurality of first target words corresponding to a plurality of source words, determine the association path between the first target word and the plurality of source words from the metaphor knowledge graph. The starting point of the association path is the node where any one of the source words is located, and the ending point of the association path is the node where the first target word is located. Based on at least one of the number of association paths, the length of the association path, and the weight of the association path, determine the degree of association between the first target word and the plurality of source words. The degree of association is positively correlated with the number of association paths, negatively correlated with the length of the association path, and positively correlated with the weight of the association path. The weight of the association path is determined based on the weight of all edges in the association path. The weight of each edge in the metaphor knowledge graph is used to represent the strength of the corresponding metaphor mapping.
[0128] In some embodiments, the apparatus further includes: A creation unit is configured to retrieve multiple metaphorical statements, each representing a metaphorical mapping from at least one source word to a first target word. For any one of the multiple metaphorical statements, at least one metaphorical concept pair is extracted from the statement. Each metaphorical concept pair includes a source word and a first target word, representing that the source word is used to represent the first target word. Each word in each metaphorical concept pair is either an entity concept word or an abstract concept word. Based on the concept words in at least one metaphorical concept pair, nodes are created. Based on at least one metaphorical concept pair, first-type edges are created between the created nodes. The concept words corresponding to the two nodes connected by each first-type edge belong to a metaphorical concept pair, and each first-type edge represents a direct metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
[0129] In some embodiments, the creation unit is further configured to perform at least one of the following: For any two first target words that share the same source word, create a second type of edge between the nodes corresponding to the two first target words; For any two source words that have the same first target word, create a second type of edge between the nodes corresponding to the two source words; In this context, each edge of type II represents an indirect metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
[0130] In some embodiments, the creation unit is further configured to perform the following: for any created node, obtain the semantic similarity between the concept word corresponding to the node and the concept words corresponding to each other node, where other nodes are nodes other than the node itself among the created nodes; if the semantic similarity between the concept word corresponding to the node and the concept word corresponding to any other node reaches a semantic threshold, then create a third type of edge between the node and other nodes, whereby the third type of edge is used to indicate that there is a semantic similarity association between the concept words corresponding to the two connected nodes.
[0131] In some embodiments, the determining unit 402 is further configured to perform the following: for any one of a plurality of source words, determine the similar node corresponding to the source word from the metaphor knowledge graph, wherein the semantic similarity between the concept word represented by the similar node and the source word reaches a semantic threshold. The query unit 403 is also configured to perform a multi-hop query in the metaphor knowledge graph starting from a similar node and following a preset number of times to obtain multiple second target words. The multiple second target words include concept words represented by all nodes that start from the starting node and traverse no more than a preset number of edges. The generation unit 404 is configured to execute a large model to process the input information, multiple first target words and multiple second target words corresponding to multiple source words, and obtain metaphor interpretation text.
[0132] In some embodiments, the preset number of times is dynamically determined based on the type of the starting node or the degree of the starting node in the metaphorical knowledge graph; Specifically, when the concept word represented by the starting node is an entity concept word, a first preset number of times is used; when the concept word represented by the starting node is an abstract concept word, a second preset number of times is used; the first preset number of times is greater than the second preset number of times. Alternatively, the preset number of occurrences is negatively correlated with the degree of the starting node in the metaphorical knowledge graph.
[0133] In some embodiments, the generation unit 404 is further configured to output an interpretation text based on the output metaphor interpretation text, wherein the interpretation text describes the reasons for outputting the metaphor interpretation text.
[0134] This disclosure provides a metaphor video understanding enhancement device based on a metaphor knowledge graph. It directly extracts explicitly appearing things from the input information as source words, avoiding complex semantic parsing and reducing computational overhead. Then, using a pre-constructed metaphor knowledge graph, it performs a preset number of multi-hop queries, systematically acquiring all relevant concepts reachable from the source words within a finite number of steps. This achieves hierarchical reasoning from concrete things to abstract semantics, overcoming the shortcomings of large models that rely solely on implicit parameter knowledge and struggle with cross-domain multi-hop reasoning. Finally, the multiple target words obtained from the queries are input together with the original input into the large model, guiding the model to focus on the structured metaphor knowledge provided by the graph, effectively reducing illusionary output and improving the accuracy of metaphor interpretation. Compared to purely end-to-end methods, this solution integrates explicit knowledge retrieval with a large model, ensuring both the controllability of reasoning and improving processing efficiency.
[0135] It should be noted that the metaphor video understanding enhancement device based on metaphor knowledge graph provided in the above embodiments is only illustrated by the division of the above functional units when understanding metaphorical semantics in multimedia resources such as videos, texts, and images. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the metaphor video understanding enhancement device based on metaphor knowledge graph provided in the above embodiments and the metaphor video understanding enhancement method based on metaphor knowledge graph are based on the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0136] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0137] Figure 5This is a block diagram illustrating an electronic device 500 according to an exemplary embodiment. The electronic device 500 can vary significantly due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 501 and one or more memories 502. The memories 502 store at least one line of program code, which is loaded and executed by the processor 501 to implement the metaphorical video understanding enhancement method based on metaphorical knowledge graphs provided in the various method embodiments described above. Of course, the electronic device may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The electronic device 500 may also include other components for implementing device functions, which will not be elaborated here. The electronic device can be a server or a terminal; this disclosure does not limit this.
[0138] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 502 including instructions, which can be executed by a processor 501 of an electronic device 500 to complete the above-described metaphorical video understanding enhancement method based on a metaphorical knowledge graph. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0139] A computer program product includes a computer program / instructions that, when executed by a processor, implement the aforementioned metaphorical video understanding enhancement method based on metaphorical knowledge graphs.
[0140] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0141] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A metaphor video understanding enhancement method based on metaphor knowledge graph, characterized in that, The method includes: The input information is identified to obtain multiple source words, each source word representing the things that appear explicitly in the input information; For any one of the multiple source words, the node where the source word is located is determined from the metaphor knowledge graph. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node is used to represent an entity concept word or an abstract concept word. The entity concept word refers to a thing with a physical form. The abstract concept word is a general expression of the commonalities, characteristics or relationships of a class of things. Each edge is used to indicate that there is a metaphorical mapping relationship between the concept words represented by the two connected nodes. Starting from the node where the source word is located, a multi-hop query is performed on the metaphor knowledge graph a preset number of times to obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than the preset number of edges. The large model processes the input information and the multiple first target words corresponding to the multiple source words to obtain the metaphor interpretation text, which is used to interpret the metaphorical semantics in the input information.
2. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 1, characterized in that, Each node in the metaphorical knowledge graph stores a concept word text; The step of determining the node containing any one of the plurality of source words from the metaphorical knowledge graph includes: For any one of the multiple source words, perform string matching between the source word and the concept words stored in each node. If there is a node that matches successfully, then the node is determined as the node where the source word is located.
3. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 2, characterized in that, Each node in the metaphorical knowledge graph is associated with a concept word vector, which is obtained by semantic embedding of the concept word; The step of determining the node containing any one of the plurality of source words from the metaphorical knowledge graph includes: For any one of the multiple source words, the source word is converted into a source word vector, the semantic similarity between the source word vector and the concept word vector of each node is obtained, and at least one node whose similarity satisfies the condition is selected as the node where the source word is located.
4. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 1, characterized in that, The process of processing the input information and multiple first target words corresponding to the multiple source words using a large model to obtain metaphor interpretation text includes: For any first target word among the multiple first target words corresponding to the multiple source words, obtain the correlation degree between the first target word and the multiple source words, whereby the correlation degree is used to represent the degree of association between the first target word and the multiple source words; Based on relevance, at least one reference word is selected from the multiple first target words corresponding to the multiple source words, and the relevance of each selected reference word is higher than the relevance of the remaining unselected first target words; The metaphor interpretation text is obtained by processing the input information and the at least one reference word using a large model.
5. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 4, characterized in that, The step of obtaining the correlation degree between the first target word and the multiple source words for any one of the multiple first target words corresponding to the multiple source words includes: For any first target word among the multiple first target words corresponding to the multiple source words, the association path between the first target word and the multiple source words is determined from the metaphor knowledge graph. The starting point of the association path is the node where any source word among the multiple source words is located, and the ending point of the association path is the node where the first target word is located. The degree of association between the first target word and the plurality of source words is determined based on at least one of the number of association paths, the length of the association paths, and the weight of the association paths. The degree of association is positively correlated with the number of association paths, negatively correlated with the length of the association paths, and positively correlated with the weight of the association paths. The weight of the association path is determined based on the weight of all edges in the association path. The weight of each edge in the metaphor knowledge graph is used to represent the strength of the corresponding metaphor mapping.
6. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 1, characterized in that, The creation process of the metaphorical knowledge graph includes: Obtain multiple metaphor statements, each metaphor statement representing a metaphorical mapping from at least one source word to a first target word; For any one of the plurality of metaphorical statements, at least one metaphorical concept pair is extracted from the metaphorical statement. Each metaphorical concept pair includes a source word and a first target word. The metaphorical concept pair is used to indicate that the source word is used to represent the first target word. Each word in each metaphorical concept pair is an entity concept word or an abstract concept word. Create a node based on the concept word in at least one metaphorical concept pair among the multiple metaphorical statements; Based on at least one metaphorical concept pair among the plurality of metaphorical statements, a first type of edge is created between the created nodes. The concept words corresponding to the two nodes connected by each first type of edge belong to a metaphorical concept pair. Each first type of edge is used to indicate that there is a direct metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
7. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 6, characterized in that, The process of creating the metaphorical knowledge graph also includes at least one of the following: For any two first target words that have the same source word, create a second type of edge between the nodes corresponding to the two first target words; For any two source words that have the same first target word, create the second type of edge between the nodes corresponding to the two source words; In this context, each edge of type II represents an indirect metaphorical mapping relationship between the concept words corresponding to the two connected nodes.
8. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 6, characterized in that, The creation process of the metaphorical knowledge graph also includes: For any created node, obtain the semantic similarity between the concept word corresponding to the node and the concept words corresponding to each other node, wherein the other nodes are the nodes other than the created node. If the semantic similarity between the concept word corresponding to the node and the concept word corresponding to any other node reaches a semantic threshold, then a third type of edge is created between the node and the other node. The third type of edge is used to indicate that there is a semantic similarity association between the concept words corresponding to the two connected nodes.
9. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 1, characterized in that, The method further includes: For any one of the multiple source words, a similar node corresponding to the source word is determined from the metaphor knowledge graph, and the semantic similarity between the concept word represented by the similar node and the source word reaches a semantic threshold. Using the similar nodes as starting nodes, multi-hop queries are performed on the metaphor knowledge graph a preset number of times to obtain multiple second target words. The multiple second target words include concept words represented by all nodes that start from the starting node and traverse no more than the preset number of edges. The process of processing the input information and multiple first target words corresponding to the multiple source words using a large model to obtain metaphor interpretation text includes: The large model processes the input information, the multiple first target words corresponding to the multiple source words, and the multiple second target words to obtain the metaphor interpretation text.
10. The metaphor video understanding enhancement method based on metaphor knowledge graph according to any one of claims 1 to 9, characterized in that, The preset number of times is dynamically determined based on the type of the starting node or the degree of the starting node in the metaphorical knowledge graph. Wherein, when the concept word represented by the starting node is an entity concept word, a first preset number of times is used, and when the concept word represented by the starting node is an abstract concept word, a second preset number of times is used, wherein the first preset number of times is greater than the second preset number of times; Alternatively, the preset number of times is negatively correlated with the degree of the starting node in the metaphorical knowledge graph.
11. The metaphor video understanding enhancement method based on metaphor knowledge graph according to claim 1, characterized in that, The method further includes: Based on the output of the metaphor interpretation text, an interpretation reason text is also output, which describes the reasons for outputting the metaphor interpretation text.
12. A metaphor video understanding enhancement device based on a metaphor knowledge graph, characterized in that, The device includes: The recognition unit is configured to perform recognition of input information to obtain multiple source words, each source word representing something that appears explicitly in the input information; The determining unit is configured to perform the following operation for any one of the plurality of source words: determine the node where the source word is located from the metaphor knowledge graph. The metaphor knowledge graph includes multiple nodes and multiple edges. Each node is used to represent an entity concept word or an abstract concept word. The entity concept word refers to a thing with a physical form. The abstract concept word is a general expression of the commonalities, characteristics, or relationships of a class of things. Each edge is used to indicate that there is a metaphorical mapping relationship between the concept words represented by the two connected nodes. The query unit is configured to perform a multi-hop query in the metaphor knowledge graph, starting from the node where the source word is located, and to obtain multiple first target words. The multiple first target words include concept words represented by all nodes that start from the starting node and traverse no more than the preset number of edges. The generation unit is configured to perform processing on the input information and multiple first target words corresponding to the multiple source words through a large model to obtain metaphor interpretation text, which is used to interpret the metaphorical semantics in the input information.
13. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the metaphor video understanding enhancement method based on metaphor knowledge graph as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the metaphor video understanding enhancement method based on metaphor knowledge graph as described in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the metaphor video understanding enhancement method based on metaphor knowledge graph as described in any one of claims 1 to 11.