Causal relationship determination method and system based on sci-tech information analysis knowledge graph
By performing vector transformation and attention operations on verbs in the knowledge graph of science and technology intelligence analysis, the problem of low information extraction capability in causal relationship analysis is solved, and the accuracy of causal relationship classification is improved.
Patent Information
- Application Number
- CN202311053965.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-08-21
AI Technical Summary
Existing technologies have low accuracy in extracting information from verb causal relationships in knowledge graphs for science and technology intelligence analysis, and cannot accurately determine verb causal relationships.
By transforming the first and second verbs into vectors, merging them, performing attention operations, and then performing SVD decomposition, a left singular matrix is obtained. This matrix is then input into the verb causal relationship prediction model, and the causal relationship analysis results are output.
It improves the accuracy of causal relationship classification, reduces feature redundancy, prevents model overfitting, and enhances the accuracy of information extraction.
Smart Images

Figure CN117057421B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of scientific and technical information processing, and in particular to a method and system for determining causal relationships based on scientific and technical information analysis knowledge graphs. BACKGROUND
[0002] With the emergence of the interdisciplinary research field of causal reasoning and language processing fusion, causal relationship analysis in natural language processing has also been valued by scholars. Pryzant studied the causal effect of language attributes on downstream results, used a pre-trained language model (BERT) to adjust the text, and remote supervision to improve the quality of the noise agent. Wood-Dougsty established a modeling mechanism for causal relationship literature based on missing data and measurement error in order to promote causal analysis based on language data, providing a new research approach for inferring causal relationships with text data.
[0003] Natural Language Processing (NLP) is an important direction in the field of computer science and artificial intelligence, which can realize various theories and methods of effective communication between man and computer using natural language. Causal relationship extraction, as one of the directions of natural language processing, refers to extracting the causal relationship between sentences in an article from the given text through natural language processing corpus and the application of extraction technology, which is used to understand the content of the text and analyze the potential logical relationship in the article. The application of causal relationship extraction can help people better understand and analyze the semantics of the text, providing a basis for further text processing. In addition, the attention mechanism focuses on the information that is more critical to the current task among the numerous input information, reducing the attention to other information, which can solve the problem of information overload and improve the efficiency and accuracy of task processing.
[0004] In the knowledge graph of intelligence analysis, the causal relationship between two verb nodes is often determined by the sentence in which the verb node is located, which can be considered as determining the causal relationship between two verbs in a text. In the case of insufficient data, training the model by concatenating the text as input not only needs to identify the position of the given verb in the sentence, but also needs to determine the causal relationship between the sentences where the verb is located. This method not only increases the difficulty of the task, but also may cause the model to pay too much attention to irrelevant information, affecting the accuracy of the task.
[0005] At present, the attention model and the causal relationship analysis model have achieved reliable results in many fields, however, these models have great improvement in the following aspects for judging the causal relationship of the verb in the sentence: 1) there may be multiple verbs in one or more sentences, and the current attention method is difficult to identify the verb which needs to judge the causal relationship; 2) how to more effectively analyze the causal relationship of two verbs in a sentence, which is often focused on the part near or related to the verb, without the need for equivalent learning or self-attention learning of the entire sentence; 3) how to avoid the preprocessing operation on the sentence structure to make the model construction process simple.
[0006] Therefore, it is necessary to provide an improved causal relationship determination method based on a science and technology information analysis knowledge graph to solve the above problems. SUMMARY
[0007] The present application aims to provide a causal relationship determination method based on a science and technology information analysis knowledge graph to solve the technical problems in the prior art that the multi-element and complexity of science and technology information lead to low precision of information extraction in the verb causal relationship analysis of the science and technology information analysis knowledge graph, and the verb causal relationship of the science and technology information analysis knowledge graph cannot be accurately determined. The technical problems to be solved by the present application are solved by the following technical solutions.
[0008] The present application provides a causal relationship determination method based on a science and technology information analysis knowledge graph, comprising: determining a first verb, a second verb and a to-be-processed science and technology information text segment according to a pre-established science and technology information analysis knowledge graph; performing vector conversion on the first verb and the second verb to obtain a first verb embedding vector and a second verb embedding vector, and performing vector conversion on the to-be-processed science and technology information text segment to obtain a first sentence embedding vector; performing attention operation on the first verb embedding vector and the second verb embedding vector after merging, and then performing attention operation on the first sentence embedding vector to obtain a first transformation matrix; performing first transformation processing on the first transformation matrix to obtain a second sentence embedding vector; performing second transformation processing on the first sentence embedding vector and the second sentence embedding vector, and then performing SVD decomposition processing to obtain a left singular matrix corresponding to the to-be-processed science and technology information text segment; inputting the left singular matrix of the to-be-processed science and technology information text segment into a verb causal relationship prediction model to output a causal relationship analysis result of the first verb and the second verb.
[0009] According to an optional embodiment, after the first verb embedding vector and the second verb embedding vector are combined, the first sentence embedding vector is subjected to attention operation to obtain a first transformation matrix, which comprises: if the number of tokens of the first verb is m1, the number of tokens of the second verb is m2, the number of tokens of the segment of the to-be-processed scientific and technical information text in which the first verb and the second verb are located is n, and the embedding vector dimension of each token is s, an n×s×(m1+m2)-order first transformation matrix can be obtained after dot product attention operation.
[0010] According to an optional embodiment, the first transformation matrix is subjected to first transformation processing to obtain a second sentence embedding vector, which comprises: the n×s×(m1+m2)-order first transformation matrix is averaged according to the third dimension to obtain the second sentence embedding vector.
[0011] According to an optional embodiment, after the first sentence embedding vector and the second sentence embedding vector are subjected to second transformation processing, SVD decomposition processing is performed, which comprises: the first sentence embedding vector and the second sentence embedding vector are subjected to weighted average calculation processing to obtain a second transformation matrix; the obtained second transformation matrix is subjected to SVD decomposition processing to obtain a left singular matrix, a right singular matrix and a singular value matrix corresponding to the second transformation matrix.
[0012] According to an optional embodiment, the obtained left singular matrix is input into the verb causal relationship prediction model, and a cause category value, a result category value or a non-causal category value obtained through causal relationship analysis is output.
[0013] According to an optional embodiment, after the obtained left singular matrix is subjected to third transformation processing and fourth transformation processing, the left singular matrix is input into the verb causal relationship prediction model, and a cause category representation vector and a result category representation vector obtained through causal relationship analysis are output.
[0014] According to an optional embodiment, a TextCNN algorithm is used to establish the verb causal relationship prediction model.
[0015] According to an optional embodiment, the first verb, the second verb and the to-be-processed scientific and technical information text segment are determined according to a pre-established scientific and technical information analysis knowledge graph, which comprises: a to-be-processed verb node for causal relationship analysis in the scientific and technical information analysis knowledge graph is queried, and any two words in the to-be-processed verb node are combined as the first verb and the second verb; and the to-be-processed scientific and technical information text segment is a concatenation of sentences stored in nodes of the first verb and the second verb, i.e., a concatenation of sentences in which the first verb and the second verb are located.
[0016] According to the optional embodiment, the vector conversion of the first verb and the second verb to obtain the first verb embedding vector and the second verb embedding vector, and the vector conversion of the to-be-processed scientific information text segment to obtain the first sentence embedding vector, comprises: using a Bert model to perform vector conversion on the first verb, the second verb and the to-be-processed scientific information text segment to obtain the first verb embedding vector, the second verb embedding vector and the first sentence embedding vector.
[0017] The second aspect of the present application provides a system for determining a cause-effect relationship based on a scientific information analysis knowledge graph, comprising: a first determination module configured to determine a first verb, a second verb and a to-be-processed scientific information text segment according to a pre-established scientific information analysis knowledge graph; a vector conversion module configured to perform vector conversion on the first verb and the second verb to obtain a first verb embedding vector and a second verb embedding vector, and perform vector conversion on the to-be-processed scientific information text segment to obtain a first sentence embedding vector; an attention operation module configured to combine the first verb embedding vector and the second verb embedding vector, and then perform attention operation on the first sentence embedding vector to obtain a first transformation matrix; a first transformation processing module configured to perform first transformation processing on the first transformation matrix to obtain a second sentence embedding vector; a second transformation processing module configured to perform second transformation processing on the first sentence embedding vector and the second sentence embedding vector, and then perform SVD decomposition processing to obtain a left singular matrix corresponding to the to-be-processed scientific information text segment; and a cause-effect relationship determination module configured to input the left singular matrix of the to-be-processed scientific information text segment into a verb cause-effect relationship prediction model to output a cause-effect relationship analysis result of the first verb and the second verb.
[0018] The embodiments of the present application have the following advantages:
[0019] Compared with the prior art, the present application can highlight the learning of the semantic expression of the first verb and the second verb in the to-be-processed science and technology information text segment by performing dot multiplication attention operation on the vectors corresponding to the first verb and the second verb and the science and technology information text segment, and can obtain more diversified and complex feature information than traditional attention operation; the first transformation matrix after attention learning is transformed into a matrix with the same dimension as the matrix after the embedding operation of the to-be-processed science and technology information text segment (initial sentence), and a second sentence embedding vector is obtained, so that the semantic order of the sentence before and after can be preserved, and subsequent second transformation processing is facilitated; the processing mode of taking the average in the third dimension is selected, which can effectively prevent the problem of gradient explosion of the subsequent classification model caused by too large data; after the first sentence embedding vector and the second sentence embedding vector are subjected to second transformation processing, SVD decomposition processing (i.e., second transformation matrix decomposition) is performed, and a left singular matrix corresponding to the to-be-processed science and technology information text segment is obtained, which can reduce feature redundancy and prevent overfitting through SVD decomposition processing; the left singular matrix of the to-be-processed science and technology information text segment is subjected to third transformation processing and fourth transformation processing to obtain an input matrix used as model input, which can further reduce feature redundancy, effectively prevent model overfitting, and improve the overall causal relationship classification precision. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is a step flow chart of an example of the causal relationship determination method based on the science and technology information analysis knowledge graph of the present application;
[0021] Figure 2 is a schematic diagram of an example of a science and technology information analysis knowledge graph applying the causal relationship determination method based on the science and technology information analysis knowledge graph of the present application;
[0022] Figure 3 is a framework schematic diagram of a specific embodiment of the causal relationship determination method based on the science and technology information analysis knowledge graph of the present application;
[0023] Figure 4 is a structure schematic diagram of an example of the causal relationship determination system based on the science and technology information analysis knowledge graph of the present application;
[0024] Figure 5 is a structure schematic diagram of an electronic device embodiment according to the present application;
[0025] Figure 6 is a structure schematic diagram of a computer readable medium embodiment according to the present application. DETAILED DESCRIPTION
[0026] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0027] In view of the above problems, the present application proposes a cause-effect relationship determination method based on a science and technology information analysis knowledge graph, which adopts dot multiplication attention on related verbs and sentences in a to-be-processed science and technology information text segment, SVD decomposition on a matrix, and weighted operations on the decomposed matrix and a Jordan standard form, can pre-extract sentence features on the basis of learning the context global information of the sentence (i.e. the to-be-processed science and technology information text segment), focus on the related key information of the first verb and the second verb, reduce information redundancy, reduce the learning difficulty of the subsequent classification model, and improve the overall cause-effect relationship classification accuracy.
[0028] The content of the present application will be described in detail below with reference to Figures 1 to 3
[0029] Figure 1 is a step flow chart of an example of the cause-effect relationship determination method based on a science and technology information analysis knowledge graph of the present application. Figure 2 is a schematic diagram of an example of a science and technology information analysis knowledge graph applying the cause-effect relationship determination method based on a science and technology information analysis knowledge graph of the present application.
[0030] As shown in Figure 1 , in step S101, a first verb, a second verb, and a to-be-processed science and technology information text segment are determined according to a pre-established science and technology information analysis knowledge graph.
[0031] Specifically, according to the pre-established science and technology information analysis knowledge graph as shown in Figure 2 , the science and technology information analysis knowledge graph includes verb nodes, noun nodes, and time nodes related to science and technology information.
[0032] Further, each verb node in the science and technology information analysis knowledge graph can be associated with one or more text segments.
[0033] In a specific embodiment, a to-be-processed verb node for cause-effect relationship analysis in the science and technology information analysis knowledge graph is queried, and any two words in the to-be-processed verb node are combined as a first verb and a second verb. The to-be-processed science and technology information text segment is the splicing of the sentences stored by the nodes of the first verb and the second verb, i.e. the splicing of the sentences in which the first verb and the second verb are located, i.e. the first verb, the second verb, and the to-be-processed science and technology information text segment are determined. For example, the first verb and the second verb are verbs of science and technology information analysis that need to be identified in advance to determine the cause-effect relationship.
[0034] For example, the to-be-processed text segment is "A visits, B receives A, and C area carries out reception exercise and other activities. The verb entity nodes in the sci-tech information analysis knowledge graph are queried to determine the first verb "visits" and the second verb "receives".
[0035] For example, the verb entity nodes in the sci-tech information analysis knowledge graph are queried to determine the first verb "visits" and the second verb "exercise". The to-be-processed sci-tech information text segment is determined according to the stored sentences of the verbs, that is, the stored sentence of the first verb node is "A visits T area.", the stored sentence of the second verb node is "Team d carries out reception exercise in T area.", and the to-be-processed sci-tech information text segment is "A visits T area. Team d carries out reception exercise in T area."
[0036] It should be noted that in the present application, the verbs (including the first verb and the second verb) are words representing the actions or states of people or things related to sci-tech information, and the information contained is also key and diverse. In the present application, the verbs in the sci-tech information analysis knowledge graph are mainly analyzed for causal relationship. However, the above is only described as an optional example and cannot be understood as a limitation of the present application.
[0037] Next, in step S102, the first verb and the second verb are vector converted to obtain a first verb embedding vector and a second verb embedding vector, and the to-be-processed sci-tech information text segment is vector converted to obtain a first sentence embedding vector.
[0038] Specifically, the first verb, the second verb, and the to-be-processed sci-tech information text segment are vector converted using a Bert model to obtain the first verb embedding vector, the second verb embedding vector, and the first sentence embedding vector.
[0039] It should be noted that Bert is a pre-trained language representation model, which pre-trains bidirectional Transformers using masked language model (MLM) to generate deep bidirectional language representations, for example, deep bidirectional language representations related to the first verb and the second verb in the present embodiment, which can accurately represent the relationship between the first verb and the second verb in the sci-tech information text segment.
[0040] More specifically, the first verb embedding vector and the second verb embedding vector are two-dimensional matrices (for example, two rows and four columns), and the first sentence embedding vector is a two-dimensional matrix (for example, three rows and four columns).
[0041] It should be noted that the above is only described as an optional example and cannot be understood as a limitation of the present application.
[0042] Next, in step S103, the first verb embedding vector and the second verb embedding vector are combined, and then an attention operation is performed on the first sentence embedding vector to obtain a first transformation matrix.
[0043] If the token number of the first verb is m1, the token number of the second verb is m2, the token number of the segment of the to-be-processed sci-tech information text in which the first verb and the second verb are located is n, and the embedding vector dimension of each token is s, an nxsx(m1+m2) order first transformation matrix can be obtained after the dot product attention operation, which can be specifically referred to as Figure 3 .
[0044] Through the above dot product attention operation, the semantic expression of the first verb and the second verb in the segment of the to-be-processed sci-tech information text can be highlighted learning, and more diverse and complex feature information can be obtained than the traditional attention operation.
[0045] It should be noted that the above is only described as an optional example and cannot be understood as a limitation of the present application.
[0046] Next, in step S104, a first transformation process is performed on the first transformation matrix to obtain a second sentence embedding vector.
[0047] In a specific embodiment, the nxsx(m1+m2) order first transformation matrix is averaged according to the third dimension (nxsx(m1+m2) / 2) to obtain the second sentence embedding vector, that is, an nxs order matrix is obtained. For example, the second sentence embedding vector is a two-dimensional matrix (for example, a three-row and four-column matrix), which can be specifically referred to as Figure 3 .
[0048] For averaging, it is assumed that the weight vector and , the first transformation matrix is , the first transformation matrix is averaged according to the third dimension to obtain , that is, an nxs order matrix is obtained.
[0049] In another specific embodiment, the nxsx(m1+m2) order first transformation matrix is weighted averaged according to the third dimension (nxsx(c*m1+d*m2) / 2, wherein the weight vector (for example, the weighted coefficients c and d are the weighted coefficients of m1 and m2) obtains the second sentence embedding vector, and the weighted coefficients c and d are determined according to the importance of the first verb and the second verb in the segment of the to-be-processed sci-tech information text, for example.
[0050] It is assumed that the weight vector and , the first transformation matrix is The first transformation matrix is processed by weighted average along the third dimension to obtain a second sentence embedding vector. The weight vector w is determined according to the importance of the first verb and the second verb in the to-be-processed scientific information text segment.
[0051] The first transformation matrix after attention learning is transformed into a matrix with the same dimension as the to-be-processed scientific information text segment (initial sentence) embedding operation, and the second sentence embedding vector is obtained, which can preserve the semantic order of the sentence before and after, and facilitate subsequent second transformation processing. In addition, the processing method of taking the average along the third dimension can effectively prevent the gradient explosion problem of the subsequent classification model caused by too large data.
[0052] It should be noted that the above is only described as an optional example and cannot be understood as a limitation of the present application.
[0053] Next, in step S105, after the first sentence embedding vector and the second sentence embedding vector are processed by the second transformation, SVD decomposition processing is performed (i.e., after the second transformation matrix decomposition), and the left singular matrix corresponding to the to-be-processed scientific information text segment is obtained.
[0054] It should be noted that the dot product attention learning of the verb position will lose the information of the non-verb part, however, this part of information can help the learning of the whole sentence, therefore, the information of the non-verb related position should be preserved, that is, the second sentence embedding vector and the first sentence embedding vector are processed by weighted average along the position (i.e., the second transformation processing), and the second transformation matrix is obtained. The weight coefficient can be adjusted according to the sentence embedding vector that needs to be focused on, for example, the weight coefficient of the first sentence embedding vector is 0.6, and the weight coefficient of the second sentence embedding vector is 0.4. After weighted average is 0.6*first sentence embedding vector+0.4*second sentence embedding vector, the second transformation matrix is calculated.
[0055] The obtained second transformation matrix is processed by SVD decomposition (i.e., after the second transformation matrix decomposition), and the left singular matrix (denoted by U) corresponding to the second transformation matrix is obtained.
[0056] It should be noted that the analysis of scientific information needs to comprehensively evaluate, analyze and interpret various data, therefore, the information covered by scientific information data is complex and multi-dimensional. SVD decomposition processing can reduce feature redundancy and prevent overfitting. The present application adopts singular value decomposition (SVD), which specifically reduces the matrix to left singular matrix U, right singular matrix V and singular value matrix wherein the left singular matrix , right singular matrix , singular value matrix .
[0057] In an optional embodiment, the obtained left singular matrix is input into the verb causal relationship prediction model after transformation calculation.
[0058] Specifically, the Jordan canonical form of the obtained matrix is calculated, that is, the third transformation is performed on the second transformation matrix. For example:
[0059] The steps of calculating the Jordan canonical form J of U are as follows:
[0060] The elementary factor of U is calculated as follows: wherein λ refers to the eigenvalue; E refers to the unit matrix:
[0061] ,
[0062] As can be seen from the above, the elementary factor of U is , Therefore, the Jordan canonical form of U is .
[0063] Next, the fourth transformation is further performed, specifically, the product transformation is performed on and the diagonal elements of the Jordan canonical form of U, and then the matrix is normalized to obtain the input matrix of the verb causal relationship classification model (that is, the model input). For example, the product transformation of U and J is as follows: The maximum and minimum normalization calculation is performed as follows: .
[0064] After the third transformation and the fourth transformation are performed on the left singular matrix of the to-be-processed scientific intelligence text segment, the input matrix used as the model input is obtained, which can reduce feature redundancy, improve the accuracy of the model input, and effectively prevent model overfitting.
[0065] In an optional embodiment, the third transformation and the fourth transformation are performed on the obtained left singular matrix, and then the verb causal relationship prediction model is input.
[0066] It should be noted that the above is only described as an optional example and cannot be understood as a limitation of the present application.
[0067] Next, in step S105, the left singular matrix of the to-be-processed scientific intelligence text segment is input into the verb causal relationship prediction model, and the causal relationship analysis result of the first verb and the second verb is output.
[0068] The TextCNN algorithm is used to establish the verb causal relationship prediction model.
[0069] The obtained left singular matrix (i.e., the left singular matrix obtained by the second transformation matrix) is input into the verb causal relationship prediction model, and a cause category value, an effect category value, or a non-causal category value obtained by the causal relationship analysis is output.
[0070] In a preferred embodiment, after the obtained left singular matrix is subjected to third and fourth transformation processing, the verb causal relationship prediction model is input, and the cause and effect categories obtained by the causal relationship analysis are output.
[0071] For example, the causal relationship analysis result of determining that the first verb "access" and the second verb "force deployment" is a cause category value, i.e., the first verb is the reason for the second verb.
[0072] It should be noted that the verb causal relationship prediction model described above can also be an LSTM classification model, a Bert model, etc. The above is described only as an optional example and cannot be understood as a limitation of the present application. In addition, the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application and are not for limiting purposes. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0073] Compared with the prior art, the present application can highlight the learning of the semantic expression of the first verb and the second verb in the to-be-processed science and technology intelligence text segment by performing dot multiplication attention operation on the vectors corresponding to the first verb and the second verb and the to-be-processed science and technology intelligence text segment, and can obtain more diverse and complex feature information than traditional attention operation (attention operation); by transforming the first transformation matrix after attention learning into a matrix with the same dimension as the to-be-processed science and technology intelligence text segment (initial sentence) embedding operation, a second sentence embedding vector is obtained, which can preserve the semantic order before and after the sentence, facilitating subsequent second transformation processing; by selecting the processing mode of taking the average in the third dimension, the problem of gradient explosion of the subsequent classification model caused by too large data can be effectively prevented; after the first sentence embedding vector and the second sentence embedding vector are subjected to second transformation processing, SVD decomposition processing (i.e., after second transformation matrix decomposition) is performed, and a left singular matrix corresponding to the to-be-processed science and technology intelligence text segment is obtained, which can reduce feature redundancy and prevent overfitting through SVD decomposition processing; by performing third and fourth transformation processing on the left singular matrix of the to-be-processed science and technology intelligence text segment, an input matrix used as model input is obtained, which can further reduce feature redundancy, effectively prevent model overfitting, and improve the overall causal relationship classification precision.
[0074] The following is an embodiment of the system of the present application, which can be used to perform an embodiment of the method of the present application. For details not disclosed in the embodiment of the system of the present application, please refer to the embodiment of the method of the present application.
[0075] Figure 4 is a structural schematic diagram of an example of a system for determining causal relationship based on a scientific information analysis knowledge graph according to the present application.
[0076] As shown in Figure 4 The second aspect of the present disclosure provides a system 400 for determining causal relationship based on a scientific information analysis knowledge graph, which includes a first determination module 410, a vector conversion module 420, an attention operation module 430, a first transformation processing module 440, a second transformation processing module 450, and a causal relationship determination module 460.
[0077] In a specific embodiment, the first determination module 410 determines a first verb, a second verb, and a to-be-processed scientific information text segment according to a pre-established scientific information analysis knowledge graph. The vector conversion module 420 is configured to convert the first verb and the second verb into vectors to obtain a first verb embedding vector and a second verb embedding vector, and convert the to-be-processed scientific information text segment into a vector to obtain a first sentence embedding vector. The attention operation module 430 combines the first verb embedding vector and the second verb embedding vector, and then performs attention operation with the first sentence embedding vector to obtain a first transformation matrix. The first transformation processing module 440 performs first transformation processing on the first transformation matrix to obtain a second sentence embedding vector. The second transformation processing module 450 performs second transformation processing on the first sentence embedding vector and the second sentence embedding vector, and then performs SVD decomposition processing (i.e., after performing second transformation matrix decomposition) to obtain a left singular matrix corresponding to the to-be-processed scientific information text segment. The causal relationship determination module 460 inputs the left singular matrix of the to-be-processed scientific information text segment into a verb causal relationship prediction model and outputs a causal relationship analysis result of the first verb and the second verb.
[0078] In an optional embodiment, the determination of the first verb, the second verb, and the to-be-processed scientific information text segment according to the pre-established scientific information analysis knowledge graph includes: querying a to-be-processed verb node for causal relationship analysis in the scientific information analysis knowledge graph, combining any two words in the to-be-processed verb node as the first verb and the second verb, and splicing the sentence stored in the nodes of the first verb and the second verb, i.e., splicing the sentences in which the first verb and the second verb are located.
[0079] Specifically, the Bert model is used to convert the first verb, the second verb and the to-be-processed scientific and technical information text segment into vectors to obtain a first verb embedding vector, a second verb embedding vector and a first sentence embedding vector.
[0080] The first verb embedding vector and the second verb embedding vector are combined, and then attention operation is performed on the first sentence embedding vector to obtain a first transformation matrix.
[0081] If the token number of the first verb is m1, the token number of the second verb is m2, the token number of the to-be-processed scientific and technical information text segment where the first verb and the second verb are located is n, and the embedding vector dimension of each token is s, an nxsx (m1+m2) order first transformation matrix can be obtained after dot product attention operation.
[0082] Then, the nxsx (m1+m2) order first transformation matrix is averaged according to the third dimension to obtain a second sentence embedding vector.
[0083] The first sentence embedding vector and the second sentence embedding vector are processed by bit weighted average calculation to obtain a second transformation matrix.
[0084] The obtained second transformation matrix is subjected to SVD decomposition processing (i.e., after the second transformation matrix decomposition), to obtain a left singular matrix, a right singular matrix and a singular value matrix corresponding to the second transformation matrix.
[0085] The obtained left singular matrix is input into the verb causal relationship prediction model, and the cause category value, the effect category value or the non-causal category value obtained by causal relationship analysis is output.
[0086] In an optional embodiment, a TextCNN algorithm is used to establish a verb causal relationship prediction model.
[0087] After the obtained left singular matrix is subjected to third transformation processing and fourth transformation processing, it is input into the verb causal relationship prediction model, and the cause and effect category representation vectors obtained by causal relationship analysis are output.
[0088] It should be noted that in this embodiment, the method is substantially the same as the causal relationship determination method in Figure 1 Therefore, the same part is omitted.
[0089] Figure 5 is a structural schematic diagram of an electronic device embodiment according to the present application.
[0090] As Figure 5As shown, the electronic device is in the form of a general computing device. The processor can be one or multiple and work cooperatively. The present application does not exclude distributed processing, i.e. the processor can be dispersed in different physical devices. The electronic device of the present application is not limited to a single physical device, but can also be the sum of multiple physical devices.
[0091] The memory stores computer executable programs, usually machine readable codes. The computer readable programs can be executed by the processor to enable the electronic device to perform the method of the present application, or at least some steps of the method.
[0092] The memory includes volatile memory, such as random access memory (RAM) and / or cache memory, and / or non-volatile memory, such as read only memory (ROM).
[0093] Optionally, the electronic device further comprises an I / O interface for data exchange between the electronic device and external devices. The I / O interface can be one or more of several types of bus structures, including memory bus or memory controller, peripheral bus, graphics acceleration port, processing unit, or local bus using any of the bus structures.
[0094] It should be understood that, Figure 5 The electronic device shown is only an example of the present application, and the electronic device of the present application can also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as display screens, and some electronic devices also include human-computer interaction elements such as buttons and keyboards. As long as the electronic device can execute the computer readable programs in the memory to implement the method of the present application or at least some steps of the method, it can be considered as an electronic device covered by the present application.
[0095] From the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software combined with necessary hardware. Therefore, as long as the embodiments of the present application are not affected, the specific Figure 6 As shown, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network, and includes a number of commands to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to perform the above method according to the embodiments of the present application.
[0096] The software product can employ any combination of one or more computer readable media. The computer readable media can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0097] The computer readable storage medium can include a computer-readable medium in the form of a data signal embodied in a carrier wave, wherein the data signal modulates an electromagnetic wave, a magnetic field, or other transport mechanism. The computer readable storage medium can also include any computer-readable medium excluding propagated signals per se.
[0098] The program code can be executed by one or more programmable processors, which can be individually, or within a group, integral to one or more machines or apparatus-based implementations set forth. Program code can be stored in one or more machine-readable medium, which can, for example, be integrated into a same device or separate from it. A machine-readable medium can include any medium that can be read by a machine, including but not limited to memory, such as read-only memory (ROM); random-access memory (RAM); magnetic disk storage medium; optical storage medium; flash memory devices; electrical, optical, acoustical or other form of propagated signals, and the like.
[0099] The computer readable medium described above can bear one or more programs (e.g., computer-executable programs), which, when executed by one of the devices, cause the computer readable medium to implement the methods of the present disclosure.
[0100] Those skilled in the art can understand that the above-mentioned modules can be distributed in the device according to the description of the embodiments, and can also be changed in one or more devices different from the embodiments. The modules of the above-mentioned embodiments can be combined into one module, or further split into multiple sub-modules.
[0101] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of commands to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiments of the present application.
[0102] The example embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structure, arrangement or implementation method described herein; on the contrary, the present application is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the appended claims.
Claims
1. A method for determining causal relationships based on knowledge graphs for scientific and technological intelligence analysis, characterized in that, include: Based on the pre-established knowledge graph for science and technology intelligence analysis, the first verb, the second verb, and the text segment of science and technology intelligence to be processed are determined. The first verb and the second verb are vectorized to obtain the first verb embedding vector and the second verb embedding vector. The scientific and technological information text segment to be processed is then vectorized to obtain the first sentence embedding vector. After merging the first verb embedding vector and the second verb embedding vector, an attention operation is performed on it and the first sentence embedding vector to obtain the first transformation matrix; Perform a first transformation on the first transformation matrix to obtain the second sentence embedding vector; After performing a second transformation on the first sentence embedding vector and the second sentence embedding vector, SVD decomposition is performed to obtain the left singular matrix corresponding to the scientific and technological information text segment to be processed. The left singular matrix of the scientific and technological intelligence text segment to be processed is input into the verb causal relationship prediction model, and the causal relationship analysis results of the first verb and the second verb are output.
2. The method for determining causality according to claim 1, characterized in that, The step of merging the first verb embedding vector and the second verb embedding vector, and then performing an attention operation with the first sentence embedding vector to obtain the first transformation matrix includes: If the number of tokens for the first verb is m1, the number of tokens for the second verb is m2, the number of tokens for the unprocessed scientific and technological information text segment containing the first and second verbs is n, and the embedding vector dimension of each token is s, after performing dot product attention operation, we can obtain the first transformation matrix of order n×s×(m1+m2).
3. The method for determining causality according to claim 1, characterized in that, The first transformation process performed on the first transformation matrix to obtain the second sentence embedding vector includes: The second sentence embedding vector is obtained by averaging the first transformation matrix of order n×s×(m1+m2) according to the third dimension.
4. The method for determining causality according to claim 3, characterized in that, After performing a second transformation on the first sentence embedding vector and the second sentence embedding vector, the SVD decomposition process is performed, including: The first sentence embedding vector and the second sentence embedding vector are weighted and averaged to obtain the second transformation matrix; The obtained second transformation matrix is subjected to SVD decomposition to obtain the left singular matrix, right singular matrix and singular value matrix corresponding to the second transformation matrix.
5. The method for determining causality according to claim 4, characterized in that, The obtained left singular matrix is input into the verb causal relationship prediction model, and the causal relationship analysis results in the following category values: cause category value, effect category value, or non-causal category value.
6. The method for determining causality according to claim 4, characterized in that, After performing the third and fourth transformations on the obtained left singular matrix, it is input into the verb causal relationship prediction model, and the output is the cause and effect category representation vector obtained from the causal relationship analysis.
7. The method for determining causality according to claim 1, characterized in that, A verb causal relationship prediction model is established using the TextCNN algorithm.
8. The method for determining causality according to claim 1, characterized in that, The process of determining the first verb, the second verb, and the text segment of the scientific and technological intelligence to be processed based on a pre-established knowledge graph for scientific and technological intelligence analysis includes: The system queries the causal relationship analysis of the knowledge graph of science and technology intelligence analysis and combines any two words in the causal relationship analysis of ...
9. The method for determining causality according to claim 1, characterized in that, The process of vectorizing the first verb and the second verb to obtain the first verb embedding vector and the second verb embedding vector, and vectorizing the scientific and technological information text segment to be processed to obtain the first sentence embedding vector, includes: Using the BERT model, vector transformations are performed on the first verb, the second verb, and the text segment of the scientific and technological information to be processed, resulting in the first verb embedding vector, the second verb embedding vector, and the first sentence embedding vector.
10. A causal relationship determination system based on a knowledge graph for scientific and technological intelligence analysis, characterized in that, include: The first determination module determines the first verb, the second verb, and the text segment of the scientific and technological intelligence to be processed based on the pre-established knowledge graph of scientific and technological intelligence analysis. The vector conversion module is used to convert the first verb and the second verb into vectors to obtain the first verb embedding vector and the second verb embedding vector, and to convert the scientific and technological information text segment to be processed into vectors to obtain the first sentence embedding vector; The attention operation module merges the first verb embedding vector and the second verb embedding vector, and then performs an attention operation with the first sentence embedding vector to obtain the first transformation matrix; The first transformation processing module performs a first transformation processing on the first transformation matrix to obtain the second sentence embedding vector; The second transformation processing module performs a second transformation on the first sentence embedding vector and the second sentence embedding vector, and then performs SVD decomposition to obtain a left singular matrix corresponding to the scientific and technological information text segment to be processed. The causal relationship determination module inputs the left singular matrix of the scientific and technological intelligence text segment to be processed into the verb causal relationship prediction model, and outputs the causal relationship analysis results of the first verb and the second verb.