Security verification method and device, electronic equipment and storage medium

By adopting the security verification method of dynamic rules and dynamic signature algorithms between clients and servers, the problem of security verification of mobile applications in existing technologies is easy to be cracked, and higher security and user experience are achieved.

CN119382911APending Publication Date: 2025-01-28SO-YOUNG INT INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310928282.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, the security verification of mobile applications is easily cracked, and malicious attacks can obtain tokens, resulting in the easy cracking of client applications after release, which poses a major security risk.

Method used

Adopting a security verification method, the client receives the dynamic rules sent by the server, including the specified string and dynamic signature algorithm, calculate the dynamic signature based on these rules, and send it to the server for security verification. The server receives the application request and dynamic signature of the client, calculates the dynamic signature to be verified, and compares whether it is consistent with the dynamic signatures sent by the client.

Benefits of technology

Through the dynamic signature algorithm and the dynamic rules of real -time update, the security of the application and the security of the server data were improved, the system was maliciously requested, and the user experience was improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382911A_ABST
    Figure CN119382911A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of the Internet, and relates to a security verification method and device, electronic equipment and a storage medium. In the method, a client firstly receives a dynamic rule sent by a server; when an application request generated by the application program of the client is obtained, obtaining a request parameter corresponding to the application request; then calculating a dynamic signature based on the specified character string, the dynamic signature algorithm and the request parameter; and finally, the dynamic signature is sent to the server to perform security verification at least based on the dynamic signature, when the dynamic signature of the old version is cracked, the dynamic rule of the new version of the server can be obtained in time, and the generated new dynamic signature can make the dynamic rule of the dynamic signature invalid. The security of the dynamic signature can be ensured, so that the security of the application program and the data security of the server are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] After the mobile application (such as app, etc.) communicates with the server, it can send application requests to perform various online activities, such as logging in to the server, making online comments, watching online videos, obtaining medical beauty plans based on personal face shape online, etc., and the application requests need to be securely verified.

[0003] In related technologies, the client and server agree on the encryption of application requests (such as hashing the parameter key according to certain rules), and then generate a token for interaction. Although this method is simple, it is very easy to be leaked, and malicious attacks can obtain the token. In addition, viewing the server-side code or decompiling the application will also make the encryption invalid, making the client's application version easy to crack after release, posing a great security risk. Summary of the invention

[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a security verification method, device, electronic device and storage medium, so as to achieve security verification while preventing malicious attacks.

[0005] The first aspect of the present application provides a security verification method, which is applied to a client, and the method includes:

[0006] Receiving dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm;

[0007] When obtaining an application request generated by the application program of the client, obtaining request parameters corresponding to the application request;

[0008] Calculate a dynamic signature based on the specified string, the dynamic signature algorithm and the request parameters;

[0009] The dynamic signature is sent to the server for security verification based at least on the dynamic signature.

[0010] A second aspect of the present application provides another security verification method, which is applied to a server, and the method includes:

[0011] Receiving an application request sent by a client and a dynamic signature generated by the client based on a dynamic rule;

[0012] Calculating the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm, and the request parameters in the application request;

[0013] The dynamic signature is compared with the signature to be verified to determine whether they are consistent, and a first verification result is obtained.

[0014] A third aspect of the present application provides a security verification device, applied to a client, the device comprising:

[0015] A rule receiving module, used for receiving dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm;

[0016] An obtaining module, configured to obtain request parameters corresponding to an application request generated by an application program of the client when the application request is obtained;

[0017] A dynamic signature module, used to calculate a dynamic signature based on the specified string, the dynamic signature algorithm and the request parameters;

[0018] The sending module is used to send the dynamic signature to the server for security verification.

[0019] A fourth aspect of the present application provides another security verification device, applied to a server, the device comprising:

[0020] A request receiving module, used to receive an application request sent by a client, and a dynamic signature generated by the client based on a dynamic rule; wherein the dynamic rule is used based on a specified string and a dynamic signature algorithm;

[0021] A dynamic signature verification calculation module, used to calculate the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm and the request parameters in the application request;

[0022] The first comparison module is used to compare the dynamic signature and the signature to be verified to see if they are consistent, and obtain a first verification result.

[0023] A fifth aspect of the present application provides an electronic device, including:

[0024] Processor; and

[0025] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0026] A sixth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method described above.

[0027] The technical solution provided by this application may have the following beneficial effects:

[0028] The client in this application first receives the dynamic rules sent by the server; then when the application request generated by the application of the client is obtained, the request parameters corresponding to the application request are obtained, and then the dynamic signature is calculated based on the specified string, dynamic signature algorithm and the request parameters in the dynamic rule; finally, the dynamic signature is sent to the server, so that the server performs security verification at least based on the dynamic signature. The technical solution provided by this application, the dynamic signature used for security verification is to calculate the specified string and request parameters using the dynamic signature algorithm. Since the processing algorithm of the dynamic signature algorithm is dynamically changing, and the request parameters corresponding to the application requests obtained by different clients are also different, the technical solution provided by the solution of this application can alleviate the situation of malicious requests to a certain extent. In addition, the dynamic rules used to calculate the dynamic signature are changing. When the old version of the dynamic signature is cracked, the new version of the dynamic rules can be issued in time. The generated new dynamic signature can invalidate the dynamic rules of the old dynamic signature, which can ensure the security of the dynamic signature, and then ensure the security of the application and the data security of the server.

[0029] The technical solution of this application can also:

[0030] Since the server can perform rule adjustments and business upgrades in real time, the user side is unaware of it, which greatly improves the user experience.

[0031] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0033] Figure 1 It is a flowchart of a security verification method shown in an embodiment of the present application.

[0034] Figure 2 It is a flow chart of calculating a dynamic signature in a security verification method shown in an embodiment of the present application.

[0035] Figure 3 This is another flowchart of calculating a dynamic signature in the security verification method shown in an embodiment of the present application.

[0036] Figure 4 This is another flow chart of calculating a dynamic signature in the security verification method shown in the embodiment of the present application.

[0037] Figure 5This is another flow chart of a security verification method shown in an embodiment of the present application.

[0038] Figure 6 Another flowchart of a security verification method shown in an embodiment of the present application.

[0039] Figure 7 This is a schematic diagram of the overall process of an embodiment of the present application.

[0040] Figure 8 It is a structural schematic diagram of a security verification device shown in an embodiment of the present application.

[0041] Fig. 9 This is another structural diagram of a security verification device shown in an embodiment of the present application.

[0042] Fig.10 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0044] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0045] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0046] This application can be applied to the security verification of applications in mobile devices, especially in scenarios based on signature verification. The application in this application refers to an application installed in the client, which can be in the form of an app or the like. When the client and the server need to interact with each other for data, such as accessing a web page, making comments, etc., an application request is usually sent to the server to achieve data interaction. If the security of the application request is not guaranteed, it may lead to the signature being cracked and the competing products on the server being captured at will. Therefore, the security of the application needs to be guaranteed, thereby ensuring the data security of the server.

[0047] In response to the above problems, an embodiment of the present application provides a security verification method that can perform security verification using the signature of the application request to ensure the security of the application and the security of the data in the server.

[0048] The technical solutions of the embodiments of the present application are described in detail from the client side and the server side respectively in conjunction with the accompanying drawings.

[0049] Figure 1 It is a flowchart of a security verification method shown in an embodiment of the present application.

[0050] See also Figure 1 In the embodiment of the present application, a security verification method is disclosed, which is applied to a client. In the embodiment of the present application, the client and the server can exchange data, and the client can be a mobile device such as a mobile phone, a tablet computer, or other electronic device that can run an application.

[0051] The security verification method of the embodiment of the present application includes the following steps.

[0052] S101. Receive dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm.

[0053] S102: When an application request generated by an application program of a client is obtained, a request parameter corresponding to the application request is obtained.

[0054] S103: Calculate the dynamic signature specified date based on the specified character string, the dynamic signature algorithm and the request parameters.

[0055] In the embodiment of the present application, when the client application needs to interact with the server for data, an application request can be generated. The application request can be a login request, a data acquisition request, a resource update request, a resource search request, etc., which are not limited here.

[0056] In an embodiment of the present application, after the client application generates an application request, the client functional modules such as the monitoring module, the acquisition module, the public network library, etc. can collect the application request. The application request may include request parameters. The request parameters may be public parameters and / or business parameters. In the application, the public parameters may include but are not limited to one or more of the following parameters: device id, system tag, user id, app version number, app tag id, current request time and other parameters. Business parameters may include different parameters according to different businesses. For example, login parameters may include mobile phone number, password, anti-cheating verification information, etc. Order parameters may include order id, user id, product information, etc.

[0057] In an embodiment of the present application, the dynamic rules can send a request to the server when the application is started to receive the dynamic rules sent by the server, or the server can actively send the dynamic rules when the application is started, or the server can actively send the dynamic rules when the application is running.

[0058] In an application, the process from application startup to shutdown is called a startup process, or a life cycle. In a life cycle, dynamic rules can be actively pulled from the server or passively received during startup or operation. The dynamic rules can include a dynamic signature algorithm that calculates a signature based on a specified string and a specified date. The specified string can be obtained by the server after calculation according to certain encoding rules.

[0059] Exemplarily, the encoding rule may be an encoding rule such as AES or ASE64. The number of characters in the specified string is at least 26, which may be 500 in the application, and the specified string consists of 26 letters. It is understandable that the more characters in the string, the more difficult it is to crack.

[0060] The embodiment of the present application can query the number of strings of the specified string in the calibration table based on the computing power of the client. Since the embodiment of the present application can also calculate the dynamic signature in conjunction with the specified date in the dynamic rule, the number of characters in the specified string can be greater than 31, so that the specified date can be used to determine the characters. Among them, the specified date can be generated by the server according to the system time.

[0061] In the embodiment of the present application, the dynamic rules may also carry a version configuration key value generated based on the application version number, which may be used to subsequently calculate the dynamic signature and / or static signature. The key value of each version of the application may be different, and such a setting may enable the dynamic rules and dynamic signature to be updated in a timely manner after the version of the application is updated. Therefore, even if the dynamic signature or dynamic rule of the old version is cracked, the dynamic signature may be updated through the version configuration key value, which may further improve the security of the application in the client.

[0062] In an embodiment of the present application, the dynamic signature algorithm may be an algorithm for generating a dynamic signature based on a specified string. The specified string may be provided with a flag, which is used to calculate the position of a character in the specified string. The characters determined based on the flag may be used to calculate the dynamic signature using the dynamic signature algorithm.

[0063] It is understandable that the specified string can also be combined with the specified date to determine the characters. Based on the specified date and the subscript position flag, the character position in the specified string can be obtained, thereby obtaining the characters in the specified string, and a dynamic signature is generated by the determined characters. It is understandable that the signature name of the dynamic signature generated by the dynamic rule can be dynamically generated based on the signature value, can be dynamically generated based on the specified date and the specified string, or can be dynamically generated based on the specified string.

[0064] S104: Send the dynamic signature to the server to perform security verification based at least on the dynamic signature.

[0065] In the embodiment of the present application, after the dynamic signature is generated, the dynamic signature can be at least sent to the server so that the server at least verifies the security of the dynamic signature. The server verifies the dynamic signature by calculating the dynamic signature to be verified based on the dynamic rules sent to the client, and then verifies the security of the dynamic signature sent by the client according to whether the dynamic signature to be verified is consistent with the dynamic signature sent by the client.

[0066] It can be seen from the above scheme that the embodiment of the present application uses dynamic rules to generate dynamic signatures. Since the specified string can be updated in real time, the processing algorithm of the dynamic signature algorithm is dynamically changing, and the request parameters corresponding to the application requests obtained by different clients are also different, the dynamic signature calculation is difficult to be cracked. And because the specified string can be updated in real time, the processing algorithm of the dynamic signature algorithm is dynamically changing, even if the previous dynamic rule or dynamic signature is cracked, the latest dynamic rule sent by the server can be received in time to generate a new dynamic signature, making the old signature invalid. Therefore, it can solve the technical problem of most malicious requests or cracking causing the dynamic rules or dynamic signatures to be cracked. In addition, since the gateway layer of the server in the embodiment of the present application can perform the security verification process independently, and the gateway layer belongs to the upper layer of the business, the user side is not sensitive to rule adjustment and business upgrade, so it can greatly improve the user experience.

[0067] The dynamic signature in the embodiment of the present application may include a signature name and a signature value of the dynamic signature. The process of calculating the dynamic signature may be to first calculate the signature name and the signature value of the dynamic signature and then generate the dynamic signature.

[0068] In an embodiment of the present application, calculating a dynamic signature based on a specified string, a dynamic signature algorithm, and request parameters can be implemented in at least three ways.

[0069] The first method is to calculate the signature name and signature value of the dynamic signature based on the specified string and dynamic signature algorithm. The second method is to first calculate the signature value of the dynamic signature based on the specified string and dynamic signature algorithm, and then calculate the signature name of the dynamic signature based on the signature value. The third method is to calculate the signature name and signature value of the dynamic signature based on the specified date in the dynamic rule, the specified string, and the dynamic signature algorithm. The following is a detailed introduction to these three methods.

[0070] See also Figure 2 , Figure 2 It is a flow chart of calculating a dynamic signature in a security verification method shown in an embodiment of the present application.

[0071] This process can be achieved through the following steps.

[0072] S111. Extract the specified character string and its corresponding flag bit in the dynamic rule.

[0073] S112. Calculate the signature name of the dynamic signature based on the specified character string and flag bit.

[0074] S113. Calculate the signature value of the dynamic signature based on the request parameters and the specified character string.

[0075] S114: Generate a dynamic signature using the signature name of the dynamic signature and the signature value of the dynamic signature.

[0076] In this embodiment, the specified string in the dynamic rule and its corresponding flag can be extracted to calculate the signature name of the dynamic signature. The specified string corresponds to the flag, which can be specified by the user on the server side, for example, 3.

[0077] In the application, if the specified string is acedf, the characters of the signature name can be determined based on the flag bit flag. The flag bit can also include the number of values, such as N. If N is 3, the three characters "e, d, f" can be taken from the eth character as the signature name. Alternatively, N characters can be taken from the back to the front, such as the three characters "e, c, a" as the signature name. Alternatively, N characters can be taken from the middle to both sides as the signature name.

[0078] In an embodiment of the present application, the signature value of the dynamic signature is calculated based on the request parameters and the specified string, including: concatenating the parameter name and parameter value of the request parameter to obtain a first concatenated parameter; and calculating the first concatenated parameter using the specified algorithm in the dynamic rule to obtain the signature value of the dynamic signature.

[0079] Among them, the public parameters and business parameters in the request parameters can be spliced ​​into the first spliced ​​parameters. In the application, the request parameters may include the parameter name key and the parameter value value of the request parameters. When calculating the signature value of the dynamic signature, the key and value can be spliced ​​to generate the spliced ​​parameter form-data-str. Then, based on the spliced ​​parameters, the signature value of the dynamic signature is calculated using the MD5 algorithm or other algorithms. For example, the request parameters include: name=john, age=25. When splicing, they can be sorted first, and can be sorted according to the dictionary. After sorting, age=25, name=john, and the generated spliced ​​parameters can be: age=25&name=john. It can be understood that the request parameters may include the version configuration key secretKey.

[0080] After obtaining the signature name and signature value of the dynamic signature, you can generate the dynamic signature.

[0081] This method can generate a dynamic signature based only on the specified string using the dynamic signature algorithm. Since the specified string can be updated in real time, the flag can be updated in real time, and the dynamic rules obtained each time the application is started can be different, therefore, the security of the dynamic signature can be improved.

[0082] The second method, see Figure 3 , Figure 3 This is another flowchart of calculating a dynamic signature in the security verification method shown in an embodiment of the present application.

[0083] This process can be achieved through the following steps.

[0084] S121. Extract the specified character string and its corresponding flag bit in the dynamic rule.

[0085] S122. Calculate the signature value of the dynamic signature based on the specified character string and the request parameters.

[0086] S123. Calculate the signature name of the dynamic signature based on the signature value and flag bit of the dynamic signature.

[0087] S124: Generate a dynamic signature of the application request using the signature name and signature value of the dynamic signature.

[0088] The implementation process of step 121 and step 122 may refer to the implementation process of step 111 and step 112 in the aforementioned embodiment, and will not be described in detail here.

[0089] In step 123, after the signature value of the dynamic signature is calculated, the signature name can be further calculated based on the calculated signature value. The signature value can be used as the aforementioned specified string, and the dynamic signature name corresponding to the dynamic signature value can be calculated based on the aforementioned method of calculating the signature name of the dynamic signature based on the specified string.

[0090] In the application, if the calculated signature value of the dynamic signature is acedf, if the flag in the dynamic rule is 3, it can be determined that the characters of the signature name are calculated starting from e. The flag can also include the number of values, such as N. If N is 3, the three characters "e, d, f" can be taken from e to the back as the signature name. It can also be taken from the back to the front N characters, such as "e, c, a" as the signature name. It can also be taken from the middle to both sides N characters as the signature name.

[0091] After obtaining the signature name and signature value of the dynamic signature, you can generate the dynamic signature.

[0092] This method does not require setting a specified string on the server side. Instead, the signature value of the dynamic signature is generated based on the request parameters of the application request, and then the signature name is further generated. This makes the signature name different each time. The corresponding dynamic signature cannot be obtained without cracking the dynamic rules, which can improve the security of the application.

[0093] For the third method, see Figure 4 , Figure 4 This is another flow chart of calculating a dynamic signature in the security verification method shown in the embodiment of the present application.

[0094] S131. Extract the specified character string and its corresponding flag bit in the dynamic rule.

[0095] S132: Determine the selected location information based on the specified date and flag in the dynamic rule.

[0096] S133. Select characters from the specified character string as the signature name of the dynamic signature based on the selection position information.

[0097] S134. Concatenate the parameter name and parameter value of the request parameter to obtain a first concatenation parameter.

[0098] S135. Calculate a signature value of the dynamic signature based on the first splicing parameter and a timestamp of a specified date.

[0099] S136: Generate a dynamic signature of the application request including a signature name of the dynamic signature and a signature value of the dynamic signature.

[0100] In this embodiment, after extracting the specified character string and flag in the dynamic rule, unlike the previous implementation, the selection location information can be determined based on the specified date, and then the signature name of the dynamic signature can be obtained based on the selection location information.

[0101] In the application, if the specified date is January 2, the flag is 3, and the specified string is acedf, the first character d and the second character f from e to the right can be used as the characters of the signature name, and the signature name of the dynamic signature is df. Of course, the specified date can be synchronized with the system time of the server, and can be further accurate to hours, minutes and seconds. The characters of the signature name further select the data corresponding to the hours, minutes and seconds as the selected position information to determine the characters from the specified string.

[0102] In this embodiment, after splicing the first splicing parameter, the signature value of the dynamic signature is calculated based on the timestamp of the specified date. In the application, the signature value to be calculated can be combined based on the aforementioned splicing parameters, version configuration key, timestamp and version number, and the signature value of the dynamic signature can be calculated by using the MD5 algorithm or other hash algorithm to calculate the signature value to be calculated. It can be understood that the version configuration key and version number can be non-essential parameters, and the signature value of the dynamic signature can be calculated only based on the request parameters and the timestamp corresponding to the specified date.

[0103] This method can calculate the dynamic signature based on the request parameters, the specified string and the specified date, making the dynamic signature more flexible and more difficult to crack. It can also reduce the validity period of the token corresponding to each dynamic signature and improve the security of the application.

[0104] It is worth mentioning that dynamic rules can be obtained and saved in the client's memory or cache. When the application is closed, the relevant data of the dynamic rules will be cleared to ensure data security.

[0105] Furthermore, in the embodiment of the present application, a dual authentication method can be implemented, see Figure 5 , Figure 5 This is another flow chart of a security verification method shown in an embodiment of the present application.

[0106] S501. Receive dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm.

[0107] S502: When an application request generated by an application program of a client is obtained, a request parameter corresponding to the application request is obtained.

[0108] S503: Calculate a dynamic signature based on the specified character string, the dynamic signature algorithm and the request parameters.

[0109] S504: Send the dynamic signature to the server to perform security verification based at least on the dynamic signature.

[0110] S505: Calculate a static signature based on the target class library and the static signature algorithm in the static rule.

[0111] S506: Send the static signature to the server, so that the server performs security verification based on at least the static signature.

[0112] The execution process of step 501 to step 504 and step 101 to step 104 in the above-mentioned embodiment can be referred to each other, and will not be described in detail here.

[0113] In step 505 , a static signature may be calculated based on the target class library and the static signature algorithm in the static rule. The static rule may be obtained from the server while obtaining the dynamic rule, or may be the static rule obtained from the server in step 505 .

[0114] In this embodiment, the static rule may include a static signature algorithm that instructs the target library to calculate a static signature. The target library may be an SO library, which may be a type of public network library. When an application request is generated, the public network library may obtain the application request, such as the account number and password in the login request, as well as application version number and timestamp parameters, and then obtain the signature name and signature value of the static signature under the static rule based on the static signature algorithm. The static signature is then returned to the client.

[0115] It can be understood that the signature name of the static signature generated by the static rule can be fixed.

[0116] In the application, in order to prevent the signature name of the static signature from conflicting with other parameters, a prefix of the fixed signature can be set based on the code parameter characteristics of the application. The prefix can be set to, for example, "_" or other prefix characters different from the code parameters in the application.

[0117] In an embodiment of the present application, at least a static signature may be sent to a server for security verification, and an application request, a dynamic signature, and a static signature may also be sent to the server for verification.

[0118] In the embodiment of the present application, after the dynamic signature and the static signature are generated, the application request and the dynamic signature and the static signature are sent to the server. The server can generate the dynamic signature to be verified and the static signature to be verified of the application request based on the dynamic signature algorithm and the static signature algorithm, respectively, and verify the security of the application based on the first verification result after comparing the dynamic signature with the dynamic signature to be verified and the second verification result after comparing the static signature with the static signature to be verified.

[0119] It is understandable that the server in the present application may specifically be a gateway layer of the server, which verifies the application request and forwards the application request and the verification result. The gateway layer may be hardware or software with gateway function.

[0120] The server may generate a dynamic signature to be verified and a static signature to be verified in a manner similar to the aforementioned dynamic signature and static signature.

[0121] In the application, the gateway layer of the server verifies the dynamic signature and the dynamic signature to be verified, and obtains the first verification result. If they are exactly the same, it proves that the dynamic signature is safe. After verifying the static signature and the static signature to be verified, a second verification result is obtained. If they are exactly the same, it proves that the static signature is safe. When the first verification result and the second verification result both indicate that the verification results are the same, it proves that the application can pass the security verification.

[0122] The static signature can be calculated based on the target class library and the static signature algorithm in the static rules through the following steps.

[0123] S1031. Determine the binary program algorithm corresponding to the static rule.

[0124] S1032. Obtain the signature name of the static signature in the static rule.

[0125] S1033. Calculate the request parameters based on the binary program algorithm to obtain a signature value of the static signature.

[0126] S1034: Generate a static signature based on the signature name of the static signature and the signature value of the static signature.

[0127] In this embodiment, the application in the client corresponds to a target class library, which can be an SO class library. The target class library will be loaded when the application is started. The internal algorithm in the target class library is a fixed algorithm and is usually not updated. Among them, the code of the target class library is written in a specified programming language, such as C language, and the code content, code specifications, and file naming are different from the commonly used methods. It is written in a specified way to increase the difficulty of decompilation.

[0128] In this embodiment, similar to dynamic rules, it can be pulled from the server when the application is started this time. Among them, the static rules can also include a rule id, a static signature calculation algorithm including the signature name of the static signature. Since the internal algorithm in the target class library is fixed, but usually has multiple encryption algorithms, the binary program algorithm among the multiple encryption algorithms can be determined based on the rule id, that is, the encryption algorithm used this time. In addition, the internal algorithm can be an encryption algorithm such as HMAC, SHA256, MD5, RSA, JWT and other mature encryption algorithms in related technologies. It can be understood that if there is only one internal algorithm, there is no need to specify the rule id.

[0129] In the application, the signature name of the static signature generated by the static signature algorithm may be a specified signature name, which may be a fixed name, such as xy_sign, which may be obtained from a static rule.

[0130] The client may calculate the signature value of the static signature based at least on the request parameters of the application request.

[0131] When the client receives an application request from an application, it can pass the application request parameters into the target class library. The target class library can select the corresponding internal algorithm based on the rule id, encrypt the string to be encrypted calculated from the application request parameters and / or the timestamp corresponding to the specified date, and obtain the signature value of the static signature.

[0132] For example, in the application, the request parameter includes sys=2, then the request parameter sys=2 is concatenated with the timestamp corresponding to the specified date to obtain the string str to be encrypted, and the rule id=3, then the encryption algorithm is determined to be MD5, and the MD5 algorithm is used to encrypt the string str to be encrypted. In the application, it can be MD5(str) to obtain the signature value of the static signature.

[0133] In the application, during the calculation of the static signature, sorting, algorithm selection, internal code scrambling, and byte processing can be performed to prevent the code logic from being understood after decompilation, thereby avoiding technical problems of the application being cracked.

[0134] In this embodiment, a static signature can be obtained based on the signature name and signature value of the static signature, for example, xy_sign=MD5(str), wherein MD5(str) is the value obtained by encrypting the string str to be encrypted using the MD5 algorithm.

[0135] In this embodiment, the target class library is bound to the device of the application program. Therefore, even if the target class library is obtained after decompilation, the target class library cannot be used directly.

[0136] In the embodiments of the present application, the security of static signatures can be reflected in the following ways: 1. The target class library can be reinforced based on third-party security products. 2. The class library files of the target class library are written in specific code (such as C language code), and the code has a lot of interference operations for the decompilation characteristics, such as file naming, code writing specifications, code content, etc., which are all written in unconventional ways. If the logic is not clear, even the source code readability is very poor. Even if it is decompiled, it cannot be used normally.

[0137] It can be seen from this embodiment that the embodiment of the present application adopts dynamic rules and static rules to generate dynamic signatures and static signatures respectively, and adopts a double verification method. The generation and verification of dynamic signatures can solve 90% of malicious requests, and the cracking difficulty is very large. The application cannot be cracked without decompilation. Even if it is cracked, the generation and verification of static signatures can solve the problem of being decompiled by the application.

[0138] The following is an introduction to the execution process on the server side.

[0139] See also Figure 6 , Figure 6 Another flowchart of a security verification method shown in an embodiment of the present application.

[0140] In an embodiment of the present application, a method for verifying an application request is applied to a server, and the method includes the following steps.

[0141] S601: Receive an application request sent by a client and a dynamic signature generated by the client based on dynamic rules.

[0142] S602: Calculate the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm, and the request parameters in the application request.

[0143] S603: Compare the dynamic signature and the signature to be verified to see if they are consistent, and obtain a first verification result.

[0144] It can also include

[0145] Receive the static signature sent by the client that is calculated based on static rules.

[0146] The static signature to be verified is calculated based on the target class library and the static signature algorithm in the static rules stored in the server.

[0147] The static signature is compared with the static signature to be verified to determine whether they are consistent, and a second verification result is obtained.

[0148] The following steps may be used to calculate the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm, and the request parameters in the application request.

[0149] Get the specified string and its corresponding flag in the dynamic rule stored in the server.

[0150] The selected location information is determined based on the specified date and flag in the dynamic rule.

[0151] Based on the selection position information, characters are selected from the specified string as the signature name of the dynamic signature to be verified.

[0152] Concatenate the parameter name and parameter value of the request parameter to obtain the first concatenated parameter.

[0153] The signature value of the dynamic signature to be verified is calculated based on the first concatenated parameter and the timestamp of the specified date.

[0154] Generate a dynamic signature to be verified that includes a signature name of the dynamic signature to be verified and a signature value of the dynamic signature to be verified.

[0155] Of course, there may also be other ways of calculating the client's dynamic signature with the client, such as the following steps.

[0156] Extract the specified string and its corresponding flag in the dynamic rule;

[0157] Calculate the signature name of the dynamic signature to be verified based on the specified string and flag bit;

[0158] Calculate the signature value of the dynamic signature to be verified based on the request parameters and the specified string;

[0159] The dynamic signature to be verified is generated using the signature name of the dynamic signature to be verified and the signature value of the dynamic signature to be verified.

[0160] The steps may also be as follows.

[0161] Extract the specified string and its corresponding flag in the dynamic rule;

[0162] Calculate the signature value of the dynamic signature to be verified based on the specified string and request parameters;

[0163] Calculate the signature name of the dynamic signature to be verified based on the signature value and flag bit of the dynamic signature to be verified;

[0164] The dynamic signature to be verified requested by the application is generated using the signature name of the dynamic signature to be verified and the signature value of the dynamic signature to be verified.

[0165] In the application, the execution subject on the server side can be the gateway layer of the server. When the gateway layer of the server receives the application request sent by the client application, it will calculate the dynamic signature to be verified based on the dynamic signature algorithm in the dynamic rule, and can calculate the static signature to be verified based on the static signature algorithm in the static signature. After that, the dynamic signature is compared with the dynamic signature to be verified to obtain the first verification result, and the static signature is compared with the static signature to be verified to obtain the second verification result. When the first verification result and the second verification result are both characterized as the same verification results, the application request is released and sent to the module of the server that can execute the application request.

[0166] It is understandable that, on the server side, the method of calculating the dynamic signature using dynamic rules and the method of calculating the static signature using static algorithms is consistent with the calculation process of calculating the dynamic signature using dynamic rules and the static signature using static rules in the client. The difference is that, in the embodiment of the present application, the server side does not actively obtain the application request, but receives the application request generated by the application sent by the client. The static rules and dynamic rules are sent by the server to the client. Therefore, when the server calculates the dynamic signature to be verified and the static signature to be verified, the dynamic rules and static rules stored by the server can be directly obtained from the server. In addition, the target class library is loaded by the client's application during operation. Therefore, when the static rule calculation is performed based on the target class library, the target class library loaded by the client can be called to obtain the server's static signature to be verified.

[0167] It is understandable that if the gateway layer is set with an access control list or control rules, if the application request is in the whitelist, such as a file upload request, it can be directly released. Of course, if it is in the blacklist, it can be directly abandoned.

[0168] It is understandable that if the dynamic signature and / or static signature fails to pass the security verification, it means that the application request fails to pass the verification, and the application has a security risk. At this time, the application request can be discarded or added to the risk processing list to facilitate subsequent data analysis on whether the application request has a security risk.

[0169] In this embodiment, based on the first verification result and the second verification result, a josn file in json format can be generated and returned to the client.

[0170] In this embodiment, the server, especially the gateway layer of the server, can perform security verification on the dynamic signature and static signature corresponding to the application request sent by the client, thereby ensuring the security of the application request.

[0171] See also Figure 7 , Figure 7The overall process diagram shown is an embodiment of the present application. In S1, the client initiates a request, S2 collects request parameters, S3 uses dynamic rules to calculate dynamic signatures, S4 uses static rules to calculate static signatures, and S5 initiates a request to the server. After the server receives the request, S6 collects parameters, S7 uses dynamic rules to calculate the dynamic signature to be verified, S9 verifies the dynamic signature and the dynamic signature to be verified, and obtains the first verification result. In S8, the static signature to be verified is calculated using static rules, and S10 verifies the static signature and the static signature to be verified to obtain the second verification result. Among them, steps 3 and 4 can be executed simultaneously, steps 7 and 8 can be executed simultaneously, and steps 9 and 10 can be executed simultaneously. For ease of understanding, a specific example in an application is given below to illustrate the execution process of the client and server in the embodiment of the present application.

[0172] Taking the use of app to log in to the server as an example, when the client's app is started, the client obtains configuration information through the gateway interface of the server's gateway layer, that is, the static rules and dynamic rules in the embodiment of the present application, which may include version configuration keys. When the user enters the account and password in the app and clicks the login button set by the app, the client can obtain the account and password as well as the public parameters of the client's system, such as the application version and timestamp. At the same time, the static rules and dynamic rules including the version configuration key are saved in the memory. The server and the client can pre-agree on symmetric encryption rules, such as using the AES algorithm to encrypt the sent data, and the client decrypts the data before encryption.

[0173] When using dynamic rules to calculate dynamic signatures, for example, a login request includes a user name, password, device ID, and a timestamp of the request time, the client can calculate the dynamic signature based on the specified string in the dynamic rule stored in the memory, and the subscript position and timestamp corresponding to the specified string.

[0174] In the application, for example, the version configuration key is: a10ba, the login request can store the request parameters of the login request in the request body, for example, the request body includes: "lver":"9.7.2","sys":"2","app_id":"73","device_id":"306986", where lver is the application version number, sys is the system tag, app_id is the app tag, and 306986 is the timestamp. If the specified string base_str=VVZWdNOchUInSNISZT, the subscript position flag=3, assuming that the current request date is: 2023-07-11 corresponding to the month: 07, day: 11, then in the specified string base_str, starting from the subscript position flag=3, intercept the 7th (month) character and the 11th (day) character from left to right, and the final dynamic signature name is UN. Sort the request parameters in the request body according to the key dictionary, and concatenate all key=value to obtain the concatenated parameters:

[0175] user / info&sys=2&lver:=9.7.2&device_id=306986&app_id=73&1689063811&a10ba. Then use the MD5 algorithm to encrypt it and get the added splicing parameters: 3a29a3597987f22f9591ac34368b8c01. Then the final dynamic signature is: _UN=3a29a3597987f22f9591ac34368b8c01, where the underscore "_" before UN is to prevent conflicts with other parameters and can be set according to actual needs.

[0176] When using static rules to calculate a static signature, the request parameters of the aforementioned application request are passed into the so library. The so library sorts the request parameters in the request body according to the key dictionary, selects the encryption algorithm based on the rule id, and encrypts it to obtain the signature value of the static signature. The static signature is returned, where the signature name of the static signature is a fixed name, such as xy_sign.

[0177] Afterwards, the application request, dynamic signature and static signature are sent to the server. After the server's gateway layer receives the application request, dynamic signature and static signature, it calculates the dynamic signature to be verified and the static signature to be verified on the server side based on the aforementioned dynamic rules and static rules, and compares the dynamic signature with the dynamic signature to be verified, and the static signature with the static signature to be verified to obtain the final security verification result, and performs release or abandonment operations based on the verification result.

[0178] It can be seen that the embodiment of the present application adopts a double verification method, which can effectively ensure the security of the application and the security of the data in the server.

[0179] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides an application security verification device, an electronic device and corresponding embodiments.

[0180] Figure 8 It is a structural schematic diagram of a security verification device shown in an embodiment of the present application.

[0181] See also Figure 8 The embodiment of the present application discloses a security verification device, which is applied to a client, and the device includes:

[0182] A rule receiving module 81 is used to receive dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm;

[0183] An obtaining module 82 is used to obtain request parameters corresponding to the application request when an application request generated by the application program of the client is obtained;

[0184] A dynamic signature module 83, configured to calculate a dynamic signature based on the specified string, the dynamic signature algorithm and the request parameters;

[0185] The sending module 84 is used to send the dynamic signature to the server for security verification.

[0186] In some embodiments, the dynamic signature includes a signature name and a signature value.

[0187] In some embodiments, the calculating the dynamic signature based on the specified string, the dynamic signature algorithm and the request parameter includes:

[0188] Extract the specified string and its corresponding flag in the dynamic rule;

[0189] Calculate the signature name of the dynamic signature based on the specified character string and the flag bit;

[0190] Calculate the signature value of the dynamic signature based on the request parameter and the specified string;

[0191] A dynamic signature is generated using the signature name of the dynamic signature and the signature value of the dynamic signature.

[0192] In some embodiments, the calculating the dynamic signature based on the specified string, the dynamic signature algorithm and the request parameter includes:

[0193] Extract the specified string and its corresponding flag in the dynamic rule;

[0194] Calculate the signature value of the dynamic signature based on the specified string and the request parameter;

[0195] Calculate the signature name of the dynamic signature based on the signature value of the dynamic signature and the flag bit;

[0196] The dynamic signature of the application request is generated using the signature name of the dynamic signature and the signature value of the dynamic signature.

[0197] In some embodiments, the calculating the dynamic signature based on the specified string, the dynamic signature algorithm and the request parameter includes:

[0198] Extract the specified string and its corresponding flag in the dynamic rule;

[0199] Determine the selected location information based on the specified date in the dynamic rule and the flag bit;

[0200] Selecting characters from the specified character string based on the selection position information as a signature name of the dynamic signature;

[0201] Concatenate the parameter name and parameter value of the request parameter to obtain a first concatenated parameter;

[0202] Calculating a signature value of the dynamic signature based on the first splicing parameter and the timestamp of the specified date;

[0203] A dynamic signature of the application request is generated, including a signature name of the dynamic signature and a signature value of the dynamic signature.

[0204] In some embodiments, it also includes:

[0205] Calculate the static signature based on the target class library and the static signature algorithm in the static rules;

[0206] The static signature is sent to the server, so that the server performs security verification based on at least the static signature.

[0207] In some embodiments, the step of calculating the static signature based on the target class library and the static signature algorithm in the static rule includes:

[0208] Determine a binary program algorithm corresponding to the static rule;

[0209] Obtaining the signature name of the static signature in the static rule;

[0210] Calculating the request parameters based on the binary program algorithm to obtain a signature value of the static signature;

[0211] The static signature is generated based on the signature name of the static signature and the signature value of the static signature.

[0212] In some embodiments, the determining the binary program algorithm corresponding to the static rule includes:

[0213] Obtaining a rule flag in the static rule;

[0214] A binary program algorithm among a plurality of encryption algorithms in the target class library is determined according to the rule flag.

[0215] In some embodiments, the calculating the request parameter based on the binary program algorithm to obtain the signature value of the static signature includes:

[0216] Concatenate the request parameters or concatenate the request parameters and a timestamp of a specified date to obtain a character string to be encrypted;

[0217] The binary program algorithm is used to calculate the character string to be encrypted to obtain a signature value of a static signature.

[0218] Fig. 9 It is another structural schematic diagram of a security verification device shown in an embodiment of the present application.

[0219] See also Fig. 9 , a verification device shown in an embodiment of the present application is applied to a server, and the device includes:

[0220] The request receiving module 91 is used to receive an application request sent by a client and a dynamic signature generated by the client based on a dynamic rule; wherein the dynamic rule is used based on a specified string and a dynamic signature algorithm;

[0221] A verification dynamic signature calculation module 92, configured to calculate a dynamic signature to be verified based on a specified string stored in the server, a dynamic signature algorithm, and request parameters in the application request;

[0222] The first comparison module 93 is used to compare the dynamic signature and the signature to be verified to see if they are consistent, and obtain a first verification result.

[0223] Receive the static signature sent by the client and calculated based on the static rules;

[0224] Calculate the static signature to be verified based on the target class library and the static signature algorithm in the static rules stored in the server;

[0225] The static signature is compared with the static signature to be verified to determine whether they are consistent, and a second verification result is obtained.

[0226] In some embodiments, the calculating the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm, and the request parameters in the application request includes:

[0227] Obtaining a specified character string and a corresponding flag bit in the dynamic rule stored in the server;

[0228] Determine the selected location information based on the specified date in the dynamic rule and the flag bit;

[0229] Selecting characters from the specified character string based on the selection position information as the signature name of the dynamic signature to be verified;

[0230] Concatenate the parameter name and parameter value of the request parameter to obtain a first concatenated parameter;

[0231] Calculating the signature value of the dynamic signature to be verified based on the first splicing parameter and the timestamp of the specified date;

[0232] Generate a dynamic signature to be verified that includes the signature name of the dynamic signature to be verified and the signature value of the dynamic signature to be verified.

[0233] In some embodiments, the step of calculating the static signature to be verified based on the target class library and the static signature algorithm in the static rules stored in the server includes:

[0234] Sending the application request to the target class library, and obtaining the signature value of the static signature to be verified calculated based on the static rule returned by the target class library;

[0235] The static signature to be verified is generated based on the specified signature name in the static rule stored in the server and the signature value of the static signature to be verified.

[0236] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0237] Fig.10 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.

[0238] See also Fig.10 , the electronic device 1000 includes a memory 1010 and a processor 1020 .

[0239] The processor 1020 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0240] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0241] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute part or all of the methods described above.

[0242] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0243] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0244] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A security verification method, characterized in that: Applied to a client, the method comprises: Receiving dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm; When obtaining an application request generated by the application program of the client, obtaining request parameters corresponding to the application request; Calculate a dynamic signature based on the specified string, the dynamic signature algorithm and the request parameters; The dynamic signature is sent to the server for security verification based at least on the dynamic signature.

2. The method according to claim 1, characterized in that The dynamic signature includes a signature name and a signature value.

3. The method according to claim 2, characterized in that The calculating the dynamic signature based on the specified character string, the dynamic signature algorithm and the request parameter includes: Extract the specified string and its corresponding flag in the dynamic rule; Calculate the signature name of the dynamic signature based on the specified character string and the flag bit; Calculate the signature value of the dynamic signature based on the request parameter and the specified string; A dynamic signature is generated using the signature name of the dynamic signature and the signature value of the dynamic signature.

4. The method according to claim 2, characterized in that: The calculating the dynamic signature based on the specified character string, the dynamic signature algorithm and the request parameter includes: Extract the specified string and its corresponding flag in the dynamic rule; Calculate the signature value of the dynamic signature based on the specified string and the request parameter; Calculate the signature name of the dynamic signature based on the signature value of the dynamic signature and the flag bit; The dynamic signature of the application request is generated using the signature name of the dynamic signature and the signature value of the dynamic signature.

5. The method according to claim 2, characterized in that: The calculating the dynamic signature based on the specified character string, the dynamic signature algorithm and the request parameter includes: Extract the specified string and its corresponding flag in the dynamic rule; Determine the selected location information based on the specified date in the dynamic rule and the flag bit; Selecting characters from the specified character string based on the selection position information as a signature name of the dynamic signature; Concatenate the parameter name and parameter value of the request parameter to obtain a first concatenated parameter; Calculating a signature value of the dynamic signature based on the first splicing parameter and the timestamp of the specified date; A dynamic signature of the application request is generated, including a signature name of the dynamic signature and a signature value of the dynamic signature.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: Calculate the static signature based on the target class library and the static signature algorithm in the static rules; The static signature is sent to the server, so that the server performs security verification based on at least the static signature.

7. The method according to claim 6, characterized in that The static signature is calculated based on the target class library and the static signature algorithm in the static rule, including: Determine a binary program algorithm corresponding to the static rule; Obtaining the signature name of the static signature in the static rule; Calculating the request parameters based on the binary program algorithm to obtain a signature value of the static signature; The static signature is generated based on the signature name of the static signature and the signature value of the static signature.

8. The method according to claim 7, characterized in that The step of determining the binary program algorithm corresponding to the static rule comprises: Obtaining a rule flag in the static rule; A binary program algorithm among a plurality of encryption algorithms in the target class library is determined according to the rule flag.

9. The method according to claim 7, characterized in that: The calculating the request parameter based on the binary program algorithm to obtain the signature value of the static signature includes: Concatenate the request parameters or concatenate the request parameters and a timestamp of a specified date to obtain a character string to be encrypted; The binary program algorithm is used to calculate the character string to be encrypted to obtain a signature value of a static signature.

10. A method for verifying an application request, characterized in that: Applied to a server, the method comprises: Receiving an application request sent by a client and a dynamic signature generated by the client based on a dynamic rule; Calculating the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm, and the request parameters in the application request; The dynamic signature is compared with the signature to be verified to determine whether they are consistent, and a first verification result is obtained.

11. The method according to claim 10, characterized in that Also includes: Receive the static signature sent by the client and calculated based on the static rules; Calculate the static signature to be verified based on the target class library and the static signature algorithm in the static rules stored in the server; The static signature is compared with the static signature to be verified to determine whether they are consistent, and a second verification result is obtained.

12. The method according to claim 10, characterized in that The calculating the dynamic signature to be verified based on the specified character string stored in the server, the dynamic signature algorithm and the request parameters in the application request includes: Obtaining a specified character string and a corresponding flag bit in the dynamic rule stored in the server; Determine the selected location information based on the specified date in the dynamic rule and the flag bit; Selecting characters from the specified character string based on the selection position information as the signature name of the dynamic signature to be verified; Concatenate the parameter name and parameter value of the request parameter to obtain a first concatenated parameter; Calculating the signature value of the dynamic signature to be verified based on the first splicing parameter and the timestamp of the specified date; Generate a dynamic signature to be verified that includes the signature name of the dynamic signature to be verified and the signature value of the dynamic signature to be verified.

13. The method according to claim 11, characterized in that The calculating of the static signature to be verified based on the static signature algorithm in the target class library and the static rules stored in the server includes: Sending the application request to the target class library, and obtaining the signature value of the static signature to be verified calculated based on the static rule returned by the target class library; The static signature to be verified is generated based on the specified signature name in the static rule stored in the server and the signature value of the static signature to be verified.

14. A security verification device, characterized in that: Applied to a client, the device comprises: A rule receiving module, used for receiving dynamic rules sent by a server; the dynamic rules at least include a specified string and a dynamic signature algorithm; An obtaining module, configured to obtain request parameters corresponding to an application request generated by an application program of the client when the application request is obtained; A dynamic signature module, used to calculate a dynamic signature based on the specified string, the dynamic signature algorithm and the request parameters; The sending module is used to send the dynamic signature to the server for security verification.

15. A security verification device, characterized in that: Applied to a server, the device comprises: A request receiving module, used to receive an application request sent by a client, and a dynamic signature generated by the client based on a dynamic rule; wherein the dynamic rule is used based on a specified string and a dynamic signature algorithm; A dynamic signature verification calculation module, used to calculate the dynamic signature to be verified based on the specified string stored in the server, the dynamic signature algorithm and the request parameters in the application request; The first comparison module is used to compare the dynamic signature and the signature to be verified to see if they are consistent, and obtain a first verification result.

16. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 9 or claims 10 to 13.

17. A computer-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 9 or claims 10 to 13.