Request processing method, device, electronic device and storage medium

Generate the current sequence through the key parameters of the request data encoding the request data, solving the problem of inefficient repeated request detection and achieving efficient repeated request detection and system resource optimization.

CN118861085BActive Publication Date: 2025-08-22ZHEJIANG GEELY HLDG GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411344834.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-08-22
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The detection efficiency of repeated requests in the prior art is inefficient, resulting in waste of server resources and degradation of system performance.

Method used

By extracting key parameters from the requested data, generating the current sequence using DNA sequence encoding, and comparing it with the historical sequence in the database, quickly detecting whether the requested data is duplicated.

Benefits of technology

It improves the detection efficiency of repeated requests, reduces the use of system computing resources, and enhances the stability and response speed of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118861085B_ABST
    Figure CN118861085B_ABST
Patent Text Reader

Abstract

The present application provides a request processing method, device, electronic device and storage medium, the request processing method comprising: receiving request data, the request data comprising multiple key parameters; extracting multiple key parameters from the request data; encoding the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data; comparing the current sequence with a historical sequence stored in a database; if there is a historical sequence identical to the current sequence, determining that the request corresponding to the request data is repeated. The request processing method provided by the present application encodes the received request data to obtain a current sequence corresponding to the request data. It only needs to compare the current sequence with the historical sequence stored in the database to detect whether the request data is repeated, thereby reducing the number of retrieval and comparison times, greatly speeding up the comparison process of repeated requests and greatly improving the detection efficiency of repeated requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a request processing method, device, electronic device and storage medium. Background Art

[0002] When using electronic devices, if there is a network delay or device freeze, users often repeatedly click the same button and submit the same request, causing the server to receive multiple duplicate requests. In addition, malicious attacks can also cause the server to receive duplicate requests. In traditional server-side interface management, the system needs to detect duplicate requests and perform corresponding processing on the duplicate requests. However, in related technologies, various solutions to solve the problem of duplicate submissions all have the problem of low efficiency in detecting duplicate requests.

[0003] Therefore, it is necessary to provide a technical solution to solve the above technical problems. Summary of the Invention

[0004] The present application provides a request processing method, device, electronic device and storage medium, which can improve the detection efficiency of repeated requests and to a certain extent solve the problem of low detection efficiency of repeated requests in the prior art.

[0005] In a first aspect, the present application provides a request processing method, comprising:

[0006] receiving request data, wherein the request data includes a plurality of key parameters;

[0007] extracting the multiple key parameters from the request data;

[0008] Encoding the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data; wherein the current sequence is a string sequence related to the DNA sequence obtained by encoding the DNA sequence;

[0009] Comparing the current sequence with historical sequences stored in a database;

[0010] If the historical sequence that is the same as the current sequence exists, it is determined that the request corresponding to the request data is repeated.

[0011] Optionally, encoding the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data includes:

[0012] Performing hash processing on each of the multiple key parameters to obtain multiple hash values ​​corresponding to each of the multiple key parameters;

[0013] Mapping each of the multiple hash values ​​to a preset character according to a preset rule to obtain a plurality of character strings corresponding to each of the multiple hash values;

[0014] Each character string in the plurality of character strings is arranged in a preset order to obtain a current sequence corresponding to the request data.

[0015] Optionally, mapping each of the multiple hash values ​​to a preset character according to a preset rule to obtain multiple character strings corresponding to each of the multiple hash values ​​includes:

[0016] Each fixed bit number of each hash value in the multiple hash values ​​is mapped to a preset character to obtain multiple character strings corresponding to each hash value in the multiple hash values; wherein each character string in the multiple character strings includes multiple preset characters.

[0017] Optionally, the preset characters include a first character, a second character, a third character, and a fourth character; and mapping each fixed bit number of each hash value in the multiple hash values ​​to a preset character to obtain multiple character strings corresponding to each hash value in the multiple hash values ​​includes:

[0018] Mapping each four bits of each hash value in the multiple hash values ​​to one of the first character, the second character, the third character, and the fourth character to obtain multiple character strings corresponding to each hash value in the multiple hash values; wherein each of the multiple character strings is different, and each character string contains multiple characters from the first character, the second character, the third character, and the fourth character.

[0019] Optionally, the first character, the second character, the third character, and the fourth character are respectively four characters A, T, C, and G of a DNA sequence, and each of the multiple character strings contains multiple characters from the four characters A, T, C, and G; and comparing the current sequence with historical sequences stored in a database includes:

[0020] Using a gene matching engine, the current sequence is compared with historical sequences stored in a database.

[0021] Optionally, encoding the request data based on the multiple key parameters includes:

[0022] performing standardization processing on the multiple key parameters;

[0023] The standardized key parameters are encoded.

[0024] Optionally, after determining that the request corresponding to the request data is repeated, the request processing method further includes:

[0025] Ignore the request data and record the log;

[0026] The client sending the request data is notified that the request corresponding to the request data is repeated.

[0027] Optionally, after comparing the current sequence with the historical sequences stored in the database, the request processing method further includes:

[0028] If the historical sequence identical to the current sequence does not exist, obtaining a feedback result of the request corresponding to the request data having been executed;

[0029] The client that sent the request data is notified that the request corresponding to the request data has been successfully processed.

[0030] Optionally, before obtaining the feedback result of the request corresponding to the request data having been executed, the request processing method further includes:

[0031] The current sequence is stored in the database.

[0032] In a second aspect, the present application provides a request processing device, comprising:

[0033] A receiving module, configured to receive request data, wherein the request data includes a plurality of key parameters;

[0034] An extraction module, configured to extract the multiple key parameters from the request data;

[0035] an encoding module, configured to encode the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data; wherein the current sequence is a string sequence related to the DNA sequence obtained by encoding the DNA sequence;

[0036] A comparison module, configured to compare the current sequence with historical sequences stored in a database;

[0037] The judgment module is configured to determine whether the request corresponding to the request data is repeated when the historical sequence that is the same as the current sequence exists.

[0038] In a third aspect, the present application provides an electronic device comprising at least one processor, wherein the processor is configured to implement the request processing method as described in any one of the first aspects.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the request processing method as described in any one of the first aspects.

[0040] The request processing method, device, electronic device and storage medium provided in the present application extract multiple key parameters from the received request data and encode the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data. By comparing the current sequence with the historical sequences stored in the database, it is possible to detect whether the request data is repeated, thereby reducing the number of retrieval and comparison times, greatly accelerating the comparison process of repeated requests, greatly improving the detection efficiency of repeated requests, and reducing the occupation of system computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0042] Figure 1 The figure shows a scenario diagram in which the request processing method according to an embodiment of the present application is applicable.

[0043] Figure 2 The figure shows a flow chart of a request processing method according to an embodiment of the present application.

[0044] Figure 3 Shown is another flow chart of the request processing method according to an embodiment of the present application.

[0045] Figure 4 Shown is a structural block diagram of a request processing device according to an embodiment of the present application.

[0046] Figure 5 Shown is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] Here, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.

[0048] The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Instead, they are merely examples of apparatus and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims. It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0049] When using electronic devices, when network delays or device freezes occur, users often repeatedly click the same button and submit the same request, causing the server to receive multiple duplicate requests. In addition, malicious attacks can also cause the server to receive duplicate requests. In traditional server-side interface management, the system needs to detect duplicate requests and perform corresponding processing on the duplicate requests. However, various solutions in the prior art have different limitations when solving the problem of duplicate submissions, the most obvious of which is the low efficiency of detecting duplicate requests.

[0050] In order to solve the technical problem of low efficiency in detecting repeated requests in the above-mentioned prior art, the present application provides a request processing method. Figure 1 , Figure 1 The following is a schematic diagram of a scenario in which the request processing method of the embodiment of the present application is applicable. The request processing method of the embodiment of the present application is applicable to a network system. A network system generally includes at least one server and at least one client, and each client is connected to at least one server through a network. For example, in Figure 1 In the example, the network system 10 may include two servers 11 and three clients: a smartphone 12, a laptop computer 13, and a desktop computer 14. The smartphone 12, laptop computer 13, and desktop computer 14 are all connected to at least one server 11 via a network. It should be noted that the network system 10 may also include other clients. For example, the network system 10 may also include an electronic control unit (ECU) in a car. The ECU, also known as the "on-board computer," is used to control the car's driving status and implement various functions on the car. In this case, the various networked components in the car (such as the navigation system) serve as clients of the network system for user interaction.

[0051] Wherein: the server 11 is a backend device relative to the smartphone 12, laptop 13 and desktop computer 14, and can be called the backend of the network system; the smartphone 12, laptop 13 and desktop computer 14 are frontend devices relative to the server 11, and can be called the frontend of the network system. The request processing method of the embodiment of the present application can be applied to the front end, and when the front end detects a duplicate request using the request processing method of the embodiment of the present application, it does not send the request to the back end; the request processing method of the embodiment of the present application can also be applied to the back end, and when the back end detects a duplicate request using the request processing method of the embodiment of the present application, it does not execute the request; the request processing method of the embodiment of the present application can also be applied between the front end and the back end, such as as a plug-in or applet, which is only used to detect whether the request is repeated and to feed back the detection result. The embodiment of the present application does not limit the specific application of the request processing method provided.

[0052] The request processing method of the embodiments of the present application is applied to electronic devices. The electronic devices may include one or more of a server device and a PC (Personal Computer) device. PC devices may include desktop computers, tablet computers, or laptop computers, and server devices may include, but are not limited to, servers. When a PC device can provide the same services as a server device (e.g., running server software on the PC device), it can also function as a server device.

[0053] See also Figure 2 , Figure 2 The figure shows a flow chart of a request processing method according to an embodiment of the present application. The request processing method provided by the embodiment of the present application includes but is not limited to the following steps S101 to S105.

[0054] S101: Receive request data, where the request data includes multiple key parameters.

[0055] When a user submits a request to a server through a client, the client sends request data to the server. This request data typically includes multiple key parameters, such as user ID, operation type, request content, and timestamp. These key parameters are like a person's name, gender, height, weight, date of birth, and other characteristics. These key parameters can be used to distinguish different request data.

[0056] S102: Extract the multiple key parameters from the request data.

[0057] After receiving the request data sent by the client, the multiple key parameters are extracted from the request data, and the request data are characterized by using these key parameters, thereby distinguishing different request data.

[0058] S103: Encode the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data.

[0059] Directly using the extracted key parameters to represent the request data would be too fragmented. Therefore, the request data is encoded based on these key parameters to obtain a unique current sequence corresponding to the request data. By encoding the request data, complex request data is converted into a simple sequence, simplifying the request data and facilitating subsequent use.

[0060] S104: Compare the current sequence with the historical sequences stored in the database.

[0061] Because multiple key parameters are extracted from each received request data and encoded based on these key parameters, each request data corresponds to a sequence. The sequence obtained by encoding the currently received request data is called the "current sequence," and the sequence obtained by encoding previously received request data is called the "historical sequence." Historical sequences are stored in a database. By comparing the current sequence representing the currently received request data with the historical sequence representing previously received request data, the currently received request data can be compared with the previously received request data.

[0062] S105: If there is a historical sequence that is the same as the current sequence, it is determined that the request corresponding to the request data is repeated.

[0063] If there is a historical sequence identical to the current sequence in the database, it means that there is previously received request data identical to the currently received request data, that is, the currently received request data is repeated, and it is determined that the request corresponding to the currently received request data is repeated.

[0064] In the request processing method provided in the embodiment of the present application, a current sequence corresponding to the request data is obtained by extracting multiple key parameters from the received request data and encoding the request data based on the multiple key parameters. It is only necessary to compare the current sequence with the historical sequence stored in the database to detect whether the request data is repeated, that is, to detect whether the request corresponding to the request data is repeated, so that the comparison process of repeated requests is greatly accelerated, the detection efficiency of repeated requests is greatly improved, and the occupation of system computing resources is reduced.

[0065] Please also refer to Figure 2 and Figure 3 , Figure 3 Shown is another flow chart of the request processing method according to an embodiment of the present application.

[0066] In some embodiments, before encoding the request data based on the multiple key parameters in the above step S103 to obtain the current sequence corresponding to the request data, the request processing method of the embodiment of the present application further includes the following steps S201-S202.

[0067] S201: performing standardization processing on the multiple key parameters.

[0068] Because the multiple key parameters extracted directly from the received request data in step S102 are different and the formats of the multiple key parameters are also different, the multiple key parameters can be standardized before encoding them, for example, by unifying the format and removing unnecessary spaces. By standardizing the multiple key parameters, it is easier to subsequently encode the multiple key parameters. It is understandable that other means can also be used to standardize the multiple key parameters. The embodiments of the present application do not limit the specific method of standardizing the multiple key parameters.

[0069] S202: Encode the multiple key parameters after the standardization process.

[0070] In some embodiments, the above step S103 encodes the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data, which specifically includes the following steps S113-S133.

[0071] S113: Perform hash processing on each of the multiple key parameters to obtain multiple hash values ​​corresponding to each of the multiple key parameters.

[0072] A hash algorithm maps a binary string of arbitrary length to a fixed-length binary string. Hashing data involves mapping the data using a hash algorithm. The resulting binary string is the hash value. Hash values ​​can be used for fast data retrieval and matching. Common hash algorithms include MD5 and SHA-256. For a detailed description of hash algorithms, please refer to relevant literature in the field and will not be elaborated here.

[0073] By performing hash processing on a key parameter, a corresponding hash value will be obtained; by performing hash processing on each key parameter of multiple key parameters, multiple hash values ​​corresponding to each key parameter of the multiple key parameters will be obtained.

[0074] S123 : Map each of the multiple hash values ​​to a preset character according to a preset rule to obtain a plurality of character strings corresponding to each of the multiple hash values.

[0075] By mapping a hash value to a preset character according to a preset rule, a corresponding string will be obtained; and by mapping each of multiple hash values ​​to a preset character according to a preset rule, multiple strings corresponding to each of the multiple hash values ​​will be obtained.

[0076] In some embodiments, the preset characters may include a first character, a second character, a third character, and a fourth character; in the above step S123, each hash value in the multiple hash values ​​is mapped to a preset character according to a preset rule to obtain multiple character strings corresponding to each hash value in the multiple hash values, specifically, each fixed bit of each hash value in the multiple hash values ​​is mapped to one of the first character, the second character, the third character, and the fourth character to obtain multiple character strings corresponding to each hash value in the multiple hash values, and each character string in the multiple character strings includes multiple characters among the first character, the second character, the third character, and the fourth character.

[0077] Because each of the multiple hash values ​​is mapped from each of the multiple key parameters, and each key parameter is different, each of the multiple hash values ​​is also different; because each of the multiple character strings is mapped from each of the multiple hash values, and each hash value is different, each of the multiple character strings is different. For example, the first character, the second character, the third character, and the fourth character are the uppercase English letters M, N, P, and Q, respectively. The string obtained by mapping the hash value obtained by hashing the user ID is MNPQ, the string obtained by mapping the hash value obtained by hashing the operation type is NMPQ, the string obtained by mapping the hash value obtained by hashing the request content is PQMN, and the string obtained by mapping the hash value obtained by hashing the timestamp is QPMN. It can be understood that the above is only an example, and the specific mapping rules can be set according to the specific application situation.

[0078] Because according to the permutation and combination rules, there can be 16 permutations and combinations of four preset characters, in some embodiments, when mapping each fixed bit of each hash value in the multiple hash values ​​to one of the first character, the second character, the third character, and the fourth character, and obtaining multiple character strings corresponding to each hash value in the multiple hash values, each four-digit number of each hash value is specifically mapped to one of the first character, the second character, the third character, and the fourth character, corresponding to the four preset characters.

[0079] In this embodiment, the first character, second character, third character, and fourth character are the four base characters A, T, C, and G of a DNA sequence, respectively. Each character string obtained by mapping each four bits of each hash value to one of the four characters A, T, C, and G includes multiple characters from the four characters A, T, C, and G. For example, the character string obtained by mapping the hash value of the user ID after hashing is ATCG, the character string obtained by mapping the hash value of the operation type after hashing is GCTA, the character string obtained by mapping the hash value of the request content after hashing is CGTA, and the character string obtained by mapping the hash value of the timestamp after hashing is TACG.

[0080] S133: Arrange each of the multiple character strings in a preset order to obtain a current sequence corresponding to the request data.

[0081] The preset order can be that the strings obtained after mapping the hash values ​​obtained after the user ID, operation type, request content, and timestamp are ranked first, second, third, and fourth respectively, and the current sequence obtained by arranging the above four strings according to the preset order is ATCG-GCTA-CGTA-TACG. It is understandable that there may be other situations for the preset order. For example, the strings obtained after mapping the hash values ​​obtained after the timestamp, operation type, request content, and user ID are ranked first, second, third, and fourth respectively, and the current sequence obtained by arranging the above four strings according to the preset order is TACG-GCTA-CGTA-ATCG. The embodiment of the present application does not limit the specific rules of the above preset order.

[0082] In some embodiments, the above step S104 compares the current sequence with the historical sequences stored in the database, specifically including the following step S114.

[0083] S114: Using a gene matching engine, the current sequence is compared with the historical sequences stored in the database.

[0084] Because the request data is encoded using the four characters A, T, C, and G of the DNA sequence, resulting in a string sequence related to the DNA sequence, the gene matching engine can be used to directly compare the current sequence with historical sequences. For a detailed description of the gene matching engine, please refer to the relevant literature on the algorithm and will not be elaborated here.

[0085] In this embodiment, by introducing the DNA double helix structure of the gene sequence, the four characters A, T, C, and G are used to encode the request data, and finally a character string sequence is obtained. It is only necessary to compare the current sequence and the historical sequence to detect whether the request data is repeated, which greatly speeds up the comparison process of repeated requests, greatly improves the efficiency of repeated request detection, and reduces the occupation of system computing resources. In addition, by introducing the gene sequence encoding method used in bioinformatics, replacing the traditional character string or numerical hash method, an efficient, accurate and low-resource-consuming repeated request detection solution is provided to meet the needs of large-scale data processing.

[0086] In some embodiments, after using the gene matching engine to compare the current sequence with the historical sequences stored in the database in the above step S114, the request processing method of the embodiment of the present application further includes the following step S203 and steps S301-S303.

[0087] S203: Determine whether there is a historical sequence that is the same as the current sequence.

[0088] S301: If it is determined in step S203 that there is a historical sequence identical to the current sequence, it is determined that the request corresponding to the request data is repeated.

[0089] If there is a historical sequence identical to the current sequence in the database, it means that there is previously received request data identical to the currently received request data, that is, the currently received request data is repeated, and it is determined that the request corresponding to the currently received request data is repeated.

[0090] S302: Ignore the request data and record the log.

[0091] Because the request data currently received corresponds to a duplicate request, indicating that the same request data has been received and executed before, the request corresponding to the currently received request data can be ignored without executing it. At the same time, relevant logs can be recorded after ignoring the request data, thus avoiding data loss and processing failures and enhancing system stability and reliability.

[0092] S303: Notify the client sending the request data that the request corresponding to the request data is repeated.

[0093] Because if the user does not receive feedback after submitting a request, he or she may keep submitting the same request repeatedly. Therefore, after ignoring the repeated request data, it is necessary to give the user feedback on the result. At this time, a notification can be sent to the client that sent the repeated request data to inform it that the request corresponding to the request data is repeated. For example, a text or image prompt can pop up on the client's interactive page. By notifying the client that sent the request data that the request corresponding to the request data is repeated, the user can be given corresponding feedback and the user can be prevented from continuously submitting repeated requests, which further reduces the occupation of system computing resources and avoids the client from overheating and lag caused by repeatedly processing the same request.

[0094] In some embodiments, after using the gene matching engine to compare the current sequence with the historical sequences stored in the database in the above step S114, the request processing method of the embodiment of the present application further includes the following step S203 and steps S401-S403.

[0095] S203: Determine whether there is a historical sequence that is the same as the current sequence.

[0096] S401: If it is determined in step S203 that there is no historical sequence identical to the current sequence, the current sequence is stored in the database.

[0097] If there is no historical sequence identical to the current sequence in the database, it means that there is no previously received request data identical to the currently received request data, which means that the currently received request data is not repeated. At this time, the current sequence corresponding to the currently received request data can be stored in the database so that it can be compared when new request data is received later, so as to determine whether the new request data received later is repeated. Other relevant information can also be recorded together during storage, such as the source IP address of the request data, for subsequent analysis. It is understandable that the source IP address of the request data can also be used as a key parameter of the request data, and can be encoded together with the user ID, operation type, request content, and timestamp. This embodiment of the present application is not limited to this.

[0098] The encoded current sequence can be stored in an efficient database, such as a hash table or other fast-retrieval data structure. By using an efficient hash map and compact data structure to store the encoded current sequence, storage space consumption is reduced. Fast data retrieval is achieved through data structures such as hash tables, reducing system memory usage and computing resource requirements.

[0099] S402: Obtain a feedback result of executing the request corresponding to the request data.

[0100] When it is determined that the currently received request data is not duplicated, it is necessary to execute the request corresponding to the currently received request data. If the request processing method of the embodiment of the present application is applied to a server, then the server itself executes the request corresponding to the currently received request data; if the request processing method of the embodiment of the present application is applied between a server and a client or to a client, then the server executes the request corresponding to the currently received request data. In this case, it is only necessary to obtain the feedback result of the request corresponding to the currently received request data having been executed, without having to personally execute the request corresponding to the currently received request data.

[0101] S403: Notify the client that sent the request data that the request corresponding to the request data is successfully processed.

[0102] In the request processing method provided in the embodiment of the present application, by using the four characters A, T, C, and G of the gene sequence to encode the request data, the gene matching engine is directly used to compare the two string sequences of the current sequence and the historical sequence to detect whether the request is repeated, which greatly accelerates the comparison process of repeated requests and greatly improves the efficiency of repeated request detection; the encoded sequence is stored through efficient hash mapping and compact data structures, which reduces the consumption of storage space, and realizes fast data retrieval through data structures such as hash tables, reducing the system's memory usage and computing resource requirements; when a repeated request is detected, the system can quickly take corresponding conflict resolution measures such as ignoring the repeated request or recording a log. Through the efficient conflict resolution mechanism, data loss and processing failure are avoided, and the stability and reliability of the system are enhanced; through efficient gene encoding and comparison methods, the performance bottleneck of the system in a high-concurrency environment is reduced, data consistency is ensured, the response speed and reliability of the system when processing a large number of concurrent requests are improved, and the efficient operation of the system is ensured; by introducing the gene sequence encoding method in bioinformatics, replacing the traditional string or numerical hash method, an efficient, accurate and low-resource duplicate request detection solution is provided to meet the needs of large-scale data processing.

[0103] This application embodiment also provides a request processing device, see Figure 4 , Figure 4 The figure shows a structural block diagram of a request processing device according to an embodiment of the present application. The request processing device 21 provided in the embodiment of the present application may include:

[0104] Receiving module 211, configured to receive request data, where the request data includes a plurality of key parameters;

[0105] An extraction module 212, configured to extract the multiple key parameters from the request data;

[0106] An encoding module 213, configured to encode the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data;

[0107] an alignment module 214 for aligning the current sequence with historical sequences stored in a database;

[0108] The judgment module 215 is configured to determine whether the request corresponding to the request data is repeated when there is a historical sequence that is the same as the current sequence.

[0109] The implementation process of the functions and effects of each module in the above-mentioned device is specifically detailed in the implementation process of the corresponding steps in the above-mentioned method, which can achieve the same technical effect and will not be repeated here.

[0110] In some embodiments, the encoding module 213 may include:

[0111] a hash submodule, configured to perform hash processing on each of the multiple key parameters to obtain multiple hash values ​​corresponding to each of the multiple key parameters;

[0112] a mapping submodule, configured to map each of the plurality of hash values ​​to a preset character according to a preset rule, to obtain a plurality of character strings corresponding to each of the plurality of hash values;

[0113] The sorting submodule is used to arrange each of the multiple character strings in a preset order to obtain a current sequence corresponding to the request data.

[0114] In some embodiments, when the mapping submodule maps each hash value in the multiple hash values ​​to a preset character according to a preset rule to obtain multiple character strings corresponding to each hash value in the multiple hash values, it is specifically used to map each fixed bit of each hash value in the multiple hash values ​​to a preset character to obtain multiple character strings corresponding to each hash value in the multiple hash values; each of the multiple character strings contains multiple of the preset characters.

[0115] In some embodiments, the preset character includes a first character, a second character, a third character, and a fourth character; when the mapping submodule maps each fixed bit number of each hash value in the multiple hash values ​​to a preset character to obtain multiple character strings corresponding to each hash value in the multiple hash values, the mapping submodule is specifically used to map each four bits of each hash value in the multiple hash values ​​to one character among the first character, the second character, the third character, and the fourth character to obtain multiple character strings corresponding to each hash value in the multiple hash values; each of the multiple character strings is different, and each character string contains multiple characters among the first character, the second character, the third character, and the fourth character.

[0116] In some embodiments, the first character, the second character, the third character, and the fourth character are respectively the four characters A, T, C, and G of the DNA sequence, and each of the multiple character strings contains multiple characters of the four characters A, T, C, and G; when the comparison module 214 compares the current sequence with the historical sequences stored in the database, it is specifically used to use the gene matching engine to compare the current sequence with the historical sequences stored in the database.

[0117] In some embodiments, the determination module 215 is further configured to determine that the request corresponding to the request data is not repeated when there is no historical sequence identical to the current sequence.

[0118] In some embodiments, the request processing device 21 may further include:

[0119] The processing module is configured to perform standardization processing on the multiple key parameters before the encoding module 213 encodes the request data based on the multiple key parameters, so that the encoding module 213 encodes the multiple key parameters after the standardization processing.

[0120] In some embodiments, the processing module is also used to ignore the request data and record a log after the judgment module 215 determines that the request corresponding to the request data is repeated, and to obtain feedback results of the request corresponding to the request data that has been executed after the judgment module 215 determines that the request corresponding to the request data is not repeated.

[0121] In some embodiments, the request processing device 21 may further include:

[0122] a notification module for notifying the client that sent the request data that the request corresponding to the request data is repeated after the processing module ignores the request data and records the log, and for notifying the client that sent the request data that the request corresponding to the request data has been successfully processed after the processing module obtains the feedback result that the request corresponding to the request data has been executed.

[0123] In some embodiments, the request processing device 21 may further include:

[0124] The storage module is configured to store the current sequence in the database before the processing module obtains a feedback result of executing the request corresponding to the request data.

[0125] The present application embodiment also provides an electronic device, which may include the request processing device 21. Figure 5 , Figure 5The electronic device 20 may include one or more processors 22, and the processors 22 are used to implement the above-mentioned request processing method.

[0126] In some embodiments, the electronic device 20 may include a computer-readable storage medium 23, which may store a program that can be called by the processor 22 and may include a non-volatile storage medium. In other embodiments, the electronic device 20 may also include a memory 24 and an interface 25. In other embodiments, the electronic device 20 may also include other hardware depending on the actual application.

[0127] The computer-readable storage medium 23 provided in the embodiment of the present application stores a program thereon, which, when executed by the processor 22, is used to implement the request processing method described above.

[0128] This application may take the form of a computer program product implemented on one or more computer-readable storage media 23 (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media 23 include both permanent and non-permanent, removable and non-removable media, and may be implemented using any method or technology to store information. This information may be computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media 23 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0129] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

[0130] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, the phrase "comprises a ..." defining an element does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

Claims

1. A request processing method, characterized in that: include: receiving request data, wherein the request data includes a plurality of key parameters; Extracting the multiple key parameters from the request data; the multiple key parameters include user ID, operation type, request content, and timestamp; Encoding the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data includes: performing hash processing on each of the multiple key parameters to obtain multiple hash values ​​corresponding to each of the multiple key parameters; mapping each of the multiple hash values ​​to preset characters according to a preset rule to obtain multiple character strings corresponding to each of the multiple hash values; the preset characters include a first character, a second character, a third character, and a fourth character; the first character, the second character, the third character, and the fourth character are respectively four characters of a DNA sequence, namely A, T, C, and G, and each of the multiple character strings includes multiple characters of the four characters A, T, C, and G; and arranging each of the multiple character strings in a preset order to obtain a current sequence corresponding to the request data; Using a gene matching engine to compare the current sequence with historical sequences stored in a database; If the historical sequence that is the same as the current sequence exists, it is determined that the request corresponding to the request data is repeated.

2. The request processing method according to claim 1, wherein: Mapping each of the multiple hash values ​​to a preset character according to a preset rule to obtain multiple character strings corresponding to each of the multiple hash values ​​includes: Each fixed bit of each of the hash values ​​is mapped to one of the preset characters to obtain the multiple character strings corresponding to each of the multiple hash values; each of the multiple character strings includes multiple preset characters.

3. The request processing method according to claim 2, wherein: Mapping each fixed bit of each of the hash values ​​to one of the preset characters to obtain the multiple character strings corresponding to each of the multiple hash values ​​includes: Mapping each four bits of each of the hash values ​​to one of the first character, the second character, the third character, and the fourth character to obtain the multiple character strings; each of the multiple character strings is different, and each of the character strings contains multiple characters from the first character, the second character, the third character, and the fourth character.

4. The request processing method according to claim 1, wherein: The encoding of the request data based on the multiple key parameters includes: performing standardization processing on the multiple key parameters; The standardized key parameters are encoded.

5. The request processing method according to claim 1, wherein: After determining that the request corresponding to the request data is repeated, the request processing method further includes: Ignore the request data and record the log; The client sending the request data is notified that the request corresponding to the request data is repeated.

6. The request processing method according to claim 1, wherein: After comparing the current sequence with the historical sequences stored in the database, the request processing method further includes: If the historical sequence identical to the current sequence does not exist, obtaining a feedback result of the request corresponding to the request data having been executed; The client that sent the request data is notified that the request corresponding to the request data has been successfully processed.

7. The request processing method according to claim 6, characterized in that: Before obtaining the feedback result of the request corresponding to the request data having been executed, the request processing method further includes: The current sequence is stored in the database.

8. A request processing device, characterized in that: include: A receiving module, configured to receive request data, wherein the request data includes a plurality of key parameters; An extraction module, configured to extract the multiple key parameters from the request data; the multiple key parameters include user ID, operation type, request content, and timestamp; An encoding module is configured to encode the request data based on the multiple key parameters to obtain a current sequence corresponding to the request data; wherein the encoding module includes: a hash submodule, configured to perform hash processing on each of the multiple key parameters to obtain multiple hash values ​​corresponding to each of the multiple key parameters; a mapping submodule, configured to map each of the multiple hash values ​​to preset characters according to a preset rule to obtain multiple character strings corresponding to each of the multiple hash values; the preset characters include a first character, a second character, a third character, and a fourth character; the first character, the second character, the third character, and the fourth character are respectively the four characters A, T, C, and G of a DNA sequence, and each of the multiple character strings contains multiple characters of the four characters A, T, C, and G; a sorting submodule, configured to arrange each of the multiple character strings in a preset order to obtain a current sequence corresponding to the request data; A comparison module, configured to compare the current sequence with historical sequences stored in a database using a gene matching engine; The judgment module is configured to determine whether the request corresponding to the request data is repeated when the historical sequence that is the same as the current sequence exists.

9. An electronic device, characterized in that: The method comprises one or more processors, wherein the processors are used to implement the request processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that A program is stored thereon, and when the program is executed by a processor, the request processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data request anti-duplication method and device, electronic equipment and storage medium

    CN114860712A

  • Generating names for cloud storage containers

    US20220342571A1