A method and device for establishing a relationship network model

By automatically identifying entities and relationships in structured data using the knowledge base, the low modeling efficiency caused by manual annotation in the existing technology is solved, and the rapid establishment of relationship network models and the improvement of data analysis efficiency is achieved.

CN111753020BActive Publication Date: 2024-12-24ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910246823.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-28
Publication Date
2024-12-24
Estimated Expiration
2039-03-28

AI Technical Summary

Technical Problem

In the prior art, obtaining attributes, entities and relationships in structured data requires manual annotation, which leads to low modeling efficiency of relational network models. Especially in complex application scenarios, manual modeling workload is huge, which seriously hinders the OLP relational network model. promotion.

Method used

By obtaining the structured data to be processed and using the pre-prepared knowledge base, we automatically identify the relationship between entity information and entities, establish a relationship network model for corresponding scenarios, and adopt the attribute words, entity words and relational words in the knowledge base. Extended mode, combined with weight value setting, realize semi-automated or even automated modeling.

Benefits of technology

It improves the modeling efficiency of relational network models, reduces the dependence of manual annotation, is suitable for complex application scenarios, realizes the rapid establishment of relational network models, and improves the efficiency of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111753020B_ABST
    Figure CN111753020B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for establishing a relational network model. The method includes: obtaining structured data to be processed; obtaining entity information and the relationship between each entity based on the structured data and the corresponding knowledge base; and establishing a relational network model for the corresponding scenario based on the entity information and the relationship between each entity. The method provided by the present application solves the problem of low modeling efficiency caused by the need to manually annotate structured data in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method and device for establishing a relationship network model. Background Art

[0002] In many application scenarios in the Internet field, it is possible to obtain massive amounts of data generated by various activities in the application scenario; for example, in the online e-commerce scenario, a large amount of data from online sales and payments may be generated every day; how to analyze and utilize this data to obtain an effective understanding and analysis of the real world reflected by this data is an important task in the field of big data; a major analysis goal is to abstract the real-world entities reflected by this data from the data, and obtain the attributes of these entities, as well as the connections between different entities; this type of analysis is called relational network analysis.

[0003] The premise of relational network analysis is to establish a relational network model for the preset scenario. On the basis of the relational network model, specific data can be further effectively used to analyze specific entities and entity relationships. The relational network model needs to be able to reflect what types of entities there are in the scenario, what relationships there are between entities of different types, and what attributes these entities and relationships have. At present, the main form of relational network model is the OLP relational network model.

[0004] OLP is the abbreviation of Object-Link-Property. Object represents the entity in the business scenario, which can be a "person" (such as a member, a retailer) or a "thing" (such as a product, a store). Link represents the "relationship" in the business scenario. Relationships are divided into behavioral relationships and factual relationships. A user "buys" a product, where "buy" is a behavioral relationship, and a shelf "belongs to" a store, where "belongs to" is a factual relationship. Property represents the attributes of entities and relationships. A "store" (thing) has attributes such as address and city, and a "purchase" (relationship) has attributes such as payment time and payment method.

[0005] At present, structured data (eg, Excel tables, CSV files, database tables) generated in a preset scenario are generally analyzed, and the OLP model is obtained based on the analysis of the structured data.

[0006] Under the existing technology, when a user needs to perform a relationship network analysis on an application scenario of interest, he or she first needs to manually annotate the typical structured data obtained to obtain an OLP model for the scenario as the basis for data analysis.

[0007] Under the above-mentioned existing technology, the user first needs to perform manual modeling in the background management system, that is, to construct the desired entities and relationships through analysis of structured data as the basis for subsequent data analysis.

[0008] Then, for complex application scenarios, when there are too many user data tables, the workload of manual modeling is huge, which seriously hinders the promotion of the OLP relational network model. Summary of the invention

[0009] The present application provides a method and device for establishing a relational network model to solve the problem in the prior art that obtaining attributes, entities and relationships in structured data requires manual annotation of the structured data, resulting in low modeling efficiency.

[0010] The present application provides a method for establishing a relationship network model, comprising:

[0011] Get structured data to be processed;

[0012] According to the structured data and the corresponding knowledge base, entity information and the relationship between entities are obtained;

[0013] A relationship network model of the corresponding scenario is established based on the entity information and the relationship between the entities.

[0014] Optionally, the structured data is structured data corresponding to the scenario.

[0015] Optionally, obtaining entity information and relationships between entities according to the structured data and the corresponding knowledge base includes:

[0016] According to the attribute information of the structured data and based on the knowledge base, identifying entity information contained in the structured data;

[0017] According to the attribute information and the entity information obtained through identification and according to the knowledge base, the relationship between the entities corresponding to the entity information is determined.

[0018] Optionally, the attribute information of the structured data is obtained by the following steps, including:

[0019] Based on the knowledge provided by the pre-prepared knowledge base, the structured data is identified to obtain attribute information of the structured data.

[0020] Optionally, the pre-prepared knowledge base is constructed using the following steps, including:

[0021] Obtaining attribute words corresponding to the knowledge base;

[0022] According to the attribute words, obtaining entity words corresponding to the knowledge base;

[0023] According to the attribute words and the entity words, the relationship words corresponding to the knowledge base are determined.

[0024] Optionally, the attribute words are obtained by using the basic attribute words corresponding to the knowledge base through the following dimensional expansion, including:

[0025] Synonyms of basic attribute words corresponding to the knowledge base;

[0026] Regular expressions of basic attribute words corresponding to the knowledge base;

[0027] The enumeration words of the basic attribute words corresponding to the knowledge base.

[0028] Optionally, the method for establishing a relationship network model further includes:

[0029] For each dimensional expansion method, a weight value range corresponding to the dimension is set; and, according to each specific attribute word, a specific weight of the attribute word is set within the weight value range corresponding to the expansion method.

[0030] Optionally, identifying the attribute information of the structured data based on the structured data and the knowledge provided by the pre-prepared knowledge base includes:

[0031] For the structured data, searching is performed among synonyms of the basic attribute words, regular expressions of the basic attribute words, and enumeration words of the basic attribute words to obtain corresponding attribute information;

[0032] According to the corresponding attribute information, the attribute information included in the structured data is identified.

[0033] Optionally, searching for the structured data in synonyms of the basic attribute words, regular expressions of the basic attribute words, and enumeration words of the basic attribute words to obtain corresponding attribute information includes:

[0034] For the structured data, searching in the synonyms of the basic attribute words to obtain first candidate attribute information corresponding to the structured data;

[0035] For the structured data, searching in the regular expression of the basic attribute word to obtain second candidate attribute information corresponding to the structured data;

[0036] For the structured data, searching in the enumeration words of the basic attribute words to obtain third candidate attribute information corresponding to the structured data;

[0037] Attribute information corresponding to the structured data is obtained according to the first candidate attribute information, the second candidate attribute information, the third candidate attribute information and corresponding weight values.

[0038] Optionally, the identifying entity information contained in the structured data according to the attribute information of the structured data and based on the knowledge base includes:

[0039] According to the primary key attribute in the attribute information of the structured data, a search is performed in the knowledge base to obtain the entity information of the structured data.

[0040] Optionally, determining the relationship between entities corresponding to the entity information according to the attribute information and the entity information obtained through identification and according to the knowledge base includes:

[0041] Searching in the knowledge base according to the attribute information of the structured data and the entity information of the structured data to determine candidate relationships between entities corresponding to the entity information;

[0042] The relationship between entities corresponding to the entity information is determined from candidate relationships between entities corresponding to the entity information.

[0043] Optionally, establishing a relationship network model of a corresponding scenario according to the entity information and the relationship between the entities includes:

[0044] Establishing a mapping relationship between the structured data and the entity and a mapping relationship between the structured data and the relationship according to the attribute information of the structured data, the entity information of the structured data, and the relationship between entities corresponding to the entity information;

[0045] According to the mapping relationship between the structured data and the entity and the mapping relationship between the structured data and the relationship, a relationship network model of the corresponding scenario is established.

[0046] Optionally, the method for establishing a relationship network model further includes:

[0047] Get the client's request to query network relations;

[0048] In response to the request for querying the network relationship, obtaining a relational network model from an electronic device storing the relational network model;

[0049] According to the request for querying the network relationship, obtaining network relationship data from the relationship network model;

[0050] The network relationship data is provided to the client.

[0051] The present application provides a device for establishing a relationship network model, comprising:

[0052] A data acquisition unit, used for acquiring structured data to be processed;

[0053] A relationship determination unit, used to obtain entity information and the relationship between entities according to the structured data and the corresponding knowledge base;

[0054] The model building unit is used to build a relationship network model of the corresponding scenario according to the entity information and the relationship between the entities.

[0055] The present application provides an electronic device, including:

[0056] processor;

[0057] as well as,

[0058] The memory is used to store a computer program. After the device runs the computer program through the processor, it executes the above-mentioned method for establishing a relationship network model, or executes the following method for building a knowledge base.

[0059] The present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and the program is executed by a processor to execute the above-mentioned method for establishing a relationship network model, or to execute the following method for constructing a knowledge base. .

[0060] The present application provides a method for constructing a knowledge base, comprising:

[0061] Obtaining attribute words corresponding to the knowledge base;

[0062] According to the attribute words, obtaining entity words corresponding to the knowledge base;

[0063] According to the attribute words and the entity words, the relationship words corresponding to the knowledge base are determined.

[0064] Optionally, the attribute words are obtained by using the basic attribute words corresponding to the knowledge base through the following dimensional expansion, including:

[0065] Synonyms of basic attribute words corresponding to the knowledge base;

[0066] Regular expressions of basic attribute words corresponding to the knowledge base;

[0067] The enumeration words of the basic attribute words corresponding to the knowledge base.

[0068] The method for establishing a relationship network model provided by the present application first obtains structured data to be processed; then, entity information and the relationship between entities are obtained based on the structured data and the corresponding knowledge base; finally, a relationship network model of the corresponding scenario is established based on the entity information and the relationship between entities. Through this method, starting from the structured data obtained in the predetermined scenario to be analyzed, using the established knowledge base, semi-automatic or even automatic modeling can be achieved, solving the problem of low modeling efficiency caused by the need for manual annotation of structured data in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 It is a flow chart of a method for establishing a relationship network model provided by the first embodiment of the present application;

[0070] Figure 2 is a schematic diagram of a relationship network model involved in the first embodiment of the present application;

[0071] Figure 3 It is a schematic diagram of a device for establishing a relationship network model provided in the second embodiment of the present application;

[0072] Figure 4 This is a flow chart of a method for building a knowledge base provided in the fifth embodiment of the present application. DETAILED DESCRIPTION

[0073] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0074] The first embodiment of the present application provides a method for establishing a relationship network model. Figure 1 , which is a flow chart of the first embodiment of the present application. Figure 1 A method for establishing a relationship network model is provided in detail in the first embodiment of the present application.

[0075] Step S101: Obtain structured data to be processed.

[0076] This step is used to obtain structured data to be processed, where the structured data is structured data corresponding to a preset scenario.

[0077] Structured data refers to data stored in a database that can be logically expressed using a two-dimensional table structure, such as data stored in an Excel table or a database.

[0078] Structured data can come from existing data obtained in a domain. A domain refers to a specific industry such as public security, finance, and telecommunications. Since each industry has its own unique characteristics, they are distinguished. For example, in the telecommunications field, data stored in a database that records call duration and caller information is a typical structured data.

[0079] The structured data is structured data corresponding to the scenario. The scenario refers to the usage environment of structured data in a field. For example, in the financial field, online payment is a scenario. The relevant structured data for online payment, such as the payer information and the payee information of online payment, corresponds to the scenario of online payment.

[0080] Generally, the structured data here refers to various business-related data that have been collected in the field. For example, in the field of telecommunications, as the amount of information grows, a very large information resource library is formed. In this information resource library, a lot of structured data is stored. Structured data can be stored in a local database or in a cloud database.

[0081] Step S102: According to the structured data and the corresponding knowledge base, entity information and the relationship between entities are obtained.

[0082] This step is used to obtain entity information and the relationship between entities based on the structured data and the corresponding knowledge base.

[0083] The obtaining of entity information and the relationship between entities according to the structured data and the corresponding knowledge base includes:

[0084] According to the attribute information of the structured data and based on the knowledge base, identifying entity information contained in the structured data;

[0085] According to the attribute information and the entity information obtained through identification and according to the knowledge base, the relationship between the entities corresponding to the entity information is determined.

[0086] The attribute information of the structured data is obtained by the following steps, including:

[0087] Based on the knowledge provided by the pre-prepared knowledge base, the structured data is identified to obtain attribute information of the structured data.

[0088] After the attribute information of the structured data is identified, it is possible to further identify entities and the relationships between entities on this basis.

[0089] The knowledge base refers to the set of rules applied in the design of the expert system, including the facts and data associated with the rules, all of which constitute the knowledge base. In this application, the knowledge base refers to a collection of entities, relationships, attributes, and attribute synonyms related to the domain. In this embodiment, in the case of low samples, relevant personnel can use the characteristics of domain words and industries to manually construct a knowledge base for a certain field. The constructed knowledge base can be stored in a local database or in a database in the cloud.

[0090] The following is a detailed description of the steps for building the knowledge base.

[0091] The pre-prepared knowledge base is constructed using the following steps, including:

[0092] Obtaining attribute words corresponding to the knowledge base;

[0093] According to the attribute words, obtaining entity words corresponding to the knowledge base;

[0094] According to the attribute words and the entity words, the relationship words corresponding to the knowledge base are determined.

[0095] First, the domain knowledge corresponding to the knowledge base is collected to obtain the attribute words.

[0096] The domain knowledge can include many meanings; for example, starting from general common sense, you can obtain the attribute words that may be included in a specific field. Here, general common sense is the knowledge of a specific field. Specifically, starting from the common sense of online shopping, you may know that attribute words such as buyer ID and seller ID are needed in the field of online shopping. Of course, relying solely on general common sense may cause many omissions. In fact, you can collect structured data that has been generated in a specific field and obtain attribute words that may appear in a specific field based on the information in the structured data. Structured data can be Excel files, CSV files, and structured database tables. For example, if the structured data is data stored in the form of an Excel table, the field names in the table can be used as the main source of attribute words; of course, the field values, annotations, and even table names of the Excel table can all be used as sources of attribute words.

[0097] Secondly, entity words in the field are obtained according to the attribute words in the field.

[0098] Attribute words can often reflect entities that exist in the real world. For example, the unified social credit code actually reflects the legal entity with which there is a corresponding relationship. Furthermore, combined with other attributes of structured data, it can reflect the specific information of the legal person in a specific field. For example, an Excel table includes several attributes such as the unified social credit code, vehicle brand, vehicle usage time, vehicle usage status, and vehicle license plate, which can reflect that the table corresponds to an entity called "legal person" and an entity called "vehicle"; this embodiment assumes that the specific field is the business field.

[0099] The entity "legal person" and "vehicle" can be obtained by the experts who build the knowledge base based on their own knowledge summary through the table content, or can be obtained through machine deduction based on an initial knowledge base; in addition, it can also be known that "legal person" has the attribute of "unified social credit code" and "vehicle" has attributes such as "brand", "usage time", "license plate", and "usage status".

[0100] The third step is to determine the relationship words in the field according to the attribute words in the field and the entity words in the field.

[0101] For example, through an Excel table that includes several attributes such as the unified social credit code, vehicle license plate, and vehicle usage time, we can know that there is an "ownership" relationship between the "legal person" and the "vehicle".

[0102] In the above example, two entities, "legal person" and "vehicle", are obtained through a table including several attributes such as unified social credit code, vehicle license plate, and vehicle usage time. "Legal person" has the attribute of "unified social credit code", and since this attribute has a one-to-one relationship with the legal person entity, this attribute can be used as the primary key information of the "legal person" entity. Similarly, "vehicle" has attributes such as license plate, usage time, and usage status. The use of vehicle license plate can correspond one-to-one with a specific vehicle, so it can be used as the primary key information of the "vehicle" entity. Of course, the premise is that the research is in the specific field of business. There is a "ownership" relationship between "legal person" and "vehicle", and "ownership" has the attribute of "ownership time".

[0103] The attribute words can be expanded in some ways based on some basic attribute words so as to make the knowledge of the knowledge base complete; some common expansion methods are provided below.

[0104] The attribute words are obtained by using the basic attribute words corresponding to the knowledge base through the following dimensional expansion, including:

[0105] Synonyms of basic attribute words corresponding to the knowledge base;

[0106] Regular expressions of basic attribute words corresponding to the knowledge base;

[0107] The enumeration words of the basic attribute words corresponding to the knowledge base.

[0108] Here, the basic attribute words are the normalized representation of the attribute. For example, for the basic attribute of mobile phone number, it can be represented as phone number, mobile phone, contact information, number 1, number 2, string 1, string 2 in unstructured data.

[0109] For mobile phone numbers, the synonyms of the basic attribute words may include: mobile, telephone number, shouji.

[0110] Regular expression, also known as regular expression, is a concept in computer science. Regular expression is usually used to retrieve and replace texts that meet a certain pattern (rule).

[0111] For a mobile phone number, the regular expression of the basic attribute word may be: String regex = "^(((13[0-9])|(14

[579] )|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19

[89] ))\\d{8})$";

[0112] [1] means the first digit of the string starts with 1;

[0113] [3, 4, 5, 7, 8] means the second digit of the string can be any one of 3, 4, 5, 7, 8;

[0114] [0-9]{9} indicates that the third to eleventh digits of the string are 9 integers ranging from 0 to 9.

[0115] Through this regular expression, it is possible to determine whether the unstructured field content is a mobile phone number based on the characteristics of the mobile phone number.

[0116] The enumeration words of the basic attribute words, for example, for China's provincial-level administrative regions, can be Zhejiang, Beijing, Shanghai, Henan, Hubei, Xinjiang, Shandong, Hebei, Hunan, etc.

[0117] The method for establishing a relationship network model further includes:

[0118] For each dimensional expansion method, a weight value range corresponding to the dimension is set; and, according to each specific attribute word, a specific weight of the attribute word is set within the weight value range corresponding to the expansion method.

[0119] For the dimensions of the three basic attribute words mentioned above, synonyms, regular expressions, and enumeration words, you can set the weight value range corresponding to the dimension. For example, the weight value range of synonyms can be [0.6-0.8], the weight value range of regular expressions can be [0.1-0.5], and the weight value range of enumeration words can be [0.2-0.4]. According to each specific attribute word, set the specific weight of the attribute word within the weight value range corresponding to the expansion method described. For example, for the attribute word mobile phone number, the weight value of the synonym can be set to 0.8, the weight value of the regular expression can be set to 0.1, and the weight value of the enumeration word can be set to 0.2.

[0120] The above specific knowledge base is the basis for implementing the method of establishing a relationship network model provided by this embodiment. The knowledge base provides knowledge in a specific field, which already contains entities that may exist in the field, the attributes of the entities, the relationships between entities, and the attributes of the relationships between entities. The method of establishing a relationship network model provided by this embodiment is to establish a relationship network model that fits the scene on the basis of the knowledge already possessed to describe the entities, the relationships between entities, the attributes of various entities, and the attributes of the relationships in the scene. The content contained in the knowledge base is extremely rich, and the relationship network model of the preset scene is a specific model that serves the preset scene and can provide a cognitive model for accurately describing the preset scene.

[0121] The knowledge base in this application can also be called a domain knowledge base.

[0122] According to the structured data, based on the knowledge provided by the knowledge base prepared in advance, the attribute information of the structured data is identified, and its specific implementation method can adopt the following specific steps:

[0123] For the structured data, searching is performed among synonyms of the basic attribute words, regular expressions of the basic attribute words, and enumeration words of the basic attribute words to obtain corresponding attribute information;

[0124] According to the corresponding attribute information, the attribute information included in the structured data is identified.

[0125] For example, for a structured data table, its field name is shou_ji, and the field annotation is "mobile phone number". The regular expression for the field content is String regex = "^(((13[0-9])|(14

[579] )|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19

[89] ))\\d{8})$", and the synonyms for the field are "mobile phone number", "mobile phone", "shouji", "contact information", "mobile", and the enumeration words for the field are China Mobile, China Unicom, and China Telecom. The structured data table is searched in the synonyms of the basic attribute words, the regular expressions of the basic attribute words, and the enumeration words of the basic attribute words to obtain attribute information of each dimension. Then, the attribute information contained in the structured data is identified based on the corresponding attribute information, for example, it is determined that the structured data table contains the normalized attribute information of the mobile phone number.

[0126] The step of searching the structured data in the synonyms of the basic attribute words, the regular expressions of the basic attribute words, and the enumeration words of the basic attribute words to obtain corresponding attribute information includes:

[0127] For the structured data, searching in the synonyms of the basic attribute words to obtain first candidate attribute information corresponding to the structured data;

[0128] For the structured data, searching is performed in the regular expression of the basic attribute word to obtain second candidate attribute information corresponding to the structured data;

[0129] For the structured data, searching in the enumeration words of the basic attribute words to obtain third candidate attribute information corresponding to the structured data;

[0130] Attribute information corresponding to the structured data is obtained according to the first candidate attribute information, the second candidate attribute information, the third candidate attribute information and corresponding weight values.

[0131] For example, for a structured data table, its field name is "shou_ji" and the field annotation is "mobile phone number". The regular expression for the field content is String regex = "^(((13[0-9])|(14

[579] )|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19

[89] ))\\d{8})$", and the synonyms for the field are "mobile phone number", "shouji", "contact information", "mobile", and the enumeration words for the field are China Mobile, China Unicom, and China Telecom.

[0132] For the structured data table, if its field contains mobile phone, the first candidate attribute information corresponding to the structured data is obtained by searching in the synonyms of the basic attribute words. In this example, the first candidate attribute information is the mobile phone number.

[0133] For the structured data table, if its field content contains a numeric string, the second candidate attribute information corresponding to the structured data is obtained by searching in the regular expression of the basic attribute word. In this example, the regular expression is String regex = "^(((13[0-9])|(14

[579] )|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19

[89] ))\\d{8})$". If the numeric string conforms to the content specified by the regular expression, the second candidate attribute information is a mobile phone number. If the numeric string does not conform to the content specified by the regular expression, for example 19900001111, the second candidate attribute information is determined to be a non-mobile phone number.

[0134] For the structured data table, if its field content contains operator information, a search is performed in the enumeration words of the basic attribute words to obtain the third candidate attribute information corresponding to the structured data. In this example, the enumeration words are China Mobile, China Unicom, and China Telecom. If the field content contains the enumeration word content, the third candidate attribute information of the structured data is determined to be a mobile phone number.

[0135] According to the first candidate attribute information, the second candidate attribute information, the third candidate attribute information and the corresponding weight values, the attribute information corresponding to the structured data is obtained. The corresponding weight values ​​here are the weight values ​​of each dimension of the basic attribute word. For example, for the attribute word mobile phone number, the weight value of the synonym can be set to 0.8, the weight value of the regular expression can be set to 0.1, and the weight value of the enumeration word can be set to 0.2.

[0136] The obtaining of entity information and the relationship between entities according to the structured data and the corresponding knowledge base includes:

[0137] According to the attribute information of the structured data and based on the knowledge base, identifying entity information contained in the structured data;

[0138] According to the attribute information and the entity information obtained through identification and according to the knowledge base, the relationship between the entities corresponding to the entity information is determined.

[0139] The identifying the entity information contained in the structured data according to the attribute information of the structured data and based on the knowledge base includes:

[0140] According to the primary key attribute in the attribute information of the structured data, a search is performed in the knowledge base to obtain the entity information of the structured data.

[0141] The primary key attribute in the attribute information of the structured data, as an attribute that can have a unique corresponding relationship with an entity, can obtain the entity information included in the structured data through the knowledge provided in the knowledge base.

[0142] For example, the structured data is a company's vehicle information table, which records a large amount of company information, including field attributes such as "unified social credit code", "vehicle license plate", and "vehicle usage time". Through the knowledge base, it can be judged that there are two entities "company" and "vehicle" in this scenario. The knowledge base contains entities such as company and vehicle, as well as the attributes related to the two entities, and various forms of descriptive words for these attributes. In this way, although the specific names of the field attributes in such tables may be different, through the knowledge base, it can be summarized from similar attribute words that there are the above two entities in this scenario.

[0143] For particularly complex situations, it may be necessary to use some strategies based on the knowledge provided by the knowledge base to make judgments. For example, the input table fields, table contents, and table comments are identified separately. The identification basis is to identify the attributes based on the three dimensions defined by the attribute library in the knowledge base, so as to determine how many attributes the input table can match, which are the primary key attributes, and the weight value given to each recognition result; finally, the entity corresponding to the table is comprehensively judged based on the attributes with high weight values.

[0144] The determining, based on the attribute information and the entity information obtained by identification and based on the knowledge base, the relationship between entities corresponding to the entity information includes:

[0145] Searching in the knowledge base according to the attribute information of the structured data and the entity information of the structured data to determine candidate relationships between entities corresponding to the entity information;

[0146] The relationship between entities corresponding to the entity information is determined from candidate relationships between entities corresponding to the entity information.

[0147] According to the attribute information of the structured data and the entity information of the structured data, a search is performed in the knowledge base to find out a lot of relationships between entities corresponding to the entity information. According to the attribute information and entity information of the structured data, the most likely relationship between entities corresponding to the entity information is determined from candidate relationships between entities corresponding to the entity information.

[0148] When determining the relationship between entities in a certain input table (the main form of structured data), it may also be necessary to use the weights mentioned in the above-mentioned method of determining entities to determine the most appropriate relationship from multiple candidate relationships.

[0149] After determining the relationship between entities, the relationship between entities needs to be stored in local memory or non-volatile storage media, or in a related storage area in the cloud.

[0150] Step S103: establishing a relationship network model of the corresponding scenario according to the entity information and the relationship between the entities.

[0151] This step is used to establish a relationship network model of the corresponding scenario based on the entity information and the relationship between the entities.

[0152] The establishing of a relationship network model of a corresponding scenario according to the entity information and the relationship between the entities includes:

[0153] Establishing a mapping relationship between the structured data and the entity and a mapping relationship between the structured data and the relationship according to the attribute information of the structured data, the entity information of the structured data, and the relationship between entities corresponding to the entity information;

[0154] According to the mapping relationship between the structured data and the entity and the mapping relationship between the structured data and the relationship, a relationship network model of the corresponding scenario is established.

[0155] Here, the established relationship network model can be stored in the memory of the electronic device or in a non-volatile storage medium, or in a related storage area in the cloud.

[0156] The relationship network model here is based on OLP. OLP is the abbreviation of Object-Link-Property. Object represents the entity in the business scenario, which can be a "person" (such as a member, a retailer) or a "thing" (such as a product, a store); Link represents the "relationship" in the business scenario. Relationships are divided into behavioral relationships and factual relationships. A user "buys" a product, where "buy" is a behavioral relationship, and a shelf "belongs to" a store, where "belongs to" is a factual relationship; and Property represents the attributes of entities and relationships, such as "store" (thing) has attributes such as address and city, and "purchase" (relationship) has attributes such as payment time and payment method.

[0157] Please refer to Figure 2 , which is a schematic diagram of the relationship network model. Figure 2 In the example, an OLP relationship model between a unified social credit code as an entity and a vehicle as an entity is provided. The relationship between a unified social credit code and a vehicle can be that a certain unified social credit code owns a certain vehicle.

[0158] The method for establishing a relationship network model further includes:

[0159] Get the client's request to query network relations;

[0160] In response to the request for querying the network relationship, obtaining a relational network model from an electronic device storing the relational network model;

[0161] According to the request for querying the network relationship, obtaining network relationship data from the relationship network model;

[0162] The network relationship data is provided to the client.

[0163] The above steps are actually the process of obtaining the relationship network model and related data on the client side.

[0164] by Figure 2 For example, the traffic management department needs to query the vehicle information of a certain company. The traffic management department enters the corresponding unified social credit code on the client. First, in response to the request to query the network relationship, the relationship network model is obtained from the electronic device storing the relationship network model; then, according to the request to query the network relationship, the network relationship data is obtained from the relationship network model; finally, the vehicle information of the queried company is provided to the client.

[0165] During the above-mentioned usage process, the relational network model provides what information can be obtained through the relational network model under the preset scenario, and can query relevant information when the primary key information of a specific entity is provided; due to the establishment of the relational network model, various structured data can be identified, and specific structured data (such as a record table) can be classified into related entities or certain relationships, so that when data analysis is needed, the basic path of data analysis and related data can be quickly obtained.

[0166] For example, for a specific usage scenario of "hotel management", for a large amount of structured data obtained, first analyze the entities and the relationships between them, and establish a relationship network model. For example, there are two entities, "hotel" and "hotel supplies supplier". Further, the obtained structured data can be classified into different entities or relationships. For example, the structured data recording the hotel supplies supplier information is classified into the "hotel supplies supplier" entity, and the structured data recording the hotel information is classified into the "hotel" entity. The "supply" relationship can be established between the two. For a hotel supplies supply record table, it can be classified into a table describing the "supply" relationship. In this way, when analyzing and utilizing a large amount of data in this scenario, there is a basic analysis framework, and a basic analysis perspective for all structured data.

[0167] In the above-mentioned embodiment, a method for establishing a relationship network model is provided. Correspondingly, the present application also provides an apparatus for establishing a relationship network model. Figure 3 , which is a flow chart of an embodiment of a device for establishing a relationship network model of the present application. Since this embodiment, i.e., the second embodiment, is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0168] The device for establishing a relationship network model comprises:

[0169] A data acquisition unit 301 is used to acquire structured data to be processed;

[0170] A relationship determination unit 302, configured to obtain entity information and relationships between entities based on the structured data and the corresponding knowledge base;

[0171] The model building unit 303 is used to build a relationship network model of the corresponding scenario according to the entity information and the relationship between the entities.

[0172] In this embodiment, the structured data is structured data corresponding to the scene.

[0173] In this embodiment, the relationship determination unit is specifically used to:

[0174] According to the attribute information of the structured data and based on the knowledge base, identifying entity information contained in the structured data;

[0175] According to the attribute information and the entity information obtained through identification and according to the knowledge base, the relationship between the entities corresponding to the entity information is determined.

[0176] In this embodiment, the attribute information of the structured data is obtained by the following steps, including:

[0177] Based on the knowledge provided by the pre-prepared knowledge base, the structured data is identified to obtain attribute information of the structured data.

[0178] In this embodiment, the pre-prepared knowledge base is constructed using the following steps, including:

[0179] Obtaining attribute words corresponding to the knowledge base;

[0180] According to the attribute words, obtaining entity words corresponding to the knowledge base;

[0181] According to the attribute words and the entity words, the relationship words corresponding to the knowledge base are determined.

[0182] In this embodiment, the attribute words are obtained by using the basic attribute words corresponding to the knowledge base through the following dimensional expansion, including:

[0183] Synonyms of basic attribute words corresponding to the knowledge base;

[0184] Regular expressions of basic attribute words corresponding to the knowledge base;

[0185] The enumeration words of the basic attribute words corresponding to the knowledge base.

[0186] In this embodiment, the device for establishing a relationship network model further includes a weight setting unit, which is used to:

[0187] For each dimensional expansion method, a weight value range corresponding to the dimension is set; and, according to each specific attribute word, a specific weight of the attribute word is set within the weight value range corresponding to the expansion method.

[0188] In this embodiment, the relationship determination unit is further configured to:

[0189] For the structured data, searching is performed among synonyms of the basic attribute words corresponding to the knowledge base, regular expressions of the basic attribute words corresponding to the knowledge base, and enumeration words of the basic attribute words corresponding to the knowledge base to obtain corresponding attribute information;

[0190] According to the corresponding attribute information, the attribute information included in the structured data is identified.

[0191] In this embodiment, the relationship determination unit is further configured to:

[0192] For the structured data, searching in the synonyms of the basic attribute words to obtain first candidate attribute information corresponding to the structured data;

[0193] For the structured data, searching is performed in the regular expression of the basic attribute word to obtain second candidate attribute information corresponding to the structured data;

[0194] For the structured data, searching in the enumeration words of the basic attribute words to obtain third candidate attribute information corresponding to the structured data;

[0195] Attribute information corresponding to the structured data is obtained according to the first candidate attribute information, the second candidate attribute information, the third candidate attribute information and corresponding weight values.

[0196] In this embodiment, the relationship determination unit is further configured to:

[0197] According to the primary key attribute in the attribute information of the structured data, a search is performed in the knowledge base to obtain the entity information of the structured data.

[0198] In this embodiment, the relationship determination unit is further configured to:

[0199] Searching in the knowledge base according to the attribute information of the structured data and the entity information of the structured data to determine candidate relationships between entities corresponding to the entity information;

[0200] The relationship between entities corresponding to the entity information is determined from candidate relationships between entities corresponding to the entity information.

[0201] In this embodiment, the model building unit is specifically used to:

[0202] Establishing a mapping relationship between the structured data and the entity and a mapping relationship between the structured data and the relationship according to the attribute information of the structured data, the entity information of the structured data, and the relationship between entities corresponding to the entity information;

[0203] According to the mapping relationship between the structured data and the entity and the mapping relationship between the structured data and the relationship, a relationship network model of the corresponding scenario is established.

[0204] In this embodiment, the apparatus for establishing a relationship network model further includes a network relationship query unit, which is used to:

[0205] Get the client's request to query network relations;

[0206] In response to the request for querying the network relationship, obtaining a relational network model from an electronic device storing the relational network model;

[0207] According to the request for querying the network relationship, network relationship data is obtained from the relationship network model; and the network relationship data is provided to the client.

[0208] A third embodiment of the present application provides an electronic device, the electronic device comprising:

[0209] processor;

[0210] as well as,

[0211] The memory is used to store a computer program. After the device runs the computer program through the processor, it executes the method for establishing a relationship network model provided in the first embodiment of the present application, or executes the method for building a knowledge base provided in the fifth embodiment of the present application.

[0212] The fourth embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The program is run by a processor to execute the method for establishing a relationship network model provided in the first embodiment of the present application, or to execute the method for building a knowledge base provided in the fifth embodiment of the present application.

[0213] A fifth embodiment of the present application provides a method for constructing a knowledge base, including:

[0214] Step S401: Obtain attribute words corresponding to the knowledge base;

[0215] Step S402: Obtaining entity words corresponding to the knowledge base according to the attribute words;

[0216] Step S403: Determine the relationship words corresponding to the knowledge base according to the attribute words and the entity words.

[0217] In this embodiment, the attribute words are obtained by using the basic attribute words corresponding to the knowledge base through the following dimensional expansion, including:

[0218] Synonyms of basic attribute words corresponding to the knowledge base;

[0219] Regular expressions of basic attribute words corresponding to the knowledge base;

[0220] The enumeration words of the basic attribute words corresponding to the knowledge base.

[0221] Since this embodiment has been described in detail in the first embodiment, it will not be repeated here. Please refer to the relevant description of the first embodiment.

[0222] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0223] In a typical configuration, a computing device includes one or more operating units (CPU), input / output interfaces, network interfaces, and memory.

[0224] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0225] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0226] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A method for establishing a relationship network model, characterized in that: include: Get structured data to be processed; According to the attribute information of the structured data, entity information contained in the structured data is identified based on a knowledge base; the knowledge base includes attribute words, entity words and relationship words corresponding to the knowledge base; wherein the attribute words are obtained by expanding the basic attribute words corresponding to the knowledge base in three dimensions: synonyms, regular expressions and enumeration words; Determining, based on the attribute information, the entity information, and the knowledge base, a relationship between entities corresponding to the entity information; A relationship network model of the corresponding scenario is established based on the entity information and the relationship between the entities.

2. The method for establishing a relationship network model according to claim 1, characterized in that: The structured data is structured data corresponding to the scene.

3. The method for establishing a relationship network model according to claim 1, characterized in that: The attribute information of the structured data is obtained by the following steps, including: Based on the knowledge provided by the pre-prepared knowledge base, the structured data is identified to obtain attribute information of the structured data.

4. The method for establishing a relationship network model according to claim 3, characterized in that: The pre-prepared knowledge base is constructed using the following steps, including: Obtaining attribute words corresponding to the knowledge base; According to the attribute words, obtaining entity words corresponding to the knowledge base; According to the attribute words and the entity words, the relationship words corresponding to the knowledge base are determined.

5. The method for establishing a relationship network model according to claim 1, characterized in that: Also includes: For each dimensional expansion method, a weight value range corresponding to the dimension is set; and, according to each specific attribute word, a specific weight of the attribute word is set within the weight value range corresponding to the expansion method.

6. The method for establishing a relationship network model according to claim 1, characterized in that: The identifying, according to the structured data and based on the knowledge provided by the pre-prepared knowledge base, the attribute information of the structured data includes: For the structured data, searching is performed among synonyms of the basic attribute words, regular expressions of the basic attribute words, and enumeration words of the basic attribute words to obtain corresponding attribute information; According to the corresponding attribute information, the attribute information included in the structured data is identified.

7. The method for establishing a relationship network model according to claim 6, characterized in that: The step of searching the structured data in the synonyms of the basic attribute words, the regular expressions of the basic attribute words, and the enumeration words of the basic attribute words to obtain corresponding attribute information includes: For the structured data, searching in the synonyms of the basic attribute words to obtain first candidate attribute information corresponding to the structured data; For the structured data, searching in the regular expression of the basic attribute word to obtain second candidate attribute information corresponding to the structured data; For the structured data, searching in the enumeration words of the basic attribute words to obtain third candidate attribute information corresponding to the structured data; Attribute information corresponding to the structured data is obtained according to the first candidate attribute information, the second candidate attribute information, the third candidate attribute information and corresponding weight values.

8. The method for establishing a relationship network model according to claim 1, characterized in that: The identifying the entity information contained in the structured data according to the attribute information of the structured data and based on the knowledge base includes: According to the primary key attribute in the attribute information of the structured data, a search is performed in the knowledge base to obtain the entity information of the structured data.

9. The method for establishing a relationship network model according to claim 1, characterized in that: The determining, based on the attribute information, the entity information and the knowledge base, the relationship between entities corresponding to the entity information includes: Searching in the knowledge base according to the attribute information of the structured data and the entity information of the structured data to determine candidate relationships between entities corresponding to the entity information; The relationship between entities corresponding to the entity information is determined from candidate relationships between entities corresponding to the entity information.

10. The method for establishing a relationship network model according to claim 1, characterized in that: The establishing of a relationship network model of a corresponding scenario according to the entity information and the relationship between the entities includes: Establishing a mapping relationship between the structured data and the entity and a mapping relationship between the structured data and the relationship according to the attribute information of the structured data, the entity information of the structured data, and the relationship between entities corresponding to the entity information; According to the mapping relationship between the structured data and the entity and the mapping relationship between the structured data and the relationship, a relationship network model of the corresponding scenario is established.

11. The method for establishing a relationship network model according to claim 1, characterized in that: Also includes: Get the client's request to query network relations; In response to the request for querying the network relationship, obtaining a relational network model from an electronic device storing the relational network model; According to the request for querying the network relationship, obtaining network relationship data from the relationship network model; The network relationship data is provided to the client.

12. A device for establishing a relationship network model, characterized in that: include: A data acquisition unit, used for acquiring structured data to be processed; A relationship determination unit, used to obtain entity information and the relationship between entities according to the structured data and the corresponding knowledge base; A model building unit, used to build a relationship network model of a corresponding scenario according to the entity information and the relationship between the entities; The relationship determination unit is specifically used to identify the entity information contained in the structured data based on the attribute information of the structured data and the knowledge base; determine the relationship between the entities corresponding to the entity information based on the attribute information and the entity information obtained by identification and based on the knowledge base; wherein the knowledge base includes the attribute words, entity words and relationship words corresponding to the knowledge base; the attribute words are obtained by expanding the basic attribute words corresponding to the knowledge base in three dimensions: synonyms, regular expressions and enumeration words.

13. An electronic device, characterized in that: include: processor; as well as, A memory for storing a computer program, wherein the device executes a method as claimed in any one of claims 1 to 11 after the computer program is run by the processor.

14. A computer storage medium, characterized in that: The computer storage medium stores a computer program, which is executed by a processor to perform the method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Query method and system

    CN103425714A

  • Method and device for constructing medical knowledge graph

    CN107657063A