Method and device for preventing repeated submission, electronic equipment and computer storage medium
By generating unique fingerprints of user behavior requests and analyzing them using machine learning models, the problem of duplicate request submissions in distributed systems is solved, improving identification efficiency and accuracy, and reducing resource waste and data inconsistency risks.
Patent Information
- Application Number
- CN202511724265.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-23
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies cannot effectively handle complex and ever-changing repeated submission requests in distributed systems, leading to serious consequences such as resource waste and data inconsistency.
By generating unique fingerprints of user behavior requests and analyzing them using a pre-trained machine learning model, duplicate request submissions can be identified. This method includes standardizing request parameters, generating timestamp hashes and business scenario labels, and combining dynamic time windows and Bloom filters for caching and persistence.
It improves the efficiency and accuracy of identifying duplicate requests, and reduces the risk of wasted system resources and data inconsistency.
Smart Images

Figure CN121531034A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and computer storage medium for preventing duplicate submissions. Background Technology
[0002] In distributed systems, duplicate request submissions frequently occur due to network latency, user errors, system failures, and other reasons. This not only wastes system resources and reduces system performance, but can also lead to serious consequences such as data inconsistency.
[0003] Currently, traditional methods for preventing duplicate submissions are ineffective in terms of accuracy, performance, and business scalability when faced with complex and ever-changing request scenarios, and cannot effectively cope with various potential duplicate submission situations. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, electronic device and computer storage medium for preventing duplicate submissions, in order to solve the problem that the prior art cannot effectively deal with various potential duplicate submission situations.
[0005] The first aspect of this invention provides a method for preventing duplicate submissions, comprising:
[0006] Receive user behavior requests;
[0007] Generate a unique fingerprint of the user behavior request based on the request parameters of the user behavior request;
[0008] The unique fingerprint of the user behavior request is input into the analysis model, and the analysis result is output; wherein, the analysis result indicates whether the user behavior request is submitted repeatedly; the analysis model is trained on the machine learning model by the training sample set; the training sample set includes at least one training sample data; the training sample data includes historical request data and the annotation information corresponding to the historical request data; the annotation information indicates whether the historical request data is a repeated submission request.
[0009] Optionally, generating a unique fingerprint of the user behavior request based on the request parameters of the user behavior request includes:
[0010] The request parameters of the user behavior request are standardized to obtain a standard string;
[0011] Obtain the user's identity information and device information;
[0012] Generate a timestamp hash value based on the user's identity information, the user's device information, and the current timestamp;
[0013] The business scenario tag of the user behavior request is determined based on the path in the Uniform Resource Locator of the user behavior request.
[0014] A unique fingerprint of the user behavior request is generated based on the standard string, the timestamp hash value, and the business scenario tag of the user behavior request.
[0015] Optionally, the training method for the analysis model includes:
[0016] Construct a training sample set;
[0017] Generate a unique fingerprint of the historical request data based on the historical request data;
[0018] The unique fingerprint of the historical request data is extracted to obtain the unique fingerprint features of the historical request data.
[0019] The unique fingerprint features of the historical request data are input into the machine learning model, and the predicted results of the historical request data are output.
[0020] The parameters of the machine learning model are adjusted based on the prediction results and annotation information of the historical request data until the preset convergence condition is met, and the adjusted machine learning model is used as the analysis model.
[0021] Optionally, the method for preventing duplicate submissions further includes:
[0022] Based on the business type corresponding to the user behavior request, set a threshold for the anti-duplicate submission time.
[0023] A dynamic time window is generated based on the threshold for preventing duplicate submissions and the dynamic sliding window algorithm.
[0024] Optionally, the method for preventing duplicate submissions further includes:
[0025] Intercepting short-term high-frequency requests; wherein, if a unique fingerprint of a user behavior request is received within a preset time period that is greater than a threshold number, the user behavior request is considered a short-term high-frequency request.
[0026] If the user behavior request is not a short-term, high-frequency request, then a Bloom filter is used to compress and store the unique fingerprint of the user behavior request.
[0027] If the unique fingerprint of the user behavior request is a key business fingerprint, then the unique fingerprint of the user behavior request will be persisted to the database and a unique index will be established for verification.
[0028] A second aspect of the present invention provides an apparatus for preventing duplicate submissions, comprising:
[0029] The request receiving unit is used to receive user behavior requests;
[0030] A unique fingerprint generation unit is used to generate a unique fingerprint of the user behavior request based on the request parameters of the user behavior request.
[0031] An analysis unit is used to input the unique fingerprint of the user behavior request into an analysis model and output an analysis result; wherein, the analysis result indicates whether the user behavior request is submitted repeatedly; the analysis model is trained on a machine learning model using a training sample set; the training sample set includes at least one training sample data; the training sample data includes historical request data and annotation information corresponding to the historical request data; the annotation information indicates whether the historical request data is a repeated submission request.
[0032] Optionally, the unique fingerprint generation unit includes:
[0033] A standardization processing unit is used to standardize the request parameters of the user behavior request to obtain a standard string;
[0034] The information acquisition unit is used to acquire the user's identity information and device information;
[0035] The timestamp hash value generation unit is used to generate a timestamp hash value based on the user's identity information, the user's device information, and the current timestamp;
[0036] The business scenario tag determination unit is used to determine the business scenario tag of the user behavior request based on the path in the Uniform Resource Locator of the user behavior request.
[0037] The unique fingerprint generation subunit is used to generate a unique fingerprint of the user behavior request based on the standard string, the timestamp hash value, and the business scenario label of the user behavior request.
[0038] Optionally, the training unit of the analysis model includes:
[0039] Training sample set construction unit, used to construct the training sample set;
[0040] The preprocessing unit is used to generate a unique fingerprint of the historical request data based on the historical request data;
[0041] The feature extraction unit is used to extract features from the unique fingerprint of the historical request data to obtain the unique fingerprint features of the historical request data.
[0042] The prediction unit is used to input the unique fingerprint features of the historical request data into the machine learning model and output the prediction result of the historical request data.
[0043] The adjustment unit is used to adjust the parameters of the machine learning model based on the prediction results and the annotation information of the historical request data until a preset convergence condition is reached, and then use the adjusted machine learning model as the analysis model.
[0044] Optionally, the device for preventing duplicate submissions further includes:
[0045] The threshold setting unit is used to set a threshold for the anti-duplicate submission time according to the business type corresponding to the user behavior request;
[0046] The dynamic time window generation unit is used to generate a dynamic time window based on the threshold of the anti-duplicate submission time and the dynamic sliding window algorithm.
[0047] Optionally, the device for preventing duplicate submissions further includes:
[0048] An interception unit is used to intercept short-term high-frequency requests; wherein, if a unique fingerprint of a user behavior request is received within a preset time period that is greater than a threshold number, the user behavior request is regarded as a short-term high-frequency request.
[0049] A compressed storage unit is used to compress and store the unique fingerprint of the user behavior request using a Bloom filter if the user behavior request is not a short-term, high-frequency request.
[0050] A persistent storage unit is used to persist the unique fingerprint of the user behavior request to the database and establish a unique index for verification if the unique fingerprint of the user behavior request is a key business fingerprint.
[0051] A third aspect of the present invention provides an electronic device, comprising:
[0052] One or more processors;
[0053] A storage device on which one or more programs are stored;
[0054] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for preventing duplicate submissions as described in any of the first aspects.
[0055] A fourth aspect of the present invention provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for preventing duplicate submissions as described in any one of the first aspects.
[0056] As can be seen from the above solutions, the present invention provides a method, apparatus, electronic device, and computer storage medium for preventing duplicate submissions. After receiving a user behavior request, a unique fingerprint of the user behavior request is generated based on the request parameters of the user behavior request. Then, a pre-trained analysis model is used to analyze and identify the unique fingerprint of the user behavior request to generate an analysis result. The analysis result indicates whether the user behavior request has been submitted repeatedly, effectively improving the efficiency and accuracy of identifying duplicate submission requests. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0058] Figure 1 A detailed flowchart of a method for preventing duplicate submissions provided in an embodiment of the present invention;
[0059] Figure 2 A flowchart illustrating a method for generating a unique fingerprint of a user behavior request, as provided in another embodiment of the present invention;
[0060] Figure 3 A flowchart illustrating a training method for an analysis model, as provided in another embodiment of the present invention;
[0061] Figure 4 A flowchart illustrating a method for preventing duplicate submissions according to another embodiment of the present invention;
[0062] Figure 5 A schematic diagram of an anti-duplicate submission device provided for another embodiment of the present invention;
[0063] Figure 6 This is a schematic diagram of an electronic device for implementing a method to prevent duplicate submissions, as provided in another embodiment of the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0066] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this invention are all information and data authorized by the user or fully authorized by all parties.
[0067] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0068] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0069] This invention provides a method for preventing duplicate submissions, such as... Figure 1 As shown, the specific steps include:
[0070] S101, Receive user behavior request.
[0071] It should be noted that the user behavior requests in the application scenarios of this invention include various user behavior requests in distributed systems, such as: order placement requests, payment requests, and return requests in e-commerce systems; comment submission requests, like requests, and message sending requests in social networks; form submission requests and file upload requests in enterprise systems, etc., without limitation here.
[0072] It should be noted that user behavior requests typically include parameters such as user ID, product ID, quantity, amount, timestamp, etc., and there are no restrictions on storage. These requests are prone to duplicate submissions due to network latency or user error.
[0073] S102. Generate a unique fingerprint of the user behavior request based on the request parameters of the user behavior request.
[0074] The unique fingerprint refers to extracting feature information from multiple perspectives, such as the request URL, request parameters, request header information, user identity information, device information, and request time. Then, a specific algorithm is used to fuse and calculate these features to generate a unique fingerprint of the user's behavior request. Like a human fingerprint, the unique fingerprint of a user's behavior request can uniquely identify a request. By comparing fingerprints, it is possible to determine whether a request is duplicated. Compared to the single-dimensional judgment in existing technologies, this approach can more comprehensively and accurately identify duplicate request submissions.
[0075] Optionally, in another embodiment of the present invention, one implementation of step S102 is as follows: Figure 2 As shown, it includes:
[0076] S201. Standardize the request parameters of the user behavior request to obtain a standard string.
[0077] In the practical application of this invention, the standardization of request parameters for user behavior requests can be achieved, but is not limited to, using JSON standardization: first, the request parameters (such as key-value pairs) are sorted alphabetically, and then converted into a standard JSON string. For example, if the request parameters are {"user":"abc","item":"123"}, after sorting, the string {"item":"123","user":"abc"} is generated. This avoids fingerprint differences caused by inconsistent parameter order, and is not limited here.
[0078] S202. Obtain the user's identity information and device information.
[0079] The identity information includes, but is not limited to, the user ID, and the device information includes, but is not limited to, the device's unique identifier.
[0080] S203. Generate a timestamp hash value based on the user's identity information, the user's device information, and the current timestamp.
[0081] In practical applications of this invention, the user identifier, device information, and current request timestamp (accurate to milliseconds) can be combined into a string, such as "User ID + Device ID + Timestamp". Then, a timestamp hash value is generated from this string using a hash algorithm (such as MD5). It is understood that the addition of the timestamp ensures the timeliness of the fingerprint.
[0082] S204. Determine the business scenario label of the user behavior request based on the path in the Uniform Resource Locator (URL) of the user behavior request.
[0083] Specifically, each request is tagged with a business scenario (such as "payment" or "comment"). These tags are derived from system configuration or request path analysis. For example, the path is extracted from the request URL (e.g., " / api / payment" is marked as a payment scenario). These tags are used to differentiate anti-duplicate strategies.
[0084] S205. Generate a unique fingerprint for the user behavior request based on the standard string, timestamp hash value, and business scenario label of the user behavior request.
[0085] Specifically, the final fingerprint is generated by performing bitwise operations on the standard string, timestamp hash value, and business scenario tag of the user behavior request. This can be done, but is not limited to, using XOR operations to calculate the standard string and timestamp hash value. Then, the business tag is stored as metadata, not directly involved in the computation but used for AI decision-making.
[0086] The fingerprint length can be fixed at 256 bits to ensure the uniqueness of the fingerprint for each user's action request.
[0087] Optionally, in another embodiment of the present invention, one implementation of the method for preventing duplicate submissions further includes:
[0088] Based on the business type corresponding to the user behavior request, set a threshold for the anti-duplicate submission time; based on the anti-duplicate submission time threshold and the dynamic sliding window algorithm, generate a dynamic time window.
[0089] For example, for payment requests, the threshold T for preventing duplicate submissions is set to 5 seconds (because payment requests require a fast response); for comment requests, T is set to 60 seconds (tolerating longer delays), and so on. No specific limit is imposed here. The system pre-defines a mapping table between business types and basic thresholds, and automatically adjusts T by analyzing historical request frequencies through an analysis model. For example, if a certain type of request occurs frequently within a short period, the analysis model may suggest shortening T to improve accuracy.
[0090] In the specific implementation of this invention, a dynamic time window is generated by combining the threshold T for preventing duplicate submissions and the sliding window algorithm. The sliding window algorithm divides time into continuous segments, each of length T, and the window slides with the request time. Specifically, for each request, the starting point of the window containing its timestamp is calculated (e.g., the current timestamp divided by an integer multiple of T, multiplied by T), and the set of request fingerprints within that window (from the starting point to the current time) is checked. The window size T can be dynamically adjusted according to network latency; for example, when the average latency increases, T is appropriately increased to avoid misjudgments.
[0091] This invention uses a dynamic time window to ensure that anti-duplicate checks only target the relevant time period, thus reducing memory usage.
[0092] S103. Input the unique fingerprint of the user behavior request into the analysis model and output the analysis results.
[0093] The analysis results determine whether a user's request is submitted repeatedly. The analysis model is trained on a machine learning model using a training sample set. The training sample set includes at least one training sample data. The training sample data includes historical request data and corresponding annotation information. The annotation information indicates whether the historical request data is a repeated submission.
[0094] In the practical application of this invention, the annotation information can be manually or based on rules to label the category of the fingerprint (e.g., 0 indicates normal, 1 indicates duplicate), and there is no limitation here.
[0095] It should be noted that the machine learning model in this invention can be selected from appropriate classification algorithms (such as support vector machines, decision trees, etc.) or deep learning models (such as convolutional neural networks, recurrent neural networks, etc.), and no limitation is made here.
[0096] Optionally, in another embodiment of the present invention, one implementation of the training method for the analysis model is as follows: Figure 3 As shown, it includes:
[0097] S301. Construct a training sample set.
[0098] In the practical application of this invention, a large amount of historical request data can be collected, including data samples of normal requests and repeated submissions. Data sources include system logs, user behavior records, etc., which are not limited here.
[0099] S302. Generate a unique fingerprint of the historical request data based on the historical request data.
[0100] It should be noted that the specific implementation of step S302 can be referred to the implementation of step S102, and will not be repeated here.
[0101] S303. Extract features from the unique fingerprint of the historical request data to obtain the unique fingerprint features of the historical request data.
[0102] In the practical application of this invention, the method for extracting features from the unique fingerprint of historical request data can be, but is not limited to, extracting time features or encoding business tags as numerical values; no limitation is made here.
[0103] S304. Input the unique fingerprint features of the historical request data into the machine learning model, and output the prediction results of the historical request data.
[0104] S305. Based on the prediction results and annotation information of historical request data, adjust the parameters of the machine learning model until the preset convergence condition is met, and use the adjusted machine learning model as the analysis model.
[0105] In the practical application of this invention, the error between the prediction result of the historical request data and the labeled information of the historical request data (such as cross-entropy loss) is first calculated. Then, the model parameters (such as neural network weights) are adjusted using the gradient descent algorithm to minimize the error. The model is trained until the preset convergence condition is met (such as the error being lower than the threshold or the number of iterations being exceeded). Finally, the adjusted machine learning model is used as the analysis model.
[0106] In the actual operation of this invention, new user behavior request data is collected in real time and input into the trained model (analysis model) for prediction and verification. If the model's prediction results do not match the actual situation, the model is retrained in a timely manner to update and optimize it. Specifically, an online learning approach can be adopted, where gradients are calculated in real time and parameters are fine-tuned when new request data arrives, allowing the model to adapt to changes.
[0107] In practical applications of this invention, model predictions (such as "repetition") can be compared with subsequent actual user behavior. For example, if a request is marked as a repeat but the user submits it again, it indicates that the prediction may be incorrect. This ensures a closed-loop feedback system and reduces human intervention.
[0108] In practical applications of this invention, the analysis model can also identify abnormal submission patterns (such as multiple similar requests from the same user within a short period of time) and trigger asynchronous risk control processes. Combining user behavior patterns (such as login history and IP address) enhances the accuracy of risk assessment.
[0109] Optionally, in another embodiment of the present invention, one implementation of the method for preventing duplicate submissions is as follows: Figure 4 As shown, it also includes a three-level caching architecture:
[0110] S401, intercept short-term, high-frequency requests.
[0111] If a unique fingerprint of a user behavior request is received within a preset time period that exceeds a threshold number, then the user behavior request is considered a short-term, high-frequency request.
[0112] In the practical application of this invention, the Least Recently Used (LRU) algorithm can be used, but is not limited to, to cache short-term, high-frequency request fingerprints locally in the application. The expiration time is short (e.g., 1 second), reducing network overhead, and serving as the first-level cache.
[0113] S402. If the user behavior request is not a short-term, high-frequency request, then use a Bloom filter to compress and store the unique fingerprint of the user behavior request.
[0114] In the practical application of this invention, a false positive rate of 0.1% is allowed to balance memory usage and performance. Specifically, the unique fingerprint of a user behavior request is first queried through a Bloom filter; if it does not exist, the request is allowed directly; otherwise, further verification is performed.
[0115] Specifically, a Redis+Bloom filter is used as the second-level cache.
[0116] S403. If the unique fingerprint of a user behavior request is a key business fingerprint, then persist the unique fingerprint of the user behavior request to the database and establish a unique index for verification.
[0117] For example, for critical business operations (such as payments), fingerprints are persisted to a database (such as MySQL), and a unique index is established for fallback verification to ensure data consistency.
[0118] Specifically, a database (such as MySQL) is used as a third-level cache.
[0119] In practical applications of this invention, cross-node lock synchronization can also be achieved through Zookeeper to ensure atomic operations under high concurrency. When multiple nodes process the same fingerprint simultaneously, Zookeeper distributed locks are used to ensure atomic operations and prevent concurrent misjudgments.
[0120] As can be seen from the above scheme, the present invention provides a method for preventing duplicate submissions. After receiving a user behavior request, a unique fingerprint of the user behavior request is generated based on the request parameters of the user behavior request. Then, a pre-trained analysis model is used to analyze and identify the unique fingerprint of the user behavior request to generate an analysis result. The analysis result indicates whether the user behavior request has been submitted repeatedly, effectively improving the efficiency and accuracy of identifying duplicate submission requests.
[0121] Another embodiment of the present invention provides a device for preventing duplicate submissions, such as... Figure 5 As shown, it specifically includes:
[0122] The request receiving unit 501 is used to receive user behavior requests.
[0123] The unique fingerprint generation unit 502 is used to generate a unique fingerprint of the user behavior request based on the request parameters of the user behavior request.
[0124] Optionally, in another embodiment of the present invention, one implementation of the unique fingerprint generation unit 502 includes:
[0125] The standardization processing unit is used to standardize the request parameters of user behavior requests to obtain a standard string.
[0126] The information acquisition unit is used to acquire the user's identity information and device information.
[0127] The timestamp hash value generation unit is used to generate timestamp hash values based on the user's identity information, the user's device information, and the current timestamp.
[0128] The business scenario tag determination unit is used to determine the business scenario tag of a user behavior request based on the path in the Uniform Resource Locator (URL) of the user behavior request.
[0129] The unique fingerprint generation subunit is used to generate a unique fingerprint for a user behavior request based on a standard string, a timestamp hash value, and a business scenario label for the user behavior request.
[0130] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.
[0131] Analysis unit 503 is used to input the unique fingerprint of user behavior request into the analysis model and output the analysis results.
[0132] The analysis results determine whether a user's request is submitted repeatedly. The analysis model is trained on a machine learning model using a training sample set. The training sample set includes at least one training sample data. The training sample data includes historical request data and corresponding annotation information. The annotation information indicates whether the historical request data is a repeated submission.
[0133] For details on the specific operation of the units disclosed in the above embodiments of the present invention, please refer to the corresponding method embodiments, such as... Figure 1 As shown, it will not be elaborated further here.
[0134] Optionally, in another embodiment of the present invention, one implementation of the training unit for the analysis model includes:
[0135] Training sample set construction unit, used to construct the training sample set.
[0136] The preprocessing unit is used to generate a unique fingerprint of the historical request data based on the historical request data.
[0137] The feature extraction unit is used to extract features from the unique fingerprint of the historical request data to obtain the unique fingerprint features of the historical request data.
[0138] The prediction unit is used to input the unique fingerprint features of historical request data into the machine learning model and output the prediction results of the historical request data.
[0139] The adjustment unit is used to adjust the parameters of the machine learning model based on the prediction results and annotation information of the historical request data until the preset convergence condition is met, and the adjusted machine learning model is used as the analysis model.
[0140] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.
[0141] Optionally, in another embodiment of the present invention, one implementation of the device for preventing duplicate submissions further includes:
[0142] The threshold setting unit is used to set the threshold for preventing duplicate submissions based on the business type corresponding to the user's behavior request.
[0143] The dynamic time window generation unit is used to generate dynamic time windows based on the threshold for preventing duplicate submissions and a dynamic sliding window algorithm.
[0144] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.
[0145] Optionally, in another embodiment of the present invention, one implementation of the device for preventing duplicate submissions further includes:
[0146] The interception unit is used to intercept short-term, high-frequency requests.
[0147] If a unique fingerprint of a user behavior request is received within a preset time period that exceeds a threshold number, then the user behavior request is considered a short-term, high-frequency request.
[0148] A compressed storage unit is used to compress and store the unique fingerprint of a user behavior request using a Bloom filter if the user behavior request is not a short-term, high-frequency request.
[0149] The persistent storage unit is used to persist the unique fingerprint of the user behavior request to the database and establish a unique index for verification if the unique fingerprint of the user behavior request is a key business fingerprint.
[0150] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.
[0151] As can be seen from the above scheme, the present invention provides a device for preventing duplicate submissions. After receiving a user behavior request, it generates a unique fingerprint of the user behavior request based on the request parameters of the user behavior request. Then, it uses a pre-trained analysis model to analyze and identify the unique fingerprint of the user behavior request to generate an analysis result. The analysis result indicates whether the user behavior request has been submitted repeatedly, effectively improving the efficiency and accuracy of identifying duplicate submission requests.
[0152] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0153] Another embodiment of the present invention provides an electronic device, such as... Figure 6 As shown, it includes:
[0154] One or more processors 601.
[0155] Storage device 602, on which one or more programs are stored.
[0156] When the one or more programs are executed by the one or more processors 601, the one or more processors 601 implement the method for preventing duplicate submissions as described in the above embodiments.
[0157] Another embodiment of the present invention provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for preventing duplicate submissions as described in the above embodiments.
[0158] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0159] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0160] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0161] Another embodiment of the present invention provides a computer program product, which, when executed, is used to perform the above-described method for preventing duplicate submissions.
[0162] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments of the present invention.
[0163] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in this invention is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms for implementing the invention.
[0164] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0165] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention is not limited to the specific combination of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with technical features of the present invention (but not limited to) that have similar functions.
Claims
1. A method for preventing duplicate submissions, characterized in that, include: Receive user behavior requests; Generate a unique fingerprint of the user behavior request based on the request parameters of the user behavior request; The unique fingerprint of the user behavior request is input into the analysis model, and the analysis result is output; wherein, the analysis result is whether the user behavior request is submitted repeatedly; the analysis model is trained by a machine learning model using a training sample set; the training sample set includes at least one training sample data; the training sample data includes historical request data and the annotation information corresponding to the historical request data; The annotation information indicates whether the historical request data is a duplicate submission request.
2. The method for preventing duplicate submissions according to claim 1, characterized in that, The step of generating a unique fingerprint for the user behavior request based on the request parameters of the user behavior request includes: The request parameters of the user behavior request are standardized to obtain a standard string; Obtain the user's identity information and device information; Generate a timestamp hash value based on the user's identity information, the user's device information, and the current timestamp; The business scenario tag of the user behavior request is determined based on the path in the Uniform Resource Locator of the user behavior request. A unique fingerprint of the user behavior request is generated based on the standard string, the timestamp hash value, and the business scenario tag of the user behavior request.
3. The method for preventing duplicate submissions according to claim 1, characterized in that, The training method for the analytical model includes: Construct a training sample set; Generate a unique fingerprint of the historical request data based on the historical request data; The unique fingerprint of the historical request data is extracted to obtain the unique fingerprint features of the historical request data. The unique fingerprint features of the historical request data are input into the machine learning model, and the predicted results of the historical request data are output. The parameters of the machine learning model are adjusted based on the prediction results and annotation information of the historical request data until the preset convergence condition is met, and the adjusted machine learning model is used as the analysis model.
4. The method for preventing duplicate submissions according to claim 1, characterized in that, Also includes: Based on the business type corresponding to the user behavior request, set a threshold for the anti-duplicate submission time. A dynamic time window is generated based on the threshold for preventing duplicate submissions and the dynamic sliding window algorithm.
5. The method for preventing duplicate submissions according to claim 1, characterized in that, Also includes: Intercepting short-term high-frequency requests; wherein, if a unique fingerprint of a user behavior request is received within a preset time period that is greater than a threshold number, the user behavior request is considered a short-term high-frequency request. If the user behavior request is not a short-term, high-frequency request, then a Bloom filter is used to compress and store the unique fingerprint of the user behavior request. If the unique fingerprint of the user behavior request is a key business fingerprint, then the unique fingerprint of the user behavior request will be persisted to the database and a unique index will be established for verification.
6. A device for preventing duplicate submissions, characterized in that, include: The request receiving unit is used to receive user behavior requests; A unique fingerprint generation unit is used to generate a unique fingerprint of the user behavior request based on the request parameters of the user behavior request. An analysis unit is used to input the unique fingerprint of the user behavior request into an analysis model and output an analysis result; wherein, the analysis result is whether the user behavior request is submitted repeatedly; the analysis model is trained on a machine learning model using a training sample set; the training sample set includes at least one training sample data; the training sample data includes historical request data and the annotation information corresponding to the historical request data; The annotation information indicates whether the historical request data is a duplicate submission request.
7. The device for preventing duplicate submissions according to claim 6, characterized in that, The unique fingerprint generation unit includes: A standardization processing unit is used to standardize the request parameters of the user behavior request to obtain a standard string; The information acquisition unit is used to acquire the user's identity information and device information; The timestamp hash value generation unit is used to generate a timestamp hash value based on the user's identity information, the user's device information, and the current timestamp; The business scenario tag determination unit is used to determine the business scenario tag of the user behavior request based on the path in the Uniform Resource Locator of the user behavior request. The unique fingerprint generation subunit is used to generate a unique fingerprint of the user behavior request based on the standard string, the timestamp hash value, and the business scenario label of the user behavior request.
8. The device for preventing duplicate submissions according to claim 6, characterized in that, The training unit of the analysis model includes: Training sample set construction unit, used to construct the training sample set; The preprocessing unit is used to generate a unique fingerprint of the historical request data based on the historical request data; The feature extraction unit is used to extract features from the unique fingerprint of the historical request data to obtain the unique fingerprint features of the historical request data. The prediction unit is used to input the unique fingerprint features of the historical request data into the machine learning model and output the prediction result of the historical request data. The adjustment unit is used to adjust the parameters of the machine learning model based on the prediction results and annotation information of the historical request data until a preset convergence condition is reached, and then use the adjusted machine learning model as the analysis model.
9. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for preventing duplicate submissions as described in any one of claims 1 to 5.
10. A computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the method for preventing duplicate submissions as described in any one of claims 1 to 5.