Data processing method and device, computer device, and storage medium
By selecting different reasoning models based on the prior facts of entity relationships, deterministic reasoning of entity relationships is performed, which solves the problems of insufficient accuracy and generalization ability in traditional reasoning methods and achieves wider applicability.
Patent Information
- Application Number
- CN202210441465.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-04-25
AI Technical Summary
Traditional reasoning methods have limited accuracy and generalization ability, resulting in limited applicability.
Based on the prior facts of entity relationships, different reasoning models (rule engine or graph model) are selected to perform deterministic reasoning on entity relationships.
It improves the accuracy and generalization ability of reasoning results and expands the applicability of reasoning methods.
Smart Images

Figure CN114969354B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a data processing method and device, computer equipment and a storage medium. BACKGROUND
[0002] Reasoning is an important branch of cognitive intelligence in artificial intelligence technology. In a traditional reasoning processing method, a single reasoning model is used for a reasoning task according to a reasoning requirement, and the same reasoning way is used for reasoning of known knowledge or unknown knowledge, so that the precision rate and generalization ability are limited, and the applicability of the reasoning method is not high. SUMMARY
[0003] Embodiments of the present application provide a data processing method, device, computer equipment and storage medium to solve the technical problem that the precision rate and generalization ability are limited in a traditional reasoning method, and the applicability of the reasoning method is not high.
[0004] A first aspect of the present application provides a data processing method, comprising:
[0005] obtaining target data;
[0006] performing structured processing on the target data to extract entity relationships;
[0007] determining whether there is prior knowledge for the entity relationships;
[0008] selecting a reasoning model according to a determination result of the prior knowledge;
[0009] inputting the entity relationships into the reasoning model to perform deterministic reasoning on the entity relationships.
[0010] In an embodiment, the selecting a reasoning model according to a determination result of the prior knowledge comprises:
[0011] if the prior knowledge exists, selecting a graph model as the reasoning model;
[0012] if the prior knowledge does not exist, selecting a rule engine as the reasoning model.
[0013] In an embodiment, the graph model is constructed by the following way:
[0014] obtaining required data from a knowledge graph to construct an original training data set, wherein the original training data set includes an entity relationship set, and the entity relationship set includes multiple groups, each group including a first entity, a second entity, and a relationship between the first entity and the second entity.
[0015] constructing an entity relationship graph in the form of an undirected graph by the entity relationship set, wherein a first entity and a second entity in the entity relationship set are graph nodes in the entity relationship graph, and a relationship between the first entity and the second entity in the entity relationship set is an edge in the entity relationship graph;
[0016] analyzing, from the entity relationship graph, a path set corresponding to each type of relationship;
[0017] training an inference model corresponding to each type of relationship by using the path set corresponding to each type of relationship and the corresponding entity relationship set, to obtain the graph model.
[0018] In an embodiment, the original training data further includes a relationship type set, and before the entity relationship set is constructed into an entity relationship graph in the form of an undirected graph, the method further includes:
[0019] performing synonym analysis on the relationship types in the relationship type set, and merging each synonymous relationship type in the relationship type set according to the analysis result to obtain an updated relationship type set;
[0020] updating the entities in the entity relationship set by using the updated relationship type set to obtain an updated entity relationship set.
[0021] In an embodiment, the determining whether the entity relationship has priori facts includes:
[0022] obtaining structured data, wherein the structured data includes verified entity relationships;
[0023] determining whether the entity relationship is in the verified entity relationships;
[0024] if the entity relationship is in the verified entity relationships, determining that the entity relationship has priori facts;
[0025] if the entity relationship is not in the verified entity relationships, determining that the entity relationship does not have priori facts.
[0026] In an embodiment, the target data includes user browsing record data; and after the entity relationship is input into the inference model for deterministic reasoning, the method further includes:
[0027] determining a recommended insurance product according to the reasoning result, and generating recommendation information;
[0028] pushing the recommendation information to a use client of the user.
[0029] The second aspect of the present application provides a data processing apparatus, comprising:
[0030] an acquisition module configured to acquire target data;
[0031] a processing module configured to perform structured processing on the target data to extract an entity relationship; a judging module configured to judge whether the entity relationship has a priori fact; a selecting module configured to select a target reasoning model according to a judgment result of the a priori fact; and a determining module configured to input the entity relationship into the reasoning model to perform deterministic reasoning on the entity relationship.
[0032] The third aspect of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method when executing the computer program.
[0033] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable by a processor to implement the steps of the data processing method.
[0034] In one of the above-mentioned schemes, different reasoning models are selected according to different judgment results of the a priori fact of the entity relationship, and then the entity relationship is input into the reasoning model selected according to the judgment result to perform deterministic reasoning on the entity relationship to obtain a reasoning result. Compared with the traditional scheme, in the traditional scheme, there is no such processing method. As described in the background, first, there is no judgment process of the a priori fact of the entity relationship in the traditional scheme, and second, no matter what the entity relationship is, a single reasoning model is input to perform deterministic reasoning. This processing method does not consider the characteristics of the target data and does not consider the characteristics of the entity relationship, which greatly reduces the accuracy or generalization of the reasoning result, and the two cannot effectively be taken into account, resulting in a narrow applicability or scope of the reasoning method. In the present application, the reasoning model is selected according to the judgment result of the a priori fact, rather than only a single reasoning model, and the entity relationship is input into the reasoning model to perform deterministic reasoning on the entity relationship, taking into account the characteristics of the target data, specifically, the characteristics of the entity relationship to select the reasoning model, which can greatly reduce the accuracy or generalization of the reasoning result, making the reasoning process more applicable. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor under the premise of the drawings.
[0036] Figure 1 is an application environment diagram of a data processing method in an embodiment of the present application;
[0037] Figure 2 is a flow diagram of a data processing method in an embodiment of the present application;
[0038] Figure 3 is another flow diagram of a data processing method in an embodiment of the present application;
[0039] Figure 4 is a flow diagram of constructing a graph model in a data processing method in an embodiment of the present application;
[0040] Figure 5 is another flow diagram of constructing a graph model in a data processing method in an embodiment of the present application;
[0041] Figure 6 is a relationship diagram of an entity relationship graph in an embodiment of the present application;
[0042] Figure 7 is a structure diagram of a data processing apparatus in an embodiment of the present application;
[0043] Figure 8 is a structure diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0045] The data processing method provided by the embodiments of the present application can be applied in, for example, Figure 1In an application environment, a client can communicate with a server through a network. The client, also referred to as a user end, is a program that provides local services for the client corresponding to the server. The client can be installed on, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices used by users. The server can be implemented by an independent server or a server cluster composed of multiple servers, and the server is used to implement the data processing method and device provided in the application. The data processing method, device, computer device, and storage medium provided in the application are described below.
[0046] In an embodiment, as shown in Figure 2 , a data processing method is provided. The method is applied to a server in Figure 1 , and includes the following steps:
[0047] S10: Obtain target data.
[0048] S20: Perform structured processing on the target data to extract entity relationships.
[0049] The target data refers to data used for subsequent deterministic reasoning analysis. Depending on the application scenario, the target data can be different data. For example, when the application scenario includes reasoning and analyzing the user's demand or intention for insurance products, the target data can be related data of the user's usual access and browsing of insurance-related information. For example, under the condition of user authorization, the browsing data of the user when accessing an insurance news webpage can be dynamically monitored, which can include the news title of a health care article, the news body, the health topic involved in the article, the disease description, the symptom description, the cause description, etc. Of course, it can also be the user's browsing of other insurance-related posts, articles, etc., which is not limited here. For another example, when the application scenario includes reasoning and analyzing the user's demand or intention for sports products, the target data can be related data of the user's usual access and browsing of sports information. For example, under the condition of user authorization, the browsing data of the user when accessing a sports news webpage can be dynamically monitored, which can include the news title of a sports article, the news body, and the sports topic involved in the article.
[0050] After obtaining the target data, since the obtained target data is the related data of the user's usual access and browsing of insurance related information, it is unstructured data. Unstructured data is data structure irregular or incomplete, without a predefined data model. Therefore, in order to subsequent reasoning of the reasoning model, in the embodiment of the present application, the obtained target data needs to be structured to extract entities in the target data and entity relationships between entities. It should be noted that when extracting entities and entity relationships in the target data, mature entity processing algorithms can be used for extraction, which is not limited here.
[0051] It can be seen that in the present application, the research object includes entities and entity relationships, wherein the entity refers to a specific concept, for example, taking the application scene of recommending insurance products as an example, the entities extracted from the target data can include diseases, disease symptoms, disease descriptions, insurance products, insurance guarantees. Corresponding entity relationships can include disease and disease symptom relationships, disease and insurance product relationships, insurance product and guarantee relationships, and the like. It should be noted that when applied to other fields, the corresponding entities and entity relationships are other conditions, which will not be described one by one here.
[0052] S30: Determine whether the entity relationship has priori facts.
[0053] In this embodiment, after extracting the entity relationship from the target data, it is determined whether the entity relationship has priori facts. It should be noted that the so-called priori facts refer to whether the entity relationship has been verified or has an authoritative source.
[0054] S40: Select a reasoning model according to the determination result of the priori facts.
[0055] S50: Input the entity relationship into the reasoning model to perform deterministic reasoning on the entity relationship.
[0056] In the data processing method provided in this application, after judging whether the entity relationship has priori facts, it can be seen that the determination result is that the entity relationship has priori facts or whether the entity relationship has priori facts. In the embodiment of this application, the reasoning model is selected according to the determination result of the priori facts. That is, in the embodiment of this application, different reasoning models are selected according to different determination results of the priori facts of the entity relationship. Then the entity relationship is input into the reasoning model selected according to the above determination result to perform deterministic reasoning on the entity relationship to obtain a reasoning result. It can be understood that in the traditional scheme, there is no such processing method. As described in the background, first, in the traditional scheme, there is no determination process of determining the priori facts of the entity relationship, and second, no matter how the entity relationship is, a single reasoning model is input for deterministic reasoning. This processing method does not consider the characteristics of the target data and does not consider the characteristics of the entity relationship, which greatly reduces the accuracy or generalization of the reasoning result, and both cannot be effectively considered, resulting in a narrow applicability or scope of the reasoning method. In this application, the reasoning model is selected according to the determination result of the priori facts, not just a single reasoning model. In addition, the entity relationship is input into the reasoning model to perform deterministic reasoning on the entity relationship. Considering the characteristics of the target data, specifically, considering the characteristics of the entity relationship to select the reasoning model, the accuracy or generalization of the reasoning result can be greatly reduced, making the reasoning process more applicable.
[0057] In an embodiment, the reasoning model to be selected can include a rule engine (Rule Engine, RE) and a graph model (Graphical Model, GM). It is necessary to first introduce the rule engine and the graph model of this application. Regarding the rule engine, the rule engine needs to load external business rules into the rule engine during work, and makes the rule engine work according to the business rules. The rule engine can include multiple business rules, a business rule contains a set of conditions and operations performed under the conditions, representing a piece of business logic of the business rule application. Business rules should usually be developed and modified by business analysts and policy managers, but some complex business rules can also be customized by technical personnel using object-oriented technical language or scripts. That is, the implementation logic of the business rule sets one or more conditions, and when these conditions are met, one or more operations are triggered. Regarding the graph model, the graph model in the embodiment of this application is also called a probabilistic graph model (Probabilistic Graphical Model, PGM) or a structured probabilistic model (structured probabilabilistic model, SGM), which is a probability model that uses a graph to represent the conditional dependence relationship between random variables.
[0058] As Figure 3 shown in FIG. 4, in step S40, the inference model is selected according to the determination result of the priori fact, specifically including the following steps:
[0059] S41: If the priori fact exists, a graph model is selected as the inference model.
[0060] S42: If the priori fact does not exist, a rule engine is selected as the inference model.
[0061] In this embodiment, if the priori fact exists, the rule engine is selected as the inference model, and then the entity relationship is input into the rule engine to perform deterministic reasoning on the entity relationship by the rule engine. Specifically, after the entity relationship is input into the rule engine, the entity relationship is matched with the business rules of the rule engine, and when one or more conditions of a certain business rule are met, one or more operations corresponding to the business rule are triggered to obtain the reasoning result. It can be understood that in this embodiment, when the target data has the priori fact, deterministic reasoning is directly performed by the rule engine to reason the known knowledge and solve the definiteness reasoning of the known knowledge, which is beneficial to improve the accuracy of reasoning. If the priori fact does not exist, the graph model is selected as the inference model, and then the entity relationship is input into the graph model to perform deterministic reasoning on the entity relationship by the graph model. Specifically, after the entity relationship is input into the graph model, the graph model will inductively train and construct a probability graph for the entity relationship and the entity, use the probability graph to mine the probability distribution of the entity relationship, construct a mapping relationship, form the probability distribution of the entity relationship that can be used for reasoning, and then perform reasoning according to the probability distribution of the entity relationship, which can reason the unknown knowledge and solve the uncertainty reasoning problem of the unknown knowledge, and can improve the generalization of reasoning.
[0062] It can be seen that in this embodiment, the application uses the "rule + graph reasoning" innovative mode, which on the one hand uses the rule engine to reason the known knowledge and improves the accuracy, and on the other hand uses the graph reasoning to reason the unknown knowledge and improves the generalization ability, and uses the rule engine and the graph model to perform fusion reasoning, which can effectively improve the accuracy and the generalization ability through running test, improve the applicability, and has better application prospect.
[0063] It should be noted that the graph model in the embodiment of the application can use a relatively mature graph model, which is not limited, and in the embodiment of the application, a graph model is also provided, as shown in FIG. 5, the graph model is constructed by the following way: Figure 4
[0064] S101: Obtain required data from a knowledge graph to construct an original training data set, wherein the original training data set includes an entity relationship set, and the entity relationship set includes multiple groups, each group including a first entity, a second entity, and a relationship between the first entity and the second entity.
[0065] In step S101, it is a data processing process. The knowledge graph can be a relatively complete knowledge graph, and the existing knowledge of the knowledge graph is correct or clear. In this embodiment of the present application, required data is obtained from the knowledge graph to construct an original training data set, and the original training data set includes an entity relationship set, and the entity relationship set includes multiple groups, each group including a first entity, a second entity, and a relationship between the first entity and the second entity. That is, the entity relationship set includes multiple different entity relationships, and the entity relationship can be expressed as: <first entity, relationship type, second entity>. It should be noted that the first entity and the second entity can be any entity in the knowledge graph, as long as they can be represented by a certain relationship type. For example, the first entity is "disease type", the second entity is "symptom specific performance", and the relationship type is "symptom". The first entity is "disease type", the second entity is "insurance product", and the relationship type is "guarantee type". Of course, depending on the different use of the scene and the different reasoning purposes, the entity relationship in the entity relationship set obtained from the knowledge graph is different. Here, only the recommended insurance product is taken as an example. In addition to "symptom", "guarantee type", etc., other relationships can also be included, which are not described one by one here.
[0066] S102: Construct an entity relationship graph in the form of an undirected graph by constructing the entity relationship set, wherein the first entity and the second entity in the entity relationship set are used as graph nodes in the entity relationship graph, and the relationship between the first entity and the second entity in the entity relationship set is used as an edge in the entity relationship graph.
[0067] S103: Analyze the path set corresponding to each type of relationship from the entity relationship graph.
[0068] S104: Train the reasoning model corresponding to each type of relationship using the path set corresponding to each type of relationship and the corresponding entity relationship set to obtain the graph model.
[0069] Steps S102-S104 are the process of learning and training the graph model. In the embodiments of the present application, the possibility of the existence of a corresponding relationship between two entities is learned and trained by the data in the entity relationship set obtained by learning, so as to complete the reasoning task. Specifically, first, an entity relationship graph in the form of an undirected graph needs to be constructed for each group of data in the entity set, wherein the first entity and the second entity in the entity relationship set are used as the graph nodes in the entity relationship graph, and the relationship between the first entity and the second entity in the entity relationship set is used as the edge in the entity relationship graph. For example, as shown in Figure 5 It should be noted that Figure 5 Only part of the content in the entity relationship graph is listed, and other entities and entity relationships are actually included, which cannot be listed one by one here. As can be seen, the relationship type constitutes the edge in the entity relationship graph, and the entity constitutes the node in the entity relationship graph.
[0070] After the entity relationship graph is constructed, for two entity relationships, there is a corresponding path, and in the embodiments of the present application, the path set corresponding to each type of relationship can be analyzed from the entity relationship graph. Figure 5 For example, it can be seen that there are multiple paths to the insurance product A, Figure 5 Among them, disease A can reach symptom specific performance A through the relationship type “symptom”, and then reach insurance product A through the relationship type “insurance product”; disease A can reach symptom specific performance A through the relationship type “symptom”, and then reach insurance product A through the relationship type “protection”. As can be seen, both of the two paths can reason the insurance product type corresponding to disease A. As can be seen, the path set corresponding to each type of relationship can be analyzed from the entity relationship graph. In the specific analysis, one group can be selected from the entity relationship set, then any first entity of the group can be extracted, then the node corresponding to the first entity can be found from the entity relationship graph according to the first entity, and the node can be taken as the starting node, and the path set that can reach the second entity can be found by advancing along the edge of the starting node, so that the feature set of the relationship type corresponding to the group is found, and other groups are similarly processed, so that the path set corresponding to each type of relationship is analyzed from the entity relationship graph.
[0071] After the path set of each type of relationship is obtained through the above process, the reasoning model corresponding to each type of relationship can be trained by using each group of entity relationships in the entity relationship set and the path set corresponding to each type of relationship, and the graph model is obtained. The key of learning and training lies in the selection of training data and the selection of learning model. In order to facilitate the understanding of the training data, a simple example is given here to illustrate that the entity relationship G 保险产品 < Disease specific performance A, insurance product, specific insurance product A > is an entity relationship set G 保险产品If one element in the set of paths P is a path corresponding to an insurance product relationship, the set of paths P includes paths P(P1, P2, P3), then a sample vector X can be constructed according to the three different paths <疾病具体表现A,保险产品,具体保险产品A> =(x1, x2, x3). Wherein the values of x1, x2 and x3 are constructed by using the path relationships P1, P2 and P3, and the construction process involves mathematical processing, which is not described here. According to a plurality of training samples, input a learning model, such as a logistic regression model, then the inference model corresponding to each type of relationship can be obtained, and the graph model can be obtained. How the specific logistic regression model performs logistic regression processing according to the training data is not described here.
[0072] In this embodiment, the entity relationship in the knowledge graph is used to establish an undirected entity relationship graph instead of a directed entity relationship graph, avoiding the complexity brought by the introduction of direction restriction, and the training and learning process is more simple. In addition, since the present application is undirected, more path quantities can be obtained, so that the inference of the final graph model can be more accurate.
[0073] In an embodiment, the original training data further includes a relationship type set, which includes various relationship types, such as Figure 5 As shown in FIG. 6, a graph model is also provided, which is constructed in the following way: Figure 5
[0074] S201: Obtain the required data from the knowledge graph to construct an original training data set, wherein the original training data set includes an entity relationship set, and the entity relationship set includes a plurality of groups, each group including a first entity, a second entity, and a relationship between the first entity and the second entity.
[0075] This step S201 can refer to the aforementioned step S101, which is not described here.
[0076] S202: Perform synonym analysis on the relationship types in the relationship type set, and merge each synonymous relationship type in the relationship type set according to the analysis result to obtain an updated relationship type set.
[0077] S203: Update the entities in the entity relationship set by using the updated relationship type set to obtain an updated entity relationship set.
[0078] S204: Construct an entity relationship graph in the form of an undirected graph by constructing the entity relationship set, wherein the first entity and the second entity in the entity relationship set are used as graph nodes in the entity relationship graph, and the relationship between the first entity and the second entity in the entity relationship set is used as an edge in the entity relationship graph.
[0079] S205: Analyze a path set corresponding to each relation type from the entity relation graph.
[0080] S206: Train a reasoning model corresponding to each relation type by using the path set corresponding to each relation type and the entity relation set corresponding to each relation type, to obtain the graph model.
[0081] In steps S204-S206, the foregoing steps S102-S104 can be referred to, and thus no repeated description is given.
[0082] The knowledge graph can include a large number of relation types, and the same relation types can exist in these relation types. If not handled, the dimension and difficulty of constructing relations can be increased. Therefore, in the embodiment of the present application, in order to optimize the training data, the relation types in the relation type set need to be analyzed for synonymy, and each synonymous relation type in the relation type set is merged according to the analysis result to obtain an updated relation type set. The entities in the entity relation set are updated by using the updated relation type set to obtain an updated entity relation set, and then the graph model is constructed by using the updated entity relation set to reduce the training difficulty.
[0083] In an embodiment, step S30, that is, determining whether the entity relation exists priori fact, specifically includes the following steps:
[0084] S31: Obtain structured data, and the structured data includes verified entity relations.
[0085] S32: Determine whether the entity relation is in the verified entity relations.
[0086] S33: If the entity relation is in the verified entity relations, it is determined that the entity relation exists priori fact.
[0087] S34: If the entity relation is not in the verified entity relations, it is determined that the entity relation does not exist priori fact.
[0088] In this embodiment, a specific implementation of determining whether the entity relation exists priori fact is provided, which is relatively simple. The existing structured data can be directly obtained, and then the verified entity relations in the structured data are queried to determine whether the entity relation exists priori fact. If the entity relation is in the verified entity relations, it is determined that the entity relation exists priori fact. If the entity relation is not in the verified entity relations, it is determined that the entity relation does not exist priori fact. The implementability of the scheme is improved.
[0089] In an embodiment, the target data comprises browsing record data of a user; after step S50, i.e., after inputting the entity relationship into the inference model for deterministic inference of the entity relationship, the method further comprises the following steps:
[0090] S60: determining a recommended insurance product according to the inference result, and generating recommendation information;
[0091] S70: pushing the recommendation information to a use client of the user.
[0092] In this embodiment, the data processing method provided by the embodiment of the present application is applied to the specific application scenario after inference, which is used for recommending an insurance product. As described above, the browsing record data of the user is unstructured data, and the embodiment of the present application obtains an entity relationship by analyzing the unstructured data, and then selects a suitable inference model for deterministic inference according to the entity relationship, so as to obtain the user's intended or required insurance product, i.e., a recommended insurance product, and then the recommended information of the recommended insurance product can be pushed to the use client (such as a mobile phone) of the user, so that a more accurate insurance product can be recommended, which has a precise practical scenario and commercial value.
[0093] It should be understood that the size of the serial number of each step in the above embodiment does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0094] In an embodiment, a data processing apparatus is provided, which corresponds to the data processing in the above embodiment. As shown in the figure, the data processing apparatus comprises an acquisition module 101 and a processing module 102. The functions of each functional module are described in detail as follows: Figure 7
[0095] The acquisition module 101 is configured to acquire target data.
[0096] The processing module 102 is configured to perform structured processing on the target data to extract an entity relationship; a judgment module is configured to judge whether there is priori fact for the entity relationship; according to the judgment result of the priori fact, a target inference model is selected; and the entity relationship is input into the inference model for deterministic inference of the entity relationship.
[0097] In an embodiment, the processing module 102 is further configured to:
[0098] If there is no priori fact, a graph model is selected as the inference model;
[0099] If there is the priori fact, a rule engine is selected as the inference model.
[0100] In an embodiment, the graph model is constructed by:
[0101] acquiring required data from the knowledge graph to construct an original training data set, wherein the original training data set includes an entity relationship set, and the entity relationship set includes a plurality of groups, each group including a first entity, a second entity, and a relationship between the first entity and the second entity;
[0102] constructing an entity relationship graph in the form of an undirected graph by the entity relationship set, wherein the first entity and the second entity in the entity relationship set are graph nodes in the entity relationship graph, and the relationship between the first entity and the second entity in the entity relationship set is an edge in the entity relationship graph;
[0103] analyzing a path set corresponding to each type of relationship from the entity relationship graph;
[0104] training an inference model corresponding to each type of relationship using the path set corresponding to each type of relationship and the corresponding entity relationship set, to obtain the graph model.
[0105] In an embodiment, in the process of constructing the graph model, the original training data further includes a relationship type set, and before constructing the entity relationship graph in the form of an undirected graph by the entity relationship set, a synonym analysis is performed on the relationship types in the relationship type set, and according to the analysis result, each synonymous relationship type in the relationship type set is merged to obtain an updated relationship type set; the entities in the entity relationship set are updated using the updated relationship type set to obtain an updated entity relationship set.
[0106] In an embodiment, the processing module 102 is further configured to:
[0107] acquire structured data, wherein the structured data includes verified entity relationships;
[0108] determine whether the entity relationship is in the verified entity relationships;
[0109] if the entity relationship is in the verified entity relationships, it is determined that the entity relationship has priori facts;
[0110] if the entity relationship is not in the verified entity relationships, it is determined that the entity relationship does not have priori facts.
[0111] In an embodiment, the processing module 102 is further configured to:
[0112] determine a recommended insurance product according to the inference result, and generate recommendation information;
[0113] The recommendation information is pushed to a use client of the user.
[0114] The specific limitation of the data processing apparatus can refer to the limitation of the data processing method in the foregoing, which will not be repeated here. Each module in the data processing apparatus can be realized by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor invokes and executes the operation corresponding to each module.
[0115] In the data processing apparatus provided in the present application, after judging whether the entity relationship has priori facts, it can be seen that the determination result is that the entity relationship has priori facts, or whether the entity relationship has priori facts. In the embodiment of the present application, the reasoning model is selected according to the determination result of the priori facts. That is, in the embodiment of the present application, different reasoning models are selected according to different determination results of the priori facts of the entity relationship. Then the entity relationship is input into the reasoning model selected according to the above determination result to perform deterministic reasoning on the entity relationship to obtain a reasoning result. It can be understood that in the traditional scheme, there is no such processing mode. As described in the background, first, in the traditional scheme, there is no determination process of determining the priori facts of the entity relationship, and second, no matter how the entity relationship is, a single reasoning model is input to perform deterministic reasoning. This processing mode does not consider the characteristics of the target data and does not consider the characteristics of the entity relationship, which greatly reduces the accuracy or generalization of the reasoning result, and the two cannot be effectively balanced, resulting in a narrow applicability or application range of the reasoning method. In the present application, the reasoning model is selected according to the determination result of the priori facts, rather than only a single reasoning model, and the entity relationship is input into the reasoning model to perform deterministic reasoning on the entity relationship. Considering the characteristics of the target data, specifically, considering the characteristics of the entity relationship to select the reasoning model, the accuracy or generalization of the reasoning result can be greatly reduced, and the reasoning process has wider applicability.
[0116] In one embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 1. Figure 8As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor to implement a data processing method.
[0117] In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to implement the following steps:
[0118] Obtaining target data;
[0119] Structurally processing the target data to extract entity relationships;
[0120] Determining whether the entity relationships exist priori facts;
[0121] According to the determination result of the priori facts, selecting a reasoning model, and the selected reasoning model is different for different determination results;
[0122] Inputting the entity relationships into the reasoning model to perform deterministic reasoning on the entity relationships.
[0123] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0124] Obtaining target data;
[0125] Structurally processing the target data to extract entity relationships;
[0126] Determining whether the entity relationships exist priori facts;
[0127] According to the determination result of the priori facts, selecting a reasoning model, and the selected reasoning model is different for different determination results;
[0128] Inputting the entity relationships into the reasoning model to perform deterministic reasoning on the entity relationships.
[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified. In actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.
[0131] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that, include: Acquire target data, wherein the target data is unstructured data that the user usually accesses and browses; The target data is structured to extract entity relationships; Determine whether the entity relationship exists based on prior facts, where prior facts refer to the entity relationship having been verified or having an authoritative source. Based on the determination result of the prior facts, a reasoning model is selected; different determination results require different reasoning models. The entity relationships are input into the reasoning model to perform deterministic reasoning on the entity relationships; The step of selecting a reasoning model based on the determination result of the prior facts includes: If the prior facts do not exist, a graph model is selected as the reasoning model. The graph model is used to inductively train the entity relationships and entities to construct a probability graph. The probability graph is used to mine the probability distribution of entity relationships, construct a mapping relationship, and form an entity relationship probability distribution for reasoning, so as to perform reasoning based on the entity relationship probability distribution. If the aforementioned prior facts exist, then the rule engine is selected as the reasoning model; The graph model is constructed in the following way: The required data is obtained from the knowledge graph to construct the original training dataset, wherein the original training dataset includes a set of entity relations, the set of entity relations includes multiple groups, and each group includes a first entity, a second entity, and the relationship between the first entity and the second entity; An undirected entity relationship graph is constructed using the entity relationship set, wherein the first entity and the second entity in the entity relationship set serve as graph nodes in the entity relationship graph, and the relationship between the first entity and the second entity in the entity relationship set serves as the connecting edge in the entity relationship graph. Analyze the path set corresponding to each type of relationship from the entity relationship graph; By using the path set corresponding to each type of relationship and the corresponding entity relationship set, a reasoning model corresponding to each type of relationship is trained to obtain the graph model.
2. The data processing method as described in claim 1, characterized in that, The original training data also includes a set of relation types. Before constructing an undirected graph-like entity relation graph using the set of entity relations, the method further includes: Perform synonym analysis on the relation types in the relation type set, and merge the synonym relation types in the relation type set according to the analysis results to obtain the updated relation type set; Using the updated set of relation types, the entities in the entity relation set are updated to obtain the updated entity relation set.
3. The data processing method according to any one of claims 1-2, characterized in that, The determination of whether the entity relationship exists based on prior facts includes: Obtain structured data, which includes verified entity relationships; Determine whether the entity relationship is already in the verified entity relationship; If it is already in the verified entity relationship, then it is determined that the entity relationship has a priori facts; If the entity is not in the verified entity relationship, then the entity relationship is determined to lack prior facts.
4. The data processing method according to any one of claims 1-2, characterized in that, The target data includes the user's browsing history data; After inputting the entity relationships into the reasoning model to perform deterministic reasoning on the entity relationships, the method further includes: Based on the reasoning results, recommended insurance products are determined and recommendation information is generated; The recommendation information is pushed to the user's client application.
5. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire target data, wherein the target data is unstructured data that the user usually accesses and browses. The processing module is used to perform structured processing on the target data to extract entity relationships; the judgment module determines whether the entity relationship has prior facts; based on the judgment result of the prior facts, a target reasoning model is selected; the entity relationship is input into the reasoning model to perform deterministic reasoning on the entity relationship, wherein the prior facts refer to the entity relationship having been verified or having an authoritative source; The processing module is further configured to: If the prior facts do not exist, a graph model is selected as the reasoning model. The graph model is used to inductively train the entity relationships and entities to construct a probability graph. The probability graph is used to mine the probability distribution of entity relationships, construct a mapping relationship, and form an entity relationship probability distribution for reasoning, so as to perform reasoning based on the entity relationship probability distribution. If the aforementioned prior facts exist, then the rule engine is selected as the reasoning model; The graph model is constructed in the following way: The required data is obtained from the knowledge graph to construct the original training dataset, wherein the original training dataset includes a set of entity relations, the set of entity relations includes multiple groups, and each group includes a first entity, a second entity, and the relationship between the first entity and the second entity; An undirected entity relationship graph is constructed using the entity relationship set, wherein the first entity and the second entity in the entity relationship set serve as graph nodes in the entity relationship graph, and the relationship between the first entity and the second entity in the entity relationship set serves as the connecting edge in the entity relationship graph. Analyze the path set corresponding to each type of relationship from the entity relationship graph; By using the path set corresponding to each type of relationship and the corresponding entity relationship set, a reasoning model corresponding to each type of relationship is trained to obtain the graph model.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the data processing method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data processing method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Air-land unmanned smart decision making method
CN108229685A
Knowledge representation method combining logic rules and confidence
CN111144570A