CN112528307A - Service request checking method and device, electronic equipment and storage medium - Google Patents

Service request checking method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112528307A
CN112528307A CN202011502233.3A CN202011502233A CN112528307A CN 112528307 A CN112528307 A CN 112528307A CN 202011502233 A CN202011502233 A CN 202011502233A CN 112528307 A CN112528307 A CN 112528307A
Authority
CN
China
Prior art keywords
verification
access request
interface
service access
service
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
CN202011502233.3A
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 Bank Co Ltd
Original Assignee
Ping An Bank 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 Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011502233.3A priority Critical patent/CN112528307A/en
Publication of CN112528307A publication Critical patent/CN112528307A/en
Pending 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/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention relates to the field of testing, and discloses a service request checking method, which comprises the following steps: receiving a service access request of a client, and accessing a pre-established filter in a software development kit corresponding to the service access request; performing data verification on the service access request by using a verification rule in the filter; and when the data verification of the service access request is successful, calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result. The invention also provides a service request checking device, electronic equipment and a storage medium. In addition, the invention also relates to a block chain technology, and the check rule can be stored in the block chain. The invention can improve the time efficiency of service request verification.

Description

Service request checking method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of testing, and in particular, to a method and an apparatus for checking a service request, an electronic device, and a computer-readable storage medium.
Background
When a service request is sent to a server, the service request is generally subjected to interception and verification to ensure the safety and reliability of the service request, at present, the interception and verification of the service request are generally realized by adopting a verification rule configured by a filter, but because the filter is generally packaged in one frame, the frame is limited to use the corresponding filter, and other frames cannot call the packaged filter, a plurality of filters need to be configured when the service request is carried out through different frames, so that a large time cost is brought to developers, and the timeliness of the service request verification is also influenced.
Disclosure of Invention
The invention provides a service request checking method, a service request checking device, electronic equipment and a computer readable storage medium, and mainly aims to improve the service request checking timeliness.
In order to achieve the above object, a service request verification method provided by the present invention includes:
receiving a service access request of a client, and accessing a pre-established filter in a software development kit corresponding to the service access request;
performing data verification on the service access request by using a verification rule in the filter;
and when the data verification of the service access request is successful, calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result.
Optionally, the accessing a pre-created filter in a software development kit corresponding to the service access request includes:
acquiring an interface address of the filter and a compiling environment of the software development kit;
and loading the interface address into the compiling environment by using a preset link instruction.
Optionally, the performing data check on the service access request by using a check rule in the filter includes:
calculating the edit distance between the service access request and the check logic in the check rule, and selecting the check logic of which the edit distance is smaller than a preset threshold value to obtain the service check logic;
and executing the verification of the service access request according to the verification mode of the verification rule and the service verification logic.
Optionally, before the invoking of the service-side interface corresponding to the client performs interface verification on the service access request, the method further includes:
and acquiring an interface parameter object of the server-side interface, converting the interface parameter object into a corresponding interface response message, and analyzing the interface response message to generate a corresponding interface verification script.
Optionally, the performing interface verification on the service access request by using the server interface corresponding to the client to obtain a verification result includes:
transmitting the service access request to a server interface corresponding to the client;
and carrying out interface verification on the transmitted service access request by using an interface verification script in the server-side interface to obtain a verification result.
Optionally, the performing interface verification on the transmitted service access request by using an interface verification script in the server-side interface includes:
calculating the matching degree of the service access request and an interface response message in the interface verification script;
if the matching degree is not greater than the preset matching degree, the service access request fails to be checked;
and if the matching degree is greater than the preset matching degree, the service access request is verified successfully.
Optionally, the calculating a matching degree between the service access request and the interface verification script includes:
calculating the matching degree of the service access request and the interface verification script by using the following method:
Figure BDA0002843789980000021
wherein T (x, y) represents a degree of matching, xiIndicates the ith service access request, y, of the service access requestsiAnd the ith interface response message in the interface verification script.
In order to solve the above problem, the present invention further provides a service request verifying apparatus, including:
the access module is used for receiving a service access request of a client and accessing a pre-established filter in a software development kit corresponding to the service access request;
the filter checking module is used for carrying out data checking on the service access request by using the checking rule in the filter;
and the interface verification module is used for calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result when the service access request is successfully verified.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to implement the service request validation method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the service request checking method described above.
The embodiment of the invention firstly receives the service access request of the client, and accesses the pre-established filter in the software development kit corresponding to the service access request, thereby avoiding the need of configuring different filters to execute the interception verification of the corresponding service access request, realizing the generalization of the filter and improving the timeliness of the service request verification; secondly, the embodiment of the invention carries out data verification on the service access request by using the verification rule in the filter, calls the server interface corresponding to the client to carry out interface verification on the service access request when the service access request is successfully verified to obtain a verification result, and adopts a verification mode of the filter and the server interface to ensure the accuracy and reliability of the service request verification. Therefore, the service request verification method, the service request verification device, the electronic equipment and the storage medium provided by the invention can improve the time efficiency of service request verification.
Drawings
Fig. 1 is a schematic flowchart of a service request verification method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart illustrating a step of the service request checking method provided in FIG. 1 according to a first embodiment of the present invention;
fig. 3 is a block diagram of a service request checking apparatus according to an embodiment of the present invention;
fig. 4 is a schematic internal structural diagram of an electronic device implementing a service request verification method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a service request checking method. The execution subject of the service request verification method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the service request verification method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flow chart of a service request verification method according to an embodiment of the present invention. In the embodiment of the present invention, the service request checking method includes:
and S1, receiving a service access request of the client, and accessing a pre-created filter in a software development kit corresponding to the service access request.
In the embodiment of the present invention, the client may also be referred to as a mobile terminal, and is configured to access a web page, including a PC. The server side access request refers to the requirement for accessing the server side service, such as user login requirement, searching an IP address of a certain server, inquiring a shopping mall order and the like. The Software Development Kit (SDK) refers to a set of development tools used by a software engineer to build application software for a specific software package, software framework, hardware platform, operating system, and the like.
Further, it should be understood that when accessing a web resource of a server, many illegal data may exist in a corresponding service access request, for example, a character encoding format is wrong, access rights are blocked, user information is wrong, and the like, and therefore, the present invention provides a method for intercepting illegal data in the service access request by accessing a pre-created filter in a software development kit corresponding to the service access request, so as to ensure normal access of the service access request.
In detail, the accessing a pre-created filter in a software development kit corresponding to the service access request includes: acquiring an interface address of the filter and a compiling environment of the software development kit; and loading the interface address into the compiling environment by using a preset link instruction.
The interface address refers to a link address configured when the filter is created, the compiling environment refers to a code compiling environment of the software tool development kit, such as Myeclipse, and the preset link instruction is a herf instruction for realizing access of the filter.
Further, in an embodiment of the present invention, the filter is developed by using a Java framework, where the Java framework includes: the system comprises a Spring framework, a Mybatis framework and a SpringMVC framework, wherein the filter comprises a filter and a Servlet filter. The filter creation technology belongs to the current mature technology, and is not further described herein.
And S2, performing data verification on the service access request by using the verification rule in the filter.
In this embodiment of the present invention, before the verifying the service access request by using the verification rule in the filter, the method further includes: and configuring a checking rule in the filter by using a preset data checking tool. The data verification tool is essentially independent item software and compiled by adopting java language, and the data verification tool is introduced into the filter in a jar packet mode to realize configuration of the verification rule. The preset data verification tool comprises: md5 data verification tools, such as sendto md 5.
Further, the check rule includes: the method comprises a check logic and a check mode, wherein the check logic comprises: whether the value of the data is necessary to be filled, whether the letters of the data filling are necessary to be upper and lower cases, the length of the characters of the data filling can not exceed a preset threshold value and the like. The checking mode comprises the following steps: the method comprises the steps that firstly, when an error is encountered, the verification of the remaining configuration items of the subsequent data is immediately stopped, and error data is returned; and secondly, the method is not stopped when an error is encountered until all the configuration items of the data are verified, and all the configuration items of the data with the error are summarized and returned.
Further, the data verification of the service access request by using the verification rule in the filter includes: calculating the edit distance between the service access request and the check logic in the check rule, and selecting the check logic of which the edit distance is smaller than a preset threshold value to obtain the service check logic; and executing the verification of the service access request according to the verification mode of the verification rule and the service verification logic to obtain a verification result. Optionally, the preset threshold is 8.
Further, the calculating the edit distance between the service access request and the check logic in the check rule includes: and calculating the times of mutual conversion between the character length of the service access request and the check logic in the check rule by using an editing function to obtain the editing distance.
In an alternative embodiment of the present invention, the editing function may be an edit [ ] [ ] function.
Further, another embodiment of the present invention further includes: and when the service access request fails to be checked, re-receiving the service access request of the client.
Further, to ensure the availability and privacy of the check rule, the check rule may also be stored in a blockchain node.
And S3, when the data verification of the service access request is successful, calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result.
In the embodiment of the present invention, when the data of the service access request is successfully verified, it indicates that the corresponding service end service can be normally accessed in the service access request, and therefore, in the embodiment of the present invention, the interface verification is performed on the service access request by calling the service end interface corresponding to the client, so as to transmit the corresponding service access request to the corresponding service end service module.
Further, in this embodiment of the present invention, before the invoking the server interface corresponding to the client to perform interface verification on the service access request, the method further includes: and configuring an interface verification script in the server-side interface so as to realize matching with the service access request. Specifically, the configuring an interface verification script in the server interface includes: and acquiring an interface parameter object of the server-side interface, converting the interface parameter object into a corresponding interface response message by using a session method, and analyzing the interface response message through a JavaScript language to generate a corresponding interface verification script.
In detail, referring to fig. 2, the performing interface verification on the service access request by using the server interface corresponding to the client to obtain a verification result includes:
s20, transmitting the service access request to a server interface corresponding to the client;
and S21, performing interface verification on the transmitted service access request by using the interface verification script in the server-side interface to obtain a verification result.
In an optional embodiment, the transmission of the service access request is implemented by a client invoking an http request.
In an optional embodiment, the performing interface verification on the transmitted service access request by using an interface verification script in the service-side interface includes: and calculating the matching degree of the service access request and an interface response message in the interface verification script, if the matching degree is not greater than a preset matching degree, the service access request is failed to be verified, and if the matching degree is greater than the preset matching degree, the service access request is successfully verified. Optionally, the preset matching degree is 0.89.
Further, the matching degree of the service access request and the interface verification script is calculated by the following method:
Figure BDA0002843789980000061
wherein T (x, y) represents a degree of matching, xiIndicates the ith service access request, y, of the service access requestsiAnd the ith interface response message in the interface verification script.
The embodiment of the invention firstly receives the service access request of the client, and accesses the pre-established filter in the software development kit corresponding to the service access request, thereby avoiding the need of configuring different filters to execute the interception verification of the corresponding service access request, realizing the generalization of the filter and improving the timeliness of the service request verification; secondly, the embodiment of the invention carries out data verification on the service access request by using the verification rule in the filter, calls the server interface corresponding to the client to carry out interface verification on the service access request when the service access request is successfully verified to obtain a verification result, and adopts a verification mode of the filter and the server to ensure the accuracy and reliability of the service request verification. Therefore, the invention can improve the time efficiency of service request verification.
Fig. 3 is a functional block diagram of the service request verifying apparatus according to the present invention.
The service request verification apparatus 100 of the present invention may be installed in an electronic device. According to the implemented functions, the service request checking means may include an access module 101, a filter checking module 102, and an interface checking module 103. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the access module 101 is configured to receive a service access request of a client, and access a pre-created filter in a software development kit corresponding to the service access request.
In the embodiment of the present invention, the client may also be referred to as a mobile terminal, and is configured to access a web page, including a PC. The server side access request refers to the requirement for accessing the server side service, such as user login requirement, searching an IP address of a certain server, inquiring a shopping mall order and the like. The Software Development Kit (SDK) refers to a set of Development tools used by a Software engineer to build application Software for a specific Software package, Software framework, hardware platform, operating system, and the like.
Further, it should be understood that when accessing a web resource of a server, many illegal data may exist in a corresponding service access request, for example, a character encoding format is wrong, access rights are blocked, user information is wrong, and the like, and therefore, the present invention provides a method for intercepting illegal data in the service access request by accessing a pre-created filter in a software development kit corresponding to the service access request, so as to ensure normal access of the service access request.
In detail, the access module 101 accesses a pre-created filter in a software development kit corresponding to the service access request, and executes the following steps: acquiring an interface address of the filter and a compiling environment of the software development kit; and loading the interface address into the compiling environment by using a preset link instruction.
The interface address refers to a link address configured when the filter is created, the compiling environment refers to a code compiling environment of the software tool development kit, such as Myeclipse, and the preset link instruction is a herf instruction for realizing access of the filter.
Further, in an embodiment of the present invention, the filter is developed by using a Java framework, where the Java framework includes: the system comprises a Spring framework, a Mybatis framework and a SpringMVC framework, wherein the filter comprises a filter and a Servlet filter. The filter creation technology belongs to the current mature technology, and is not further described herein.
The filter checking module 102 is configured to perform data checking on the service access request by using a checking rule in the filter.
In this embodiment of the present invention, before the verifying the service access request by using the verification rule in the filter, the filter verification module 102 further includes: and configuring a checking rule in the filter by using a preset data checking tool. The data verification tool is essentially independent item software and compiled by adopting java language, and the data verification tool is introduced into the filter in a jar packet mode to realize configuration of the verification rule. The preset data verification tool comprises: md5 data verification tools, such as sendto md 5.
Further, the check rule includes: the method comprises a check logic and a check mode, wherein the check logic comprises: whether the value of the data is necessary to be filled, whether the letters of the data filling are necessary to be upper and lower cases, the length of the characters of the data filling can not exceed a preset threshold value and the like. The checking mode comprises the following steps: the method comprises the steps that firstly, when an error is encountered, the verification of the remaining configuration items of the subsequent data is immediately stopped, and error data is returned; and secondly, the method is not stopped when an error is encountered until all the configuration items of the data are verified, and all the configuration items of the data with the error are summarized and returned.
Further, the data verification is performed on the service access request by using the verification rule in the filter, and the filter verification module 102 performs the following steps: calculating the edit distance between the service access request and the check logic in the check rule, and selecting the check logic of which the edit distance is smaller than a preset threshold value to obtain the service check logic; and executing the verification of the service access request according to the verification mode of the verification rule and the service verification logic to obtain a verification result. Optionally, the preset threshold is 8.
Further, the calculating the edit distance between the service access request and the checking logic in the checking rule, the filter checking module 102 performs the following steps: and calculating the times of mutual conversion between the character length of the service access request and the check logic in the check rule by using an editing function to obtain the editing distance.
In an alternative embodiment of the present invention, the editing function may be an edit [ ] [ ] function.
Further, another embodiment of the present invention further includes: and when the service access request fails to be checked, re-receiving the service access request of the client.
Further, to ensure the availability and privacy of the check rule, the check rule may also be stored in a blockchain node.
The interface verification module 103 is configured to, when the data verification of the service access request is successful, invoke a server interface corresponding to the client to perform interface verification on the service access request, so as to obtain a verification result.
In the embodiment of the present invention, when the data of the service access request is successfully verified, it indicates that the corresponding service end service can be normally accessed in the service access request, and therefore, in the embodiment of the present invention, the interface verification is performed on the service access request by calling the service end interface corresponding to the client, so as to transmit the corresponding service access request to the corresponding service end service module.
Further, in this embodiment of the present invention, before the invoking the server interface corresponding to the client performs interface verification on the service access request, the interface verification module 103 further includes: and configuring an interface verification script in the server-side interface so as to realize matching with the service access request. Specifically, an interface verification script is configured in the server interface, and the interface verification module 103 executes the following steps: and acquiring an interface parameter object of the server-side interface, converting the interface parameter object into a corresponding interface response message by using a session method, and analyzing the interface response message through a JavaScript language to generate a corresponding interface verification script.
In detail, the interface verification is performed on the service access request by using the server interface corresponding to the client to obtain a verification result, and the interface verification module 103 executes the following steps: transmitting the service access request to a server interface corresponding to the client; and carrying out interface verification on the transmitted service access request by using an interface verification script in the server-side interface to obtain a verification result.
In an optional embodiment, the transmission of the service access request is implemented by a client invoking an http request.
In an optional embodiment, the interface verification module 103 performs interface verification on the transmitted service access request by using an interface verification script in the server-side interface, and performs the following steps: and calculating the matching degree of the service access request and an interface response message in the interface verification script, if the matching degree is not greater than a preset matching degree, the service access request is failed to be verified, and if the matching degree is greater than the preset matching degree, the service access request is successfully verified. Optionally, the preset matching degree is 0.89.
Further, the interface verification module 103 calculates a matching degree between the service access request and the interface verification script by using the following method:
Figure BDA0002843789980000091
wherein T (x, y) represents a degree of matching, xiIndicates the ith service access request, y, of the service access requestsiAnd the ith interface response message in the interface verification script.
The embodiment of the invention firstly receives the service access request of the client, and accesses the pre-established filter in the software development kit corresponding to the service access request, thereby avoiding the need of configuring different filters to execute the interception verification of the corresponding service access request, realizing the generalization of the filter and improving the timeliness of the service request verification; secondly, the embodiment of the invention carries out data verification on the service access request by using the verification rule in the filter, calls the server interface corresponding to the client to carry out interface verification on the service access request when the service access request is successfully verified to obtain a verification result, and adopts a verification mode of the filter and the server to ensure the accuracy and reliability of the service request verification. Therefore, the invention can improve the time efficiency of service request verification.
Fig. 4 is a schematic structural diagram of an electronic device implementing the service request verification method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a service request check program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as a code for service request verification, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., performing service request checks, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The service request check 12 stored in the memory 11 of the electronic device 1 is a combination of computer programs that, when executed in the processor 10, enable:
receiving a service access request of a client, and accessing a pre-established filter in a software development kit corresponding to the service access request;
performing data verification on the service access request by using a verification rule in the filter;
and when the data verification of the service access request is successful, calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
receiving a service access request of a client, and accessing a pre-established filter in a software development kit corresponding to the service access request;
performing data verification on the service access request by using a verification rule in the filter;
and when the data verification of the service access request is successful, calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A service request verification method, the method comprising:
receiving a service access request of a client, and accessing a pre-established filter in a software development kit corresponding to the service access request;
performing data verification on the service access request by using a verification rule in the filter;
and when the data verification of the service access request is successful, calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result.
2. The method for verifying the service request according to claim 1, wherein the accessing of the pre-created filter in the software development kit corresponding to the service access request comprises:
acquiring an interface address of the filter and a compiling environment of the software development kit;
and loading the interface address into the compiling environment by using a preset link instruction.
3. The service request validation method of claim 1, wherein the data validation of the service access request using the validation rules in the filter comprises:
calculating the edit distance between the service access request and the check logic in the check rule, and selecting the check logic of which the edit distance is smaller than a preset threshold value to obtain the service check logic;
and executing the verification of the service access request according to the verification mode of the verification rule and the service verification logic.
4. The method for verifying the service request according to claim 1, wherein before invoking the service-side interface corresponding to the client to perform interface verification on the service access request, the method further comprises:
and acquiring an interface parameter object of the server-side interface, converting the interface parameter object into a corresponding interface response message, and analyzing the interface response message to generate a corresponding interface verification script.
5. The method for checking a service request according to any one of claims 1 to 4, wherein the interface checking the service access request by using the server interface corresponding to the client to obtain a check result includes:
transmitting the service access request to a server interface corresponding to the client;
and carrying out interface verification on the transmitted service access request by using an interface verification script in the server-side interface to obtain a verification result.
6. The method for checking service request as claimed in claim 5, wherein the interface checking the transmitted service access request by using an interface checking script in the service-side interface comprises:
calculating the matching degree of the service access request and an interface response message in the interface verification script;
if the matching degree is not greater than the preset matching degree, the service access request fails to be checked;
and if the matching degree is greater than the preset matching degree, the service access request is verified successfully.
7. The method for checking service request according to claim 6, wherein the calculating the matching degree of the service access request and the interface checking script comprises:
calculating the matching degree of the service access request and the interface verification script by using the following method:
Figure FDA0002843789970000021
wherein T (x, y) represents a degree of matching, xiIndicates the ith service access request, y, of the service access requestsiAnd the ith interface response message in the interface verification script.
8. A service request verification apparatus, the apparatus comprising:
the access module is used for receiving a service access request of a client and accessing a pre-established filter in a software development kit corresponding to the service access request;
the filter checking module is used for carrying out data checking on the service access request by using the checking rule in the filter;
and the interface verification module is used for calling a server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result when the service access request is successfully verified.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the service request checking method of any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the service request checking method according to any one of claims 1 to 7.
CN202011502233.3A 2020-12-18 2020-12-18 Service request checking method and device, electronic equipment and storage medium Pending CN112528307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011502233.3A CN112528307A (en) 2020-12-18 2020-12-18 Service request checking method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011502233.3A CN112528307A (en) 2020-12-18 2020-12-18 Service request checking method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112528307A true CN112528307A (en) 2021-03-19

Family

ID=75001345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011502233.3A Pending CN112528307A (en) 2020-12-18 2020-12-18 Service request checking method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112528307A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127109A (en) * 2021-05-12 2021-07-16 平安信托有限责任公司 Interface calling method and device, electronic equipment and readable storage medium
CN113221154A (en) * 2021-06-01 2021-08-06 平安信托有限责任公司 Service password obtaining method and device, electronic equipment and storage medium
CN113259322A (en) * 2021-04-19 2021-08-13 山东英信计算机技术有限公司 Method, system and medium for preventing Web service abnormity
CN113364848A (en) * 2021-06-01 2021-09-07 平安银行股份有限公司 File caching method and device, electronic equipment and storage medium
CN113595978A (en) * 2021-06-23 2021-11-02 北京国电通网络技术有限公司 Data communication method based on micro-service architecture and related equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259322A (en) * 2021-04-19 2021-08-13 山东英信计算机技术有限公司 Method, system and medium for preventing Web service abnormity
CN113259322B (en) * 2021-04-19 2022-07-12 山东英信计算机技术有限公司 Method, system and medium for preventing Web service abnormity
CN113127109A (en) * 2021-05-12 2021-07-16 平安信托有限责任公司 Interface calling method and device, electronic equipment and readable storage medium
CN113221154A (en) * 2021-06-01 2021-08-06 平安信托有限责任公司 Service password obtaining method and device, electronic equipment and storage medium
CN113364848A (en) * 2021-06-01 2021-09-07 平安银行股份有限公司 File caching method and device, electronic equipment and storage medium
CN113364848B (en) * 2021-06-01 2024-03-19 平安银行股份有限公司 File caching method and device, electronic equipment and storage medium
CN113595978A (en) * 2021-06-23 2021-11-02 北京国电通网络技术有限公司 Data communication method based on micro-service architecture and related equipment

Similar Documents

Publication Publication Date Title
CN112528307A (en) Service request checking method and device, electronic equipment and storage medium
CN112134739B (en) Link state tracking method and device, electronic equipment and computer storage medium
CN113055380B (en) Message processing method and device, electronic equipment and medium
CN112506779A (en) Software interface testing method and device, electronic equipment and storage medium
CN112506559A (en) Gray scale publishing method and device based on gateway, electronic equipment and storage medium
CN113238929B (en) Code testing method and device based on Mock data, electronic equipment and storage medium
CN113377661A (en) Interface testing method and device, electronic equipment and storage medium
CN115081016A (en) Log desensitization method and device, electronic equipment and storage medium
CN112579452A (en) Software automation test method, device, equipment and storage medium
CN113221154A (en) Service password obtaining method and device, electronic equipment and storage medium
CN113434542A (en) Data relation identification method and device, electronic equipment and storage medium
CN112580079A (en) Authority configuration method and device, electronic equipment and readable storage medium
CN112463414A (en) Multi-client data interaction method and device, electronic equipment and storage medium
CN114826725A (en) Data interaction method, device, equipment and storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN113127109A (en) Interface calling method and device, electronic equipment and readable storage medium
CN114531289A (en) System interaction method based on artificial intelligence and related equipment
CN113377857A (en) Data distribution method and device, electronic equipment and readable storage medium
CN113364848A (en) File caching method and device, electronic equipment and storage medium
CN114185502A (en) Log printing method, device, equipment and medium based on production line environment
CN111859452A (en) Page information checking method, device and equipment and computer readable storage medium
CN112487400A (en) Single sign-on method and device based on multiple pages, electronic equipment and storage medium
CN112528332A (en) Data acquisition method and device, electronic equipment and computer storage medium
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
CN113542387B (en) System release method and device, electronic equipment 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