Method and device for predicting industry to which enterprise belongs, electronic equipment and storage medium

By constructing and completing the enterprise knowledge graph and using the knowledge representation model to obtain implicit relationships, the problem of inaccurate prediction of the industry belonging to the enterprise in the existing technology is solved, and more accurate industrial predictions are achieved.

CN119047663AInactive Publication Date: 2024-11-29CETC BIGDATA RES INST CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411545688.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing machine learning methods and statistical models cannot fully capture the complex relationship between enterprises and industries in the industry forecast to which enterprises belong, resulting in inaccurate predictions.

Method used

By constructing and completing the enterprise knowledge graph, using the knowledge representation model to obtain implicit relationship entity pairs, integrating enterprise-related knowledge information, and generating structured knowledge graphs to achieve more accurate industrial predictions.

Benefits of technology

It improves the accuracy of the industry forecast to which the company belongs, can more comprehensively reflect the deep-seated relationship between the company and the industry, and enhances the reliability of the forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047663A_ABST
    Figure CN119047663A_ABST
Patent Text Reader

Abstract

The invention provides an enterprise industry prediction method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a target entity corresponding to a to-be-predicted enterprise, the type of the target entity being an enterprise; according to the target entity, related entities corresponding to the target entity are searched from a pre-generated enterprise knowledge graph, the enterprise knowledge graph comprises multiple different types of entities, relationships among the entities and attributes of the entities, relationships exist between the related entities and the target entity, and the types of the related entities are industries; according to related entities, an industry to which a to-be-predicted enterprise belongs is obtained, dispersed enterprise related knowledge information is integrated into a structured knowledge graph, and the enterprise knowledge graph can reflect deeper hidden information by reasoning a hidden relationship among the entities and complementing the enterprise knowledge graph, so that the enterprise knowledge graph can be utilized to predict the enterprise knowledge graph. And searching a related entity corresponding to the target entity of the to-be-predicted enterprise, and accurately predicting the industry to which the enterprise belongs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis technology, and in particular to a method, device, electronic device and storage medium for predicting the industry to which an enterprise belongs. Background Art

[0002] With the advent of the information and big data era, data analysis has become particularly important for enterprises. Among them, predicting the industry to which an enterprise belongs is a key task, which is of great significance for understanding the business scope, market demand and competitor analysis of the enterprise.

[0003] At present, in existing research, the prediction of the industry to which an enterprise belongs mainly relies on traditional machine learning methods and statistical models. These methods mainly analyze enterprises based on text descriptions, financial statements, market data and other aspects related to the enterprise, and rely on historical data and expert experience. Although they can reflect the development trend of the industry to which the enterprise belongs to a certain extent, they also have certain limitations and often cannot fully capture the complex relationship between the enterprise and the industry, and cannot achieve accurate prediction of the industry to which the enterprise belongs.

[0004] Therefore, how to improve the accuracy of forecast results for the industry to which the enterprise belongs is an urgent problem to be solved. Summary of the invention

[0005] The present invention provides a method, device, electronic device and storage medium for predicting the industry to which an enterprise belongs, so as to solve the technical problem that the industry to which an enterprise belongs cannot be accurately predicted in the prior art.

[0006] In one aspect, the present invention provides a method for predicting the industry to which an enterprise belongs, comprising: Determine the target entity corresponding to the enterprise to be predicted, where the type of the target entity is enterprise; According to the target entity, the related entity corresponding to the target entity is searched from the pre-generated enterprise knowledge graph, the enterprise knowledge graph includes multiple entities of different types, the relationship between the entities and the attributes of the entities, the related entity has a relationship with the target entity, and the type of the related entity is industry; According to the related entities, obtain the industry to which the enterprise to be predicted belongs; Among them, the enterprise knowledge graph is generated in the following ways: Construct an initial enterprise knowledge graph based on enterprise-related knowledge information; Inferring the implicit relationship between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, where the two entities in the implicit relationship entity pairs have no relationship in the initial enterprise knowledge graph; According to the implicit relationship entity pairs, the relationship between entities in the initial enterprise knowledge graph is completed to obtain the enterprise knowledge graph.

[0007] According to the present invention, a method for predicting the industry to which an enterprise belongs is provided, which infers the implicit relationship between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, including: Obtain the semantic feature vector of each entity in the initial enterprise knowledge graph as the entity representation vector; According to the pre-trained knowledge representation model, the entity representation vector corresponding to each entity is mapped to the relational space to obtain the entity projection vector corresponding to each entity; According to the entity projection vectors corresponding to each entity, obtaining the degree of association between two entities in at least one potential implicit relationship entity pair; Screening each potential implicit relationship entity pair according to each correlation degree to obtain the implicit relationship entity pair; The knowledge representation model is trained based on the relational triples and is used to map the entity representation vector corresponding to the entity to the relational space through the projection matrix to obtain the entity projection vector corresponding to the entity; Relationship triples are obtained based on the relationship paths of each entity in the initial enterprise knowledge graph.

[0008] According to the present invention, a method for predicting the industry to which an enterprise belongs is provided, and a knowledge representation model is generated in the following manner: According to the relationship paths of the entities in the initial enterprise knowledge graph, multiple relationship triples are obtained, and the relationship triples include a head entity, a tail entity, and a head-tail entity relationship; According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model.

[0009] According to the present invention, a method for predicting the industry to which an enterprise belongs is provided, which obtains multiple relationship triples according to the relationship paths of each entity in the initial enterprise knowledge graph, including: According to the relationship between each entity in the initial enterprise knowledge graph, at least one association path is obtained, and each relationship path consists of a head entity, at least one intermediate entity and a tail entity; For each association path, obtain the relationship triple corresponding to the implicit relationship entity pair; The head-tail entity relationship is determined according to the head entity, at least one intermediate entity and the tail entity in the association path.

[0010] According to the present invention, a method for predicting the industry to which an enterprise belongs is provided, wherein the relationship representation vector corresponding to the head and tail entity relationships is obtained in the following manner: For each relationship triple, obtain the semantic feature vector of the head entity as the first vector, obtain the semantic feature vector of the tail entity as the second vector, and obtain the semantic feature vectors of each intermediate entity as the shared relationship vector; The first vector, the second vector and the shared relationship vector are combined to obtain the relationship representation vector corresponding to the head and tail entity relationship.

[0011] According to the present invention, a method for predicting the industry to which an enterprise belongs is provided. According to each relationship triple, a TransD representation learning algorithm is used to perform knowledge representation learning to obtain a knowledge representation model, including: According to the relation triples, a sample set is constructed, which includes multiple positive samples and multiple negative samples. The positive samples are correct relation triples, and the negative samples are incorrect relation triples. According to the TransD representation learning algorithm, an initial knowledge representation model is constructed, and an initial first projection matrix and an initial second projection matrix are determined; According to the sample set, the following training operations are iteratively performed on the initial knowledge representation model until the preset training stop condition is met to obtain the knowledge representation model: The sample set is used as the input of the knowledge representation model. For each relation triple, the entity representation vector corresponding to the head entity is mapped to the relation space according to the first projection matrix, and the entity projection vector corresponding to the head entity is obtained. The entity representation vector corresponding to the tail entity is mapped to the relation space according to the second projection matrix, and the entity projection vector corresponding to the tail entity is obtained. In the relational space, the relation representation vector corresponding to the head-tail entity relation is used as the translation operation from the entity projection vector corresponding to the head entity to the entity projection vector corresponding to the tail entity, and the first projection matrix, the second projection matrix and the model parameters are adjusted with minimizing the loss function as the optimization goal; Among them, the loss function indicates the score difference between positive samples and negative samples, and the score indicates the prediction confidence of whether the relationship triple of the knowledge representation model is established.

[0012] According to the present invention, a method for predicting the industry to which an enterprise belongs is provided, wherein the degree of association is used to indicate the similarity or distance between entity projection vectors corresponding to two entities in a potential implicit relationship entity pair; The potential implicit relationship entity pairs are screened according to the degree of association to obtain the implicit relationship entity pairs, including: According to each correlation degree, potential implicit relationship entity pairs corresponding to the correlation degree that meets the preset threshold condition are screened out as implicit relationship entity pairs.

[0013] In a second aspect, the present invention further provides a device for predicting the industry to which an enterprise belongs, comprising: A target entity determination module is used to determine the target entity corresponding to the enterprise to be predicted, and the type of the target entity is the enterprise; A related entity search module is used to search for related entities corresponding to a target entity from a pre-generated enterprise knowledge graph according to the target entity. The enterprise knowledge graph includes multiple entities of different types, the relationships between entities, and the attributes of each entity. There is a relationship between the related entity and the target entity, and the type of the related entity is industry. The industry acquisition module is used to obtain the industry to which the enterprise to be predicted belongs based on related entities; Among them, the enterprise knowledge graph is generated in the following ways: Construct an initial enterprise knowledge graph based on enterprise-related knowledge information; Inferring the implicit relationship between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, where the two entities in the implicit relationship entity pairs have no relationship in the initial enterprise knowledge graph; According to the implicit relationship entity pairs, the relationship between entities in the initial enterprise knowledge graph is completed to obtain the enterprise knowledge graph.

[0014] According to the present invention, a device for predicting the industry to which an enterprise belongs further includes: a knowledge graph generation module; the knowledge graph generation module is used to: Obtain the semantic feature vector of each entity in the initial enterprise knowledge graph as the entity representation vector; According to the pre-trained knowledge representation model, the entity representation vector corresponding to each entity is mapped to the relational space to obtain the entity projection vector corresponding to each entity; According to the entity projection vectors corresponding to each entity, obtaining the degree of association between two entities in at least one potential implicit relationship entity pair; Screening each potential implicit relationship entity pair according to each correlation degree to obtain the implicit relationship entity pair; The knowledge representation model is trained based on the relational triples and is used to map the entity representation vector corresponding to the entity to the relational space through the projection matrix to obtain the entity projection vector corresponding to the entity; Relationship triples are obtained based on the relationship paths of each entity in the initial enterprise knowledge graph.

[0015] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: According to the relationship paths of the entities in the initial enterprise knowledge graph, multiple relationship triples are obtained, and the relationship triples include a head entity, a tail entity, and a head-tail entity relationship; According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model.

[0016] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: According to the relationship paths of each entity in the initial enterprise knowledge graph, multiple relationship triples are obtained, including: According to the relationship between each entity in the initial enterprise knowledge graph, at least one association path is obtained, and each relationship path consists of a head entity, at least one intermediate entity and a tail entity; For each association path, obtain the relationship triple corresponding to the implicit relationship entity pair; The head-tail entity relationship is determined according to the head entity, at least one intermediate entity and the tail entity in the association path.

[0017] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: The relationship representation vector corresponding to the head and tail entity relationship is obtained in the following way: For each relationship triple, obtain the semantic feature vector of the head entity as the first vector, obtain the semantic feature vector of the tail entity as the second vector, and obtain the semantic feature vectors of each intermediate entity as the shared relationship vector; The first vector, the second vector and the shared relationship vector are combined to obtain the relationship representation vector corresponding to the head and tail entity relationship.

[0018] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model, including: According to the relation triples, a sample set is constructed, which includes multiple positive samples and multiple negative samples. The positive samples are correct relation triples, and the negative samples are incorrect relation triples. According to the TransD representation learning algorithm, an initial knowledge representation model is constructed, and an initial first projection matrix and an initial second projection matrix are determined; According to the sample set, the following training operations are iteratively performed on the initial knowledge representation model until the preset training stop condition is met to obtain the knowledge representation model: The sample set is used as the input of the knowledge representation model. For each relation triple, the entity representation vector corresponding to the head entity is mapped to the relation space according to the first projection matrix, and the entity projection vector corresponding to the head entity is obtained. The entity representation vector corresponding to the tail entity is mapped to the relation space according to the second projection matrix, and the entity projection vector corresponding to the tail entity is obtained. In the relational space, the relation representation vector corresponding to the head-tail entity relation is used as the translation operation from the entity projection vector corresponding to the head entity to the entity projection vector corresponding to the tail entity, and the first projection matrix, the second projection matrix and the model parameters are adjusted with minimizing the loss function as the optimization goal; Among them, the loss function indicates the score difference between positive samples and negative samples, and the score indicates the prediction confidence of whether the relationship triple of the knowledge representation model is established.

[0019] According to a device for predicting the industry to which an enterprise belongs, the association degree is used to indicate the similarity or distance between entity projection vectors corresponding to two entities in a potential implicit relationship entity pair; Knowledge graph generation module, used for: According to each correlation degree, potential implicit relationship entity pairs corresponding to the correlation degree that meets the preset threshold condition are screened out as implicit relationship entity pairs.

[0020] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned methods for predicting the industry to which an enterprise belongs is implemented.

[0021] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned enterprise industry forecasting methods.

[0022] In a fifth aspect, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for predicting the industry to which an enterprise belongs.

[0023] The present invention provides a method, device, electronic device and storage medium for predicting the industry to which an enterprise belongs. By pre-generating an enterprise knowledge graph, scattered enterprise-related knowledge information is integrated into a structured initial enterprise knowledge graph, and by reasoning about the implicit relationships between entities in the initial enterprise knowledge graph, implicit relationship entity pairs are obtained to complete the relationships between entities, making the enterprise knowledge graph more complete and capable of reflecting deeper hidden information. The enterprise knowledge graph can then be used to find related entities corresponding to the target entity of the enterprise to be predicted, and the industry to which the enterprise belongs can be accurately predicted, which can effectively improve the accuracy of the prediction results of the industry to which the enterprise belongs. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 A schematic diagram of a process flow of a method for predicting the industry to which an enterprise belongs provided by the present invention; Figure 2 A schematic diagram of a partial enterprise knowledge graph related to enterprise A provided in an embodiment of the present invention; Figure 3 A schematic diagram of a knowledge representation model provided by an embodiment of the present invention; Figure 4 A structural block diagram of a device for predicting the industry to which an enterprise belongs provided by the present invention; Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] As an emerging data representation method, knowledge graph can describe entities, attributes and their relationships, and can effectively integrate multi-source heterogeneous data, providing new ideas for industry forecasting.

[0028] However, existing knowledge graphs often have certain deficiencies and incompleteness. When predicting the industry to which an enterprise belongs, it is only possible to find industries related to the enterprise from direct and known relationships in the knowledge graph, and it is impossible to obtain hidden information in the knowledge graph. As a result, industry predictions based on knowledge graphs can only predict the industry to which the enterprise belongs based on shallow information, which has an adverse impact on the accuracy of the prediction results.

[0029] It can be understood that in the embodiment of the present invention, any step of the method provided by the present invention in a method for predicting the industry to which an enterprise belongs can be executed by an electronic device and / or a server, and all steps in the method can be executed independently by the electronic device or the server, or jointly by the electronic device and the server.

[0030] The server may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services. The electronic device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device (such as a smart speaker), a wearable electronic device (such as a smart watch), a vehicle terminal, a smart home appliance (such as a smart TV), an AR / VR device, etc., but is not limited thereto.

[0031] The following describes the embodiments of the present invention using a server as an execution subject, however, this does not constitute a limitation to the embodiments of the present invention.

[0032] Figure 1 A flowchart of a method for predicting the industry to which an enterprise belongs provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method may include: S101, determining a target entity corresponding to the enterprise to be predicted, where the type of the target entity is an enterprise; Specifically, taking any enterprise as an enterprise to be predicted as an example, the enterprise industry prediction method provided by the embodiment of the present invention is described in detail.

[0033] The enterprise industry prediction method provided in the embodiment of the present invention is implemented based on a pre-generated enterprise knowledge graph. The enterprise knowledge graph includes multiple entities of different types, the relationships between entities, and the attributes of each entity. The specific construction method of the enterprise knowledge graph can be determined according to actual needs.

[0034] For any enterprise to be predicted, there is a target entity in the enterprise knowledge graph that corresponds to the enterprise to be predicted. In step S101, the target entity corresponding to the enterprise to be predicted is determined, and the type of the target entity is enterprise.

[0035] It can be understood that an entity is a basic unit composed of a relationship triple. When it comes to specific application scenarios, the entities can be divided into different types (i.e., entity types) according to the different characteristics and attributes of each entity. In the embodiment of the present disclosure, the relationship triple is used to predict the industry to which the enterprise belongs. The types of entities involved include at least enterprises, industries, and other types related to enterprises and industries (such as products, customers, industries, information (news), people, etc.). In actual application, the types and quantities of other types can be determined according to actual needs.

[0036] The marking method of the entity type may include, but is not limited to, directly identifying the type or identifying the corresponding number of the type, etc., to determine the type of the entity. For example, if the type of the target entity is an enterprise, the entity type may be identified by directly identifying "enterprise" or identifying the corresponding number "01" indicating the enterprise, etc.

[0037] S102, according to the target entity, search for related entities corresponding to the target entity from the pre-generated enterprise knowledge graph, the enterprise knowledge graph includes multiple entities of different types, the relationship between entities and the attributes of each entity, there is a relationship between the related entities and the target entity, and the type of the related entity is industry.

[0038] Among them, the enterprise knowledge graph is generated in the following ways: Construct an initial enterprise knowledge graph based on enterprise-related knowledge information; Inferring the implicit relationship between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, where the two entities in the implicit relationship entity pairs have no relationship in the initial enterprise knowledge graph; According to the implicit relationship entity pairs, the relationship between entities in the initial enterprise knowledge graph is completed to obtain the enterprise knowledge graph.

[0039] Specifically, in order to predict the industry to which an enterprise belongs, the embodiment of the present invention needs to generate an enterprise knowledge graph in advance. The enterprise knowledge graph is generated in the following manner: Based on the enterprise-related knowledge information, an initial enterprise knowledge graph is constructed. The enterprise knowledge graph includes multiple entities of different types, the relationships between entities, and the attributes of each entity.

[0040] For example, relevant information can be obtained from public information on the Internet as enterprise-related knowledge information, and knowledge fusion and knowledge processing can be performed on the basis of enterprise-related knowledge information. Using neo4j graph database software, an initial enterprise knowledge graph can be constructed. The construction of the initial enterprise knowledge graph includes the following two steps: (1) Construct entity and attribute element instances. According to the type of entity element, five types of entity nodes are constructed. Each entity node has a corresponding attribute description. The node types include: enterprise, product, industry, person, and news.

[0041] (2) Construct relationship element instances. Based on entity element nodes, according to five types of relationship elements, construct entity relationship edges (i.e., entity-time relationships) and associate entity elements. The relationship types include: investment, belonging, affiliation, reporting, and production.

[0042] Furthermore, based on the initial enterprise knowledge graph, the embodiment of the present invention introduces an implicit relationship entity pair, and the two entities in the implicit relationship entity pair have no relationship in the initial enterprise knowledge graph.

[0043] By reasoning about the implicit relationships between entities in the initial enterprise knowledge graph, implicit relationship entity pairs that can reflect potential entities and relationships are obtained from the initial enterprise knowledge graph. That is, the two entities in the implicit relationship entity pair do not have a direct association in the initial enterprise knowledge graph, but based on reasoning, it can be inferred that the two entities have a potential association (that is, they have an implicit relationship).

[0044] Based on the acquired implicit relationship entity pairs, the association between the two entities in each implicit relationship entity pair (i.e., implicit relationship) is completed in the initial enterprise knowledge graph, so that the hidden information in the enterprise knowledge graph can be extracted and revealed, so as to expand the structure and content of the initial enterprise knowledge graph and obtain the completed enterprise knowledge graph.

[0045] The implicit relationships in the completed enterprise knowledge graph may reveal deeper and more complex connections between entities in the enterprise knowledge graph, thereby providing more comprehensive information. Using the completed enterprise knowledge graph as the basis for predicting the industry to which the enterprise belongs can effectively improve the accuracy of the prediction results.

[0046] For example, a large amount of knowledge consisting of entities and entity relations in the industrial field is obtained through information extraction methods, but there are still missing or implicit relations. Figure 2 A schematic diagram of a partial enterprise knowledge graph related to enterprise A provided in an embodiment of the present invention, such as Figure 2 As shown, taking the completion of a part of the enterprise knowledge graph related to enterprise A as an actual scenario example, the reasoning principle of implicit relationships in the embodiment of the present invention is illustrated.

[0047] like Figure 2 As shown, the direct relationship between entities obtained based on the initial enterprise knowledge graph is represented by solid arrows (indicating the relationship type defined in the enterprise knowledge graph, that is, there is an explicit relationship between existing entities), and the implicit relationship obtained by reasoning is represented by dotted arrows (the relationship type not defined in the enterprise knowledge graph, the implicit relationship obtained through path reasoning between existing entities).

[0048] The path of the industry to which the enterprise belongs revolves around industry trend insights, enterprise strategic control and incubation of emerging products. The entity elements "news", "industry", "enterprise", "product" and "people" in the initial enterprise knowledge graph have rich semantic associations. Based on the initial partial enterprise knowledge graph related to enterprise A, the inference path is analyzed in combination with the basic needs of the enterprise and industry.

[0049] The reasoning of "implicit relationships" can be realized through the relationship chain of "enterprise → product → industry". For example, one enterprise corresponds to one or more products, and products usually involve multiple industries. Therefore, the implicit relationship of "enterprise → industry" can be accurately obtained. For complex relationships, such as a piece of news information about products and industries, the relationships of "news → product" and "news → person" can be obtained. With the help of the intermediary relationship of "enterprise → product" or "enterprise → person", the implicit relationship of "news → enterprise" and "enterprise → industry" can be mined.

[0050] It can be understood that the above implicit relationship reasoning process is only an illustration of the principle of implicit relationship reasoning. In specific implementation, a variety of different methods can be adopted according to actual needs, including but not limited to using logical reasoning, graph algorithms, machine learning and deep learning algorithms, or a combination of different methods to realize the reasoning of implicit relationships.

[0051] After obtaining the completed enterprise knowledge graph in the above manner, in step S102, according to the target entity, the related entities corresponding to the target entity are searched from the pre-generated enterprise knowledge graph. The related entity type is industry and has a relationship with the target entity. The number of target entities is determined according to actual conditions.

[0052] It can be understood that in the completed enterprise knowledge graph, the target entity has a relationship with the related entity, and the relationship includes the direct relationship included in the initial enterprise knowledge graph and the implicit relationship determined by reasoning.

[0053] In the completed enterprise knowledge graph, all entities that have direct and implicit relationships with the target entity are taken as candidate entities, and the related entities are candidate entities whose entity type is industry among the candidate entities. That is, the related entities are entities whose entity type is industry in the completed enterprise knowledge graph and have a relationship with the target entity (including the direct relationship included in the initial enterprise knowledge graph and the implicit relationship determined by reasoning and supplemented into the completed enterprise knowledge graph).

[0054] S103, obtaining the industry to which the enterprise to be predicted belongs according to the relevant entities.

[0055] Specifically, in the enterprise knowledge graph, each entity corresponds to an object or concept in the real world, and each enterprise and industry has a one-to-one corresponding entity, that is, there is a mapping relationship between each enterprise and each entity of the enterprise type, and there is a mapping relationship between each industry and each entity of the industry type. In step S103, according to the related entities corresponding to the target entity found in step S102, according to the mapping relationship between the related entities and the industries, the industries corresponding to the related entities are obtained, that is, the industries to which the enterprise to be predicted belongs. The number of industries to which the enterprise to be predicted belongs is consistent with the number of target entities.

[0056] The solution provided by the present invention integrates scattered enterprise-related knowledge information into a structured initial enterprise knowledge graph by pre-generating an enterprise knowledge graph, and obtains implicit relationship entity pairs to complete the relationship between entities by reasoning about the implicit relationships between entities in the initial enterprise knowledge graph, so that the enterprise knowledge graph is more complete and can reflect deeper hidden information. The enterprise knowledge graph can then be used to find related entities corresponding to the target entity of the enterprise to be predicted, and to accurately predict the industry to which the enterprise belongs, which can effectively improve the accuracy of the prediction results of the industry to which the enterprise belongs.

[0057] In an optional embodiment of the present invention, the implicit relationship between entities in the initial enterprise knowledge graph is inferred to obtain implicit relationship entity pairs, including: Obtain the semantic feature vector of each entity in the initial enterprise knowledge graph as the entity representation vector; According to the pre-trained knowledge representation model, the entity representation vector corresponding to each entity is mapped to the relational space to obtain the entity projection vector corresponding to each entity; According to the entity projection vectors corresponding to each entity, obtaining the degree of association between two entities in at least one potential implicit relationship entity pair; Screening each potential implicit relationship entity pair according to each correlation degree to obtain the implicit relationship entity pair; The knowledge representation model is trained based on the relational triples and is used to map the entity representation vector corresponding to the entity to the relational space through the projection matrix to obtain the entity projection vector corresponding to the entity; Relationship triples are obtained based on the relationship paths of each entity in the initial enterprise knowledge graph.

[0058] Specifically, in order to realize the reasoning of implicit relationships between entities in the initial enterprise knowledge graph and obtain implicit relationship entity pairs, an embodiment of the present invention constructs and pre-trains a knowledge representation model based on relationship description fusion.

[0059] The knowledge representation model is based on the modeling idea that "different relations have their own semantic space". It is used to map the entity representation vector corresponding to the entity to the relation space through a projection matrix, rather than directly operating in the entity space. The relation space refers to a space specific to relations. By mapping entities to the relation space, the model can better capture complex semantic relations. By introducing additional relation spaces, the model can learn and reason in a richer semantic space, thereby improving the expressiveness and accuracy of representation learning.

[0060] The knowledge representation model provided by the embodiment of the present invention is obtained based on relationship triples training. The relationship triples are obtained based on the relationship paths of each entity in the initial enterprise knowledge graph. The relationship path refers to the path formed by a series of ordered relationship links between entities. The relationship path reflects the connection and interaction between entities.

[0061] Relation triples include head entities, tail entities, and relations. During the training process, relation triples are used to learn the effective representation of entities and relations in low-dimensional space. By analyzing relation triples, the model can learn the degree of association and compatibility between entities under specific relations.

[0062] It can be understood that in the embodiments of the present invention, the method of determining the relationship path, the method of determining the relationship triple through the relationship path, and the method of constructing and training the knowledge representation model can be determined according to actual needs.

[0063] In order to obtain the implicit relationship in the initial enterprise knowledge graph, the semantic feature vector of each entity in the initial enterprise knowledge graph is obtained as the entity representation vector. It can be understood that the semantic feature vector of the entity is used to reflect the semantic information of the entity. According to actual needs, the semantic information may include but is not limited to one or more of the entity's attributes, types, categories and other information.

[0064] According to the pre-trained knowledge representation model, the entity representation vector corresponding to each entity is mapped to the relational space, the entity projection vector corresponding to each entity is obtained, and the entity is mapped.

[0065] Based on the entity projection vectors corresponding to the entities, the degree of association between entities can be determined by calculating the similarity or distance between the entity projection vectors. It can be understood that the method of calculating the degree of association between entity projection vectors includes but is not limited to calculating dot products, cosine similarity or Euclidean distance, etc.

[0066] Two entities that do not have a direct relationship in the initial enterprise knowledge graph are formed into a potential implicitly associated entity pair. The degree of association between the two entities in the potential implicitly associated entity pair is obtained through the entity projection vectors corresponding to the two entities in the potential implicitly associated entity pair.

[0067] The potential implicit relationship entity pairs are screened according to the association degrees, and the qualified ones are determined as implicit relationship entity pairs from among the potential implicit relationship entity pairs.

[0068] For example, for any potential implicitly associated entity pair, if the projection vectors of the two entities in the potential implicitly associated entity pair in the relationship space are very close, it may mean that they are compatible under the relationship, that is, there may be a real relationship between the two entities. At this time, the potential implicitly associated entity pair is regarded as an implicit relationship entity pair.

[0069] The solution provided by the present invention pre-trains a knowledge representation model, uses the knowledge representation model to map the entity representation vector to the relational space, and obtains the entity projection vector, so that the degree of association between the two entities can be obtained through the entity projection vectors corresponding to the two entities in the potential implicitly associated entity pair. According to the degree of association, implicitly associated entity pairs are screened out from the potential implicitly associated entity pairs, which helps to discover the implicit relationship between entities in the initial enterprise knowledge graph, complete the initial enterprise knowledge graph, and use the completed enterprise knowledge graph as the basis for predicting the industry to which the enterprise belongs, which can effectively improve the accuracy of the prediction results.

[0070] In an optional embodiment of the present invention, the knowledge representation model is generated in the following manner: According to the relationship paths of the entities in the initial enterprise knowledge graph, multiple relationship triples are obtained, and the relationship triples include a head entity, a tail entity, and a head-tail entity relationship; According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model.

[0071] Specifically, the initial enterprise knowledge graph constructed contains a large number of enterprise-related elements. The embodiment of the present invention combines the graph structure and relationship description, and proposes a knowledge graph completion method based on the TransD representation learning algorithm to better and faster discover more valuable implicit relationships from entities and entity relationships, and complete the enterprise knowledge graph with implicit relationships.

[0072] The knowledge representation model in the embodiment of the present invention is generated by: The initial enterprise knowledge graph is analyzed to extract the association paths of each entity, and a relationship triple is constructed based on each relationship path to obtain multiple relationship triples.

[0073] It is understandable that when extracting the association paths of each entity, all the relationship paths of each entity may be extracted, or a relationship path of a fixed length of each entity may be extracted, which may be determined according to actual needs.

[0074] In addition, since the relationship path may include at least one intermediate entity between the head entity and the tail entity, the information reflected by the relationship in the relationship triple determined by the relationship path may include but is not limited to one or more of the relationship direction, relationship type, relationship strength, intermediate entity, intermediate entity attributes, etc.

[0075] According to each relationship triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model. The TransD representation learning algorithm further proposes to construct two dynamically changing projection matrices related to the head and tail entities and relationships to better solve the problem of different semantics in the same relationship, and convert matrix operations into vector calculations to reduce model parameters and make it more suitable for large-scale knowledge graphs.

[0076] The solution provided by the present invention uses the TransD representation learning algorithm to perform knowledge representation learning according to each relationship triple, obtains a knowledge representation model, pre-trains the knowledge representation model, uses the knowledge representation model to map the entity representation vector to the relationship space, obtains the entity projection vector, and uses the entity projection vector as the basis for calculating the degree of association between entities, and then according to the degree of association, screens out implicitly associated entity pairs from potential implicitly associated entity pairs.

[0077] In an optional embodiment of the present invention, multiple relationship triples are obtained according to the relationship paths of the entities in the initial enterprise knowledge graph, including: According to the relationship between each entity in the initial enterprise knowledge graph, at least one association path is obtained, and each relationship path consists of a head entity, at least one intermediate entity and a tail entity; For each association path, obtain the relationship triple corresponding to the implicit relationship entity pair; The head-tail entity relationship is determined according to the head entity, at least one intermediate entity and the tail entity in the association path.

[0078] Specifically, according to the relationship between each entity in the initial enterprise knowledge graph, at least one association path is obtained, and each relationship path is composed of a head entity, at least one intermediate entity and a tail entity.

[0079] It can be understood that when obtaining the association path in the initial enterprise knowledge graph, the reasoning path rules can be set based on the knowledge graph structure, and the key path subgraph corresponding to the entity can be obtained through path search. The key path subgraph includes the most critical association path corresponding to the entity, thereby improving the efficiency of subsequent knowledge representation learning.

[0080] For example, in order to obtain a high-quality critical path subgraph G, we first study the actual specific needs of the industrial field and analyze the transfer hierarchy of entity relationships and the corresponding entity types in the enterprise knowledge graph.

[0081] Then, based on the relationship instances in the knowledge graph, a relational reasoning path rule set R is abstractly constructed, which contains the target relationship chain Rchain to be inferred. The target relationship chain consists of entity type type (e) and relationship type (r), such as Rchain:e1→r1→…→en.

[0082] Finally, a bounded depth-first search strategy is used to implement graph search and obtain the critical path subgraph G, where the bounded depth is determined by the length len of each target relationship chain. During the search process, the search stops when it reaches a specific length to avoid infinite search.

[0083] The bounded depth-first search strategy algorithm steps include: according to the rule set of the relationship reasoning path, heuristically traverse the initial enterprise knowledge graph to obtain the target relationship chain Rchain of each entity, and obtain the final critical path subgraph G from the target relationship chain corresponding to each entity, and use each path in the critical path subgraph G as the associated path for obtaining the relationship triples in the embodiment of the present invention.

[0084] After obtaining the association paths, for each association path, a relationship triple corresponding to the implicit relationship entity pair is obtained.

[0085] It can be understood that the association path includes a head entity, a tail entity and at least one intermediate entity. In order to make the head and tail entity relationship (i.e., relationship) in the relationship triplet better reflect how the head entity to the tail entity in the association path are interconnected through a series of ordered relationships, in an embodiment of the present invention, the head and tail entity relationship is determined based on the head entity, at least one intermediate entity and the tail entity in the association path, and the specific method for determining the head and tail entity relationship can be determined according to actual needs.

[0086] After obtaining multiple triples based on the initial enterprise knowledge graph, training samples of the knowledge representation model are constructed with each triple and the knowledge representation model is trained. This enables the knowledge representation model to play a role in perfecting the relationship paths in the initial enterprise knowledge graph, so that the final enterprise knowledge graph contains both explicit and implicit relationships between entities.

[0087] The solution provided by the present invention determines the relationship path from the initial enterprise knowledge graph. The association path can reveal the potential and difficult to directly observe associations between entities. The relationship triples are obtained according to the relationship path, and the knowledge representation model is enabled to perform knowledge representation learning through each relationship triple. This helps to mine the implicit relationships between entities from the initial enterprise knowledge graph by using a pre-trained knowledge representation model, complete the enterprise knowledge graph, and thereby improve the accuracy of the prediction results of the industry to which the enterprise belongs.

[0088] In an optional embodiment of the present invention, the relationship representation vector corresponding to the head-tail entity relationship is obtained in the following manner: For each relationship triple, obtain the semantic feature vector of the head entity as the first vector, obtain the semantic feature vector of the tail entity as the second vector, and obtain the semantic feature vectors of each intermediate entity as the shared relationship vector; The first vector, the second vector and the shared relationship vector are combined to obtain the relationship representation vector corresponding to the head and tail entity relationship.

[0089] The specific head-tail entity relationship is determined according to the head entity, at least one intermediate entity and the tail entity in the association path.

[0090] The knowledge representation model constructs a representation vector for each entity and relationship. In the embodiment of the present invention, the relationship representation vector corresponding to the head and tail entity relationships in the relationship triple is obtained by the following method: For each relationship triple, the semantic feature vector of the head entity is obtained as the first vector, the semantic feature vector of the tail entity is obtained as the second vector, and the semantic feature vectors of each intermediate entity are obtained as the shared relationship vector.

[0091] It is understandable that when the semantic feature vector corresponding to each entity is obtained, the specific type of entity-related text features extracted and the specific method of obtaining the semantic feature vector can be determined according to actual needs.

[0092] The first vector, the second vector and the shared relationship vector are combined to obtain a relationship representation vector corresponding to the head and tail entity relationship.

[0093] For example, for the above method of describing relationships using relationship representation vectors, for any relationship triplet, determine whether the entity types of the head entity and the tail entity meet the restrictions of the head and tail entity relationships. If it is determined that they meet, use the distributed memory model of Doc2Vec's paragraph vector to extract the text features of the entities in the relationship description (corresponding to the "paragraph" in the distributed memory model of the paragraph vector) and entity attributes (corresponding to the "segment" in the distributed memory model of the paragraph vector) to obtain the semantic vector representation of the head entity, the tail entity, and each intermediate entity, and obtain the first vector, the second vector, and the shared relationship vector respectively. The first vector, the second vector, and the shared relationship vector are merged to obtain the relationship representation vector.

[0094] In the solution provided by the present invention, the relationship representation vector corresponding to the head and tail entity relationship in the relationship triplet is obtained by merging the first vector, the second vector and the shared relationship vector corresponding to the head entity, the tail entity and each intermediate entity respectively, so that the relationship representation vector can integrate the information of multiple entities in the relationship path, and reflect the sequential link relationship between the head entity, each intermediate entity and the tail entity in the relationship path, so that the knowledge representation model can better capture the role and contribution of the intermediate entity in the relationship through the relationship representation vector, enhance the representation ability of the model, enable it to better capture the complex semantic relationship between entities, and help to more accurately capture implicit relationships from the initial enterprise knowledge graph through the knowledge representation model, thereby making the completed enterprise knowledge graph more accurate and improving the accuracy of the prediction results of the industry to which the enterprise belongs.

[0095] In an optional embodiment of the present invention, according to each relation triple, a TransD representation learning algorithm is used to perform knowledge representation learning to obtain a knowledge representation model, including: According to the relation triples, a sample set is constructed, which includes multiple positive samples and multiple negative samples. The positive samples are correct relation triples, and the negative samples are incorrect relation triples. According to the TransD representation learning algorithm, an initial knowledge representation model is constructed, and an initial first projection matrix and an initial second projection matrix are determined; According to the sample set, the following training operations are iteratively performed on the initial knowledge representation model until the preset training stop condition is met to obtain the knowledge representation model: The sample set is used as the input of the knowledge representation model. For each relation triple, the entity representation vector corresponding to the head entity is mapped to the relation space according to the first projection matrix, and the entity projection vector corresponding to the head entity is obtained. The entity representation vector corresponding to the tail entity is mapped to the relation space according to the second projection matrix, and the entity projection vector corresponding to the tail entity is obtained. In the relational space, the relation representation vector corresponding to the head-tail entity relation is used as the translation operation from the entity projection vector corresponding to the head entity to the entity projection vector corresponding to the tail entity, and the first projection matrix, the second projection matrix and the model parameters are adjusted with minimizing the loss function as the optimization goal; Among them, the loss function indicates the score difference between positive samples and negative samples, and the score indicates the prediction confidence of whether the relationship triple of the knowledge representation model is established.

[0096] Specifically, when training the knowledge representation model, a sample set is constructed based on each acquired relation triplet, and the sample set includes multiple positive samples and multiple negative samples. The positive sample is a correct relation triplet, and the negative sample is an incorrect relation triplet.

[0097] It can be understood that for each positive sample relation triple ( h, r, t ), we can construct several corresponding negative samples by replacing the entity ( h', r, t' ), the construction method of negative samples can be determined according to actual needs.

[0098] Figure 3 A schematic diagram of a knowledge representation model provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, according to the TransD representation learning algorithm, an initial knowledge representation model is constructed. In the knowledge representation model, for each head entity h , tail entity t and head and tail entity relationships r , respectively construct the corresponding entity representation vector h i , t i and the relationship representation vector r It is used to capture the semantic information of entities and relationships and construct the initial first projection matrix mapping from entity space to relationship space. M rh and the initial second projection matrix M rt .

[0099] Among them, the first projection matrix M rh Used to map the head entity to the relational space and obtain the entity projection vector corresponding to the head entity h ip , the second projection matrixM rt Used to map the tail entity to the relational space and obtain the entity projection vector corresponding to the tail entity t ip .

[0100] M rh =r p h ip +I m×n , M rt =r p t ip +I m×n ; In the formula, I m×n Represents an m×n unit vector. Therefore, the representation of the head entity and the tail entity mapped from the entity space to the relation space is:

[0101] The score is defined based on the distance between the projection vector of the head entity h and the projection vector of the tail entity t. The scoring function is defined as: ; According to the sample set, the following training operations are iteratively performed on the initial knowledge representation model until the preset training stop condition is met to obtain the knowledge representation model: The sample set is used as the input of the knowledge representation model. For each relation triplet, the entity representation vector corresponding to the head entity is mapped to the relation space according to the first projection matrix through the above mapping method to obtain the entity projection vector corresponding to the head entity. The entity representation vector corresponding to the tail entity is mapped to the relation space according to the second projection matrix to obtain the entity projection vector corresponding to the tail entity.

[0102] In the relation space, the relation representation vector corresponding to the head-tail entity relation is taken as the translation operation from the entity projection vector corresponding to the head entity to the entity projection vector corresponding to the tail entity.

[0103] Combined with the relation representation vector used for relation description, the knowledge representation model can convert the triples represented by the relation description into h i , r , t i ) is defined as: ; The score indicates the prediction confidence of whether the relation triple of the knowledge representation model is established. It is further proposed to combine the graph structure representation based on the TransD model with the relation description representation to construct a scoring function to improve the knowledge reasoning ability of the model. The scoring function of the knowledge representation model integrating the relation description is defined as: ; In the formula, It is a weight coefficient with a value between 0 and 1.

[0104] The loss function indicates the score difference between positive samples and negative samples. The loss function for model training is defined as: ; When training the model, the optimization goal is to minimize the loss function so that for all positive samples (h, r, t ), their scores are higher than the scores of the corresponding negative samples plus the marginal value γ , and adjust the first projection matrix, the second projection matrix and the model parameters based on the loss function obtained during training.

[0105] For example, in the experiment, when training the knowledge representation model, the vector dimension of the knowledge representation model is set to dim=200, the weight coefficient in the scoring function is set to ω=0.5, and the stochastic gradient descent algorithm is used to train the model, where the margin of the optimization function is 4 and the learning rate is 0.5.

[0106] It can be understood that the specific scheme for training the knowledge representation model above is only used as a specific example to explain the embodiment of the present invention in detail, and is not intended to limit the method provided by the present invention. In actual applications, the specific method of model training, the specific form of the scoring function, and the loss function can all be determined according to actual needs.

[0107] The solution provided by the present invention solves the shortcomings of the TransR model projection matrix that only considers the relationship between entities and too many matrix vector parameters. Combined with industrial data, the differences in the types and attributes of the head and tail entities of various relationships are considered. First, the concept of relationship description is proposed, including the structural information of the relationship (i.e., the directionality of entity pairs and entity types) and the type and semantic information of the relationship-entity pair (i.e., the main attributes). This can calculate the similarity of the head and tail entities in each relationship type, which is used to constrain the vector representation learning of entities and relationships, so that entities with higher semantic similarity are closer in the low-dimensional embedding space of the corresponding relationship.

[0108] In an optional embodiment of the present invention, the degree of association is used to indicate the similarity or distance between entity projection vectors corresponding to two entities in a potential implicit relationship entity pair; The potential implicit relationship entity pairs are screened according to the degree of association to obtain the implicit relationship entity pairs, including: According to each correlation degree, potential implicit relationship entity pairs corresponding to the correlation degree that meets the preset threshold condition are screened out as implicit relationship entity pairs.

[0109] Specifically, the association degree is used to indicate the similarity or distance between the entity projection vectors corresponding to the two entities in the potential implicit relationship entity pair. The association degree is positively correlated with the similarity and negatively correlated with the distance.

[0110] Correspondingly, different preset threshold conditions are set according to different types of similarity indicator objects.

[0111] When the association degree indicates similarity, the association degrees greater than a preset first threshold are screened out according to the association degrees, and the potential implicit relationship entity pairs corresponding to the screened association degrees are used as implicit relationship entity pairs.

[0112] When the association degree indicates a distance, the association degrees less than a preset first threshold are screened out according to the association degrees, and the potential implicit relationship entity pairs corresponding to the screened association degrees are used as implicit relationship entity pairs.

[0113] In the solution provided by the present invention, the similarity or distance between entity projection vectors can reflect the degree of association between entities under a specific relationship. By analyzing whether these association degrees meet the preset threshold conditions, the implicit relationship entity pairs can be screened out from the potential implicit relationship entity pairs to further supplement the enterprise knowledge graph, which is helpful to improve the quality of the enterprise knowledge graph, making it more accurate and complete, helping the knowledge graph to better reflect the relationship between entities and improve the accuracy of the prediction results of the industry to which the enterprise belongs.

[0114] Figure 4 A structural block diagram of a device for predicting the industry to which an enterprise belongs is provided for an embodiment of the present invention. Figure 4 As shown, the device may include: A target entity determination module 401 is used to determine a target entity corresponding to the enterprise to be predicted, where the type of the target entity is an enterprise; A related entity search module 402 is used to search for related entities corresponding to the target entity from a pre-generated enterprise knowledge graph according to the target entity, wherein the enterprise knowledge graph includes multiple entities of different types, relationships between entities, and attributes of each entity, and there is a relationship between the related entity and the target entity, and the type of the related entity is industry; The industry acquisition module 403 is used to acquire the industry to which the enterprise to be predicted belongs according to the related entities; Among them, the enterprise knowledge graph is generated in the following ways: Construct an initial enterprise knowledge graph based on enterprise-related knowledge information; Inferring the implicit relationship between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, where the two entities in the implicit relationship entity pairs have no relationship in the initial enterprise knowledge graph; According to the implicit relationship entity pairs, the relationship between entities in the initial enterprise knowledge graph is completed to obtain the enterprise knowledge graph.

[0115] The solution provided by the present invention integrates scattered enterprise-related knowledge information into a structured initial enterprise knowledge graph by pre-generating an enterprise knowledge graph, and obtains implicit relationship entity pairs to complete the relationship between entities by reasoning about the implicit relationships between entities in the initial enterprise knowledge graph, so that the enterprise knowledge graph is more complete and can reflect deeper hidden information. The enterprise knowledge graph can then be used to find related entities corresponding to the target entity of the enterprise to be predicted, and to accurately predict the industry to which the enterprise belongs, which can effectively improve the accuracy of the prediction results of the industry to which the enterprise belongs.

[0116] According to the present invention, a device for predicting the industry to which an enterprise belongs further includes: a knowledge graph generation module; the knowledge graph generation module is used to: Obtain the semantic feature vector of each entity in the initial enterprise knowledge graph as the entity representation vector; According to the pre-trained knowledge representation model, the entity representation vector corresponding to each entity is mapped to the relational space to obtain the entity projection vector corresponding to each entity; According to the entity projection vectors corresponding to each entity, obtaining the degree of association between two entities in at least one potential implicit relationship entity pair; Screening each potential implicit relationship entity pair according to each correlation degree to obtain the implicit relationship entity pair; The knowledge representation model is trained based on the relational triples and is used to map the entity representation vector corresponding to the entity to the relational space through the projection matrix to obtain the entity projection vector corresponding to the entity; Relationship triples are obtained based on the relationship paths of each entity in the initial enterprise knowledge graph.

[0117] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: According to the relationship paths of the entities in the initial enterprise knowledge graph, multiple relationship triples are obtained, and the relationship triples include a head entity, a tail entity, and a head-tail entity relationship; According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model.

[0118] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: According to the relationship paths of each entity in the initial enterprise knowledge graph, multiple relationship triples are obtained, including: According to the relationship between each entity in the initial enterprise knowledge graph, at least one association path is obtained, and each relationship path consists of a head entity, at least one intermediate entity and a tail entity; For each association path, obtain the relationship triple corresponding to the implicit relationship entity pair; The head-tail entity relationship is determined according to the head entity, at least one intermediate entity and the tail entity in the association path.

[0119] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: The relationship representation vector corresponding to the head and tail entity relationship is obtained in the following way: For each relationship triple, obtain the semantic feature vector of the head entity as the first vector, obtain the semantic feature vector of the tail entity as the second vector, and obtain the semantic feature vectors of each intermediate entity as the shared relationship vector; The first vector, the second vector and the shared relationship vector are combined to obtain the relationship representation vector corresponding to the head and tail entity relationship.

[0120] According to the present invention, there is also provided a device for predicting the industry to which an enterprise belongs, and a knowledge graph generation module, which is used for: According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model, including: According to the relation triples, a sample set is constructed, which includes multiple positive samples and multiple negative samples. The positive samples are correct relation triples, and the negative samples are incorrect relation triples. According to the TransD representation learning algorithm, an initial knowledge representation model is constructed, and an initial first projection matrix and an initial second projection matrix are determined; According to the sample set, the following training operations are iteratively performed on the initial knowledge representation model until the preset training stop condition is met to obtain the knowledge representation model: The sample set is used as the input of the knowledge representation model. For each relation triple, the entity representation vector corresponding to the head entity is mapped to the relation space according to the first projection matrix, and the entity projection vector corresponding to the head entity is obtained. The entity representation vector corresponding to the tail entity is mapped to the relation space according to the second projection matrix, and the entity projection vector corresponding to the tail entity is obtained. In the relational space, the relation representation vector corresponding to the head-tail entity relation is used as the translation operation from the entity projection vector corresponding to the head entity to the entity projection vector corresponding to the tail entity, and the first projection matrix, the second projection matrix and the model parameters are adjusted with minimizing the loss function as the optimization goal; Among them, the loss function indicates the score difference between positive samples and negative samples, and the score indicates the prediction confidence of whether the relationship triple of the knowledge representation model is established.

[0121] According to a device for predicting the industry to which an enterprise belongs, the association degree is used to indicate the similarity or distance between entity projection vectors corresponding to two entities in a potential implicit relationship entity pair; Knowledge graph generation module, used for: According to each correlation degree, potential implicit relationship entity pairs corresponding to the correlation degree that meets the preset threshold condition are screened out as implicit relationship entity pairs.

[0122] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the enterprise industry prediction method, which includes: determining the target entity corresponding to the enterprise to be predicted, the type of the target entity is enterprise; according to the target entity, searching for related entities corresponding to the target entity from a pre-generated enterprise knowledge graph, the enterprise knowledge graph includes multiple entities of different types, the relationship between each entity and the attributes of each entity, there is a relationship between the related entities and the target entity, and the type of the related entity is industry; according to the related entities, obtaining the industry to which the enterprise to be predicted belongs; wherein the enterprise knowledge graph is generated in the following manner: constructing an initial enterprise knowledge graph based on enterprise-related knowledge information; reasoning about the implicit relationship between each entity in the initial enterprise knowledge graph to obtain an implicit relationship entity pair, the two entities in the implicit relationship entity pair have no relationship in the initial enterprise knowledge graph; according to the implicit relationship entity pair, completing the relationship between each entity in the initial enterprise knowledge graph to obtain the enterprise knowledge graph.

[0123] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0124] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the enterprise industry prediction method provided by the above methods, which includes: determining a target entity corresponding to the enterprise to be predicted, the type of the target entity is an enterprise; according to the target entity, searching for related entities corresponding to the target entity from a pre-generated enterprise knowledge graph, the enterprise knowledge graph includes multiple entities of different types, relationships between entities and attributes of each entity, there is a relationship between the related entities and the target entity, and the type of the related entities is industry; according to the related entities, obtaining the industry to which the enterprise to be predicted belongs; wherein the enterprise knowledge graph is generated in the following manner: constructing an initial enterprise knowledge graph based on enterprise-related knowledge information; reasoning about the implicit relationships between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, the two entities in the implicit relationship entity pairs have no relationship in the initial enterprise knowledge graph; according to the implicit relationship entity pairs, completing the relationships between entities in the initial enterprise knowledge graph to obtain the enterprise knowledge graph.

[0125] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the enterprise industry prediction method provided by the above-mentioned methods, the method comprising: determining a target entity corresponding to the enterprise to be predicted, the type of the target entity being an enterprise; according to the target entity, searching for related entities corresponding to the target entity from a pre-generated enterprise knowledge graph, the enterprise knowledge graph comprising a plurality of entities of different types, relationships between entities and attributes of each entity, the related entities having a relationship with the target entity, and the type of the related entities being an industry; according to the related entities, obtaining the industry to which the enterprise to be predicted belongs; wherein the enterprise knowledge graph is generated in the following manner: constructing an initial enterprise knowledge graph according to enterprise-related knowledge information; reasoning about the implicit relationships between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs, the two entities in the implicit relationship entity pairs having no relationship in the initial enterprise knowledge graph; completing the relationships between entities in the initial enterprise knowledge graph according to the implicit relationship entity pairs to obtain the enterprise knowledge graph.

[0126] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the industry to which an enterprise belongs, characterized in that: include: Determine a target entity corresponding to the enterprise to be predicted, where the type of the target entity is an enterprise; According to the target entity, searching for related entities corresponding to the target entity from a pre-generated enterprise knowledge graph, wherein the enterprise knowledge graph includes multiple entities of different types, relationships between entities, and attributes of each entity, the related entity has a relationship with the target entity, and the type of the related entity is industry; According to the related entities, obtaining the industry to which the enterprise to be predicted belongs; The enterprise knowledge graph is generated in the following way: Construct an initial enterprise knowledge graph based on enterprise-related knowledge information; Inferring the implicit relationship between entities in the initial enterprise knowledge graph to obtain an implicit relationship entity pair, wherein two entities in the implicit relationship entity pair have no relationship in the initial enterprise knowledge graph; According to the implicit relationship entity pairs, the relationship between the entities in the initial enterprise knowledge graph is completed to obtain the enterprise knowledge graph.

2. The method according to claim 1, characterized in that The reasoning of the implicit relationship between entities in the initial enterprise knowledge graph to obtain implicit relationship entity pairs includes: Obtaining a semantic feature vector of each entity in the initial enterprise knowledge graph as an entity representation vector; According to the pre-trained knowledge representation model, the entity representation vector corresponding to each entity is mapped to the relational space to obtain the entity projection vector corresponding to each entity; According to the entity projection vectors corresponding to each entity, obtaining the degree of association between two entities in at least one potential implicit relationship entity pair; Screening each potential implicit relationship entity pair according to each correlation degree to obtain the implicit relationship entity pair; The knowledge representation model is obtained by training the relational triples, and is used to map the entity representation vector corresponding to the entity to the relational space through a projection matrix, so as to obtain the entity projection vector corresponding to the entity; The relationship triples are obtained according to the relationship paths of the entities in the initial enterprise knowledge graph.

3. The method according to claim 2, characterized in that The knowledge representation model is generated in the following way: According to the relationship paths of the entities in the initial enterprise knowledge graph, a plurality of relationship triples are obtained, wherein the relationship triples include a head entity, a tail entity, and a head-tail entity relationship; According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning and obtain the knowledge representation model.

4. The method according to claim 3, characterized in that The step of obtaining a plurality of relationship triples according to the relationship paths of the entities in the initial enterprise knowledge graph includes: According to the relationship between each entity in the initial enterprise knowledge graph, at least one association path is obtained, and each relationship path is composed of a head entity, at least one intermediate entity and a tail entity; For each association path, obtaining a relationship triple corresponding to the implicit relationship entity pair; The head-tail entity relationship is determined according to the head entity, at least one intermediate entity and the tail entity in the association path.

5. The method according to claim 4, characterized in that The relationship representation vector corresponding to the head and tail entity relationship is obtained in the following way: For each relationship triple, obtain the semantic feature vector of the head entity as the first vector, obtain the semantic feature vector of the tail entity as the second vector, and obtain the semantic feature vectors of each intermediate entity as a shared relationship vector; The first vector, the second vector and the shared relationship vector are combined to obtain a relationship representation vector corresponding to the head-tail entity relationship.

6. The method according to any one of claims 3 to 5, characterized in that: According to each relation triple, the TransD representation learning algorithm is used to perform knowledge representation learning to obtain a knowledge representation model, including: According to the relation triples, a sample set is constructed, wherein the sample set includes a plurality of positive samples and a plurality of negative samples, wherein the positive samples are correct relation triples, and the negative samples are incorrect relation triples; According to the TransD representation learning algorithm, an initial knowledge representation model is constructed, and an initial first projection matrix and an initial second projection matrix are determined; According to the sample set, the following training operations are iteratively performed on the initial knowledge representation model until a preset training stop condition is met, thereby obtaining the knowledge representation model: Using the sample set as the input of the knowledge representation model, for each relation triplet, mapping the entity representation vector corresponding to the head entity to the relation space according to the first projection matrix, obtaining the entity projection vector corresponding to the head entity, and mapping the entity representation vector corresponding to the tail entity to the relation space according to the second projection matrix, obtaining the entity projection vector corresponding to the tail entity; In the relationship space, the relationship representation vector corresponding to the head-tail entity relationship is used as a translation operation of the entity projection vector corresponding to the head entity to the entity projection vector corresponding to the tail entity, and the first projection matrix, the second projection matrix and the model parameters are adjusted with minimizing the loss function as the optimization goal; The loss function indicates the difference in scores between positive samples and negative samples, and the score indicates the prediction confidence of whether the relation triplet of the knowledge representation model is established.

7. The method according to claim 2, characterized in that The association degree is used to indicate the similarity or distance between entity projection vectors corresponding to two entities in the potential implicit relationship entity pair; The step of screening each potential implicit relationship entity pair according to each association degree to obtain the implicit relationship entity pair includes: According to each correlation degree, potential implicit relationship entity pairs corresponding to the correlation degree that meets the preset threshold condition are screened out as the implicit relationship entity pairs.

8. A device for predicting the industry to which an enterprise belongs, characterized in that: include: A target entity determination module is used to determine a target entity corresponding to the enterprise to be predicted, where the type of the target entity is an enterprise; A related entity search module is used to search for related entities corresponding to the target entity from a pre-generated enterprise knowledge graph according to the target entity, wherein the enterprise knowledge graph includes multiple entities of different types, relationships between entities, and attributes of each entity, and there is a relationship between the related entity and the target entity, and the type of the related entity is industry; An industry acquisition module, used for acquiring the industry to which the enterprise to be predicted belongs according to the related entity; The enterprise knowledge graph is generated in the following way: Construct an initial enterprise knowledge graph based on enterprise-related knowledge information; Inferring the implicit relationship between entities in the initial enterprise knowledge graph to obtain an implicit relationship entity pair, wherein two entities in the implicit relationship entity pair have no relationship in the initial enterprise knowledge graph; According to the implicit relationship entity pairs, the relationship between the entities in the initial enterprise knowledge graph is completed to obtain the enterprise knowledge graph.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Knowledge graph construction method, device and system

    CN110197280A

  • Knowledge graph completion method fusing entity types and relation path information

    CN114003729A

  • Industrial knowledge graph-oriented enterprise upstream and downstream relationship prediction method

    CN115618017A

  • Industrial knowledge graph and contextualization

    CN116340527A

  • Construction method and device of network collaborative manufacturing system based on knowledge graph

    CN116993306A