Data fingerprint generation method and device

By calculating the cosine distance and regular value of the statistical value matrix of the data, combining k-Shingle and minimum hash algorithms, data fingerprints are generated, which solves the problem of difficult to identify and misuse after data is fine-tuned in the prior art, and improves the accuracy of data verification and the ability to protect data ownership.

CN118568687BActive Publication Date: 2024-11-05湖南亚信软件有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410996451.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-05
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify whether the data has been stolen, especially after the data is fine-tuned, the md5 string has a large difference, resulting in the inability to effectively verify the stolen data.

Method used

Statistical values ​​are used as the characteristic values ​​of the data, cosine distance and regularization are calculated through the statistical value matrix, and combined with k-Shingle and minimum hash algorithms, data fingerprints are generated to verify whether the data has been stolen.

Benefits of technology

The generated data fingerprint can more accurately identify the similarity between the stolen data and the original data, improve the success rate of identifying stolen data, and protect data ownership.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568687B_ABST
    Figure CN118568687B_ABST
Patent Text Reader

Abstract

The present invention provides a data fingerprint generation method and device, the method comprising: obtaining a digital matrix of target data; converting the digital matrix into a statistical value matrix according to a preset statistical value algorithm; calculating the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix; applying k-Shingle to calculate each cosine value in the cosine distance regularization value to obtain at least one identification number; applying a preset minimum hash algorithm to calculate each identification number to obtain the data fingerprint corresponding to the target data. The method provided by the present invention can ensure that the stolen and fine-tuned data is similar to the data fingerprint of the original data, increase the probability of successfully identifying the stolen data, and protect the ownership of the property owner of the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a data fingerprint generation method and device. Background Art

[0002] In data transactions, a big problem is that data may be stolen, that is, after the data is traded, the buyer may sell the data to others. In order to confirm whether the data is stolen, the prior art usually verifies whether the data used by the third party is stolen data based on the md5 string of the original data.

[0003] In the prior art, when the data used by a third party is consistent with the md5 string of the original data, it means that the data has been stolen. However, after stealing the data, the third party may modify the original data (for example, modify the text, or quote a section), and even a simple modification will cause a large difference in the md5, making it impossible to find the suspected stolen data. Summary of the invention

[0004] In view of this, the present invention provides a data fingerprint generation method and device. In the method provided by the present invention, since the thief will only fine-tune the data after stealing the data in order to avoid the data losing its original meaning, a statistical value is used as the characteristic value of the data, and the cosine distance and regularization are calculated according to the statistical value matrix. Even if the cosine value obtained after fine-tuning the data is calculated by k-Shingle and the minimum hash algorithm, the data fingerprint obtained will still be similar to the data fingerprint of the original data. Therefore, the data fingerprint generated by the data fingerprint generation method provided by the present invention can more accurately verify whether the data has been stolen, and further protect the ownership of the property owner of the data.

[0005] The present invention also provides a data fingerprint generating device to ensure the implementation and application of the above method in practice.

[0006] A data fingerprint generation method, comprising:

[0007] Get the digital matrix of target data;

[0008] According to a preset statistical value algorithm, the digital matrix is ​​converted into a statistical value matrix;

[0009] Calculate the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix;

[0010] Apply k-Shingle to calculate each cosine value in the cosine distance normalization value to obtain at least one identification number;

[0011] A preset minimum hash algorithm is applied to calculate each identification serial number to obtain a data fingerprint corresponding to the target data.

[0012] In the above method, optionally, the statistical value algorithm includes at least three of the mean value algorithm, range algorithm, variance algorithm, median algorithm, kurtosis algorithm, difference mean algorithm, difference range algorithm and difference variance algorithm.

[0013] In the above method, optionally, the step of calculating the cosine value corresponding to each row parameter in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix includes:

[0014] A zeroth row is set before the first row of the statistical value matrix, and each parameter in the zeroth row is a preset initial value;

[0015] Calculate the cosine value between each row except the zeroth row in the statistical value matrix and the previous row;

[0016] Each of the cosine values ​​is regularized to obtain a cosine distance regularization value.

[0017] In the above method, optionally, the applying k-Shingle to calculate each cosine value in the cosine distance warping value to obtain at least one identification number includes:

[0018] Determine the length of the string corresponding to the k-Shingle;

[0019] Splitting the cosine distance regularization values ​​into at least one set of character string sets according to the character string lengths;

[0020] Determine the maximum value of the string set;

[0021] Based on the maximum value and the character string length, each parameter in each character string set is calculated to obtain an identification number corresponding to each character string set.

[0022] In the above method, optionally, the application of a preset minimum hash algorithm to process each of the identification serial numbers to obtain a data fingerprint corresponding to the target data includes:

[0023] Get the preset maximum prime number;

[0024] Substituting the maximum prime number into a minimum hash algorithm, and applying the minimum hash algorithm to calculate each identification number, to obtain a serial number hash value corresponding to each identification number;

[0025] Each of the serial number hash values ​​is converted into a matrix form to obtain a data fingerprint corresponding to the target data.

[0026] A data fingerprint generating device, comprising:

[0027] An acquisition unit, used for acquiring a digital matrix of target data;

[0028] A conversion unit, used for converting the digital matrix into a statistical value matrix according to a preset statistical value algorithm;

[0029] A first calculation unit, used to calculate the cosine value corresponding to each row in the statistical value matrix, and obtain the cosine distance regularization value corresponding to the statistical value matrix;

[0030] A second calculation unit is used to calculate each cosine value in the cosine distance normalization value by applying k-Shingle to obtain at least one identification number;

[0031] The third calculation unit is used to apply a preset minimum hash algorithm to calculate each of the identification numbers to obtain a data fingerprint corresponding to the target data.

[0032] In the above-mentioned device, optionally, the statistical value algorithm includes at least three of the mean value algorithm, range algorithm, variance algorithm, median algorithm, kurtosis algorithm, difference mean algorithm, difference range algorithm and difference variance algorithm.

[0033] In the above device, optionally, the first computing unit includes:

[0034] A setting subunit, used for setting a zeroth row before the first row of the statistical value matrix, wherein each parameter in the zeroth row is a preset initial value;

[0035] A second calculation subunit is used to calculate the cosine value between each row except the zeroth row in the statistical value matrix and the previous row;

[0036] The regularization subunit is used to regularize each of the cosine values ​​to obtain a regularized cosine distance value.

[0037] In the above device, optionally, the second computing unit includes:

[0038] A first determining subunit, used to determine the length of the string corresponding to the k-Shingle;

[0039] A splitting subunit, used for splitting the cosine distance regularization value into at least one set of character string sets according to the length of the character string;

[0040] A second determining subunit, used to determine the maximum value of the string set;

[0041] The third calculation subunit is used to calculate each parameter in each of the character string sets based on the maximum value and the character string length, so as to obtain an identification number corresponding to each of the character string sets.

[0042] In the above device, optionally, the third computing unit includes:

[0043] An acquisition subunit is used to acquire a preset maximum prime number;

[0044] A fourth calculation subunit, used for substituting the maximum prime number into a minimum hash algorithm, and applying the minimum hash algorithm to calculate each of the identification numbers to obtain a serial number hash value corresponding to each of the identification numbers;

[0045] The conversion subunit is used to convert each of the serial number hash values ​​into a matrix form to obtain a data fingerprint corresponding to the target data.

[0046] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned data fingerprint generation method.

[0047] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above-mentioned data fingerprint generation method.

[0048] Compared with the prior art, the present invention has the following advantages:

[0049] The present invention provides a data fingerprint generation method, comprising: obtaining a digital matrix of target data; converting the digital matrix into a statistical value matrix according to a preset statistical value algorithm; calculating the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix; applying k-Shingle to calculate each cosine value in the cosine distance regularization value to obtain at least one identification number; applying a preset minimum hash algorithm to calculate each identification number to obtain the data fingerprint corresponding to the target data. The method provided by the present invention can ensure that the stolen and fine-tuned data is similar to the data fingerprint of the original data, improve the probability of successfully identifying the stolen data, and protect the ownership of the property owner of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0051] Figure 1 A method flow chart of a data fingerprint generation method provided by an embodiment of the present invention;

[0052] Figure 2 A flowchart of another method for generating a data fingerprint provided by an embodiment of the present invention;

[0053] Figure 3 A device structure diagram of a data fingerprint generating device provided by an embodiment of the present invention;

[0054] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0057] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.

[0058] The embodiment of the present invention provides a data fingerprint generation method, which can be applied to a variety of system platforms, and its execution subject can be a processor of a computer terminal or various mobile devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0059] S101: Obtain a digital matrix of target data.

[0060] In the present invention, the target data may be text, picture, audio or video data.

[0061] S102: Converting the digital matrix into a statistical value matrix according to a preset statistical value algorithm.

[0062] The statistical value algorithm includes at least three of the mean value algorithm, the range algorithm, the variance algorithm, the median algorithm, the kurtosis algorithm, the difference mean algorithm, the difference range algorithm and the difference variance algorithm.

[0063] For example, different statistical values ​​may be used to calculate the fingerprint, such as using (mean, range, variance), (difference mean, difference range, difference variance), (mean, median, kurtosis) to calculate and obtain a statistical value matrix.

[0064] In the present invention, the calculation formula of the average value algorithm of data is:

[0065] .

[0066] Among them, A represents a set, An represents a digital set with n numbers, Represents the i-th element in a collection.

[0067] The calculation formula of the variance algorithm is:

[0068] .

[0069] Where S is the target value, is the i-th number in the digital set of each row in the digital matrix, Represents the average of the numbers in a collection of numbers.

[0070] The calculation formula of the range algorithm is: .

[0071] in, Represents the maximum value in a set of numbers. Represents the minimum value in a set of numbers.

[0072] The calculation formula of the kurtosis algorithm is:

[0073] .

[0074] Where n represents the number of numbers in the number set. is the i-th number in the digital set of each row in the digital matrix, Represents the average of the numbers in a collection of numbers.

[0075] Taking the statistical values ​​including mean, range and variance as an example, the following is the digital matrix of the original data:

[0076] .

[0077] The statistical value matrix obtained after calculating the mean, range and variance of each row in the original matrix is:

[0078] .

[0079] in, represents the mean, S represents the range, and D represents the variance.

[0080] S103: Calculate the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix.

[0081] Specifically, the cosine value corresponding to each row parameter in the statistical value matrix is ​​calculated to obtain the cosine distance regularization value corresponding to the statistical value matrix, including:

[0082] The zeroth row is set before the first row of the statistical value matrix, and each parameter in the zeroth row is a preset initial value; wherein each initial value is 0 or the number of the first column of the zeroth row is 1, and the numbers of the other columns are 0.

[0083] Calculate the cosine value between each row except the zeroth row in the statistical value matrix and the previous row;

[0084] Each cosine value is regularized to obtain the cosine distance regularization value.

[0085] It is understandable that the original statistical value matrix is ​​a matrix of n rows and 3 columns, and after adding the zeroth row, it becomes a matrix of n+1 rows and 3 columns:

[0086] .

[0087] Among them, A0=0, S0=0, D0=0, or A0=1, S0=0, D0=0.

[0088] Except for the zeroth row, the cosine value between each row and the previous row is calculated. The angle cosine algorithm is:

[0089] .

[0090] in, It refers to the i-th number in the digital set of each column in the digital matrix, and the cosine value obtained is between [-1,1].

[0091] After regularizing each cosine value, the regularized cosine distance value is obtained as follows: , where b1 to b nare the cosine values ​​corresponding to each row in the statistical value matrix.

[0092] S104: Apply k-Shingle to calculate each cosine value in the cosine distance normalization value to obtain at least one identification number.

[0093] Specifically, k-Shingle is applied to calculate each cosine value in the cosine distance warping value to obtain at least one identification number, including:

[0094] Determine the length of the string corresponding to k-Shingle;

[0095] According to the length of the string, the cosine distance regularization value is split into at least one set of string sets;

[0096] Determine the maximum value of a string set;

[0097] Based on the maximum value and the character string length, each parameter in each character string set is calculated to obtain an identification number corresponding to each character string set.

[0098] It should be noted that the value of the string length k is related to the type of data. For example, for English articles, the value of k can be 5. The string length is used to limit the number of numbers contained in a set of strings. For example, the cosine distance normalization value is: , the string length is k=5, and the cosine distance regularization value is split into three sets of string sets, which are: , and .

[0099] After obtaining each string set, each parameter in each string set is calculated according to the maximum value m and the string length k, and the calculation formula for obtaining the identification number corresponding to the string is:

[0100] .

[0101] Among them, c1~c k For each value in the string collection.

[0102] S105: Apply a preset minimum hash algorithm to calculate each identification serial number to obtain a data fingerprint corresponding to the target data.

[0103] It can be understood that the minimum hash algorithm is applied to perform hash calculation on each identification number to obtain a data fingerprint.

[0104] Among them, the calculation formula of the minimum hash algorithm is: .

[0105] Where p is a prime number.

[0106] In the method provided by the embodiment of the present invention, after the target data is converted into a data matrix, at least three statistical value algorithms are selected to calculate each row of numbers in the digital matrix to convert the digital matrix into a statistical value matrix. The cosine value corresponding to each row in the statistical value matrix is ​​calculated, and the cosine distance regularization value is obtained after regularization. After calculating each cosine value in the cosine distance regularization value by k-Shingle, at least one identification number is obtained, and finally the identification number is calculated by the minimum hash algorithm to obtain the data fingerprint corresponding to the target data. The method provided by the embodiment of the present invention can ensure that the stolen and fine-tuned data is similar to the data fingerprint of the original data, increase the probability of successfully identifying the stolen data, and protect the ownership of the property owner of the data.

[0107] In the method provided by the present invention, since the thief will only make minor adjustments to the data after stealing the data in order to avoid the data losing its original meaning, the statistical value is used as the characteristic value of the data, and the cosine distance and regularization are calculated based on the statistical value matrix. Even if the data fingerprint obtained after the cosine value obtained after fine-tuning the data is calculated by k-Shingle and the minimum hash algorithm is similar to the data fingerprint of the original data, the data fingerprint generated by the data fingerprint generation method provided by the present invention can more accurately verify whether the data has been stolen, and further protect the ownership of the property owner of the data.

[0108] In the method provided in the embodiment of the present invention, reference is made to Figure 2 , the process of applying a preset minimum hash algorithm to process each of the identification serial numbers to obtain a data fingerprint corresponding to the target data specifically includes:

[0109] S201: Obtain a preset maximum prime number.

[0110] S202: Substitute the maximum prime number into the minimum hash algorithm, and apply the minimum hash algorithm to calculate each identification number to obtain the serial number hash value corresponding to each identification number.

[0111] S203: Convert each serial number hash value into a matrix form to obtain a data fingerprint corresponding to the target data.

[0112] It should be noted that in order to avoid hash conflicts after the identification number is directly hashed, the maximum prime number is substituted into the original minimum hash algorithm so that the hash value obtained when performing the minimum hash calculation can be as discrete as possible.

[0113] It should also be noted that the value obtained by the minimum hash calculation is not in matrix form, so after the serial number hash value is calculated, it is converted into a matrix form.

[0114] Based on the method provided in the above embodiment, the following is an example of the data fingerprint generation method of the present invention:

[0115] If the digital matrix of the original data is as follows:

[0116] .

[0117] The statistical value matrix calculated using the statistical values ​​of mean, range and variance is:

[0118] .

[0119] Calculate the cosine value of each row and the previous row, and regularize to get .

[0120] If the string length k=5, use 5-Shingle to get the continuous string and get the following string set:

[0121] , and ;

[0122] The identification numbers of each string set are 1119594, 3191899, 3037999 respectively.

[0123] Take the prime number p=1000037, and the minimum hash algorithm is: Fi(x)=(100x+p / 2*i)mod(1000037).

[0124] The hash values ​​of the serial numbers obtained are:

[0125] F1(1119594)=955293, F2(3191899)=178097 and F3(3037999)=788689;

[0126] After converting each hash value serial number into a matrix, we get:

[0127] , and ;

[0128] Finally, the data fingerprint of the original data can be obtained as follows:

[0129] ;

[0130] If the data thief replaces the columns of the data, it is easy to know that the data fingerprint of the data will not change. If the order of the first and second columns of the original data is changed, as follows:

[0131] .

[0132] The calculated statistical value matrix is:

[0133] .

[0134] Calculate the cosine of each row with the previous row. In this example, the cosine value is still: .

[0135] The final fingerprint is also unchanged. Therefore, it can be judged that the two data matrices are very similar and can be used as suspects of data theft.

[0136] Consider another set of data:

[0137] .

[0138] The calculated 5-Shingle string set is:

[0139] , , and .

[0140] The data fingerprint obtained after the minimum hash operation is:

[0141] .

[0142] Since the string sets are different, the final data fingerprints are also completely different, with a similarity of 0, which indicates that the original data are completely dissimilar.

[0143] In the above-mentioned embodiment, in the process of converting the digital matrix into a statistical value matrix, the three statistical values ​​of mean, range and variance are used to calculate the data fingerprint. The statistical function has an impact on the fingerprint, and the fingerprints obtained by different statistical functions are different. Because different fingerprint statistical functions have different sensitivities to data differences, for example, if a column of data is deleted, it may not affect the range. In addition, if the average values ​​of the data are relatively large, but the differences are small, the cosine values ​​of the last rows may be very close. Therefore, different statistical values ​​can be used to calculate the fingerprint, such as using a combination of mean, range and variance, or using a combination of difference average, difference range and difference variance, or using a combination of mean, median and kurtosis to calculate three fingerprints to form a fingerprint matrix. When comparing the difference, as long as one of the fingerprints in the three statistical values ​​is similar, it can be suspected that the data is similar.

[0144] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.

[0145] and Figure 1Corresponding to the method described above, the embodiment of the present invention further provides a data fingerprint generating device for Figure 1 In the specific implementation of the method, the data fingerprint generation device provided in the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and its structural diagram is as follows Figure 3 As shown, specifically including:

[0146] An acquisition unit 301 is used to acquire a digital matrix of target data;

[0147] A conversion unit 302, configured to convert the digital matrix into a statistical value matrix according to a preset statistical value algorithm;

[0148] A first calculation unit 303 is used to calculate the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix;

[0149] A second calculation unit 304 is used to calculate each cosine value in the cosine distance warping value by applying k-Shingle to obtain at least one identification number;

[0150] The third calculation unit 305 is used to apply a preset minimum hash algorithm to calculate each of the identification numbers to obtain a data fingerprint corresponding to the target data.

[0151] In the device provided by the embodiment of the present invention, after the target data is converted into a data matrix, at least three statistical value algorithms are selected to calculate each row of numbers in the digital matrix to convert the digital matrix into a statistical value matrix. The cosine value corresponding to each row in the statistical value matrix is ​​calculated, and the cosine distance regularization value is obtained after regularization. After calculating each cosine value in the cosine distance regularization value by k-Shingle, at least one identification number is obtained, and finally the identification number is calculated by the minimum hash algorithm to obtain the data fingerprint corresponding to the target data. The device provided by the embodiment of the present invention can ensure that the stolen and fine-tuned data is similar to the data fingerprint of the original data, increase the probability of successfully identifying the stolen data, and protect the ownership of the property owner of the data.

[0152] In the device provided by an embodiment of the present invention, the statistical value algorithm includes at least three of the mean value algorithm, the range algorithm, the variance algorithm, the median algorithm, the kurtosis algorithm, the difference average algorithm, the difference range algorithm and the difference variance algorithm.

[0153] In the device provided by the embodiment of the present invention, the first calculation unit 303 includes:

[0154] A setting subunit, used for setting a zeroth row before the first row of the statistical value matrix, wherein each parameter in the zeroth row is a preset initial value;

[0155] A second calculation subunit is used to calculate the cosine value between each row except the zeroth row in the statistical value matrix and the previous row;

[0156] The regularization subunit is used to regularize each of the cosine values ​​to obtain a regularized cosine distance value.

[0157] In the device provided by the embodiment of the present invention, the second calculating unit 304 includes:

[0158] A first determining subunit, used to determine the length of the string corresponding to the k-Shingle;

[0159] A splitting subunit, used for splitting the cosine distance regularization value into at least one set of character string sets according to the length of the character string;

[0160] A second determining subunit, used to determine the maximum value of the string set;

[0161] The third calculation subunit is used to calculate each parameter in each of the character string sets based on the maximum value and the character string length, so as to obtain an identification number corresponding to each of the character string sets.

[0162] In the device provided by the embodiment of the present invention, the third calculation unit 305 includes:

[0163] An acquisition subunit is used to acquire a preset maximum prime number;

[0164] A fourth calculation subunit, used for substituting the maximum prime number into a minimum hash algorithm, and applying the minimum hash algorithm to calculate each of the identification numbers to obtain a serial number hash value corresponding to each of the identification numbers;

[0165] The conversion subunit is used to convert each of the serial number hash values ​​into a matrix form to obtain a data fingerprint corresponding to the target data.

[0166] The specific working process of each unit and sub-unit in the data fingerprint generation device disclosed in the above embodiment of the present invention can refer to the corresponding content in the data fingerprint generation method disclosed in the above embodiment of the present invention, and will not be repeated here.

[0167] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned data fingerprint generation method.

[0168] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 4As shown, it specifically includes a memory 401 and one or more instructions 402, wherein the one or more instructions 402 are stored in the memory 401 and are configured to be executed by one or more processors 403 to perform the following operations:

[0169] Get the digital matrix of target data;

[0170] According to a preset statistical value algorithm, the digital matrix is ​​converted into a statistical value matrix;

[0171] Calculate the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix;

[0172] Apply k-Shingle to calculate each cosine value in the cosine distance normalization value to obtain at least one identification number;

[0173] A preset minimum hash algorithm is applied to calculate each identification serial number to obtain a data fingerprint corresponding to the target data.

[0174] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0175] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.

[0176] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. 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 beyond the scope of the present invention.

[0177] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data fingerprint generation method, It is characterized in that include: Get the digital matrix of target data; According to a preset statistical value algorithm, the digital matrix is ​​converted into a statistical value matrix; Calculate the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix; Apply k-Shingle to calculate each cosine value in the cosine distance normalization value to obtain at least one identification number; Applying a preset minimum hash algorithm to calculate each of the identification serial numbers to obtain a data fingerprint corresponding to the target data; The step of calculating the cosine value corresponding to each row in the statistical value matrix to obtain the cosine distance regularization value corresponding to the statistical value matrix includes: A zeroth row is set before the first row of the statistical value matrix, and each parameter in the zeroth row is a preset initial value; Calculate the cosine value between each row except the zeroth row in the statistical value matrix and the previous row; Each of the cosine values ​​is regularized to obtain a cosine distance regularization value.

2. The method according to claim 1, It is characterized in that The statistical value algorithm includes at least three of a mean value algorithm, a range algorithm, a variance algorithm, a median algorithm, a kurtosis algorithm, a difference average algorithm, a difference range algorithm and a difference variance algorithm.

3. The method according to claim 1, It is characterized in that The applying k-Shingle to calculate each cosine value in the cosine distance normalization value to obtain at least one identification number includes: Determine the length of the string corresponding to the k-Shingle; Splitting the cosine distance regularization values ​​into at least one set of character string sets according to the character string lengths; Determine the maximum value of the string set; Based on the maximum value and the character string length, each parameter in each character string set is calculated to obtain an identification number corresponding to each character string set.

4. The method according to claim 3, It is characterized in that The application uses a preset minimum hash algorithm to process each of the identification serial numbers to obtain a data fingerprint corresponding to the target data, including: Get the preset maximum prime number; Substituting the maximum prime number into a minimum hash algorithm, and applying the minimum hash algorithm to calculate each identification number, to obtain a serial number hash value corresponding to each identification number; Each of the serial number hash values ​​is converted into a matrix form to obtain a data fingerprint corresponding to the target data.

5. A data fingerprint generating device, It is characterized in that include: An acquisition unit, used for acquiring a digital matrix of target data; A conversion unit, used for converting the digital matrix into a statistical value matrix according to a preset statistical value algorithm; A first calculation unit, used to calculate the cosine value corresponding to each row in the statistical value matrix, and obtain the cosine distance regularization value corresponding to the statistical value matrix; A second calculation unit is used to calculate each cosine value in the cosine distance normalization value by applying k-Shingle to obtain at least one identification number; A third calculation unit, used to calculate each of the identification serial numbers by applying a preset minimum hash algorithm to obtain a data fingerprint corresponding to the target data; Wherein, the first computing unit includes: A setting subunit, used for setting a zeroth row before the first row of the statistical value matrix, wherein each parameter in the zeroth row is a preset initial value; A second calculation subunit is used to calculate the cosine value between each row except the zeroth row in the statistical value matrix and the previous row; The regularization subunit is used to regularize each of the cosine values ​​to obtain a regularized cosine distance value.

6. The device according to claim 5, It is characterized in that The statistical value algorithm includes at least three of a mean value algorithm, a range algorithm, a variance algorithm, a median algorithm, a kurtosis algorithm, a difference average algorithm, a difference range algorithm and a difference variance algorithm.

7. The device according to claim 5, It is characterized in that The second computing unit comprises: A first determining subunit, used to determine the length of the string corresponding to the k-Shingle; A splitting subunit, used for splitting the cosine distance regularization value into at least one set of character string sets according to the length of the character string; A second determining subunit, used to determine the maximum value of the string set; The third calculation subunit is used to calculate each parameter in each of the character string sets based on the maximum value and the character string length, so as to obtain an identification number corresponding to each of the character string sets.

8. The device according to claim 7, It is characterized in that The third computing unit comprises: An acquisition subunit is used to acquire a preset maximum prime number; A fourth calculation subunit, used for substituting the maximum prime number into a minimum hash algorithm, and applying the minimum hash algorithm to calculate each of the identification numbers to obtain a serial number hash value corresponding to each of the identification numbers; The conversion subunit is used to convert each of the serial number hash values ​​into a matrix form to obtain a data fingerprint corresponding to the target data.

Citation Information

Patent Citations

  • Data mining algorithm for researching the influence of a deposition environment on a deep water channel form

    CN109614590A

  • Method, system and equipment for guiding user based on social contact, and storage medium

    CN117093785A

  • Text deduplication method and device, computer equipment and storage medium

    CN117216239A

  • Large-scale similar text clustering method based on minimum hash and data stream

    CN117891938A

  • Retrieving semantically similar sentences for indic language

    IN201841021009A