SQL (Structured Query Language) file data right confirmation and duplicate checking method and device based on information gain and medium

By preprocessing and feature extraction of SQL files based on the information gain method, and calculating similarity scores, the problem of watermark information in SQL files affecting data availability is solved, the quality and accuracy of data are improved, and effective processing of duplicate data is achieved. Identify and store.

CN118569240APending Publication Date: 2024-08-30SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410473865.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In privacy computing and data verification scenarios, watermark information or desensitized data in SQL files affects the availability of data and the accuracy of duplication checking.

Method used

The method based on information gain is used to preprocess the SQL file, extract features, calculate the information gain of each piece of data, select key data, use cosine similarity to calculate the similarity score, determine duplicate data, and store the similarity score.

Benefits of technology

The quality and accuracy of data are improved. By setting attribute weights and using features such as bag-of-word models and TF-IDF vectors, duplicate data is effectively identified and stored, and the accuracy of data repetition rate evaluation is improved.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention discloses an SQL (Structured Query Language) file data right confirmation and duplicate checking method and device based on information gain and a medium, and relates to the technical field of data retrieval, the information gain of each piece of data is calculated after feature extraction through the annotation of each attribute in a sample SQL file of a data provider, and a batch of data with the maximum information gain is selected for similarity calculation, so that the similarity of the data with the maximum information gain is calculated; and judging the repetition rate of the data in the SQL file according to the similarity score. A judgment method based on information gain is provided for quality evaluation and duplicate checking of the SQL data in the data right confirmation service, and the quality and accuracy of the data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data retrieval, and in particular to an SQL file data rights confirmation and duplication checking method based on information gain. Background Art

[0002] In business scenarios such as privacy computing and data rights confirmation, it is necessary to compare and evaluate the repetition rate of data to assess the value of data for behavioral decision-making. Data providers often provide a portion of data samples, in which the purpose and meaning of each column in the SQL file are marked.

[0003] With the improvement of privacy awareness, watermark information or desensitized data contained in SQL files in the property rights confirmation are stored in SQL files in the form of columns and rows. In the property rights confirmation scenario, watermark columns and desensitized columns are often marked in advance in data samples or data set files. These situations affect the availability of data and the accuracy of duplicate checking to a certain extent. Summary of the invention

[0004] In order to overcome the deficiencies of the above technologies, the present invention provides a data rights confirmation and duplication checking method based on information gain for quality assessment and duplication checking of data SQL data in data rights confirmation business.

[0005] The technical solution adopted by the present invention to overcome the technical problems is: A method for checking the ownership and duplication of SQL file data based on information gain, comprising: Preprocess SQL files; Extract features from the preprocessed SQL file; Calculate the information gain for copyright confirmation and duplicate checking for each piece of data in the preprocessed SQL file; Select key data based on the data corresponding to the information gain of title confirmation and duplicate checking; Calculate the similarity score between two key data; When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data; Store the duplicate data and their corresponding similarity scores in a new table.

[0006] Furthermore, the SQL file originates from a financial institution database.

[0007] Furthermore, according to the tag content of each attribute in the SQL file and the business requirements, the weight information of each attribute is set to complete the preprocessing of the SQL file.

[0008] Furthermore, features extracted from the preprocessed SQL file include: bag-of-words model and TF-IDF vector.

[0009] Furthermore, based on the entropy method, the entropy A1 of each data in the entire preprocessed SQL file and the conditional entropy A2 of each data in the preprocessed SQL file are calculated, and the information gain for duplicate confirmation and checking is calculated by the formula A1 minus A2.

[0010] Furthermore, the information gain of all data for title confirmation and duplication checking is sorted in descending order, and the data corresponding to the top 5%-10% of the information gain of title confirmation and duplication checking are selected as key data.

[0011] Furthermore, the cosine similarity is used to calculate the similarity score between two key data.

[0012] Furthermore, the threshold value is 0.9-1.

[0013] On the other hand, the present invention also relates to an SQL file data authentication and duplication checking device based on information gain, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: Preprocess SQL files; Extract features from the preprocessed SQL file; Calculate the information gain for copyright confirmation and duplicate checking for each piece of data in the preprocessed SQL file; Select key data based on the data corresponding to the information gain of title confirmation and duplicate checking; Calculate the similarity score between two key data; When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data; Store the duplicate data and their corresponding similarity scores in a new table.

[0014] On the other hand, the present invention also relates to a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements: Preprocess SQL files; Extract features from the preprocessed SQL file; Calculate the information gain for copyright confirmation and duplicate checking for each piece of data in the preprocessed SQL file; Select key data based on the data corresponding to the information gain of title confirmation and duplicate checking; Calculate the similarity score between two key data; When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data; Store the duplicate data and their corresponding similarity scores in a new table.

[0015] The beneficial effects of the present invention are as follows: according to the tag content and business requirements of each attribute in the SQL file, the weight information of each attribute is set. Features are extracted from the preprocessed SQL file records, and the features include a bag-of-words model, a TF-IDF vector, and the like. For each piece of data, combined with the weight information of each attribute, its information gain for rights confirmation and duplicate checking is calculated, and the calculation is performed using an entropy-based method. According to the calculated information gain, a batch of data records with the largest information gain are selected as key data. Using the selected key data records, the similarity between SQL files is calculated, using methods such as cosine similarity. According to the similarity score, a threshold is set to determine whether the SQL files are similar, and SQL files exceeding the threshold will be considered to have duplicate content; the duplicate data and similarity scores found are output as results, stored in a new table or presented in other forms. A determination method based on information gain is provided for the quality assessment and duplicate checking of data SQL data in data rights confirmation business, thereby improving the quality and accuracy of the data. DETAILED DESCRIPTION

[0016] The present invention is further described below.

[0017] Example 1 A method for checking the ownership and duplication of SQL file data based on information gain, comprising: Preprocess the SQL file.

[0018] Extract features from the preprocessed SQL file.

[0019] Calculate the information gain of each piece of data in the preprocessed SQL file for copyright confirmation and duplicate checking.

[0020] Select key data based on the information gain of the title confirmation and duplicate checking. This batch of data will serve as the main basis for the title confirmation and duplicate checking.

[0021] Calculates the similarity score between two key data.

[0022] When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data.

[0023] The duplicate data and their corresponding similarity scores are stored in a new table to present the results.

[0024] Through the annotation of each attribute in the sample SQL file provided by the data provider, after feature extraction, the information gain of each data is calculated, and a batch of data with the largest information gain is selected for similarity calculation. The repetition rate of the data in the SQL file is determined based on the similarity score.

[0025] In this embodiment, the SQL file originates from a financial institution database.

[0026] In this embodiment, according to the tag content of each attribute (column) in the SQL file and the business requirements, the weight information of each attribute is set to complete the preprocessing of the SQL file.

[0027] In this embodiment, the features extracted from the preprocessed SQL file include: bag-of-words model and TF-IDF vector. These features represent the importance of each piece of data in the SQL file, and thus can be used for subsequent similarity calculations.

[0028] In this embodiment, the entropy A1 of each piece of data in the preprocessed SQL file and the conditional entropy A2 of each piece of data are calculated based on the entropy value method, and the information gain of the title confirmation and duplicate checking is calculated by the formula A1 minus A2. The greater the information gain, the more important the data is in the title confirmation and duplicate checking.

[0029] In this embodiment, the information gain of all data for title confirmation and duplicate checking is sorted in descending order, and the data corresponding to the top 5%-10% of the information gain of title confirmation and duplicate checking are selected as key data.

[0030] In this embodiment, the cosine similarity is used to calculate the similarity score between two key data.

[0031] In this embodiment, preferably, the threshold value is 0.9-1.

[0032] Example 2 A device for checking the authenticity and duplication of SQL file data based on information gain, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: Preprocess SQL files. Extract features from the preprocessed SQL file.

[0033] Calculate the information gain of each piece of data in the preprocessed SQL file for copyright confirmation and duplicate checking.

[0034] Select key data based on the data corresponding to the information gain of property rights confirmation and duplication checking.

[0035] Calculates the similarity score between two key data.

[0036] When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data.

[0037] Store the duplicate data and their corresponding similarity scores in a new table.

[0038] Example 3 A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements: Preprocess the SQL file.

[0039] Extract features from the preprocessed SQL file.

[0040] Calculate the information gain of each piece of data in the preprocessed SQL file for copyright confirmation and duplicate checking.

[0041] Select key data based on the data corresponding to the information gain of property rights confirmation and duplication checking.

[0042] Calculates the similarity score between two key data.

[0043] When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data.

[0044] Store the duplicate data and their corresponding similarity scores in a new table.

[0045] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0046] It should also be understood that in the embodiments of this document, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects before and after are in an "or" relationship.

[0047] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.

[0048] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0049] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.

[0050] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.

[0051] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0052] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0053] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for checking the ownership and duplication of SQL file data based on information gain, characterized in that: include: Preprocess SQL files; Extract features from the preprocessed SQL file; Calculate the information gain for copyright confirmation and duplicate checking for each piece of data in the preprocessed SQL file; Select key data based on the data corresponding to the information gain of title confirmation and duplicate checking; Calculate the similarity score between two key data; When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data; Store the duplicate data and their corresponding similarity scores in a new table.

2. The SQL file data authentication and duplication checking method based on information gain according to claim 1 is characterized by: The SQL file comes from the financial institution database.

3. The SQL file data authentication and duplication checking method based on information gain according to claim 1 is characterized by: According to the tag content of each attribute in the SQL file and business requirements, the weight information of each attribute is set to complete the preprocessing of the SQL file.

4. The SQL file data rights confirmation and duplication checking method based on information gain according to claim 1 is characterized in that: Features extracted from the preprocessed SQL file include: bag-of-words model and TF-IDF vector.

5. The method for checking the ownership and duplication of SQL file data based on information gain according to claim 2 is characterized by: Based on the entropy method, the entropy A1 of each data in the preprocessed SQL file and the conditional entropy A2 of each data are calculated, and the information gain of duplicate confirmation and duplication checking is calculated by the formula A1 minus A2.

6. The method for checking the ownership and duplication of SQL file data based on information gain according to claim 1 is characterized by: Sort the information gain of all data for title confirmation and duplication checking in descending order, and select the data corresponding to the top 5%-10% of the information gain of title confirmation and duplication checking as the key data.

7. The SQL file data authentication and duplication checking method based on information gain according to claim 1 is characterized by: The cosine similarity is used to calculate the similarity score between two key data.

8. The method for checking the ownership and duplication of SQL file data based on information gain according to claim 1 is characterized by: The threshold value is 0.9-1.

9. A device for checking the authenticity and duplication of SQL file data based on information gain, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: Preprocess SQL files; Extract features from the preprocessed SQL file; Calculate the information gain for copyright confirmation and duplicate checking for each piece of data in the preprocessed SQL file; Select key data based on the data corresponding to the information gain of title confirmation and duplicate checking; Calculate the similarity score between two key data; When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data; Store the duplicate data and their corresponding similarity scores in a new table.

10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, which, when executed by a processor, implements: Preprocess SQL files; Extract features from the preprocessed SQL file; Calculate the information gain for copyright confirmation and duplicate checking for each piece of data in the preprocessed SQL file; Select key data based on the data corresponding to the information gain of title confirmation and duplicate checking; Calculate the similarity score between two key data; When the similarity score is greater than or equal to a threshold, the two key data are determined to be similar, and the similar key data are determined to be duplicate data; Store the duplicate data and their corresponding similarity scores in a new table.