Parameter tampering detection method and device, equipment and storage medium

By splitting the request parameters and converting them into strings to generate a benchmark string, combined with a comparison method for the string to be tested, the problem of low accuracy in request parameter tampering detection in the banking system is solved, and high-precision parameter tampering detection is achieved.

CN120602143APending Publication Date: 2025-09-05INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510731698.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The accuracy of request parameter tampering detection in existing banking systems is low. Network attackers can obtain encryption algorithm codes to launch attacks, resulting in inaccurate detection results.

Method used

The request parameters are split to generate a baseline string, and a test string is generated for the selected parameters returned by the client. The consistency between the baseline string and the test string is compared to determine whether the parameters have been tampered with.

Benefits of technology

This improves the accuracy of request parameter tampering detection in banking systems, avoids the exposure of encryption algorithms, and can detect modified request parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602143A_ABST
    Figure CN120602143A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of financial science and technology, in particular to a parameter tampering detection method and device, equipment and a storage medium, and the method comprises the steps: splitting a request parameter to obtain at least one request parameter object, and carrying out the character conversion of each request parameter object to obtain a reference character string; determining a to-be-tested character string corresponding to the selected parameter returned by the client; and performing tampering detection on the selected parameters based on the reference character string and the to-be-detected character string to obtain a tampering detection result. The method is convenient for improving the detection precision of detecting whether the request parameter is tampered or not in the bank system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a parameter tampering detection method, apparatus, device and storage medium. Background Art

[0002] The banking system consists of a client and a server. When a client wants to exchange data with the server, it must first send a corresponding HTTP (Hypertext Transfer Protocol) request to the server. The HTTP request contains corresponding request parameters. Some network attacks can obtain the information they require by obtaining and modifying the request parameters. Therefore, the server needs to detect the request parameters sent by the client to determine whether the request parameters have been tampered with.

[0003] Currently, the method for detecting request parameters is as follows: the server transmits the optional request parameters to the client, the client encrypts the selected request parameters with the key to obtain ciphertext, and then transmits the ciphertext to the server. The server then compares the request parameters in the ciphertext and determines whether the request parameters have been tampered with based on the comparison results.

[0004] However, the above approach is client-side encryption and server-side decryption, and the encryption algorithm code is easily exposed during client-side encryption. If a network attacker obtains the encryption algorithm code, he or she can encrypt the tampered request parameters according to the encryption algorithm code and transmit them to the server, thereby still achieving the purpose of the network attack. In addition, the network attacker can also modify the request parameters transmitted from the server to the client, and then the client encrypts the modified request parameters and transmits them to the server. The server will judge the request parameters as normal request parameters. It can be seen that the current detection accuracy of whether the request parameters in the banking system have been tampered with is not high. Summary of the Invention

[0005] In order to improve the accuracy of detecting whether request parameters have been tampered with in a banking system, the present application provides a parameter tampering detection method, apparatus, device and storage medium.

[0006] In a first aspect, the present application provides a parameter tampering detection method, comprising:

[0007] Splitting the request parameter to obtain at least one request parameter object, and performing character conversion on each of the request parameter objects to obtain a reference string;

[0008] Determine the string to be tested corresponding to the selected parameter returned by the client;

[0009] The selected parameter is tampered detected based on the reference character string and the character string to be tested to obtain a tamper detection result.

[0010] Through the above implementation, the server side first determines the baseline string corresponding to the request parameter, and then determines the test string corresponding to the selected parameter returned by the client, and then determines whether the request parameter is consistent with the parameter by detecting whether the baseline string is consistent with the test string. In this way, the server side can realize encryption and decryption of the parameters without exposing the encryption algorithm, and even if the network attacker modifies the request parameter, the modified request parameter can be detected; in summary, this application facilitates improving the detection accuracy of whether the request parameter has been tampered with in the banking system.

[0011] Preferably, performing character conversion on each of the request parameter objects to obtain a reference character string includes:

[0012] Encrypt each of the request parameter objects respectively to obtain a request encrypted string corresponding to each of the request parameter objects;

[0013] Based on the preset interception rules, each request encrypted string is intercepted respectively to obtain a request truncated string corresponding to each request encrypted string;

[0014] A reference string is obtained based on each of the request parameter objects and each of the request truncated strings.

[0015] Through the above implementation, the request parameter object is first encrypted, then the request encrypted string is intercepted, and finally a baseline string is composed according to each request encrypted string. This makes it easy to encrypt the entire request parameter and provides a data basis for subsequent detection of whether the request parameters have been tampered with.

[0016] Preferably, obtaining a reference string based on each of the request parameter objects and each of the request truncated strings includes:

[0017] Determine the object serial numbers corresponding to each request parameter object one by one, and obtain a first serial number set;

[0018] The truncated character strings of the requests are concatenated based on the first sequence number set to obtain a reference character string.

[0019] Through the above implementation, the truncated character strings of each request are concatenated according to the order of the object serial numbers in the first serial number set, which facilitates determining the position of the truncated character string of each request in the reference character string.

[0020] Preferably, determining the character string to be tested corresponding to the selected parameter returned by the client includes:

[0021] Split the selected parameters returned by the client to obtain at least one selected parameter object;

[0022] Encrypting each of the selected parameter objects separately to obtain a selected encrypted character string corresponding to each of the selected parameter objects;

[0023] Each selected encrypted string is intercepted based on a preset interception rule to obtain a selected truncated string corresponding to each selected encrypted string;

[0024] Determine the object serial numbers corresponding to the selected parameter objects one by one to obtain a second serial number set;

[0025] The selected truncated character strings are concatenated based on the second sequence number set to obtain a character string to be tested.

[0026] Through the above implementation, the selected parameters returned by the client are encrypted in the same way as the request parameters, and the test string corresponding to the selected parameters is obtained. This makes it easy to compare the test string with the one-to-one corresponding truncated string in the reference string, thereby detecting whether the request parameters have been tampered with. The test string can provide a data basis for detecting whether the request parameters have been tampered with.

[0027] Preferably, the performing tamper detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tamper detection result includes:

[0028] Determining a requested truncated character string and a selected truncated character string having the same object sequence number based on the reference character string and the character string to be tested;

[0029] In response to the fact that the requested truncated character strings corresponding to the same object serial numbers are consistent with the selected truncated character strings, the tampering detection result is that the selected parameters have not been tampered with.

[0030] Through the above implementation, it is determined whether the character string to be tested is consistent with the truncated character strings in the reference character string in a one-to-one correspondence, which facilitates the detection of whether the request parameters are tampered with.

[0031] Preferably, the determining, based on the reference character string and the character string to be tested, the requested truncated character string and the selected truncated character string having the same object sequence number includes:

[0032] Determine the object sequence number of each request parameter object corresponding to the reference string to obtain a first sequence number set;

[0033] Determine the object serial number of each selected parameter object corresponding to the character string to be tested to obtain a second serial number set;

[0034] Determine the same object sequence numbers in the first sequence number set and the second sequence number set to obtain a common object sequence number;

[0035] Determining a requested truncated character string corresponding to the common object sequence number in the reference character string;

[0036] Determine a truncated character string to be tested corresponding to the common object sequence number in the character strings to be tested.

[0037] Through the above implementation, the object serial number of each request parameter object and each selected parameter object is determined, so that when the corresponding truncated strings in the subsequent comparison string and the benchmark string are consistent, the groups of request truncated strings and the truncated strings to be tested for comparison are determined.

[0038] In a second aspect, the present application provides a parameter tampering detection device, comprising:

[0039] A string generation module, configured to split the request parameter to obtain at least one request parameter object, and perform character conversion on each of the request parameter objects to obtain a reference string;

[0040] The string determination module is used to determine the string to be tested corresponding to the selected parameters returned by the client;

[0041] The character string detection module is configured to perform tamper detection on the selected parameter based on the reference character string and the character string to be detected, and obtain a tamper detection result.

[0042] Through the above implementation, the server side first determines the baseline string corresponding to the request parameter, and then determines the test string corresponding to the selected parameter returned by the client, and then determines whether the request parameter is consistent with the parameter by detecting whether the baseline string is consistent with the test string. In this way, the server side can realize encryption and decryption of the parameters without exposing the encryption algorithm, and even if the network attacker modifies the request parameter, the modified request parameter can be detected; in summary, this application facilitates improving the detection accuracy of whether the request parameter has been tampered with in the banking system.

[0043] In a third aspect, the present application provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.

[0044] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned method when executed by a processor.

[0045] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps of any of the above method embodiments when executed by a processor.

[0046] The above-mentioned parameter tampering detection method, device, equipment and storage medium obtain at least one request parameter object by splitting the request parameter, and converting the characters of each request parameter object to obtain a reference string; determining the string to be tested corresponding to the selected parameter returned by the client; and performing tampering detection on the selected parameter based on the reference string and the string to be tested to obtain a tampering detection result. Through the above implementation, the server first determines the reference string corresponding to the request parameter, and then determines the string to be tested corresponding to the selected parameter returned by the client, and then determines whether the reference string is consistent with the string to be tested, thereby determining whether the request parameter is consistent with the parameter. In this way, the server can realize encryption and decryption of the parameters without exposing the encryption algorithm, and even if the network attacker modifies the request parameter, the modified request parameter can be detected. In summary, this application facilitates improving the detection accuracy of whether the request parameter has been tampered with in the banking system.

[0047] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 This is a flow chart of a parameter tampering detection method provided in an embodiment of the present application;

[0050] Figure 2 This is a schematic structural diagram of a parameter tampering detection device provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0052] Figure 4 This is a diagram of the internal structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure.

[0054] It should be noted that the terms "first," "second," and the like in the specification and claims herein and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0055] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" could mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the related objects.

[0056] Example 1

[0057] Figure 1 This is a flow chart of a parameter tampering detection method provided in Example 1 of this application, refer to Figure 1 The method may be performed by a device for performing the method, and the device may be implemented by software and / or hardware. The method includes:

[0058] S110: Split the request parameter to obtain at least one request parameter object, and perform character conversion on each request parameter object to obtain a reference character string.

[0059] The banking system includes a client and a server. Bank staff can process financial business through the client, and the server can provide data services for financial business, such as data query and data storage. When the client needs the server to provide corresponding data services, it needs to first establish a corresponding communication connection with the server, such as an HTTP (Hypertext Transfer Protocol) connection. When establishing the connection, it needs to send a corresponding connection request to the server. The connection request must include corresponding request parameters. For example, request parameters include URL parameters, form fields, JSON data, etc. The request parameters are generated by the server. After the server generates the request parameters, it needs to send the request parameters to the client so that the client can establish a communication connection with the server based on the request parameters.

[0060] Taking a request parameter as an example, in order to prevent the leakage of request parameters, the request parameter needs to be encrypted first. The request parameter contains information of multiple dimensions. For example, the request parameter includes information of dimensions such as request method, request URI, request header parameters (common header, request header, entity header), request body parameters (form data, JSON data, XML data), and authentication parameters. In this embodiment, in order to realize the encryption of request parameters, the request parameter needs to be split according to the information of each dimension of the request parameter, thereby obtaining multiple request parameter objects, each request parameter object corresponding to one dimension of information.

[0061] In addition, each request parameter object needs to be converted to characters later. Character conversion is to use a preset encryption algorithm to encrypt each request parameter object, so as to obtain a reference string corresponding to the request parameter. The reference string is the encryption result of the corresponding request parameter.

[0062] S120: Determine the character string to be tested corresponding to the selected parameters returned by the client.

[0063] Among them, the client can determine the request parameters corresponding to the communication connection to be established, and record the request parameters selected by the client as selected parameters. After the client determines the selected parameters, it needs to send the selected parameters to the server, and the server further calculates the test string corresponding to the selected parameters. It should be noted that the way the server determines the test string is consistent with the steps of determining the above-mentioned benchmark string.

[0064] S130: Perform tamper detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tamper detection result.

[0065] Among them, by comparing whether the baseline string is consistent with the string to be tested, it is possible to determine whether the selected parameters sent by the client are consistent with the request parameters pre-stored in the server. If the baseline string is consistent with the string to be tested, it also means that the selected parameters sent by the client are consistent with the request parameters pre-stored in the server; by comparing whether the baseline string is consistent with the string to be tested, tampering detection of the selected parameters can be achieved; if it is detected that the comparison baseline string is consistent with the string to be tested, the tampering detection result is that the selected parameters have not been tampered with.

[0066] It should be noted that this embodiment splits the request parameters to obtain at least one request parameter object, performs character conversion on each of the request parameter objects to obtain a reference string; determines the string to be tested corresponding to the selected parameter returned by the client; performs tamper detection on the selected parameter based on the reference string and the string to be tested to obtain a tamper detection result. Through the above implementation, the server first determines the reference string corresponding to the request parameter, and then determines the string to be tested corresponding to the selected parameter returned by the client, and then determines whether the reference string is consistent with the string to be tested, thereby determining whether the request parameter is consistent with the parameter. In this way, the server can implement parameter encryption and decryption without exposing the encryption algorithm, and even if a network attacker modifies the request parameter, the modified request parameter can be detected. In summary, this application facilitates improving the detection accuracy of whether the request parameter has been tampered with in the banking system.

[0067] Example 2

[0068] A parameter tampering detection method provided in Example 2 of the present application optimizes the "converting each request parameter object into a reference string" step in Example 1. It should be noted that for portions not described in detail in this example, reference may be made to the descriptions in other examples. The method includes:

[0069] S211. Split the request parameters to obtain at least one request parameter object.

[0070] S212: Encrypt each of the request parameter objects separately to obtain a request encryption string corresponding to each of the request parameter objects.

[0071] In this embodiment, a corresponding encryption algorithm is preset for the request parameter object. The encryption algorithm is used to encrypt the request parameter object and output a character string corresponding to the request parameter object, which is recorded as the request encrypted character string.

[0072] S213 . Intercept each request encrypted string based on a preset interception rule to obtain a request truncated string corresponding to each request encrypted string.

[0073] Among them, a preset interception rule provided in this embodiment is: intercepting the characters between the m-th character and the n-th character in the request encryption string, where the m value and the n value are customized; the interception rule is used to intercept part of the characters in the request encryption string, and the intercepted part of the characters is recorded as the request truncated string.

[0074] S214: Obtain a reference string based on each of the request parameter objects and each of the request truncated strings.

[0075] Among them, there is a corresponding order between the request parameter objects. For example, the first request parameter object split from the request parameter is in the first order, the second request parameter object split from the request parameter is in the second order, and so on; each request parameter object has its corresponding request truncated string; the request truncated strings are spliced ​​in sequence according to the order of the corresponding request parameter objects to obtain a new string composed of the request truncated strings, and the new string is recorded as the baseline string.

[0076] It should be noted that the request parameter object is first encrypted, then the request encrypted string is intercepted, and finally a reference string is composed based on each request encrypted string. This makes it easy to encrypt the entire request parameter and provides a data basis for subsequent detection of whether the request parameters have been tampered with.

[0077] S220: Determine the character string to be tested corresponding to the selected parameter returned by the client.

[0078] S230: Perform tamper detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tamper detection result.

[0079] Example 3

[0080] A parameter tampering detection method is provided in a third embodiment of the present application. This method optimizes the "obtaining a reference string based on each of the request parameter objects and each of the truncated request strings" in the second embodiment. It should be noted that for portions not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0081] S311. Split the request parameters to obtain at least one request parameter object.

[0082] S312: Encrypt each of the request parameter objects respectively to obtain a request encrypted string corresponding to each of the request parameter objects.

[0083] S313 , intercepting each request encrypted string based on a preset interception rule to obtain a request truncated string corresponding to each request encrypted string.

[0084] S314A: Determine the object serial numbers corresponding to the request parameter objects one by one, and obtain a first serial number set.

[0085] Among them, each request parameter object is separated from the request parameters in sequence, and each request parameter object has a corresponding sequence number, which is recorded as the object sequence number; illustratively, the object sequence number of the first request parameter object separated from the request parameters is first, the object sequence number of the second request parameter object separated from the request parameters is second, and so on; the first sequence number set is the set of each object sequence number.

[0086] It should be noted that the truncated character strings of each request are concatenated according to the order of the object serial numbers in the first serial number set, so as to facilitate determination of the position of the truncated character string of each request in the reference character string.

[0087] S314B: Concatenate the truncated character strings of the requests based on the first sequence number set to obtain a reference character string.

[0088] Among them, the first sequence number set is used to reflect the order between the request parameter objects. Since each request parameter object has its own corresponding request truncated string, the first sequence number set can also be used to reflect the order between the request truncated strings. In this embodiment, after obtaining the request truncated strings, it is necessary to further concatenate the request truncated strings in sequence to obtain a reference string. The order of the request truncated strings in the reference string is also the order of the request truncated strings reflected by the first sequence number set.

[0089] S320: Determine the character string to be tested corresponding to the selected parameter returned by the client.

[0090] S330: Perform tamper detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tamper detection result.

[0091] Example 4

[0092] A parameter tampering detection method provided in a fourth embodiment of the present application optimizes the step of "determining a string to be tested corresponding to a selected parameter returned by the client" in the first embodiment. It should be noted that for portions not described in detail in this embodiment, reference may be made to the descriptions in other embodiments. The method includes:

[0093] S410: Split the request parameter to obtain at least one request parameter object, and perform character conversion on each request parameter object to obtain a reference string.

[0094] S421. Split the selected parameters returned by the client to obtain at least one selected parameter object.

[0095] Among them, when the client sends a corresponding communication connection establishment request to the server, there are selected parameters in the request. In this embodiment, similar to splitting the request parameters, the selected parameters are also split according to the information of each dimension contained in the selected parameters, so as to obtain at least one split result corresponding to the selected parameters, and the split result is recorded as the selected parameter object.

[0096] S422: Encrypt each of the selected parameter objects separately to obtain a selected encrypted character string corresponding to each of the selected parameter objects.

[0097] The server still uses the preset encryption algorithm to encrypt each selected parameter object separately, and records the encryption result of the selected parameter object as the selected encrypted string.

[0098] S423 , intercepting each selected encrypted character string based on a preset interception rule to obtain a selected truncated character string corresponding to each selected encrypted character string.

[0099] The preset interception rule is the same as the interception rule for intercepting the requested encrypted character string, and the interception result obtained after intercepting the selected encrypted character string is recorded as the selected truncated character string.

[0100] S424: Determine the object serial numbers corresponding to the selected parameter objects one by one to obtain a second serial number set.

[0101] Among them, when splitting the selected parameters, the selected parameter objects are split according to a certain order, that is, each selected parameter object has its corresponding splitting order, and the splitting order is recorded as the object serial number corresponding to the selected parameter object, and the second serial number set is the set of object serial numbers corresponding to each selected parameter object.

[0102] S425: Concatenate the selected truncated character strings based on the second sequence number set to obtain a character string to be tested.

[0103] The character string to be tested is a new character string obtained by concatenating the selected truncated character strings according to the second sequence number set.

[0104] It should be noted that the selected parameters returned by the client are encrypted in the same way as the request parameters, and the test string corresponding to the selected parameters is obtained. This makes it easy to compare the test string with the one-to-one corresponding truncated string in the benchmark string, thereby detecting whether the request parameters have been tampered with. The test string can provide a data basis for detecting whether the request parameters have been tampered with.

[0105] S430: Perform tamper detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tamper detection result.

[0106] Example 5

[0107] A parameter tampering detection method is provided in a fifth embodiment of the present application. This method optimizes the method of "performing tampering detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tampering detection result" in the first embodiment. It should be noted that for portions not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:

[0108] S510: Split the request parameter to obtain at least one request parameter object, and perform character conversion on each request parameter object to obtain a reference character string.

[0109] S520: Determine the character string to be tested corresponding to the selected parameter returned by the client.

[0110] S531 : Determine a requested truncated character string and a selected truncated character string having the same object sequence number based on the reference character string and the character string to be tested.

[0111] Among them, the benchmark string is composed of each request truncated string, and each request truncated string is generated by a corresponding request parameter object. Since each request parameter object has its corresponding object serial number, each request truncated string in the benchmark string also has its corresponding object serial number; similarly, each selected truncated string in the test string also has its corresponding object serial number; for example, if an object serial number is the same as the object serial number of a selected truncated string and the object serial number of a selected truncated string, it means that the request truncated string and the selected truncated string have the same object serial number.

[0112] S532: In response to the fact that the requested truncated character strings corresponding to the same object serial numbers are consistent with the selected truncated character strings, the tampering detection result is that the selected parameters have not been tampered with.

[0113] Among them, if the requested truncated string and the selected truncated string have the same object serial number, and the requested truncated string and the selected truncated string are subsequently used as a group of objects for comparison during tampering detection; since there are multiple object serial numbers, there will be multiple groups of requested truncated strings and selected truncated strings as objects for comparison; taking one group of requested truncated strings and selected truncated strings as an example, it is determined whether the group of requested truncated strings and the selected truncated strings are consistent, thereby obtaining a corresponding single group judgment result; each group of requested truncated strings and selected truncated characters has its corresponding single group judgment result; if each single group judgment result is that the requested truncated string is consistent with the selected truncated string, it means that the selected parameter has not been tampered with, and the tampering detection result is determined as the selected parameter has not been tampered with.

[0114] It should be noted that determining whether the character string to be tested and the truncated character strings in the reference character string are consistent with each other in one-to-one correspondence facilitates detection of whether the request parameters have been tampered with.

[0115] Example 6

[0116] A parameter tampering detection method provided in Example 6 of the present application optimizes the "determining a requested truncated string and a selected truncated string having the same object sequence number based on the reference string and the string to be tested" in Example 5. It should be noted that for portions not described in detail in this example, reference may be made to the descriptions in other examples. The method includes:

[0117] S610: Split the request parameter to obtain at least one request parameter object, and perform character conversion on each request parameter object to obtain a reference character string.

[0118] S620: Determine the character string to be tested corresponding to the selected parameters returned by the client.

[0119] S631A: Determine the object serial number of each request parameter object corresponding to the reference string to obtain a first serial number set.

[0120] When splitting the base string, the request parameter objects are split out in a corresponding order, that is, each request parameter object has its corresponding splitting order, and the splitting order is recorded as the object serial number of the request parameter object; the first serial number set is the set of object serial numbers of each request parameter object.

[0121] S631B: Determine the object serial number of each selected parameter object corresponding to the character string to be tested, and obtain a second serial number set.

[0122] Among them, when the character string to be tested is split, the selected parameter objects are split according to the corresponding order, that is, each selected parameter object has its corresponding splitting order, and the splitting order is recorded as the object serial number of the selected parameter object; the second serial number set is the set of object serial numbers of each selected parameter object.

[0123] S631C: Determine the same object sequence number in the first sequence number set and the second sequence number set to obtain a common object sequence number.

[0124] For example, the first sequence number set is {1, 2, 3, 4, 5} and the second sequence number set is {1, 2, 3, 4, 5}. Then, the same object sequence numbers contained in the first sequence number set and the second sequence number set are 1, 2, 3, 4, 5; that is, the first sequence number set and the second sequence number set correspond to 5 common object sequence numbers, which are 1, 2, 3, 4, 5 respectively.

[0125] S631D: Determine the requested truncated character string corresponding to the common object sequence number in the reference character string.

[0126] The reference character string is composed of the truncated character strings of the requests in the order reflected by the first sequence number set, and each truncated character string of the requests has its corresponding common object sequence number.

[0127] S631E: Determine the truncated character string to be tested corresponding to the common object sequence number in the character string to be tested.

[0128] The character string to be tested is composed of the truncated character strings to be tested in the order reflected by the second sequence number set, and each truncated character string to be tested has its corresponding common object sequence number.

[0129] It should be noted that the object serial numbers of each request parameter object and each selected parameter object are determined, so that when the corresponding truncated strings in the subsequent comparison string and the benchmark string are consistent, the groups of request truncated strings and the truncated strings to be tested are determined for comparison.

[0130] S632: In response to the fact that the requested truncated character strings corresponding to the same object serial numbers are consistent with the selected truncated character strings, the tampering detection result is that the selected parameters have not been tampered with.

[0131] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0132] Example 7

[0133] Based on the same inventive concept, this embodiment also provides a parameter tampering detection device for implementing the parameter tampering detection method mentioned above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more parameter tampering detection device embodiments provided below can be found in the above limitations of the parameter tampering detection method and will not be repeated here.

[0134] In this embodiment, Figure 2As shown, a parameter tampering detection device is provided, comprising:

[0135] A string generation module, configured to split the request parameter to obtain at least one request parameter object, and perform character conversion on each of the request parameter objects to obtain a reference string;

[0136] The string determination module is used to determine the string to be tested corresponding to the selected parameters returned by the client;

[0137] The character string detection module is configured to perform tamper detection on the selected parameter based on the reference character string and the character string to be detected, and obtain a tamper detection result.

[0138] Each module in the parameter tampering detection device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0139] It should be noted that this embodiment splits the request parameters to obtain at least one request parameter object, performs character conversion on each of the request parameter objects to obtain a reference string; determines the string to be tested corresponding to the selected parameter returned by the client; performs tamper detection on the selected parameter based on the reference string and the string to be tested to obtain a tamper detection result. Through the above implementation, the server first determines the reference string corresponding to the request parameter, and then determines the string to be tested corresponding to the selected parameter returned by the client, and then determines whether the reference string is consistent with the string to be tested, thereby determining whether the request parameter is consistent with the parameter. In this way, the server can implement parameter encryption and decryption without exposing the encryption algorithm, and even if a network attacker modifies the request parameter, the modified request parameter can be detected. In summary, this application facilitates improving the detection accuracy of whether the request parameter has been tampered with in the banking system.

[0140] Example 8

[0141] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a parameter tampering detection method.

[0142] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0143] Embodiment 9

[0144] In this embodiment, a computer readable storage medium is provided. Figure 4 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0145] Example 10

[0146] In this embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

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

[0148] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in the present disclosure may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in each embodiment provided in this disclosure may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc.

[0149] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0150] The above-described embodiments merely represent several implementation methods of the present disclosure. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present disclosure. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present disclosure, all of which fall within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be determined by the appended claims.

Claims

1. A parameter tampering detection method, characterized in that: include: Splitting the request parameter to obtain at least one request parameter object, and performing character conversion on each of the request parameter objects to obtain a reference string; Determine the string to be tested corresponding to the selected parameter returned by the client; The selected parameter is tampered detected based on the reference character string and the character string to be tested to obtain a tampering detection result.

2. The method according to claim 1, characterized in that The step of converting each of the request parameter objects into a reference character string includes: Encrypt each of the request parameter objects respectively to obtain a request encrypted string corresponding to each of the request parameter objects; Based on the preset interception rules, each request encrypted string is intercepted respectively to obtain a request truncated string corresponding to each request encrypted string; A reference string is obtained based on each of the request parameter objects and each of the request truncated strings.

3. The method according to claim 2, characterized in that The obtaining of a reference string based on each of the request parameter objects and each of the request truncated strings includes: Determine the object serial numbers corresponding to each request parameter object one by one to obtain a first serial number set; The truncated character strings of the requests are concatenated based on the first sequence number set to obtain a reference character string.

4. The method according to claim 1, wherein Determining the character string to be tested corresponding to the selected parameter returned by the client includes: Split the selected parameters returned by the client to obtain at least one selected parameter object; Encrypting each of the selected parameter objects separately to obtain a selected encrypted character string corresponding to each of the selected parameter objects; Each selected encrypted string is intercepted based on a preset interception rule to obtain a selected truncated string corresponding to each selected encrypted string; Determine the object serial numbers corresponding to the selected parameter objects one by one to obtain a second serial number set; The selected truncated character strings are concatenated based on the second sequence number set to obtain a character string to be tested.

5. The method according to claim 1, wherein The performing tamper detection on the selected parameter based on the reference character string and the character string to be tested to obtain a tamper detection result includes: Determining a requested truncated character string and a selected truncated character string having the same object sequence number based on the reference character string and the character string to be tested; In response to the fact that the requested truncated character strings corresponding to the same object serial numbers are consistent with the selected truncated character strings, the tampering detection result is that the selected parameters have not been tampered with.

6. The method according to claim 5, characterized in that The determining, based on the reference character string and the character string to be tested, the requested truncated character string and the selected truncated character string having the same object sequence number includes: Determine the object sequence number of each request parameter object corresponding to the reference string to obtain a first sequence number set; Determine the object serial number of each selected parameter object corresponding to the character string to be tested to obtain a second serial number set; Determine the same object sequence numbers in the first sequence number set and the second sequence number set to obtain a common object sequence number; Determining a requested truncated character string corresponding to the common object sequence number in the reference character string; Determine a truncated character string to be tested corresponding to the common object sequence number in the character strings to be tested.

7. A parameter tampering detection device, characterized in that: The device comprises: A string generation module, configured to split the request parameter to obtain at least one request parameter object, and perform character conversion on each of the request parameter objects to obtain a reference string; The string determination module is used to determine the string to be tested corresponding to the selected parameters returned by the client; The character string detection module is configured to perform tamper detection on the selected parameter based on the reference character string and the character string to be detected, and obtain a tamper detection result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.