Repeated data detection method and device, computer program product and electronic equipment

By using hash value detection and distributed cache database in the file processing system, the business efficiency problem caused by duplicate data in file interaction is solved, the timely identification and processing of duplicate data is realized, and the security of the system and user trust are improved. Spend.

CN118626447APending Publication Date: 2024-09-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410850168.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the upstream and downstream systems of file interaction, duplicate records cannot be identified in real time or monitored in quasi-real time, causing duplicate data to cause duplicate entry problems in application scenarios such as reconciliation, affecting business processing efficiency.

Method used

By reading the detailed data in the file to be processed, extract the target detailed value and calculate its hash value, insert it into the distributed cache database in the form of preset key-value pairs, and detect whether the hash value insertion is successful to determine the repeatability of the data. , and issue prompt messages or repair operations when necessary.

Benefits of technology

It achieves timely detection and processing of duplicate data, improves business processing efficiency, avoids duplicate entries, and ensures data consistency and system security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626447A
    Figure CN118626447A
Patent Text Reader

Abstract

The invention discloses a duplicated data detection method and device, a computer program product and electronic equipment. Relates to the field of data processing and financial science and technology, and comprises the following steps: reading detail data in a to-be-processed file, extracting a target detail value in the detail data, and calculating a target hash value of the target detail value according to a preset hash algorithm; inserting the target detail value and the target hash value into a distributed cache database according to the form of a preset key value pair; detecting whether the target detail value and the target hash value are successfully inserted in a distributed cache database; and under the condition that insertion of the target detail value and the target hash value fails, determining that repeated detail data exists in the to-be-processed file. Through the method and the device, the problem that the service processing efficiency is affected due to the fact that repeated data exists in the posted file in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of data processing and financial technology, and specifically, to a duplicate data detection method, device, computer program product and electronic device. Background Art

[0002] Between the upstream and downstream systems of file interaction, there are problems of duplication of previous and subsequent batch files or duplication of some records in different batch files due to reasons such as environment, development, and network. After the downstream system obtains the files transmitted from the upstream, it cannot identify or monitor duplicate records in real time, which will generate duplicate data. In application scenarios such as reconciliation, the inability to detect duplicate data in time will cause duplicate entry problems. The delay in handling related problems caused by duplicate data will lead to a certain degree of business loss. For example, in online business, there are defects in the agreed implementation method of the interface between the two parties, and in batch business, there are some duplicate detailed data in multiple files. After the business initiates the duplicate data according to two new transactions, the business number and technical number have changed, and the control duplication strategy of the business system is difficult to cover the event of duplicate data. Such duplicate data is difficult to find in the reconciliation and clearing links, which has a great impact on business processing efficiency.

[0003] There is duplicate data in the files recorded in the relevant technology, which affects the efficiency of business processing. At present, no effective solution has been proposed. Summary of the invention

[0004] The main purpose of the present application is to provide a duplicate data detection method, device, computer program product and electronic device to solve the problem of duplicate data existing in the files recorded in the related technology, which affects the efficiency of business processing.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a duplicate data detection method is provided. The method comprises: reading the detailed data in the to-be-processed file, extracting the target detailed value in the detailed data, and calculating the target hash value of the target detailed value according to a preset hash algorithm; inserting the target detailed value and the target hash value into a distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is a key value with the target hash value as the key value and the target detailed value as the value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detailed data; detecting whether the target detailed value and the target hash value are inserted successfully in the distributed cache database; and determining whether the target detailed value and the target hash value are inserted successfully in the to-be-processed file if the insertion of the target detailed value and the target hash value fails.

[0006] Optionally, after determining that there is duplicate detailed data in the file to be processed, the method also includes: updating the number of times the duplicate detailed data appears in the file to be processed to obtain a target number, wherein the target number increases each time the insertion of the detail value and the hash value fails; judging whether the target number is greater than or equal to a number threshold; if the target number is less than the number threshold, reading the next piece of detailed data in the file to be processed until the file to be processed is read, or detailed data with a target number greater than or equal to the number threshold appears; if the target number is greater than or equal to the number threshold, stopping reading the file to be processed and issuing a first prompt message, wherein the first prompt message is used to prompt that there is a risk in the file to be processed.

[0007] Optionally, after determining that duplicate detailed data exists in the file to be processed, the method further includes: obtaining associated information of the file to be processed, wherein the associated information includes at least one of the following: client operation information for uploading the file to be processed and processing information of the file processing system, the file processing system being used to read the file to be processed and detect whether duplicate detailed data exists in the file to be processed; inputting the associated information into a target model to obtain an abnormal reason for the appearance of duplicate detailed data in the file to be processed, wherein the target model is trained by multiple groups of training samples, each group of training samples including historical associated information and historical abnormal reasons; triggering a preset repair operation based on the abnormal reason, and repairing the file processing system through the preset repair operation.

[0008] Optionally, the target model is trained in the following manner: obtaining historical duplicate data records of the file processing system, extracting multiple historical abnormal causes from the historical duplicate data records; determining historical correlation information of each historical abnormal cause, and determining the historical abnormal causes and the historical correlation information of the historical abnormal causes as a group of training samples to obtain multiple groups of training samples; training a preset neural network model with multiple groups of training samples to obtain a target model.

[0009] Optionally, detecting whether the target detail value and the target hash value are successfully inserted in the distributed cache database includes: detecting whether there is a historical detail value in the distributed cache database that is the same as the target detail value, and detecting whether there is a historical hash value in the distributed cache database that is the same as the target hash value; when it is detected that there is a historical detail value in the distributed cache database that is the same as the target detail value, or when there is a historical hash value in the distributed cache database that is the same as the target hash value, determining that the insertion of the target detail value and the target hash value has failed; when it is detected that all historical detail values ​​in the distributed cache database are different from the target detail value, and all historical hash values ​​in the distributed cache database are different from the target hash value, determining that the target detail value and the target hash value have been successfully inserted.

[0010] Optionally, before reading the detailed data in the file to be processed, the method also includes: obtaining the number of clicks, refreshes and submissions of the file to be processed in the file processing system within a preset period; judging whether the number of clicks is greater than or equal to a click threshold, judging whether the number of refreshes is greater than or equal to a refresh threshold, and judging whether the number of submissions is greater than or equal to a submission threshold; when the number of clicks is greater than or equal to the click threshold, or the number of refreshes is greater than or equal to the refresh threshold, or the number of submissions is greater than or equal to the submission threshold, issuing a second prompt message, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

[0011] Optionally, after reading the detailed data in the file to be processed, extracting the target detailed value in the detailed data, and calculating the target hash value of the target detailed value according to a preset hash algorithm, the method also includes: obtaining the response time and the number of operation changes when the file processing system processes the file to be processed, wherein the number of operation changes is the number of times the operation of reading the file to be processed is changed, or the operation of extracting the target detailed value is changed, or the operation of calculating the target hash value is changed; judging whether the response time is greater than or equal to a response time threshold, and judging whether the number of operation changes is greater than or equal to an operation change number threshold; when the response time is greater than or equal to the response time threshold, or the number of operation changes is greater than or equal to the operation change number threshold, issuing a second prompt message, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a duplicate data detection device is provided. The device includes: a reading unit, which is used to read the detailed data in the to-be-processed file, extract the target detailed value in the detailed data, and calculate the target hash value of the target detailed value according to the preset hash algorithm; an inserting unit, which is used to insert the target detailed value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is a key value with the target hash value as the key value and the target detailed value as the value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detailed data; a detecting unit, which is used to detect whether the target detailed value and the target hash value are inserted successfully in the distributed cache database; and a determining unit, which is used to determine whether the target detailed value and the target hash value are inserted successfully in the to-be-processed file when the insertion of the target detailed value and the target hash value fails.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0014] Through this application, the following steps are adopted: read the detailed data in the file to be processed, extract the target detailed value in the detailed data, and calculate the target hash value of the target detailed value according to the preset hash algorithm; insert the target detailed value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is the target hash value as the key value, and the target detailed value is the value corresponding to the key value, and the distributed cache database contains multiple key-value pairs of historical detailed data; detect whether the target detailed value and the target hash value are successfully inserted in the distributed cache database; in the case of failure to insert the target detailed value and the target hash value, determine whether there are duplicate detailed data in the file to be processed, and solve the problem of duplicate data in the file recorded in the related technology, which affects the efficiency of business processing. By calculating the target hash value of the detailed data, extracting the target detailed value of the detailed data, and inserting the target detailed value and the target hash value into the distributed cache database in the form of a key-value pair, it is determined whether there is detailed data in the file to be processed according to whether the insertion is successful, thereby achieving the effect of timely detecting duplicate data and improving business processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 is a flowchart of a duplicate data detection method provided in an embodiment of the present application;

[0017] Figure 2 is a flow chart of an abnormality cause detection method provided according to an embodiment of the present application;

[0018] Figure 3 is a schematic diagram of a duplicate data detection device provided according to an embodiment of the present application;

[0019] Figure 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0024] It should be noted that the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0025] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a duplicate data detection method provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0026] Step S101, read the detailed data in the file to be processed, extract the target detailed value in the detailed data, and calculate the target hash value of the target detailed value according to a preset hash algorithm.

[0027] Specifically, the files to be processed may be files for batch deductions in financial institutions, files for batch salary payments, files for batch summary settlements, files for batch reconciliations, etc. Detailed data refers to each piece of data in the file to be processed, and the target detailed value may be the concatenation of multiple key data in the detailed data. The preset hash algorithm may be an MD5 (Message-Digest Algorithm 5, a hash function) algorithm. Since identical detailed records may exist in a single file or between multiple batches of files, duplicate records may lead to duplicate entries or unequal reconciliation problems if they are not detected. Therefore, duplicate data in the file to be processed is detected by reading each piece of detailed data in the file to be processed, and extracting the target detailed value based on the detailed data and calculating the target hash value based on the target detailed value using the preset hash algorithm.

[0028] Step S102, inserting the target detail value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is the target hash value as the key value and the target detail value as the value corresponding to the key value, and the distributed cache database contains key-value pairs of multiple historical detail data.

[0029] Specifically, the preset key-value pair can be a key:value pair, and the target detail value and target hash value of each detail data in the file to be processed are stored in the distributed cache database in the form of a key:value pair, where the target hash value of the detail data is used as the key and the target detail value is used as the value corresponding to the key.

[0030] It should be noted that the distributed cache database not only stores the key-value pairs of all detailed data in the current file to be processed, but also stores the key-value pairs of all detailed data in the files that have been processed historically. That is, the embodiment of the present application can not only detect whether there is duplicate data in the file to be processed, but also detect whether there is duplicate data in the files that have been processed historically that is the same as the data in the file to be processed.

[0031] Step S103, detecting in the distributed cache database whether the target detail value and the target hash value are inserted successfully.

[0032] Specifically, in the case where two identical transactions are submitted repeatedly, two identical detail data will be generated. When processing the pending file, the detail value and hash value of the two identical detail data will be generated. When the target detail value and target hash value of the detail data of the second transaction are inserted into the distributed cache, the target detail value and target hash value of the second transaction will fail to be inserted because the detail value and hash value records of the first transaction have been stored in the distributed cache data. Therefore, by detecting whether the target detail value and target hash value are successfully inserted in the distributed cache database, it is determined whether there is duplicate detail data in the pending file.

[0033] Step S104: when the insertion of the target detail value and the target hash value fails, it is determined that there is duplicate detail data in the file to be processed.

[0034] Specifically, if the insertion of the target detail value and the target hash value fails, it means that the distributed cache database stores the same detail data as that in the file to be processed, that is, there are duplicate detail data in the file to be processed. After determining that there are duplicate detail data in the file to be processed, the processing flow of the file to be processed can be interrupted, skipped, or alarms and email reminders can be triggered as needed.

[0035] The duplicate data detection method provided by the embodiment of the present application, by reading the detailed data in the to-be-processed file, extracting the target detailed value in the detailed data, and calculating the target hash value of the target detailed value according to the preset hash algorithm; inserting the target detailed value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is a target hash value as the key value, and the target detailed value is the value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detailed data; detecting whether the target detailed value and the target hash value are inserted successfully in the distributed cache database; in the case where the insertion of the target detailed value and the target hash value fails, determining whether there are duplicate detailed data in the to-be-processed file, solving the problem of duplicate data existing in the accounted file in the related technology, affecting the efficiency of business processing. By calculating the target hash value of the detailed data, extracting the target detailed value of the detailed data, and inserting the target detailed value and the target hash value into the distributed cache database in the form of a key-value pair, determining whether there are detailed data in the to-be-processed file according to whether the insertion is successful, thereby achieving the effect of timely detecting duplicate data and improving the efficiency of business processing.

[0036] In order to avoid affecting the business, after determining that there is duplicate detailed data in the file to be processed, a prompt message is promptly issued to prompt that there is a risk in the file to be processed. Optionally, in the duplicate data detection method provided in the embodiment of the present application, after determining that there is duplicate detailed data in the file to be processed, the method also includes: updating the number of times the duplicate detailed data appears in the file to be processed to obtain a target number, wherein the target number increases each time the insertion of the detail value and the hash value fails; judging whether the target number is greater than or equal to the number threshold; if the target number is less than the number threshold, reading the next detailed data in the file to be processed until the file to be processed is read, or detailed data with the target number greater than or equal to the number threshold appears; if the target number is greater than or equal to the number threshold, stopping reading the file to be processed and issuing a first prompt message, wherein the first prompt message is used to prompt that there is a risk in the file to be processed.

[0037] Specifically, a counter is set in the file processing system to count the number of times repeated detailed data appears in the file to be processed, that is, the target number of times. The number threshold can be set according to expert experience, for example, the number threshold is set to three times. When the file processing system processes the file to be processed, the target number is increased by one each time repeated detailed data appears. And it is judged whether the current target number is greater than or equal to the number threshold. If the target number is less than the number threshold, the repeated detailed data is skipped and the next detailed data in the file to be processed is read. If the target number is greater than or equal to the number threshold, it means that there are a lot of replayed detailed data in the file to be processed, and it is necessary to suspend reading the file to be processed, and remind the business personnel through the first prompt information that there is a risk in the file to be processed.

[0038] The embodiment of the present application records the target number of occurrences of repeated detailed data and promptly interrupts the reading of the to-be-processed file when the target number is greater than or equal to the number threshold. This improves the security and reliability of the file processing system, ensures data consistency, and improves the efficiency of transaction processing; from a business perspective, it avoids duplicate entries, improves customer satisfaction, and increases users' trust in the file processing system.

[0039] In order to repair the file processing system in time, it is necessary to determine the abnormal cause of the duplicate detailed data. Optionally, in the duplicate data detection method provided in the embodiment of the present application, Figure 2 is a flow chart of a method for detecting abnormal causes according to an embodiment of the present application. Figure 2 As shown, after determining that there is duplicate detailed data in the file to be processed, the method further includes:

[0040] Step S201, obtaining the associated information of the file to be processed, wherein the associated information includes at least one of the following: operation information of the client that uploaded the file to be processed and processing information of the file processing system, the file processing system is used to read the file to be processed and detect whether there is duplicate detailed data in the file to be processed;

[0041] Step S202, inputting the associated information into the target model to obtain the abnormal reason for the duplicate detailed data in the to-be-processed file, wherein the target model is trained by multiple sets of training samples, each set of training samples including historical associated information and historical abnormal reasons;

[0042] Step S203: triggering a preset repair operation based on the abnormal cause, and repairing the file processing system through the preset repair operation.

[0043] Specifically, there are various abnormal reasons for duplicate detailed data. In order to understand the abnormal reasons in a timely manner, the abnormal reasons for the duplicate detailed data are analyzed based on the records of historical duplicate detailed data, and the associated information associated with the generation of duplicate detailed data is determined. For example, client operation information and processing information when the file processing system processes files. Client operation information may include click frequency, repeated submission rate, refresh rate, etc. within a certain period of time. Processing information may include the number of crashes of the file processing system, the number of errors, the response time for processing files, the number of operations and changes on files, etc. Based on the above client operation information and the processing information when the file processing system processes files combined with the case knowledge base, the abnormal cause is automatically judged based on the associated information of the file to be processed through artificial intelligence, and then the preset repair operation corresponding to the abnormal cause is triggered.

[0044] The embodiment of the present application promptly analyzes the abnormal reasons for the appearance of duplicate detailed data in the files to be processed, and promptly repairs the file processing system, thereby ensuring the security of the file processing system and improving business processing efficiency.

[0045] In order to automatically identify the cause of the exception based on the associated information of the file to be processed, it is necessary to train the target model. Optionally, in the duplicate data detection method provided in the embodiment of the present application, the target model is trained in the following manner: obtaining historical duplicate data records of the file processing system, and extracting multiple historical exception causes from the historical duplicate data records; determining the historical associated information of each historical exception cause, and determining the historical exception causes and the historical associated information of the historical exception causes as a group of training samples to obtain multiple groups of training samples; training a preset neural network model through multiple groups of training samples to obtain a target model.

[0046] Specifically, historical abnormal reasons may include abnormal client operation reasons, system failure reasons, and abnormal external environmental parameters such as abnormal network fluctuations. Various historical abnormal reasons are extracted from the historical repeated data records of financial institutions within a certain period of time, and the historical abnormal reasons and historical association information of historical abnormal reasons are used as training samples to train the preset neural network model, and obtain a target model that can automatically identify abnormal reasons based on association information.

[0047] The embodiment of the present application determines the abnormal reason for the duplicate detailed data in the file to be processed by training the target model.

[0048] Whether the target detail value and the target hash value are successfully inserted is determined by comparing whether there is a numerical value identical to the target detail value or the target hash value in the distributed cache database. Optionally, in the duplicate data detection method provided in the embodiment of the present application, detecting whether the target detail value and the target hash value are successfully inserted in the distributed cache database includes: detecting whether there is a historical detail value identical to the target detail value in the distributed cache database, and detecting whether there is a historical hash value identical to the target hash value in the distributed cache database; when it is detected that there is a historical detail value identical to the target detail value in the distributed cache database, or when there is a historical hash value identical to the target hash value in the distributed cache database, determining that the insertion of the target detail value and the target hash value has failed; when it is detected that all historical detail values ​​in the distributed cache database are different from the target detail value, and all historical hash values ​​in the distributed cache database are different from the target hash value, determining that the target detail value and the target hash value are successfully inserted.

[0049] Specifically, the distributed cache database stores the detailed values ​​and hash values ​​of all files processed by the financial institution within a preset period. Therefore, when processing the files to be processed, by detecting whether there is a historical detailed value in the distributed cache database that is the same as the target detailed value, and detecting whether there is a historical hash value in the distributed cache database that is the same as the target hash value, it can be determined whether the target detailed value and the target hash value are inserted successfully. If there is a historical detailed value that is the same as the target detailed value, or, there is a historical hash value that is the same as the target hash value, it means that the distributed cache database has stored data that is the same as the target hash value or the target detailed value. At this time, the target hash value and the target detailed value cannot be inserted into the distributed cache database due to data conflicts. Only when all historical detailed values ​​in the distributed cache database are different from the target detailed value, and all historical hash values ​​in the distributed cache database are different from the target hash value, can the target hash value and the target detailed value be inserted successfully.

[0050] The embodiment of the present application determines whether there is duplicate detail data in the file to be processed by detecting whether the target detail value and the target hash value are inserted successfully.

[0051] In order to provide early warning for files that may contain duplicate detailed data, the files to be processed can be monitored based on the number of clicks, refreshes and submissions. Optionally, in the duplicate data detection method provided in the embodiment of the present application, before reading the detailed data in the file to be processed, the method also includes: obtaining the number of clicks, refreshes and submissions of the file to be processed in the file processing system within a preset period; judging whether the number of clicks is greater than or equal to a click threshold, judging whether the number of refreshes is greater than or equal to a refresh threshold, and judging whether the number of submissions is greater than or equal to a submission threshold; when the number of clicks is greater than or equal to the click threshold, or the number of refreshes is greater than or equal to the refresh threshold, or the number of submissions is greater than or equal to the submission threshold, a second prompt message is issued, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

[0052] Specifically, the preset period can be a value set based on expert experience, such as thirty minutes. Since the cause of repeated entry may be a client operation problem, such as repeated submission, multiple clicks, repeated refreshes, etc., the number of clicks, refreshes and submissions of the pending file within thirty minutes are counted, and the relationship between the number of clicks, refreshes and submissions and the corresponding click threshold, refresh threshold and submission threshold is compared, so as to detect whether there is a risk of duplicate detailed data in the pending file before reading the pending file. If the number of clicks is greater than or equal to the click threshold, or the number of refreshes is greater than or equal to the refresh threshold, or the number of submissions is greater than or equal to the submission threshold, it means that there may be a client operation problem before the file processing system reads the pending file, resulting in the risk of duplicate detailed data in the pending file. At this time, the second prompt information is used to remind the business personnel that there is a risk of duplication of the pending file.

[0053] The embodiment of the present application detects the risk of duplicate detailed data appearing in the file to be processed before reading the file to be processed by comparing the relationship between the number of clicks, refreshes and submissions and the corresponding click thresholds, refresh thresholds and submission thresholds, thereby ensuring the security of the file processing system.

[0054] Optionally, in the duplicate data detection method provided in the embodiment of the present application, after reading the detailed data in the file to be processed, extracting the target detailed value in the detailed data, and calculating the target hash value of the target detailed value according to a preset hash algorithm, the method also includes: obtaining the response time and the number of operation changes when the file processing system processes the file to be processed, wherein the number of operation changes is the number of times the operation of reading the file to be processed is changed, or the operation of extracting the target detailed value is changed, or the operation of calculating the target hash value is changed; judging whether the response time is greater than or equal to a response time threshold, and judging whether the number of operation changes is greater than or equal to an operation change number threshold; when the response time is greater than or equal to the response time threshold, or the number of operation changes is greater than or equal to the operation change number threshold, issuing a second prompt message, wherein the second prompt message is used to prompt that there is a risk of duplication in the file to be processed.

[0055] Specifically, since the cause of duplicate entry may be a problem with the file processing system, such as system instability, program loopholes, breakpoint resumption, manual rerun, etc., by comparing the response time with the response time threshold, and comparing the number of operation changes with the operation change number threshold, it is possible to detect whether there is a risk of duplicate detailed data in the pending file after processing the pending file. If the response time is greater than or equal to the response time threshold, or the number of operation changes is greater than or equal to the operation change number threshold, it means that the file processing system may cause a system failure of the file processing system when processing the pending file, resulting in the risk of duplicate detailed data. At this time, the second prompt information is used to remind the business personnel that there is a risk of duplication of the pending file.

[0056] The embodiment of the present application detects the risk of duplicate detailed data appearing in the file to be processed after the file processing system processes the file to be processed by comparing the response time with the response time threshold, and comparing the number of operation changes with the operation change number threshold, thereby ensuring the security of the file processing system.

[0057] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0058] The embodiment of the present application also provides a duplicate data detection device. It should be noted that the duplicate data detection device of the embodiment of the present application can be used to execute the duplicate data detection method provided in the embodiment of the present application. The duplicate data detection device provided in the embodiment of the present application is introduced below.

[0059] Figure 3 Schematic diagram of a duplicate data detection device provided according to an embodiment of the present application. Figure 3 As shown, the device comprises:

[0060] The reading unit 301 is used to read the detailed data in the file to be processed, extract the target detailed value in the detailed data, and calculate the target hash value of the target detailed value according to a preset hash algorithm;

[0061] Insertion unit 302, used to insert the target detail value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is a target hash value as a key value and a target detail value as a value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detail data;

[0062] A detection unit 303 is used to detect whether the target detail value and the target hash value are inserted successfully in the distributed cache database;

[0063] The determination unit 304 is used to determine whether duplicate detail data exists in the to-be-processed file when the insertion of the target detail value and the target hash value fails.

[0064] The duplicate data detection device provided by the embodiment of the present application reads the detailed data in the to-be-processed file through a reading unit 301, extracts the target detailed value in the detailed data, and calculates the target hash value of the target detailed value according to a preset hash algorithm; the insertion unit 302 inserts the target detailed value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is a target hash value as a key value and a target detailed value as a value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detailed data; the detection unit 303 detects whether the target detailed value and the target hash value are successfully inserted in the distributed cache database; the determination unit 304 determines whether duplicate detailed data exists in the to-be-processed file in the case where the insertion of the target detailed value and the target hash value fails, thereby solving the problem that duplicate data exists in the accounted file in the related art and affects the business processing efficiency, by calculating the target hash value of the detailed data, extracting the target detailed value of the detailed data, and inserting the target detailed value and the target hash value into the distributed cache database in the form of a key-value pair, and determining whether the detailed data exists in the to-be-processed file according to whether the insertion is successful, thereby achieving the effect of timely detecting duplicate data and improving business processing efficiency.

[0065] Optionally, in the duplicate data detection device provided in the embodiment of the present application, the device also includes: an updating unit, used to update the number of times duplicate detailed data appears in the file to be processed to obtain a target number, wherein the target number increases each time the insertion of the detail value and the hash value fails; a first judgment unit, used to judge whether the target number is greater than or equal to a number threshold; a data reading unit, used to read the next detailed data in the file to be processed when the target number is less than the number threshold, until the file to be processed is read, or detailed data with a target number greater than or equal to the number threshold appears; a first prompt unit, used to stop reading the file to be processed when the target number is greater than or equal to the number threshold, and issue a first prompt message, wherein the first prompt message is used to prompt that there is a risk in the file to be processed.

[0066] Optionally, in the duplicate data detection device provided in the embodiment of the present application, the device also includes: a first acquisition unit, used to acquire associated information of the file to be processed, wherein the associated information includes at least one of the following: client operation information of uploading the file to be processed and processing information of the file processing system, the file processing system is used to read the file to be processed and detect whether there is duplicate detailed data in the file to be processed; an input unit, used to input the associated information into a target model to obtain the abnormal reason for the appearance of duplicate detailed data in the file to be processed, wherein the target model is trained by multiple groups of training samples, and each group of training samples includes historical associated information and historical abnormal reasons; a repair unit, used to trigger a preset repair operation based on the abnormal reason, and repair the file processing system through the preset repair operation.

[0067] Optionally, in the duplicate data detection device provided in the embodiment of the present application, the device also includes: a second acquisition unit, used to acquire historical duplicate data records of the file processing system, and extract multiple historical abnormal causes from the historical duplicate data records; a sample determination unit, used to determine historical correlation information of each historical abnormal cause, and determine the historical abnormal causes and the historical correlation information of the historical abnormal causes as a group of training samples to obtain multiple groups of training samples; a training unit, used to train a preset neural network model through multiple groups of training samples to obtain a target model.

[0068] Optionally, in the duplicate data detection device provided in the embodiment of the present application, the detection unit 303 includes: a detection module, used to detect whether there is a historical detail value that is the same as the target detail value in the distributed cache database, and to detect whether there is a historical hash value that is the same as the target hash value in the distributed cache database; a first determination module, used to determine that the insertion of the target detail value and the target hash value has failed when it is detected that there is a historical detail value that is the same as the target detail value in the distributed cache database, or that there is a historical hash value that is the same as the target hash value in the distributed cache database; a second determination module, used to determine that the insertion of the target detail value and the target hash value is successful when it is detected that all historical detail values ​​in the distributed cache database are different from the target detail value, and all historical hash values ​​in the distributed cache database are different from the target hash value.

[0069] Optionally, in the duplicate data detection device provided in the embodiment of the present application, the device also includes: a third acquisition unit, used to obtain the number of clicks, refreshes and submissions of the file to be processed in the file processing system within a preset period; a second judgment unit, used to judge whether the number of clicks is greater than or equal to a click threshold, whether the number of refreshes is greater than or equal to a refresh threshold, and whether the number of submissions is greater than or equal to a submission threshold; a second prompt unit, used to issue a second prompt message when the number of clicks is greater than or equal to the click threshold, or the number of refreshes is greater than or equal to the refresh threshold, or the number of submissions is greater than or equal to the submission threshold, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

[0070] Optionally, in the duplicate data detection device provided in the embodiment of the present application, the device also includes: a fourth acquisition unit, used to obtain the response time and the number of operation changes when the file processing system processes the file to be processed, wherein the number of operation changes is the number of times the operation of reading the file to be processed is changed, or the operation of extracting the target detail value is changed, or the operation of calculating the target hash value is changed; a third judgment unit, used to judge whether the response time is greater than or equal to the response time threshold, and judge whether the number of operation changes is greater than or equal to the operation change number threshold; a third prompt unit, used to issue a second prompt message when the response time is greater than or equal to the response time threshold, or the number of operation changes is greater than or equal to the operation change number threshold, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

[0071] The duplicate data detection device includes a processor and a memory. The reading unit 301, the inserting unit 302, the detecting unit 303 and the determining unit 304 are all stored in the memory as program units. The processor executes the program units stored in the memory to implement corresponding functions.

[0072] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and duplicate data can be detected in time by adjusting kernel parameters to improve business processing efficiency.

[0073] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0074] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, a duplicate data detection method is implemented.

[0075] An embodiment of the present invention provides a processor, which is used to run a program, wherein a duplicate data detection method is executed when the program is running.

[0076] An embodiment of the present invention provides a computer program product, including a computer program, wherein the computer program implements a duplicate data detection method when executed by a processor.

[0077] Figure 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application. Figure 4 As shown, the electronic device 401 includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: reading the detailed data in the to-be-processed file, extracting the target detailed value in the detailed data, and calculating the target hash value of the target detailed value according to the preset hash algorithm; inserting the target detailed value and the target hash value into the distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair is a key value with the target hash value as the key value and the target detailed value as the value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detailed data; detecting whether the target detailed value and the target hash value are inserted successfully in the distributed cache database; and determining whether the target detailed value and the target hash value are inserted successfully in the case where the insertion of the target detailed value and the target hash value fails, determining whether duplicate detailed data exists in the to-be-processed file. The device in this article may be a server, a PC, a PAD, a mobile phone, etc.

[0078] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: reading detail data in a file to be processed, extracting a target detail value in the detail data, and calculating a target hash value of the target detail value according to a preset hash algorithm; inserting the target detail value and the target hash value into a distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair has a target hash value as a key value and a target detail value as a value corresponding to the key value, and the distributed cache database contains key-value pairs of multiple historical detail data; detecting in the distributed cache database whether the target detail value and the target hash value are inserted successfully; in the case where the insertion of the target detail value and the target hash value fails, determining that duplicate detail data exists in the file to be processed.

[0079] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0084] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0085] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0086] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0087] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0088] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A duplicate data detection method, characterized in that: include: Read the detailed data in the file to be processed, extract the target detailed value in the detailed data, and calculate the target hash value of the target detailed value according to a preset hash algorithm; Inserting the target detail value and the target hash value into a distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair uses the target hash value as a key value and the target detail value as a value corresponding to the key value, and the distributed cache database contains a plurality of key-value pairs of historical detail data; Detecting in the distributed cache database whether the target detail value and the target hash value are inserted successfully; In the case where the insertion of the target detail value and the target hash value fails, it is determined that duplicate detail data exists in the file to be processed.

2. The method according to claim 1, characterized in that After determining that duplicate detailed data exists in the to-be-processed file, the method further includes: Update the number of times that duplicate detailed data appears in the to-be-processed file to obtain a target number, wherein the target number increases each time a failure to insert a detailed value and a hash value occurs; Determine whether the target number of times is greater than or equal to a number threshold; When the target number of times is less than the number threshold, read the next detailed data in the to-be-processed file until the to-be-processed file is completely read, or detailed data with the target number of times greater than or equal to the number threshold appears; When the target number of times is greater than or equal to the number threshold, the reading of the file to be processed is stopped, and a first prompt message is issued, wherein the first prompt message is used to prompt that there is a risk in the file to be processed.

3. The method according to claim 1, characterized in that: After determining that duplicate detailed data exists in the to-be-processed file, the method further includes: Acquire the associated information of the file to be processed, wherein the associated information includes at least one of the following: operation information of the client that uploads the file to be processed and processing information of the file processing system, the file processing system is used to read the file to be processed and detect whether there is duplicate detailed data in the file to be processed; Input the association information into a target model to obtain an abnormal reason for duplicate detailed data in the to-be-processed file, wherein the target model is trained by multiple sets of training samples, each set of training samples including historical association information and historical abnormal reasons; A preset repair operation is triggered based on the abnormal cause, and the file processing system is repaired through the preset repair operation.

4. The method according to claim 3, characterized in that The target model is trained in the following way: Acquire historical duplicate data records of the file processing system, and extract multiple historical abnormal reasons from the historical duplicate data records; Determine historical association information of each historical abnormality cause, and determine the historical abnormality cause and the historical association information of the historical abnormality cause as a group of training samples to obtain multiple groups of training samples; The preset neural network model is trained by the multiple groups of training samples to obtain the target model.

5. The method according to claim 1, characterized in that Detecting in the distributed cache database whether the target detail value and the target hash value are successfully inserted includes: Detecting whether there is a historical detail value in the distributed cache database that is the same as the target detail value, and detecting whether there is a historical hash value in the distributed cache database that is the same as the target hash value; In the case where it is detected that a historical detail value in the distributed cache database is the same as the target detail value, or a historical hash value in the distributed cache database is the same as the target hash value, it is determined that the insertion of the target detail value and the target hash value fails; When it is detected that all historical detail values ​​in the distributed cache database are different from the target detail value and all historical hash values ​​in the distributed cache database are different from the target hash value, it is determined that the target detail value and the target hash value are inserted successfully.

6. The method according to claim 1, characterized in that Before reading the detailed data in the file to be processed, the method further includes: Obtain the number of clicks, refreshes and submissions of the to-be-processed file in the file processing system within a preset period; Determine whether the number of clicks is greater than or equal to a click number threshold, determine whether the number of refreshes is greater than or equal to a refresh number threshold, and determine whether the number of submissions is greater than or equal to a submission number threshold; When the number of clicks is greater than or equal to the click threshold, or the number of refreshes is greater than or equal to the refresh threshold, or the number of submissions is greater than or equal to the submission threshold, a second prompt message is issued, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

7. The method according to claim 1, characterized in that After reading the detail data in the to-be-processed file, extracting the target detail value in the detail data, and calculating the target hash value of the target detail value according to a preset hash algorithm, the method further includes: Obtaining the response time and the number of operation changes when the file processing system processes the file to be processed, wherein the number of operation changes is the number of times the operation of reading the file to be processed is changed, or the operation of extracting the target detail value is changed, or the operation of calculating the target hash value is changed; Determine whether the response time is greater than or equal to a response time threshold, and determine whether the number of operation changes is greater than or equal to an operation change number threshold; When the response time is greater than or equal to the response time threshold, or the number of operation changes is greater than or equal to the operation change number threshold, a second prompt message is issued, wherein the second prompt message is used to prompt that there is a risk of duplication of the file to be processed.

8. A duplicate data detection device, characterized in that: include: A reading unit, used for reading the detail data in the to-be-processed file, extracting the target detail value in the detail data, and calculating the target hash value of the target detail value according to a preset hash algorithm; An inserting unit, configured to insert the target detail value and the target hash value into a distributed cache database in the form of a preset key-value pair, wherein the preset key-value pair has the target hash value as a key value and the target detail value as a value corresponding to the key value, and the distributed cache database contains key-value pairs of multiple pieces of historical detail data; A detection unit, used for detecting whether the target detail value and the target hash value are inserted successfully in the distributed cache database; A determination unit is used to determine whether duplicate detail data exists in the to-be-processed file when the insertion of the target detail value and the target hash value fails.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the duplicate data detection method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the duplicate data detection method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Service file processing method and device

    CN113590423A

  • Repeated data judgment method

    CN114064621A

  • Data duplication detection in an in memory data grid (IMDG)

    US20150254266A1