A complex question-answering query method and device based on temporal knowledge graph
By extracting potential time and entity embeddings from the timing knowledge graph and using neural networks for time inference, the problem of inefficient processing of complex timing problems in the prior art is solved, and simplified processing and efficient answer output are achieved.
Patent Information
- Application Number
- CN202210146333.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-02-17
AI Technical Summary
The existing timing knowledge graph question and answer methods are inefficient and difficult to simplify the processing process when dealing with complex timing problems, especially inability to effectively deal with complex timing problems containing multiple entities and events.
A complex question-and-answer query method based on the timing knowledge graph is proposed. By extracting latent time and entity embeddings, and using neural networks related to entities, relationships, and problem types to infer time information, the latent embeddings are transformed to the target time, and the timing graph is used. Embed the simplified query of answers to avoid multi-step query or sub-problem decomposition.
Improve the ability to handle complex timing problems, simplify the process of handling complex problems, can effectively solve complex problems and output the entity or time with the highest score as the answer.
Smart Images

Figure CN114637819B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of information technology and data business technology, and in particular to a complex question-and-answer query method and device based on a time-series knowledge graph. Background Art
[0002] The temporal knowledge graph is a collection of structured events with time attributes, which can be represented as a set of four-tuples G = {(s, r, o, t)}, where s represents the head entity, o represents the tail entity, r represents the relationship, and t represents time, such as (Messi, award, World Footballer of the Year, 2009). The temporal knowledge graph can be regarded as a knowledge base, and building a question-answering system based on the temporal knowledge graph allows people to more easily obtain the knowledge they are looking for, that is, to ask questions to the question-answering system in natural language without writing professional query statements.
[0003] The mainstream time series knowledge graph question answering methods currently include CRONKGQA, TEQUILA, and EXAQT. Among them, by using time series knowledge embedding, CRONKGQA achieves a high accuracy rate for simple questions, but cannot handle time series problems with complex time series relationships well. TEQUILA decomposes complex time series problems into sub-problems for multi-step solutions, while EXAQT performs reasoning on sub-graphs involving multiple entities and events. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.
[0005] To this end, the purpose of the present invention is to improve the processing capability of complex time series problems and simplify the processing process of complex problems. A complex question-answering query method based on time series knowledge graph is proposed. First, the embedding of potential time and entities in complex questions is extracted, and then the neural network related to entities, relations, and question types is used to infer the change of time information in the question, so as to transform the potential embedding to the target time of the question, and solve the complex problem in the same way as the simple problem, that is, the time series graph embedding is used to answer the simplified query without the need for cumbersome multi-step query or sub-problem decomposition.
[0006] Another object of the present invention is to propose a complex question-and-answer query device based on a temporal knowledge graph.
[0007] To achieve the above objectives, the present invention proposes a complex question-answering query method based on a temporal knowledge graph, comprising the following steps:
[0008] Obtain a time series question and input the time series question into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model; use the time series knowledge embedding model to obtain entity embedding and time embedding in the time series question, and use the embedding extraction model to obtain the potential embedding of the time series question; and use the time change model to transform the time embedding to the target time of the time series question; use the answer scoring model to score the entities of the entity embedding and the target time, and output the entity or time with the highest score as the answer to the time series question.
[0009] The complex question-answering query method based on the temporal knowledge graph of the embodiment of the present invention can transform the potential embedding to the target time of the question, and solve complex problems in the same way as simple problems, that is, use the temporal graph embedding to answer simplified queries without the need for cumbersome multi-step queries or sub-problem decomposition.
[0010] In addition, the complex question-answering query method based on the temporal knowledge graph according to the above embodiment of the present invention may also have the following additional technical features:
[0011] Furthermore, the temporal knowledge embedding model is trained, including: obtaining a temporal knowledge graph and inputting it into the question-answering system model; using a TComplEx model to train on the temporal knowledge graph to obtain the entity embedding and time embedding; if the training result of the TComplEx model does not reach a first preset indicator, adjusting the parameters of the temporal knowledge embedding model, and continuing the step of training the TComplEx model on the temporal knowledge graph; if the first preset indicator is reached, obtaining a temporal question sample for training the question-answering system model.
[0012] Furthermore, the question-answering system model is trained, including: inputting the time series question samples into the question-answering system model, and using the question-answering system model to train on the time series question samples; if the training result of the question-answering system model does not reach a second preset indicator, adjusting the hyperparameters of the question-answering system model, and continuing the step of training the question-answering system model on the time series question samples; if the second preset indicator is reached, ending the training of the question-answering system model.
[0013] Furthermore, the use of the TComplEx model to train on the temporal knowledge graph to obtain the entity embedding and time embedding includes: using the ComplEx model to represent entities, relations, and timestamps as complex vectors respectively, so as to obtain a score function for the authenticity of any four-tuple:
[0014]
[0015] The training of the TComplEx model is completed according to the scoring function to obtain entity embedding, relationship embedding and time embedding, as well as the ability to query a single event based on the entity embedding, relationship embedding and time embedding.
[0016] Further, the use of the embedding extraction model to obtain the potential embedding of the timing problem includes: using the DistilBert model to encode the timing problem q, and using the last hidden layer state of the DistilBert model and the fully connected layer FFN representation to extract the representation of the timing problem q as follows:
[0017] h q =FFN(DistilBert(q))
[0018] Each time series question q is labeled with at least one entity s, and the embedding of s is represented by the knowledge graph embedding as e s =u s , use the fully connected layer FFN to extract the relationship representation e r =FFN r (h q ), if the target time and target tail entities of the timing problem q are missing, two fully connected layers FFN are used to extract the embeddings of the potential time and tail entities respectively:
[0019] e time =FFN(h q ), e o =FFN(h q )
[0020] Furthermore, the time embedding is transformed into the target time of the timing problem by using the time variation model, including: concatenating the potential embeddings of four entities, relations and time, and feeding them into the fully connected layer FFN:
[0021]
[0022] After being concatenated with the hidden state representation of the time series problem q, it is sent to the fully connected layer FFN:
[0023]
[0024] Transform the latent temporal embedding into the target temporal embedding:
[0025]
[0026] in, Represents the multiplication of corresponding elements.
[0027] Further, the answer scoring model is used to score the entity embedded in the entity and the target time, and the entity or time with the highest score is output as the answer to the time series question, including: based on the entity or time being the answer to the time series question, two fully connected layers FFN are used to extract two relationship representations respectively and Using the score function of the TComplex model and the transformed embedding, the score of the answer to the timing question is measured:
[0028]
[0029] The score function that measures the answer to each time series question at time t is:
[0030]
[0031] After concatenating the scores of all entities and all times, they are sent to the softmax function to obtain the normalized probability, and the entity or time with the highest score is output as the answer.
[0032] To achieve the above object, the present invention proposes, on the other hand, a complex question-answering query device based on a temporal knowledge graph, comprising:
[0033] An input module is used to obtain time series questions and input the time series questions into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model; an extraction module is used to use the time series knowledge embedding model to obtain entity embedding and time embedding in the time series question, and use the embedding extraction model to obtain the potential embedding of the time series question; and use the time change model to transform the time embedding to the target time of the time series question; an output module is used to use the answer scoring model to score the entities of the entity embedding and the target time, and output the entity or time with the highest score as the answer to the time series question.
[0034] The complex question-answering query device based on the temporal knowledge graph of the embodiment of the present invention can transform the potential embedding to the target time of the question, and solve complex problems in the same way as simple problems, that is, use the temporal graph embedding to answer simplified queries without the need for cumbersome multi-step queries or sub-problem decomposition.
[0035] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0037] Figure 1 It is a flowchart of a complex question-answering query method based on a temporal knowledge graph according to an embodiment of the present invention;
[0038] Figure 2 A framework diagram of a complex question-answering system based on a temporal knowledge graph according to an embodiment of the present invention;
[0039] Figure 3 is a model structure diagram of a question-answering system according to an embodiment of the present invention;
[0040] Figure 4 is a training flow chart of a question-answering system according to an embodiment of the present invention;
[0041] Figure 5 is a flowchart of the use of the question-answering system according to an embodiment of the present invention;
[0042] Figure 6 Schematic diagram of the structure of a complex question-answering query device based on a temporal knowledge graph according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0045] The following describes a complex question and answer query method and device based on a temporal knowledge graph proposed according to an embodiment of the present invention with reference to the accompanying drawings. First, the complex question and answer query method based on a temporal knowledge graph proposed according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0046] Figure 1 It is a flowchart of a complex question-answering query method based on a temporal knowledge graph according to an embodiment of the present invention.
[0047] like Figure 1 As shown in FIG. 1 , the complex question-answering query method based on the temporal knowledge graph includes the following steps:
[0048] Step S1, obtaining time series questions and inputting the time series questions into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model.
[0049] Step S2, using the time series knowledge embedding model to obtain entity embedding and time embedding in the time series problem, and using the embedding extraction model to obtain the potential embedding of the time series problem; and using the time change model to transform the time embedding to the target time of the time series problem.
[0050] In step S3, the entity embeddings and target times are scored using the answer scoring model, and the highest-scoring entity or time is output as the answer to the time series question.
[0051] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0052] Specifically, the temporal knowledge graph is defined as G = {(s, r, o, t)}. Given a set of questions, the answer to each question is an entity or time. Questions can be simple factual queries or complex questions (implying temporal relationships such as Time join, Before / After, First / After). The specific question types and examples are shown in Table 1. The task is to use the temporal knowledge graph G to answer natural language questions given the entity linked questions.
[0053] Table 1 Types and examples of complex timing problems
[0054]
[0055] Furthermore, if Figure 2 As shown in Figure 1, the idea of this framework is to first extract the latent temporal embedding of the question, and then transform the latent time to the target time based on the information provided by entities, relations, time, and questions, thereby transforming complex questions into simple questions, and then using the temporal knowledge graph embedding to answer the query. The framework mainly consists of four modules: (1) temporal knowledge graph embedding module; (2) embedding extraction module; (3) temporal transformation module; (4) answer scoring module. The functions of the four modules are as follows:
[0056] The temporal knowledge graph embedding module is responsible for learning all the facts of the temporal knowledge graph, representing entities, relations, and time in the form of embedding vectors, and then using the scoring function f(s,r,o,t) to evaluate the authenticity of a quadruple (s,r,o,t). Based on this module, simple queries (such as (s,r,?,t) or (s,r,o,?)) are performed.
[0057] The embedding extraction module is responsible for parsing timing questions and extracting the potential relations in the question (i.e., the event types being queried) and the potential temporal embeddings.
[0058] The time transformation module is responsible for using neural networks related to entities, relations, time, and problems to infer the changes in time information in the problem in order to transform the potential embedding to the target time of the problem and transform complex problems into simple ones.
[0059] The answer scoring module scores the quadruple based on entity, relation, and time embeddings, and takes the entity or time with the highest score as the final answer.
[0060] The structure diagram of the question-answering system model is as follows: Figure 3 shown.
[0061] As an example, TComplEx is a representative temporal knowledge graph embedding model, which is an extension of the static knowledge graph embedding model ComplEx on the temporal knowledge graph. ComplEx represents entities and relations as complex vectors. TComplEx also represents timestamps as complex vectors, and then defines the score function that measures the authenticity of a quadruple (s, r, o, t) as:
[0062]
[0063] After completing the training of TComplEx, we obtain the embeddings of entities, relations, and timestamps, as well as the ability to query single events ((s,r,?,t) or (s,r,o,?)) based on these embeddings.
[0064] Since the present invention only uses the temporal knowledge graph embedding model to obtain the embedding of each entity, relationship, and timestamp, and to evaluate the authenticity of the quadruple, other temporal knowledge graph embedding models such as TimePlex can also be used in the present invention.
[0065] The transformation of latent embeddings should be related to entities, relations, and time. Therefore, we first concatenate 4 latent embeddings and then feed them into a fully connected network:
[0066]
[0067] In addition, the transformation should be related to the temporal relationship type of the problem (Before, After, First, Last, Time_join), which is contained in the hidden state representation of the problem. Therefore, it is concatenated with the hidden state representation of the problem and then fed into the fully connected network:
[0068]
[0069] Then, the latent temporal embedding is transformed into the target temporal embedding:
[0070]
[0071] in Represents the multiplication of corresponding elements.
[0072] As an example, we use a temporal knowledge graph embedding model to answer queries. The answer to a temporal question can be an entity or a time. We use two fully connected layers to extract the two relation representations respectively. and Directly use the score function of TComplex and the transformed embedding to measure the score of each entity as the answer to the question:
[0073]
[0074] The scoring function used to measure the answer to the question at each time t is
[0075]
[0076] Then, the scores of all entities are concatenated with the scores of all times and sent to the softmax function to obtain the normalized probability. The final loss function is the cross entropy multi-classification loss function.
[0077] Furthermore, the training process of the question-answering system model is as follows Figure 4 The specific steps are as follows:
[0078] (1) Obtain the time series knowledge graph and upload it to the question-answering system;
[0079] (2) Use the TComplEx model to train on the time series knowledge graph to obtain the embedding of each entity, relationship, and timestamp;
[0080] (3) If the training results of the TComplEx model do not meet the expected indicators, adjust the hyperparameters and return to step (2);
[0081] (4) If the training results of the TComplEx model meet the expected indicators, the time series question and answer set used for training is input;
[0082] (5)Use Figure 3 The question answering system model shown is trained on a question and answer collection;
[0083] (6) If the model training results do not meet the expected indicators, adjust the hyperparameters and return to step (5);
[0084] (7) If the model training results meet the expected indicators, the training process ends.
[0085] Furthermore, the usage process of the question-answering system model is as follows Figure 5 As shown:
[0086] (1) Input natural language timing problem;
[0087] (2) Use the temporal knowledge embedding module to obtain the entity embedding and time embedding in the question, and use the embedding extraction module to obtain the latent embedding of the question;
[0088] (3) Use the time-varying module to transform the time embedding to the target time of the problem;
[0089] (4) Use the answer scoring module to score candidate entities and time;
[0090] (5) The entity or time with the highest score is output as the final answer, and the process ends.
[0091] According to the complex question-answering query method based on the time series knowledge graph of the embodiment of the present invention, a time series question is obtained and input into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model; the time series knowledge embedding model is used to obtain the entity embedding and time embedding in the time series question, and the embedding extraction model is used to obtain the potential embedding of the time series question; and the time change model is used to transform the time embedding to the target time of the time series question; the answer scoring model is used to score the entity and target time of the entity embedding, and the entity or time with the highest score is output as the answer to the time series question. The present invention transforms the potential embedding to the target time of the question, which can improve the processing capability of complex time series problems and simplify the processing process of complex problems.
[0092] It should be noted that there are many ways to implement complex question-answering query methods based on time-series knowledge graphs. However, no matter what the specific implementation method is, as long as the method solves the processing capabilities of complex time-series problems, it is a solution to existing technical problems and has corresponding effects.
[0093] In order to implement the above embodiment, Figure 6 As shown, this embodiment also provides a complex question and answer query device 10 based on a temporal knowledge graph, and the device 10 includes: an input module 100, an extraction module 200 and an output module 300.
[0094] An input module 100 is used to obtain time series questions and input the time series questions into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model;
[0095] An extraction module 200 is used to obtain entity embedding and time embedding in the time series problem by using the time series knowledge embedding model, and to obtain the potential embedding of the time series problem by using the embedding extraction model; and to transform the time embedding to the target time of the time series problem by using the time change model;
[0096] The output module 300 is used to score the entity and target time of the entity embedding using the answer scoring model, and output the entity or time with the highest score as the answer to the time series question.
[0097] Furthermore, the device 10 also includes a first training module, including:
[0098] The first acquisition module is used to acquire the time series knowledge graph and input it into the question-answering system model;
[0099] The first training submodule is used to train on the temporal knowledge graph using the TComplEx model to obtain entity embedding and time embedding;
[0100] The second training submodule is used to adjust the parameters of the temporal knowledge embedding model if the training result of the TComplEx model does not reach the first preset indicator, and continue the first training submodule;
[0101] The third training submodule is used to obtain time series question samples for question-answering system model training if the first preset indicator is reached.
[0102] Furthermore, the device 10 also includes a second training module, including:
[0103] A fourth training submodule, for inputting time series question samples into the question answering system model, and using the question answering system model to perform training on the time series question samples;
[0104] A fifth training submodule, used to adjust the hyperparameters of the question-answering system model and continue with the fourth training submodule if the training result of the question-answering system model does not reach the second preset indicator;
[0105] The sixth training submodule is used to end the training of the question-answering system model if the second preset indicator is reached.
[0106] According to the complex question-answering query device based on the time series knowledge graph of the embodiment of the present invention, a time series question is obtained and input into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model; the time series knowledge embedding model is used to obtain the entity embedding and time embedding in the time series question, and the embedding extraction model is used to obtain the potential embedding of the time series question; and the time change model is used to transform the time embedding to the target time of the time series question; the answer scoring model is used to score the entity and target time of the entity embedding, and the entity or time with the highest score is output as the answer to the time series question. The present invention transforms the potential embedding to the target time of the question, which can improve the processing capability of complex time series problems and simplify the processing process of complex problems.
[0107] It should be noted that the aforementioned explanation of the embodiment of the complex question and answer query method based on the temporal knowledge graph is also applicable to the complex question and answer query device based on the temporal knowledge graph of this embodiment, and will not be repeated here.
[0108] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction 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 may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0110] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A complex question-answering query method based on temporal knowledge graph, characterized in that: The following steps are involved: Obtaining a time series question and inputting the time series question into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model, and an answer scoring model; Using the temporal knowledge embedding model to obtain entity embedding and time embedding in the temporal problem, and using the embedding extraction model to obtain the potential embedding of the temporal problem; and using the time change model to transform the time embedding to the target time of the temporal problem; Using the answer scoring model to score the entity embedded in the entity and the target time, and outputting the entity or time with the highest score as the answer to the time series question; The using the embedding extraction model to obtain the potential embedding of the timing problem includes: The DistilBert model is used to encode the timing problem q, and the last hidden layer state of the DistilBert model and the fully connected layer FFN are used to extract the timing problem q as follows: Each time series question q is labeled with at least one entity s, and the embedding of s is represented by the knowledge graph embedding: , use the fully connected layer FFN to extract the relationship representation , if the target time and target tail entities of the timing question q are missing, two fully connected layers FFN are used to extract the embeddings of the potential time and tail entities respectively: The using the time variation model to transform the time embedding into the target time of the timing problem includes: Concatenate the four latent embeddings of entities, relations, and time and feed them into the fully connected layer FFN: After being concatenated with the hidden state representation of the time series problem q, it is sent to the fully connected layer FFN: Transform the latent temporal embedding into the target temporal embedding: in, Represents the multiplication of corresponding elements.
2. The method according to claim 1, characterized in that Training the temporal knowledge embedding model includes: Obtaining a time series knowledge graph and inputting it into the question-answering system model; Use the TComplEx model to train on the temporal knowledge graph to obtain the entity embedding and time embedding; If the training result of the TComplEx model does not reach the first preset indicator, adjusting the parameters of the temporal knowledge embedding model, and continuing the step of training the TComplEx model on the temporal knowledge graph; If the first preset indicator is reached, a time series question sample is obtained for training the question-answering system model.
3. The method according to claim 2, characterized in that Training the question answering system model includes: Inputting the time series question samples into the question answering system model, and using the question answering system model to perform training on the time series question samples; If the training result of the question answering system model does not reach the second preset indicator, adjusting the hyperparameters of the question answering system model, and continuing the step of training the question answering system model on the time series question sample; If the second preset indicator is reached, the training of the question-answering system model is terminated.
4. The method according to claim 3, characterized in that The method of using the TComplEx model to train on the temporal knowledge graph to obtain the entity embedding and time embedding includes: The ComplEx model is used to represent entities, relations, and timestamps as complex vectors, respectively, to obtain the scoring function for the authenticity of any four-tuple: The training of the TComplEx model is completed according to the scoring function to obtain entity embedding, relationship embedding and time embedding, as well as the ability to query a single event based on the entity embedding, relationship embedding and time embedding.
5. The method according to claim 1, characterized in that The step of using the answer scoring model to score the entity embedded in the entity and the target time, and outputting the entity or time with the highest score as the answer to the time series question, includes: Based on the answers to the questions with entities or time as the order, two fully connected layers FFN are used to extract two relation representations respectively. and , using the score function of the TComplex model and the transformed embedding, measure the score of the answer to the timing question: The score function that measures the answer to each time series question at time t is: After concatenating the scores of all entities and all times, they are sent to the softmax function to obtain the normalized probability, and the entity or time with the highest score is output as the answer.
6. A complex question-answering query device based on a temporal knowledge graph, characterized in that: include: An input module, used to obtain time series questions and input the time series questions into a trained question-answering system model; wherein the question-answering system model includes: a time series knowledge embedding model, an embedding extraction model, a time change model and an answer scoring model; An extraction module, configured to obtain entity embedding and time embedding in the time series problem using the time series knowledge embedding model, and obtain potential embedding of the time series problem using the embedding extraction model; and transform the time embedding to the target time of the time series problem using the time change model; An output module, configured to score the entity embedded in the entity and the target time using the answer scoring model, and output the entity or time with the highest score as the answer to the time series question; The extraction module obtains the potential embedding of the timing problem by using the embedding extraction model, including: The DistilBert model is used to encode the timing problem q, and the last hidden layer state of the DistilBert model and the fully connected layer FFN are used to extract the timing problem q as follows: Each time series question q is labeled with at least one entity s, and the embedding of s is represented by the knowledge graph embedding: , use the fully connected layer FFN to extract the relationship representation , if the target time and target tail entities of the timing question q are missing, two fully connected layers FFN are used to extract the embeddings of the potential time and tail entities respectively: The extraction module uses the time variation model to transform the time embedding into the target time of the timing problem, including: Concatenate the four latent embeddings of entities, relations, and time and feed them into the fully connected layer FFN: After being concatenated with the hidden state representation of the time series problem q, it is sent to the fully connected layer FFN: Transform the latent temporal embedding into the target temporal embedding: in, Represents the multiplication of corresponding elements.
7. The device according to claim 6, characterized in that Also included is the first training module, including: A first acquisition module, used to acquire a time series knowledge graph and input it into the question-answering system model; A first training submodule is used to train on the temporal knowledge graph using a TComplEx model to obtain the entity embedding and time embedding; A second training submodule, for adjusting the parameters of the temporal knowledge embedding model if the training result of the TComplEx model does not reach the first preset indicator, and continuing the first training submodule; The third training submodule is used to obtain time-series question samples for training the question-answering system model if the first preset indicator is reached.
8. The device according to claim 7, characterized in that Also included is a second training module, including: A fourth training submodule, used for inputting the time series question samples into the question answering system model, and using the question answering system model to perform training on the time series question samples; A fifth training submodule, configured to adjust the hyperparameters of the question-answering system model and continue with the fourth training submodule if the training result of the question-answering system model does not reach the second preset indicator; The sixth training submodule is used to end the training of the question-answering system model if the second preset indicator is reached.
