CN114357388A - Parameter checking method and device, electronic equipment and storage medium - Google Patents

Parameter checking method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114357388A
CN114357388A CN202111638981.9A CN202111638981A CN114357388A CN 114357388 A CN114357388 A CN 114357388A CN 202111638981 A CN202111638981 A CN 202111638981A CN 114357388 A CN114357388 A CN 114357388A
Authority
CN
China
Prior art keywords
verification
parameter
foreground
rule
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111638981.9A
Other languages
Chinese (zh)
Inventor
张国辉
葛国周
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111638981.9A priority Critical patent/CN114357388A/en
Publication of CN114357388A publication Critical patent/CN114357388A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the field of computer science, in particular to a parameter checking method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a verification parameter; acquiring a corresponding parameter verification rule according to the type of the verification parameter; and according to the parameter verification rule, performing foreground verification and rear-end verification on the verification parameters to obtain a verification result. By adopting the method, foreground verification of the verification parameters is realized, background verification of the verification parameters is also realized, and unsafe data caused by that an attacker bypasses foreground parameter verification in a mode of intercepting the request for tampering the parameters is avoided. Therefore, the method improves the safety of parameter verification and ensures the safety of verification parameters. In addition, the parameter verification rule is suitable for both foreground verification and rear-end verification, so that the consistency of foreground verification and rear-end verification is realized, and the problem of difficult parameter verification caused by the inconsistency of foreground verification and rear-end verification can be solved.

Description

Parameter checking method and device, electronic equipment and storage medium
Technical Field
The invention relates to the field of computer science, in particular to a parameter checking method and device, electronic equipment and a storage medium.
Background
With the development of computer science, the security problem of a software system is more and more emphasized in the field of software development, and many software companies add the software security problem to the development red line. For the parameter verification, which is one of the safety issues to be considered in almost all software products, the parameters in the system are from external input, so that the control on the safety is indispensable.
In the prior art, the parameter verification only carries out the parameter validity verification on the foreground interface, and the mode is unsafe, so that an attacker can bypass the foreground parameter verification by intercepting the request to tamper the parameter.
Therefore, a method, an apparatus, an electronic device and a storage medium for parameter verification are needed to overcome the above-mentioned drawbacks.
Disclosure of Invention
In view of this, embodiments of the present invention provide a parameter verification method, an apparatus, an electronic device, and a storage medium, so as to solve the problem of insecurity in parameter verification.
According to a first aspect, an embodiment of the present invention provides a parameter checking method, including:
acquiring a verification parameter;
acquiring a corresponding parameter verification rule according to the type of the verification parameter;
and according to the parameter verification rule, performing foreground verification and rear-end verification on the verification parameters to obtain a verification result.
According to the parameter verification method provided by the embodiment of the application, the verification parameters are obtained, and then the corresponding parameter verification rules are obtained according to the types of the verification parameters. The parameter verification rule is suitable for foreground verification and rear-end verification, and foreground verification and rear-end verification are carried out on the verification parameters according to the parameter verification rule to obtain verification results. Therefore, foreground verification of the verification parameters is achieved, background verification of the verification parameters is also achieved, and the condition that an attacker bypasses foreground parameter verification in a mode of intercepting the request for tampering the parameters to cause unsafe data is avoided. Therefore, the method improves the safety of parameter verification and ensures the safety of verification parameters. In addition, the parameter verification rule is suitable for both foreground verification and rear-end verification, so that the consistency of foreground verification and rear-end verification is realized, and the problem of difficult parameter verification caused by the inconsistency of foreground verification and rear-end verification can be solved.
With reference to the first aspect, in the first embodiment of the first aspect, performing foreground verification and backend verification on the verification parameters according to the parameter verification rule, and acquiring the verification result includes:
according to the parameter verification rule, performing foreground verification on the verification parameters to obtain a foreground verification result;
and when the foreground verification result is passed, performing back-end verification on the verification parameters according to the parameter verification rule to obtain a back-end verification result.
According to the parameter verification method provided by the embodiment of the application, foreground verification is performed on the verification parameters according to the parameter verification rule, and a foreground verification result is obtained, so that the accuracy of the foreground verification result can be ensured. In addition, when the current station verification result is passed, the verification parameters are subjected to back-end verification according to the parameter verification rule, and a back-end verification result is obtained. Therefore, foreground verification of the verification parameters is achieved, background verification of the verification parameters is also achieved, and the condition that an attacker bypasses foreground parameter verification in a mode of intercepting the request for tampering the parameters to cause unsafe data is avoided.
With reference to the first implementation manner of the first aspect, in the second implementation manner of the first aspect, performing foreground verification on the verification parameters according to the parameter verification rule to obtain a foreground verification result, further includes:
and when the foreground verification result is failed, sending a parameter verification failure prompt, and stopping the back-end verification.
According to the parameter verification method provided by the embodiment of the application, when the current platform verification result is failed, a parameter verification failure prompt is sent, and the back-end verification is stopped. Therefore, the user can find the abnormity of the verification parameters in time, and the user can correct the verification parameters in time conveniently, and the electronic equipment is prevented from verifying the abnormal verification parameters again, so that the time waste is avoided. Therefore, the parameter checking method can improve the efficiency of checking the parameters.
With reference to the first implementation manner of the first aspect, in the third implementation manner of the first aspect, when the foreground verification result is passed, performing a backend verification on the verification parameter to obtain a backend verification result, further includes:
when the back end verification result is failed, sending a parameter verification failure prompt;
and recording the back-end verification result into an operation log.
According to the parameter verification method provided by the embodiment of the application, when the back-end verification result is failed, a parameter verification failure prompt is sent; therefore, the user can find the abnormal condition of the verification parameters in time. And the back-end check result is recorded in the operation log, so that a user can conveniently trace and investigate the abnormal reason of the check parameter, and the accuracy of the check parameter is further ensured.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the obtaining the verification parameter includes:
responding to the request operation of a request interface, and acquiring a uniform resource locator;
extracting data information in the uniform resource locator;
and taking the extracted data information as a verification parameter.
The parameter verification method provided by the embodiment of the application responds to the request operation of a request interface to obtain the uniform resource locator; extracting data information in the uniform resource locator; the extracted data information is used as a check parameter, so that the accuracy of the acquired check parameter can be ensured.
With reference to the first aspect, in a fifth embodiment of the first aspect, the method further includes:
responding to the input operation of a parameter verification rule input interface, and determining a parameter verification rule;
and storing the parameter verification rule to a database.
The parameter verification method provided by the embodiment of the application responds to the input operation of the parameter verification rule input interface and determines the parameter verification rule; the parameter verification rules are stored in the database, so that the aim of unifying the foreground and rear-end parameter verification rules is fulfilled, and the maintenance is convenient. Therefore, after the electronic equipment acquires the verification parameters, the parameter verification rules corresponding to the verification parameters can be searched in the database.
With reference to the first aspect, in a sixth implementation manner of the first aspect, after the step of performing foreground verification and backend verification on the verification parameters according to the parameter verification rule and obtaining the verification result, the method further includes:
and when the verification result is passed, entering the subsequent service processing step.
According to the parameter verification method provided by the embodiment of the application, when the verification result is passed, the subsequent service processing step is carried out, so that the subsequent service can be normally processed, and the safety of the system is ensured.
According to a second aspect, an embodiment of the present invention provides a parameter checking apparatus, which is characterized in that the apparatus includes:
the first acquisition module is used for acquiring the verification parameters;
the second acquisition module is used for acquiring a corresponding parameter verification rule according to the type of the verification parameter;
and the checking module is used for performing foreground checking and rear-end checking on the checking parameters according to the parameter checking rule to obtain a checking result.
The parameter verification device provided by the embodiment of the application acquires the verification parameters and then acquires the corresponding parameter verification rules according to the types of the verification parameters. The parameter verification rule is suitable for foreground verification and rear-end verification, and foreground verification and rear-end verification are carried out on the verification parameters according to the parameter verification rule to obtain verification results. Therefore, foreground verification of the verification parameters is achieved, background verification of the verification parameters is also achieved, and the condition that an attacker bypasses foreground parameter verification in a mode of intercepting the request for tampering the parameters to cause unsafe data is avoided. Therefore, the device improves the safety of parameter verification and ensures the safety of verification parameters. In addition, the parameter verification rule is suitable for both foreground verification and rear-end verification, so that the consistency of foreground verification and rear-end verification is realized, and the problem of difficult parameter verification caused by the inconsistency of foreground verification and rear-end verification can be solved.
According to a third aspect, an embodiment of the present invention provides an electronic device, including: the parameter verification method includes a memory and a processor, where the memory and the processor are communicatively connected with each other, and the memory stores computer instructions, and the processor executes the computer instructions to execute the first aspect or the parameter verification method in any one of the embodiments of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the parameter verification method in the first aspect or any one of the implementation manners of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a parameter verification method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a parameter verification method according to another embodiment of the present invention;
FIG. 3 is a flow chart of a parameter verification method according to another embodiment of the present invention;
FIG. 4 is a functional block diagram of a parameter checking apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an electronic device to which an embodiment of the present invention is applied.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In describing the present invention, it is noted that the term "and/or" as used in this specification and the appended claims refers to and includes any and all combinations of one or more of the associated listed items.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the method for parameter verification provided in this embodiment of the present application, an execution main body of the method may be a parameter verification device, and the parameter verification device may be implemented in a software, hardware, or a combination of software and hardware to become part or all of an electronic device, where the electronic device may be a server or a terminal, where the server in this embodiment of the present application may be one server or a server cluster composed of multiple servers, and the terminal in this embodiment of the present application may be another intelligent hardware device such as a smart phone, a personal computer, a tablet computer, a wearable device, and an intelligent robot. In the following method embodiments, the execution subject is an electronic device as an example.
In an embodiment of the present application, as shown in fig. 1, a parameter verification method is provided, which is described by taking an application of the method and an electronic device as an example, and includes the following steps:
and S11, acquiring the verification parameters.
The verification parameter may include a verification identifier, where the verification identifier may be a url request or other identification information.
In an optional embodiment of the present application, the electronic device may receive a verification parameter input by a User based on a client or a UI (User Interface).
In another optional implementation manner of the present application, the electronic device may further receive a verification parameter sent by another device.
In another optional implementation manner of the present application, the electronic device may further receive an instruction from a user to generate the verification parameter.
The embodiment of the application does not specifically limit the way for the electronic device to obtain the verification parameters.
In an alternative embodiment, the check parameter obtained by the electronic device may provide a keyword required to define whether the check parameter is a necessary parameter.
And S12, acquiring a corresponding parameter verification rule according to the type of the verification parameter.
In an optional implementation manner, after obtaining the verification parameter, the electronic device may read the verification parameter, obtain a verification identifier included in the verification parameter, and then obtain the type of the verification parameter according to the verification identifier. And then, acquiring a parameter verification rule corresponding to the verification parameter from the configuration file according to the type of the verification parameter.
In an optional implementation manner, after obtaining the verification parameter, the electronic device may read the verification parameter, obtain a verification identifier included in the verification parameter, and then obtain a parameter verification rule corresponding to the verification parameter from the configuration file according to the verification identifier.
The parameter checking rule may include a plurality of rules. For example, the parameter checking rule may include a value range check, which is represented by a keyword range; regular checks may also be included, providing check rules for format, length, etc. of the parameters, denoted regex. The method can also comprise the verification of the association between the parameters or the verification with special requirements, provides a self-defined verification interface, realizes the verification of the interface through the write processing logic and is expressed by a keyword custom.
The embodiment of the application does not specifically limit the parameter verification rule.
It should be noted that the parameter verification rule may be input or updated through an interface, a corresponding relationship between the verification identifier and the parameter verification rule is established, when the parameter verification rule changes, the corresponding relationship is recorded in the database, and meanwhile, the corresponding relationship in the database is read and recorded in the configuration file.
Illustratively, a user may input or update a parameter verification rule through an interface, where a verification identifier corresponding to the parameter verification rule is used as a key value, where the verification identifier corresponding to the parameter verification rule may be a url, or may be another identifier. The parameter checking rule is divided into required fields which indicate whether the parameters are necessary or not; the method field represents a verification rule type and is divided into three types of range, regex and custom, wherein range represents numerical range verification, regex represents regular verification and custom verification; the valid field indicates a check rule. After the interface selection is completed, the check rule is recorded in the database for storage. The parameter verification rule corresponding to each verification identifier can be checked on the interface, and subsequent maintenance is facilitated. And meanwhile, the parameter verification rule is refreshed into the configuration file.
And S13, performing foreground verification and rear-end verification on the verification parameters according to the parameter verification rule to obtain a verification result.
Specifically, after the electronic device obtains the verification parameters and the parameter verification rules from the configuration file according to the verification identifiers, the electronic device may perform foreground verification and backend verification on the verification parameters to obtain verification results.
This step will be described in detail below.
According to the parameter verification method provided by the embodiment of the application, the verification parameters are obtained, and then the corresponding parameter verification rules are obtained according to the types of the verification parameters. The parameter verification rule is suitable for foreground verification and rear-end verification, and foreground verification and rear-end verification are carried out on the verification parameters according to the parameter verification rule to obtain verification results. Therefore, foreground verification of the verification parameters is achieved, background verification of the verification parameters is also achieved, and the condition that an attacker bypasses foreground parameter verification in a mode of intercepting the request for tampering the parameters to cause unsafe data is avoided. Therefore, the method improves the safety of parameter verification and ensures the safety of verification parameters. In addition, the parameter verification rule is suitable for both foreground verification and rear-end verification, so that the consistency of foreground verification and rear-end verification is realized, and the problem of difficult parameter verification caused by the inconsistency of foreground verification and rear-end verification can be solved.
In an embodiment of the present application, as shown in fig. 2, a parameter verification method is provided, which is described by taking an application of the method and an electronic device as an example, and includes the following steps:
and S21, acquiring the verification parameters.
For this step, please refer to the description of S11 in fig. 1, which is not repeated herein.
And S22, acquiring a corresponding parameter verification rule according to the type of the verification parameter.
For this step, please refer to the description of S11 in fig. 1, which is not repeated herein.
And S23, performing foreground verification and rear-end verification on the verification parameters according to the parameter verification rule to obtain a verification result.
Specifically, the step S23 "performing foreground verification and backend verification on the verification parameters according to the parameter verification rule to obtain the verification result" may include the following steps:
s231, according to the parameter verification rule, foreground verification is carried out on the verification parameters, and a foreground verification result is obtained.
And S232, when the current station verification result is passed, performing back-end verification on the verification parameters according to the parameter verification rule to obtain a back-end verification result.
And S233, when the current station verification result is failed, sending a parameter verification failure prompt, and stopping the back-end verification.
S234, when the back-end verification result is failed, sending a parameter verification failure prompt;
and S235, recording the back-end verification result into an operation log.
Specifically, after the electronic device obtains the verification parameters and the parameter verification rules from the configuration file according to the verification identifiers, the electronic device may perform foreground verification on the verification parameters according to the parameter verification rules to obtain foreground verification results.
For example, the parameter range of the verification parameter may be verified, the format and/or the length of the verification parameter may also be verified, and the verification parameter may also be subjected to custom verification. And then obtaining a foreground verification result.
In one case, after the electronic device performs foreground verification on the verification parameters according to the parameter verification rule, if the foreground verification fails, the electronic device sends a parameter verification failure prompt and stops the back-end verification. The parameter verification failure prompt can prompt the user of at least one parameter which is not verified to pass and prompt the reason why the user passes, so that the user can modify the verification parameters. The reasons for failing may include that the verification parameter exceeds the verification parameter range, the verification parameter format and length do not conform to the parameter verification rule, and the verification parameter does not satisfy the parameter verification rule corresponding to the custom verification.
In another case, when the foreground verification result is passed, the electronic device may obtain the parameter verification rule from the same configuration file according to the verification identifier corresponding to the verification parameter, perform the backend verification on the verification parameter again, and obtain the backend verification result.
Illustratively, the electronic device may check the parameter range of the check parameter again according to the parameter check rule, may also check the format or/and length of the check parameter, may also perform custom check on the check parameter, and then obtains the back-end check result.
And when the back-end verification result is failed, sending a parameter verification failure prompt. The parameter verification failure prompt can be used for explaining the possibility of illegal tampering of the verification parameters, and the electronic equipment directly logs the user out to a login page and records a corresponding operation log.
And when the back-end verification result is passed, entering subsequent normal business processing logic to ensure the safety of the system.
According to the parameter verification method provided by the embodiment of the application, foreground verification is performed on the verification parameters according to the parameter verification rule, and a foreground verification result is obtained, so that the accuracy of the foreground verification result can be ensured. And when the foreground verification result is failed, sending a parameter verification failure prompt, and stopping the back-end verification. Therefore, the user can find the abnormity of the verification parameters in time, and the user can correct the verification parameters in time conveniently, and the electronic equipment is prevented from verifying the abnormal verification parameters again, so that the time waste is avoided. Therefore, the parameter checking method can improve the efficiency of checking the parameters. In addition, when the current station verification result is passed, the verification parameters are subjected to back-end verification according to the parameter verification rule, and a back-end verification result is obtained. Therefore, foreground verification of the verification parameters is achieved, background verification of the verification parameters is also achieved, and the condition that an attacker bypasses foreground parameter verification in a mode of intercepting the request for tampering the parameters to cause unsafe data is avoided.
When the back end verification result is failed, sending a parameter verification failure prompt; therefore, the user can find the abnormal condition of the verification parameters in time. And the back-end check result is recorded in the operation log, so that a user can conveniently trace and investigate the abnormal reason of the check parameter, and the accuracy of the check parameter is further ensured.
In an embodiment of the present application, as shown in fig. 3, a parameter verification method is provided, which is described by taking an application of the method and an electronic device as an example, and includes the following steps:
and S31, responding to the input operation of the parameter verification rule input interface, and determining the parameter verification rule.
Specifically, the electronic device may receive an input operation of a user for inputting the parameter verification rule based on the input interface, and determine the parameter verification rule in response to the input operation of the parameter verification rule input interface.
Illustratively, a user may input or update a parameter verification rule through an input interface, where a verification identifier corresponding to the parameter verification rule is used as a key value, where the verification identifier corresponding to the parameter verification rule may be a url, or may be another identifier. The parameter checking rule is divided into required fields which indicate whether the parameters are necessary or not; the method field represents the type of the verification rule and is divided into three types, namely range, regex and custom, wherein range represents a numerical range, regex represents regular verification and custom verification; the valid field indicates a check rule. After the interface selection is completed, the check rule is recorded in the database for storage. The check rule corresponding to each check mark can be checked on the interface, and subsequent maintenance is facilitated. And meanwhile, the parameter verification rule is refreshed into the configuration file.
It should be noted that the check identifier corresponding to the check parameter may be the same as or different from the check identifier corresponding to the parameter check rule.
For example, when the verification identifier corresponding to the verification parameter may be the same as the verification identifier corresponding to the parameter verification rule, the verification identifier corresponding to the verification parameter is 1, the verification identifier corresponding to the parameter verification rule corresponding to the verification parameter is also 1, and the electronic device may find the parameter verification rule corresponding to the identifier according to the verification identifier 1 corresponding to the verification parameter.
For example, when the check identifier corresponding to the check parameter may be different from the check identifier corresponding to the parameter check rule, the check identifier corresponding to the check parameter is 1, the check identifier corresponding to the parameter check rule corresponding to the check parameter is a, and the electronic device may find the parameter check rule corresponding to the check identifier a according to the check identifier 1 corresponding to the check parameter. And the check identifier corresponding to the check parameter is 1, and the check identifier corresponding to the parameter check rule is A, which is a corresponding relation.
And S32, storing the parameter verification rule in a database.
Specifically, after determining the parameter verification rule, the electronic device may store the parameter verification rule in the database according to the verification identifier corresponding to the parameter verification rule. The database may be a configuration file or other files.
And S33, acquiring the verification parameters.
Specifically, the step of obtaining the verification parameter in S33 may include the following steps:
and S331, responding to the request operation of the request interface, and acquiring the uniform resource locator.
And S332, extracting data information in the uniform resource locator.
And S333, taking the extracted data information as a verification parameter.
Specifically, the electronic device may receive a request operation input by a user based on a request interface, and obtain the uniform resource locator in response to the request operation of the request interface. The electronic equipment extracts the data information in the uniform resource locator, reads and researches the data information, and takes the extracted data information as a verification parameter, thereby ensuring the accuracy of the extracted verification data.
And S34, acquiring a corresponding parameter verification rule according to the type of the verification parameter.
For this step, please refer to the description of S22 in fig. 1, which is not repeated herein.
And S35, performing foreground verification and rear-end verification on the verification parameters according to the parameter verification rule to obtain a verification result.
For this step, please refer to the description of S23 in fig. 1, which is not repeated herein.
And S36, when the check result is passed, the method proceeds to the subsequent service processing step.
Specifically, when the verification result is that the verification result is passed, the electronic device enters a subsequent normal service processing logic, so that the safety of the system is ensured.
The parameter verification method provided by the embodiment of the application responds to the input operation of the parameter verification rule input interface and determines the parameter verification rule; and storing the parameter verification rule to a database. The aim of unifying the foreground and rear-end parameter verification rules is fulfilled, and the maintenance is convenient. Therefore, after the electronic equipment acquires the verification parameters, the parameter verification rules corresponding to the verification parameters can be searched in the database. In addition, responding to the request operation of the request interface, and acquiring a uniform resource locator; extracting data information in the uniform resource locator; the extracted data information is used as a check parameter, so that the accuracy of the acquired check parameter can be ensured.
And then, according to the parameter verification rule, performing foreground verification and rear-end verification on the verification parameters to obtain a verification result. And when the verification result is that the verification result is passed, the subsequent service processing step is carried out, so that the normal processing of the subsequent service can be ensured, and the safety of the system is ensured. Therefore, the method improves the safety of parameter verification and ensures the safety of verification parameters. In addition, the parameter verification rule is suitable for both foreground verification and rear-end verification, so that the consistency of foreground verification and rear-end verification is realized, and the problem of difficult parameter verification caused by the inconsistency of foreground verification and rear-end verification can be solved. And further, the verification parameters are not tampered, so that the safety of the software system is ensured.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In this embodiment, a parameter checking apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The present embodiment provides a parameter checking apparatus, as shown in fig. 4, including:
a first obtaining module 41, configured to obtain a verification parameter;
a second obtaining module 42, configured to obtain a corresponding parameter verification rule according to the type of the verification parameter;
and the checking module 43 is configured to perform foreground checking and backend checking on the checking parameters according to the parameter checking rule, and obtain a checking result.
In an embodiment of the present application, the verification module 43 is specifically configured to perform foreground verification on the verification parameters according to the parameter verification rule, and obtain a foreground verification result; and when the foreground verification result is passed, performing back-end verification on the verification parameters according to the parameter verification rule to obtain a back-end verification result.
In an embodiment of the present application, the checking module 43 is specifically configured to send a parameter checking failure prompt and stop the back-end checking when the foreground checking result is failed.
In an embodiment of the present application, the verification module 43 is specifically configured to send a parameter verification failure prompt when the back-end verification result is failed; and recording the back-end verification result into an operation log.
In an embodiment of the present application, the first obtaining module 43 is specifically configured to obtain a uniform resource locator in response to a request operation of a request interface; extracting data information in the uniform resource locator; and taking the extracted data information as a verification parameter.
In an embodiment of the application, the parameter checking apparatus further includes:
and the response module 44 is used for responding to the input operation of the parameter verification rule input interface and determining the parameter verification rule.
And the storage module 45 is used for storing the parameter verification rule to the database.
In an embodiment of the application, the parameter checking apparatus further includes:
and the processing module 46 is configured to enter a subsequent service processing step when the verification result is passed.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
An embodiment of the present invention further provides an electronic device, which has the parameter checking apparatus shown in fig. 4.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 5, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, at least one communication bus 52. Wherein a communication bus 52 is used to enable the connection communication between these components. The communication interface 53 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 53 may also include a standard wired interface and a standard wireless interface. The Memory 54 may be a high-speed RAM Memory (volatile Random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 54 may alternatively be at least one memory device located remotely from the processor 51. Wherein the processor 51 may be in connection with the apparatus described in fig. 5, the memory 54 stores an application program, and the processor 51 calls the program code stored in the memory 54 for performing any of the above-mentioned method steps.
The communication bus 52 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 52 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The memory 54 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 54 may also comprise a combination of the above types of memories.
The processor 51 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 51 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 54 is also used to store program instructions. The processor 51 may call program instructions to implement a method of parameter checking as shown in any of the embodiments of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the parameter verification method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method for parameter verification, the method comprising:
acquiring a verification parameter;
acquiring a corresponding parameter verification rule according to the type of the verification parameter;
and according to the parameter verification rule, performing foreground verification and rear-end verification on the verification parameters to obtain a verification result.
2. The method according to claim 1, wherein the performing a foreground verification and a backend verification on the verification parameters according to the parameter verification rule, and obtaining a verification result comprises:
according to the parameter verification rule, performing foreground verification on the verification parameters to obtain a foreground verification result;
and when the foreground verification result is passed, performing back-end verification on the verification parameters according to the parameter verification rule to obtain a back-end verification result.
3. The method according to claim 2, wherein the performing foreground verification on the verification parameter according to the parameter verification rule to obtain a foreground verification result further comprises:
and when the foreground verification result is failed, sending a parameter verification failure prompt, and stopping the back-end verification.
4. The method according to claim 2, wherein when the foreground verification result is a pass, performing a backend verification on the verification parameter to obtain a backend verification result, further comprising:
when the back end verification result is failed, sending a parameter verification failure prompt;
and recording the back-end verification result into an operation log.
5. The method of claim 1, wherein obtaining the verification parameters comprises:
responding to the request operation of a request interface, and acquiring a uniform resource locator;
extracting data information in the uniform resource locator;
and taking the extracted data information as the verification parameter.
6. The method of claim 1, further comprising:
responding to an input operation of a parameter verification rule input interface, and determining the parameter verification rule;
and storing the parameter checking rule to a database.
7. The method according to claim 1, wherein after the step of performing foreground verification and backend verification on the verification parameters according to the parameter verification rule and obtaining the verification result, the method further comprises:
and when the verification result is passed, entering the subsequent service processing step.
8. An apparatus for parameter verification, the apparatus comprising:
the first acquisition module is used for acquiring the verification parameters;
the second acquisition module is used for acquiring a corresponding parameter verification rule according to the type of the verification parameter;
and the checking module is used for performing foreground checking and rear-end checking on the checking parameters according to the parameter checking rules to obtain checking results.
9. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-7.
CN202111638981.9A 2021-12-29 2021-12-29 Parameter checking method and device, electronic equipment and storage medium Withdrawn CN114357388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111638981.9A CN114357388A (en) 2021-12-29 2021-12-29 Parameter checking method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111638981.9A CN114357388A (en) 2021-12-29 2021-12-29 Parameter checking method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114357388A true CN114357388A (en) 2022-04-15

Family

ID=81103395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111638981.9A Withdrawn CN114357388A (en) 2021-12-29 2021-12-29 Parameter checking method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114357388A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329849A (en) * 2017-07-06 2017-11-07 北京理工大学 A kind of data verification method and system based on Java systems
US20180373860A1 (en) * 2016-03-04 2018-12-27 Alibaba Group Holding Limited Verification code-based verification processing
CN111680068A (en) * 2020-06-02 2020-09-18 深圳乐信软件技术有限公司 Verification method, device, equipment and storage medium
CN112506721A (en) * 2020-11-25 2021-03-16 苏州浪潮智能科技有限公司 REST interface checking method, device, equipment and readable medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180373860A1 (en) * 2016-03-04 2018-12-27 Alibaba Group Holding Limited Verification code-based verification processing
CN107329849A (en) * 2017-07-06 2017-11-07 北京理工大学 A kind of data verification method and system based on Java systems
CN111680068A (en) * 2020-06-02 2020-09-18 深圳乐信软件技术有限公司 Verification method, device, equipment and storage medium
CN112506721A (en) * 2020-11-25 2021-03-16 苏州浪潮智能科技有限公司 REST interface checking method, device, equipment and readable medium

Similar Documents

Publication Publication Date Title
US10467316B2 (en) Systems and methods for web analytics testing and web development
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN110427785B (en) Equipment fingerprint acquisition method and device, storage medium and electronic device
EP3573027A1 (en) Vehicle inspection method, user equipment, server, and vehicle inspection system
CN113489713B (en) Network attack detection method, device, equipment and storage medium
CN107784593B (en) Insurance claim settlement interaction method and system
CN110221948B (en) Test script generation method, test script generation device, computer device and storage medium
CN111131221B (en) Interface checking device, method and storage medium
CN112039900B (en) Network security risk detection method, system, computer device and storage medium
CN109586962B (en) Device and method for processing HTTPS (hypertext transfer protocol secure) outer chain problem of upgrading IPv4 to IPv6 and electronic equipment
CN110633198A (en) Block chain-based software test data storage method and system
CN110134653B (en) Method and system for assisting database auditing by using logs
CN109788052B (en) Server configuration remote query method, device, terminal and storage medium
CN112738085B (en) File security verification method, device, equipment and storage medium
CN115563600A (en) Data auditing method and device, electronic equipment and storage medium
CN114579446A (en) Data processing method and device, computer equipment and computer readable storage medium
CN113806816A (en) Electronic file management method and device based on block chain and electronic equipment
CN107294981B (en) Authentication method and equipment
CN112181836A (en) Test case generation method, system, device and storage medium
CN114357388A (en) Parameter checking method and device, electronic equipment and storage medium
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN108243180B (en) Bank policy data docking method and policy data server
CN112800130A (en) Data uplink method, system, device, equipment and storage medium
CN108200060B (en) Single sign-on verification method based on web subsystem, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20220415

WW01 Invention patent application withdrawn after publication