Question and answer vector query method based on sum product network model and semantic disambiguation
By using a sum-product network model and semantic disambiguation technology, a causal association knowledge graph was constructed, which solved the problems of causal relationship modeling and polysemous term recognition in the field of elderly health management, and improved the intelligence and query accuracy of the question-answering system.
Patent Information
- Application Number
- CN202510929231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-21
Smart Images

Figure CN120822607A_ABST
Abstract
Description
Technical Field
[0001] The present invention involves technologies such as large language models, sum-product network models, semantic disambiguation, and knowledge graphs. Specifically, it relates to a high-quality causal association knowledge graph question-answering vector query optimization method based on the sum-product network model and semantic disambiguation. Background Art
[0002] With the accelerating aging of society, health management issues for the elderly are becoming increasingly prominent. Factors such as the coexistence of multiple diseases, the difficulty of managing chronic diseases, and limited access to health knowledge have created a strong demand for personalized, intelligent health services among the elderly. Simultaneously, the rapid development of large language models has created unprecedented opportunities for intelligent question-answering systems, particularly in the healthcare sector. Natural language processing capabilities can improve the efficiency of user-system interactions and provide health management services more tailored to the needs of the elderly. However, existing systems still face numerous bottlenecks when addressing elderly health management scenarios, such as ambiguous semantic understanding, limited knowledge reasoning capabilities, and a lack of logical consistency and causal directionality in returned information.
[0003] As a key vehicle for knowledge engineering, knowledge graphs possess strong structural representation capabilities and have been widely used in medical question-and-answer systems. They effectively integrate dispersed medical information resources, construct systematic knowledge systems, and support intelligent question-and-answer, recommendation, and reasoning services. However, traditional knowledge graphs are limited in their ability to model causal relationships, particularly when dealing with unstructured data with complex structures and ambiguous semantics. This makes it difficult to accurately depict the causal chains between diseases and causes, and interventions and outcomes in elderly health management. Furthermore, health management terminology contains numerous ambiguous terms and highly context-dependent descriptions. Conventional entity recognition and relationship extraction methods struggle to accurately identify semantic boundaries, impacting the retrieval accuracy and reasoning performance of question-and-answer systems. Furthermore, vector retrieval, a core component of large-scale question-and-answer systems, relies heavily on its semantic representation capabilities to directly influence the relevance and accuracy of query results. However, current mainstream vector query methods generally lack semantic disambiguation mechanisms for polysemous terms, resulting in inaccurate matching between query intent and entities in the knowledge graph, which in turn impacts the quality of the final answer. Faced with problems such as difficulty in extracting causal knowledge, weak question-answer vector matching, and high ambiguity in polysemous terms in the field of elderly health management, there is an urgent need for a comprehensive solution that combines causal modeling capabilities, semantic disambiguation mechanisms, and semantic vector optimization to improve the intelligence level and practical value of question-answering systems.
[0004] In response to the above problems, this patent proposes a high-quality causal association knowledge graph question-answering vector query optimization method based on the sum-product network model and semantic disambiguation. This method aims to utilize the efficient expression ability and fast reasoning ability of the sum-product network model, and by integrating structured and unstructured data, to mine the causal relationship and correlation characteristics between multidimensional data of elderly health management, and construct a knowledge graph with logical consistency and causal directionality, to provide domain-specific knowledge support for further enhancing the knowledge reasoning ability of the large language model, and to improve the intelligent performance of the model in the elderly health management question-answering system; combined with the semantic relevance and disambiguation technology of the knowledge graph, it effectively identifies the polysemy and contextual relationship of health management-related terms, optimizes the accuracy and relevance of question-answering vector queries, and provides more accurate semantic query support for enhancing the knowledge reasoning ability of the large language model in elderly health management, and improves the response quality of the intelligent question-answering system. Summary of the Invention
[0005] The technical problem solved by the present invention is: utilizing the efficient expression and rapid reasoning capabilities of the sum-product network model to mine the causal relationships and correlation features among multidimensional data on elderly health management, and construct a knowledge graph with logical consistency and causal directionality; combining the semantic relevance and disambiguation technology of the knowledge graph to effectively identify the ambiguity and contextual relationships of health management-related terms, and optimize the accuracy and relevance of question-answer vector queries.
[0006] The technical solution of the present invention is: the present invention proposes a high-quality causal association knowledge graph question-answering vector query optimization method based on the sum-product network model and semantic disambiguation. This method first obtains high-quality structured and unstructured data focusing on elderly health management based on multiple data acquisition methods such as web crawlers through data cleaning and filtering. Subsequently, causal knowledge extraction and structuring are performed based on the data set: 1) Structured causal knowledge extraction: design specific prompt words, use a large model to extract causal knowledge from the cleaned data, perform structured extraction of disease knowledge, clearly identify entities, relationships and their attributes, and organize this result into structured JSON data. 2) Causal knowledge graph construction: extract causal relationship type labels based on the JSON data generated above. Use the original statistical frequency information, after normalization, as the initial weight of the causal edge. Initialize the sum-product network (SPN) structure, use the network to perform parameter learning training through the back propagation algorithm, and update the weight values. After the training is completed, the log-likelihood difference is used to measure the contribution of different types of information to the disease. The learned weight values are used to update and finally determine the weights of the causal edges in the knowledge graph to construct a knowledge graph with causal directionality. At the same time, the knowledge graph triples containing entities and relationships are embedded in a continuous vector space to achieve alignment between the entity vector and the text vector space. 3) Query semantic understanding and optimization: In order to improve the semantic accuracy of the query, a corpus covering the polysemy of elderly health management terms is constructed. After feature processing of the corpus, a multi-layer bidirectional RNN combined with Softmax is used for classification, and dropout is introduced for regularization to complete the model semantic disambiguation training. When performing a query, the user's query statement is first processed by this semantic disambiguation model to eliminate ambiguity. Then, the knowledge graph is used to perform semantic expansion and enhancement on the disambiguated query to generate the corresponding query vector. Finally, the query vector is mapped to the relevant entities in the knowledge graph, and the retrieval results are post-processed and rearranged using features such as the path length of the knowledge graph to output the final candidate answer. The specific steps are as follows:
[0007] (1) Crawl authoritative websites to obtain structured and unstructured data on elderly health management and store the data. The steps include:
[0008] a. Crawl the websites of Wenyao.com (www.xywy.com), Chinese Medical Journals Network (www.medjournals.cn), and Wanfang Data Knowledge Service Platform (www.wanfangdata.com.cn) to obtain structured and unstructured data on elderly health management, including authoritative data on professional knowledge of elderly diseases, common knowledge issues, health care and wellness, preventive care, medical insurance service policies, and abstracts of medical papers on elderly health;
[0009] b. Clean and filter the acquired data, including removing duplicate content, filtering and deleting data not related to elderly health, and conducting quality assessments.
[0010] c. Data storage. Structured data is directly stored in json format; unstructured data is stored in "---
[0011] -----------------------------" is used as a delimiter to logically divide each data and store it in a txt file.
[0012] (2) Structural extraction of disease knowledge based on a large language model. The specific steps include:
[0013] a. Obtain the API of the large language model platform and determine the entities, relationships, and attributes required for graph construction, as shown in the following table:
[0014] Table 1 Entities, relations and attributes
[0015]
[0016]
[0017] b. Take the acquired unstructured data as input and use the prompt words to prompt engineering design.
[0018] The language model is used to extract disease knowledge structuredly, and the prompt words are designed as follows:
[0019] Table 2 Design of prompt words for structured extraction of disease knowledge
[0020]
[0021]
[0022] (3) Count the original frequencies and determine the initial edge weights:
[0023] a. Extract causal label data from the previous stage data;
[0024] b. Count the original frequencies and perform normalization to initialize the causal edge weights.
[0025]
[0026] Where max is the maximum value of the same sample data, and min is the minimum value of the same sample data. The data is linearly transformed and the result is mapped to the range of 0-1.
[0027] (4) Model parameter learning and training, calculating the information contribution of different causes to the disease (i.e., edge weights), constructing a causal association knowledge graph, and embedding and aligning the knowledge graph triple vectors. The specific steps include:
[0028] a. Initialize the sum-product network structure. Create some subsets of random variables and create k summation nodes for each subset R Then decompose the set R into subsets R1, ..., R l For all decompositions, 1≤i1,...,i l ≤k, then create another parent node The child nodes are The product node of
[0029] b. Apply the back-propagation algorithm to update the weight values until the model converges; remove all weight changes with a result of 0 to obtain the trained SPN model.
[0030] The activation function is the sigmoid function:
[0031]
[0032] Its derivative is: σ(1-σ).
[0033] The mean square error loss function is:
[0034]
[0035] where y k is the true value, o k is the output value. Find its partial derivative and decompose it according to the chain rule. It is only related to the i-th node and has nothing to do with other nodes. Therefore, the derivative of the mean square error is:
[0036] c. Use the trained SPN model to calculate the causal edge weights and apply the log-likelihood difference to measure the contribution of different types of information, representing the weight of the impact of the cause on the disease.
[0037] The log-likelihood function expression is as follows:
[0038]
[0039] d. Build a causal knowledge graph based on the above weights and attach labels to each causal edge.
[0040] e. Embed the triples of the knowledge graph containing entities and relations into a continuous vector space to align the entity vector with the text vector space.
[0041] (5) Construct a polysemous term corpus and conduct semantic disambiguation training. The specific steps include:
[0042] a. Crawl and merge two public online dictionaries, and select words related to elderly health as the objects to be annotated; then, extract relevant sentences from online data and professional corpus. Manual annotation is used to build a polysemous corpus of terms;
[0043] b. Use character-level segmentation and special label processing for continuous corpus; at the same time, unify the length of the training corpus, truncate the excess part, and supplement the insufficient part;
[0044] c. Use a multi-layer bidirectional RNN and Softmax for classification, introduce dropout for regularization, and complete the semantic disambiguation training of the model.
[0045] The core principle of bidirectional RNNs lies in their simultaneous introduction of two independent RNN branches: the forward and reverse branches, which propagate information forward and backward along the timeline, respectively. These two branches share the same weights but process inputs starting at opposite ends of the sequence until they meet in the middle. The hidden state at each moment not only incorporates past input information but also incorporates the influence of future input, fully capturing the global context of the entire sequence.
[0046] Forward RNN propagates forward along the time axis, hidden state Input x at the current time t Hidden state at the previous moment Joint decision.
[0047]
[0048] Reverse RNN propagates backward along the time axis, hidden state Input x at the current time t and the hidden state at the next moment Joint decision.
[0049]
[0050] Among them, f is the activation function Softmax, W f 、W b are the weight matrices of the forward and reverse RNNs, respectively, and b f 、b b is the corresponding bias term.
[0051] The Softmax formula is as follows:
[0052]
[0053] Finally, the comprehensive hidden state of the bidirectional RNN at each moment is composed of the concatenation of the forward and reverse hidden states:
[0054]
[0055] (6) The query statement undergoes semantic disambiguation and semantic expansion enhancement steps, and then outputs candidate answers through post-retrieval re-ranking. The specific steps include:
[0056] a. Input the query statement and perform semantic disambiguation;
[0057] b. Using knowledge graphs for semantic expansion and enhancement;
[0058] c. Generate the corresponding query vector and map the vector to the corresponding entity in the graph;
[0059] d. Use the path length feature (i.e. edge weight) in the knowledge graph to perform retrieval rearrangement;
[0060] e. Output candidate answers.
[0061] The advantages of the present invention compared with the prior art are:
[0062] 1. A high-quality causal knowledge graph question-answering vector query optimization method that integrates a sum-product network model and a semantic disambiguation mechanism is proposed. Compared with traditional knowledge graph construction methods, this method has stronger adaptability and generalization capabilities in reasoning ability and semantic accuracy, significantly improving the intelligence level and professional performance of question-answering systems in the field of elderly health management.
[0063] 2. The innovative introduction of the sum-product network model to model and reason about causal relationships achieves accurate modeling of causal edge weights through structural initialization and parameter learning training, and evaluates the contribution of different causal types through log-likelihood difference, effectively overcoming the problem of unclear expression of causal strength in traditional causal graphs and improving the causal directionality and logical consistency of the knowledge graph.
[0064] 3. Combined with a large language model to extract and structure disease causal knowledge, the system systematically extracts and integrates multi-source data in elderly health management by designing prompt words, cleaning high-quality data, and classifying labels. This enables efficient acquisition of entity, relationship, and attribute information from unstructured text, enhancing the comprehensiveness and accuracy of graph construction.
[0065] 4. In the semantic disambiguation component, a disambiguation model based on a multi-layer bidirectional RNN and Softmax classification was designed. Combined with a polysemous corpus of terms and contextual features, it effectively addressed the issue of polysemy and ambiguity in health management terms affecting query accuracy, providing more accurate semantic alignment and disambiguation capabilities for question-answer vector queries.
[0066] 5. Through semantic expansion and path rearrangement technology, deep alignment and retrieval optimization between query intent and knowledge graph are achieved. Compared with traditional static query methods, this method supports richer semantic expression and high recall rate retrieval, improving retrieval accuracy and response quality.
[0067] This invention covers multiple key links such as data acquisition, causal modeling, semantic disambiguation, and vector optimization. It realizes a closed-loop innovation from causal knowledge extraction to semantic question-answering optimization in the overall method chain, significantly improving the intelligent construction efficiency and reasoning support capabilities of the knowledge graph for elderly health management, and providing a structurally complete and semantically accurate knowledge base for intelligent question-answering systems in the medical field. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The present invention will be better understood from the following detailed description of the embodiments of the present invention in conjunction with the accompanying drawings.
[0069] Figure 1 It is a flow chart of the overall steps of the present invention. DETAILED DESCRIPTION
[0070] The present invention comprises the following steps:
[0071] (1) Crawl authoritative websites to obtain structured and unstructured data on elderly health management and store the data. The steps include:
[0072] a. Crawl the websites of Wenyao.com (www.xywy.com), Chinese Medical Journals Network (www.medjournals.cn), and Wanfang Data Knowledge Service Platform (www.wanfangdata.com.cn) to obtain structured and unstructured data on elderly health management, including authoritative data on professional knowledge of elderly diseases, common knowledge issues, health care and wellness, preventive care, medical insurance service policies, and abstracts of medical papers on elderly health;
[0073] b. Clean and filter the acquired data, including removing duplicate content, filtering and deleting data not related to elderly health, and conducting quality assessments.
[0074] c. Data storage. Structured data is stored directly in JSON format; unstructured data is logically divided into individual pieces using "----------------------------------" as a delimiter and stored in txt files.
[0075] (2) Structural extraction of disease knowledge based on the large language model. The specific steps include: a. Obtaining the API of the large language model platform to determine the entities, relationships, and attributes required for graph construction;
[0076] As shown in the following table:
[0077] Table 1 Entities, relations and attributes
[0078]
[0079] a. Using the acquired unstructured data as input, we design prompt words using prompt engineering to prompt the large language model to extract structured disease knowledge. The prompt words are designed as follows:
[0080] Table 2 Design of prompt words for structured extraction of disease knowledge
[0081]
[0082] (3) Count the original frequencies and determine the initial edge weights:
[0083] a. Extract causal label data from the previous stage data;
[0084] b. Count the original frequencies and perform normalization to initialize the causal edge weights.
[0085]
[0086] Where max is the maximum value of the same sample data, and min is the minimum value of the same sample data. The data is linearly transformed and the result is mapped to the range of 0-1.
[0087] (4) Model parameter learning and training, calculating the information contribution of different causes to the disease (i.e., edge weights), constructing a causal association knowledge graph, and embedding and aligning the knowledge graph triple vectors. The specific steps include:
[0088] a. Initialize the sum-product network structure. Create some subsets of random variables and create k summation nodes for each subset R Then decompose the set R into subsets R1, ..., R l For all decompositions, 1≤i1,...,i l ≤k, then create another parent node The child nodes are The product node of
[0089] b. Apply the back-propagation algorithm to update the weight values until the model converges; remove all weight changes with a result of 0 to obtain the trained SPN model.
[0090] The activation function is the sigmoid function:
[0091]
[0092] Its derivative is: σ(1-σ).
[0093] The mean square error loss function is:
[0094]
[0095] where y k is the true value, o k is the output value. Find its partial derivative and decompose it according to the chain rule. It is only related to the i-th node and has nothing to do with other nodes. Therefore, the derivative of the mean square error is:
[0096] c. Use the trained SPN model to calculate the causal edge weights and apply the log-likelihood difference to measure the contribution of different types of information, representing the weight of the impact of the cause on the disease.
[0097] The log-likelihood function expression is as follows:
[0098]
[0099] d. Build a causal knowledge graph based on the above weights and attach labels to each causal edge.
[0100] e. Embed the triples of the knowledge graph containing entities and relations into a continuous vector space to align the entity vector with the text vector space.
[0101] (5) Construct a polysemous term corpus and conduct semantic disambiguation training. The specific steps include:
[0102] a. Crawl and merge two public online dictionaries, and select words related to elderly health as the objects to be annotated; then, extract relevant sentences from online data and professional corpus. Manual annotation is used to build a polysemous corpus of terms;
[0103] b. Use character-level segmentation and special label processing for continuous corpus; at the same time, unify the length of the training corpus, truncate the excess part, and supplement the insufficient part;
[0104] c. Use a multi-layer bidirectional RNN and Softmax for classification, introduce dropout for regularization, and complete the semantic disambiguation training of the model.
[0105] The core principle of bidirectional RNNs lies in their simultaneous introduction of two independent RNN branches: the forward and reverse branches, which propagate information forward and backward along the timeline, respectively. These two branches share the same weights but process inputs starting at opposite ends of the sequence until they meet in the middle. The hidden state at each moment not only incorporates past input information but also incorporates the influence of future input, fully capturing the global context of the entire sequence.
[0106] Forward RNN propagates forward along the time axis, hidden state Input x at the current time t Hidden state at the previous moment Joint decision.
[0107]
[0108] Reverse RNN propagates backward along the time axis, hidden state Input x at the current time t and the hidden state at the next moment Joint decision.
[0109]
[0110] Among them, f is the activation function Softmax, W f 、W b are the weight matrices of the forward and reverse RNNs, respectively, and b f 、b b is the corresponding bias term.
[0111] The Softmax formula is as follows:
[0112]
[0113] Finally, the comprehensive hidden state of the bidirectional RNN at each moment is composed of the concatenation of the forward and reverse hidden states:
[0114]
[0115] (6) The query statement undergoes semantic disambiguation and semantic expansion enhancement steps, and then outputs candidate answers through post-retrieval re-ranking. The specific steps include:
[0116] a. Input the query statement and perform semantic disambiguation;
[0117] b. Using knowledge graphs for semantic expansion and enhancement;
[0118] c. Generate the corresponding query vector and map the vector to the corresponding entity in the graph;
[0119] d. Use the path length feature (i.e. edge weight) in the knowledge graph to perform retrieval rearrangement;
[0120] e. Output candidate answers.
[0121] The embodiments of the present invention are described in detail above. Specific implementation methods are used herein to illustrate the present invention. The description of the above embodiments is only used to help understand the method of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A question-answer vector query method based on a sum-product network model and semantic disambiguation, characterized by: The steps to try include: (1) Crawl authoritative websites to obtain structured and unstructured data on elderly health management and store the data; (2) Structured extraction of disease knowledge based on a large language model; (3) Count the original frequencies and determine the initial edge weights; (4) Model parameter learning and training, calculating the information contribution of different causes to the disease, i.e., edge weights, constructing a causal association knowledge graph, and embedding and aligning the knowledge graph triple vectors; (5) Construct a polysemous corpus of terms and conduct semantic disambiguation training; (6) The query statement goes through steps such as semantic disambiguation and semantic expansion enhancement, and then outputs candidate answers through post-retrieval rearrangement.
2. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1 is characterized in that: In step (1), crawling the web and processing data include: (1) Crawling medical platforms and medical journal websites to obtain structured and unstructured data on geriatric health management, including: professional knowledge on geriatric diseases, common sense issues, health care, preventive care, medical insurance service policies, and authoritative data on abstracts of geriatric health medical papers; (2) Data cleaning and filtering; (3) Structured data is stored in json format, and unstructured data is divided into each data item using a designed delimiter and stored in a txt file.
3. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1 is characterized in that: In step (2), the structured extraction of disease knowledge based on the large language model includes: (1) Obtain the API of the large language model platform and determine the entities, relationships, and attributes for graph construction; (2) The acquired unstructured data is used as input, and prompt words are designed using prompt engineering to prompt the large language model to perform structured extraction of disease knowledge.
4. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: In the step (3), Counting the original frequency and determining the initial edge weights include: (1) Extract causal type labels; (2) Count the original frequencies and perform normalization as the initial edge weights.
5. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: In step (4), constructing a causal association knowledge graph includes: (1) Initialize the sum-product network structure, apply the back-propagation algorithm to update the weight value, and perform parameter learning and training; (2) Use the trained model to calculate edge weights and construct a causal knowledge graph; (3) Triplet vector embedding alignment.
6. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: In step (5), the semantic disambiguation training includes: (1) Constructing a polysemous corpus; (2) corpus feature processing; (3) Model semantic disambiguation training.
7. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: In step (6), the question-answer query includes: (1) Semantic disambiguation is performed after the query statement is input; (2) Using knowledge graphs for semantic expansion and enhancement; (3) Generate the corresponding query vector and map it to the corresponding entity in the graph; (4) Using knowledge graph path length features for post-retrieval re-ranking; (5) Output candidate answers.
8. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: Count the original frequencies and determine the initial edge weights: a. Extract causal label data from the previous stage data; b. Count the original frequencies and perform normalization to initialize the causal edge weights; Among them, max is the maximum value of the same sample data, and min is the minimum value of the same sample data; Perform linear transformation on the data and map the result to the range of 0-1.
9. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: The model parameters are trained and learned, the information contribution of different causes to the disease (i.e., edge weights) is calculated, a causal association knowledge graph is constructed, and the knowledge graph triple vectors are embedded and aligned. The specific steps include: a. Initialize the sum-product network structure; create some subsets of random variables, and create k summation nodes for each subset R Then decompose the set R into subsets R1, ..., R l ; For all decompositions, 1≤i1,...,i l ≤k, then create another parent node The child nodes are The product node of b. Apply the back-propagation algorithm to update the weight values until the model converges; remove all weight changes with a result of 0 to obtain the trained SPN model; The activation function is the sigmoid function: Its derivative is: σ(1-σ); The mean square error loss function is: where y k is the true value, o k is the output value; find its partial derivative and decompose it according to the chain rule. It can be seen that It is only related to the i-th node and has nothing to do with other nodes; therefore, the derivative of the mean square error is: c. Use the trained SPN model to calculate the causal edge weights and apply the log-likelihood difference to measure the contribution of different types of information, representing the weight of the effect of the cause on the disease; The log-likelihood function expression is as follows: d. Build a causal knowledge graph based on the above weights and attach labels to each causal edge; e. Embed the triples of the knowledge graph containing entities and relations into a continuous vector space to align the entity vector with the text vector space.
10. The question-answer vector query method based on the sum-product network model and semantic disambiguation according to claim 1, characterized in that: Construct a polysemous term corpus and conduct semantic disambiguation training. The specific steps include: a. Crawl and merge two public online dictionaries, and select words related to elderly health as the objects to be annotated; then, extract relevant sentences from online data and professional corpus; Manual annotation to construct a polysemous corpus; b. Use character-level segmentation and special label processing for continuous corpus; at the same time, unify the length of the training corpus, truncate the excess part, and supplement the insufficient part; c. Use a multi-layer bidirectional RNN and Softmax for classification, introduce dropout for regularization, and complete the semantic disambiguation training of the model; The core theorem of bidirectional RNNs lies in their simultaneous introduction of two independent RNN branches, forward and reverse, to propagate information forward and backward along the timeline, respectively. The two branches share the same weights but process inputs starting at opposite ends of the sequence until they meet in the middle. The hidden state at each moment not only contains past input information but also integrates the influence of future input, fully capturing the global context of the entire sequence. Forward RNN propagates forward along the time axis, hidden state Input x at the current time t Hidden state at the previous moment Joint decision-making; Reverse RNN propagates backward along the time axis, hidden state Input x at the current time t and the hidden state at the next moment Joint decision-making; Among them, f is the activation function Softmax, W f 、W b are the weight matrices of the forward and reverse RNNs, respectively, and b f 、b b is the corresponding bias term; The Softmax formula is as follows: Finally, the comprehensive hidden state of the bidirectional RNN at each moment is composed of the concatenation of the forward and reverse hidden states: