Table data comparison method and device, computer device and readable storage medium

By comparing tabular data using vector encoding and semantic similarity analysis models, the inefficiency caused by reliance on manual operation in traditional methods is solved, achieving efficient and intelligent tabular data comparison.

CN120654004BActive Publication Date: 2026-01-02中共杭州市滨江区委组织部 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511150662.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2026-01-02
Estimated Expiration
2045-08-18

AI Technical Summary

Technical Problem

Traditional table data comparison relies on field name matching or value range consistency judgment, which is cumbersome and highly dependent on manual intervention, resulting in low efficiency.

Method used

By acquiring data from two target tables to be compared, determining the field pairs to be compared using a preset field mapping table, and performing vector encoding on each field to generate target semantic vectors, the semantic similarity analysis model is used to calculate the semantic similarity results, thus introducing a semantic-level similarity comparison analysis mechanism.

Benefits of technology

It improves the intelligence of table data comparison, reduces manual intervention, and improves comparison efficiency and accuracy, enabling more accurate identification of semantic similarity between different data sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654004B_ABST
    Figure CN120654004B_ABST
Patent Text Reader

Abstract

The application relates to a table data comparison method and device, computer equipment and a readable storage medium. Two target table data to be compared are acquired; according to a preset field mapping table, a plurality of field pairs to be compared are determined from the two target table data; each target comparison field in each field pair to be compared comprises two target comparison fields; each target comparison field is subjected to vector coding processing, and a target semantic vector corresponding to each target comparison field is obtained; and semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields respectively, and a semantic similarity result corresponding to the field pair to be compared is obtained. The application avoids the problem of low table data comparison efficiency caused by manual comparison in the related art, effectively reduces manual intervention, and improves the table data comparison efficiency and the intelligent degree.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of document recognition, in particular to a table data comparison method and device, computer equipment and a readable storage medium. BACKGROUND

[0002] In current various business scenarios, Excel and other table documents are widely used to record and manage structured data, such as personnel information, financial statements, historical behavior logs and associated relationship networks, and play an important role in key tasks such as personal comprehensive information verification, identity authentication and clue tracking. Due to the diversity of data sources, non-uniform formats and human input errors, the comparison between multiple table documents is increasingly frequent. However, in the traditional technology, the comparison of table data mainly depends on field name matching or value range consistency judgment, which is tedious and highly dependent on manual participation.

[0003] At present, there is no effective solution to the problem of low efficiency of table data comparison in the traditional technology. SUMMARY

[0004] Therefore, it is necessary to provide a table data comparison method, device, computer equipment and readable storage medium to solve the above technical problems.

[0005] In a first aspect, the present application provides a table data comparison method, which comprises:

[0006] obtaining 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 pair to be compared includes two target comparison fields;

[0008] For each target comparison field in each field pair to be compared, the target comparison field is subjected to vector encoding processing to obtain a target semantic vector corresponding to the target comparison field;

[0009] The target semantic vectors corresponding to the two target comparison fields are subjected to semantic similarity analysis to obtain a semantic similarity result corresponding to the field pair to be compared.

[0010] In one embodiment, the target comparison field includes a field name and a field value; the vector encoding processing of the target comparison field to obtain the target semantic vector corresponding to the target comparison field comprises:

[0011] 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;

[0012] encoding processing is performed on the field value to obtain a word embedding vector of 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 pair.

[0014] In one of the embodiments, the semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a semantic similarity result corresponding to the comparison field pair, including:

[0015] The feature fusion processing is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a fused semantic vector;

[0016] The similarity recognition is performed on the fused semantic vector based on a pre-trained similarity recognition model to obtain the semantic similarity result corresponding to the comparison field pair.

[0017] In one of the embodiments, the feature fusion processing is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a fused semantic vector, including:

[0018] The vector interaction calculation is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain an intermediate semantic vector;

[0019] The vector fusion processing is performed on the target semantic vectors corresponding to the two target comparison fields respectively and the intermediate semantic vector to obtain the fused semantic vector.

[0020] In one of the embodiments, the vector interaction calculation is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain an intermediate semantic vector, including:

[0021] The vector difference degree calculation is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a first intermediate vector;

[0022] The element-by-element multiplication is performed on the target semantic vectors corresponding to the two target comparison fields respectively 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 of the embodiments, the method further includes:

[0025] A preset similarity threshold is obtained;

[0026] If the semantic similarity result corresponding to the comparison 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 comparison field pair.

[0027] If the semantic similarity result of the field pair to be compared is greater than or equal to the preset similarity threshold, then it is determined that the two target comparison fields in the field pair to be compared are semantically consistent.

[0028] In one embodiment, obtaining the preset similarity threshold includes:

[0029] Obtain the initial similarity threshold and historical comparison data;

[0030] Using a sliding window with a preset step size, multiple historical semantic similarity results are extracted from the historical comparison data;

[0031] The distribution statistics of multiple historical semantic similarity results are calculated to obtain the corresponding statistical results.

[0032] Based on the statistical results and the preset threshold adjustment coefficient, the initial similarity threshold is updated to obtain the corresponding preset similarity threshold.

[0033] In one embodiment, the method further includes:

[0034] If there is a semantic difference between the two target comparison fields in the field pair to be compared, then the difference cause analysis is performed on the two target comparison fields to obtain the difference analysis result corresponding to the field pair to be compared.

[0035] In one embodiment, the method further includes:

[0036] Based on a pre-defined large language model, semantic difference interpretation results are generated according to the difference analysis results of the fields to be compared.

[0037] Secondly, this application also provides a tabular data comparison device, the device comprising:

[0038] The acquisition module is used to acquire data from the two target tables to be compared.

[0039] The matching module is used to determine multiple pairs of fields to be compared from two target table data according to a preset field mapping table; the pairs of fields to be compared include two target comparison fields;

[0040] The vector encoding module is used to perform vector encoding processing on each target comparison field in each pair of fields to be compared, so as to obtain the target semantic vector corresponding to the target comparison field;

[0041] The semantic similarity analysis module is configured to perform semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields respectively, to obtain a semantic similarity result corresponding to the pair of comparison fields.

[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 method described above when executing the computer program.

[0043] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the method described above when executed by a processor.

[0044] In a fifth aspect, the present application provides a computer program product, which comprises a computer program, and the computer program implements the steps of the method described above when executed by a processor.

[0045] The above table data comparison method, device, computer device and readable storage medium; two target table data to be compared are obtained; according to a preset field mapping table, a plurality of pairs of comparison fields to be compared are determined from the two target table data; wherein the pair of comparison fields to be compared comprises two target comparison fields; for each target comparison field in each pair of comparison fields to be compared, the target comparison field is subjected to vector encoding processing to obtain a target semantic vector corresponding to the target comparison field; semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a semantic similarity result corresponding to the pair of comparison fields to be compared; by introducing a semantic level similarity comparison and analysis mechanism, the true meaning represented by each target comparison field can be accurately captured, and the semantic similarity between the target comparison fields from different data sources can be more effectively identified, thereby effectively avoiding the problem of low table data comparison efficiency caused by relying on manual comparison in the related art, effectively reducing manual intervention, and improving the table data comparison efficiency and the intelligent level. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0047] Figure 1 An application environment diagram of the table data comparison method in an embodiment;

[0048] Figure 2 A flowchart of the table data comparison method in an embodiment;

[0049] Figure 3 a flowchart of a target semantic vector generation step in an embodiment;

[0050] Figure 4 a flowchart of a semantic similarity analysis step in an embodiment;

[0051] Figure 5 a flowchart of a preset similarity threshold obtaining step in an embodiment;

[0052] Figure 6 a flowchart of a table data comparison method in a specific embodiment;

[0053] Figure 7 a block diagram of a table data comparison device in an embodiment;

[0054] Figure 8 an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0055] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0056] The table data comparison method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 . The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. Two target table data to be compared are obtained; according to a preset field mapping table, a plurality of field pairs to be compared are determined from the two target table data; each target comparison field in the field pair to be compared includes two target comparison fields; for each target comparison field in each field pair to be compared, the target comparison field is subjected to vector encoding processing to obtain a target semantic vector corresponding to the target comparison field; and a semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a semantic similarity result corresponding to the field pair to be compared. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices. The server 104 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0057] In an embodiment, as shown in Figure 2 , the terminal 102 can be a terminal device such as a personal computer, a notebook computer, a smart phone, a tablet computer, an Internet of Things device, etc. The server 104 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Figure 2Fig. 1 is a flowchart of a table data comparison method according to an embodiment. In this embodiment, the method is applied to a terminal. It should be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction of the terminal and the server. In this embodiment, the method includes the following steps:

[0058] In step S201, two target table data to be compared are obtained.

[0059] The target table data refers to a kind of text data obtained by format conversion of a target table document. The target table document can be, but is not limited to, an Excel document, which is not specifically limited here.

[0060] The target table data includes a plurality of 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 manner of obtaining the two target table data to be compared can be: obtaining two target table documents to be compared; identifying the document structure of the target table document for each target table document to obtain the document content information corresponding to the target table document; and performing format conversion processing on the document content information according to a preset structure rule to obtain the corresponding target table data.

[0062] The preset structure rule needs to be adaptively determined according to the type of the target table document, which is not specifically limited here.

[0063] For example, the document structure of the target table document is read by using an Excel parsing tool to extract the table header, row and column data, cell content and other document content information, and the document content information is converted into a standard text expression according to a preset structure rule to obtain the corresponding target table data, such as "Name: Li Si, Date of Birth: May 1990, Hukou: Nanjing, Jiangsu".

[0064] In step S202, a plurality of comparison field pairs are determined from the two target table data according to a preset field mapping table.

[0065] The preset field mapping table refers to a data structure set for indicating the field correspondence relationship between the two target table data, which is set in advance before the comparison of the multiple table data. The preset field mapping table includes a plurality of comparison field pairs, each comparison field pair is composed of fields from the two target table data, and is used to guide the field combination to be compared in the subsequent semantic similarity analysis process.

[0066] It should be understood that the preset field mapping table is used to avoid unnecessary field combination analysis and improve overall efficiency.

[0067] wherein, the to-be-compared field pair comprises two target comparison fields; the target comparison field refers to a specific field with potential corresponding relationship from two different target table data respectively. For example, "address: Beijing" comes from target table data A, and "address: Nanjing" comes from target table data B, which form a to-be-compared field pair and serve as target comparison fields in the to-be-compared field pair respectively.

[0068] In step S203, the target comparison field is subjected to vector encoding processing for each target comparison field in each to-be-compared field pair, to obtain a target semantic vector corresponding to the target comparison field.

[0069] wherein, 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 information of the field name in the target comparison field, but also can fuse the context semantics of the field value in the target comparison field to more comprehensively reflect the actual meaning of the target comparison field.

[0070] In an exemplary embodiment, the method of vector encoding processing the target comparison field can be: inputting the target comparison field into a preset semantic encoding model, and mapping the target comparison field into a fixed-dimension semantic vector, i.e., a target semantic vector, through the preset semantic encoding model. Wherein, the preset semantic encoding model needs to be set according to actual encoding requirements, which is not specifically limited here.

[0071] In step S204, the target semantic vectors corresponding to the two target comparison fields are subjected to semantic similarity analysis, to obtain a semantic similarity result corresponding to the to-be-compared field pair.

[0072] wherein, the semantic similarity analysis is used to measure the matching degree of the two target comparison fields at the semantic level.

[0073] In an exemplary embodiment, the method of subjecting the target semantic vectors corresponding to the two target comparison fields to semantic similarity analysis can be: based on a pre-trained similarity recognition model, subjecting the target semantic vectors corresponding to the two target comparison fields to semantic similarity analysis, to obtain a semantic similarity result corresponding to the to-be-compared field pair.

[0074] wherein, the pre-trained similarity recognition model can be but is not limited to a light neural network model, which is not specifically limited here.

[0075] In this embodiment, by introducing a semantic level similarity comparison and analysis mechanism, the real 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, thereby effectively avoiding the low table data comparison efficiency caused by manual comparison in the related art, effectively reducing manual intervention, and improving the table data comparison efficiency and intelligent level.

[0076] In one embodiment, as shown in Figure 3 Figure 3 is a flowchart of the target semantic vector generation step in one embodiment; the target comparison field is subjected to vector encoding processing to obtain a target semantic vector corresponding to the target comparison field, including the following steps:

[0077] Step S301, 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.

[0078] The target comparison field includes a field name and a field value. The field name is used to describe the meaning of the target comparison field; the field value is the specific value corresponding to the field name; for example, the field name is "name", and the field value is "Zhang San".

[0079] The preset field type embedding vector list is a pre-constructed and stored data structure used to record the mapping relationship between each field type and its corresponding field type embedding vector.

[0080] Since the field type is usually a known and fixed category information (such as "user identification", "household registration", "address", etc.) in actual application, a representative semantic embedding vector can be pre-trained for each field type and stored in the preset field type embedding vector list. Based on this, in the subsequent processing process, the corresponding field type embedding vector can be quickly found according to the field type to which the field name belongs, without the need to calculate it every time, thereby further improving the efficiency of data comparison and semantic analysis.

[0081] 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, encoding processing is performed on the field value to obtain a word embedding vector of the field value.

[0083] The word embedding vector of the field value is used to map the field value to the semantic space to represent the distribution features of the field value in the semantic space, capture its semantic information and contextual meaning.

[0084] ​In one exemplary embodiment, the method of encoding field values ​​can be selected based on the data type of the field values ​​or actual encoding requirements, and is not specifically limited here. For example, the Transformer model can be used. By encoding field values, the specific semantic content carried by the field values ​​can be captured more accurately.

[0085] Step S303: The field type embedding vector and the word embedding vector are fused to obtain the target semantic vector corresponding to the target comparison field.

[0086] The fusion process can be the process of merging field type embedding vectors and word embedding vectors to form a unified semantic representation. For example, fusion methods may include concatenation, weighted summation, dot product, or nonlinear transformation through neural network layers, etc., without specific limitations.

[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, avoiding repeated calculations and improving the efficiency of data comparison and semantic analysis. The field value is semantically encoded to obtain the 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. This 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 features of the field and laying a data foundation for realizing semantic similarity analysis.

[0088] In one embodiment, such as Figure 4 As shown, Figure 4 This is a flowchart illustrating the semantic similarity analysis steps in one embodiment; semantic similarity analysis is performed on the target semantic vectors corresponding to the two target comparison fields to obtain the semantic similarity results for the fields to be compared, including the following steps:

[0089] Step S401: Perform feature fusion processing on the target semantic vectors corresponding to the two target comparison fields to obtain the fused semantic vector.

[0090] In an exemplary embodiment, feature fusion processing is performed on the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector, including the following steps:

[0091] Step 1: Perform vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields to obtain the intermediate semantic vector.

[0092] Among them, the intermediate semantic vector reflects the degree of semantic difference and semantic commonalities between the target comparison fields, which is used to enhance the model's ability to understand the matching relationship of the target comparison fields.

[0093] In an exemplary embodiment, step 1 performs vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields respectively to obtain an intermediate semantic vector, including the following steps:

[0094] Step 1.1. Perform vector difference calculation on the target semantic vectors corresponding to the two target comparison fields respectively 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. Perform element-by-element multiplication on the target semantic vectors corresponding to the two target comparison fields respectively 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 the intermediate semantic vector.

[0099] Step 2. Perform vector fusion processing on the target semantic vectors corresponding to the two target comparison fields and the intermediate semantic vector to obtain a fusion semantic vector.

[0100] It can be understood that the fusion semantic vector not only contains the semantic information corresponding to the target comparison fields respectively, but also fuses the interaction relationship between the target comparison fields.

[0101] It should be noted that taking the fusion semantic vector as the input of the pre-trained similarity recognition model can enhance the model's ability to capture the difference and common information between fields. For example, the two target comparison fields are "name: Zhang San" and "name: Zhang San", although the field names are different ("name" and "name"), but the semantics are consistent. Through the fusion semantic vector, the model's understanding and recognition ability for such heterogeneous expressions can be enhanced.

[0102] Step S402, based on the pre-trained similarity recognition model, performs similarity recognition on the fusion semantic vector to obtain a semantic similarity result corresponding to the pair of comparison fields.

[0103] The semantic similarity result corresponding to the pair of comparison fields is the semantic matching probability corresponding to the two target comparison fields.

[0104] 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 degree calculation is performed on the target semantic vectors corresponding to the two target comparison fields respectively, and a first intermediate vector is obtained as The element-by-element multiplication is performed on the target semantic vectors corresponding to the two target comparison fields respectively, and a second intermediate vector is obtained as The vector fusion processing is performed on the target semantic vectors a and b corresponding to the two target comparison fields, the first intermediate vector and the second intermediate vector , and a fusion semantic vector is obtained as , wherein, represents a vector splicing operation; and represents element-by-element multiplication.

[0106] Further, the fusion semantic vector is input into the pre-trained similarity recognition model, the similarity recognition is performed on the fusion semantic vector based on the pre-trained similarity recognition model, and a semantic similarity result corresponding to the field pair to be compared is obtained.

[0107] In the embodiment, the fusion processing is performed on the target semantic vectors corresponding to the two target comparison fields respectively, and the richness and expression ability of the semantic representation are effectively enhanced. The fusion process not only retains the semantic information of the field itself, but also introduces the interaction relationship between the fields, including the semantic difference degree and the common features, so that a fusion semantic vector with higher discriminability is constructed. On this basis, the pre-trained similarity recognition model is further used to predict the semantic matching probability of the fusion semantic vector, and the accuracy of the similarity judgment between the field pairs to be compared and the model generalization performance are effectively improved.

[0108] In one embodiment, the table data comparison method further includes the following steps:

[0109] Step 1, obtaining a preset similarity threshold.

[0110] The preset similarity threshold is a boundary value for judging whether the two target comparison fields are semantically consistent, and is usually a value in the interval [0, 1].

[0111] It should be noted that the preset similarity threshold is not fixed, but can be dynamically updated and adaptively adjusted based on the statistical distribution characteristics of historical semantic similarity results. By introducing a dynamic threshold adjustment mechanism, the preset similarity threshold can be automatically optimized according to the changing trends of actual business data, thereby further improving the accuracy of table data comparison.

[0112] For example, historical semantic similarity results of field pairs are extracted periodically or in real time from historical comparison data, and statistical indicators reflecting the overall level of field matching in the current business scenario are calculated based on their distribution (such as mean, standard deviation, quantiles, etc.). Subsequently, the initial similarity threshold is weighted or proportionally adjusted by combining a preset threshold adjustment coefficient to generate a new preset similarity threshold, making it more in line with the field matching needs of the current data environment.

[0113] Step 2: If the semantic similarity result of the field pair to be compared is less than the preset similarity threshold, then it is determined that there is a semantic difference between the two target comparison fields in the field pair to be compared.

[0114] Step 3: If the semantic similarity result of the field pair to be compared is greater than or equal to the preset similarity threshold, then it is determined that the two target comparison fields in the field pair to be compared are semantically consistent.

[0115] For example, after completing the semantic similarity analysis of the field pairs to be compared, the semantic similarity result of the field pairs to be compared is compared with a preset similarity threshold. If the semantic similarity result of the field pairs 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 pairs to be compared, that is, the two do not have semantic consistency. The field pairs to be compared are recorded as semantically mismatched field pairs for the convenience of subsequent operations such as analysis of the reasons for the difference. If the semantic similarity result of the field pairs 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 pairs to be compared are semantically consistent, that is, the two have semantic consistency. The field pairs to be compared are determined as semantically matched field pairs.

[0116] In this embodiment, by comparing the semantic similarity results of the pairs of fields to be compared with a preset similarity threshold, the semantic consistency between the two target comparison fields can be automatically determined, improving the accuracy and intelligence of field comparison. Simultaneously, combined with a dynamic threshold adjustment mechanism, the preset similarity threshold is made more closely aligned with the actual distribution of business data, further improving the accuracy and reliability of data comparison.

[0117] In one embodiment, such as Figure 5 As shown, Figure 5 This is a flowchart illustrating 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 reference decision value used to preliminarily determine whether the field pairs have semantic consistency before the dynamic threshold adjustment process is started.

[0120] It can be understood that the initial similarity threshold is a preset empirical value or a reference value obtained based on historical data statistics, which will be adaptively updated according to the distribution characteristics of historical semantic similarity results and the review annotation information fed back by users in subsequent processing, so as to generate a preset similarity threshold that is more consistent with the current business scenario. The review annotation information fed back by the user refers to the marking information input by the human operator in the review and confirmation process of the semantic similarity result, which is used to correct the model prediction result.

[0121] The historical comparison data refers to a set of historical records of field pair similarity analysis that have been completed.

[0122] Step S502, a sliding window with a preset step length is used to extract a plurality of historical semantic similarity results from the historical comparison data.

[0123] The preset step length needs to be set according to actual needs, which is not limited here. For example, the preset step length can be 500, 2000, or any value in the range of 500-2000. It can be understood that when the data comparison frequency is high, the preset step length can be appropriately increased to ensure the stability of statistical calculation.

[0124] The sliding window is used to extract historical semantic similarity results in the recent period from the historical comparison data, so as to calculate the statistical characteristics (such as mean, standard deviation, etc.) of the historical semantic similarity results in real time, thereby supporting adaptive updating of the dynamic threshold.

[0125] Step S503, distribution statistical calculation is performed on the plurality of 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 in the window. The standard deviation is used to measure the dispersion degree of the historical semantic similarity results.

[0127] It should be noted that the way of performing distribution statistical calculation on the plurality of historical semantic similarity results can be realized by using the statistical analysis method in the prior art, which will not be described here.

[0128] In step S504, the initial similarity threshold is updated according to the statistical result and a preset threshold adjustment coefficient to obtain a corresponding preset similarity threshold.

[0129] The preset threshold adjustment coefficient is used to control the degree of deviation of the preset similarity threshold from the statistical result corresponding to the historical semantic similarity result. The preset threshold adjustment coefficient determines the looseness or strictness of the field matching judgment boundary relative to the overall trend of the current business data, thereby affecting whether the field pair is judged as "semantically consistent".

[0130] It should be noted that the preset threshold adjustment coefficient can be set as an initial empirical value (such as 1.0) and can be dynamically adjusted according to the review annotation information fed back by the user.

[0131] Exemplarily, in order to reflect the overall trend of field matching, a preset amount of historical semantic similarity results need to be collected in real time, and a preset step size sliding window is maintained to ensure that the statistical result is timely and representative. Specifically, assuming that at time t, the Mt historical semantic similarity results are extracted from the historical comparison data using a preset step size sliding window: {st,1,st,2,…,st,Mt}; the Mt historical semantic similarity results are distributed and statistically calculated to obtain a corresponding statistical result, the statistical result includes the mean and the standard deviation, the mean is denoted as μt, and the standard deviation is denoted as σt; further, the initial similarity threshold is updated according to the mean μt, the standard deviation σt and the preset threshold adjustment coefficient kt to obtain a 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 "existing semantic difference"; 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] Further, the preset threshold adjustment coefficient can be incrementally updated through the review annotation information fed back by the user, so that it continuously approaches the real business demand, and the specific process is as follows:

[0134] kt+1=kt+η×Δt;

[0135] Where Δt represents the prediction error, i.e., the average error between the model prediction and the manual annotation; η is the learning rate, and the value range is 0.05-0.2; it should be noted that a too large η will cause threshold oscillation, and a too small η will converge too slowly, and needs to be adaptively selected according to actual demand, which is not specifically limited here.

[0136] It can be understood that the user can review and mark for each historical semantic similarity result. If the historical semantic similarity result is "semantic difference exists", but it is verified that "no difference exists", it needs to be marked as false positive. If the historical semantic similarity result is not marked, but the user finds that "difference exists", it needs to be marked as false negative, and so on, to complete the review and marking of the Mt historical semantic similarity results. Further, based on the review and marking information of the user feedback, the corresponding prediction error, i.e., the average error Δt between the model prediction and the manual marking, can be calculated. If Δt>0, it means that the system has more false positives, and the threshold determination standard should be improved (i.e., the preset threshold adjustment coefficient is increased). If Δt<0, it means that the system has more false negatives, and the threshold determination standard should be lowered (i.e., the preset threshold adjustment coefficient is decreased).

[0137] In this embodiment, by introducing the sliding window statistical mechanism and the user feedback closed-loop optimization mechanism, dynamic self-adaptive adjustment of the preset similarity threshold is realized, which can timely respond to changes in actual business data and solve the misjudgment and missed judgment problems caused by fixed threshold in traditional methods. At the same time, through the review and marking information of the user feedback, the preset threshold adjustment coefficient is incrementally updated, so that it continuously approaches the real business demand, further improves the preset similarity threshold and the actual business adaptation ability, and ensures the accuracy and reliability of the table data comparison.

[0138] In one embodiment, the table data comparison method further comprises:

[0139] If there is a semantic difference between the two target comparison fields in the pair of fields to be compared, difference reason analysis is performed on the two target comparison fields to obtain a difference analysis result corresponding to the pair of fields to be compared.

[0140] The difference reason can include, but is not limited to, field misplacement, inconsistent format (such as "200 yuan" and "0.2 thousand yuan"), time misplacement (such as "2022 address" and "2023 address"), or unit difference, etc., which is not limited here.

[0141] For example, if there is a semantic difference between the two target comparison fields in the pair of fields to be compared, further difference reason analysis is performed on the pair of fields to be compared to identify the specific type and potential cause of the semantic inconsistency, thereby generating a corresponding difference analysis result, providing data basis for subsequent manual review and data correction.

[0142] In an exemplary embodiment, difference reason analysis is performed on the two target comparison fields to determine whether there is a field matching error in the pair of fields to be compared, i.e., a field in one document is compared with a field having different meaning in another document; specifically, the basic data type features of the target comparison fields (such as whether it is a phone number, an email address, a date, a currency amount, etc.) are extracted, and the field format of the target comparison fields is matched through a regular expression. If the two target comparison fields match different categories of field formats, it is preliminarily determined that the difference analysis result of the pair of fields to be compared is field misplacement.

[0143] In another exemplary embodiment, difference reason analysis is performed on the two target comparison fields to determine whether there is a situation where the two target comparison fields exist, there are differences in numerical expression, unit, currency symbol, or date format, etc., but the actual semantics may be consistent. Specifically, the numerical part and the unit / currency symbol are extracted from the target comparison fields using a regular expression and natural language processing technology (such as NER). For example, target comparison field A = 200 yuan, its corresponding numerical part is 200, and the unit is yuan; target comparison field B = 0.2 thousand yuan, its corresponding numerical part is 0.2, and the unit is thousand yuan; further, the numerical parts extracted from each target comparison field are standardized according to the unit to obtain the standardized numerical value corresponding to each target comparison field; the absolute value of the difference between the standardized numerical values is compared with a preset threshold value, if the absolute value of the difference between the standardized numerical values is less than the preset threshold value, and the units belong to the same category (such as both are currency units), it is determined that the formats are inconsistent. If the units are different and cannot be directly converted (such as "yuan" and "dollar"), it is marked as "different currency units". The preset threshold value needs to be set according to the actual judgment requirements, which is not limited here.

[0144] In another exemplary embodiment, difference reason analysis is performed on the two target comparison fields to determine whether there is a situation where the date and time formats of the two target comparison fields are inconsistent; specifically, a date and time parsing library (such as dateutil.parser of Python) is used to parse the date expressions in the two target comparison fields. If both of the two target comparison fields can be successfully parsed into standard date objects and represent the same time point (or the same day), it is determined that the date formats are inconsistent.

[0145] In another exemplary embodiment, difference reason analysis is performed on the two target comparison fields to determine whether there is a time misplacement in the two target comparison fields; specifically, it is checked whether the table headers to which the two target comparison fields belong contain time limiting words such as year, quarter, month, etc. The time information corresponding to the two target comparison fields is extracted through a regular expression, and if they are inconsistent, it is marked as "time misplacement".

[0146] It can be understood that the difference reason analysis rules listed in the above embodiments are only exemplary and do not constitute a limitation on the technical solutions of the present application. In actual application, other types of reason analysis rules can be introduced according to specific business scenarios and field characteristics to cover a wider range of semantic difference situations.

[0147] In addition, a plurality of difference reason analysis rules can be executed in turn according to a preset priority order. For example, the system can first perform field misplacement judgment, then perform format inconsistency judgment, then identify time misplacement, and then judge whether there is unit difference. The execution order of different rules can be flexibly configured according to actual needs to improve the accuracy and efficiency of field comparison.

[0148] It should be noted that if the semantic difference between the pair of fields to be compared cannot be clearly classified or explained after processing by all difference reason analysis rules, the pair of fields to be compared will be handed over to a preset difference analysis model for deep semantic reasoning processing.

[0149] For example, the target comparison field A and the target comparison field B in the pair of fields to be compared are input into the preset difference analysis model, and a corresponding prompt is input, for example, "please analyze the core semantic difference between them, and describe it in simple language. For example, are they different aspects of the same thing, different time states, or completely different things?", to output the corresponding difference analysis result; for example, the target comparison field A is "permanent residence: Shanghai", the target comparison field B is "household registration: Shanghai", and the preset difference analysis model outputs "the same place, but different attribute types"; for example, the target comparison field A is "family members: parents are deceased", the target comparison field B is "family members: none", and the preset difference analysis model outputs "semantically equivalent or similar"; for example, the target comparison field A is "2025 residence", and the target comparison field B is "current address", and the preset difference analysis model outputs "difference in time dimension". The preset difference analysis model is used for deep semantic reasoning and difference attribution analysis of the field pair that cannot be clearly classified. The preset difference analysis model can be selected according to actual difference analysis needs, which is not limited here.

[0150] In this embodiment, if there is a semantic difference between the two target comparison fields in the pair of fields to be compared, difference reason analysis is further performed to identify the specific type and potential cause of the semantic inconsistency, thereby generating a corresponding difference analysis result, which provides a clear technical basis for subsequent operations. By introducing multi-dimensional rule judgment logic (such as field misplacement identification, format inconsistency detection, time misplacement analysis, etc.), common semantic difference types can be automatically identified and classified, effectively improving the accuracy and intelligence level of field matching judgment.

[0151] In one embodiment, the table data comparison method further comprises:

[0152] Based on the preset large language model, a corresponding semantic difference explanatory result is generated according to the corresponding difference analysis result of the to-be-compared fields.

[0153] The preset large language model refers to a language model that has natural language understanding and generation capabilities and is trained or optimized to adapt to table data comparison tasks. The preset large language model can be based on a general large language model (such as Qwen, ChatGPT, ChatGLM, etc.) for task customization fine-tuning, or through prompt engineering to build professional reasoning capabilities for semantic difference identification.

[0154] The semantic difference explanatory result is used to describe the core semantic difference between the two target comparison fields and its possible causes through natural language, so as to facilitate user understanding and review.

[0155] For example, suppose the difference between the target comparison field A and the target comparison field B is due to inconsistent household address information (target comparison field A is the old address; target comparison field B is the new address). Based on the preset large language model analysis, the generated semantic difference explanatory result indicates that this is an address update behavior; combined with the business knowledge base, the reason is "personal information changes have not been synchronized to all records in a timely manner". This difference may cause "important notifications cannot be accurately delivered" (impact level: medium), and it is recommended to "contact the party concerned to verify the latest household address and update the system record".

[0156] The business knowledge base refers to a specialized knowledge system built to support semantic difference attribution analysis and business impact assessment during field comparison. Its core goal is to organize and model business logic, data specifications, historical experience, and risk patterns through structured organization and rules, and to assist in judging difference causes, predicting potential consequences, and recommending coping strategies after field difference identification.

[0157] It can be understood that the business knowledge base needs to be set according to actual business needs, which is not limited here.

[0158] In this embodiment, by introducing the preset large language model, the corresponding semantic difference explanatory result is automatically generated according to the difference analysis result of the to-be-compared fields. The semantic difference explanatory result is presented in natural language form, which can clearly express the core semantic difference between the fields, the possible causes and its business impact, effectively improving the readability and understandability of the table data comparison result.

[0159] In one of the embodiments, the comparison result is output in the form of a chart, a text report or a comparison table, including the corresponding semantic similarity result, the difference analysis result, the semantic difference explanatory result and the potential consequence prompt of the field pair to be compared, supporting user labeling, auditing or exporting.

[0160] In one specific embodiment, referring to Figure 6 , the table data comparison method comprises the following steps:

[0161] Step S601, obtaining two target table data to be compared.

[0162] Step S602, according to the preset field mapping table, determining a plurality of field pairs to be compared from the two target table data; the field pair to be compared includes two target comparison fields.

[0163] Step S603, for each target comparison field in each field pair to be compared, performing vector encoding processing 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 respectively to obtain a fused semantic vector.

[0165] Step S605, based on a pre-trained similarity recognition model, performing similarity recognition on the fused semantic vector to obtain a semantic similarity result corresponding to the field pair to be compared.

[0166] Step S606, determining whether the semantic similarity result corresponding to the field pair to be compared is less than a preset similarity threshold.

[0167] If yes, step S607 is executed; if no, step S610 is executed.

[0168] Step S607, 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.

[0169] Step S608, if there is a semantic difference between the two target comparison fields in the field pair to be compared, performing difference cause analysis on the two target comparison fields to obtain a difference analysis result corresponding to the field pair to be compared.

[0170] Step S609, based on a preset large language model, generating a corresponding semantic difference explanatory result according to the difference analysis result corresponding to the field pair to be compared.

[0171] Step S610, 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.

[0172] The table data comparison method can accurately capture the real meaning represented by each target comparison field, and can more effectively identify the semantic similarity between target comparison fields from different data sources, effectively avoiding the low table data comparison efficiency caused by manual comparison in the related art, effectively reducing manual intervention, and improving the table data comparison efficiency and intelligent level.

[0173] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.

[0174] Based on the same inventive concept, the embodiments of the present application also provide a table data comparison device for implementing the above-mentioned table data comparison method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more table data comparison device embodiments provided below can refer to the limitations of the table data comparison method described above, which will not be repeated here.

[0175] In one exemplary embodiment, as shown in Figure 7 A table data comparison device is provided, comprising: an acquisition module 701, a matching module 702, a vector encoding module 703, and a semantic similarity analysis module 704, wherein:

[0176] The acquisition module 701 is configured 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; each field pair to be compared includes two target comparison fields;

[0178] The vector encoding module 703 is configured to perform vector encoding processing on each target comparison field in each field pair 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, to obtain a semantic similarity result corresponding to the comparison field pair.

[0180] The table data comparison device can accurately capture the real meaning represented by each target comparison field by introducing the semantic level similarity comparison and analysis mechanism, and can more effectively identify the semantic similarity between the target comparison fields from different data sources, effectively avoiding the low table data comparison efficiency caused by manual comparison in the related art, effectively reducing manual intervention, and improving the table data comparison efficiency and the intelligent level.

[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 a word embedding vector of the field value;

[0184] Fuse the field type embedding vector and the word embedding vector to obtain a target semantic vector corresponding to the target comparison field.

[0185] In one embodiment, the semantic similarity analysis module 704 is further configured to:

[0186] Fuse the target semantic vectors corresponding to the two target comparison fields to obtain a fused semantic vector;

[0187] Perform similarity recognition on the fused semantic vector based on a pre-trained similarity recognition model, to obtain a semantic similarity result corresponding to the comparison field pair.

[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 an intermediate semantic vector;

[0190] Fuse the target semantic vectors corresponding to the two target comparison fields and the intermediate semantic vector to obtain a fused semantic vector.

[0191] In one embodiment, the semantic similarity analysis module 704 is further configured to:

[0192] Perform vector difference calculation on the target semantic vectors corresponding to the two target comparison fields to obtain a first intermediate vector;

[0193] element-wise multiplication is performed on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a second intermediate vector;

[0194] The first intermediate vector and the second intermediate vector are determined as an intermediate semantic vector.

[0195] In an embodiment, the table data comparison device further comprises a judgment module; the judgment module is configured to:

[0196] obtain a preset similarity threshold;

[0197] If the semantic similarity result corresponding to the pair of comparison fields is less than the preset similarity threshold, it is determined that there is a semantic difference between the two target comparison fields in the pair of comparison fields;

[0198] If the semantic similarity result corresponding to the pair of comparison fields is greater than or equal to the preset similarity threshold, it is determined that the semantics of the two target comparison fields in the pair of comparison fields are consistent.

[0199] In an embodiment, the judgment module is configured to:

[0200] obtain an initial similarity threshold and historical comparison data;

[0201] extract a plurality of historical semantic similarity results from the historical comparison data using a sliding window with a preset step size;

[0202] perform distribution statistical calculation on the plurality of historical semantic similarity results to obtain a corresponding statistical result;

[0203] According to the statistical result and a preset threshold adjustment coefficient, the initial similarity threshold is updated to obtain a corresponding preset similarity threshold.

[0204] In an embodiment, the table data comparison device further comprises a cause analysis module; the cause analysis module is configured to:

[0205] If there is a semantic difference between the two target comparison fields in the pair of comparison fields, difference cause analysis is performed on the two target comparison fields to obtain a corresponding difference analysis result of the pair of comparison fields.

[0206] In an embodiment, the table data comparison device further comprises an explanation result generation module; the explanation result generation module is configured to:

[0207] Based on a preset large language model, a corresponding semantic difference explanation result is generated according to the difference analysis result corresponding to the pair of comparison fields.

[0208] The modules in the table data comparison device can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the modules.

[0209] In an example embodiment, a computer device, which can be a server, has an internal structure as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured 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 running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store table data comparison related data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a table data comparison method.

[0210] Those skilled in the art can understand that Figure 8 The structure shown in the above embodiments is only a block diagram of part of the structure related to the scheme of the present application, and does not limit the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0211] In an embodiment, a computer device is also provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0212] In an embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0213] In an embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0214] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0215] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related 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 above-mentioned embodiments of each method. In the embodiments provided in the present application, any reference to memory, database or other medium 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 storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive 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. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0216] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.

[0217] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method of comparing tabular data, characterized by, The method comprises: obtaining two target table data to be compared; determining a plurality of field pairs to be compared from the two target table data according to a preset field mapping table, wherein the field pairs to be compared comprise two target comparison fields; performing vector encoding processing on each target comparison field in each field pair to be compared to obtain a target semantic vector corresponding to the target comparison field; performing semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a semantic similarity result corresponding to the field pair to be compared; the target comparison field comprises a field name and a field value; the vector encoding processing on the target comparison field to obtain the target semantic vector corresponding to the target comparison field comprises: matching a field type embedding vector corresponding to the field name from a preset field type embedding vector list according to the type of the field name; performing encoding processing on the field value to obtain a word embedding vector of the field value; performing fusion processing on the field type embedding vector and the word embedding vector to obtain the target semantic vector corresponding to the target comparison field.

2. The method of claim 1, wherein, The semantic similarity analysis on the target semantic vectors corresponding to the two target comparison fields respectively to obtain the semantic similarity result corresponding to the field pair to be compared comprises: performing feature fusion processing on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a fused semantic vector; performing similarity recognition on the fused semantic vector based on a pre-trained similarity recognition model to obtain the semantic similarity result corresponding to the field pair to be compared.

3. The method of claim 2, wherein, The feature fusion processing on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a fused semantic vector comprises: performing vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields respectively to obtain an intermediate semantic vector; performing vector fusion processing on the target semantic vectors corresponding to the two target comparison fields respectively and the intermediate semantic vector to obtain the fused semantic vector.

4. The method of claim 3, wherein, The vector interaction calculation on the target semantic vectors corresponding to the two target comparison fields respectively to obtain an intermediate semantic vector comprises: performing vector difference calculation on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a first intermediate vector; performing element-by-element multiplication on the target semantic vectors corresponding to the two target comparison fields respectively to obtain a second intermediate vector; determining the first intermediate vector and the second intermediate vector as the intermediate semantic vector.

5. The method of claim 1, wherein, The method further comprises: obtaining a preset similarity threshold; if the semantic similarity result corresponding to the field pair to be compared is less than the preset similarity threshold, determining that there is a semantic difference between the two target comparison fields in the field pair to be compared; if the semantic similarity result corresponding to the field pair to be compared is greater than or equal to the preset similarity threshold, determining that the two target comparison fields in the field pair to be compared are semantically consistent.

6. The method of claim 5, wherein, The obtaining of the preset similarity threshold comprises: obtaining an initial similarity threshold and historical comparison data; extract a plurality of historical semantic similarity results from the historical contrast data by using a sliding window with a preset step size; perform distribution statistical calculation on the plurality of historical semantic similarity results to obtain corresponding statistical results; perform threshold updating on the initial similarity threshold according to the statistical results and a preset threshold adjustment coefficient to obtain a corresponding preset similarity threshold.

7. The method of claim 5, wherein, The method further comprises: if there is a semantic difference between the two target contrast fields in the pair of fields to be contrasted, performing difference reason analysis on the two target contrast fields to obtain a corresponding difference analysis result of the pair of fields to be contrasted.

8. The method of claim 5, wherein, The method further comprises: generating a corresponding semantic difference explanatory result based on a preset large language model according to the difference analysis result of the pair of fields to be contrasted. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • System exception handling method, device, equipment, medium and product

    CN119759723A

  • Data analysis method and device, electronic equipment and storage medium

    CN120407592A