Knowledge graph construction method and device, electronic equipment and storage medium

By converting and time encoding the alarm data and preset knowledge graph data, combined with the decoding process of relationship embedding vectors, the problem of potential relationship missing and poor accuracy in the construction of alarm knowledge graph in the security field is solved, and the construction is complete, accurate and Timing alarm knowledge graph.

CN118966333APending Publication Date: 2024-11-15CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410989386.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the security field, the construction of alarm knowledge graphs mainly relies on semi-automated or manual methods, resulting in the lack of potential relationships between many entities in alarm data with high real-time requirements or poor accuracy, and the lack of time related to alarm data entities. information.

Method used

By performing data conversion processing on alarm data and preset knowledge graph data, obtaining embedding vectors and time encoding, combining processing to generate alarm embedding vectors and graph embedding vectors, decoding process with relation embedding vectors, and deciding whether to add them to the In the knowledge graph, build a complete, accurate and time-series alarm knowledge graph.

Benefits of technology

Deeply explore the structural characteristics and temporal characteristics of alarm data, build a complete, accurate and time-series alarm knowledge graph, improve the accuracy and effectiveness of the knowledge graph, and adapt to the growing demand for alarm data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966333A_ABST
    Figure CN118966333A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge graph construction method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the main technical scheme comprises the steps: carrying out the data conversion vehicle, time coding vehicle and data merging processing of alarm data and preset knowledge graph data, and obtaining an alarm embedding vector and a graph embedding vector; converting the first relational data to obtain a relational embedding vector, and decoding according to the alarm embedding vector, the graph embedding vector and the relational embedding vector to obtain a data prediction score; and if the data prediction score is greater than a preset score threshold, adding the alarm data to preset knowledge graph data to obtain a target knowledge graph. Compared with the prior art, the target knowledge graph is constructed through the alarm data with the high data prediction score and the knowledge graph data, the structural features and the time features of the alarm data can be deeply mined, and the complete and accurate alarm knowledge graph with the time sequence can be constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method and device for constructing a knowledge graph, an electronic device, and a storage medium. Background Art

[0002] Knowledge graph is a structured knowledge representation method that uses graphics to represent various entities in the world and their relationships. In a knowledge graph, nodes usually represent entities, such as people, places, things, etc., while edges represent relationships between entities, such as "belongs to", "located in", "created", etc. This graphical representation method makes knowledge more intuitive and easy to understand, and can be easily queried and reasoned. Usually, knowledge graphs are represented in the form of triples (head entity, relationship, tail entity), for example (2 plus 2 equals 4), which reflects the fact that 2 plus 2 equals 4.

[0003] Knowledge graphs are widely used in search engines, recommendation systems, intelligent customer service, semantic analysis and many other fields. For example, in search engines, knowledge graphs can be used to optimize the ranking and relevance of search results and provide a more accurate search experience. In recommendation systems, knowledge graphs can be used to discover potential relationships between users and items, thereby providing more personalized recommendations. In intelligent customer service, knowledge graphs can be used to understand users' questions and provide more accurate answers. In semantic analysis, knowledge graphs can be used to understand and parse the meaning and logic in natural language texts. In the security field, knowledge graphs can provide an intuitive and efficient way to understand, analyze and respond to security threats by structuring complex data and information in the form of graphs.

[0004] However, in the security field, the construction of alarm knowledge graphs (the application and extension of knowledge graphs in the security field) is semi-automated or manual. In addition, because alarm data has high real-time requirements, the potential relationships between many entities in the existing alarm knowledge graphs are missing or have poor accuracy. At the same time, there is no time information related to the entities in the alarm data. Therefore, how to establish a complete, accurate alarm knowledge graph with time information is a problem that needs to be solved urgently. Summary of the invention

[0005] The present disclosure provides a method and device for constructing a knowledge graph, an electronic device and a storage medium. Its main purpose is to solve the problem that in the security field, the construction of the alarm knowledge graph (the application and extension of the knowledge graph in the security field) is semi-automatic or manual, and because the alarm data has a high requirement for real-time performance, the potential relationships between many entities in the existing alarm knowledge graph are missing or have poor accuracy, and there is no time information related to the entities of the alarm data.

[0006] According to a first aspect of the present disclosure, a method for constructing a knowledge graph is provided, comprising:

[0007] Performing data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data;

[0008] Performing time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data, and performing time coding processing according to the second embedding vector to obtain a second time coding vector corresponding to the preset knowledge graph data;

[0009] Performing data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data, and performing data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data;

[0010] Performing data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data, and performing data decoding processing according to the alarm embedding vector, the graph embedding vector and the relation embedding vector to obtain a data prediction score corresponding to the alarm data;

[0011] When the data prediction score is greater than a preset score threshold, the alarm data is added to the preset knowledge graph data for data construction processing to obtain a target knowledge graph.

[0012] Optionally, performing data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data includes:

[0013] Performing data encoding processing on the warning data by a preset conversion algorithm to obtain first encoded data, and obtaining the first embedded vector by multiplying the first encoded data with a first preset embedding matrix;

[0014] The central entity data in the preset knowledge graph data is processed by the preset conversion algorithm to obtain central encoding data, and the neighbor data in the preset knowledge graph data is processed by the preset conversion algorithm to obtain neighbor encoding data; wherein the neighbor data is data adjacent to the central entity data in the preset knowledge graph data;

[0015] The second embedding vector is obtained by performing vector calculation processing on the center coded data, the neighbor coded data and a second preset embedding matrix.

[0016] Optionally, performing time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data includes:

[0017] The first embedded vector is time-coded by using a preset coding algorithm to obtain the first time coding vector corresponding to the alarm data.

[0018] Optionally, performing time encoding processing according to the second embedding vector to obtain a second time encoding vector corresponding to the preset knowledge graph data includes:

[0019] Obtaining second time information of preset knowledge graph data and historical time information of historical knowledge graph data; wherein the historical knowledge graph data is the knowledge graph data of the previous adjacent moment of the preset knowledge graph data;

[0020] Perform data calculation and processing according to the second time information, the historical time information and a preset attenuation parameter to obtain a data attenuation coefficient;

[0021] A decay vector is obtained by multiplying the data decay coefficient and the historical embedding vector; wherein the historical embedding vector is a vector converted from the historical knowledge graph data;

[0022] The second embedding vector and the attenuation vector are subjected to time coding processing by a preset coding algorithm to obtain the second time coding vector.

[0023] Optionally, the performing data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data includes:

[0024] Acquire first data missing information of the warning data, wherein the warning data includes first header entity data, the first relationship data, first tail entity data, and first time information;

[0025] Perform matching processing from a preset database according to the first data missing information to obtain a first gating frequency corresponding to the alarm data;

[0026] Performing weight calculation processing on the first gating frequency by a preset sensing algorithm to obtain a first weight corresponding to the alarm data;

[0027] Data merging processing is performed on the first embedding vector and the first time coding vector according to the first weight to obtain the alarm embedding vector corresponding to the alarm data.

[0028] Optionally, the performing data merging processing on the second embedding vector and the second time encoding vector to obtain the graph embedding vector corresponding to the preset knowledge graph data includes:

[0029] Obtaining second data missing information of the preset knowledge graph data, wherein the preset knowledge graph data includes second head entity data, the second relationship data, second tail entity data, and second time information;

[0030] Perform matching processing from a preset database according to the second data missing information to obtain a second gating frequency corresponding to the preset knowledge graph data;

[0031] Performing weight calculation processing on the second gating frequency by using a preset perception algorithm to obtain a second weight corresponding to the preset knowledge graph data;

[0032] The second embedding vector and the second time coding vector are subjected to data merging processing according to the second weight to obtain the alarm embedding vector corresponding to the preset knowledge graph data.

[0033] Optionally, after adding the alarm data to the preset knowledge graph data for data construction processing to obtain the target knowledge graph, the method further includes:

[0034] Obtaining third time information of each data in the target knowledge graph;

[0035] The data in the target knowledge graph whose third time information is before a preset time threshold is deleted from the target knowledge graph.

[0036] According to a second aspect of the present disclosure, a device for constructing a knowledge graph is provided, comprising:

[0037] A conversion unit, used to perform data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data;

[0038] A first encoding unit, configured to perform time encoding processing according to the first embedding vector to obtain a first time encoding vector corresponding to the alarm data;

[0039] A second encoding unit, configured to perform time encoding processing according to the second embedding vector to obtain a second time encoding vector corresponding to the preset knowledge graph data;

[0040] A first merging unit, configured to perform data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data;

[0041] A second merging unit, configured to perform data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data;

[0042] The conversion unit is further used to perform data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data;

[0043] A decoding unit, configured to perform data decoding processing according to the warning embedding vector, the graph embedding vector and the relationship embedding vector to obtain a data prediction score corresponding to the warning data;

[0044] A construction unit is used to add the alarm data to the preset knowledge graph data for data construction processing to obtain a target knowledge graph when the data prediction score is greater than a preset score threshold.

[0045] Optionally, the conversion unit includes:

[0046] An encoding module, used for performing data encoding processing on the warning data through a preset conversion algorithm to obtain first encoded data;

[0047] A calculation module, configured to obtain the first embedding vector by multiplying the first encoded data with a first preset embedding matrix;

[0048] The encoding module is further used to perform data encoding processing on the central entity data in the preset knowledge graph data through the preset conversion algorithm to obtain central encoded data, and to perform data encoding processing on the neighbor data in the preset knowledge graph data through the preset conversion algorithm to obtain neighbor encoded data; wherein the neighbor data is data adjacent to the central entity data in the preset knowledge graph data;

[0049] The calculation module is also used to perform vector calculation processing through the center coding data, the neighbor coding data and a second preset embedding matrix to obtain the second embedding vector.

[0050] Optionally, the first encoding unit is further used to perform time encoding processing on the first embedded vector through a preset encoding algorithm to obtain the first time coding vector corresponding to the alarm data.

[0051] Optionally, the second encoding unit includes:

[0052] An acquisition module, used to acquire second time information of preset knowledge graph data and historical time information of historical knowledge graph data; wherein the historical knowledge graph data is the knowledge graph data of the previous adjacent moment of the preset knowledge graph data;

[0053] a calculation module, configured to perform data calculation processing according to the second time information, the historical time information and a preset attenuation parameter to obtain a data attenuation coefficient;

[0054] The calculation module is also used to obtain an attenuation vector by multiplying the data attenuation coefficient and the historical embedding vector; wherein the historical embedding vector is a vector converted from the historical knowledge graph data;

[0055] The encoding module is used to perform time encoding processing on the second embedding vector and the attenuation vector through a preset encoding algorithm to obtain the second time coding vector.

[0056] Optionally, the first merging unit includes:

[0057] An acquisition module, configured to acquire first data missing information of the warning data, wherein the warning data includes first header entity data, the first relationship data, first tail entity data, and first time information;

[0058] A matching module, configured to perform matching processing from a preset database according to the first data missing information to obtain a first gating frequency corresponding to the alarm data;

[0059] A calculation module, configured to perform weight calculation processing on the first gating frequency by using a preset sensing algorithm to obtain a first weight corresponding to the alarm data;

[0060] A merging module is used to perform data merging processing on the first embedding vector and the first time coding vector according to the first weight to obtain the alarm embedding vector corresponding to the alarm data.

[0061] Optionally, the second merging unit includes:

[0062] An acquisition module, used to acquire second data missing information of the preset knowledge graph data, wherein the preset knowledge graph data includes second head entity data, the second relationship data, second tail entity data and second time information;

[0063] A matching module, configured to perform matching processing from a preset database according to the second data missing information to obtain a second gating frequency corresponding to the preset knowledge graph data;

[0064] A calculation module, used to perform weight calculation processing on the second gating frequency through a preset perception algorithm to obtain a second weight corresponding to the preset knowledge graph data;

[0065] A merging module is used to perform data merging processing on the second embedding vector and the second time coding vector according to the second weight to obtain the alarm embedding vector corresponding to the preset knowledge graph data.

[0066] Optionally, the device further comprises:

[0067] An acquisition unit, used to acquire third time information of each data in the target knowledge graph;

[0068] A deleting unit is used to delete the data in the target knowledge graph whose third time information is before a preset time threshold from the target knowledge graph.

[0069] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0070] at least one processor; and

[0071] a memory communicatively connected to the at least one processor; wherein,

[0072] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0073] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0074] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0075] The knowledge graph construction method and device, electronic device and storage medium provided in the present disclosure respectively perform data conversion processing on the alarm data and the preset knowledge graph data to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data; perform time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data, and perform time coding processing according to the second embedding vector to obtain a second time coding vector corresponding to the preset knowledge graph data; perform data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data, and perform data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data; perform data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data, and perform data decoding processing according to the alarm embedding vector, the graph embedding vector and the relation embedding vector to obtain a data prediction score corresponding to the alarm data; when the data prediction score is greater than a preset score threshold, the alarm data is added to the preset knowledge graph data for data construction processing to obtain a target knowledge graph. Compared with the related art, the embodiment of the present disclosure obtains the data prediction score of the alarm data by performing data conversion, time encoding and data fusion on the alarm data and the preset knowledge graph data, and decoding the obtained alarm embedding vector, graph embedding vector and relationship embedding vector, and constructing the target knowledge graph with the alarm data with a higher data prediction score and the knowledge graph data, so as to deeply mine the structural features and time features of the alarm data and construct a complete, accurate and time-series alarm knowledge graph.

[0076] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0078] Figure 1 A schematic diagram of a process for constructing a knowledge graph provided in an embodiment of the present disclosure;

[0079] Figure 2 A schematic diagram of a coding process provided by an embodiment of the present disclosure;

[0080] Figure 3 A schematic diagram of a decoding process provided by an embodiment of the present disclosure;

[0081] Figure 4 A schematic diagram of a flow chart of a method for obtaining a structural feature vector provided in an embodiment of the present disclosure;

[0082] Figure 5 A schematic diagram of a process for obtaining a second time coding vector provided by an embodiment of the present disclosure;

[0083] Figure 6 A schematic diagram of a process for obtaining an alarm embedding vector provided by an embodiment of the present disclosure;

[0084] Figure 7 A schematic diagram of a data filtering process provided by an embodiment of the present disclosure;

[0085] Figure 8 A schematic diagram of the structure of a knowledge graph construction device provided in an embodiment of the present disclosure;

[0086] Fig. 9 A schematic diagram of the structure of another knowledge graph construction device provided in an embodiment of the present disclosure;

[0087] Fig.10 A schematic block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0088] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0089] The following describes the knowledge graph construction method and device, electronic device and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.

[0090] Figure 1 A flowchart of a method for constructing a knowledge graph provided in an embodiment of the present disclosure.

[0091] like Figure 1 As shown, the method comprises the following steps:

[0092] Step 101, perform data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data.

[0093] In the embodiment of the present disclosure, when the alarm data and the preset knowledge graph data are subjected to data conversion processing, it is performed through a preset encoder structure. The encoder structure includes three parts: structural coding, time information coding and processing time heterogeneity. Among them, the data conversion processing of the alarm data and the preset knowledge graph data is structural coding processing.

[0094] When performing data conversion processing, the alarm data can be directly converted to obtain a first embedding vector. When performing data conversion on the preset knowledge graph data, it means converting the central node data of the preset knowledge graph data at each moment into a second embedding vector. The central node data is the node with the most hops to the edge node in the preset knowledge graph data, wherein the second embedding vector aggregates the central node data of the preset knowledge graph data and the multi-hop neighbor features of the central node data.

[0095] Among them, the first embedded vector and the second embedded vector are vectors after data conversion, which contain information about alarm data and preset knowledge graph data. The alarm data is a warning information automatically generated by the system in various monitoring systems when the monitored data exceeds a preset safety range or does not meet normal operating conditions. The alarm data usually contains key information such as the specific time and location of the abnormality, the parameters involved, and the severity of the abnormality; the preset knowledge graph data is an existing knowledge graph data selected by custom selection, which is a professional application of knowledge graph in the field of security monitoring. It uses the structured representation capability of the knowledge graph to organize security-related information and relationships to improve the detection, analysis and response efficiency of security threats.

[0096] Step 102: Perform time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data, and perform time coding processing according to the second embedding vector to obtain a second time coding vector corresponding to the preset knowledge graph data.

[0097] In the embodiment of the present disclosure, in order to deeply mine the semantic relationships and temporal relationships between entities based on the structural features and temporal features in the existing alarm knowledge graph, it is necessary to obtain the first time coding vector corresponding to the alarm data and the second time coding vector corresponding to the preset knowledge graph data.

[0098] When obtaining the first time coding vector, the first embedding vector can be directly time-coded through the preset coding algorithm. When obtaining the second time coding vector, since in the preset knowledge graph data, the influence of the entity on the knowledge graph data gradually weakens with the passage of time, it is necessary to first determine the attenuation coefficient corresponding to the preset knowledge graph data, and then determine the second time coding vector corresponding to the preset knowledge graph data based on the attenuation coefficient and the preset coding algorithm.

[0099] Among them, by performing time encoding processing on the first embedding vector and the second embedding vector, the time characteristics of the alarm entity can be effectively mined when constructing the target knowledge graph, so that the constructed target knowledge graph has accurate time sequence. By modeling and analyzing the time information, the system can better understand the time sequence of the alarm data, thereby more accurately locating and inferring faults.

[0100] Step 103: perform data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data, and perform data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data.

[0101] In the disclosed embodiment, after the structural coding and time information coding process, the embedding vectors of the structural features (including own features and neighbor features) of the alarm data and the preset knowledge graph data, namely the first embedding vector and the second embedding vector, and the embedding vectors of the time features, namely the first time coding vector and the second time coding vector, are obtained. However, the embedding vectors of the structural features and the embedding vectors of the time features alone are not sufficient to handle the sparsity and variability characteristics of the alarm data and the preset knowledge graph data. Therefore, it is necessary to merge the first embedding vector and the first time coding vector, and merge the second embedding vector and the second time coding vector, to solve the problem of data sparsity and variability.

[0102] The method for performing data merging processing includes but is not limited to: performing data merging based on a frequency gating (FG) method. Specifically, the embodiment of the present disclosure does not limit the method for performing data merging processing.

[0103] In order to facilitate understanding of the implementation process of the above steps 101-103, the present disclosure provides a schematic diagram of the principle of encoding processing, such as Figure 2 shown.

[0104] Step 104: perform data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data, and perform data decoding processing based on the alarm embedding vector, the graph embedding vector and the relational embedding vector to obtain a data prediction score corresponding to the alarm data.

[0105] In the embodiments of the present disclosure, the data format of the alarm data and the preset knowledge graph data includes but is not limited to: a quadruple, etc. The quadruple is a triple with time information added. Specifically, the format of the alarm data is, for example: (first header entity, first relationship data, first tail entity, first time information), the format of the preset knowledge graph data is, for example: (second header entity, second relationship data, second tail entity, second time information), etc. The embodiments of the present disclosure do not limit the content of the alarm data and the preset knowledge graph data.

[0106] Among them, when converting the first relationship data, the following methods can be used but are not limited to: one-hot embedding, etc.; when performing data decoding processing according to the alarm embedding vector, the graph embedding vector and the relationship embedding vector, it can be processed by a preset decoder, and the preset decoder includes but is not limited to: TransE decoder, etc. Specifically, the conversion method of the first relationship data and the preset decoder are not limited in the embodiments of the present disclosure.

[0107] The acquisition of the data prediction score corresponding to the alarm data can be achieved by, but not limited to, formula (1):

[0108]

[0109] Among them, score is the data prediction score, is the graph embedding vector, is the warning embedding vector, z r Embed the relationship vector.

[0110] In order to facilitate understanding of the process of performing data decoding processing according to the alarm embedding vector, the graph embedding vector and the relationship embedding vector in the present disclosure to obtain the data prediction score corresponding to the alarm data, the embodiment of the present disclosure provides a schematic diagram of the principle of decoding processing, such as Figure 3 As shown, where score is the data prediction score, is the graph embedding vector, is the warning embedding vector, z r is the relation embedding vector, and TransE is the decoder.

[0111] Step 105, when the data prediction score is greater than a preset score threshold, the alarm data is added to the preset knowledge graph data for data construction processing to obtain a target knowledge graph.

[0112] In the embodiment of the present disclosure, the preset score threshold is a threshold set by a user, for example, 0.1, 0.2, etc. Specifically, the embodiment of the present disclosure does not limit the setting of the preset score threshold.

[0113] After learning and training the knowledge reasoning method, the corresponding prediction score (data prediction score) can be obtained, and the knowledge fusion operation can be performed according to the prediction score. For the alarm data with a prediction score lower than the threshold m (preset score threshold), it is chosen to be discarded to reduce the redundant information in the knowledge graph. For the alarm data with a prediction score higher than the threshold m, the corresponding alarm data is added to the preset knowledge graph data to obtain the target knowledge graph.

[0114] By fusing knowledge based on the prediction scores, it is possible to accurately screen and retain alarm data with high prediction scores, thereby improving the accuracy and effectiveness of the target knowledge graph.

[0115] The knowledge graph construction method provided by the present disclosure performs data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data; performs time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data, and performs time coding processing according to the second embedding vector to obtain a second time coding vector corresponding to the preset knowledge graph data; performs data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data, and performs data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data; performs data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data, and performs data decoding processing according to the alarm embedding vector, the graph embedding vector and the relation embedding vector to obtain a data prediction score corresponding to the alarm data; when the data prediction score is greater than a preset score threshold, the alarm data is added to the preset knowledge graph data for data construction processing to obtain a target knowledge graph. Compared with the related art, the embodiment of the present disclosure obtains the data prediction score of the alarm data by performing data conversion, time encoding and data fusion on the alarm data and the preset knowledge graph data, and decoding the obtained alarm embedding vector, graph embedding vector and relationship embedding vector, and constructing the target knowledge graph with the alarm data with a higher data prediction score and the knowledge graph data, so as to deeply mine the structural features and time features of the alarm data and construct a complete, accurate and time-series alarm knowledge graph.

[0116] In one possible implementation of the embodiment of the present disclosure, as a refinement of the above step 101, regarding the acquisition of the first embedding vector and the second embedding vector, the embodiment of the present disclosure provides a flow chart of a method for acquiring a structural feature vector, such as Figure 4 As shown, including:

[0117] Step 401: perform data encoding processing on the alarm data through a preset conversion algorithm to obtain first encoded data, and obtain the first embedded vector by multiplying the first encoded data with a first preset embedding matrix.

[0118] In an embodiment of the present disclosure, the method for performing data encoding processing on the alarm data may adopt but is not limited to: a one-hot encoding method, the first preset embedding matrix is ​​a custom-set embedding matrix, or an embedding matrix carried in the alarm data, specifically, the method for performing data encoding processing on the alarm data and the first preset embedding matrix can be determined based on actual conditions, and the embodiment of the present disclosure does not impose any restrictions.

[0119] The calculation of the first embedding vector can be performed by but not limited to formula (2):

[0120] x o,t =W0u i ,t∈0,...,T Formula (2)

[0121] Among them, x o,t is the first embedding vector, W0 is the first preset embedding matrix, u i The first coded data.

[0122] Step 402: performing data encoding processing on the central entity data in the preset knowledge graph data through the preset conversion algorithm to obtain central encoded data, and performing data encoding processing on the neighbor data in the preset knowledge graph data through the preset conversion algorithm to obtain neighbor encoded data; wherein the neighbor data is data adjacent to the central entity data in the preset knowledge graph data.

[0123] In the embodiment of the present disclosure, the central entity data is the data located in the preset knowledge graph data center, and the neighbor data is the data adjacent to the central entity data in the preset knowledge graph data, wherein the neighbor data contains multiple layers of data. When data encoding is performed on the neighbor data, each layer of the neighbor data needs to be encoded to obtain the neighbor encoding data corresponding to each layer of the neighbor data. Specifically, the number of layers of the neighbor data depends on actual conditions and is not limited in the embodiment of the present disclosure.

[0124] It should be noted that, regarding the multiple layers of neighbor data, it can be understood that: in the preset knowledge graph data, in the direction from the preset knowledge graph data center to the direction away from the preset knowledge graph data center, the data adjacent to the central entity data is the first layer of neighbor data, the data adjacent to the first layer of neighbor data is the second layer of neighbor data, ..., the data adjacent to the n-1th layer of neighbor data is the nth layer of neighbor data, then the number of layers of the neighbor data is n.

[0125] Step 403: Perform vector calculation processing using the center coded data, the neighbor coded data, and a second preset embedding matrix to obtain the second embedding vector.

[0126] In the embodiment of the present disclosure, the calculation of the second embedding vector may be performed using, but not limited to, formula (3):

[0127]

[0128] Among them, x s,t is the second embedding vector, Encode the neighbor, is the central encoding data, N represents the number of neighbors corresponding to each layer of neighbor data, and after L layers of feature aggregation, the entity e is obtained. i The structural encoding feature is the second embedding vector x s,t , W r (l-1) and W s (l-1) Represents the specific transformation matrix of each layer, that is, the second embedded matrix.

[0129] It should be noted that the second preset embedding matrix at least includes the embedding matrix W corresponding to the central coding data s (l-1) And the embedding matrix W corresponding to the neighbor encoding data r (l-1) The second preset embedding matrix is ​​a custom-set embedding matrix, or an embedding matrix carried in the preset knowledge graph data. Specifically, the second preset embedding matrix can be determined according to actual conditions, and the present disclosure embodiment does not limit it.

[0130] In one implementable method of the embodiment of the present disclosure, as a refinement of the above-mentioned step 102, since when obtaining the first time coding vector, the first embedded vector can be directly time-coded through a preset coding algorithm, therefore, when obtaining the first time coding vector, it can be implemented by but not limited to the following method: time-coding the first embedded vector through a preset coding algorithm to obtain the first time coding vector corresponding to the alarm data.

[0131] In the embodiment of the present disclosure, the preset encoding algorithm is a custom-set algorithm, such as a gated recurrent unit (GRU) algorithm, etc. Specifically, the embodiment of the present disclosure does not limit the preset encoding algorithm.

[0132] The calculation of the first temporal coding vector may be performed using, but not limited to, formula (4):

[0133] zo,t =GRU(x o,t ,Z) Formula (4)

[0134] Among them, z o,t is the first time coding vector, x o,t is the first embedding vector, Z is a custom-set vector, which may be blank data or a vector of all zeros. Specifically, the setting of the vector Z depends on the actual application and is not limited in the embodiments of the present disclosure.

[0135] In an implementable manner of the embodiment of the present disclosure, as a refinement of the above step 102, when obtaining the second time coding vector, the embodiment of the present disclosure provides a schematic diagram of a process for obtaining the second time coding vector, such as Figure 5 As shown, including:

[0136] Step 501, obtaining the second time information of the preset knowledge graph data and the historical time information of the historical knowledge graph data; wherein the historical knowledge graph data is the knowledge graph data of the previous adjacent moment of the preset knowledge graph data.

[0137] In the embodiment of the present disclosure, the historical knowledge graph data is the most recent knowledge graph data before the preset knowledge graph data, and the second time information is the information carried in the preset knowledge graph data. Similarly, the historical time information is the information carried in the historical knowledge graph data. If the second time information is t, it means that the preset knowledge graph data is the data at time t. At this time, the historical knowledge graph data is the most recent timestamp t before time t. - The data at the time, that is, the historical time information is t - .

[0138] Specifically, the preset knowledge graph data and the historical knowledge graph data can be understood as follows: when the preset knowledge graph data is the data at 10:20, that is, the second time information is 10:20, if the knowledge graph data closest to the preset knowledge graph data before 10:20 is the data at 10:10, then the data at 10:10 is the historical knowledge graph data, and the historical time information is 10:10; if the knowledge graph data closest to the preset knowledge graph data before 10:20 is the data at 10:19, then the data at 10:19 is the historical knowledge graph data, and the historical time information is 10:19.

[0139] Step 502: Perform data calculation and processing according to the second time information, the historical time information and a preset attenuation parameter to obtain a data attenuation coefficient.

[0140] In the embodiment of the present disclosure, when calculating the data attenuation coefficient, the following formula (5) may be used but is not limited thereto:

[0141]

[0142] in, is the data attenuation coefficient, t is the second time information, t - is the historical time information, λ z and b z The preset attenuation parameter is a trainable parameter obtained by training the preset encoder. It should be noted that the initial preset attenuation parameter is a custom-set parameter. With the training of the preset encoder, the trained attenuation parameter, i.e., the preset attenuation parameter, can be obtained.

[0143] Step 503, performing multiplication calculation on the data attenuation coefficient and the historical embedding vector to obtain an attenuation vector; wherein the historical embedding vector is a vector converted from the historical knowledge graph data.

[0144] In the embodiment of the present disclosure, when calculating the attenuation vector, the following formula (6) may be used but is not limited thereto:

[0145]

[0146] in, is the attenuation vector, is the data attenuation coefficient, is the history embedding vector.

[0147] It should be noted that the historical embedding vector is the embedding vector obtained after the historical knowledge graph data is converted. The acquisition process of the historical embedding vector is consistent with the acquisition process of the second embedding vector. For details, please refer to the above Figure 4 The instructions are in , so I will not repeat them here.

[0148] Step 504: perform time coding processing on the second embedding vector and the attenuation vector by using a preset coding algorithm to obtain the second time coding vector.

[0149] In the embodiment of the present disclosure, the second time coding vector may be obtained by using, but not limited to, formula (7):

[0150]

[0151] Among them, z s,t is the second time code vector, x s,tis the second embedding vector, is the attenuation vector.

[0152] In an implementable manner of the embodiment of the present disclosure, as a refinement of the above step 103, when obtaining the alarm embedding vector, the embodiment of the present disclosure provides a schematic diagram of the process of obtaining the alarm embedding vector, such as Figure 6 As shown, including:

[0153] Step 601: Acquire first data missing information of the alarm data, wherein the alarm data includes first header entity data, the first relationship data, first tail entity data and first time information.

[0154] In an embodiment of the present disclosure, the alarm data can be represented by a four-tuple, namely (first header entity, first relationship data, first tail entity, first time information), regarding the content of the alarm data, for example: OOM abnormal alarm, associated platform, PaaS platform, 2022-11-15), where "OOM abnormal alarm" represents the first header entity, represented by s, "associated platform" represents the first relationship data, represented by r, "PaaS platform" represents the first tail entity, represented by o, and "2022-11-15" represents the first time information, represented by t. At this time, the alarm data can be expressed as (s, r, o, t).

[0155] When obtaining the first data missing information, the alarm data can be represented as (s, r, o, t). If the alarm data has missing data, the first data missing information can be directly obtained. For example, when the alarm data is detected to be (s, r, ?, t), it means that the first tail entity of the alarm data is missing. At this time, the content of the first data missing information can be: the alarm data is a four-tuple (s, r, ?, t) with the tail entity missing. Specifically, the content, format, etc. of the first data missing information can be customized, and the embodiments of the present disclosure are not limited thereto.

[0156] Step 602: performing matching processing from a preset database according to the first data missing information to obtain a first gating frequency corresponding to the alarm data.

[0157] In the embodiment of the present disclosure, the preset database is a custom database, which at least includes a comparison table of data missing information. The form of the comparison table includes but is not limited to the form of Table 1:

[0158] Table 1

[0159]

[0160] By referring to the comparison table, the representation corresponding to the first data missing information is added to obtain the first gating frequency corresponding to the alarm data. For example, when the first data missing information is: the alarm data is a four-tuple (s, r, ?, t) with a missing tail entity, referring to the comparison table, all the representations corresponding to the missing tail entities are added to obtain the first gating frequency.

[0161] Step 603: Perform weight calculation processing on the first gating frequency through a preset sensing algorithm to obtain a first weight corresponding to the alarm data.

[0162] In the embodiment of the present disclosure, the preset perception algorithm is a custom-set algorithm, such as a multi-layer perceptron (MLP) algorithm, etc. Specifically, the embodiment of the present disclosure does not limit the preset perception algorithm.

[0163] The first weight may be obtained by using, but not limited to, formula (8):

[0164] η oo =MLP oo (F o ) Formula (8)

[0165] Among them, η oo is the first weight, F o is the first gating frequency.

[0166] Step 604: Perform data merging processing on the first embedding vector and the first time coding vector according to the first weight to obtain the alarm embedding vector corresponding to the alarm data.

[0167] In the embodiment of the present disclosure, the acquisition of the alarm embedding vector may be performed using, but not limited to, formula (9):

[0168]

[0169] in, is the warning embedding vector, x o,t is the first embedding vector, z o,t is the first time coding vector, η oo is the first weight.

[0170] In one implementable manner of the embodiment of the present disclosure, as a refinement of the above-mentioned step 103, when obtaining the graph embedding vector, it can also be implemented in but not limited to the following manner: obtaining second data missing information of the preset knowledge graph data, wherein the preset knowledge graph data includes second head entity data, the second relationship data, second tail entity data and second time information; performing matching processing from a preset database according to the second data missing information to obtain a second gating frequency corresponding to the preset knowledge graph data; performing weight calculation processing on the second gating frequency through a preset perception algorithm to obtain a second weight corresponding to the preset knowledge graph data; performing data merging processing on the second embedding vector and the second time coding vector according to the second weight to obtain the alarm embedding vector corresponding to the preset knowledge graph data.

[0171] For the specific implementation process of the embodiments of the present disclosure, please refer to the above Figure 6 The instructions are in , so I will not repeat them here.

[0172] It should be noted that the second weight may be obtained by using, but not limited to, formula (10):

[0173] η os =MLP oo (F s ) Formula (10)

[0174] Among them, η os is the second weight, F s is the second gating frequency.

[0175] Regarding the acquisition of the graph embedding vector, the following formula (11) may be used but is not limited thereto:

[0176]

[0177] in, is the graph embedding vector, x s,t is the second embedding vector, z s,t is the second time coding vector, n os is the second weight.

[0178] In one implementable manner of the disclosed embodiment, since the alarm data is continuously generated, new alarm data will be continuously added to the preset knowledge graph data, which will inevitably cause the target knowledge graph to become larger and larger and contain more historical redundant entities. Therefore, in order to adapt to the growing demand for alarm data, the following method may also be used but is not limited to: obtaining the third time information of each data in the target knowledge graph; deleting the data in the target knowledge graph whose third time information is before the preset time threshold from the target knowledge graph.

[0179] In the embodiment of the present disclosure, the preset time threshold is a threshold set by a user, such as tn, tm, etc. Specifically, the embodiment of the present disclosure does not limit the preset time threshold.

[0180] In order to facilitate understanding of the implementation process of the embodiment of the present disclosure, a flowchart of data filtering is provided, as shown in FIG. Figure 7 As shown, the preset time threshold is set to tn, and by judging t in the alarm data quadruple, the alarm data before time tn is discarded, and the alarm data after tn is retained.

[0181] In one possible implementation of the embodiment of the present disclosure, it should be noted that the preset decoder and the preset encoder need to be trained before they can be used normally. When training the preset decoder, in order to better obtain the prediction score, the present application designs a corresponding loss function for iterative training. For each warning data quadruple (s, r, o, t), when time t is within the range of T = [tn, t], the quadruple (s, r, o, t′) not within the range of T is taken as a negative sample to enhance the robustness of the neural network. The specific loss function expression can be shown by formula (12):

[0182]

[0183] In summary, the embodiments of the present disclosure can achieve the following effects:

[0184] 1. The disclosed embodiment converts, time encodes and fuses the alarm data and preset knowledge graph data, and decodes the obtained alarm embedding vector, graph embedding vector and relationship embedding vector to obtain the data prediction score of the alarm data. The alarm data with a higher data prediction score is combined with the knowledge graph data to construct a target knowledge graph, which can deeply mine the alarm data's own characteristics, alarm time characteristics, etc., and can construct a complete, accurate and time-series alarm knowledge graph.

[0185] 2. The disclosed embodiment can deeply mine the entity features of alarm data and dynamically construct a time-series knowledge graph through an encoder-decoder-based knowledge reasoning method, so that the constructed target knowledge graph has relatively complete and comprehensive content and good scalability, and can adapt to the growing demand for alarm data.

[0186] 3. The embodiment of the present disclosure introduces a structural coding algorithm in the encoder, which helps to deeply explore the entity features of the alarm data and the multi-hop neighbor features of the central entity data of the preset knowledge graph data, and can more comprehensively understand and analyze the alarm data and provide more accurate reasoning results.

[0187] 4. The disclosed embodiment proposes a time coding algorithm in the encoder, which can effectively mine the time characteristics of the alarm data. By modeling and analyzing the time information, the temporal nature of the alarm data can be better understood, thereby more accurately locating and inferring faults.

[0188] 5. The disclosed embodiment handles time heterogeneity through a time heterogeneity processing algorithm, which can handle the sparsity and variability characteristics of alarm data in the real world, adapt to the dynamic changes of alarm data, and provide stable and efficient reasoning results.

[0189] 6. The disclosed embodiment uses knowledge fusion technology and knowledge judgment technology to retain or discard alarm data, which can remove redundant relationships and entities in the target knowledge graph and retain core features to meet the needs of scenarios with high computing speed requirements and more complex fault location.

[0190] Corresponding to the above-mentioned knowledge graph construction method, the present invention also proposes a knowledge graph construction device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0191] Figure 8 A schematic diagram of a knowledge graph construction device provided in an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, including:

[0192] A conversion unit 81 is used to perform data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data;

[0193] A first encoding unit 82, configured to perform time encoding processing according to the first embedding vector to obtain a first time encoding vector corresponding to the alarm data;

[0194] A second encoding unit 83, configured to perform time encoding processing according to the second embedding vector to obtain a second time encoding vector corresponding to the preset knowledge graph data;

[0195] A first merging unit 84 is used to perform data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data;

[0196] A second merging unit 85 is used to perform data merging processing on the second embedding vector and the second time encoding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data;

[0197] The conversion unit 81 is further used to perform data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data;

[0198] A decoding unit 86, configured to perform data decoding processing according to the warning embedding vector, the graph embedding vector and the relationship embedding vector to obtain a data prediction score corresponding to the warning data;

[0199] The construction unit 87 is used to add the alarm data to the preset knowledge graph data for data construction processing to obtain a target knowledge graph when the data prediction score is greater than a preset score threshold.

[0200] The knowledge graph construction device provided by the present disclosure performs data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data; performs time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data, and performs time coding processing according to the second embedding vector to obtain a second time coding vector corresponding to the preset knowledge graph data; performs data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data, and performs data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data; performs data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data, and performs data decoding processing according to the alarm embedding vector, the graph embedding vector and the relation embedding vector to obtain a data prediction score corresponding to the alarm data; when the data prediction score is greater than a preset score threshold, the alarm data is added to the preset knowledge graph data for data construction processing to obtain a target knowledge graph. Compared with the related art, the embodiment of the present disclosure obtains the data prediction score of the alarm data by performing data conversion, time encoding and data fusion on the alarm data and the preset knowledge graph data, and decoding the obtained alarm embedding vector, graph embedding vector and relationship embedding vector, and constructing the target knowledge graph with the alarm data with a higher data prediction score and the knowledge graph data, so as to deeply mine the structural features and time features of the alarm data and construct a complete, accurate and time-series alarm knowledge graph.

[0201] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig. 9 As shown, the conversion unit 81 includes:

[0202] The encoding module 811 is used to perform data encoding processing on the warning data through a preset conversion algorithm to obtain first encoded data;

[0203] A calculation module 812, configured to obtain the first embedding vector by multiplying the first encoded data with a first preset embedding matrix;

[0204] The encoding module 811 is also used to perform data encoding processing on the central entity data in the preset knowledge graph data through the preset conversion algorithm to obtain central encoded data, and to perform data encoding processing on the neighbor data in the preset knowledge graph data through the preset conversion algorithm to obtain neighbor encoded data; wherein the neighbor data is data adjacent to the central entity data in the preset knowledge graph data;

[0205] The calculation module 812 is further configured to perform vector calculation processing using the center coded data, the neighbor coded data and a second preset embedding matrix to obtain the second embedded vector.

[0206] Furthermore, in a possible implementation of the embodiment of the present disclosure, the first encoding unit 82 is further used to perform time encoding processing on the first embedded vector through a preset encoding algorithm to obtain the first time coding vector corresponding to the alarm data.

[0207] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig. 9 As shown, the second encoding unit 83 includes:

[0208] The acquisition module 831 is used to acquire the second time information of the preset knowledge graph data and the historical time information of the historical knowledge graph data; wherein the historical knowledge graph data is the knowledge graph data of the previous adjacent time of the preset knowledge graph data;

[0209] A calculation module 832, configured to perform data calculation processing according to the second time information, the historical time information and a preset attenuation parameter to obtain a data attenuation coefficient;

[0210] The calculation module 832 is further used to obtain an attenuation vector by multiplying the data attenuation coefficient and the historical embedding vector; wherein the historical embedding vector is a vector converted from the historical knowledge graph data;

[0211] The encoding module 833 is used to perform time encoding processing on the second embedding vector and the attenuation vector by using a preset encoding algorithm to obtain the second time coding vector.

[0212] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig. 9 As shown, the first merging unit 84 includes:

[0213] An acquisition module 841 is configured to acquire first data missing information of the warning data, wherein the warning data includes first header entity data, the first relationship data, first tail entity data, and first time information;

[0214] A matching module 842, configured to perform matching processing from a preset database according to the first data missing information to obtain a first gating frequency corresponding to the alarm data;

[0215] A calculation module 843, configured to perform weight calculation processing on the first gating frequency by using a preset sensing algorithm to obtain a first weight corresponding to the alarm data;

[0216] The merging module 844 is used to perform data merging processing on the first embedding vector and the first time coding vector according to the first weight to obtain the alarm embedding vector corresponding to the alarm data.

[0217] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig. 9 As shown, the second merging unit 85 includes:

[0218] An acquisition module 851 is used to acquire second data missing information of the preset knowledge graph data, wherein the preset knowledge graph data includes second head entity data, the second relationship data, second tail entity data and second time information;

[0219] A matching module 852 is used to perform matching processing from a preset database according to the second data missing information to obtain a second gating frequency corresponding to the preset knowledge graph data;

[0220] A calculation module 853 is used to perform weight calculation processing on the second gating frequency through a preset perception algorithm to obtain a second weight corresponding to the preset knowledge graph data;

[0221] The merging module 854 is used to perform data merging processing on the second embedding vector and the second time coding vector according to the second weight to obtain the alarm embedding vector corresponding to the preset knowledge graph data.

[0222] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Fig. 9 As shown, the device also includes:

[0223] An acquisition unit 88, configured to acquire third time information of each data in the target knowledge graph;

[0224] The deleting unit 89 is used to delete the data in the target knowledge graph whose third time information is before a preset time threshold from the target knowledge graph.

[0225] It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principle is the same, which is no longer limited in the embodiment of the present disclosure.

[0226] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0227] Fig.10A schematic block diagram of an example electronic device 1000 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0228] like Fig.10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1002 or a computer program loaded from a storage unit 1008 to a RAM (Random Access Memory) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An I / O (Input / Output) interface 1005 is also connected to the bus 1004.

[0229] A number of components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0230] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as the construction method of the knowledge graph. For example, in some embodiments, the construction method of the knowledge graph may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the aforementioned knowledge graph construction method in any other appropriate manner (for example, by means of firmware).

[0231] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0232] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0233] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0234] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0235] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0236] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0237] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0238] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0239] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for constructing a knowledge graph, characterized in that: include: Performing data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data; Performing time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data, and performing time coding processing according to the second embedding vector to obtain a second time coding vector corresponding to the preset knowledge graph data; Performing data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data, and performing data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data; Performing data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data, and performing data decoding processing according to the alarm embedding vector, the graph embedding vector and the relation embedding vector to obtain a data prediction score corresponding to the alarm data; When the data prediction score is greater than a preset score threshold, the alarm data is added to the preset knowledge graph data for data construction processing to obtain a target knowledge graph.

2. The method according to claim 1, characterized in that The performing data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data includes: Performing data encoding processing on the warning data by a preset conversion algorithm to obtain first encoded data, and obtaining the first embedded vector by multiplying the first encoded data with a first preset embedding matrix; Performing data encoding processing on the central entity data in the preset knowledge graph data by the preset conversion algorithm to obtain central encoded data, and performing data encoding processing on the neighbor data in the preset knowledge graph data by the preset conversion algorithm to obtain neighbor encoded data; wherein the neighbor data is data adjacent to the central entity data in the preset knowledge graph data; The second embedding vector is obtained by performing vector calculation processing on the center coded data, the neighbor coded data and a second preset embedding matrix.

3. The method according to claim 1, characterized in that The performing time coding processing according to the first embedding vector to obtain a first time coding vector corresponding to the alarm data comprises: The first embedded vector is time-coded by using a preset coding algorithm to obtain the first time coding vector corresponding to the alarm data.

4. The method according to claim 1, characterized in that: The performing time coding processing according to the second embedding vector to obtain the second time coding vector corresponding to the preset knowledge graph data includes: Obtaining second time information of preset knowledge graph data and historical time information of historical knowledge graph data; wherein the historical knowledge graph data is the knowledge graph data of the previous adjacent moment of the preset knowledge graph data; Perform data calculation and processing according to the second time information, the historical time information and a preset attenuation parameter to obtain a data attenuation coefficient; A decay vector is obtained by multiplying the data decay coefficient and the historical embedding vector; wherein the historical embedding vector is a vector converted from the historical knowledge graph data; The second embedding vector and the attenuation vector are subjected to time coding processing by a preset coding algorithm to obtain the second time coding vector.

5. The method according to claim 1, characterized in that The performing data merging processing on the first embedding vector and the first time coding vector to obtain the alarm embedding vector corresponding to the alarm data comprises: Acquire first data missing information of the warning data, wherein the warning data includes first header entity data, the first relationship data, first tail entity data, and first time information; Perform matching processing from a preset database according to the first data missing information to obtain a first gating frequency corresponding to the alarm data; Performing weight calculation processing on the first gating frequency by a preset sensing algorithm to obtain a first weight corresponding to the alarm data; Data merging processing is performed on the first embedding vector and the first time coding vector according to the first weight to obtain the alarm embedding vector corresponding to the alarm data.

6. The method according to claim 1, characterized in that The performing data merging processing on the second embedding vector and the second time coding vector to obtain the graph embedding vector corresponding to the preset knowledge graph data comprises: Obtaining second data missing information of the preset knowledge graph data, wherein the preset knowledge graph data includes second head entity data, the second relationship data, second tail entity data, and second time information; Perform matching processing from a preset database according to the second data missing information to obtain a second gating frequency corresponding to the preset knowledge graph data; Performing weight calculation processing on the second gating frequency by using a preset perception algorithm to obtain a second weight corresponding to the preset knowledge graph data; The second embedding vector and the second time coding vector are subjected to data merging processing according to the second weight to obtain the alarm embedding vector corresponding to the preset knowledge graph data.

7. The method according to claim 1, characterized in that After adding the warning data to the preset knowledge graph data for data construction processing to obtain the target knowledge graph, the method further includes: Obtaining third time information of each data in the target knowledge graph; The data in the target knowledge graph whose third time information is before a preset time threshold is deleted from the target knowledge graph.

8. A device for constructing a knowledge graph, characterized in that: include: A conversion unit, used to perform data conversion processing on the alarm data and the preset knowledge graph data respectively to obtain a first embedding vector corresponding to the alarm data and a second embedding vector corresponding to the preset knowledge graph data; A first encoding unit, configured to perform time encoding processing according to the first embedding vector to obtain a first time encoding vector corresponding to the alarm data; A second encoding unit, configured to perform time encoding processing according to the second embedding vector to obtain a second time encoding vector corresponding to the preset knowledge graph data; A first merging unit, configured to perform data merging processing on the first embedding vector and the first time coding vector to obtain an alarm embedding vector corresponding to the alarm data; A second merging unit, configured to perform data merging processing on the second embedding vector and the second time coding vector to obtain a graph embedding vector corresponding to the preset knowledge graph data; The conversion unit is further used to perform data conversion processing on the first relational data in the alarm data to obtain a relational embedding vector corresponding to the alarm data; A decoding unit, configured to perform data decoding processing according to the warning embedding vector, the graph embedding vector and the relationship embedding vector to obtain a data prediction score corresponding to the warning data; A construction unit is used to add the alarm data to the preset knowledge graph data for data construction processing to obtain a target knowledge graph when the data prediction score is greater than a preset score threshold.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

Citation Information

Cited By

  • Intelligent aggregation noise reduction and risk assessment method and system for network security alarm

    CN121966928A