Table data comparison method and device, computer equipment and readable storage medium
By comparing tabular data through vector encoding and semantic similarity analysis models, the low efficiency problem caused by traditional tabular data comparison relying on manual labor is solved, and efficient and intelligent tabular data comparison is achieved.
Patent Information
- Application Number
- CN202511150662.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-08-18
AI Technical Summary
Traditional table data comparison relies on field name matching or value range consistency judgment. The operation is cumbersome and highly dependent on manual participation, resulting in low efficiency.
By obtaining the data of two target tables to be compared, using the preset field mapping table to determine the field pairs to be compared, and performing vector encoding processing on each field, a target semantic vector is generated, and the semantic similarity analysis model is used to calculate the semantic similarity results, introducing a semantic-level similarity comparison analysis mechanism.
It improves the intelligence level of table data comparison, reduces manual intervention, improves comparison efficiency and accuracy, and can more accurately identify the semantic similarity between different data sources.
Smart Images

Figure CN120654004A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of document recognition technology, and in particular to a table data comparison method, device, computer equipment and readable storage medium. Background Art
[0002] In various current business scenarios, spreadsheet documents such as Excel are widely used to record and manage structured data, such as personnel information, financial statements, historical behavior logs, and relationship networks. They play an important role in key tasks such as personal comprehensive information verification, identity authentication, and lead tracking. Due to diverse data sources, inconsistent formats, and human input errors, the need to compare multiple spreadsheet documents is becoming increasingly frequent. However, in traditional technologies, the comparison of spreadsheet data mainly relies on matching field names or judging the consistency of value ranges. The operation is cumbersome and highly dependent on human participation.
[0003] Currently, there is no effective solution to the problem of low efficiency in comparing tabular data in traditional technologies. Summary of the Invention
[0004] Based on this, it is necessary to provide a table data comparison method, device, computer equipment and readable storage medium to address the above technical problems.
[0005] In a first aspect, the present application provides a table data comparison method, the method comprising:
[0006] Get the two target table data to be compared;
[0007] According to a preset field mapping table, a plurality of field pairs to be compared are determined from the two target table data; the field pairs to be compared include two target comparison fields;
[0008] For each target comparison field in each pair of fields to be compared, performing vector encoding processing on the target comparison field to obtain a target semantic vector corresponding to the target comparison field;
[0009] A semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields to obtain a semantic similarity result corresponding to the pair of fields to be compared.
[0010] In one embodiment, the target comparison field includes a field name and a field value; performing vector encoding on the target comparison field to obtain a target semantic vector corresponding to the target comparison field includes:
[0011] According to the type of the field name, matching the field type embedding vector corresponding to the field name from a preset field type embedding vector list;
[0012] Encoding the field value to obtain a word embedding vector for the field value;
[0013] The field type embedding vector and the word embedding vector are fused to obtain a target semantic vector corresponding to the target comparison field.
[0014] In one embodiment, performing semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields to obtain the semantic similarity results corresponding to the pair of fields to be compared includes:
[0015] Performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector;
[0016] Based on a pre-trained similarity recognition model, similarity recognition is performed on the fused semantic vector to obtain semantic similarity results corresponding to the field pairs to be compared.
[0017] In one embodiment, performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector includes:
[0018] Performing vector interactive calculation on the target semantic vectors corresponding to the two target comparison fields to obtain an intermediate semantic vector;
[0019] Vector fusion processing is performed on the target semantic vectors and the intermediate semantic vector corresponding to each of the two target comparison fields to obtain a fused semantic vector.
[0020] In one embodiment, performing vector interactive calculation on the target semantic vectors corresponding to the two target comparison fields to obtain an intermediate semantic vector includes:
[0021] Calculating the vector difference between the target semantic vectors corresponding to the two target comparison fields to obtain a first intermediate vector;
[0022] Performing element-by-element multiplication on the target semantic vectors corresponding to the two target comparison fields to obtain a second intermediate vector;
[0023] The first intermediate vector and the second intermediate vector are determined as the intermediate semantic vector.
[0024] In one embodiment, the method further comprises:
[0025] Get the preset similarity threshold;
[0026] If the semantic similarity result corresponding to the to-be-compared field pair is less than a preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the to-be-compared field pair;
[0027] If the semantic similarity result corresponding to the to-be-compared field pair is greater than or equal to the preset similarity threshold, it is determined that the semantics of the two target comparison fields in the to-be-compared field pair are consistent.
[0028] In one embodiment, obtaining a preset similarity threshold includes:
[0029] Obtain the initial similarity threshold and historical comparison data;
[0030] Extracting multiple historical semantic similarity results from the historical comparison data using a sliding window with a preset step size;
[0031] Performing distribution statistics calculation on the plurality of historical semantic similarity results to obtain corresponding statistical results;
[0032] The initial similarity threshold is updated according to the statistical result and the preset threshold adjustment coefficient to obtain a corresponding preset similarity threshold.
[0033] In one embodiment, the method further comprises:
[0034] If there is a semantic difference between the two target comparison fields in the to-be-compared field pair, a difference cause analysis is performed on the two target comparison fields to obtain a difference analysis result corresponding to the to-be-compared field pair.
[0035] In one embodiment, the method further comprises:
[0036] Based on the preset large language model, corresponding semantic difference explanatory results are generated according to the difference analysis results corresponding to the to-be-compared fields.
[0037] In a second aspect, the present application further provides a table data comparison device, the device comprising:
[0038] The acquisition module is used to obtain the two target table data to be compared;
[0039] A matching module, configured to determine a plurality of field pairs to be compared from the two target table data according to a preset field mapping table; the field pairs to be compared include two target comparison fields;
[0040] a vector encoding module, configured to perform vector encoding processing on each target comparison field in each pair of fields to be compared, to obtain a target semantic vector corresponding to the target comparison field;
[0041] The semantic similarity analysis module is used to perform semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields, and obtain semantic similarity results corresponding to the field pair to be compared.
[0042] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-described method when executing the computer program.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described above when the computer program is executed by a processor.
[0044] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which implements the steps of the method described above when executed by a processor.
[0045] The above-mentioned table data comparison method, device, computer equipment and readable storage medium; by obtaining two target table data to be compared; according to the preset field mapping table, multiple field pairs to be compared are determined from the two target table data; wherein the field pairs to be compared include two target comparison fields; for each target comparison field in each field pair to be compared, vector encoding processing is performed on the target comparison field to obtain the target semantic vector corresponding to the target comparison field; semantic similarity analysis is performed on the target semantic vectors corresponding to each of the two target comparison fields to obtain the semantic similarity results corresponding to the field pairs to be compared; by introducing a semantic-level similarity comparison analysis mechanism, the true meaning represented by each target comparison field can be accurately captured, and the semantic similarity between target comparison fields from different data sources can be more effectively identified, effectively avoiding the problem of low efficiency of table data comparison caused by relying on manual comparison in related technologies, effectively reducing manual intervention, and improving the efficiency and intelligence of table data comparison. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A diagram showing an application environment of a table data comparison method in one embodiment;
[0048] Figure 2 Schematic diagram of a process for comparing table data in one embodiment;
[0049] Figure 3 Schematic diagram of a process for generating a target semantic vector in one embodiment;
[0050] Figure 4 1 is a flowchart of a semantic similarity analysis step in one embodiment;
[0051] Figure 5 A schematic diagram of a flow chart of a step of obtaining a preset similarity threshold in one embodiment;
[0052] Figure 6 Schematic diagram of a process of comparing table data in a specific embodiment;
[0053] Figure 7 is a structural block diagram of a table data comparison device in one embodiment;
[0054] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0056] The table data comparison method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Obtain two target table data to be compared; according to the preset field mapping table, determine multiple field pairs to be compared from the two target table data; the field pairs to be compared include two target comparison fields; for each target comparison field in each field pair to be compared, perform vector encoding processing on the target comparison field to obtain the target semantic vector corresponding to the target comparison field; perform semantic similarity analysis on the target semantic vectors corresponding to each of the two target comparison fields to obtain the semantic similarity results corresponding to the field pairs to be compared. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0057] In one embodiment, Figure 2 As shown, Figure 2This is a flow chart of a table data comparison method in one embodiment. This embodiment uses the method applied to a terminal as an example. It is understood that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0058] Step S201: obtaining two target table data to be compared.
[0059] The target table data refers to a text data obtained after the target table document is formatted. The target table document may be, but is not limited to, an Excel document, and is not specifically limited here.
[0060] The target table data includes multiple fields, and each field includes a field name and a field value; for example, if the field is "Name: Zhang San", the field name is "Name" and the field value is "Zhang San".
[0061] In an exemplary embodiment, the method for obtaining two target table data to be compared can be: obtaining two target table documents to be compared; for each target table document, identifying the document structure of the target table document to obtain the document content information corresponding to the target table document; performing format conversion processing on the document content information according to preset structural rules to obtain the corresponding target table data.
[0062] Among them, the preset structural rules need to be adaptively determined according to the target table document type and are not specifically limited here.
[0063] Exemplarily, an Excel parsing tool is used to read the document structure of the target table document, extract document content information such as table headers, row and column data, and cell content, and convert the document content information into standard text expression according to preset structural rules to obtain the corresponding target table data, for example: "Name: Li Si, Date of Birth: May 1990, Place of Residence: Nanjing, Jiangsu".
[0064] Step S202 : determining a plurality of field pairs to be compared from two target table data according to a preset field mapping table.
[0065] A preset field mapping table is a data structure that is pre-defined before performing a multi-table data comparison, indicating the corresponding field relationships between two target tables. The preset field mapping table includes multiple comparison field pairs, each consisting of fields from two target tables. These pairs guide the field combinations to be compared during the subsequent semantic similarity analysis.
[0066] It is understandable that the preset field mapping table is used to avoid unnecessary field combination analysis and improve overall efficiency.
[0067] A comparison field pair consists of two target comparison fields. Target comparison fields refer to specific fields from two different target table data sets that have a potential corresponding relationship. For example, "Address: Beijing" from target table data A and "Address: Nanjing" from target table data B constitute a comparison field pair, with each field serving as the target comparison field in the comparison field pair.
[0068] Step S203 : For each target comparison field in each to-be-compared field pair, perform vector encoding processing on the target comparison field to obtain a target semantic vector corresponding to the target comparison field.
[0069] The target semantic vector is used to represent the semantic features of the target comparison field in the semantic space. The target semantic vector not only contains the field name information of the target comparison field, but also integrates the contextual semantics of the field value in the target comparison field to more comprehensively reflect the actual meaning of the target comparison field.
[0070] In one exemplary embodiment, a method for performing vector encoding processing on a target comparison field may include inputting the target comparison field into a preset semantic encoding model, and mapping the target comparison field into a fixed-dimensional semantic vector, i.e., a target semantic vector, using the preset semantic encoding model. The preset semantic encoding model needs to be set based on actual encoding requirements and is not specifically limited herein.
[0071] Step S204 : performing semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields to obtain semantic similarity results corresponding to the field pair to be compared.
[0072] Among them, semantic similarity analysis is used to measure the matching degree of two target comparison fields at the semantic level.
[0073] In an exemplary embodiment, the method for performing semantic similarity analysis on the target semantic vectors corresponding to each of the two target comparison fields may be: based on a pre-trained similarity recognition model, performing semantic similarity analysis on the target semantic vectors corresponding to each of the two target comparison fields, and obtaining the semantic similarity results corresponding to the field pairs to be compared.
[0074] The pre-trained similarity recognition model may be, but is not limited to, a lightweight neural network model, and is not specifically limited here.
[0075] In this embodiment, by introducing a semantic-level similarity comparison analysis mechanism, the true meaning represented by each target comparison field can be accurately captured, and the semantic similarity between target comparison fields from different data sources can be more effectively identified, effectively avoiding the problem of low efficiency of table data comparison caused by relying on manual comparison in related technologies, effectively reducing manual intervention, and improving the efficiency and intelligence of table data comparison.
[0076] In one embodiment, Figure 3 As shown, Figure 3 Schematic diagram of a flow chart of target semantic vector generation steps in one embodiment; performing vector encoding processing on a target comparison field to obtain a target semantic vector corresponding to the target comparison field includes the following steps:
[0077] Step S301 : According to the type of the field name, a field type embedding vector corresponding to the field name is matched from a preset field type embedding vector list.
[0078] The target comparison field consists of a field name and a field value. The field name describes the meaning of the target comparison field, and the field value is the specific value corresponding to the field name. For example, if the field name is "Name", the field value is "Zhang San".
[0079] The preset field type embedding vector list is a pre-built and stored data structure used to record the mapping relationship between each field type and its corresponding field type embedding vector.
[0080] Because field types are typically known and fixed categories in real applications (such as "user ID," "household registration," and "address"), a representative semantic embedding vector can be pre-trained for each field type and stored in a list of preset field type embedding vectors. This allows for quick lookup of the corresponding field type embedding vector in subsequent processing, simply by identifying the field type to which the field name belongs, eliminating the need for recalculation each time. This further improves the efficiency of data comparison and semantic analysis.
[0081] Among them, the field type embedding vector corresponding to the field name is used to represent the semantic features of the type to which the field name belongs in the semantic space.
[0082] Step S302: Encode the field value to obtain a word embedding vector of the field value.
[0083] Among them, the word embedding vector of the field value is used to map the field value to the semantic space to represent the distribution characteristics of the field value in the semantic space and capture its semantic information and contextual meaning.
[0084] In an exemplary embodiment, the method for encoding field values can be selected based on the data type of the field value or the actual encoding requirements, which is not specifically limited here. For example, a Transformer model can be used. By encoding field values, the specific semantic content carried by the field value can be more accurately captured.
[0085] Step S303: The field type embedding vector and the word embedding vector are fused to obtain a target semantic vector corresponding to the target comparison field.
[0086] The fusion process can be the process of merging the field type embedding vector and the word embedding vector to form a unified semantic representation. For example, the fusion method may include concatenation, weighted summation, dot product, or nonlinear transformation through a neural network layer, etc., which are not specifically limited here.
[0087] In this embodiment, the corresponding field type embedding vector is matched from the preset field type embedding vector list according to the type of the field name, thereby avoiding repeated calculations and improving the efficiency of data comparison and semantic analysis; the field value is semantically encoded to obtain a word embedding vector, and then the field type embedding vector and the word embedding vector are fused to generate a target semantic vector with rich semantic expression capabilities. The target semantic vector not only contains the semantic prior information of the type to which the field name belongs, but also integrates the actual content semantics of the field value, thereby more accurately reflecting the overall semantic characteristics of the field, laying a data foundation for realizing semantic similarity analysis.
[0088] In one embodiment, Figure 4 As shown, Figure 4 Schematic diagram of a flow chart of a semantic similarity analysis step in one embodiment; performing semantic similarity analysis on target semantic vectors corresponding to two target comparison fields to obtain semantic similarity results corresponding to the field pair to be compared includes the following steps:
[0089] Step S401 : performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector.
[0090] In an exemplary embodiment, performing feature fusion processing on target semantic vectors corresponding to two target comparison fields to obtain a fused semantic vector includes the following steps:
[0091] Step 1: Perform vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields to obtain an intermediate semantic vector.
[0092] Among them, the intermediate semantic vector reflects the degree of semantic difference and semantic commonality information between the target comparison fields, and is used to enhance the model's ability to understand the matching relationship between the target comparison fields.
[0093] In an exemplary embodiment, step 1 performs vector interactive calculation on target semantic vectors corresponding to two target comparison fields to obtain an intermediate semantic vector, including the following steps:
[0094] Step 1.1: Calculate the vector difference between the target semantic vectors corresponding to the two target comparison fields to obtain a first intermediate vector.
[0095] The first intermediate vector is used to represent the difference information between the two target semantic vectors. It can be understood that the first intermediate vector can reflect the degree of semantic inconsistency between the two target semantic vectors.
[0096] Step 1.2: Multiply the target semantic vectors corresponding to the two target comparison fields element by element to obtain a second intermediate vector.
[0097] The second intermediate vector is used to represent the common information between the two target semantic vectors. It can be understood that the second intermediate vector can reflect the degree of semantic overlap between the two target semantic vectors.
[0098] Step 1.3: Determine the first intermediate vector and the second intermediate vector as intermediate semantic vectors.
[0099] Step 2: Perform vector fusion processing on the target semantic vectors and the intermediate semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector.
[0100] It can be understood that the fused semantic vector not only contains the semantic information corresponding to each target comparison field, but also integrates the interaction relationship between the target comparison fields.
[0101] It's important to note that using fused semantic vectors as input to a pre-trained similarity recognition model can enhance the model's ability to capture both differences and commonalities between fields. For example, consider two target comparison fields: "Name: Zhang San" and "Name: Zhang San." While the field names differ ("Name" and "Name"), their semantics are consistent. By fusing semantic vectors, the model's ability to understand and recognize such heterogeneous expressions is enhanced.
[0102] In step S402 , similarity recognition is performed on the fused semantic vector based on the pre-trained similarity recognition model to obtain semantic similarity results corresponding to the field pairs to be compared.
[0103] The semantic similarity result corresponding to the to-be-compared field pair is the semantic matching probability corresponding to the two target comparison fields.
[0104] Among them, the pre-trained similarity recognition model can be, but is not limited to, a pre-trained neural network model; the pre-trained similarity recognition model at least includes a linear transformation layer (Linear Layer), an activation function (ReLU), a regularization layer (Dropout), an output layer (Linear Layer), and a normalization function (Sigmoid).
[0105] For example, it is assumed that the target semantic vectors corresponding to the two target comparison fields are a and b respectively; the vector difference of the target semantic vectors corresponding to the two target comparison fields is calculated, and the first intermediate vector is obtained as ; Multiply the target semantic vectors corresponding to the two target comparison fields element by element to obtain the second intermediate vector ; For the target semantic vectors a and b corresponding to the two target comparison fields, the first intermediate vector and the second intermediate vector Perform vector fusion processing to obtain the fused semantic vector: ,in," " represents vector concatenation operation;" ” means element-wise multiplication.
[0106] Furthermore, the semantic vector , input into the pre-trained similarity recognition model, based on the pre-trained similarity recognition model, perform similarity recognition on the fused semantic vector, and obtain the semantic similarity results corresponding to the field pairs to be compared.
[0107] In this embodiment, the richness and expressiveness of semantic representation are effectively enhanced by fusing the target semantic vectors corresponding to the two target comparison fields. This fusion process not only preserves the semantic information of the fields themselves but also incorporates the interactions between them, including the degree of semantic differences and commonalities, thereby constructing a more discriminative fused semantic vector. Furthermore, a pre-trained similarity recognition model is used to predict the semantic matching probability of the fused semantic vector, effectively improving the accuracy of similarity judgment between the compared field pairs and the model's generalization performance.
[0108] In one embodiment, the table data comparison method further includes the following steps:
[0109] Step 1: Get the preset similarity threshold.
[0110] The preset similarity threshold is a boundary value for determining whether two target comparison fields are semantically consistent, and is usually a value in the range of [0, 1].
[0111] It's important to note that the preset similarity threshold isn't fixed; it can be dynamically updated and adaptively adjusted based on the statistical distribution of historical semantic similarity results. By introducing a dynamic threshold adjustment mechanism, we can automatically optimize the preset similarity threshold based on the changing trends of actual business data, further improving the accuracy of table data comparisons.
[0112] For example, historical semantic similarity results for field pairs are extracted periodically or in real time from historical comparison data. Based on their distribution (e.g., mean, standard deviation, quantiles, etc.), statistical indicators reflecting the overall level of field matching in the current business scenario are calculated. Subsequently, the initial similarity threshold is weighted or proportionally adjusted using a preset threshold adjustment coefficient to generate a new preset similarity threshold that better meets the field matching requirements in the current data environment.
[0113] Step 2: If the semantic similarity result corresponding to the to-be-compared field pair is less than a preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the to-be-compared field pair.
[0114] Step 3: If the semantic similarity result corresponding to the to-be-compared field pair is greater than or equal to a preset similarity threshold, it is determined that the semantics of the two target comparison fields in the to-be-compared field pair are consistent.
[0115] Exemplarily, after completing the semantic similarity analysis of the field pair to be compared, the semantic similarity result corresponding to the field pair to be compared is compared with the preset similarity threshold. If the semantic similarity result corresponding to the field pair to be compared is less than the preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the field pair to be compared, that is, the two do not have semantic consistency, and the field pair to be compared is recorded as a semantically mismatched field pair to facilitate subsequent analysis of the cause of the difference and other operations; if the semantic similarity result corresponding to the field pair to be compared is greater than or equal to the preset similarity threshold, it is determined that the two target comparison fields in the field pair to be compared are semantically consistent, that is, the two have semantic consistency, and the field pair to be compared is determined as a semantically matched field pair.
[0116] In this embodiment, by comparing the semantic similarity results of the target field pair with a preset similarity threshold, the semantic consistency relationship between the two target comparison fields can be automatically determined, improving the accuracy and intelligence of the field comparison. Furthermore, by combining a dynamic threshold adjustment mechanism, the preset similarity threshold is more closely aligned with the actual business data distribution, further improving the accuracy and reliability of data comparison.
[0117] In one embodiment, Figure 5 As shown, Figure 5 The following is a flow chart of the steps for obtaining a preset similarity threshold in one embodiment; obtaining the preset similarity threshold includes the following steps:
[0118] Step S501: Obtain an initial similarity threshold and historical comparison data.
[0119] The initial similarity threshold refers to a benchmark judgment value used before the dynamic threshold adjustment process is started, which is used to preliminarily determine whether the field pair has semantic consistency.
[0120] It is understood that the initial similarity threshold is a preset empirical value or a reference value derived from historical data statistics. In subsequent processing, it will be adaptively updated based on the distribution characteristics of historical semantic similarity results and user feedback and annotation information, thereby generating a preset similarity threshold that is more suitable for the current business scenario. User feedback and annotation information refers to the labeling information entered by human operators during the review and confirmation of semantic similarity results, which is used to correct the model's prediction results.
[0121] The historical comparison data refers to a collection of historical records of completed field pair similarity analysis.
[0122] Step S502 : extracting multiple historical semantic similarity results from the historical comparison data using a sliding window with a preset step size.
[0123] The preset step size needs to be set according to actual needs and is not specifically limited here. For example, the preset step size can be 500, 2000, or any value between 500 and 2000. It is understood that when the frequency of data comparison is high, the preset step size can be appropriately increased to ensure the stability of statistical calculations.
[0124] Among them, the sliding window is used to extract the historical semantic similarity results in the most recent period from the historical comparison data, so as to calculate the statistical features of the historical semantic similarity results (such as mean, standard deviation, etc.) in real time, thereby supporting the adaptive update of dynamic thresholds.
[0125] Step S503 , performing distribution statistics calculation on the multiple historical semantic similarity results to obtain corresponding statistical results.
[0126] The statistical results include mean and standard deviation. The mean represents the average value of all historical semantic similarity results within the window. The standard deviation is used to measure the dispersion of historical semantic similarity results.
[0127] It should be noted that the method of performing distribution statistics calculation on multiple historical semantic similarity results can be implemented by using statistical analysis methods in the prior art, which will not be described in detail here.
[0128] Step S504 : updating the initial similarity threshold according to the statistical result and the preset threshold adjustment coefficient to obtain the corresponding preset similarity threshold.
[0129] The preset threshold adjustment coefficient controls the degree to which the preset similarity threshold deviates from the statistical result corresponding to the historical semantic similarity results. The preset threshold adjustment coefficient determines the looseness or strictness of the field matching decision boundary relative to the overall trend of the current business data, thereby affecting whether a field pair is considered "semantically consistent."
[0130] It should be noted that the preset threshold adjustment coefficient can be set to an initial empirical value (such as 1.0) and can be dynamically adjusted based on the review and annotation information fed back by users.
[0131] For example, to reflect the overall trend of field matching, it is necessary to collect historical semantic similarity results for a preset amount of data in real time and maintain a sliding window with a preset step size to ensure the timeliness and representativeness of the statistical results. Specifically, assume that at time t, a sliding window with a preset step size is used to extract Mt historical semantic similarity results from the historical comparison data, namely {st,1,st,2,…,st,Mt}. Distribution statistics are calculated for these Mt historical semantic similarity results to obtain corresponding statistical results, including a mean and a standard deviation, with the mean denoted as μt and the standard deviation denoted as σt. Furthermore, based on the mean μt, the standard deviation σt, and the preset threshold adjustment coefficient kt, the initial similarity threshold is updated to obtain the corresponding preset similarity threshold Tt = μt-kt×σt.
[0132] It can be understood that when the preset threshold adjustment coefficient kt is larger, the initial similarity threshold Tt is lower, the field matching standard is stricter, and more field pairs will be judged as "semantically different"; when the preset threshold adjustment coefficient kt is smaller, the initial similarity threshold Tt is higher, the field matching standard is looser, and more field pairs will be judged as "semantically consistent".
[0133] Furthermore, the preset threshold adjustment coefficient can be incrementally updated based on the review and annotation information provided by users, so that it continuously approaches the actual business needs, as follows:
[0134] kt+1=kt+η×Δt;
[0135] Here, Δt represents the prediction error, that is, the average error between the model prediction and the manual annotation; η is the learning rate, which ranges from 0.05 to 0.2. It should be noted that if η is too large, it will lead to threshold oscillation, while if it is too small, the convergence will be too slow. It is necessary to make an adaptive selection based on actual needs, and no specific limitation is given here.
[0136] It is understandable that users can review and annotate each historical semantic similarity result. If a historical semantic similarity result indicates "semantic differences exist" but is verified as "no differences," it should be marked as a false positive. If a historical semantic similarity result is unmarked but the user discovers "differences exist," it should be marked as a false negative. This process continues, completing the review and annotation of Mt historical semantic similarity results. Based on the review and annotation information provided by users, the corresponding prediction error can be calculated: the average error Δt between the model prediction and the manual annotation. If Δt > 0, this indicates a high number of false positives, and the threshold judgment standard should be raised (i.e., the preset threshold adjustment coefficient should be increased). If Δt < 0, this indicates a high number of false negatives, and the threshold judgment standard should be lowered (i.e., the preset threshold adjustment coefficient should be decreased).
[0137] In this embodiment, by introducing a sliding window statistical mechanism and a user feedback closed-loop optimization mechanism, dynamic adaptive adjustment of the preset similarity threshold is achieved, which can respond to actual business data changes in a timely manner and solve the problems of misjudgment and missed judgment caused by fixed thresholds in traditional methods; at the same time, through the review and annotation information fed back by users, the preset threshold adjustment coefficient is incrementally updated to continuously approach the actual business needs, further improving the adaptability of the preset similarity threshold to the actual business, and ensuring the accuracy and reliability of the table data comparison.
[0138] In one embodiment, the table data comparison method further includes:
[0139] If there is a semantic difference between two target comparison fields in the to-be-compared field pair, a difference cause analysis is performed on the two target comparison fields to obtain a difference analysis result corresponding to the to-be-compared field pair.
[0140] Among them, the reasons for the differences may include but are not limited to field misalignment, inconsistent formats (such as "200 yuan" and "0.2 thousand yuan"), time misalignment (such as "2022 address" and "2023 address") or unit differences, etc., and are not specifically limited here.
[0141] For example, if there is a semantic difference between two target comparison fields in the field pair to be compared, the cause of the difference is further analyzed on the field pair to be compared to identify the specific type and potential causes of the semantic inconsistency, thereby generating corresponding difference analysis results to provide a data basis for subsequent manual review and data correction.
[0142] In one exemplary embodiment, the reason for the difference between the two target comparison fields is analyzed to determine whether there is a field mismatch in the comparison field pair, that is, a field in one document is incorrectly compared with a field with a different meaning in another document. Specifically, the basic data type characteristics of the target comparison field (such as whether it is a phone number, email address, date, or currency amount) are extracted, and the field format of the target comparison field is matched using a regular expression. If the two target comparison fields match different field formats, the difference analysis result for the comparison field pair is initially determined to be a field mismatch.
[0143] In another exemplary embodiment, the reasons for differences between two target comparison fields are analyzed to determine whether the two target comparison fields differ in numerical expression, units, currency symbols, or date formats, but may have identical semantics. Specifically, regular expressions and natural language processing techniques (such as NER) are used to extract the numerical value and unit / currency symbol from the target comparison fields. For example, if target comparison field A = 200 yuan, its corresponding numerical value is 200, and the unit is yuan; if target comparison field B = 0.2 thousand yuan, its corresponding numerical value is 0.2, and the unit is thousand yuan. Furthermore, the extracted numerical values from each target comparison field are normalized by unit to obtain a normalized numerical value corresponding to each target comparison field. The absolute value of the difference between the normalized numerical values is compared with a preset threshold. If the absolute value of the difference between the normalized numerical values is less than the preset threshold and the units are of the same category (e.g., both are monetary units), the field is determined to be "format inconsistent." If the units are different and cannot be directly converted (e.g., "yuan" and "dollars"), the field is marked as "currency unit different." The preset threshold should be set based on actual judgment needs and is not specifically defined here.
[0144] In another exemplary embodiment, the causes of differences between the two target comparison fields are analyzed to determine whether the two target comparison fields have inconsistent date and time formats. Specifically, a date and time parsing library (such as Python's dateutil.parser) is used to parse the date expressions in the two target comparison fields. If both target comparison fields can be successfully parsed into standard date objects and represent the same time point (or the same day), the determination is made that "date format is inconsistent."
[0145] In another exemplary embodiment, the causes of differences between the two target comparison fields are analyzed to determine whether there is a time misalignment between the two target comparison fields. Specifically, the table headers of the two target comparison fields are checked to see whether they contain time qualifiers such as year, quarter, and month. Regular expressions are used to extract the time information corresponding to the two target comparison fields. If the two are inconsistent, a "time misalignment" is marked.
[0146] It is understood that the difference cause analysis rules listed in the above embodiment are only exemplary and do not constitute a limitation of the technical solution of this application. In actual applications, other types of cause analysis rules can be introduced according to specific business scenarios and field characteristics to cover a wider range of semantic difference situations.
[0147] Furthermore, multiple discrepancy analysis rules can be executed sequentially according to a preset priority order. For example, the system might first identify field misalignment, then format inconsistency, then time misalignment, and finally unit discrepancies. The execution order of different rules can be flexibly configured based on actual needs to improve the accuracy and efficiency of field comparison.
[0148] It should be noted that if the semantic differences between the field pairs to be compared still cannot be clearly classified or explained after all the difference cause analysis rules are processed, the field pairs to be compared will be submitted to the preset difference analysis model for deep semantic reasoning processing.
[0149] For example, the target comparison field A and target comparison field B in a pair of fields to be compared are input into a preset difference analysis model, along with a corresponding prompt, such as "Please analyze the core semantic differences between them and describe them concisely. For example, do they describe different aspects of the same thing, different time states, or completely different things?" to output the corresponding difference analysis results. For example, if target comparison field A is "Permanent Residence: Shanghai" and target comparison field B is "Domicile Registration: Shanghai," the preset difference analysis model outputs "Same location, but different attribute types." For another example, if target comparison field A is "Family Member: Parent Deceased" and target comparison field B is "Family Member: None," the preset difference analysis model outputs "Semantic equivalence or similarity." For another example, if target comparison field A is "2025 Residence" and target comparison field B is "Current Address," the preset difference analysis model outputs "Difference in the time dimension." The preset difference analysis model is used to perform deep semantic reasoning and difference attribution analysis on field pairs where the cause of the difference cannot be clearly identified. The preset difference analysis model can be selected based on actual difference analysis needs and is not specifically limited here.
[0150] In this embodiment, if semantic differences exist between the two target fields in a comparison pair, further analysis of the cause of the difference is performed to identify the specific type and potential causes of the semantic inconsistency, thereby generating corresponding difference analysis results and providing a clear technical basis for subsequent operations. By introducing multi-dimensional rule-based judgment logic (such as field misalignment identification, format inconsistency detection, and time misalignment analysis), common types of semantic differences can be automatically identified and classified, effectively improving the accuracy and intelligence of field matching judgments.
[0151] In one embodiment, the table data comparison method further includes:
[0152] Based on the preset large language model, the corresponding semantic difference explanatory results are generated according to the corresponding difference analysis results of the fields to be compared.
[0153] A pre-built large language model refers to a language model that has natural language understanding and generation capabilities and has been trained or tuned for tabular data comparison tasks. This pre-built large language model can be customized for specific tasks based on common large language models (such as Qwen, ChatGPT, and ChatGLM), or specialized reasoning capabilities for semantic difference recognition can be built through prompt engineering.
[0154] Among them, the semantic difference explanatory results are used to describe the core semantic differences between the two target comparison fields and their possible causes in natural language to facilitate user understanding and review.
[0155] For example, let's assume the discrepancy between target comparison fields A and B is due to inconsistent household registration address information (target comparison field A is the old address; target comparison field B is the new address). Based on the semantic difference interpretation generated by the pre-set large language model analysis, this indicates an address update. Combined with the business knowledge base, the cause is "failure to synchronize all records promptly after personal information changes." This discrepancy may result in "important notifications not being accurately delivered" (impact level: medium), and the recommendation is to "contact the individual to verify the latest household registration address and update the system record."
[0156] Among them, the business knowledge base refers to a professional knowledge system built to support semantic difference attribution analysis and business impact assessment in the field comparison process; its core goal is to unify the management of business logic, data specifications, historical experience and risk models through structured organization and rule modeling, and to assist in determining the causes of differences, predicting potential consequences and recommending response strategies after field differences are identified.
[0157] It is understandable that the business knowledge base needs to be set according to actual business needs and is not specifically limited here.
[0158] In this embodiment, by introducing a preset large language model, corresponding semantic difference explanatory results are automatically generated based on the corresponding difference analysis results of the fields to be compared. The semantic difference explanatory results are presented in natural language form, which can clearly express the core semantic differences, possible causes and business impacts between the fields, effectively improving the readability and comprehensibility of the table data comparison results.
[0159] In one embodiment, the comparison results are output in the form of charts, text reports or comparison tables, including semantic similarity results, difference analysis results, semantic difference explanation results and potential consequence prompts corresponding to the field pairs to be compared, and support user marking, review or export.
[0160] In one embodiment, see Figure 6 ,The table data comparison method includes the following steps:
[0161] Step S601: obtaining two target table data to be compared.
[0162] Step S602 : determining a plurality of to-be-compared field pairs from two target table data according to a preset field mapping table; the to-be-compared field pairs include two target comparison fields.
[0163] Step S603 : For each target comparison field in each pair of fields to be compared, vector encoding processing is performed on the target comparison field to obtain a target semantic vector corresponding to the target comparison field.
[0164] Step S604 : performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector.
[0165] Step S605 : Based on the pre-trained similarity recognition model, similarity recognition is performed on the fused semantic vector to obtain semantic similarity results corresponding to the field pairs to be compared.
[0166] Step S606 : determining whether the semantic similarity result corresponding to the to-be-compared field pair is less than a preset similarity threshold.
[0167] If so, go to step S607; if not, go to step S610.
[0168] Step S607 : If the semantic similarity result corresponding to the to-be-compared field pair is less than a preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the to-be-compared field pair.
[0169] Step S608 : If there is a semantic difference between the two target comparison fields in the to-be-compared field pair, a difference reason analysis is performed on the two target comparison fields to obtain a difference analysis result corresponding to the to-be-compared field pair.
[0170] Step S609 : Based on the preset large language model and the corresponding difference analysis results of the to-be-compared fields, a corresponding semantic difference explanation result is generated.
[0171] Step S610 : If the semantic similarity result corresponding to the to-be-compared field pair is greater than or equal to a preset similarity threshold, it is determined that the semantics of the two target comparison fields in the to-be-compared field pair are consistent.
[0172] The above-mentioned table data comparison method, by introducing a semantic-level similarity comparison analysis mechanism, can accurately capture the true meaning represented by each target comparison field, and thus can more effectively identify the semantic similarity between target comparison fields from different data sources. It effectively avoids the problem of low efficiency of table data comparison caused by relying on manual comparison in related technologies, effectively reduces manual intervention, and improves the efficiency and intelligence of table data comparison.
[0173] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0174] Based on the same inventive concept, the present application also provides a table data comparison device for implementing the table data comparison method mentioned above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more table data comparison device embodiments provided below can be found in the above-mentioned limitations of the table data comparison method and will not be repeated here.
[0175] In an exemplary embodiment, Figure 7 As shown, a table data comparison device is provided, including: an acquisition module 701, a matching module 702, a vector encoding module 703 and a semantic similarity analysis module 704, wherein:
[0176] An acquisition module 701 is used to acquire two target table data to be compared;
[0177] The matching module 702 is configured to determine a plurality of field pairs to be compared from the two target table data according to a preset field mapping table; the field pairs to be compared include two target comparison fields;
[0178] A vector encoding module 703 is configured to perform vector encoding processing on each target comparison field in each pair of fields to be compared, to obtain a target semantic vector corresponding to the target comparison field;
[0179] The semantic similarity analysis module 704 is configured to perform semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields, and obtain semantic similarity results corresponding to the pair of fields to be compared.
[0180] The above-mentioned table data comparison device, by introducing a semantic-level similarity comparison analysis mechanism, can accurately capture the true meaning represented by each target comparison field, and thus can more effectively identify the semantic similarity between target comparison fields from different data sources, effectively avoiding the problem of low efficiency of table data comparison caused by relying on manual comparison in related technologies, effectively reducing manual intervention, and improving the efficiency and intelligence of table data comparison.
[0181] In one embodiment, the target comparison field includes a field name and a field value; the vector encoding module 703 is further configured to:
[0182] According to the type of the field name, match the field type embedding vector corresponding to the field name from the preset field type embedding vector list;
[0183] Encode the field value to obtain the word embedding vector of the field value;
[0184] The field type embedding vector and the word embedding vector are fused to obtain the target semantic vector corresponding to the target comparison field.
[0185] In one embodiment, the semantic similarity analysis module 704 is further configured to:
[0186] Perform feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector;
[0187] Based on the pre-trained similarity recognition model, similarity recognition is performed on the fused semantic vector to obtain the semantic similarity results corresponding to the field pairs to be compared.
[0188] In one embodiment, the semantic similarity analysis module 704 is further configured to:
[0189] Perform vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields to obtain the intermediate semantic vector;
[0190] The target semantic vectors and the intermediate semantic vectors corresponding to the two target comparison fields are fused to obtain a fused semantic vector.
[0191] In one embodiment, the semantic similarity analysis module 704 is further configured to:
[0192] Calculate the vector difference between the target semantic vectors corresponding to the two target comparison fields to obtain a first intermediate vector;
[0193] Multiply the target semantic vectors corresponding to the two target comparison fields element by element to obtain a second intermediate vector;
[0194] The first intermediate vector and the second intermediate vector are determined as intermediate semantic vectors.
[0195] In one embodiment, the table data comparison device further includes a judgment module; the judgment module is used to:
[0196] Get the preset similarity threshold;
[0197] If the semantic similarity result corresponding to the to-be-compared field pair is less than the preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the to-be-compared field pair;
[0198] If the semantic similarity result corresponding to the to-be-compared field pair is greater than or equal to a preset similarity threshold, it is determined that the semantics of the two target comparison fields in the to-be-compared field pair are consistent.
[0199] In one embodiment, the judgment module is used to:
[0200] Obtain the initial similarity threshold and historical comparison data;
[0201] Using a sliding window with a preset step size, multiple historical semantic similarity results are extracted from historical comparison data;
[0202] Perform distribution statistics calculation on multiple historical semantic similarity results to obtain corresponding statistical results;
[0203] According to the statistical results and the preset threshold adjustment coefficient, the initial similarity threshold is updated to obtain the corresponding preset similarity threshold.
[0204] In one embodiment, the table data comparison device further includes a cause analysis module; the cause analysis module is used to:
[0205] If there is a semantic difference between two target comparison fields in the to-be-compared field pair, a difference cause analysis is performed on the two target comparison fields to obtain a difference analysis result corresponding to the to-be-compared field pair.
[0206] In one embodiment, the table data comparison device further includes an interpretation result generation module; the interpretation result generation module is used to:
[0207] Based on the preset large language model, the corresponding semantic difference explanatory results are generated according to the corresponding difference analysis results of the fields to be compared.
[0208] Each module in the above-mentioned table data comparison device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0209] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data related to table data comparison. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a table data comparison method is implemented.
[0210] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0211] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0212] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0213] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0214] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0215] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0216] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0217] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A table data comparison method, characterized in that: The method comprises: Get the two target table data to be compared; According to a preset field mapping table, a plurality of field pairs to be compared are determined from the two target table data; the field pairs to be compared include two target comparison fields; For each target comparison field in each pair of fields to be compared, performing vector encoding processing on the target comparison field to obtain a target semantic vector corresponding to the target comparison field; A semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields to obtain a semantic similarity result corresponding to the pair of fields to be compared.
2. The method according to claim 1, characterized in that The target comparison field includes a field name and a field value; performing vector encoding processing on the target comparison field to obtain a target semantic vector corresponding to the target comparison field includes: According to the type of the field name, matching the field type embedding vector corresponding to the field name from a preset field type embedding vector list; Encoding the field value to obtain a word embedding vector for the field value; The field type embedding vector and the word embedding vector are fused to obtain a target semantic vector corresponding to the target comparison field.
3. The method according to claim 1, characterized in that The performing semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields to obtain the semantic similarity results corresponding to the pair of fields to be compared includes: Performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector; Based on a pre-trained similarity recognition model, similarity recognition is performed on the fused semantic vector to obtain semantic similarity results corresponding to the field pairs to be compared.
4. The method according to claim 3, characterized in that The performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector includes: Performing vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields to obtain an intermediate semantic vector; Vector fusion processing is performed on the target semantic vectors and the intermediate semantic vector corresponding to each of the two target comparison fields to obtain a fused semantic vector.
5. The method according to claim 4, characterized in that The performing vector interactive calculation on the target semantic vectors corresponding to the two target comparison fields to obtain an intermediate semantic vector includes: Calculating the vector difference between the target semantic vectors corresponding to the two target comparison fields to obtain a first intermediate vector; Performing element-by-element multiplication on the target semantic vectors corresponding to the two target comparison fields to obtain a second intermediate vector; The first intermediate vector and the second intermediate vector are determined as the intermediate semantic vector.
6. The method according to claim 1, characterized in that The method further comprises: Get the preset similarity threshold; If the semantic similarity result corresponding to the to-be-compared field pair is less than a preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the to-be-compared field pair; If the semantic similarity result corresponding to the to-be-compared field pair is greater than or equal to the preset similarity threshold, it is determined that the semantics of the two target comparison fields in the to-be-compared field pair are consistent.
7. The method according to claim 6, characterized in that The obtaining of the preset similarity threshold comprises: Obtain the initial similarity threshold and historical comparison data; Extracting multiple historical semantic similarity results from the historical comparison data using a sliding window with a preset step size; Performing distribution statistics calculation on the plurality of historical semantic similarity results to obtain corresponding statistical results; The initial similarity threshold is updated according to the statistical result and the preset threshold adjustment coefficient to obtain a corresponding preset similarity threshold.
8. The method according to claim 6, characterized in that The method further comprises: If there is a semantic difference between the two target comparison fields in the to-be-compared field pair, a difference cause analysis is performed on the two target comparison fields to obtain a difference analysis result corresponding to the to-be-compared field pair.
9. The method according to claim 6, characterized in that The method further comprises: Based on the preset large language model, corresponding semantic difference explanatory results are generated according to the difference analysis results corresponding to the to-be-compared fields.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Data table automatic join recommendation method based on field semantics
CN113673252A
Comparison method and comparison equipment
CN115185988A
Data comparison method and device, storage medium and electronic equipment
CN115809228A
System exception handling method, device, equipment, medium and product
CN119759723A
Data lake metadata management method based on semantic synthesis and text vectorization
CN120181094A
Cited By
Data type mapping method, related device and storage medium
CN121071191A
Matching method of fields in table, electronic equipment and computer readable storage medium
CN121279278A
Matching methods for fields in the table, electronic devices, and computer-readable storage media.
CN121279278B