Logical reasoning method and equipment based on knowledge enhancement and capsule network collaboration, and medium

By building a public knowledge database and a graph network database, combined with the capsule network collaborative large language model, the problem of pre-trained language model integrating external knowledge and understanding complex logical structures in logical reasoning tasks is solved, and more efficient logical reasoning capabilities and accuracy are achieved.

CN120278262AActive Publication Date: 2025-07-08SOUTH CHINA UNIV OF TECH

Patent Information

Application Number
CN202510243955.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-07-08
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

Existing pre-trained language models are difficult to effectively integrate external knowledge and understand complex logical structures in logical reasoning tasks, resulting in insufficient performance in complex logical reasoning tasks.

Method used

By constructing a local database of public knowledge and graph network database, the capsule network collaborative large language model is used for logical reasoning, including vectorized knowledge retrieval, dual-graph construction and dynamic routing algorithms, to capture complex associations between nodes and avoid excessive smoothing of node features.

Benefits of technology

It significantly improves the logical reasoning ability and efficiency of the model, can more accurately capture the logical association and structural information in the text, and improves the accuracy and efficiency of logical reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278262A_ABST
    Figure CN120278262A_ABST
Patent Text Reader

Abstract

The invention discloses a logical reasoning method and device based on knowledge enhancement and capsule network collaboration and a medium. The method comprises the steps that a public knowledge local database is constructed, and a vectorization database and a graph network database are deployed locally; performing preliminary retrieval according to the logical reasoning text, and expanding a retrieval range based on a graph network; inputting the logic text, the problem and the related background knowledge into a large language model to generate a logic reasoning link, and integrating all contents to obtain a logic reasoning text after knowledge enhancement; constructing a semantic graph and a connection graph according to the logical reasoning text after knowledge enhancement; the semantic graph and the connection graph are respectively imported into a capsule network, and a dynamic routing algorithm is applied to promote low-level capsules to be progressive to high-level capsules; respectively executing an average fusion operation on the plurality of high-level capsules in the double images to extract global features of the images; global features of the double graphs are integrated through a fusion strategy, final knowledge text features are formed, and final options are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a logical reasoning method, device and medium based on the collaboration of knowledge enhancement and capsule network. Background Art

[0002] In recent years, with the continuous development of question-answering data sets, the ability of machine reading comprehension (MRC) has become increasingly important. With the emergence of data sets such as SQuAD and DROP, the MRC field has made further progress. Logical reasoning is an important task in MRC. The emergence of data sets such as ReClor and LogiQA has promoted the development of logical reasoning tasks. This emphasizes that the model should not only have the ability to understand, but also be able to integrate external knowledge to support the logical reasoning process, while understanding the logical structure in the text, such as context statements, assumptions and potential fallacies. Although pre-trained language models (PLMs) perform well in capturing context semantic information, they have difficulties in dynamically integrating external knowledge and understanding the inherent logical structure and complex relationships in the context, which limits their performance in complex logical reasoning tasks. Summary of the Invention

[0003] To solve at least one of the technical problems existing in the prior art to a certain extent, an object of the present invention is to provide a logical reasoning method, device and medium based on the collaboration of knowledge enhancement and capsule network.

[0004] The first technical solution adopted by the present invention is:

[0005] A logical reasoning method based on the collaboration of knowledge enhancement and capsule network, comprising the following steps:

[0006] S1. Construct a local database of public knowledge, and deploy a vector database and a graph network database locally;

[0007] S2. Perform a preliminary retrieval according to the logical reasoning text, and expand the retrieval scope based on the graph network;

[0008] S3. Input the logical text, questions and relevant background knowledge into a large language model to generate a logical reasoning link, and integrate all the content to obtain a knowledge-enhanced logical reasoning text;

[0009] S4. According to the knowledge-enhanced logical reasoning text, construct a semantic graph and a connection graph to accurately capture the logical associations and structural information in the text, so as to improve the analysis accuracy;

[0010] S5. Import the semantic graph and the connection graph into the capsule network respectively, and use the dynamic routing algorithm to promote the progression from low-level capsules to high-level capsules, so as to accurately capture the complex associations between nodes, effectively avoid the over-smoothing phenomenon of node features in traditional GCNs, improve node recognition, and provide richer and more accurate feature representations for subsequent logical reasoning;

[0011] S6. Perform average fusion operations on multiple high-level capsules in the two graphs respectively to extract the global features of the graphs; subsequently, integrate the global features of the two graphs through a fusion strategy to form the final knowledge text features and obtain the final options.

[0012] Further, the construction of the local open knowledge database, deploying a vectorized database and a graph network database locally, includes:

[0013] Extract relevant background knowledge, logical rules, and common logical fallacies from existing open source datasets;

[0014] Use a large model to extract key knowledge from the collected text; where the key knowledge includes coarse-grained summary knowledge and entity metadata;

[0015] Perform vectorization processing on the coarse-grained summary knowledge and store the vectorized knowledge in the vectorized database for subsequent knowledge retrieval;

[0016] Construct a graph network based on the extracted entity metadata; where the nodes in the graph network represent each knowledge document, and the knowledge document contains knowledge entities;

[0017] Extract the co-occurrence relationship of knowledge documents from the graph network, construct the edges from knowledge document to knowledge document, and the edges represent the association relationship between entities and knowledge documents.

[0018] Further, the preliminary retrieval based on the logical reasoning text and the expansion of the retrieval scope based on the graph network includes:

[0019] Perform preliminary retrieval by calculating the similarity between the logical reasoning text vector and the local knowledge document vector, and identify the knowledge document most relevant to the query;

[0020] Based on the constructed graph network, expand the retrieval scope: by analyzing the co-occurrence relationship and relevance between the initially retrieved knowledge text and other knowledge, identify and include more relevant background knowledge documents to ensure that the expanded document set provides more comprehensive background context information.

[0021] Further, the input of the logical text, questions, and relevant background knowledge into a large language model to generate a logical reasoning link and integrate all the content to obtain a knowledge-enhanced logical reasoning text includes:

[0022] Merge the retrieved relevant knowledge documents, the logical reasoning text, and the question to obtain the overall large paragraph I i :

[0023] I i = concat(d 扩展 , C i , Q i )

[0024] Wherein, d 扩展 represents the knowledge document retrieved by extended retrieval, C i represents the logical reasoning text, and Q i represents the question;

[0025] Input the merged overall large paragraph I i into the large language model to generate the logical thinking and reasoning link G i Place this thinking link G i behind the overall large paragraph I i to form the final enhanced logical reasoning text R i :

[0026] R i = concat(C i , Q i , G i )

[0027] Furthermore, construct a semantic graph and a connection graph based on the knowledge-enhanced logical reasoning text, including:

[0028] By combining the original logical text C, question Q, thinking and reasoning path G, and option answer O, construct the structure of [CLS]C[SEP]Q[SEP]G||O[SEP], input this structure into the large language model, map the [CLS] feature vectors in the obtained multiple alternative answers through a linear layer, and then obtain the probability distribution of each alternative answer through the Softmax activation function, specifically expressed as: P(O1, O2, O3, O4|CQG); finally, use the cross-entropy loss function to perform gradient backpropagation on the model to optimize and update the model parameters;

[0029] First, the text constructs a semantic graph and a connection graph based on direct conjunctions and punctuation marks: divide the context into nodes, and use the associations between the nodes as edges to construct the architecture of the graph. Such associations are divided into direct and indirect conjunctions, and each node represents a text paragraph connected by logical associations; adopt conjunctions and punctuation marks as two types of connection links to construct the semantic graph and the connection graph accordingly;

[0030] Input the structural framework of [CLS]C[SEP]Q[SEP]G|O[SEP] into a pre-trained large language model to obtain the initial feature vector V of each node i , and the specific input form is as follows:

[0031] input = [CLS] + C + [SEP] + Q + [SEP] + G + [SEP] + O + [SEP]

[0032] V i = RoBERTa_Large(input)

[0033] In the constructed connection graph and semantic graph, each node contains multiple Tokens, and the representation of the Tokens is as follows: The feature vector corresponding to the Token is:

[0034] Among them, the feature vector corresponding to each node not only includes the semantic content of the node itself but also incorporates the position embedding information of the node in the text structure.

[0035] Furthermore, in order to maintain the sequential relationship of the nodes in the text context, the position embedding technique is introduced: the position embedding technique aims to add position features to the vector representation of each node, enabling the model to effectively identify the relative positions of different nodes in the text. The specific expression is:

[0036]

[0037] n i = s i + PE(s i )

[0038] In the formula, n i represents the node feature after adding the original node and the position encoding. For each enhanced logical reasoning text R i , and the graph g i corresponding to a specific option O i , there is the following relationship:

[0039] g i = (N i , E i )

[0040] In the formula, E i represents the edge connecting the nodes N i , and E i includes the edges of conjunctions and punctuation marks; the set N i is defined as: N i : {n1, n2,..., m k}}.

[0041] Furthermore, the semantic graph and the connection graph are respectively imported into the capsule network, and the dynamic routing algorithm is used to promote the progression from low-level capsules to high-level capsules to accurately capture the complex associations between nodes, including:

[0042] The node features of the semantic graph and the connection graph are respectively input into the capsule network. Through the process of iteratively performing dynamic routing multiple times, which is a process of low-level capsules approaching high-level capsules, K short-term information vector features are obtained, where K is a preset hyperparameter, and the short-term local text information in each graph is extracted;

[0043] Among them, the dynamic routing mechanism in the capsule network adaptively adjusts the information transmission path according to the input.

[0044] Furthermore, the average fusion operation is respectively performed on multiple high-level capsules in the two graphs to extract the global features of the graphs; subsequently, the global features of the two graphs are integrated through a fusion strategy to form the final knowledge text features and obtain the final options, including:

[0045] By averaging and summing the features of all high-level capsules in each graph the global vector representation of the two graphs is obtained

[0046] An interactive attention component is adopted to connect the feature vectors of each option and the question with in order to more effectively grasp the logical text information and logical structure;

[0047] An interactive attention component is used to measure the similarity between the global graph vector representation and each option and the question, and this similarity is regarded as a weight and assigned to the vector representation;

[0048] After completing the interactive attention mechanism component, in order to improve the performance of the model, the feature vector option representation V option and question representation V' question are connected and input into a fully connected neural network to obtain the final feature representation;

[0049] The probability distribution of each candidate option is calculated according to the feature representation, and the candidate option corresponding to the maximum probability is selected as the prediction result.

[0050] The second technical solution adopted by the present invention is:

[0051] An electronic device, comprising a processor and a memory, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a logical reasoning method based on the collaboration of knowledge enhancement and capsule network as described above.

[0052] The third technical solution adopted by the present invention is:

[0053] A computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a logical reasoning method based on the collaboration of knowledge enhancement and capsule network as described above.

[0054] The fourth technical solution adopted by the present invention is:

[0055] A computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.

[0056] Compared with the prior art, the beneficial effects of the present invention include:

[0057] (1) By means of the vectorized knowledge base and the graph network retrieval technology, the present invention retrieves local knowledge related to the original logical reasoning text, combines the knowledge and inputs it into the large model to generate a logical thinking reasoning link, and combines the reasoning link with the original text to construct a knowledge-enhanced input representation. This mechanism solves the problem that traditional methods lack explicit logical support and significantly improves the reasoning ability of the model.

[0058] (2) The present invention proposes a dual-graph construction method for logical reasoning in machine reading comprehension. This method uses conjunctions and punctuation marks as two types of edges to construct a semantic graph and a connection graph. In this way, the model can more accurately capture the logical associations and structural information in the text.

[0059] (3) The present invention proposes a method based on the Capsule Network to replace the traditional Graph Convolutional Network (GCN) for extracting node features on a graph. Through the dynamic routing algorithm, the Capsule Network can capture the complex relationships between nodes, avoid the problem of over-smoothing of node features in traditional GCN, and enhance the distinguishability of nodes. Compared with GCN, the Capsule Network can better capture the spatial relationships and hierarchical structures of nodes in the graph, enabling more accurate extraction and expression of the features of important nodes. The node feature vectors extracted by the Capsule Network will be used to construct the overall features of the graph, improving the performance of graph reasoning. This method can not only avoid the limitations of GCN but also improve the reasoning ability and efficiency of the model. Especially when dealing with tasks with complex logic and multiple relationships, the Capsule Network shows significant advantages. The dynamic routing mechanism in the Capsule Network can adaptively adjust the information transmission path according to the input. In the graph structure, it can better capture the hierarchical and dependency relationships between nodes. For example, in a semantic graph, the dynamic routing can automatically adjust the weight of information transmission according to the semantic association strength between nodes, enabling information to spread more effectively between nodes and enhancing the model's perception ability of the graph structure.

[0060] (4) The method of the present invention not only improves the accuracy of logical reasoning but also enhances the efficiency and scalability of the model. This method not only provides an interpretable reasoning path for machine reading comprehension, but its network design also enables it to have the potential to be implemented in real-time reasoning scenarios, providing an important reference for the innovation of model architectures for knowledge-intensive NLP tasks. Brief Description of the Drawings

[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following introduces the accompanying drawings related to the technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings below are only for conveniently and clearly presenting some embodiments of the technical solutions in the present invention. For those skilled in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0062] Figure 1 It is a flowchart of the steps of a logical reasoning method based on the collaboration of knowledge enhancement and capsule network in an embodiment of the present invention;

[0063] Figure 2 It is a structure diagram of the local knowledge base and the graph network knowledge base in an embodiment of the present invention.

[0064] Figure 3 It is a network structure diagram of the method based on knowledge enhancement and capsule network in an embodiment of the present invention. Detailed Embodiments

[0065] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where like or similar reference numerals denote like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only for explaining the present invention, and should not be construed as a limitation to the present invention. For the step numbers in the following embodiments, they are only set for the convenience of explanation and illustration, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0066] In the description of the present invention, it should be understood that for the orientation description, such as the orientation or positional relationship indicated by up, down, front, back, left, right, etc. is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present invention.

[0067] In the description of the present invention, the meaning of several is one or more, the meaning of multiple is two or more, greater than, less than, exceeding, etc. are understood as not including the recited number, and above, below, within, etc. are understood as including the recited number. If there is a description of first and second, it is only for the purpose of distinguishing technical features and should not be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features.

[0068] In the description of the present invention, unless otherwise clearly defined, words such as setting, installing, connecting, etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meaning of the above words in the present invention in combination with the specific content of the technical solution.

[0069] To address the deficiencies of PLMs, the present invention proposes a logical reasoning algorithm based on the collaboration of knowledge enhancement and capsule networks. Specifically, for each logical reasoning problem, first, the merged text of the original logical text and the problem is retrieved and matched with the local knowledge base to retrieve relevant background knowledge. After merging the two, it is input to the large language model to generate an auxiliary logical thinking reasoning chain. This reasoning chain, together with the original logical text and the problem, is spliced to form an enhanced logical reasoning text. This innovative design enables the model to explicitly obtain potential premise assumptions and implicit logical relationships, providing information support for subsequent graph structure modeling.

[0070] On this basis, previous methods constructed graphs based on entities in the context, extracted relationships from the text, and used graph convolutional networks (GCNs) to aggregate messages. However, there is still much room for improvement in these methods. For example, overusing GCNs can lead to node smoothing, making the features of nodes tend to be similar and losing their discriminative features. Therefore, in logical reasoning, more attention should be paid to methods for extracting node features in more effective graph structures. Compared with previous methods, the present invention uses a capsule network for graph node feature extraction, improving the performance of the model and significantly enhancing the completeness of semantic representation through knowledge retrieval enhancement.

[0071] Embodiment 1

[0072] As Figure 1 shown, this embodiment provides a logical reasoning method based on the collaboration of knowledge enhancement and capsule network, including the following steps:

[0073] S1. Construct a local database of public knowledge, and deploy a vectorized database and a graph network database locally.

[0074] Specifically, construct a local database of public knowledge, obtain relevant information from two major public logical reasoning datasets, Wikipedia and CommonsenseQA, and then deploy a vectorized database and a graphical knowledge base locally to ensure the rigorous construction of the knowledge system.

[0075] S2. Conduct a preliminary retrieval based on the logical reasoning text, and expand the retrieval scope based on the graph network.

[0076] Specifically, input the logical paragraph and the question into the link, and through vectorized matching and graph network node co-occurrence technology, achieve multi-channel recall retrieval of local relevant knowledge to enrich the relevant background knowledge system of logical questions.

[0077] S3. Input the logical text, the question, and the relevant background knowledge into a large language model to generate a logical reasoning link, and integrate all the content to obtain a knowledge-enhanced logical reasoning text.

[0078] In this embodiment, relevant knowledge is retrieved through the local knowledge base and the graph network, and an open-source large language model is used to conduct preliminary logical reasoning on logical reasoning questions and original logical texts. Then, the reasoning information is used as enhanced information, merged with the original logical text and the question, and then input into the training language model.

[0079] S4. According to the knowledge-enhanced logical reasoning text, construct a semantic graph and a connection graph to accurately capture the logical associations and structural information in the text, so as to improve the analysis accuracy.

[0080] In this embodiment, the knowledge-enhanced logical text is used to construct a bipartite graph (semantic graph and connection graph) by using conjunctions and punctuation marks as two types of edges.

[0081] S5. Import the semantic graph and the connection graph bipartite graph into the capsule network respectively, and use the dynamic routing algorithm to promote the progression from low-level capsules to high-level capsules, so as to accurately capture the complex associations between nodes, effectively avoid the over-smoothing phenomenon of node features in traditional GCNs, improve the node recognition rate, and provide richer and more accurate feature representations for subsequent logical reasoning.

[0082] This embodiment proposes a method based on the Capsule Network to replace the traditional Graph Convolutional Network (GCN) for extracting node features on a graph. The capsule network can capture the complex relationships between nodes through the dynamic routing algorithm, avoid the over-smoothing problem of node features in traditional GCNs, and enhance the node recognition rate.

[0083] S6. Perform an average fusion operation on multiple high-level capsules in the bipartite graph respectively to extract the global features of the graph; subsequently, integrate the global features of the bipartite graph through a fusion strategy to form the final knowledge text features and obtain the final option.

[0084] The above method will be explained in detail below in conjunction with the accompanying drawings and specific embodiments.

[0085] (1) Preservation of public knowledge and construction of knowledge base

[0086] To improve the performance of logical reasoning tasks, this embodiment first saves relevant public knowledge from two publicly available logical reasoning datasets, Wikipedia and CommonsenseQA. These knowledge includes but is not limited to background knowledge, logical rules, common logical fallacies, etc. Specifically, the following types of public knowledge are stored locally:

[0087] Background knowledge: including domain knowledge, common sense, historical events, etc. related to logical reasoning problems. These knowledge can help the model better understand the problem background and provide more accurate reasoning results.

[0088] Logical rules: including basic logical reasoning rules, such as deductive reasoning, inductive reasoning, analogical reasoning, etc. These rules are the basis of logical reasoning and help the model make correct judgments when dealing with complex logical problems.

[0089] Common logical fallacies: including common logical errors and fallacies, such as concept substitution, causal inversion, overgeneralization, etc. These knowledge can help the model identify and avoid logical errors and improve the accuracy of reasoning.

[0090] As an implementation, see Figure 2 ,Figure 2 Schematic diagram for constructing the detailed structure of the vectorized knowledge base, and the construction method is as follows:

[0091] 1) Extract relevant background knowledge, logical rules, and common logical fallacies from the following open-source datasets:

[0092] Wikipedia: Wikipedia is a widely used knowledge base that contains a large amount of background knowledge and common sense.

[0093] CommonsenseQA: A dataset containing common sense questions and answers, which helps the model understand common logical relationships and background knowledge.

[0094] 2) Knowledge extraction: Use a large model (such as ChatGLM2-6b) to extract key knowledge from the collected text. The specific extraction strategies include:

[0095] Coarse-grained document-level summarization: Use ChatGLM2-6b to generate a summary of the knowledge document to help quickly understand the main content of the knowledge document and retrieve relevant knowledge. Specifically, as shown in formula (1):

[0096] s k = ChatGLM2_6b(d k ) (1)

[0097] Fine-grained entity-level dialogue generation: Generate query-answer pairs in the knowledge document through RefGPT to provide more detailed entity information.

[0098] (q {k0} ,a {k0} ),(q {k1} ,a {k1} ),… = RefGPT(d k )

[0099] 3) Knowledge vectorization: Perform vectorization processing on the coarse-grained summary knowledge. Given the summary, obtain the embedding vector through a sentence embedding model (such as BGE and SGPT), specifically as shown in formula (2):

[0100]

[0101] 4) Construction of the vectorized knowledge base: Store the vectorized knowledge in a vector database for subsequent knowledge retrieval.

[0102] 5) Construction of the graph-structured knowledge base: Among them, the nodes represent knowledge entities, and the edges represent the association relationships between entities. The specific steps are as follows:

[0103] Graph Structure Construction: Use ChatGLM2-6b to extract the metadata of key entities from these documents, and construct an initial graph structure from the extracted entity metadata, where the nodes represent each knowledge document, and the knowledge document contains knowledge entities (such as historical event names, people, etc.)

[0104] Edge Construction between Documents: Extract the co-occurrence relationships of knowledge documents from the initial graph structure, construct the edges from knowledge documents to knowledge documents, and the edges represent the association relationships between entities and knowledge documents, such as the co-occurring entities between two documents. Then, further associate the documents according to events and people to ensure a more comprehensive relationship between knowledge documents, thus constructing an inter-document graph network. As shown in formulas (3)-(4):

[0105] E={(d i ,d j )|d i ,d j ∈D,i≠j} (3)

[0106] G=(D,E) (4)

[0107] (2) Vectorized Knowledge Retrieval

[0108] The vectorized database is an important part of this framework. To retrieve knowledge from the vectorized database, the original logical reasoning text will be input into the same sentence embedding model to obtain the embedding vectors. The background knowledge document with the highest cosine similarity between the original logical text and the local knowledge base is obtained as the external knowledge to assist the large language model in generating responses. As shown in formula (5):

[0109]

[0110] (3) Multi-way Recall Knowledge Retrieval

[0111] In this embodiment, by calculating the similarity between the logical reasoning text vector and the local knowledge document vector, preliminary retrieval is performed to identify the knowledge document most relevant to the query. This process ensures the precise capture of the logical reasoning text and the problem intention, making the preliminary retrieval results highly consistent with the requirements of the logical reasoning text. To further enrich the retrieval results, this embodiment uses the previously constructed graph structure to expand the retrieval scope. By analyzing the co-occurrence relationships and associations between the initially retrieved logical text and other knowledge, the system can identify and incorporate more relevant background knowledge documents to ensure that the expanded document set provides more comprehensive background context information. As shown in formula (6):

[0112] d 扩展 =d * ∪{(d j |(d i ,d j )∈E,di ∈d *} (6)

[0113] (4) Logic reasoning enhancement and text merging

[0114] After preliminary retrieval and graph network expansion, the retrieved relevant knowledge documents, the original logical text and the question are used for logical reasoning and answering. The specific steps are as follows:

[0115] Text merging: The retrieved relevant knowledge documents, the logical reasoning text and the question are merged to obtain the overall large paragraph I i .

[0116] I i = concat(d 扩展 , C i , Q i ) (7)

[0117] Large model generates thinking and reasoning links: The merged overall large paragraph I i , is input into the open-source large model ChatGLM2-6b to generate the thinking and reasoning link G i , and this thinking link is placed behind the overall large paragraph I i to form the final enhanced logical reasoning text R i . As shown in formulas (8)-(9):

[0118] G i = ChatGLM2_6b(I i ) (8)

[0119] R i = concat(C i , Q i , G i ,) (9)

[0120] (5) Dual-graph construction of the enhanced logical reasoning text

[0121] The core of this embodiment focuses on solving the multiple-choice question challenges in the field of logical reasoning. Specifically, in this embodiment, the original logical text (C), question (Q), thinking reasoning path (G) and option answers (O) are combined to construct the structure of [CLS]C[SEP]Q[SEP]G||O[SEP], and this structure is input into the trained language model PLMs. Then, the [CLS] feature vectors of the obtained multiple alternative answers are mapped through a linear layer, and the probability distribution of each alternative answer is obtained through the Softmax activation function, which is specifically expressed as: P(O1,O2,O3,O4|CQG). Finally, the cross-entropy loss function is used to perform the gradient backpropagation operation on the model to optimize and update the model parameters. For the detailed process, please refer to formulas (10)-(11).

[0122] L=-∑logP (o true |C,Q,G) (10)

[0123]

[0124] where O ij represents option j in the i-th original logical text, C i , Q i , G i and O i represent the original logical text, question, thinking reasoning link and option feature representation respectively.

[0125] On the encoding layer, the model of this embodiment constructs a semantic graph and a connection graph based on direct conjunctions and punctuation. The context is segmented into nodes, and the associations between them are used as edges to construct the graph structure. Such associations are divided into direct and indirect conjunctions. Each node represents a text paragraph connected by logical associations, making it more like a logical graph rather than a sequential structure.

[0126] The displayed connections convey various relationships including causality, contrast, condition, etc. When identifying these direct connections, the model of this embodiment adopts a set of established conjunction keywords and further strengthens them by means of the root extraction technology of NLTK. This means can stably identify various inflections and ensure the accurate detection of logical relationships. By using these conjunctions to distinguish different nodes, the model can better learn the logical structure and associations in the text. Specifically, these conjunctions connect sentences and enhance the clarity of the logical relationships between sentences.

[0127] Implicit connections are hidden within continuous text segments separated by punctuation marks such as the comma ",". Identifying these delimiters is of utmost importance as they serve as markers to distinguish different text paragraphs. Recognizing them helps the model accurately grasp the boundaries between sentences, thereby enhancing its overall context parsing ability. For each sample, only the context and option content are segmented, excluding the question part as it lacks the necessary logical connotations. Conjunctions and punctuation marks are adopted as two types of connection bonds to construct semantic graphs and connection graphs accordingly. The ingenious use of conjunctions and punctuation marks constructs a more complex structural system capable of capturing deep logical relationships that go beyond simple adjacency. For example, causal conjunctions such as "because" and "therefore" can create connection bonds representing causal relationships, while contrastive conjunctions such as "but" and "however" can capture opposing ideas. These logical connection bonds play a crucial role in deeply understanding the underlying meaning of the text, far beyond what simple sequential links can achieve.

[0128] In the model encoding layer constructed in this embodiment, first, the original feature embeddings of each node are obtained. To this end, the structural framework of [CLS]C[SEP]Q[SEP]G|O[SEP] is input into the pre-trained language model (PLMs) to obtain the initial feature vectors of each node. In this embodiment, RoBERTa_Large is selected as the core encoder. The specific input forms are detailed in formulas (12)-(13):

[0129] input=[CLS]+C+[SEP]+Q+[SEP]+G+[SEP]+O+[SEP] (12)

[0130] V i =RoBERTa_Large(input) (13)

[0131] In the constructed connection graph and semantic graph, each node contains multiple Tokens, and the representation of the Tokens is as follows: The feature vector corresponding to the Token is: To better utilize the vector representation of the initial nodes, in this embodiment, the S Token vector representations included in the initial nodes are added together, as shown in formula (14):

[0132]

[0133] The feature vector corresponding to each node not only encompasses the semantic content of the node itself but also incorporates the position embedding information of the node in the text structure. To maintain the sequential relationship of nodes in the text context, this embodiment adopts the position embedding technique. This technique aims to add position features to the vector representation of each node, enabling the model to effectively identify the relative positions of different nodes within the text. The specific expression can be seen in formulas (15)-(16).

[0134]

[0135] n i = s i + PE(s i ) (16)

[0136] Among them, n i represents the node feature after adding the original node and the position encoding. For each enhanced logical reasoning text R i , the graph g i corresponding to a specific option O i is as shown in formula (17):

[0137] g i = (N i , E i ) (17)

[0138] Among them, E i represents the edge connecting nodes N i , and E i includes the edges of conjunctions and punctuation marks. The set N i can be defined as: N i : {n1, n2,..., m k}.

[0139] (6) Capsule Network Construction and Node Feature Extraction

[0140] After completing the encoding task of the nodes, it enters the reasoning stage of the dual-graph construction. Traditional logical deduction models tend to use graph convolutional neural networks to extract the feature information of nodes. This method integrates the feature vectors of adjacent nodes into the central node through the mapping of the spatial dimension, thereby enhancing the semantic expression ability of the central node. However, as the number of graph convolution layers increases, the features between nodes tend to be homogenized, that is, the over-smoothing phenomenon occurs, which reduces the distinguishability of node features and weakens the analysis efficiency of the model. The traditional graph convolutional neural network method can be seen in formula (18) as follows:

[0141]

[0142] Among them, is the adjacency matrix, representing the connection relationship between nodes in the constructed graph structure. Degree matrix It is used to standardize the adjacency matrix, aiming to weaken the interference effect of abnormal values. After the construction of the adjacency matrix is completed, the model will start to process the features of each node. This processing process includes performing a linear mapping on the feature vectors using a trainable weight matrix and then adopting a Sigmoid activation function to achieve the transformation and adjustment of the features, as shown in formula (19):

[0143] α k =σ(W α (n k )+b α ) (19)

[0144] After information propagation, the graph convolutional network will fuse the initial features of the nodes with the features after message passing, as shown in formula (20):

[0145]

[0146] where represents the node feature representation after passing through the graph convolutional network. The above calculation process is the specific implementation method of the traditional graph convolutional network. However, through research, it is found that the traditional graph convolutional method has problems such as over-smoothing of node features and poor effects.

[0147] Therefore, further, after obtaining the node features of the logic graph and the structure graph, such as Figure 3 , by inputting the node features of the two graphs into the capsule network respectively, through the process of iterative dynamic routing multiple times, K short-term information vector features are obtained through the process of low-level capsules approaching high-level capsules. K is a preset hyperparameter, and the short-term local text information in each graph is extracted. First, map each node feature to m candidate capsule vectors, as shown in formula (21):

[0148] u k / m =W m (21)

[0149] Then, determine the capsule weights through multiple routing iterations. The detailed iteration process is shown in formulas (22)-(25):

[0150]

[0151] where m is the number of capsules set, W m is the double mapping matrix, is the coupling coefficient, is the short-term market information feature after passing through the non-linear activation function. t is the number of iterations. The coupling coefficient is optimized through 3 iterations, so that the high-level capsule Adaptive focusing on local short-term key information to achieve fine-grained temporal focusing. This enables the model to better reflect the clustering and extraction of important node features from knowledge-enhanced logical reasoning texts.

[0152] Capsule networks represent nodes through capsules, and each capsule can learn the attributes of nodes in different aspects, such as the features of nodes in different semantic dimensions. Taking the sentence nodes in a text graph as an example, different capsules can respectively learn information such as the semantic theme, grammatical structure, and sentiment tendency of sentences, thus representing nodes more comprehensively and accurately.

[0153] The dynamic routing mechanism in capsule networks can adaptively adjust the information transmission path according to the input. In a graph structure, it can better capture the hierarchical and dependency relationships between nodes. For example, in a semantic graph, dynamic routing can automatically adjust the information transmission weights according to the semantic association strength between nodes, enabling information to be more effectively propagated between nodes and enhancing the model's perception ability of the graph structure. Capsule networks transmit information through operations between vectors, which can better retain the feature information of nodes.

[0154] During the classification and feature fusion process, capsule networks can perform more detailed processing based on the attribute information of nodes, avoiding over-aggregation and loss of information, and thus providing richer and more accurate feature representations for subsequent logical reasoning.

[0155] Finally, by averaging and summing the features of all high-level capsules in each graph a global vector representation of the dual graph is obtained

[0156] (7) Answer prediction

[0157] In logical reasoning tasks, the original logical text and questions constitute the core information, which is crucial for the model to accurately grasp the meaning of the text. In this embodiment, an interactive attention component is used to connect the feature vectors of the original logical text and questions in order to more effectively master the logical text information and logical structure. For specific details, see Formulas (26)-(28):

[0158] Q = V option / question ·W Q (26)

[0159] K = V k W k (27)

[0160] V = V k W v (28)

[0161] where, W Q, W k , W v is a learnable parameter matrix, and after mapping, three matrices Q, K, and V can be obtained.

[0162] Subsequently, this embodiment adopts an interactive attention component to measure the similarity between the global graph vector representation and each option and question, and regards this similarity as a weight and assigns it to the vector representation. This move aims to enable the vector representation to absorb the information of the original logical text and questions more fully, and thus perform the logical reasoning task more effectively. For the detailed process, see Formulas (29)-(32).

[0163]

[0164] Att(Q, K, V) = softmax(A) · V (30)

[0165]

[0166] After completing the interactive attention mechanism component, in order to improve the performance of the model, the feature vectors each option representation V option and the question representation V' question are concatenated, and then input into a fully connected neural network to obtain the final feature representation. The probability distribution of each candidate is calculated by applying the softmax function. Finally, the candidate corresponding to the maximum probability is selected as the prediction result. The specific process is shown in Formula (33):

[0167]

[0168] In summary, the method of the present invention has at least the following advantages compared with the prior art:

[0169] 1) Preservation of public knowledge and knowledge base construction: Background knowledge, logical rules, and common logical fallacies are extracted from public datasets to construct a rich knowledge base. Specifically, open-source datasets such as Wikipedia and CommonsenseQA are used to ensure the comprehensiveness and diversity of knowledge.

[0170] 2) Local knowledge base construction and retrieval: By constructing a local vectorized database and a graph network database, the retrieval of knowledge such as the background of logical reasoning texts is improved. The retrieved relevant knowledge documents and the original logical text are input into an open-source large language model to generate preliminary logical reasoning ideas, and these answers are used as enhanced information and merged with the original logic and relevant knowledge documents to form enhanced logical reasoning texts.

[0171] 3) Capsule Network Construction and Node Feature Extraction: A method based on Capsule Network is proposed to replace the traditional Graph Convolutional Network (GCN) for extracting node features on graphs. Through the dynamic routing algorithm, the Capsule Network can capture the complex relationships between nodes, avoid the problem of over-smoothing of node features in traditional GCN, and enhance the distinguishability of nodes. Compared with GCN, the Capsule Network can better capture the spatial relationships and hierarchical structures of nodes in the graph, enabling more accurate extraction and expression of the features of important nodes. The node feature vectors extracted by the Capsule Network will be used to construct the overall features of the graph, improving the performance of graph reasoning. This method can not only avoid the limitations of GCN but also improve the reasoning ability and efficiency of the model. Especially when dealing with tasks with complex logic and multiple relationships, the Capsule Network shows significant advantages. The dynamic routing mechanism in the Capsule Network can adaptively adjust the information transmission path according to the input. In the graph structure, it can better capture the hierarchical and dependency relationships between nodes. For example, in a semantic graph, the dynamic routing can automatically adjust the weight of information transmission according to the semantic association strength between nodes, enabling information to spread more effectively between nodes and enhancing the model's perception ability of the graph structure.

[0172] 4) This method not only improves the accuracy of logical reasoning but also enhances the efficiency and scalability of the model. This method not only provides an interpretable reasoning path for machine reading comprehension, but its network design also makes it have the potential to be implemented in real-time reasoning scenarios, providing an important reference for the innovation of model architectures for knowledge-intensive NLP tasks.

[0173] Embodiment 2

[0174] The embodiment of the present invention also provides an electronic device, which includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement Figure 1 a logical reasoning method based on the collaboration of knowledge enhancement and capsule network as shown.

[0175] It can be understood that the memory may include a Random Access Memory (RAM), or may also include a Read-Only Memory. Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area. Among them, the program storage area can store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above various method embodiments, etc.; the data storage area can store data created according to the use of the server, etc.

[0176] The processor may include one or more processing cores. The processor uses various interfaces and circuits to connect various parts within the entire server. By running or executing the instructions, programs, code sets or instruction sets stored in the memory, and by calling the data stored in the memory, it executes various functions of the server and processes data. Optionally, the processor can be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor can integrate a combination of one or several of a Central Processing Unit (CPU) and a modem, etc. Among them, the CPU mainly processes the operating system and application programs, etc.; the modem is used to process wireless communications. It can be understood that the above modem may not be integrated into the processor and can be implemented separately by a single chip.

[0177] Since this electronic device is an electronic device corresponding to a logic reasoning method based on the collaboration of knowledge enhancement and capsule network in an embodiment of the present invention, and the principle of how this electronic device solves problems is similar to that of this method, the implementation of this electronic device can refer to the implementation process of the above method embodiment, and the repeated parts will not be elaborated.

[0178] Embodiment 3

[0179] An embodiment of the present invention further provides a computer-readable storage medium, in which at least one instruction, at least one segment of program, code set or instruction set is stored, and the at least one instruction, the at least one segment of program, the code set or instruction set is loaded and executed by a processor to implement Figure 1 a logic reasoning method based on the collaboration of knowledge enhancement and capsule network as shown.

[0180] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.

[0181] Since this storage medium is the storage medium corresponding to a logical reasoning method based on the collaboration of knowledge enhancement and capsule network in the embodiments of the present invention, and the principle of solving problems by this storage medium is similar to that of this method, the implementation of this storage medium can refer to the implementation process of the above method embodiments, and the repeated parts will not be described again.

[0182] Embodiment 4

[0183] In some possible implementation manners, various aspects of the method in the embodiments of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to cause the computer device to execute the steps of a logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to various exemplary implementation manners described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment can be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0184] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following techniques known in the art or a combination thereof can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.

[0185] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0186] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable those of ordinary skill in the art to understand the content of the present invention and implement it accordingly, and cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the essence of the content of the present invention should be covered within the protection scope of the present invention.

Claims

1. A logical reasoning method based on the collaboration of knowledge enhancement and capsule network, characterized in that It includes the following steps: Construct a local database of public knowledge, and deploy a vectorized database and a graph network database locally; Conduct a preliminary retrieval based on the logical reasoning text, and expand the retrieval scope based on the graph network; Input the logical text, questions, and relevant background knowledge into a large language model to generate a logical reasoning link, and integrate all the content to obtain a knowledge-enhanced logical reasoning text; Construct a semantic graph and a connection graph according to the knowledge-enhanced logical reasoning text; Import the semantic graph and the connection graph into a capsule network respectively, and use a dynamic routing algorithm to prompt the progression from low-level capsules to high-level capsules to accurately capture the complex associations between nodes; Perform an average fusion operation on multiple high-level capsules in the dual graphs respectively to extract the global features of the graphs; Integrate the global features of the dual graphs through a fusion strategy to form the final knowledge text features and obtain the final options.

2. The logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 1, wherein The construction of the local database of public knowledge and the local deployment of the vectorized database and the graph network database include: Extract relevant background knowledge, logical rules, and common logical fallacies from existing open-source datasets; Use a large model to extract key knowledge from the collected text; the key knowledge includes coarse-grained summary knowledge and entity metadata; Perform vectorization processing on the coarse-grained summary knowledge, and store the vectorized knowledge in the vectorized database for subsequent knowledge retrieval; Construct a graph network according to the extracted entity metadata; wherein, the nodes in the graph network represent each knowledge document, and the knowledge document contains knowledge entities; Extract the co-occurrence relationship of knowledge documents from the graph network, construct an edge from a knowledge document to a knowledge document, and the edge represents the association relationship between an entity and a knowledge document.

3. A logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 1, characterized in that The preliminary retrieval based on the logical reasoning text and the expansion of the retrieval scope based on the graph network include: Conduct a preliminary retrieval by calculating the similarity between the logical reasoning text vector and the local knowledge document vector, and identify the knowledge document most relevant to the query; Based on the constructed graph network, expand the retrieval scope: by analyzing the co-occurrence relationship and relevance between the initially retrieved knowledge text and other knowledge, identify and incorporate more relevant background knowledge documents to ensure that the expanded document set provides more comprehensive background context information.

4. A logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 1, characterized in that, The input of the logical text, questions, and relevant background knowledge into a large language model to generate a logical reasoning link, and the integration of all the content to obtain a knowledge-enhanced logical reasoning text include: Merge the retrieved relevant knowledge documents, the logical reasoning text, and the question to obtain the overall large paragraph I i : I i = concat(d 扩展 , C i , Q i ) where d 扩展 represents the knowledge document for extended retrieval, C i represents the logical reasoning text, Q i represents the question; Input the merged overall large paragraph I i into a large language model to generate a logical thinking and reasoning chain G i Then, place this thinking chain G i behind the overall large paragraph I ii to form the final enhanced logical reasoning text R i : R i = concat(C i , Q i , G i ).

5. A logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 1, characterized in that The construction of a semantic graph and a connection graph according to the knowledge-enhanced logical reasoning text includes: By combining the original logical text C, question Q, thinking and reasoning path G with the option answers O, a structure of [CLS]C[SEP]Q[SEP]G||O[SEP] is constructed. This structure is input into the large language model, and the [CLS] feature vectors among the multiple alternative answers obtained are subjected to mapping processing via a linear layer, and then the probability distribution of each alternative answer is obtained through the Softmax activation function, which is specifically expressed as: P(O1, O2, O3, O4|CQG); Finally, the cross-entropy loss function is used to perform gradient backpropagation on the model to optimize and update the model parameters. The large language model constructs a semantic graph and a connection graph based on direct conjunctions and punctuation: the context is segmented into nodes, and the associations existing between the nodes are used as edges to construct the architecture of the graph. Such associations are classified into direct and indirect conjunctions, and each node represents a text passage connected by logical associations; conjunctions and punctuation marks are adopted as two types of connection bonds to construct the semantic graph and the connection graph accordingly. Input the structural framework of [CLS]C[SEP]Q[SEP]G|O[SEP] into a pre-trained large language model to obtain the initial feature vector V of each node i , and the specific input form is as follows: input = [CLS] + C + [SEP] + Q + [SEP] + G + [SEP] + O + [SEP] V i = RoBERTa_Large(input) In the constructed connection graph and semantic graph, each node contains multiple Tokens, and the representation of the Token is as follows: T i : The feature vector corresponding to the Token is: V i : Among them, the feature vector corresponding to each node not only includes the semantic content of the node itself, but also incorporates the position embedding information of the node in the text structure.

6. The logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 5, characterized in that In order to maintain the sequential relationship of the nodes in the text context, the position embedding technology is introduced. The position embedding technology aims to add position features to the vector representation of each node, so that the model can effectively identify the relative positions of different nodes in the text. The specific expression is: n i = s i + PE(s i ) where n i represents the node features after adding the original nodes and positional encodings. For each enhanced logical reasoning text R i , and a specific option O i -corresponding graph g i , there is the following relationship: g i = (N i , E i ) where, E i represents the edge connecting node N i ; E i is the edge including conjunctions and punctuation marks; the set N i is defined as: N i : {n1, n2, …, m k}}.

7. A logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 1, characterized in that The semantic graph and the connection graph are respectively imported into the capsule network, and the dynamic routing algorithm is used to promote the progression from low-level capsules to high-level capsules to accurately capture the complex associations between nodes, including: The node features of the semantic graph and the connection graph are respectively input into the capsule network. Through the process of iteratively performing dynamic routing multiple times, the process of approximating high-level capsules by low-level capsules, K short-term information vector features are obtained, where K is a preset hyperparameter, and the short-term local text information in each graph is extracted. Among them, the dynamic routing mechanism in the capsule network adaptively adjusts the information transmission path according to the input.

8. A logical reasoning method based on the collaboration of knowledge enhancement and capsule network according to claim 1, characterized in that The average fusion operation is respectively performed on multiple high-level capsules in the dual graphs to extract the global features of the graphs. Subsequently, the global features of the dual graphs are integrated through a fusion strategy to form the final knowledge text features and obtain the final options, including: By averaging and summing the features of all high-level capsules in each graph a global vector representation of the dual graph is obtained An interactive attention component is adopted to connect the original question and the feature vectors of each option with so as to more effectively grasp the logical text information and logical structure; An interactive attention component is used to measure the similarity between the global graph vector representation and each option and question, and this similarity is regarded as a weight and assigned to the vector representation; After completing the interactive attention mechanism component, in order to improve the performance of the model, the feature vector option representation V option and the question representation V' question are concatenated and input into a fully connected neural network to obtain the final feature representation; The probability distribution of each candidate is calculated according to the feature representation, and the candidate corresponding to the maximum probability is selected as the prediction result.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, At least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Description knowledge graph, text graph coding model and graph-based pre-training method

    CN117252256A

  • Machine reading understanding method based on cross-graph collaborative modeling

    CN117764085A

  • Text classification method and device based on semantics, computer equipment and storage medium

    CN117874234A

  • System and method for knowledge graph construction using capsule neural network

    US20220180065A1

Cited By

  • Intelligent film and television media asset retrieval method and system based on image enhancement generation

    CN121524374A

  • Job question type intelligent editing system based on large language model

    CN121638178A