CN110147261A - Parameter verification method and relevant device based on calling interface - Google Patents

Parameter verification method and relevant device based on calling interface Download PDF

Info

Publication number
CN110147261A
CN110147261A CN201910297841.6A CN201910297841A CN110147261A CN 110147261 A CN110147261 A CN 110147261A CN 201910297841 A CN201910297841 A CN 201910297841A CN 110147261 A CN110147261 A CN 110147261A
Authority
CN
China
Prior art keywords
interface
parameter
verification
call request
interface call
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.)
Pending
Application number
CN201910297841.6A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910297841.6A priority Critical patent/CN110147261A/en
Publication of CN110147261A publication Critical patent/CN110147261A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Abstract

This application involves research and development administrative skill fields, this application discloses a kind of parameter verification method and relevant device based on calling interface, the described method includes: obtaining interface call request, the interface call request is intercepted, and the corresponding interface of the interface call request is detected;When detecting that the corresponding interface of the interface call request has verification to explain, the parameter in the corresponding interface of the interface call request is verified;When successful to the parameter verification in the corresponding interface of the interface call request, the interception of the interface call request is released, otherwise sends failure feedback information.The application is intercepted by the interface to calling and is verified to the parameter in interface, and the efficiency of parameter verification can be improved, and reduces the error rate of interface code, and is reduced since parameter verification bring interface changes workload.

Description

Parameter verification method and relevant device based on calling interface
Technical field
This application involves research and development administrative skill field, in particular to a kind of parameter verification methods and phase based on calling interface Close equipment.
Background technique
In the exploitation of rear end, it is often necessary to non-empty, illegal format check are carried out to ginseng is entered, to ensure the safety and standard of data True property.Hibernate Validator, which is provided, carrys out checking parameter using note, can simply solve this problem, still Have limitation, such as: currently, interface enters to join format: data=" { name: " Zhang San ", age: " 30 ", sex: " It is male " ", the formats of above-mentioned data is json format;If it is desired to introducing kit hibernate-validator, server-side must A bean need be created, the full name of the bean is Bean Validation, and the Bean Validation is one logical It crosses configuration and explains the frame for carrying out certificate parameter, it includes two parts Bean Validation API and Hibernate Validator, wherein Bean Validation API is the specification for the certificate parameter that Java is defined, and Hibernate Validator is one of Bean Validation API realization, the parameter of verification in need can all write on Hibernate In Validator, so if need to carry out non-empty verification to the name parameter in above-mentioned data, it can be in the name attribute of bean @NotNull note is write above, it is name=" Zhang San " that client request parameter json format, which has to modify into ginseng format, Age=" 30 ", sex=" male ", change amount is very big if interface is more, is not suitable for reconstruct, flexibility is inadequate, and cannot be to json Formatted data carries out parameter verification.
Summary of the invention
The purpose of the application is to provide a kind of parameter verification method based on calling interface in view of the deficiencies of the prior art And relevant device, intercept and verify the parameter in interface by the interface to calling, parameter school can be improved The efficiency tested reduces the error rate of interface code, and reduces since parameter verification bring interface changes workload.
In order to achieve the above objectives, the technical solution of the application provides a kind of parameter verification method and phase based on calling interface Close equipment.
The parameter verification method based on calling interface that this application discloses a kind of, comprising the following steps:
Interface call request is obtained, the interface call request is intercepted, and is corresponding to the interface call request Interface detected;
It is corresponding to the interface call request when detecting that the corresponding interface of the interface call request has verification to explain Interface in parameter verified;
When successful to the parameter verification in the corresponding interface of the interface call request, the interface call request is released Interception, otherwise send failure feedback information.
Preferably, the acquisition interface call request, intercepts the interface call request, and to the interface tune It is detected with the corresponding interface of request, comprising:
Get parms verification demand, and presets verification on interface according to the parameter verification demand and explain;
When getting interface call request, the interface call request is intercepted, and detects the interface and calls Request whether corresponding interface includes that verification is explained.
Preferably, it is described when getting interface call request, the interface call request is intercepted, and detect institute State whether the corresponding interface of interface call request includes after verification is explained, comprising:
When detecting that the corresponding interface no parity check of the interface call request is explained, the interface call request is released It intercepts.
Preferably, it is described when detecting that the corresponding interface of the interface call request has verification to explain, to the interface Parameter in the corresponding interface of call request is verified, comprising:
The verification rule type of parameter preset;
When detecting that the corresponding interface of the interface call request has verification to explain, according to the verification of parameter rule Type verifies the parameter in the corresponding interface of the interface call request.
Preferably, it is described when detecting that the corresponding interface of the interface call request has verification to explain, according to the ginseng Several verification rule types verifies the parameter in the corresponding interface of the interface call request, comprising:
When detecting that the corresponding interface of the interface call request has verification to explain, obtain in the verification note Json format check parameter and verification rule type corresponding with the json format check parameter;
When the json format check parameter of the acquisition is numeric type parameter and the verification rule type is range school When testing, the data of numeric type parameter numberical range corresponding with the range check is compared, if the number The data of word type parameter are in the corresponding numberical range of the range check, then parameter verification passes through.
Preferably, it is described when successful to the parameter verification in the corresponding interface of the interface call request, described in releasing The interception of interface call request, comprising:
When successful to the parameter verification in the corresponding interface of the interface call request, the verification shape of the parameter is stored State, and monitor the verification state of all parameters in the verification note;
When the verification state for monitoring all parameters in the verification note is to verify successfully, releases the interface and call The interception of request.
Preferably, otherwise described send failure feedback information, comprising:
When failing to the parameter verification in the corresponding interface of the interface call request, the ginseng of the verification failure is recorded Number and verification rule type corresponding with the parameter of the verification failure;
According to the parameter of the verification failure of the record and verification rule type information corresponding with the parameter of verification failure It is fed back.
Disclosed herein as well is a kind of parameter calibrator based on calling interface, described device includes:
Request blocking module: it is set as obtaining interface call request, the interface call request be intercepted, and to institute The corresponding interface of interface call request is stated to be detected;
Detection module: it is set as when detecting that the corresponding interface of the interface call request has verification to explain, to described Parameter in the corresponding interface of interface call request is verified;
Parameter verification module: being set as when successful to the parameter verification in the corresponding interface of the interface call request, The interception of the interface call request is released, failure feedback information is otherwise sent.
Disclosed herein as well is a kind of computer equipment, the computer equipment includes memory and processor, described to deposit Computer-readable instruction is stored in reservoir to be made when the computer-readable instruction is executed by one or more processors Obtain the step of one or more processors execute parameter verification method described above.
Disclosed herein as well is a kind of storage medium, the storage medium can be read and write by processor, and the storage medium is deposited Computer instruction is contained, when the computer-readable instruction is executed by one or more processors, so that one or more processing Device executes the step of parameter verification method described above.
The beneficial effect of the application is: the application intercepted by the interface to calling and to the parameter in interface into Row verification, can be improved the efficiency of parameter verification, reduce the error rate of interface code, and reduce since parameter verification bring connects Mouth change workload.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of parameter verification method based on calling interface of the embodiment of the present application;
Fig. 2 is a kind of flow diagram of parameter verification method based on calling interface of the embodiment of the present application;
Fig. 3 is a kind of flow diagram of parameter verification method based on calling interface of the embodiment of the present application;
Fig. 4 is a kind of flow diagram of parameter verification method based on calling interface of the embodiment of the present application;
Fig. 5 is a kind of flow diagram of parameter verification method based on calling interface of the embodiment of the present application;
Fig. 6 is a kind of flow diagram of parameter verification method based on calling interface of the embodiment of the present application;
Fig. 7 is a kind of parameter calibrator structural schematic diagram based on calling interface of the embodiment of the present application.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.
A kind of parameter verification method flow based on calling interface of the embodiment of the present application is as shown in Figure 1, the present embodiment packet Include following steps:
Step s101 obtains interface call request, intercepts to the interface call request, and calls to the interface Corresponding interface is requested to be detected;
Specifically, client can be initiated to request, some or certain interfaces are requested to server-side by interface call request, The interface when called, can first verify the parameter in called interface, it is ensured that the safety of data and accurate Property.
Specifically, if to be verified to the parameter of called interface it may first have to realize and be connect to what needs verified Mouth setting verification scheme, the verification scheme can be by progress of appending notes on called interface, and the note can be to one Or multiple parameters are verified, the rule of the verification can be set in advance, such as infuse on called interface plus@fields Solution, Fields ({ " id ", " name " }) can with checking parameter id and name whether non-empty, Fields (value={ " Name " }, decimals={@DecimalRange (fieldName=" id ", max=" 100 ", min=" 10 ") }) it can school Name non-empty is tested, id is greater than 10 less than 100;There is no need to clients and server-side to be modified, only need to be on called interface Note.When receiving interface call request, interface call request can be intercepted, the interception can be by configuration text Introduce blocker in part, such as introduce ValidationInterceptor in Spring configuration file, in this way receive it is any When one interface call request, it can all enter and intercept, then judge whether the intercepted corresponding interface of interface call request has Verification is explained, that is, whether the interface requested has@Fields label.
Step s102, when detecting that the corresponding interface of the interface call request has verification to explain, to the interface tune It is verified with the parameter in the corresponding interface of request;
Specifically, after interface call request is intercepted, if detecting that called interface has@Fields label, that The called interface of explanation needs to carry out parameter verification, and the parameter that the needs verify further includes specific in verification is explained Verification rule, for example, Fields ({ " id ", " name " }) can with checking parameter id and name whether non-empty, Fields (value={ " name " }, decimals={@DecimalRange (fieldName=" id ", max=" 100 ", min=" 10 " name non-empty can) }) be verified, it can specifically include the parameter for needing verify in verification is explained that id, which is greater than 10 less than 100, And verification rule corresponding with the parameter, for each parameter due to type difference, the rule type of verification is also different, this When can to verification explain in parameter verify one by one, until verification explain in all parameter verifications finish until.
Specifically, after interface call request is intercepted, if detecting that called interface does not have@Fields label, I.e. called interface does not need to carry out parameter verification, then currently called interface can call directly, current interface is blocked Cutting directly to release.
Step s103 connects described in releasing when successful to the parameter verification in the corresponding interface of the interface call request Otherwise the interception of mouth call request sends failure feedback information.
Specifically, each of described verification note can be obtained after verifying one by one to the parameter in verification note The check results of parameter, the check results include the state successfully and to fail;When each parameter in the verification note When check results are all successfully, illustrate the data in called interface be all it is safe, can safety the calling interface, because This can release the currently interception to the interface;If the check results of at least one parameter are to lose in the verification note When losing, illustrate called interface be it is unsafe, cannot safety the calling interface, therefore the currently interception to the interface It cannot be released from, and check results information can be sent after verifying to all parameters, the check results information can wrap The parameter of parameter and this verification failure containing this verification failure is verified according to what verification rule type, with This lets the user know that how to modify data, allows calling interface can be by security invocation.
In the present embodiment, intercept and verify the parameter in interface, Ke Yiti by the interface to calling The efficiency of high parameter verification reduces the error rate of interface code, and reduces since parameter verification bring interface changes workload.
Fig. 2 is a kind of parameter verification method flow schematic diagram based on calling interface of the embodiment of the present application, as shown, The step s101 obtains interface call request, intercepts to the interface call request, and to the interface call request Corresponding interface is detected, comprising:
Step s201, get parms verification demand, and presets verification on interface according to the parameter verification demand and explain;
Specifically, collecting parameter verification demand before interface is called, the parameter verification demand includes described connects Whether mouth is verified, and if necessary to verify, then which parameter is verified, and according to these parameter verifications Demand is preset verification on interface and is explained, and the verification is explained can be by way of adding@fields on interface and explaining, example Such as, Fields ({ " id ", " name " }) can with checking parameter id and name whether non-empty, Fields (value={ " Name " }, decimals={@DecimalRange (fieldName=" id ", max=" 100 ", min=" 10 ") }) it can school Name non-empty is tested, id is greater than 10 less than 100.
Step s202 intercepts the interface call request when getting interface call request, and described in detection Whether the corresponding interface of interface call request includes that verification is explained.
Specifically, can be intercepted to the interface call request, and connect to described when receiving interface call request Mouth call request carries out the detection of verification note to the corresponding interface of the interface call request after intercepting, what the verification was explained Detection can detect whether@Fields label on called interface, if there is@by the judgement of@Fields Fields illustrates that this called interface needs to carry out parameter verification, if not having@Fields, illustrates that this is called Interface does not need to carry out parameter verification, can call directly.
In the present embodiment, is explained by default verification and the interface of calling is detected to examine and explained, can be improved to parameter The efficiency of verification.
In one embodiment, the step s202, when getting interface call request, to the interface call request It is intercepted, and detects whether the corresponding interface of the interface call request includes after verification is explained, comprising:
When detecting that the corresponding interface no parity check of the interface call request is explained, the interface call request is released It intercepts.
Specifically, when being detected to the corresponding interface of the interface call request, if not finding any note, Illustrate currently to be called interface without being verified, therefore the interception of the interface call request can be released, to currently being adjusted It can be with security invocation with interface.
In the present embodiment, by the detection explained called interface, can be called interface with security invocation, improve interface The safety of calling.
Fig. 3 is a kind of parameter verification method flow schematic diagram based on calling interface of the embodiment of the present application, as shown, The step s102 asks interface calling when detecting that the corresponding interface of the interface call request has verification to explain The parameter in corresponding interface is asked to be verified, comprising:
Step s301, the verification rule type of parameter preset;
Specifically, the verification rule type of parameter can have 3 kinds, respectively non-empty verification, type checking and range check, Whether value of the non-empty verification for checking parameter is empty;Whether type of the type checking for checking parameter accords with Close, such as whether integer, whether character;Whether correct value range of the range check for checking parameter be.
Step s302, when detecting that the corresponding interface of the interface call request has verification to explain, according to the parameter Verification rule type the parameter in the corresponding interface of the interface call request is verified.
Specifically, when being verified to the parameter in verification note, due to each parameter in the verification note There is the verification rule type of oneself, for example, whether Fields ({ " id ", " name " }) can non-with checking parameter id and name Sky ,@Fields (value={ " name " }, decimals={@DecimalRange (fieldName=" id ", max=" 100 ", " 10 " min=) }) name non-empty can be verified, id is greater than 10 less than 100, therefore can be according to each of verification note The verification rule type of parameter verifies parameter.
In the present embodiment, the parameter in verification note is verified by the verification rule type in verification note, it can Effectively parameter is verified, improves parameter verification efficiency.
Fig. 4 is a kind of parameter verification method flow schematic diagram based on calling interface of the embodiment of the present application, as shown, The step s302, when detecting that the corresponding interface of the interface call request has verification to explain, according to the school of the parameter Rule type is tested to verify the parameter in the corresponding interface of the interface call request, comprising:
Step s401 obtains the verification when detecting that the corresponding interface of the interface call request has verification to explain Json format check parameter and verification rule type corresponding with the json format check parameter in note;
Specifically, since the verification note of interface being arranged before being intercepted to called interface, it is described The setting that verification is explained includes needing the parameter verified and verification rule type corresponding with the parameter for needing to verify, example Such as, Fields ({ " id ", " name " }) can with checking parameter id and name whether non-empty, Fields (value={ " Name " }, decimals={@DecimalRange (fieldName=" id ", max=" 100 ", min=" 10 ") }) it can school Name non-empty is tested, id is greater than 10 less than 100;Therefore, when detect the corresponding interface of the interface call request have verification explain When, can be read verification explain in detailed content, obtain the verification explain in the parameter that needs to verify and with the needs The corresponding verification rule type of the parameter of verification;The parameter of the verification can be the data of json format, the verification rule Type includes non-empty verification, type checking and range check, and the non-empty verifies the value for the checking parameter to json format It is verified, judges whether it is empty;The type checking is used to verify the type of the checking parameter of json format, judges Whether the type of the checking parameter of the json format meets;The range check is used for taking to the checking parameter of json format Whether value range is verified, judge the value of the checking parameter of the json format in reasonable interval.
Step s402, when the json format check parameter of the acquisition is numeric type parameter and the verification rule type When for range check, the data of numeric type parameter numberical range corresponding with the range check is compared, such as The data of numeric type parameter described in fruit are in the corresponding numberical range of the range check, then parameter verification passes through.
Specifically, when getting the json format parameter for needing to verify in the verification note and needing to verify with described The corresponding verification rule type of json format parameter after, can be according to the verification corresponding with the json format check parameter Rule type verifies the json format check parameter in the verification note respectively, if the json format of the acquisition Checking parameter is numeric type parameter and the verification rule type is range check, can be by the data of the numeric type parameter Numberical range corresponding with the range check is compared, if the data of the numeric type parameter are in the range check In corresponding numberical range, then parameter verification passes through;If the json format check parameter of the acquisition is character string type ginseng The several and described verification rule type is non-empty verification, the data of the character string type type parameter can be carried out non-empty detection, such as The data of character string type parameter described in fruit are non-empty, then parameter verification passes through;If the json format check of the acquisition is joined Number is character string type parameter and the verification rule type is type checking, can by the data of the character string type parameter with The corresponding type of the type checking is compared, if the data of the character string type parameter are corresponding with the type checking Type matching in, then parameter verification passes through.
In the present embodiment, parameter is verified by obtaining the information in verification note, effectively parameter can be carried out Verification improves parameter verification efficiency.
Fig. 5 is a kind of parameter verification method flow schematic diagram based on calling interface of the embodiment of the present application, as shown, The step s103 releases the interface tune when successful to the parameter verification in the corresponding interface of the interface call request With the interception of request, comprising:
Step s501 stores the ginseng when successful to the parameter verification in the corresponding interface of the interface call request Several verification states, and monitor the verification state of all parameters in the verification note;
Specifically, due to verification explain in may more than one parameter need to verify, can parameter verification success when, The check results of the parameter are stored, such as verify successfully or verify failure, and all parameters in verification note are carried out It verifies one by one, during to the progress verification one by one of all parameters in explaining is verified, monitors and own in the verification note The check results of parameter.
Step s502 releases institute when the verification state for monitoring all parameters in the verification note is to verify successfully State the interception of interface call request.
Specifically, owning in the verification note after all parameter verifications in verification note if monitored The check results of parameter are that when verifying successfully, at this moment can release the interception of the interface call request, allow current interface quilt Security invocation.
In the present embodiment, it is monitored by the inspection result of all parameters in explaining verification, and according to check results Interface is called, the safety of calling interface can be enhanced.
Fig. 6 is a kind of parameter verification method flow schematic diagram based on calling interface of the embodiment of the present application, as shown, Otherwise the step s103 sends failure feedback information, comprising:
Step s601 records the school when failing to the parameter verification in the corresponding interface of the interface call request Test failure parameter and with the corresponding verification rule type of parameter of the verification failure;
Specifically, when to verification explain in parameter verification fail when, can record under it is described verification failure parameter and with The corresponding verification rule type of parameter of the verification failure, then carries out the verification of next parameter, in verification is explained All parameter verifications finish until.
Step s602, according to the parameter of the verification failure of the record and verification rule corresponding with the parameter of verification failure Type information is fed back.
Specifically, the parameter of the feedback is pre-set checking parameter during verification is explained, and the parameter of the feedback It is the parameter of verification failure, that is, verifies successful parameter and do not need to feed back, in order to allow user to be clear from the checking parameter school The reason of testing unsuccessfully, it can will be fed back together with the corresponding verification rule type of parameter of the verification failure.
It in the present embodiment, by the record to check results information and feeds back, the safety of calling interface can be enhanced Property, improve the experience of user.
A kind of parameter calibrator structure based on calling interface of the embodiment of the present application as shown in fig. 7, comprises:
Request blocking module 701, detection module 702 and parameter verification module 703;Wherein, request blocking module 701 and inspection It surveys module 702 to be connected, detection module 702 is connected with parameter verification module 703;Request blocking module 701 is set as obtaining interface Call request intercepts the interface call request, and detects to the corresponding interface of the interface call request;Inspection Module 702 is surveyed to be set as calling the interface when detecting that the corresponding interface of the interface call request has verification to explain The parameter in corresponding interface is requested to be verified;Parameter verification module 703 is set as when corresponding to the interface call request Interface in parameter verification success when, release the interception of the interface call request, otherwise send failure feedback information.
The embodiment of the present application also discloses a kind of computer equipment, and the computer equipment includes memory and processor, Computer-readable instruction is stored in the memory, the computer-readable instruction is executed by one or more processors When, so that one or more processors execute the step in parameter verification method described in the various embodiments described above.
The embodiment of the present application also discloses a kind of storage medium, and the storage medium can be read and write by processor, the storage Device is stored with computer-readable instruction, when the computer-readable instruction is executed by one or more processors so that one or Multiple processors execute the step in parameter verification method described in the various embodiments described above.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between In matter, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can be The non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random storage note Recall body (Random Access Memory, RAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of parameter verification method based on calling interface, which comprises the following steps:
Interface call request is obtained, the interface call request is intercepted, and is connect to the interface call request is corresponding Mouth is detected;
It is corresponding to the interface call request to connect when detecting that the corresponding interface of the interface call request has verification to explain Parameter in mouthful is verified;
When successful to the parameter verification in the corresponding interface of the interface call request, blocking for the interface call request is released It cuts, otherwise sends failure feedback information.
2. the parameter verification method based on calling interface as described in claim 1, which is characterized in that the acquisition interface calls Request, intercepts the interface call request, and detect to the corresponding interface of the interface call request, comprising:
Get parms verification demand, and presets verification on interface according to the parameter verification demand and explain;
When getting interface call request, the interface call request is intercepted, and detects the interface call request Whether corresponding interface includes that verification is explained.
3. the parameter verification method based on calling interface as claimed in claim 2, which is characterized in that described to get interface When call request, the interface call request is intercepted, and detects whether the corresponding interface of the interface call request wraps After being explained containing verification, comprising:
When detecting that the corresponding interface no parity check of the interface call request is explained, blocking for the interface call request is released It cuts.
4. the parameter verification method based on calling interface as described in claim 1, which is characterized in that described described when detecting When the corresponding interface of interface call request has verification to explain, school is carried out to the parameter in the corresponding interface of the interface call request It tests, comprising:
The verification rule type of parameter preset;
When detecting that the corresponding interface of the interface call request has verification to explain, according to the verification rule type of the parameter Parameter in the corresponding interface of the interface call request is verified.
5. the parameter verification method based on calling interface as claimed in claim 4, which is characterized in that described described when detecting When the corresponding interface of interface call request has verification to explain, interface calling is asked according to the verification rule type of the parameter The parameter in corresponding interface is asked to be verified, comprising:
When detecting that the corresponding interface of the interface call request has verification to explain, the json lattice in the verification note are obtained Formula checking parameter and verification rule type corresponding with the json format check parameter;
When the json format check parameter of the acquisition is numeric type parameter and the verification rule type is range check, The data of numeric type parameter numberical range corresponding with the range check is compared, if the numeric type The data of parameter are in the corresponding numberical range of the range check, then parameter verification passes through.
6. the parameter verification method based on calling interface as described in claim 1, which is characterized in that described when to the interface When parameter verification in the corresponding interface of call request is successful, the interception of the interface call request is released, comprising:
When successful to the parameter verification in the corresponding interface of the interface call request, the verification state of the parameter is stored, And monitor the verification state of all parameters in the verification note;
When the verification state for monitoring all parameters in the verification note is to verify successfully, the interface call request is released Interception.
7. the parameter verification method based on calling interface as claimed in claim 5, which is characterized in that described otherwise to send failure Feedback information, comprising:
When in the corresponding interface of the interface call request parameter verification fail when, record it is described verification failure parameter and Verification rule type corresponding with the parameter of the verification failure;
It is carried out according to the parameter of the verification failure of the record and verification rule type information corresponding with the parameter of verification failure Feedback.
8. a kind of parameter calibrator based on calling interface, which is characterized in that described device includes:
Request blocking module: it is set as obtaining interface call request, the interface call request is intercepted, and is connect to described The corresponding interface of mouth call request is detected;
Detection module: it is set as when detecting that the corresponding interface of the interface call request has verification to explain, to the interface Parameter in the corresponding interface of call request is verified;
Parameter verification module: it is set as releasing when successful to the parameter verification in the corresponding interface of the interface call request Otherwise the interception of the interface call request sends failure feedback information.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, in the memory It is stored with computer-readable instruction, when the computer-readable instruction is executed by one or more processors, so that one Or multiple processors are executed as described in any one of claims 1 to 7 the step of parameter verification method.
10. a kind of storage medium, which is characterized in that the storage medium can be read and write by processor, and the storage medium is stored with Computer instruction, when the computer-readable instruction is executed by one or more processors, so that one or more processors are held Row is as described in any one of claims 1 to 7 the step of parameter verification method.
CN201910297841.6A 2019-04-15 2019-04-15 Parameter verification method and relevant device based on calling interface Pending CN110147261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910297841.6A CN110147261A (en) 2019-04-15 2019-04-15 Parameter verification method and relevant device based on calling interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910297841.6A CN110147261A (en) 2019-04-15 2019-04-15 Parameter verification method and relevant device based on calling interface

Publications (1)

Publication Number Publication Date
CN110147261A true CN110147261A (en) 2019-08-20

Family

ID=67589721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910297841.6A Pending CN110147261A (en) 2019-04-15 2019-04-15 Parameter verification method and relevant device based on calling interface

Country Status (1)

Country Link
CN (1) CN110147261A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110673838A (en) * 2019-09-10 2020-01-10 四川新网银行股份有限公司 Input checking method
CN111045937A (en) * 2019-11-29 2020-04-21 广州品唯软件有限公司 Interface calling test method, server and storage medium
CN111064725A (en) * 2019-12-12 2020-04-24 广州鲁邦通物联网科技有限公司 Code zero intrusion interface verification method and device
CN111131221A (en) * 2019-12-19 2020-05-08 中国平安财产保险股份有限公司 Interface checking device, method and storage medium
CN111191246A (en) * 2019-12-19 2020-05-22 杭州安恒信息技术股份有限公司 Spring annotation based security development verification method
CN111314306A (en) * 2020-01-17 2020-06-19 网易(杭州)网络有限公司 Interface access method and device, electronic equipment and storage medium
CN111984713A (en) * 2020-06-29 2020-11-24 五八到家有限公司 Data processing method, device, equipment and storage medium
CN112181804A (en) * 2020-08-31 2021-01-05 五八到家有限公司 Parameter checking method, equipment and storage medium
CN112241370A (en) * 2020-10-21 2021-01-19 网易(杭州)网络有限公司 Verification method, system and device for API (application program interface) interface class
CN112306879A (en) * 2020-11-02 2021-02-02 平安普惠企业管理有限公司 Interface parameter checking method, device, equipment and storage medium
CN112579340A (en) * 2020-12-10 2021-03-30 潍柴动力股份有限公司 Data verification method, device and equipment of electronic control unit and storage medium
CN112612720A (en) * 2020-12-31 2021-04-06 中国农业银行股份有限公司 Attribute checking method, attribute checking device, attribute checking equipment and attribute checking medium
CN112905455A (en) * 2021-02-05 2021-06-04 北京有竹居网络技术有限公司 Interface information checking method, device, equipment and storage medium
CN113254951A (en) * 2021-04-23 2021-08-13 天津车之家数据信息技术有限公司 Data processing method and computing device
CN113608913A (en) * 2021-08-05 2021-11-05 上海微盟企业发展有限公司 Parameter checking method, system, device and storage medium
CN114189559A (en) * 2021-12-14 2022-03-15 平安付科技服务有限公司 Interface repeat request processing method and system based on Axios
CN114257583A (en) * 2021-12-22 2022-03-29 贵州东彩供应链科技有限公司 Safe downloading method for solving JWT authorization

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013107403A1 (en) * 2012-01-20 2013-07-25 华为技术有限公司 Method, device and system for using and invoking oauth api
CN106528185A (en) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 Application interface management method and apparatus
CN106991023A (en) * 2017-03-22 2017-07-28 深圳市彬讯科技有限公司 A kind of interface parameters method of calibration and component
CN107302526A (en) * 2017-06-07 2017-10-27 努比亚技术有限公司 System interface call method, equipment and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013107403A1 (en) * 2012-01-20 2013-07-25 华为技术有限公司 Method, device and system for using and invoking oauth api
CN106528185A (en) * 2015-09-09 2017-03-22 阿里巴巴集团控股有限公司 Application interface management method and apparatus
CN106991023A (en) * 2017-03-22 2017-07-28 深圳市彬讯科技有限公司 A kind of interface parameters method of calibration and component
CN107302526A (en) * 2017-06-07 2017-10-27 努比亚技术有限公司 System interface call method, equipment and computer-readable recording medium

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110673838A (en) * 2019-09-10 2020-01-10 四川新网银行股份有限公司 Input checking method
CN111045937A (en) * 2019-11-29 2020-04-21 广州品唯软件有限公司 Interface calling test method, server and storage medium
CN111045937B (en) * 2019-11-29 2023-08-18 广州品唯软件有限公司 Interface call testing method, server and storage medium
CN111064725A (en) * 2019-12-12 2020-04-24 广州鲁邦通物联网科技有限公司 Code zero intrusion interface verification method and device
CN111131221A (en) * 2019-12-19 2020-05-08 中国平安财产保险股份有限公司 Interface checking device, method and storage medium
CN111191246A (en) * 2019-12-19 2020-05-22 杭州安恒信息技术股份有限公司 Spring annotation based security development verification method
CN111314306A (en) * 2020-01-17 2020-06-19 网易(杭州)网络有限公司 Interface access method and device, electronic equipment and storage medium
CN111984713A (en) * 2020-06-29 2020-11-24 五八到家有限公司 Data processing method, device, equipment and storage medium
CN112181804A (en) * 2020-08-31 2021-01-05 五八到家有限公司 Parameter checking method, equipment and storage medium
CN112181804B (en) * 2020-08-31 2023-09-08 五八到家有限公司 Parameter verification method, device and storage medium
CN112241370A (en) * 2020-10-21 2021-01-19 网易(杭州)网络有限公司 Verification method, system and device for API (application program interface) interface class
CN112241370B (en) * 2020-10-21 2023-06-16 网易(杭州)网络有限公司 API interface class checking method, system and device
CN112306879A (en) * 2020-11-02 2021-02-02 平安普惠企业管理有限公司 Interface parameter checking method, device, equipment and storage medium
CN112579340A (en) * 2020-12-10 2021-03-30 潍柴动力股份有限公司 Data verification method, device and equipment of electronic control unit and storage medium
CN112579340B (en) * 2020-12-10 2023-03-21 潍柴动力股份有限公司 Data verification method, device and equipment of electronic control unit and storage medium
CN112612720A (en) * 2020-12-31 2021-04-06 中国农业银行股份有限公司 Attribute checking method, attribute checking device, attribute checking equipment and attribute checking medium
CN112905455A (en) * 2021-02-05 2021-06-04 北京有竹居网络技术有限公司 Interface information checking method, device, equipment and storage medium
CN113254951A (en) * 2021-04-23 2021-08-13 天津车之家数据信息技术有限公司 Data processing method and computing device
CN113608913A (en) * 2021-08-05 2021-11-05 上海微盟企业发展有限公司 Parameter checking method, system, device and storage medium
CN114189559A (en) * 2021-12-14 2022-03-15 平安付科技服务有限公司 Interface repeat request processing method and system based on Axios
CN114189559B (en) * 2021-12-14 2024-02-06 平安付科技服务有限公司 Axios-based interface repeated request processing method and system
CN114257583A (en) * 2021-12-22 2022-03-29 贵州东彩供应链科技有限公司 Safe downloading method for solving JWT authorization

Similar Documents

Publication Publication Date Title
CN110147261A (en) Parameter verification method and relevant device based on calling interface
US9117027B2 (en) Method and system for compliance testing in a cloud storage environment
US20220231834A1 (en) Audit chain for private blockchain
US10452527B2 (en) System and method for facilitating field testing of a test application
US7139775B2 (en) Method and arrangement for providing an audit of a replica database
US9111019B2 (en) Modeling and testing interactions between components of a software system
US20130174156A1 (en) Measuring Transaction Performance Across Application Asynchronous Flows
US20140237293A1 (en) Application monitoring through continuous record and replay
US20090031171A1 (en) Apparatus, system, and method for responsive acquisition of remote debug data
EP2513800A1 (en) Methods and systems of detecting and analyzing correlated operations in a common storage
US7702613B1 (en) System and methods for validating and distributing test data
EP3790221A1 (en) Automated hash validation
US11349713B2 (en) Real-time configuration check framework
US8874732B1 (en) System and method for end-to-end network-based services usage metering validation
CN114201408A (en) Regression testing method, device, computer equipment and storage medium
US10248544B2 (en) System and method for automatic root cause detection
Rynge et al. Integrity protection for scientific workflow data: Motivation and initial experiences
US20170286274A1 (en) Transaction stitching definitions
US11057215B1 (en) Automated hash validation
CN108763934B (en) Data processing method and device, storage medium and server
CN114095177A (en) Information security processing method and device, electronic equipment and storage medium
CN115480970A (en) Performance test method, device, equipment and storage medium
US7991663B1 (en) System for volume and stress testing bank debit card processing systems
Oppermann et al. Anomaly Detection Approaches for Secure Cloud Reference Architectures in Legal Metrology.
CN111191273B (en) Method and device for processing document, electronic equipment and readable 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