Task matching data security matching method based on neural network
By constructing a structural multivalent matrix and calculating the correlation coefficient of homologous data, combined with the use of twin networks, the problem of low quality of data matching results in the existing technology is solved, and more accurate and efficient text data matching is achieved.
Patent Information
- Application Number
- CN202410500108.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-04-24
AI Technical Summary
The existing graph embedding model lacks interaction between nodes and graphs during task matching, resulting in low quality of data matching results, especially when multi-data source text data matching when processing enterprise energy transactions.
The security matching method of task matching data based on neural network is adopted, and the structural multivalent matrix of text data is constructed, and the meaning matching degree of the entire text and the similarity of the data dependency structure are calculated. The homologous data correlation coefficient is constructed based on semantic information and syntactic structural characteristics, and the twin network is used to improve the accuracy of data matching.
It improves the accuracy and quality of text data matching, increases the number of samples for word relationship analysis, improves the effectiveness of data matching, and can more accurately evaluate the correlation between text data in the same data source.
Smart Images

Figure CN118349679B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data matching, and in particular to a method for secure matching of task matching data based on a neural network. Background Art
[0002] Data matching refers to the process of matching and integrating related data from different data sources. In the process of data matching, by comparing and matching data from different data sources, the correlation between them is found and they are combined into a more complete and useful set of data. Data matching can be applied to various fields and application scenarios to help integrate data from different sources and provide more accurate and comprehensive information to support decision-making and business processes. The process of data matching includes steps such as data cleaning, data matching and data merging.
[0003] As the demand for energy resources by enterprises increases, the frequency of energy transactions by enterprises is also gradually increasing. When conducting energy transactions, it is necessary to effectively verify the actual energy usage of enterprises. For example, the amount of electricity used, carbon dioxide emissions, etc. However, since energy usage involves data in different forms and formats, it is necessary to use task matching to obtain all the verification data of the enterprise. By automatically matching the data to be verified by the enterprise, the data to be verified and the currently verified data are merged to obtain a more complete and effective set of data for the enterprise, which can greatly improve the matching efficiency. At present, the commonly used graph embedding model embeds the pairs to be matched independently into a high-dimensional vector, but due to the lack of interaction between nodes and graphs, the graph embedding model can only compare the similarities between the pairs to be matched as a whole, and may lose some fine-grained features, resulting in low quality of data matching results. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a task matching data security matching method based on neural network to solve the existing problems.
[0005] The task matching data security matching method based on neural network of the present invention adopts the following technical scheme:
[0006] An embodiment of the present invention provides a task matching data security matching method based on a neural network, the method comprising the following steps:
[0007] Collect text datasets from different data sources;
[0008] For each piece of text data in a text data set of the same data source, a structural multivalent matrix of each piece of text data is constructed according to the correlation between each piece of text data and the dependency between words; the whole text meaning matching between any two pieces of text data is obtained according to the semantic information difference between any two pieces of text data; the data dependency structure similarity between any two pieces of text data is obtained according to the similarity of structural features between any two pieces of text data; the homology data association coefficient between any two pieces of text data is constructed based on the whole text meaning matching and the data dependency structure similarity;
[0009] According to the difference in association rules between any two words in different data sources, the transaction association rule matching cost between any two words in different data sources is obtained; for any two text data from different data sources, the text feature spatial information matching degree between any two text data is obtained according to the difference in spatial information between any two text data; according to the difference in association rules between words in any two text data, the task multi-dimensional matching cost weight between any two text data is obtained; based on the text feature spatial information matching degree and the task multi-dimensional matching cost weight, the multi-section valuable matching cost between any two text data is obtained;
[0010] The twin network is used to obtain the matching degree between any two text data in different data sources, and the matching data of each text data in each data source are filtered according to the matching degree.
[0011] Preferably, the step of constructing a structural multivalent matrix of each piece of text data according to the correlation between each piece of text data and the dependency between words comprises:
[0012] The Jaccard coefficient between each text data and all the remaining text data in the text data set of the same data source is used as the input of the Otsu threshold algorithm to obtain the segmentation threshold;
[0013] The text data with Jaccard coefficient greater than the segmentation threshold in all the remaining text data in the text data set of the same data source are combined into a similar data set for each text data;
[0014] Dependency syntax is used to obtain the dependency relationship between any two words in each text data; all dependency relationship types and corresponding frequencies of all text data in the similar data set of each text data are counted;
[0015] For each piece of text data, the frequency of the rth dependency relationship corresponding to the pth word in the text data is used as the element of the pth row and rth column in the structural multivalent matrix of the text data.
[0016] Preferably, the step of obtaining the whole text meaning matching degree between any two text data according to the semantic information difference between any two text data includes:
[0017] Obtain the ED edit distance between any two text data; use the absolute value of the difference in the number of words in any two text data as the exponent of an exponential function with a natural constant as the base; calculate the DTW distance between the structural multivalent matrices of any two text data;
[0018] The product of the calculation result of the exponential function and the DTW distance is calculated, and the sum of the product and the ED edit distance is used as the whole text meaning matching degree between any two text data.
[0019] Preferably, the obtaining of the data dependency structure similarity between any two text data according to the similarity of the structural features between any two text data includes:
[0020] For each word in each text data, the ELMo model is used to obtain the word vector of the word; the word vector of the word is used as the first element of the single dependency structure frequency reduction sequence, and the dependency frequency in the corresponding row vector in the structural multivalent matrix of the text data where the word is located is used as the second to the last element of the single dependency structure frequency reduction sequence in descending order;
[0021] Taking any two words in any two text data as a group of word pairs, calculating the Pearson correlation coefficient between the single dependency structure frequency reduction sequences of the word pairs, and calculating the average of the Pearson correlation coefficients of all word pairs in the any two text data;
[0022] The number of words that exist simultaneously in any two text data is obtained; and the product of the number of words and the mean is used as the data dependency structure similarity between any two text data.
[0023] Preferably, the method of constructing a homologous data correlation coefficient between any two text data based on the matching degree of the entire text meaning and the similarity of the data dependency structure includes:
[0024] A first exponential function is constructed with a natural constant as the base and the degree of matching of the meaning of the entire text between any two text data as the exponent; a second exponential function is constructed with a natural constant as the base and the similarity of the data dependency structure between any two text data as the exponent; and the ratio of the calculation result of the second exponential function to the calculation result of the first exponential function is used as the homologous data correlation coefficient between any two text data.
[0025] Preferably, the step of obtaining the transaction association rule matching cost between any two words in different data sources according to the association rule difference between any two words in different data sources includes:
[0026] The Apriori algorithm is used to obtain the association rules and association rule confidence of each word in the text data set of each data source;
[0027] For any two words in different data sources, the number of association rules in the data source where the words are located is obtained, and the sum of the number of association rules of the any two words is recorded as a first sum;
[0028] For any two words in different data sources, obtain the minimum value and the mean value of the confidence of the association rules in the data sources where the words are located, and calculate the product of the minimum value and the mean value; record the sum of the products of the any two words as the second sum value;
[0029] The ratio of the first sum value to the second sum value is used as the transaction association rule matching cost between any two words in different data sources.
[0030] Preferably, the obtaining the text feature spatial information matching degree between any two text data according to the spatial information difference between any two text data includes:
[0031] Each text data in each data source is taken as each node, and the homologous data correlation coefficient between any two text data in each data source is taken as the edge weight between the corresponding nodes. The label graph of each data source is constructed according to the nodes and the edge weights between the nodes; the label graph of each data source is used to obtain the spatial information of each node using the Node2vec algorithm; the Euclidean distance between the spatial information of the corresponding nodes in the label graph where any two text data are located is calculated, which is recorded as the first Euclidean distance;
[0032] For a node pair consisting of any two nodes directly connected to the corresponding node in the label graph where the two text data are located, calculate the mean value of the homologous data association coefficient of the node pair; calculate the Euclidean distance between the spatial information of the node pair, recorded as the second Euclidean distance;
[0033] Calculate the sum of the products of the mean values of all the node pairs and the second Euclidean distance; and use the sum of the sum and the first Euclidean distance as the text feature space information matching degree between any two text data.
[0034] Preferably, the step of obtaining the task multi-dimensional matching cost weight between any two text data according to the difference in association rules between words in any two text data includes:
[0035] Obtain the sum of the reciprocals of the transaction association rule matching costs between any two words in any two text data;
[0036] Obtaining a set of matching cost levels corresponding to the transaction association rule matching costs of all two arbitrary words in any two text data; wherein the same transaction association rule matching costs are regarded as the same matching cost level;
[0037] Calculate the Jaccard coefficient between the sets of any two text data, and multiply the inverse of the sum of the Jaccard coefficient and the preset parameter adjustment factor by the sum to obtain the multidimensional matching cost weight of the task between any two text data.
[0038] Preferably, the method of obtaining the multi-section valuable matching cost between any two text data based on the text feature space information matching degree and the task multi-dimensional matching cost weight includes:
[0039] For any two pieces of text data, calculate the product of the text feature space information matching degree between the two pieces of text data and the multi-dimensional matching cost weight of the task; and take the inverse of the sum of the product and the preset parameter adjustment factor as the multi-section valuable matching cost between the two pieces of text data.
[0040] Preferably, the step of screening the matching data of each text data in each data source according to the matching degree includes:
[0041] For each piece of text data in each data source, text data corresponding to the maximum value of the matching degree between each piece of text data and all text data in all remaining data sources is used as matching data for each piece of text data.
[0042] The present invention has at least the following beneficial effects:
[0043] The present invention analyzes the similarities between text data in text data sets in multiple data sources of an enterprise during an energy transaction, screens similar data sets of each text data, facilitates word analysis for text data with similar characteristics, is beneficial to increase the number of samples for word relationship analysis, and improves the quality of relationship analysis; at the same time, based on the word dependency relationship in the text data in the similar data set, a structural multivalent matrix of each text data is constructed, and a multivalent matrix is jointly constructed from the two perspectives of similarities between text data character strings and dependencies between words, which greatly increases the accuracy of text data matching; at the same time, based on the similarities between different text data in the same source data, the present invention The semantic information feature constructs the matching degree of the entire text meaning between any two text data, mines the overall difference information of the character string, words and structural multivalent matrix of the text data, and analyzes the data matching situation from the overall perspective of the text data; then, the present invention constructs the data dependency structure similarity between any two text data according to the difference of the single dependency structure frequency reduction sequence of all word combinations in different text data, and analyzes the similarity between data structures from the perspective of structural features; combines the semantic relevance and the lexical structure similarity to construct the homologous data association coefficient, and considers the semantic information and syntactic structure characteristics of the text data at the same time, which can accurately evaluate the strength of the association between text data in the same data source;
[0044] At the same time, the present invention determines the transaction association rule matching cost when matching text data from different data sources based on association rules mined from text data from different data sources. The transaction association rule matching cost takes into account that although some words in the text data have a high confidence in the association rules, they appear too frequently, thus affecting their importance during matching. The matching cost of words with different frequencies in the text data is constrained by the number and confidence of the association rules; the rule relationship between words is deeply analyzed to influence the matching weight of the text data to which they belong, reflecting the basic word rule architecture within the text data from a deeper level, thereby increasing the reliability of text data matching analysis; a label graph is constructed by using the association coefficient of the homologous data of the text data to mine the spatial information of each node in the label graph, and by mapping the association information to a low-dimensional continuous space, it is helpful to identify the similarity between each node, thereby assisting in judging the data matching situation; secondly, based on the matching cost of a single word and the entire text during data matching, a multi-node valuable matching index between text data in different data sources is determined as a measurement method for the downstream network in the twin network, thereby improving the accuracy of the twin network in matching text data from different data sources, thereby improving the effectiveness of data matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flowchart of the task matching data security matching method based on neural network provided by the present invention;
[0047] Figure 2 It is a schematic diagram of the structural multivalent matrix;
[0048] Figure 3 It is a schematic diagram of the network structure;
[0049] Figure 4 Get a flow chart for matching data. DETAILED DESCRIPTION
[0050] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the task matching data security matching method based on a neural network proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0051] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0052] The specific scheme of the task matching data security matching method based on neural network provided by the present invention is described in detail below with reference to the accompanying drawings.
[0053] An embodiment of the present invention provides a neural network-based task matching data security matching method.
[0054] Specifically, the following task matching data security matching method based on neural network is provided, please refer to Figure 1 , the method comprises the following steps:
[0055] Step S001, collect text data from different data sources when Enterprise A conducts energy transactions, and pre-process the collected data.
[0056] This embodiment uses the task matching data of enterprise A when conducting energy transactions as the basic data for secure matching. When enterprise A conducts energy transactions, it is necessary to count the energy consumption of enterprise A, the purchase amount of each energy, and verify the actual situation of enterprise A's energy use, etc. That is, multiple tasks are involved in the energy transaction process, and the sample space of different tasks is different. For example, there will be differences between the energy use data in the enterprise database and the types of energy purchased by enterprise A and the purchase amount of each energy recorded by the energy supply center.
[0057] In this embodiment, the number of data sources required to process multiple tasks is recorded as M. The value of M is set by the implementer according to the actual situation. In this embodiment, the value is 3. Among them, the three data sources are the third-party audit agency, the enterprise database, and the energy supply center. When enterprise A conducts energy transactions, the seller's supply and enterprise A's demand will contain multiple specific branches, such as enterprise A's emissions, purchase amount, purchase time, seller's sales amount, sales volume, etc. The above data will be recorded in text form in different data sources.
[0058] For any raw text data with time data, first convert the time data in each raw text data into a timestamp. Secondly, in this embodiment, all raw text data in each data source are used as input, and the DataFrame.str function in the Python tool library is used to convert each raw text data into a data string, and the converted result is used as text data, and the Chinese characters in each text data are marked. For any data source, all text data in each data source are combined into a text data set.
[0059] At this point, the text data used for task matching during energy trading in this embodiment, that is, the text data set of each data source, is obtained for subsequent data matching between different data sources.
[0060] Step S002, constructing a homologous data association coefficient based on the semantic relevance and lexical structure similarity between text data in the same data source; determining a multi-section valuable matching index between text data in different data sources based on the label graph and matching cost of each data source.
[0061] This embodiment aims to match text data from different data sources through neural networks and complete data security matching based on the matching results. For data sets from different data sources, this embodiment considers matching using the data structure and entity attribute labels of text data in different data sources.
[0062] Specifically, when constructing a label graph, nodes are used to represent text data, and edges are used to represent the relationship between two text data. The same text data at different times will be treated as the same node.
[0063] Furthermore, a label graph is constructed for the text data set of each data source. The purpose of the label graph is to reflect the relevance of entities and attributes in different data sources. This is because the same energy use record has different corresponding contents in different data sources. For example, when Company A purchases electricity, the function center records the name of Company A, the purchase time, the purchase amount, etc., while the database of Company A records the data of the employee who purchased the electricity, the unit price, the signatory, etc. The entities corresponding to the different data in the above-mentioned electricity purchase process should all have a certain relationship with Company A.
[0064] For each piece of text data, the Jaccard coefficient of the string set between each piece of text data and any other piece of text data in the text data set of the same data source is calculated, the Jaccard coefficient of the string set between each piece of text data and all other pieces of text data is used as input, the Otsu threshold algorithm is used to obtain the segmentation threshold, and the set consisting of all text data with a Jaccard coefficient greater than the segmentation threshold is used as the similar data set of each piece of text data. Among them, the Jaccard coefficient and the Otsu threshold algorithm are both well-known technologies and will not be repeated in this embodiment.
[0065] Each text data is used as input, and the dependency relationship between any two words in each text data is obtained by using dependency syntax. Dependency syntax is a well-known technology, and the specific process is not repeated here. Secondly, the dependency relationship between any two words in each text data in the similar data set of each text data is obtained, and the types and frequencies of the dependency relationship are counted to form a structural multivalent matrix of each text data. The structural multivalent matrix of the a-th text data is as follows: Figure 2 As shown, m is the number of words in the a-th text data, H is the number of categories of all dependency relations in all text data, and q 1 To q H are the 1st to the Hth dependencies, w 1 tow H are the 1st to the mth words respectively, i 11 Refers to the first word w in the a-th text data 1 There is a first dependency q 1 frequency.
[0066] For any data source, all sentences in the text data set of each data source are used as the input of the ELMo model (Embeddings form Language Models), and the word vector of each word is obtained using the ELMo model. The ELMo model is a well-known technology, and the specific process is not repeated here. Secondly, the word vector of the x-th word in the structural multivalent matrix of each text data is used as the first element, and the dependency frequency of the x-th word is used in descending order as the sequence composed of the second to the last element as the single dependency structure frequency reduction sequence of the x-th word.
[0067] Based on the above analysis, the homologous data correlation coefficient is constructed here to characterize the correlation degree between the structural features and semantic information of two text data. Calculate the homologous data correlation coefficient between the a-th and b-th text data:
[0068] S ab =ED(C a ,C b )+exp(|N a -N b |)×dtw(Y a ,Y b )
[0069]
[0070]
[0071] In the formula, S ab is the matching degree of the entire text between the a-th and b-th text data, C a , C b are the strings of the text data of article a and article b respectively, ED(C a ,C b ) is the string C a With C b The ED edit distance between them, exp() is an exponential function with the natural constant e as the base, N a 、N b are the number of words in the a-th and b-th text data, respectively, and Y a , Y b are the structural multivalent matrices of the a-th and b-th text data respectively; dtw(Y a ,Y b ) is the matrix Y a With Y b The DTW distance between them, wherein the ED edit distance and the DTW distance are both well-known technologies, and the specific process will not be repeated;
[0072] l abis the data dependency structure similarity between the a-th and b-th text data, m 1 is the number of words that exist in both the a-th and b-th text data, x and y are the x-th and y-th words in the a-th and b-th text data respectively, d x is the single dependency structure frequency reduction sequence of the xth word in the ath text data, d y is the single dependency structure frequency reduction sequence of the yth word in the bth text data, P(d x ,d y ) is the sequence d x With d y Pearson correlation coefficient between ;
[0073] L ab It is the homologous data correlation coefficient between the a-th and b-th text data.
[0074] Among them, the greater the probability that the a-th and b-th text data in the same data source are generated by the same energy transaction of enterprise A, the stronger the correlation between the two text data, and the stronger the correlation between the strings of the a-th and b-th text data, the higher the probability that the ED(C a ,C b ) is smaller, the stronger the correlation between the a-th and b-th text data is, the higher the similarity of the text data in the similar data set between the a-th and b-th text data is, the greater the similarity between the elements in the structural multivalent matrix of the a-th and b-th text data is, and Y a With Y b The greater the similarity between them, the greater the exp(|N a -N b |) is smaller, dtw(Y a ,Y b ) is smaller; the higher the matching degree between the a-th and b-th text data, the more words exist simultaneously in the structural multivalent matrix of the a-th and b-th text data, and m 1 The larger the value of is, the more similar the semantic information and lexical relationship structure in the a-th and b-th text data are, and the more similar the dependency relationship between the words in the a-th and b-th text data are. x With d y The higher the similarity between them, the higher the P(d x ,d y ) is larger, l ab The larger the value, that is, L ab The larger the value of , the stronger the correlation between the a-th and b-th text data.
[0075] Furthermore, when any two text data in two data sources are matched, the matching results of different words contribute differently to the matching degree between the text data. For example, all the text data generated by Company A during an energy transaction have different time data recording forms. For example, the data center of Company A records October 9, 2021, and the energy supply center records October 9; the purchasing personnel recorded by the data center of Company A include employee I 1 ,I 2 ,I 3 , the record of the energy supply center is signed by person I 1 , the words corresponding to the two attributes of time and personnel will have different effects when matching text data from different data sources. The matching results of time and some personnel can directly determine the matching degree of two text data. This is because energy transactions are usually not frequent and will not occur multiple times in a day. That is, when matching text data from different data sources, the matching contribution of the associated combinations of different words in the text data is different.
[0076] Therefore, this embodiment uses the text data set of each data source as the basic database of the transaction library, and adopts the Apriori data mining algorithm to obtain the association rules of all words in the text data set of each data source and the confidence corresponding to each association rule. The Apriori data mining algorithm is a well-known technology and the specific process will not be repeated here.
[0077] For the association rules of a text data set from any data source, the correlation and degree of association between different words are different. Words in text data will form association rules with different confidences. When matching text data from different data sources, consider setting different matching costs according to the confidence weights of the association rules. The larger the confidence weight, the smaller the matching cost between words corresponding to the association rules. The reason for this setting is that the greater the confidence, the more reliable the correlation between the words in the association rules and the text data, and the more accurate the matching results. The calculation formula for the matching cost of the transaction association rules between the xth word and the pth word in different data sources is:
[0078]
[0079] Where D xp is the transaction association rule matching cost between the xth word and the pth word, n x 、n p are the number of association rules containing the xth and pth words in the corresponding data source, μ x,min , μ p,min are the minimum values of the confidence of all association rules containing the xth and pth words in the corresponding data source, respectively. They are respectively the means of the confidences of all association rules containing the xth and pth words in the corresponding data source.
[0080] Among them, the larger the confidence value of the association rule containing the xth and pth words in the association rules corresponding to different data sources, the higher the confidence value of μ x,min , μ p,min , The larger the value of The larger the value of n x 、n p The sum is used as the numerator. Considering that some words in the text data have a high confidence in the association rules but appear too frequently, affecting their importance in matching, the matching cost of words with different frequencies in the text data is constrained by the number and confidence of the association rules.
[0081] According to the above steps, the homologous data association coefficient between any two text data in each data source is obtained respectively, and the homologous data association coefficient between any two text data is used as the weight of the edge between the corresponding two nodes to obtain the label graph of each data source.
[0082] Due to the differences in data record forms and record carriers, there may be special characters and abbreviations in text data sets from different data sources. The splicing of these many characteristic words will also cause the text to lose semantics. The above situation leads to that when there are a large number of abbreviations and special character combinations between two text data, the text similarity between the full name and abbreviation of the same attribute value is not high. Therefore, text similarity is difficult to measure its true similarity, and other information needs to be introduced for auxiliary matching.
[0083] Specifically, the label graph of each data source is used as input, and the Node2vec algorithm is used to obtain the spatial information of each node in the input label graph. The Node2vec algorithm learns the representation of nodes by designing a flexible exploration method for the neighbors of the graph nodes, and finally maps the nodes in the graph to a low-dimensional continuous space, and can record and save the spatial information of the graph. The Node2vec algorithm is a well-known technology, and the specific process will not be repeated. For text data with a high degree of matching in different data sources, the spatial information of the corresponding nodes must have a large similarity.
[0084] Furthermore, the transaction association rule matching cost between any two words in any two data sources is obtained respectively, and each equal transaction association rule matching cost is used as a matching cost level. When two text data from two data sources are matched, the more matching cost levels there are, the more unstable the matching costs of different words in the two text data are, and the greater the cost of data matching.
[0085] Based on the above analysis, a multi-section price matching index is constructed here to characterize the cost of matching two text data in different data sources. The multi-section price matching index between the a-th and k-th text data in two data sources is calculated as follows:
[0086]
[0087]
[0088]
[0089] R ak is the text feature space information matching degree between the a-th and k-th text data, o a , o k are the spatial information of the corresponding nodes in the label graph where the a-th and k-th text data are located, M 1 、M 2 are the number of nodes directly connected to the corresponding nodes in the label graph where the a-th and k-th text data are located, j and h are the j-th and h-th nodes directly connected to the corresponding nodes in the label graph where the a-th and k-th text data are located, respectively. L aj is the correlation coefficient between the node in the label graph where the a-th text data is located and the homologous data corresponding to the j-th node, L kh is the correlation coefficient between the node in the label graph where the k-th text data is located and the homologous data corresponding to the h-th node, o j , o h They are the spatial information corresponding to the jth and hth nodes, dist(o a ,o k )、dist(o j ,o h ) are o a With o k , o j With o h The Euclidean distance between
[0090] u ak is the multi-dimensional matching cost weight of the task between the a-th and k-th text data, G a , G k are the sets of matching cost levels corresponding to the matching costs of transaction association rules of all words in the a-th and k-th text data, Jac(G a ,G k ) refers to the set G 1 With G 2 Jaccard coefficient between 2 、m 3 are the number of words in the a-th and k-th text data, respectively. x , kp are the xth and pth words in the ath and kth text data, respectively. x ,k p ) is the word a x With k p The transaction association rules matching cost between them;
[0091] V ak is the multi-section valued matching index between the a-th and k-th text data in two data sources. It is a preset parameter adjustment factor used to prevent the denominator from being 0. The value of is 0.001.
[0092] Among them, when performing the energy transaction data matching task between two data sources, the greater the matching degree between the text data in the two data sources, the greater the spatial information o in the low-dimensional continuous space. a , o k The more similar, the greater the matching degree between the a-th and k-th text data, the more likely it is that they are data generated by the same energy transaction, the more similar the connection structure of the nodes corresponding to the a-th and k-th text data in the label graph, the more similar the spatial information corresponding to the j-th and h-th nodes, and the more similar the distance between the nodes is. a ,o k )、dist(o j ,o h ) is smaller, R ak The smaller the value of is, the more unstable the matching cost of different words in the a-th and k-th text data is, the greater the cost of data matching is, and the lower the distribution similarity between sets is, the lower the Jac(G a ,G k ) is smaller; the greater the confidence of the association rule containing the words in the a-th and k-th text data, the more reliable the association between the a-th and k-th text data, the more accurate the matching result, the higher the confidence of the matching cost, the greater the weight when performing data matching, and D(a x ,k p ) is smaller, u ak The larger the value, that is, V ak The smaller the value of , the greater the cost of matching the a-th and k-th text data, and the less the two text data match.
[0093] At this point, the multi-node valuable matching index between any two text data in different data sources is obtained, which will be used as a measurement method in the twin network later.
[0094] Step S003, using the twin network to obtain the data matching results between different data sources in the energy transaction of Enterprise A based on the multi-node valuable matching index between text data.
[0095] According to the above steps, multi-section valuable matching indexes between any two text data in different data sources are respectively obtained, and data matching is completed based on the multi-section valuable matching indexes.
[0096] Specifically, two text data from two data sources are used as the input of the twin network, and the twin network is used to obtain the matching degree between the two inputs. The output of the upstream network in the twin network is the high-dimensional features of the two text data in the same feature space. The multi-node valuable matching index between the two text data is used as the metric distance in the downstream network of the twin network. The twin network is a coupled framework established by two sub-networks that share weights. The network structure is as follows: Figure 3 As shown, the twin network is a well-known technology and the specific process will not be repeated here.
[0097] For any text data in each data source, the text data in the remaining data sources corresponding to the maximum matching degree of each text data is used as its matching data. The matching data acquisition flow chart is as follows: Figure 4 shown.
[0098] At this point, this embodiment is completed.
[0099] In summary, the embodiment of the present invention analyzes the similarities between text data in text data sets in multiple data sources of an enterprise during an energy transaction, screens similar data sets of each text data, facilitates word analysis for text data with similar features, and is beneficial to increasing the number of samples for word relationship analysis and improving the quality of relationship analysis; at the same time, based on the word dependency relationship in the text data in the similar data set, a structural multivalent matrix for each text data is constructed, and a multivalent matrix is jointly constructed from the two perspectives of similarities between text data character strings and dependencies between words, thereby greatly increasing the accuracy of text data matching; at the same time, the embodiment of the present invention is based on different texts in the same source data. The semantic information features between the data construct the matching degree of the entire text meaning between any two text data, mine the overall difference information of the character strings, words and structural multivalent matrices of the text data, and analyze the data matching situation from the overall perspective of the text data; then, the present invention constructs the data dependency structure similarity between any two text data according to the difference of the single dependency structure frequency reduction sequence of all word combinations in different text data, and analyzes the similarity between the data structures from the perspective of structural features; combines the semantic relevance and the lexical structure similarity to construct the homologous data association coefficient, and considers the semantic information and syntactic structure features of the text data at the same time, which can accurately evaluate the strength of the association between the text data in the same data source;
[0100] At the same time, the embodiment of the present invention determines the transaction association rule matching cost when matching text data from different data sources based on the association rules mined from text data from different data sources. The transaction association rule matching cost takes into account that although some words in the text data have a high confidence in the association rules, they appear too frequently, thus affecting their importance during matching. The matching cost of words with different frequencies in the text data is constrained by the number and confidence of the association rules; the rule relationship between words is deeply analyzed to influence the matching weight of the text data to which they belong, reflecting the basic word rule architecture within the text data from a deeper level, thereby increasing the reliability of text data matching analysis; a label graph is constructed by using the association coefficient of the homologous data of the text data to mine the spatial information of each node in the label graph, and by mapping the association information to a low-dimensional continuous space, it is helpful to identify the similarity between each node, thereby assisting in determining the data matching situation; secondly, based on the matching cost of a single word and the entire text during data matching, a multi-node valuable matching index between text data in different data sources is determined as a measurement method for the downstream network in the twin network, thereby improving the accuracy of the twin network in matching text data from different data sources, thereby improving the effectiveness of data matching.
[0101] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0102] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0103] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Modifications to the technical solutions recorded in the aforementioned embodiments, or equivalent replacement of some of the technical features therein, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A task matching data security matching method based on neural network, characterized in that: The method comprises the following steps: Collect text datasets from different data sources; For each piece of text data in a text data set of the same data source, a structural multivalent matrix of each piece of text data is constructed according to the correlation between each piece of text data and the dependency between words; the whole text meaning matching between any two pieces of text data is obtained according to the semantic information difference between any two pieces of text data; the data dependency structure similarity between any two pieces of text data is obtained according to the similarity of structural features between any two pieces of text data; the homology data association coefficient between any two pieces of text data is constructed based on the whole text meaning matching and the data dependency structure similarity; According to the difference in association rules between any two words in different data sources, the transaction association rule matching cost between any two words in different data sources is obtained; for any two text data from different data sources, the text feature spatial information matching degree between any two text data is obtained according to the difference in spatial information between any two text data; according to the difference in association rules between words in any two text data, the task multi-dimensional matching cost weight between any two text data is obtained; based on the text feature spatial information matching degree and the task multi-dimensional matching cost weight, the multi-section valuable matching cost between any two text data is obtained; The twin network is used to obtain the matching degree between any two text data in different data sources, and the matching data of each text data in each data source are screened according to the matching degree; The step of constructing a structural multivalent matrix of each piece of text data according to the correlation between each piece of text data and the dependency between words includes: The similarity between each piece of text data and all the remaining text data in the text data set of the same data source is used as the input of the threshold segmentation algorithm to obtain the segmentation threshold; The text data whose similarity is greater than the segmentation threshold in all the remaining text data in the text data set of the same data source are used to form a similar data set for each text data; A dependency analysis algorithm is used to obtain the dependency relationship between any two words in each text data; all dependency relationship types and corresponding frequencies of all text data in a similar data set of each text data are counted; For each piece of text data, the frequency of the rth dependency relationship corresponding to the pth word in the text data is used as the element of the pth row and rth column in the structural multivalent matrix of the text data; The method of obtaining the whole text meaning matching degree between any two text data according to the semantic information difference between any two text data includes: Obtain the degree of difference between any two text data; use the absolute value of the difference in the number of words in any two text data as the exponent of an exponential function with a natural constant as the base; calculate the metric distance between the structural multivalent matrices of any two text data; Calculating the product of the calculation result of the exponential function and the metric distance, the whole text meaning matching degree between any two text data is positively correlated with the product and the difference degree respectively; The step of obtaining the transaction association rule matching cost between any two words in different data sources according to the association rule difference between any two words in different data sources includes: An association rule mining algorithm is used to obtain the association rule and association rule confidence of each word in the text data set of each data source; For any two words in different data sources, the number of association rules in the data source where the words are located is obtained, and the sum of the number of association rules of the any two words is recorded as a first sum; For any two words in different data sources, obtain the minimum value and the mean value of the confidence of the association rules in the data sources where the words are located, and calculate the fusion result of the minimum value and the mean value; record the sum of the fusion results of the any two words as the second sum value; The transaction association rule matching cost between any two words in different data sources is positively correlated with the first sum value and negatively correlated with the second sum value; The step of obtaining the task multi-dimensional matching cost weight between any two text data according to the difference in association rules between words in any two text data includes: Obtain the sum of the reciprocals of the transaction association rule matching costs between any two words in any two text data; Obtaining a set of matching cost levels corresponding to the transaction association rule matching costs of all two arbitrary words in any two text data; wherein the same transaction association rule matching costs are regarded as the same matching cost level; Calculating the similarity between the sets of any two text data, the multi-dimensional matching cost weight of the task between the any two text data is positively correlated with the sum of the reciprocals and negatively correlated with the similarity; The multi-section valuable matching cost between any two text data is negatively correlated with the text feature space information matching degree between any two text data and the task multi-dimensional matching cost weight.
2. The task matching data security matching method based on neural network as claimed in claim 1 is characterized in that: The step of constructing a structural multivalent matrix of each piece of text data according to the correlation between each piece of text data and the dependency between words includes: The Jaccard coefficient between each text data and all the remaining text data in the text data set of the same data source is used as the input of the Otsu threshold algorithm to obtain the segmentation threshold; The text data with Jaccard coefficient greater than the segmentation threshold in all the remaining text data in the text data set of the same data source are combined into a similar data set for each text data; Dependency syntax is used to obtain the dependency relationship between any two words in each text data; all dependency relationship types and corresponding frequencies of all text data in the similar data set of each text data are counted; For each piece of text data, the frequency of the rth dependency relationship corresponding to the pth word in the text data is used as the element of the pth row and rth column in the structural multivalent matrix of the text data.
3. The task matching data security matching method based on neural network as claimed in claim 2 is characterized in that: The method of obtaining the whole text meaning matching degree between any two text data according to the semantic information difference between any two text data includes: Obtain the ED edit distance between any two text data; use the absolute value of the difference in the number of words in any two text data as the exponent of an exponential function with a natural constant as the base; calculate the DTW distance between the structural multivalent matrices of any two text data; The product of the calculation result of the exponential function and the DTW distance is calculated, and the sum of the product and the ED edit distance is used as the whole text meaning matching degree between any two text data.
4. The task matching data security matching method based on neural network as claimed in claim 2 is characterized in that: The step of obtaining the data dependency structure similarity between any two pieces of text data according to the similarity of the structural features between any two pieces of text data includes: For each word in each text data, the ELMo model is used to obtain the word vector of the word; the word vector of the word is used as the first element of the single dependency structure frequency reduction sequence, and the dependency frequency in the corresponding row vector in the structural multivalent matrix of the text data where the word is located is used as the second to the last element of the single dependency structure frequency reduction sequence in descending order; Taking any two words in any two text data as a group of word pairs, calculating the Pearson correlation coefficient between the single dependency structure frequency reduction sequences of the word pairs, and calculating the average of the Pearson correlation coefficients of all word pairs in the any two text data; The number of words that exist simultaneously in any two text data is obtained; and the product of the number of words and the mean is used as the data dependency structure similarity between any two text data.
5. The task matching data security matching method based on neural network as claimed in claim 1 is characterized in that: The method of constructing the homologous data correlation coefficient between any two text data based on the matching degree of the entire text meaning and the similarity of the data dependency structure includes: A first exponential function is constructed with a natural constant as the base and the degree of matching of the meaning of the entire text between any two text data as the exponent; a second exponential function is constructed with a natural constant as the base and the similarity of the data dependency structure between any two text data as the exponent; and the ratio of the calculation result of the second exponential function to the calculation result of the first exponential function is used as the homologous data correlation coefficient between any two text data.
6. The task matching data security matching method based on neural network as claimed in claim 1 is characterized in that: The step of obtaining the transaction association rule matching cost between any two words in different data sources according to the association rule difference between any two words in different data sources includes: The Apriori algorithm is used to obtain the association rules and association rule confidence of each word in the text data set of each data source; For any two words in different data sources, the number of association rules in the data source where the words are located is obtained, and the sum of the number of association rules of the any two words is recorded as a first sum; For any two words in different data sources, obtain the minimum value and the mean value of the confidence of the association rules in the data sources where the words are located, and calculate the fusion result of the minimum value and the mean value; record the sum of the fusion results of any two words as the second sum value; wherein the fusion result is the product of the minimum value and the mean value; The ratio of the first sum value to the second sum value is used as the transaction association rule matching cost between any two words in different data sources.
7. The task matching data security matching method based on neural network as claimed in claim 1 is characterized in that: The obtaining of the text feature spatial information matching degree between any two text data according to the spatial information difference between any two text data includes: Each text data in each data source is taken as each node, and the homologous data correlation coefficient between any two text data in each data source is taken as the edge weight between the corresponding nodes. The label graph of each data source is constructed according to the nodes and the edge weights between the nodes; the label graph of each data source is used to obtain the spatial information of each node using the Node2vec algorithm; the Euclidean distance between the spatial information of the corresponding nodes in the label graph where any two text data are located is calculated, which is recorded as the first Euclidean distance; For a node pair consisting of any two nodes directly connected to the corresponding node in the label graph where the two text data are located, calculate the mean value of the homologous data association coefficient of the node pair; calculate the Euclidean distance between the spatial information of the node pair, recorded as the second Euclidean distance; The sum of the product of the mean value of all the node pairs and the second Euclidean distance is calculated and recorded as the third sum; the sum of the third sum and the first Euclidean distance is used as the text feature space information matching degree between any two text data.
8. The task matching data security matching method based on neural network as claimed in claim 1 is characterized in that: The step of obtaining the task multi-dimensional matching cost weight between any two text data according to the difference in association rules between words in any two text data includes: Obtain the sum of the reciprocals of the transaction association rule matching costs between any two words in any two text data, recorded as the fourth sum; Obtaining a set of matching cost levels corresponding to the transaction association rule matching costs of all two arbitrary words in any two text data; wherein the same transaction association rule matching costs are regarded as the same matching cost level; Calculate the Jaccard coefficient between the sets of any two text data, and multiply the inverse of the sum of the Jaccard coefficient and the preset parameter adjustment factor by the fourth sum to obtain the multidimensional matching cost weight of the task between any two text data.
9. The task matching data security matching method based on neural network as claimed in claim 1 is characterized in that: The method of obtaining the multi-section valuable matching cost between any two text data based on the text feature space information matching degree and the task multi-dimensional matching cost weight includes: For any two pieces of text data, calculate the product of the text feature space information matching degree between the two pieces of text data and the multi-dimensional matching cost weight of the task, which is recorded as the first product; take the inverse of the sum of the first product and the preset parameter adjustment factor as the multi-section valuable matching cost between any two pieces of text data.
10. The task matching data security matching method based on neural network as claimed in claim 1, characterized in that: The step of screening the matching data of each text data in each data source according to the matching degree includes: For each piece of text data in each data source, text data corresponding to the maximum value of the matching degree between each piece of text data and all text data in all remaining data sources is used as matching data for each piece of text data.
Citation Information
Patent Citations
APT event homology judgment method based on behavior pattern
CN113868656A
Text matching method and device
CN115545001A