Data table and entity matching method and related equipment

By obtaining the word vector matrix of data tables and entities in the database system, and using word embedding models and neural networks to calculate similarity, the problem of difficult matching of data tables in different database systems is solved, and automatic matching and efficient data information sharing are achieved.

CN111737457BActive Publication Date: 2024-09-03BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010424113.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-19
Publication Date
2024-09-03
Estimated Expiration
2040-05-19

AI Technical Summary

Technical Problem

Due to differences in autonomy and creation time between different database systems, data tables use different modes when describing the same entity, making data table matching difficult, especially in the process of multi-department data sharing and solving crimes, which is time-consuming and labor-intensive.

Method used

By obtaining the word vector matrix of the data table and the entity, using the word embedding model and neural network to calculate the similarity, the matching results of the data table and the entity are automatically determined and the matching efficiency is improved.

Benefits of technology

It realizes the automatic matching of data tables and entities, reduces the time and energy of manual judgment, and improves the efficiency of multi-department data information sharing and collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111737457B
    Figure CN111737457B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data table and entity matching method and related equipment, wherein the method comprises: obtaining the word vector matrix of the data table and entity to be matched; calculating the similarity between the data table and entity according to the word vector matrix of the data table and entity; and determining the matching result between the data table and entity according to the similarity. In this way, the matching result between the data table and the entity can be automatically obtained, which greatly improves the matching efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to data processing technology, and more particularly to a method for matching a data table with an entity and related equipment. Background Art

[0002] Currently, databases play a vital role in data storage, but due to the autonomy of each database, different data tables use different database schemas when describing the same entity (such as a person, address, organization, etc.). For example, when storing people's information in a relational database, the attribute name corresponding to the personnel's ID information may be "ID number" or "ID number". This heterogeneity between different database schemas makes it difficult to automatically map data tables to specific entities.

[0003] For example, in the field of public security, the government has multiple database systems. The system creation time and personnel of each department are different, which leads to the use of different descriptive words or different aspects of a type of information in the tables of the database system. At this time, there are certain differences between the data tables of different departments. Sometimes, in order to solve a case, it is necessary to integrate the data information of multiple departments. However, due to the data differences mentioned above, it is currently only possible to rely on manual judgment to determine whether two data tables of different departments describe the same entity information, which is very time-consuming and labor-intensive. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method for matching a data table with an entity, comprising:

[0005] Get the word vector matrix of the data table to be matched and the entity respectively;

[0006] Calculate the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively;

[0007] A matching result between the data table and the entity is determined according to the similarity.

[0008] The embodiment of the present invention further provides a data table and entity matching device, including:

[0009] An acquisition unit, configured to acquire the word vector matrix of the data table to be matched and the entity respectively;

[0010] A calculation unit, configured to calculate the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively;

[0011] The matching unit is configured to determine a matching result between the data table and the entity according to the similarity.

[0012] An embodiment of 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 the computer program implements the above-mentioned data table and entity matching method when executed by the processor.

[0013] An embodiment of the present invention further provides a computer-readable storage medium, on which an information processing program is stored. When the information processing program is executed by a processor, the above-mentioned data table and entity matching method is implemented.

[0014] The technical solution provided by the embodiment of the present invention can automatically obtain the matching results between the data table and the entity, greatly improving the matching efficiency.

[0015] Other features and advantages of the present application will be described in the following description. Other advantages of the present application can be realized and obtained through the solutions described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0017] Figure 1 A schematic diagram of a flow chart of a method for matching a data table with an entity provided by an embodiment of the present invention;

[0018] Figure 2 A schematic flow chart of a method for matching a data table with an entity provided in another embodiment of the present invention;

[0019] Figure 3 A schematic flow chart of a method for matching a data table with an entity provided in another embodiment of the present invention;

[0020] Figure 4 It is a schematic diagram of the attributes of a data table and an entity in one embodiment of the present invention;

[0021] Figure 5 A schematic flow chart of a method for matching a data table with an entity provided in another embodiment of the present invention;

[0022] Figure 6 A schematic diagram of the structure of a data table and entity matching device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.

[0024] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the attached claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the attached claims.

[0025] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps of the specific order described. As will be understood by those of ordinary skill in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps of performing them in the order written, and those skilled in the art can easily understand that these sequences can be changed and still remain within the spirit and scope of the embodiments of the present application.

[0026] Figure 1 A flow chart of a method for matching a data table with an entity provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method includes:

[0027] Step 101, obtaining the word vector matrix of the data table to be matched and the entity respectively;

[0028] Step 102, calculating the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively;

[0029] Step 103: determining a matching result between the data table and the entity according to the similarity.

[0030] In one example, obtaining the word vector matrix of the data table to be matched and the entity respectively includes:

[0031] Preprocessing the attributes of the to-be-matched data table and the entity to obtain the word sequences of the to-be-matched data table and the entity;

[0032] According to the word sequences of the data table to be matched and the entity, the word embedding model is used to obtain the word vector matrix of the data table to be matched and the entity respectively;

[0033] The word vector matrices of the data table to be matched and the entity are respectively aggregated to obtain the word vector matrices of the data table to be matched and the entity.

[0034] In one example, the word embedding model includes at least one of the following: word2vec model, GloVe model, fastText model, other word embedding models;

[0035] The aggregation uses an average or weighted average aggregation function.

[0036] In one example, calculating the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively includes:

[0037] According to the word vector matrices of the data table and the entity respectively, a preset similarity algorithm is used to calculate the similarity between the data table and the entity.

[0038] In one example, determining a matching result between the data table and the entity according to the similarity includes:

[0039] comparing the similarity with a preset threshold;

[0040] When the similarity is greater than a preset threshold, the matching result indicates that the data table matches the entity;

[0041] When the similarity is not greater than a preset threshold, the matching result indicates that the data table does not match the entity.

[0042] In one example, calculating the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively includes:

[0043] Based on the trained neural network similarity calculation model, the word vector matrices of the data table and the entity are taken as input, and the similarity vectors of the data table and the entity are output;

[0044] The neural network similarity calculation model is obtained by pre-training the first neural network using a similarity algorithm using a first training sample, with the word vector matrix of the data table and the entity as input and the similarity vector of the data table and the entity as output; the first training sample is a data table with multiple labeled similarity vectors and the word vector matrix of the entity.

[0045] In one example, determining a matching result between the data table and the entity according to the similarity includes:

[0046] Based on the trained neural network classification model, the similarity vector is used as input to output the matching result between the data table and the entity;

[0047] The neural network classification model is obtained by pre-training the second neural network using the second training sample, taking the similarity vector between the data table and the entity as input and the matching result between the data table and the entity as output; the second training sample is the similarity vector of the data table and the entity with multiple labeled matching results.

[0048] The technical solution provided by the embodiment of the present invention can automatically obtain the matching results between the data table and the entity, greatly improving the matching efficiency.

[0049] Figure 2 A flowchart of a method for matching a data table and an entity provided by another embodiment of the present invention is shown as follows: Figure 2 As shown, the method includes:

[0050] Step 201, pre-processing the attributes of the to-be-matched data table and the entity to obtain the word sequences of the to-be-matched data table and the entity;

[0051] Data tables refer to various tables that carry data, such as relational tables in relational databases. The attributes of a data table refer to the column names of the table data. For example, when entering personnel information, there will be some columns on the Excel header, such as name and age descriptions, which are table attributes.

[0052] In the field of natural language processing, entities can be simply understood as nouns, such as names of people, organizations, places, and all other entities identified by names. More general entities also include numbers, dates, currencies, addresses, etc. The attributes of an entity refer to some information describing the above entities. For example, when the entity is a person, the person's name and ID number need to be provided to describe the entity; when the entity is an organization, the name of the organization, the person in charge, etc. need to be provided to describe the entity.

[0053] In one example, the above preprocessing refers to segmenting all attributes of the data table and entity, removing stop words, etc., to obtain a word sequence with word granularity. For example, the training sample includes m data tables, Seq S1 Represents the word sequence of data table S1, Seq S2 Represents the word sequence of data table S2, and so on to obtain the word sequence Seq of each data table Si , i = 1…m. For another example, the training sample includes n entities, Seq T1 The word sequence representing entity T1, Seq T2 The word sequence representing entity T2, and so on, to obtain the word sequence Seq of each entity Tj , j=1…n.

[0054] Step 202, using a word embedding model to obtain a word vector matrix of the data table to be matched and the entity respectively according to the word sequences of the data table to be matched and the entity respectively;

[0055] In one example, the word embedding model can be any existing word embedding model, such as: word2vec model, GloVe model, fastText model, or other word embedding models. The above-mentioned use of the word embedding model to obtain the word vector matrix of the data table and the entity according to the word sequence of each entity refers to the use of the word vector matrix obtained by the word embedding model to represent all sequences. For example, based on the word2vec model, for the sequence Seq S1 , assuming that the sequence has p words; for the sequence Seq T1 , the sequence has q words; assuming that the dimension of the output after word embedding is d, according to Seq S1 The matrix can be obtained According to Seq T1 The matrix can be obtained

[0056] The calculation process of the word vector matrix generally uses a document separated into words as input, and obtains the vector representation of each word after deep learning model training. The mathematical formulas used by different training models are different, but there are similar calculation projects, as follows: define the target function; represent the text as a matrix and input the target function; fit the labeled data according to the output of the function; the optimal fitting parameters of the function indicate that the function is well trained; input new input to obtain the vectorized representation of the text. Since the existing word embedding model is used, that is, the trained word embedding representation is already available, the word vector can be obtained by directly querying the corresponding word, without the need for additional calculations and model training.

[0057] Step 203, respectively aggregating the word vector matrices of the to-be-matched data table and the entity to obtain the word vector matrices of the to-be-matched data table and the entity;

[0058] The aggregation operation can adopt any existing aggregation method. For example, in one example, the above aggregation can use a simple aggregation function, such as averaging, weighted average and other functions. The purpose of aggregating the matrices obtained from each attribute sequence is to aggregate the matrices obtained from each sequence word into a vector of uniform dimension, thereby realizing the aggregation of data tables or entity attributes. For example, using the averaging aggregation function H, For example, take the average of the d-dimensional vectors of p words in each dimension and get R d Dimensional vector The vector This is the word vector matrix of data table S1. For example, assuming p = 3, d = 5, there are three five-dimensional vectors, assuming that they are u_1 = (1, 2, 3, 4, 3), u_2 = (3, 3, 4, 2, 4), and u_3 = (1, 3, 2, 5, 2). The average is to add the values ​​of the corresponding positions of the three vectors and then divide by the number of vectors. The calculation process of taking the average is:

[0059]

[0060] Similarly, for the sequence Using the above aggregation function, we can get R d Dimensional vector The vector That is the word vector matrix of entity T1.

[0061] Step 204, calculating the similarity between the data table and the entity using a preset similarity algorithm according to the word vector matrices of the data table and the entity respectively;

[0062] In an example, the preset similarity algorithm may be any existing similarity algorithm, such as a cosine similarity algorithm, a Euclidean distance similarity algorithm, and the like.

[0063] In another example, the similarity algorithm can also be viewed as a function and It is the word vector matrix of the data table and entity after averaging in the previous step, which is used as the input of function F, and its output is a similarity vector Can represent vectors and The degree of similarity between the data table and the entity.

[0064] Step 205, compare the similarity with a preset threshold; when the similarity is greater than the preset threshold, the matching result indicates that the data table matches the entity; when the similarity is not greater than the preset threshold, the matching result indicates that the data table does not match the entity.

[0065] In one example, a threshold is pre-set as a preset threshold. For example, the preset threshold is 50%. When the similarity between the data table and the entity is greater than 50%, it indicates that the data table matches the entity, and when the similarity between the data table and the entity is not greater than 50%, it indicates that the data table does not match the entity.

[0066] In another example, the matching process in this step can also be regarded as a function, using the distance to

[0067] Explain the matching problem. For example, suppose a function is The preset threshold is 50%. The input of this function is the output of the previous step, that is, the similarity between the data table and the entity. The output z of this function is a value between [0, 1]. When z exceeds 0.5, it means that the input relationship table matches the entity, otherwise it means that the input relationship table does not match the entity. This function G can also be understood as a trained model for judging whether it matches or not.

[0068] The technical solution provided by the embodiment of the present invention can automatically obtain the matching results between the data table and the entity, greatly improving the matching efficiency.

[0069] Figure 3 A flowchart of a method for matching a data table and an entity provided by another embodiment of the present invention is shown as follows: Figure 3 As shown, the method includes:

[0070] Step 301, using a similarity algorithm to train a first neural network using a first training sample to obtain a neural network similarity calculation model;

[0071] Among them, the neural network similarity calculation model takes the word vector matrix of the data table and the entity as input, and takes the similarity vector of the data table and the entity as output.

[0072] The first training sample is a data table of multiple labeled similarity vectors and a word vector matrix of each entity.

[0073] In one example, the data table of labeled similarity vectors in the first training sample and the word vector matrix of each entity can be obtained in the following manner, including:

[0074] For each pair of data tables and entities with labeled similarity vectors, perform the following operations:

[0075] Preprocessing the attributes of the data table and the entity to obtain the word sequences of the data table and the entity;

[0076] According to the word sequences of the data table and the entity, the word embedding model is used to obtain the word vector matrix of the data table and the entity respectively;

[0077] Aggregate the word vector matrix of the data table to obtain the word vector matrix of the data table;

[0078] Aggregate the word vector matrix of the entity to obtain the word vector matrix of the entity.

[0079] Among them, data tables refer to various tables that carry data, such as relational tables in relational databases. The attributes of a data table refer to the column names of the table data. For example, when entering personnel information, there will be some columns on the Excel header, such as name and age descriptions, which are table attributes.

[0080] In the field of natural language processing, entities can be simply understood as nouns, such as names of people, organizations, places, and all other entities identified by names. More general entities also include numbers, dates, currencies, addresses, etc. The attributes of an entity refer to some information describing the above entities. For example, when the entity is a person, the person's name and ID number need to be provided to describe the entity; when the entity is an organization, the name of the organization, the person in charge, etc. need to be provided to describe the entity.

[0081] In one example, the above preprocessing refers to segmenting all attributes of the data table and entity, removing stop words, etc., to obtain a word sequence with word granularity. For example, the training sample includes m data tables, Seq S1 Represents the word sequence of data table S1, Seq S2 Represents the word sequence of data table S2, and so on to obtain the word sequence Seq of each data table Si , i = 1…m. For another example, the training sample includes n entities, Seq T1 The word sequence representing entity T1, Seq T2 The word sequence representing entity T2, and so on, to obtain the word sequence Seq of each entity Tj , j=1…n.

[0082] In one example, the word embedding model includes at least one of the following: word2vec model, GloVe model, fastText model, and other word embedding models. The above-mentioned using the word embedding model to obtain the word vector matrix of the data table and the entity according to the word sequence of each entity refers to using the word vector matrix obtained by the word embedding model to represent all sequences. For example, based on the word2vec model, for the sequence SeqS1 , assuming that the sequence has p words; for the sequence Seq T1 , the sequence has q words; assuming that the dimension of the output after word embedding is d, according to Seq S1 The matrix can be obtained According to Seq T1 The matrix can be obtained

[0083] The calculation process of the word vector matrix generally uses a document separated into words as input, and obtains the vector representation of each word after deep learning model training. The mathematical formulas used by different training models are different, but there are similar calculation projects as follows: define the target function; represent the text as a matrix and input the target function; fit the labeled data according to the output of the function; the optimal fitting parameters of the function indicate that the function is well trained; input new input to obtain the vectorized representation of the text. Since the existing word embedding model is used, that is, the trained word embedding representation is already available, the word vector can be obtained by directly querying the corresponding word, without the need for additional calculations and model training.

[0084] In one example, the above aggregation can use simple aggregation functions, such as averaging, weighted average, etc. The purpose of aggregating the matrices obtained from each attribute sequence is to aggregate the matrices obtained from each sequence word into a vector of uniform dimension, thereby realizing the aggregation of data tables or entity attributes. For example, using the average aggregation function H, For example, take the average of the d-dimensional vectors of p words in each dimension and get R d Dimensional vector Assuming p = 3, d = 5, there are three five-dimensional vectors, assuming that they are u_1 = (1, 2, 3, 4, 3), u_2 = (3, 3, 4, 2, 4), and u_3 = (1, 3, 2, 5, 2). Taking the average is to add the values ​​of the corresponding positions of the three vectors and then divide by the number of vectors. The calculation process of taking the average is:

[0085]

[0086] Similarly, for the sequence Using the above aggregation function, we can get R d Dimensional vector

[0087] In one example, the training process of the neural network similarity calculation model can be regarded as the training of the parameters of a function. and It is the word vector matrix of the data table and entity after averaging in the previous step, which is used as the input of function F, and its output is a similarity vector Can represent vectors and The similarity between the data table and the entity is then Compare with the real similarity vector to determine whether they are consistent. When they are consistent, it means that the parameters of the function can accurately determine the similarity between the data table and the entity, indicating that the neural network similarity calculation model has been trained; when they are inconsistent, it means that the parameters of the function cannot accurately determine the similarity between the data table and the entity, and the parameters of the function are adjusted, and new labeled data (the label is the real similarity vector of the new data table and the entity) (that is, the word vector matrix of the new data table and the entity) is input into the function to continue training; and so on, by continuously training and adjusting the parameters of the function, the accuracy of the output results can be continuously improved.

[0088] It should be noted that in addition to the word vector matrix, other methods for calculating similarity can also be used. However, other methods cannot handle the problem of polysemy and synonymy when dealing with natural language processing. Representing words in a continuous vector form using a word embedding model can better represent the similarity between words.

[0089] Among them, the training method of the neural network similarity calculation model can use a gradient-based optimization method. The training can be performed on the labeled output training samples, and the trained model can be used for the prediction of unlabeled data. The gradient-based optimization method includes: gradient descent method, stochastic gradient descent method, Adam optimization method, etc.

[0090] Step 302, training the second neural network using the second training sample to obtain a neural network classification model;

[0091] The neural network classification model takes the similarity vector between the data table and the entity as input, and takes the matching result between the data table and the entity as output.

[0092] The second training sample is a data table of a plurality of labeled matching results and a similarity vector of an entity.

[0093] In one example, a neural network can be used to perform similarity calculation. For example, the training process of the neural network classification model can be regarded as the training of the parameters of a function. The function is is the similarity vector obtained in the previous step, which is used as the input of function G.

[0094] The output is a value z, which is a value between [0, 1]. Assuming that the preset threshold is 50%, when z exceeds 0.5, it is set to 1, indicating a match, otherwise it is set to 0, indicating a mismatch. Then the matching result is compared with the actual matching result to determine whether they are consistent. If they are consistent, it means that the parameters of the function can accurately determine the matching results between the data table and the entity, indicating that the neural network classification model has been trained; if they are inconsistent, it means that the parameters of the function cannot accurately determine the matching results between the data table and the entity, and the parameters of the function are adjusted, and new labeled data (the label is the real matching result of the new data table and the entity) (that is, the similarity vector of the new data table and the entity) is input into the function to continue training; and so on, by continuously training and adjusting the parameters of the function, the accuracy of the output results can be continuously improved.

[0095] In another example, a neural network classifier can be pre-established. The input of the neural network classifier is a numerical vector, and the output is a value or vector. For example, the neural network classifier can be regarded as a function, using distance to explain the classification problem. For example, suppose the neural network classifier

[0096] It is expressed as a function The preset threshold is 50%. The input of this function is the output of the previous step, that is, the similarity vector between the data table and the entity. The output z of this function is a value between [0, 1]. When z exceeds 50%, it is set to 1, indicating a match, otherwise it is set to 0, indicating a mismatch. Then the matching result is also compared with the real matching result to determine whether they are consistent. When they are consistent, it means that the parameters of the function can accurately determine the matching results of the data table and the entity, indicating that the neural network classifier has been trained; when they are inconsistent, it means that the parameters of the function cannot accurately determine the matching results of the data table and the entity, and the parameters of the function are adjusted, and the new labeled data (the label is the real matching result of the new data table and the entity) (that is, the similarity vector of the new data table and the entity) is input into the function to continue training; and so on, by continuously training and adjusting the parameters of the function, the accuracy of the output results can be continuously improved.

[0097] Among them, the training method of the neural network classification model can use a gradient-based optimization method. The training can be performed on the labeled output training samples, and the trained model can be used for the prediction of unlabeled data. The gradient-based optimization method includes: gradient descent method, stochastic gradient descent method, Adam optimization method, etc.

[0098] Step 303, obtaining the word vector matrix of the data table to be matched and the entity respectively, inputting the word vector matrix into the trained neural network similarity calculation model to output the similarity vector of the data table to be matched and the entity;

[0099] The step of obtaining the word vector matrix of the data table to be matched and the entity includes:

[0100] Preprocessing the attributes of the to-be-matched data table and the entity to obtain the word sequences of the to-be-matched data table and the entity;

[0101] According to the word sequences of the data table to be matched and the entity, the word embedding model is used to obtain the word vector matrix of the data table to be matched and the entity respectively;

[0102] The word vector matrices of the data table to be matched and the entity are respectively aggregated to obtain the word vector matrices of the data table to be matched and the entity.

[0103] Step 304: input the similarity vector between the data table to be matched and the entity into the trained neural network classification model to output the matching result between the data table to be matched and the entity.

[0104] In one example, the output may use an identifier to indicate whether there is a match. For example, when the similarity exceeds a threshold, the output result is 1, indicating that the data table matches the entity; otherwise, the output result is 0, indicating that the data table does not match the entity.

[0105] In another example, the output is still a numerical value, indicating the matching degree. For example, 0.5 indicates a matching degree of 50%, and 0.7 indicates a matching degree of 70%.

[0106] In one example, for example Figure 4 As shown, there are three data tables from top to bottom, namely S1, S2, and S3, and two entities, T1 (person) and T2 (institution). Table S1 has attributes (A1, A2, A3), table S2 has attributes (B1, B2, B3, B4), and table S3 has attributes (C1, C2, C3, C4, C5). Entity T1 (person) has attributes (D1, D2, D3), and entity T2 (institution) has attributes (E1, E2, E3, E4, E5). i With entity T j The matching process is as follows Figure 5 As shown, including:

[0107] First, obtain the data table S through the sequences Seq1 and 2 respectively i With entity T jThe word sequence is then obtained by using the word embedding model to obtain the respective word embedding matrices, and then the matrices are aggregated; the aggregated word vector matrix is ​​then input into the neural network similarity calculation model to obtain the similarity vector, and the similarity vector is input into the neural network classification model to finally obtain the matching result (the matching result in the figure is a match, which is only an example).

[0108] The technical solution provided by the embodiment of the present invention can automatically obtain the matching results between the data table and the entity, greatly improving the matching efficiency. In addition, the use of the pre-trained neural network similarity calculation model and the neural network classification model can greatly reduce the amount of calculation in the matching process and reduce the computing consumption.

[0109] On the basis of the above embodiment, in another embodiment of the present invention, the neural network similarity calculation model and the neural network classification model can also be integrated into one model. For example, the neural networks with different models are regarded as nested functions, and the output of the neural network similarity calculation model is used as the input of the neural network classification model. Then the nested relationship between the two functions is According to this idea, the entire neural network can be regarded as a function. The function has a series of learnable parameters. Assuming there are some labeled data, which refers to the matching results of the labeled data table and the entity, these labeled data can be input into the function to get an output z. Since the matching result of the data table and the entity, that is, the real result z', is already known in advance, then by comparing the results of z and z', it can be determined whether the parameters set by the function at this time are appropriate. If z and z' are inconsistent, adjust the parameters of the function; if z and z' are consistent, the parameters of the function can accurately determine the matching results of the labeled data. At this time, the parameters of the function are the model to be learned. Then, using this model, new unlabeled data can be input into the function to obtain the matching results of the model for the unlabeled data.

[0110] In one example, for example Figure 4 As shown, there are three data tables from top to bottom, namely S1, S2, and S3, and two entities, T1 (person) and T2 (institution). Table S1 has attributes (A1, A2, A3), table S2 has attributes (B1, B2, B3, B4), and table S3 has attributes (C1, C2, C3, C4, C5). Entity T1 (person) has attributes (D1, D2, D3), and entity T2 (institution) has attributes (E1, E2, E3, E4, E5). i With entity T j The matching process includes: first obtain the data table S i Word embedding matrix And the word vector matrix of the entity i=1, 2, 3; j=1, 2. and Input Function The output z of this function is a value between [0, 1]. Assume that when z exceeds 0.5, it means that the data table S i With entity T j The matching result is a match, otherwise it means that the data table S i With entity T j The matching result is not a match. The purpose of this example is to determine whether a table describes a person or an organization. The output of this function can also be an indicator. For example, when z exceeds 0.5, the output is 1, indicating that the data table S i With entity T j The matching result is a match, otherwise the output is 0, indicating that the data table S i With entity T j The purpose of this example is to determine whether a table describes a person or an organization.

[0111] In another example, if there are three types of entities, such as people, organizations, and books, to determine whether the information described in a data table is about people, organizations, or books, the nested function needs to be applied three times to calculate three values, which respectively represent the degree of matching between the data table and the three types of entities, such as 0.2, 0.5, and 0.7. Then the entity with the maximum value can be matched with the data table. In this way, it is possible to determine which entity (person or organization) matches each table, and realize automatic matching from data table to entity.

[0112] Figure 6 A schematic diagram of a data table and entity matching device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the device comprises:

[0113] An acquisition unit, configured to acquire the word vector matrix of the data table to be matched and the entity respectively;

[0114] A calculation unit, configured to calculate the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively;

[0115] The matching unit is configured to determine a matching result between the data table and the entity according to the similarity.

[0116] In one example, obtaining the word vector matrix of the data table to be matched and the entity respectively includes:

[0117] Preprocessing the attributes of the to-be-matched data table and the entity to obtain the word sequences of the to-be-matched data table and the entity;

[0118] According to the word sequences of the data table to be matched and the entity, the word embedding model is used to obtain the word vector matrix of the data table to be matched and the entity respectively;

[0119] The word vector matrices of the data table to be matched and the entity are respectively aggregated to obtain the word vector matrices of the data table to be matched and the entity.

[0120] In one example, the word embedding model includes at least one of the following: word2vec model, GloVe model, fastText model, other word embedding models;

[0121] The aggregation uses an average or weighted average aggregation function.

[0122] In one example, calculating the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively includes:

[0123] According to the word vector matrices of the data table and the entity respectively, a preset similarity algorithm is used to calculate the similarity between the data table and the entity.

[0124] In one example, determining a matching result between the data table and the entity according to the similarity includes:

[0125] comparing the similarity with a preset threshold;

[0126] When the similarity is greater than a preset threshold, the matching result indicates that the data table matches the entity;

[0127] When the similarity is not greater than a preset threshold, the matching result indicates that the data table does not match the entity.

[0128] In one example, calculating the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively includes:

[0129] Based on the trained neural network similarity calculation model, the word vector matrices of the data table and the entity are taken as input, and the similarity vectors of the data table and the entity are output;

[0130] The neural network similarity calculation model is obtained by pre-training the first neural network using a similarity algorithm using a first training sample, with the word vector matrix of the data table and the entity as input and the similarity vector of the data table and the entity as output; the first training sample is a data table with multiple labeled similarity vectors and the word vector matrix of the entity.

[0131] In one example, determining a matching result between the data table and the entity according to the similarity includes:

[0132] Based on the trained neural network classification model, the similarity vector is used as input to output the matching result between the data table and the entity;

[0133] The neural network classification model is obtained by pre-training the second neural network using the second training sample, taking the similarity vector between the data table and the entity as input and the matching result between the data table and the entity as output; the second training sample is the similarity vector of the data table and the entity with multiple labeled matching results.

[0134] The technical solution provided by the embodiment of the present invention can automatically obtain the matching results between the data table and the entity, greatly improving the matching efficiency.

[0135] Another embodiment of 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 the computer program, when executed by the processor, implements any of the above-mentioned methods for matching data tables and entities.

[0136] Another embodiment of the present invention further provides a computer-readable storage medium, on which an information processing program is stored. When the information processing program is executed by a processor, the data table and entity matching method described in any one of the above items is implemented.

[0137] The technical solution provided by the embodiment of the present invention is not limited to a specific application field. As long as it involves the matching problem between data tables and entities, it can be used. For example, in the field of public security, the government department has multiple database systems of departments. The system creation time and creation personnel of each department are different, resulting in the use of different descriptive words or different aspects of such information in the tables in the database system when describing a type of information. At this time, there are certain differences between the data tables of different departments. Sometimes, in order to solve the case, it is necessary to integrate the data information of multiple departments. However, due to the data differences mentioned above, it is time-consuming and labor-intensive to manually judge whether two data tables of different departments describe the same type of information. By adopting the technical solution provided by the embodiment of the present invention, data tables and entities can be automatically matched, and the information describing the same type of entity in different departments can be unified, which is convenient for information sharing and collaboration between departments.

[0138] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the above disclosed methods may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims

1. A method for matching a data table with an entity, comprising: Get the word vector matrix of the data table to be matched and the entity respectively; Calculate the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively; Determining a matching result between the data table and the entity according to the similarity; The calculating the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively includes: According to the word vector matrices of the data table and the entity, a preset similarity algorithm is used to calculate the similarity between the data table and the entity, or, Based on the trained neural network similarity calculation model, the word vector matrices of the data table and the entity are taken as input, and the similarity vectors of the data table and the entity are output; The neural network similarity calculation model is obtained by pre-training the first neural network using a similarity algorithm and a first training sample, taking the word vector matrix of each of the data table and the entity as input, and taking the similarity vector of the data table and the entity as output; the first training sample is a plurality of data tables with labeled similarity vectors and the word vector matrix of each of the entities; The step of obtaining the word vector matrix of the data table to be matched and the entity includes: Preprocessing the attributes of the to-be-matched data table and the entity to obtain the word sequences of the to-be-matched data table and the entity; According to the word sequences of the data table to be matched and the entity, the word embedding model is used to obtain the word vector matrix of the data table to be matched and the entity respectively; Aggregate the word vector matrices of the to-be-matched data table and the entity to obtain the word vector matrices of the to-be-matched data table and the entity respectively; Determining the matching result between the data table and the entity according to the similarity includes: Based on the trained neural network classification model, the similarity vector is used as input to output the matching result between the data table and the entity; The neural network classification model is obtained by pre-training the second neural network using the second training sample, taking the similarity vector between the data table and the entity as input and the matching result between the data table and the entity as output; the second training sample is the similarity vector of the data table and the entity with multiple labeled matching results.

2. The method according to claim 1, characterized in that: The word embedding model includes at least one of the following: word2vec model, GloVe model, fastText model, and other word embedding models; The aggregation uses an average or weighted average aggregation function.

3. The method according to claim 1, characterized in that Determining the matching result between the data table and the entity according to the similarity includes: comparing the similarity with a preset threshold; When the similarity is greater than a preset threshold, the matching result indicates that the data table matches the entity; When the similarity is not greater than a preset threshold, the matching result indicates that the data table does not match the entity.

4. A device for matching a data table with an entity, characterized in that: include: An acquisition unit, configured to acquire the word vector matrix of the data table to be matched and the entity respectively; A calculation unit, configured to calculate the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively; A matching unit, configured to determine a matching result between the data table and the entity according to the similarity; The calculation unit is configured to calculate the similarity between the data table and the entity according to the word vector matrices of the data table and the entity respectively, including: According to the word vector matrices of the data table and the entity, a preset similarity algorithm is used to calculate the similarity between the data table and the entity, or, Based on the trained neural network similarity calculation model, the word vector matrices of the data table and the entity are taken as input, and the similarity vectors of the data table and the entity are output; The neural network similarity calculation model is obtained by pre-training the first neural network using a similarity algorithm and a first training sample, taking the word vector matrix of each of the data table and the entity as input, and taking the similarity vector of the data table and the entity as output; the first training sample is a plurality of data tables with labeled similarity vectors and the word vector matrix of each of the entities; The step of obtaining the word vector matrix of the data table to be matched and the entity includes: Preprocessing the attributes of the to-be-matched data table and the entity to obtain the word sequences of the to-be-matched data table and the entity; According to the word sequences of the data table to be matched and the entity, the word embedding model is used to obtain the word vector matrix of the data table to be matched and the entity respectively; Aggregate the word vector matrices of the to-be-matched data table and the entity to obtain the word vector matrices of the to-be-matched data table and the entity respectively; Determining the matching result between the data table and the entity according to the similarity includes: Based on the trained neural network classification model, the similarity vector is used as input to output the matching result between the data table and the entity; The neural network classification model is obtained by pre-training the second neural network using the second training sample, taking the similarity vector between the data table and the entity as input and the matching result between the data table and the entity as output; the second training sample is the similarity vector of the data table and the entity with multiple labeled matching results.

5. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for matching a data table with an entity as claimed in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an information processing program, and when the information processing program is executed by the processor, the data table and entity matching method as described in any one of claims 1 to 3 is implemented.