Construction method and system based on multi-language oil field knowledge graph and computer readable storage medium
Through the multilingual oil field knowledge graph construction method, the problems of heterogeneity and dispersion of oil field data sources are solved, effective expression and retrieval of oil field data are realized, and data processing and use efficiency is improved.
Patent Information
- Application Number
- CN202411105067.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the oil field exploration process, there are data heterogeneity, dispersion, semantic conflicts and image data representation problems between multilingual and heterogeneous data sources, resulting in low data integration and use efficiency, making it difficult to achieve transparent access and effective use of data.
Using multilingual oilfield knowledge graph construction method, including original data layer, knowledge extraction layer, knowledge fusion layer and storage layer, multilingual knowledge fusion is carried out through twin networks, structured, semi-structured and unstructured data are extracted, and three-dimensional Group-form knowledge graphs represent pictures and video knowledge, resolve conflicts and generate upper and lower relationships.
It realizes effective expression and retrieval of oil field data, facilitates data sharing and statistical analysis of international oil field enterprises, and improves data processing and use efficiency.
Smart Images

Figure CN119106140A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a model building method and system based on a multilingual oilfield knowledge graph. Background Art
[0002] In the process of oil field exploration, after surveying and interpreting the data of the oil field, a large amount of relevant data will be obtained, such as regional strata, sedimentary environment, porosity, permeability, oil saturation, relative permeability, interfacial tension, wettability, capillary pressure, pore structure, core, cuttings and other data. Surveyors need to explore the geological reserves of oil in the oil field based on the large amount of relevant data obtained. The survey data after survey and interpretation processing generally has a specific format. Most of the data is stored in a structured form mainly in a table in a scattered manner in a structured database; some are stored in semi-structured text in the form of information tables, and some data are stored in an unstructured database or text in the form of images or graphics, such as stratigraphic calibration maps, regional structural maps, geological profiles, etc. Dispersed storage of data is not conducive to data query, sharing, updating and maintenance.
[0003] International oilfield companies usually conduct oilfield exploration business in multiple countries, so they collect exploration data in different languages. Generally, exploration data from different countries are stored in different databases in their respective countries. These different databases are highly autonomous. When users access them, they must specify the data source (library) to be accessed. The constraints and dependencies between the data sources (libraries) must also be defined and maintained by the users and applications. The data structure is not unified, the data sources are scattered, and the data cannot be shared and transparently accessed.
[0004] When constructing data for multi-language, multi-source, and heterogeneous oilfield data, the following difficulties arise:
[0005] (1) Data heterogeneity problem
[0006] Data heterogeneity is the primary problem faced by oil and gas field enterprises when integrating multiple data sources. It is mainly manifested in two aspects:
[0007] System heterogeneity, that is, the differences between the application systems, database management systems and even operating systems that the oilfield enterprise data sources rely on, constitute the data source heterogeneous environment of the entire oilfield digital system.
[0008] Schema heterogeneity refers to the differences in storage modes of data sources. General storage modes include relational mode, object mode, object-relational mode, and document nesting mode, among which relational mode is the mainstream storage mode. It should be noted that even for the same type of storage mode, their schema structures may be different. For example, the data types used by Oracle and SQL Server are not completely consistent in expression and storage structure.
[0009] (2) Dispersion problem
[0010] Exploration data in different languages and scenarios are stored in a decentralized manner. Due to the need for rapid deployment and low investment, data from different data sources are stored in different branches or departments.
[0011] (3) Semantic conflict problem
[0012] There are semantic differences between the data sources of oilfield enterprises. These semantic differences may cause various conflicts, ranging from simple name semantic conflicts (different names represent the same concept) to complex structural semantic conflicts (different models express the same information). Semantic conflicts will bring redundancy to the results of data source integration and interfere with data processing, publishing and exchange. Therefore, semantic conflicts should be minimized.
[0013] (4) Image data representation issues
[0014] There are a large number of documents with both pictures and texts in the field of oilfield exploration. The images also contain a large amount of "graphic text" knowledge descriptions. This type of information is important oilfield data, and existing digital technologies have failed to effectively extract or express this part of knowledge.
[0015] The above problems include both common problems with ordinary heterogeneous data and specific problems with the characteristics of oilfield data itself.
[0016] Knowledge graph is the knowledge organization structure or knowledge representation method used by Google and its services. Its main purpose is to enhance data usage efficiency, improve search efficiency, and improve user experience in the era of rapid development of the Internet and explosive growth of network data. With its excellent semantic processing technology and connectivity, knowledge graph has established a foundation for data construction and information intelligence applications. It is widely used in search, question and answer, intelligence analysis, etc., and has promoted the development of information technology from information services to knowledge services. In recent years, all walks of life have been studying how to apply knowledge graphs to professional fields, such as oilfield data, to better serve the construction and use of data in specific fields. Summary of the invention
[0017] The main purpose of this application is to construct a multilingual oilfield knowledge graph, and to provide a system, method and computer-readable storage medium based on a multilingual oilfield knowledge graph construction, including four parts: original data layer, knowledge extraction layer, knowledge fusion layer and storage layer; a knowledge graph representation method for representing image knowledge and video knowledge is proposed; in the implementation of the knowledge fusion layer, a solution for multilingual knowledge fusion using a twin network is proposed.
[0018] In the first aspect, the present application proposes a system for constructing a multilingual oilfield knowledge graph, which includes four parts: an original data layer, a knowledge extraction layer, a knowledge fusion layer, and a storage layer; the characteristics of the system are:
[0019] The original data layer includes: structured data, semi-structured data and unstructured data in oilfield data;
[0020] The knowledge extraction layer includes: knowledge extraction of structured data, knowledge extraction of semi-structured data and knowledge extraction of unstructured data; knowledge extraction of structured data adopts the database to resource description framework mapping method for knowledge extraction; knowledge extraction of semi-structured data, according to the organizational structure of semi-structured data, converts semi-structured data into structured data, and then uses the database to resource description framework mapping method for knowledge extraction; knowledge extraction of unstructured data, after extracting the entity set in the unstructured data using the conditional random field model, extracts the attribute relationship of multiple entities in the entity set in the unstructured data according to the support vector machine-K nearest neighbor classification method;
[0021] The knowledge fusion layer includes multilingual data fusion, generating hierarchical relationships, and detecting and resolving conflicts;
[0022] The storage layer stores triples in the form of <entity, attribute, entity> or <subject, predicate, object> as RDF data in the graph database of the knowledge graph.
[0023] In one implementation, for picture knowledge, the picture type is used as a picture attribute and the picture is used as an attribute value to construct triple-tuple knowledge of <picture object entity, picture type, picture>.
[0024] In one embodiment, for video knowledge, the video is used as a video attribute, and the video itself or an index table of video features corresponding to the video is used as the attribute value to construct triple-tuple knowledge of <video object entity, video, video name> or <Daqing Oilfield, video, video feature index address>.
[0025] In one embodiment, a twin network is used to integrate multilingual knowledge; the language recognition results corresponding to entity corpora of multiple language types are input into a pre-trained twin network, and the entity corpora of different language types with equivalent language recognition results are connected as a whole; the twin network includes an encoding layer, a dense layer, and a prediction layer. The encoding layer in the twin network shares weights between different languages, and multiple languages are encoded simultaneously and in parallel using a bidirectional gated unit Bi-GRU. The output of the Bi-GRU is projected to the prediction layer through the dense layer to calculate the loss function, and then the entities or attributes of different languages are classified whether they have equivalent meanings.
[0026] In one implementation, the energy function uses a binary classification task model, and the binary classification task is modeled by a cosine similarity measurement model, which is expressed by the following formula:
[0027]
[0028] Among them, T1 and T2 represent the language data projected from different dense and sparse layers to the prediction layer, f is a nonlinear activation function, <·,·> is the cosine similarity of two values, and ||·|| is a modulo operation.
[0029] The twin network is trained by a preset loss function; when the output result of the cosine similarity measurement model indicates equivalence, the loss function L = It is expressed by the following formula:
[0030]
[0031] When the output of the cosine similarity metric model indicates inequality, the loss function L ≠ It is expressed by the following formula:
[0032]
[0033] Among them, m is used to control the strictness of the calculation of the cosine similarity measurement model;
[0034] If the predicted entities or attributes of the two languages are very similar, then E will approach 1, and the overall loss function L0 will be small; if the predicted E approaches -1, the entities or attributes of the two languages are not similar, and the loss function L0 is large; where m controls the strictness of the cosine similarity calculation.
[0035] In one implementation, extracting entity attribute relationships of unstructured data according to the SVM-KNN classification method may include S301-S304:
[0036] S301, obtaining the attribute text to be tested;
[0037] S302, using the SVM classification model to classify the attribute text to be tested;
[0038] S303, if the attribute text to be tested is classified as a known attribute category by the SVM classification model, then determine that the known attribute category obtained by the SVM classification is an entity attribute relationship attribute; and determine that the two entities entity1 and entity2 associated with the entity attribute relationship have a relationship type indicated by the entity attribute relationship, thereby obtaining<entity1,attribute,entity2> Knowledge in the form of triads;
[0039] S304, if the classification category obtained by the SVM classification model is not a known attribute category, a secondary classification is performed using the KNN classifier; if the attribute text to be tested does not belong to a known attribute category, that is, the attribute text to be tested is a fuzzy attribute category, a secondary classification is performed using the KNN classifier, and the cluster entity attribute relationship attribute can be obtained. cluster , and determine that the two entities entity3 and entity4 associated with the cluster entity attribute relationship have the relationship type indicated by the entity attribute relationship, thereby obtaining <entity3,attribute cluster , entity4>knowledge in triple form.
[0040] Secondly, this application proposes a method for constructing a multilingual oilfield knowledge graph.
[0041] Collect raw data from oilfield data, and collect structured data, semi-structured data, and unstructured data from oilfield data;
[0042] Perform knowledge extraction from structured data, knowledge extraction from semi-structured data, and knowledge extraction from unstructured data;
[0043] The knowledge extraction of structured data adopts the database to resource description framework mapping method to extract knowledge;
[0044] Knowledge extraction from semi-structured data: converting semi-structured data into structured data according to the organization structure of semi-structured data, and then extracting knowledge using the database to resource description framework mapping method;
[0045] Knowledge extraction from unstructured data: After extracting entity sets from unstructured data using the conditional random field model, the attribute relationships of multiple entities in the entity set in unstructured data are extracted using the support vector machine-K nearest neighbor classification method;
[0046] Achieve multilingual knowledge fusion by fusing multilingual data, generating hierarchical relationships, and detecting and resolving conflicts;
[0047] Store triples of the form <entity, attribute, entity> or <subject, predicate, object> as RDF data in the graph database of the knowledge graph.
[0048] In one implementation, for picture knowledge, the picture type is used as a picture attribute and the picture is used as an attribute value to construct triple-tuple knowledge of <picture object entity, picture type, picture>.
[0049] In one embodiment, for video knowledge, the video is used as a video attribute, and the video itself or an index table of video features corresponding to the video is used as the attribute value to construct triple-tuple knowledge of <video object entity, video, video name> or <Daqing Oilfield, video, video feature index address>.
[0050] In a third aspect, the present application further provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the above method to implement the above system.
[0051] The beneficial effects of this application include:
[0052] (1) Taking into full consideration the characteristics of oilfield data, a method for representing images and videos is proposed in the knowledge graph, so that very important images and video data in oilfield data can be expressed in the knowledge graph, which is convenient for subsequent retrieval and use.
[0053] (2) For multilingual oilfield data, a method of knowledge integration through twin networks is proposed to facilitate international companies to fully express and utilize existing data, which is conducive to subsequent data mining and statistical analysis.
[0054] 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
[0055] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0056] Figure 1 It is a schematic diagram of the knowledge graph structure of an embodiment of the present application.
[0057] Figure 2 It is a schematic diagram of a system structure based on a multilingual knowledge graph according to the present application.
[0058] Figure 3 It is a flowchart of entity attribute relationship extraction of unstructured data according to an embodiment of the present application.
[0059] Figure 4It is a twin network structure of multi-language fusion used in this application taking the knowledge fusion of two languages as an example. DETAILED DESCRIPTION
[0060] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application 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 can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0061] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0062] The purpose of this application is to construct a multilingual oilfield knowledge graph, and to provide a system, method and computer-readable storage medium based on a multilingual oilfield knowledge graph construction, including four parts: original data layer, knowledge extraction layer, knowledge fusion layer and storage layer; a knowledge graph representation method for representing image knowledge and video knowledge is proposed; in the implementation of the knowledge fusion layer, a solution for multilingual knowledge fusion using a twin network is proposed.
[0063] This application uses the Resource Descripton Framework (RDF) to define the knowledge graph structure. The structure of <entity, attribute, attribute value / entity> (also known as a "triplet") can be used to define the relationship between the object indicated by the "entity" and the value or entity indicated by the "attribute value / entity" or the relationship indicated by the "attribute" between the entity indicated by the "subject" and the entity indicated by the "object" as indicated by the "predicate". In general, the structured or semi-structured data obtained is <entity, attribute, attribute value / entity> (also known as a "triplet"), which is a structure of <subject, predicate, object> (also a "triplet") to define the relationship between the entity indicated by the "subject" and the entity indicated by the "object" as indicated by the "predicate". Knowledge in the form of <attribute, attribute value / entity>, and knowledge in the form of <subject, predicate, object> obtained from unstructured text. Generally speaking, entities can be names of people, institutions, places, and all other entities identified by names, as well as more extensive entities such as numbers, dates, currencies, addresses, etc. In the field of oilfield exploration data, entities also include: geological ages, basins, wells, tectonic units, and other entities identified by names. For example, from the unstructured text "Daqing Oilfield is located in the west of Daqing City, Heilongjiang Province, with an oil-bearing area of more than 6,000 square kilometers and 6.4 billion tons of geological reserves of oil.", we can get <Daqing Oilfield, location, Daqing City>, <Heilongjiang, subordinate cities, Daqing>, <Daqing Oilfield, oil-bearing area, 6000km 2 >, <Daqing Oilfield, geological reserves of petroleum, 6.4 billion tons>, four pieces of knowledge expressed in the form of triples. At the same time, the field of oilfield exploration contains a large amount of "graphical text" knowledge descriptions, such as geological distribution maps, rock layer profiles, well location maps, etc., as well as some precious video materials. The above are also important knowledge and need to be represented in the knowledge graph. For image knowledge, the image type is used as the image attribute and the image is used as the attribute value to construct the triple form of <image object entity, image type, image>; such as <Daqing Oilfield, geological distribution map, distribution Figure 1 .jpg>, or <Daqing Oilfield, cross-section, cross-section Figure 1 .jpg>, <Daqing Oilfield, well location map, well location Figure 1 .jpg>, etc. For video knowledge, take the video as the video attribute, and the index table of the video itself or the video feature corresponding to the video as the attribute value, and construct the triple form knowledge of <video object entity, video, video name>, or <Daqing Oilfield, video, video feature index address>; such as <Daqing Oilfield, video, Daqing Oilfield mining real image 1.MP4>, or <Daqing Oilfield, video, feature index address>, etc. The knowledge graph structure composed of the above knowledge is as follows Figure 1 shown.
[0064] Figure 2 This is an overall framework diagram of the multilingual knowledge graph constructed based on the embodiment of the present application. Figure 2 As shown in the figure, the overall framework consists of four parts: original data layer, knowledge extraction layer, knowledge fusion layer, and storage layer.
[0065] The original data layer includes structured data, semi-structured data and unstructured data. Structured data refers to relational model data, which is managed in the form of relational database tables and is stored in relational data, such as SQL server databases and oracle databases, including tables, fields, field attribute values and other structures; semi-structured data refers to data that has no relational model but has a basic fixed structure, including semi-structured data in Key-Value databases, XML documents, JSON documents, E-mail or log files; unstructured data is data with irregular data structure, no predefined data model, and is not convenient to be represented by a two-dimensional data logical table. For example, text in formats such as TXT, PDF, WORD, images in various formats, text with co-occurrence of images and text, videos, etc. are all unstructured data.
[0066] The knowledge extraction layer includes knowledge extraction of structured data, knowledge extraction of semi-structured data and knowledge extraction of unstructured data.
[0067] The knowledge extraction of structured data is carried out by using the database to resource description framework (D2R) mapping method. Specifically, the knowledge in the unstructured data is converted into entity sets and the relationships between multiple entities in the entity set according to the relational database to resource description framework mapping language (D2RML) specification and mapping configuration file. When mapping knowledge from structured data, it is necessary to determine the basic structure in the structured data, including the meaning of each table and the relationship between tables, and determine the structure of the knowledge graph, and then use the D2RML language to associate the tables in the structured data with the concepts or entities in the knowledge graph. The configuration file mapping includes: table-concept, record-entity, column name-attribute, record data-attribute value and table association-relationship; after defining the mapping configuration file, the knowledge can be converted from the source database according to the configuration. The specific process can be: the knowledge conversion engine connects to the target database configured in the configuration file, reads the data in the corresponding table, maps the table and column data in the relational database into conceptual entities, relationships between entities and attributes of entities, and then adds the mapped knowledge to the knowledge graph.
[0068] To extract knowledge from semi-structured data, it is necessary to convert it into structured data according to its data organization structure, and then use the above-mentioned knowledge extraction method for structured data to extract knowledge.
[0069] The following Table 1 shows an example of semi-structured data, which is basic information about the Liuhua Oilfield.
[0070] Table 1 Basic information of Liuhua 16-2 oilfield
[0071]
[0072] First, extract the key entity names, entity attributes, and attribute values corresponding to the entity attributes from the semi-structured data; determine whether the entity attributes are in the pre-set standard attribute specification table; if the entity attributes are in the pre-set standard attribute specification table, determine the entity attributes as attributes according to the standard dictionary table to form structured data in the form of a triple of <entity name, entity attribute, entity attribute value>. For example, for the semi-structured data shown in Table 1, since the location and sea water depth are in the standard attribute specification table, two pieces of knowledge <Liuhua 16-2 Oilfield, location, northern South China Sea is about 240km away from Hong Kong> and <Liuhua 16-2 Oilfield, sea water depth, 370-410m> can be obtained; if the entity attributes are not in the pre-set standard attribute specification table, the entity attributes are relationally mapped according to the professional knowledge classification to form structured data. For example, if the reserve abundance is not in the standard specification table of the attribute name, then according to the professional knowledge, the reserve abundance is mapped to the "oil reserve density" attribute to obtain <Liuhua 16-2 Oilfield, oil reserve density, 300*10 4 m 3 / km 2 >This knowledge. After that, the knowledge can be added to the knowledge graph according to the knowledge extraction method of structured knowledge.
[0073] For unstructured data, the conditional random field algorithm (CRF) is used to extract the entity set in the unstructured data, and the support vector machine-k-nearest neighbor (SVM-KNN) classification method is used to extract the attribute relations of multiple entities in the entity set in the unstructured data.
[0074] Specifically, the CRF model is a conditional probability distribution model of another set of output random variables under the condition of a given set of input random variables. Among them, the parameterized form of the CRF model can be: for the observation sequence x = (x1, x2, ..., xn) and the state sequence y = (y1, y2, ..., yn), let P (y|x) be a linear chain conditional random field, then under the condition that the random variable X takes the value of x, the conditional probability of the random variable Y taking the value of y is as follows:
[0075]
[0076] in,
[0077] f k and h l is the characteristic function, λ k and μ l is the corresponding weight, and Z(x) is the normalization factor.
[0078] The process of named entity recognition is a sequence labeling process, which regards a sentence as an observation sequence, each character or word in the sentence as a symbol, and then assigns a state to the symbol. k and μ l , and obtain the conditional probability of satisfying the condition.
[0079] For an input sequence, the most likely output tag sequence, that is, the optimal state sequence, is:
[0080]
[0081] The process of extracting entities from unstructured data based on the CRF model can be specifically as follows: when the corpus is a training corpus, the corpus is preprocessed and feature selected to obtain a data feature set, the data feature set is trained by CRF and imported into the CRF model to obtain an entity set; when the corpus is a test corpus, the corpus is preprocessed and imported into the CRF model to obtain an entity set. The corpus is a basic matching database; the selected features may include: language features, context features, and entity boundary features, but are not limited thereto.
[0082] Language features can reflect the basic information of characters and are a kind of basic features, such as vocabulary features, semantic features, grammatical features, etc. Context features refer to the interdependence between observations within the length of the entity vocabulary window. This feature can well describe the dependency within the entity and the relationship between the entity and the non-entity; the entity boundary feature is an important basis for determining the position information of the character boundary feature. Determining the boundary of the named entity plays a vital role in named entity recognition.
[0083] The embodiment of the present application adopts the BIO encoding mode to describe the word boundary features of the observation sequence and encode the entity type, where B represents the beginning of the entity, I represents the remaining part of the entity, and O represents a non-entity sequence. The CRF model tool needs to use a user-defined template file (Template File) to train the training corpus, and the feature template is shown in Table 2 below.
[0084] Table 2 Basic feature template
[0085]
[0086] Each row represents a feature template, which can determine a token in the training data. The basic format of the feature template is %x[row,col], where row represents the relative row number of the current token and col represents the absolute column number.
[0087] The present application embodiment uses the SVM-KNN classification method to extract entity attribute relationships from unstructured data. Figure 3 As shown in , extracting entity attribute relationships of unstructured data according to the SVM-KNN classification method may include S301-S304:
[0088] S301, obtaining the attribute text to be tested;
[0089] S302, using the SVM classification model to classify the attribute text to be tested; the corpus for training the SVM classification model may include training corpus and test corpus; in order to obtain the annotated corpus, it is necessary to perform part-of-speech tagging, stem extraction, syntactic analysis, predicate extraction and semantic role tagging on the expected. The features used in the embodiment of the present application include language features, context features and entity boundary features. Among them, the language features may include entity features, entity extension features, verb root features and semantic role features; among them, the context features may include entities and the words before and after them, word stems and parts of speech; among them, entity boundary features include: entity distance features, and word features between entities.
[0090] S303, if the attribute text to be tested is classified as a known attribute category by the SVM classification model, then determine that the known attribute category obtained by the SVM classification is an entity attribute relationship attribute; and determine that the two entities entity1 and entity2 associated with the entity attribute relationship have a relationship type indicated by the entity attribute relationship, thereby obtaining<entity1,attribute,entity2> Knowledge in the form of triads;
[0091] S304, if the classification category obtained by the SVM classification model is not a known attribute category, a secondary classification is performed using the KNN classifier; if the attribute text to be tested does not belong to a known attribute category, that is, the attribute text to be tested is a fuzzy attribute category, a secondary classification is performed using the KNN classifier, and the cluster entity attribute relationship attribute can be obtained. cluster , and determine that the two entities entity3 and entity4 associated with the cluster entity attribute relationship have the relationship type indicated by the entity attribute relationship, thereby obtaining <entity3,attribute cluster , entity4>knowledge in triple form.
[0092] The knowledge fusion layer includes multilingual data fusion, generating hierarchical relationships, and detecting and resolving conflicts; among them, the multilingual data fusion layer includes entity alignment in different languages and entity attribute alignment in different languages; attribute relationships further have hierarchical relationships, so it is also necessary to generate hierarchical relationships between attribute relationships, such as the hierarchical relationships between provinces, cities, districts / counties in geographical location relationships. Therefore, for the entity set obtained by the knowledge extraction layer and the attribute relationships of multiple entities in the entity set, it is also necessary to construct a knowledge graph according to the generated hierarchical relationships. When the knowledge extracted from multiple data sources is integrated into the knowledge graph after fusion, various types of data conflict problems need to be resolved, such as one phrase corresponding to multiple entities, inconsistent entity attribute names, missing entity attributes, inconsistent entity attribute values, one-to-many mapping of entity attribute values, etc., so it is necessary to detect and resolve the above conflicts between knowledge.
[0093] Regarding the multilingual knowledge fusion layer, a twin network is used to fuse multilingual knowledge; the language recognition results corresponding to entity corpora of multiple language types are input into the pre-trained twin network, and the entity corpora of different language types with equivalent language recognition results are connected as a whole; the twin network includes an encoding layer, a sparse layer, and a prediction layer. The encoding layer in the twin network shares weights between different languages, and multiple languages are encoded simultaneously and in parallel using a bidirectional gated unit Bi-GRU. The output of the Bi-GRU is projected to the prediction layer through the sparse layer to calculate the loss function, and then the entities or attributes of different languages are classified to see whether they have equivalent meanings.
[0094] The twin network includes a matching network corresponding to each language type. Taking the knowledge fusion of two languages as an example, the twin network structure of multi-language fusion is as follows: Figure 4 shown.
[0095] Multilingual text matching is a process of isomorphism judgment. Entities or attributes in different languages can be matched across languages to determine whether they refer to the same entity or attribute in the real world. Based on equivalence judgment, equivalent entities or equivalent attributes in different language knowledge are connected as a whole. This implementation uses a twin network with shared weights to encode multiple languages simultaneously and in parallel using a bidirectional gated unit (Bi-GRU). The output of the Bi-GRU is projected to the prediction layer through a sparse layer to calculate the loss function and classify whether entities or attributes in different languages have equivalent meanings.
[0096] The gated recurrent neural network (GRU) has two gates, a reset gate and an update gate. The reset gate determines how to combine new input information with previous memory, and the update gate defines the amount of previous memory saved to the current time step, so it can better capture dependencies with larger time step distances in time series.
[0097] Each matching network in the twin network includes a representation layer, a coding layer and a dense layer in sequence; the twin network also includes a prediction layer connected to the dense layer in each matching network; the representation layer is connected to the output layer of each language model; the coding layer uses a bidirectional gated unit Bi-GRU model; the coding layers in different matching networks share weights and encode the language data output by the representation layer in parallel at the same time; it is projected to the prediction layer through the dense layer; the prediction layer is used to calculate the energy function of the language data projected by different dense layers to determine whether they are equivalent.
[0098] In this embodiment, a scheme of matching multiple languages in pairs is adopted. For example, if the corpus data includes three languages, namely Chinese, English and French, then when performing multi-language matching, Chinese and English are matched, English and French are matched, and Chinese and French are matched. Therefore, the energy function in the embodiment adopts a binary classification task model, and the binary classification task is modeled by the cosine similarity measurement model, which is expressed by the following formula:
[0099]
[0100] Among them, T1 and T2 represent the language data projected from different dense and sparse layers to the prediction layer, f is a nonlinear activation function, <·,·> is the cosine similarity of two values, and ||·|| is a modulo operation.
[0101] The twin network is trained by a preset loss function; when the output result of the cosine similarity measurement model indicates equivalence, the loss function L = It is expressed by the following formula:
[0102]
[0103] When the output of the cosine similarity metric model indicates inequality, the loss function L ≠ It is expressed by the following formula:
[0104]
[0105] Among them, m is used to control the strictness of the cosine similarity measurement model calculation.
[0106] If the predicted entities or attributes of the two languages are very similar, then E will approach 1, and the overall loss function L0 will be small. If the predicted E approaches -1, the entities or attributes of the two languages are not similar, and the loss function L0 is large. Among them, m is the strictness of controlling the similarity of entities or attributes (such as when the ratio of m is large, the cosine similarity ratio of similar entities or attributes in the two languages will be higher). For example: when m=0.1 is given, the sample is a negative sample at this time, then L0=0; if the predicted E>m, the loss is large; otherwise, the loss is small. Therefore, adjusting m can affect the entire loss function to control the strictness in the cosine similarity calculation.
[0107] The storage layer can store triples in the form of <entity, attribute, entity> or <subject, predicate, object> as RDF data in the graph database of the knowledge graph. Use the Tinkerpop tool to convert the RDF triple data and store it in the graph database Neo4j. Neo4j is a popular graph database. The primitives are nodes, relationships, and attributes. These three primitives can fully describe the situation of any entity. At the same time, you can also assign attributes to relationships to flexibly expand the network model of the knowledge graph.
[0108] This application also proposes a method for constructing a multilingual oilfield knowledge graph.
[0109] Collect raw data from oilfield data, and collect structured data, semi-structured data, and unstructured data from oilfield data;
[0110] Perform knowledge extraction from structured data, knowledge extraction from semi-structured data, and knowledge extraction from unstructured data;
[0111] The knowledge extraction of structured data adopts the database to resource description framework mapping method to extract knowledge;
[0112] Knowledge extraction from semi-structured data: converting semi-structured data into structured data according to the organization structure of semi-structured data, and then extracting knowledge using the database to resource description framework mapping method;
[0113] Knowledge extraction from unstructured data: After extracting entity sets from unstructured data using the conditional random field model, the attribute relationships of multiple entities in the entity set in unstructured data are extracted using the support vector machine-K nearest neighbor classification method;
[0114] Achieve multilingual knowledge fusion by fusing multilingual data, generating hierarchical relationships, and detecting and resolving conflicts;
[0115] Store triples of the form <entity, attribute, entity> or <subject, predicate, object> as RDF data in the graph database of the knowledge graph.
[0116] In one implementation, for picture knowledge, the picture type is used as a picture attribute and the picture is used as an attribute value to construct triple-tuple knowledge of <picture object entity, picture type, picture>.
[0117] For video knowledge, the video is taken as the video attribute, and the video itself or the index table of the video feature corresponding to the video is taken as the attribute value to construct the triple form knowledge of <video object entity, video, video name> or <Daqing Oilfield, video, video feature index address>.
[0118] The present application also provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the above method to implement the above system.
[0119] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0120] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0121] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0122] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0123] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A system for constructing a multilingual oilfield knowledge graph, comprising four parts: an original data layer, a knowledge extraction layer, a knowledge fusion layer, and a storage layer; the characteristics are: The original data layer includes: structured data, semi-structured data and unstructured data in oilfield data; The knowledge extraction layer includes: knowledge extraction of structured data, knowledge extraction of semi-structured data, and knowledge extraction of unstructured data; The knowledge extraction of structured data adopts the database to resource description framework mapping method to extract knowledge; Knowledge extraction from semi-structured data: converting semi-structured data into structured data according to the organization structure of semi-structured data, and then extracting knowledge using the database to resource description framework mapping method; Knowledge extraction from unstructured data: After extracting entity sets from unstructured data using the conditional random field model, the attribute relationships of multiple entities in the entity set in unstructured data are extracted using the support vector machine-K nearest neighbor classification method; The knowledge fusion layer includes multilingual data fusion, generating hierarchical relationships, and detecting and resolving conflicts; The storage layer stores triples in the form of <entity, attribute, entity> or <subject, predicate, object> as RDF data in the graph database of the knowledge graph.
2. The system according to claim 1, characterized in that: For image knowledge, the image type is taken as the image attribute and the image is taken as the attribute value to construct the triple-tuple knowledge of <image object entity, image type, image>.
3. The system according to claim 1, characterized in that: For video knowledge, the video is taken as the video attribute, and the video itself or the index table of the video feature corresponding to the video is taken as the attribute value to construct the triple form knowledge of <video object entity, video, video name> or <Daqing Oilfield, video, video feature index address>.
4. The system according to any one of claims 1 to 3, characterized in that: A twin network is used to integrate multilingual knowledge. The language recognition results corresponding to entity corpora of multiple language types are input into the pre-trained twin network, and the entity corpora of different language types with equivalent language recognition results are connected as a whole. The twin network includes an encoding layer, a dense layer, and a prediction layer. The encoding layer in the twin network shares weights between different languages, and multiple languages are encoded simultaneously and in parallel using a bidirectional gated unit Bi-GRU. The output of the Bi-GRU is projected to the prediction layer through the dense layer to calculate the loss function, and then it is classified whether the entities or attributes of different languages have equivalent meanings.
5. The system according to claim 4, characterized in that: The energy function adopts a binary classification task model and models the binary classification task through the cosine similarity measurement model, which is expressed by the following formula: Among them, T1 and T2 represent the language data projected from different dense and sparse layers to the prediction layer, f is a nonlinear activation function, <·,·> is the cosine similarity of two values, and ||·|| is a modulo operation. The twin network is trained by a preset loss function; when the output result of the cosine similarity measurement model indicates equivalence, the loss function L = It is expressed by the following formula: When the output of the cosine similarity metric model indicates inequality, the loss function L ≠ It is expressed by the following formula: Among them, m is used to control the strictness of the calculation of the cosine similarity measurement model; If the predicted entities or attributes of the two languages are very similar, then E will approach 1, and the overall loss function L0 will be small; if the predicted E approaches -1, the entities or attributes of the two languages are not similar, and the loss function L0 is large; where m controls the strictness of the cosine similarity calculation.
6. The system according to claim 4, characterized in that: Extracting attribute relationships of multiple entities in an entity set in unstructured data according to a support vector machine-K nearest neighbor classification method includes steps S301-S304: S301, obtaining the attribute text to be tested; S302, using the SVM classification model to classify the attribute text to be tested; S303, if the attribute text to be tested is classified as a known attribute category by the SVM classification model, then determine that the known attribute category obtained by the SVM classification is an entity attribute relationship attribute; and determine that the two entities entity1 and entity2 associated with the entity attribute relationship have a relationship type indicated by the entity attribute relationship, thereby obtaining<entity1,attribute,entity2> Knowledge in the form of triads; S304, if the classification category obtained by the SVM classification model is not a known attribute category, a secondary classification is performed using the KNN classifier; if the attribute text to be tested does not belong to a known attribute category, that is, the attribute text to be tested is a fuzzy attribute category, a secondary classification is performed using the KNN classifier, and the cluster entity attribute relationship attribute can be obtained. cluster , and determine that the two entities entity3 and entity4 associated with the cluster entity attribute relationship have the relationship type indicated by the entity attribute relationship, thereby obtaining <entity3,attribute cluster , entity4>knowledge in triple form.
7. A method for constructing a multilingual oilfield knowledge graph. Collect raw data from oilfield data, and collect structured data, semi-structured data, and unstructured data from oilfield data; Perform knowledge extraction of structured data, knowledge extraction of semi-structured data, and knowledge extraction of unstructured data; The knowledge extraction of structured data adopts the database to resource description framework mapping method to extract knowledge; Knowledge extraction from semi-structured data: converting semi-structured data into structured data according to the organization structure of semi-structured data, and then extracting knowledge using the database to resource description framework mapping method; Knowledge extraction from unstructured data: After extracting entity sets from unstructured data using the conditional random field model, the attribute relationships of multiple entities in the entity set in unstructured data are extracted using the support vector machine-K nearest neighbor classification method; Achieve multilingual knowledge fusion by fusing multilingual data, generating hierarchical relationships, and detecting and resolving conflicts; Store triples of the form <entity, attribute, entity> or <subject, predicate, object> as RDF data in the graph database of the knowledge graph.
8. The method according to claim 7, characterized in that: For image knowledge, the image type is taken as the image attribute and the image is taken as the attribute value to construct the triple-tuple knowledge of <image object entity, image type, image>.
9. According to the method described in claim 7, for video knowledge, the video is used as a video attribute, and the index table of the video itself or the video feature corresponding to the video is used as the attribute value to construct triple-tuple knowledge of <video object entity, video, video name> or <Daqing Oilfield, video, video feature index address>.
10. A computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 7 to 9.
Citation Information
Patent Citations
Method and device for constructing knowledge map
CN109446341A
Multi-language knowledge matching method and device for nodes and links in knowledge graph
CN111858961A
Construction method for multi-source heterogeneous data knowledge graph of power distribution network
CN117273133A
Construction method and application of multi-modal knowledge graph
CN117828101A
Knowledge extraction method, apparatus, electronic device, and storage medium
WO2021212682A1
Cited By
Multi-source heterogeneous big data aggregation analysis method based on master data modeling
CN120687639A
