Service request verification method, device, electronic device and storage medium
By connecting pre-created filters into the software development toolkit and verifying them with the server interface, the complex multi-frame configuration problem in the prior art is solved, and the timeliness and accuracy of service request verification is improved.
Patent Information
- Application Number
- CN202011502233.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2040-12-18
AI Technical Summary
In the prior art, when service request verification, multiple filters need to be configured to adapt to different frameworks, resulting in high development costs and poor timeliness.
The pre-created filter is connected to the software development toolkit corresponding to the client's service access request, and the verification rules in the filter are used for data verification. After successful, the server interface is called for the interface verification.
The filter is universalized, the configuration complexity is reduced, and the timeliness and accuracy of service request verification is improved.
Smart Images

Figure CN112528307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing, and in particular to a service request verification method, device, electronic device and computer-readable storage medium. Background Art
[0002] When a service request is sent to a server, the service request is usually intercepted and verified to ensure the security and reliability of the service request. Currently, the inspection rules configured by the filter are usually used to implement the interception and verification of the service request. However, since the filter is usually encapsulated in a framework, only the corresponding filter is used in this framework, and other frameworks cannot call the encapsulated filter, it is easy to cause multiple filters to be configured when making service requests through different frameworks, which brings a large time cost to developers and also affects the timeliness of service request verification. Summary of the invention
[0003] The present invention provides a service request verification method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the timeliness of service request verification.
[0004] To achieve the above object, the present invention provides a service request verification method, comprising:
[0005] Receive a service access request from a client, and access a pre-created filter in a software development kit corresponding to the service access request;
[0006] Performing data verification on the service access request using the verification rules in the filter;
[0007] When the service access request data verification succeeds, the server interface corresponding to the client is called to perform interface verification on the service access request to obtain a verification result.
[0008] Optionally, the step of accessing a pre-created filter in a software development kit corresponding to the service access request includes:
[0009] Obtaining the interface address of the filter and the compilation environment of the software development kit;
[0010] The interface address is loaded into the compilation environment using a preset link instruction.
[0011] Optionally, performing data verification on the service access request by using a verification rule in a filter includes:
[0012] Calculating the edit distance between the service access request and the verification logic in the verification rule, and selecting the verification logic whose edit distance is less than a preset threshold to obtain the service verification logic;
[0013] The service access request is verified according to the verification method of the verification rule and the service verification logic.
[0014] Optionally, before calling the server interface corresponding to the client to perform interface verification on the service access request, the method further includes:
[0015] The interface parameter object of the server interface is obtained, the interface parameter object is converted into a corresponding interface response message, and the corresponding interface verification script is generated after parsing the interface response message.
[0016] Optionally, performing interface verification on the service access request using a server interface corresponding to the client to obtain a verification result includes:
[0017] Transmitting the service access request to the server interface corresponding to the client;
[0018] The interface verification script in the server interface is used to perform interface verification on the transmitted service access request to obtain a verification result.
[0019] Optionally, performing interface verification on the transmitted service access request by using an interface verification script in the server interface includes:
[0020] Calculating the matching degree between the service access request and the interface response message in the interface verification script;
[0021] If the matching degree is not greater than the preset matching degree, the service access request verification fails;
[0022] If the matching degree is greater than a preset matching degree, the service access request verification is successful.
[0023] Optionally, the calculating the matching degree between the service access request and the interface verification script includes:
[0024] The matching degree between the service access request and the interface verification script is calculated using the following method:
[0025]
[0026] Among them, T(x, y) represents the matching degree, x i represents the i-th service access request in the service access request, y i The response message of the i-th interface in the interface verification script.
[0027] In order to solve the above problem, the present invention also provides a service request verification device, the device comprising:
[0028] An access module, used to receive a service access request from a client, and access a pre-created filter in a software development kit corresponding to the service access request;
[0029] A filter verification module, used to perform data verification on the service access request using the verification rules in the filter;
[0030] The interface verification module is used to call the server interface corresponding to the client to perform interface verification on the service access request when the service access request verification is successful, and obtain a verification result.
[0031] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0032] at least one processor; and,
[0033] a memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to implement the service request verification method described above.
[0035] 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 is executed by a processor in an electronic device to implement the above-mentioned service request verification method.
[0036] The embodiment of the present invention first receives a service access request from a client, and accesses a pre-created filter in the software development kit corresponding to the service access request, thereby avoiding the need to configure different filters to perform interception verification of the corresponding service access request, achieving universalization of the filter, and improving the timeliness of the service request verification; secondly, the embodiment of the present invention uses the verification rules in the filter to perform data verification on the service access request, and when the service access request verification is successful, calls the server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result, and adopts the verification mode of filter + server interface to ensure the accuracy and reliability of the service request verification. Therefore, the service request verification method, device, electronic device, and storage medium proposed by the present invention can improve the timeliness of service request verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flow chart of a service request verification method provided by an embodiment of the present invention;
[0038] Figure 2 In the first embodiment of the present invention Figure 1A detailed flowchart of one of the steps in the service request verification method provided;
[0039] Figure 3 A schematic diagram of a module of a service request verification device provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the internal structure of an electronic device for implementing a service request verification method provided by an embodiment of the present invention;
[0041] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0043] The embodiment of the present application provides a service request verification method. The execution subject of the service request verification method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the service request verification method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0044] Reference Figure 1 FIG. 1 is a flow chart of a service request verification method provided by an embodiment of the present invention. In the embodiment of the present invention, the service request verification method includes:
[0045] S1. Receive a service access request from a client, and access a pre-created filter in a software development kit corresponding to the service access request.
[0046] In the embodiment of the present invention, the client may also be referred to as a mobile terminal, which is used to access web pages, including a PC. The server access request refers to the need to access server services, such as user login requirements, finding the IP address of a server, and querying mall orders, etc. The software development kit (SDK) refers to a set of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
[0047] Furthermore, it should be understood that when accessing web resources on the server side, a lot of illegal data may exist in the corresponding service access request, such as incorrect character encoding format, blocked access rights, and incorrect user information, etc. Therefore, the present invention intercepts illegal data in the service access request by connecting a pre-created filter to the software development kit corresponding to the service access request, thereby ensuring normal access to the service access request.
[0048] In detail, accessing a pre-created filter in a software development kit corresponding to a service access request includes: obtaining an interface address of the filter and a compilation environment of the software development kit; and loading the interface address into the compilation environment using a preset link instruction.
[0049] Among them, the interface address refers to the link address configured when creating the filter, the compilation environment refers to the code compilation environment of the software tool development kit, such as Myeclipse, and the preset link instruction is the herf instruction, which is used to implement the access of the filter.
[0050] Furthermore, in one embodiment of the present invention, the filter is developed using a Java framework, the Java framework includes: a Spring framework, a Mybatis framework, and a SpringMVC framework, and the filter includes a filter filter and a Servlet filter. The filter creation technology is a relatively mature technology at present, and will not be further described here.
[0051] S2. Perform data verification on the service access request using the verification rules in the filter.
[0052] In an embodiment of the present invention, before the verification rules in the filter are used to verify the service access request, the method further includes: configuring the verification rules in the filter using a preset data verification tool. The data verification tool is essentially an independent project software, compiled using the Java language. The embodiment of the present invention introduces the data verification tool into the filter in the form of a jar package to implement the configuration of the verification rules. The preset data verification tools include: md5 data verification tools, such as sendto md5.
[0053] Furthermore, the verification rules include: verification logic and verification mode, and the verification logic includes: whether the data value is required, whether the letters filled in the data must be uppercase and lowercase, and whether the length of the characters filled in the data cannot exceed a preset threshold, etc. The verification mode includes: Mode 1, immediately stop the verification of the remaining configuration items of the subsequent data upon encountering an error and return the error data; Mode 2, do not stop upon encountering an error until all configuration items of the data are verified, summarize all data configuration items with errors and return.
[0054] Further, the use of the verification rules in the filter to perform data verification on the service access request includes: calculating the edit distance between the service access request and the verification logic in the verification rule, and selecting the verification logic whose edit distance is less than a preset threshold to obtain the service verification logic; performing the verification of the service access request according to the verification method of the verification rule and the service verification logic to obtain the verification result. Optionally, the preset threshold is 8.
[0055] Further, the calculating the edit distance between the service access request and the verification logic in the verification rule includes: using an edit function to calculate the number of mutual conversions between the character length of the service access request and the verification logic in the verification rule to obtain the edit distance.
[0056] In one of the optional embodiments of the present invention, the editing function may be an edit[][] function.
[0057] Furthermore, another embodiment of the present invention also includes: when the service access request verification fails, re-receiving the service access request of the client.
[0058] Furthermore, in order to ensure the availability and privacy of the verification rules, the verification rules can also be stored in a blockchain node.
[0059] S3. When the service access request data verification succeeds, call the server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result.
[0060] In an embodiment of the present invention, when the service access request data verification is successful, it means that the service access request can normally access the corresponding server-side business. Therefore, the embodiment of the present invention performs interface verification on the service access request by calling the server-side interface corresponding to the client, so as to transmit the corresponding service access request to the corresponding server-side business module.
[0061] Furthermore, in an embodiment of the present invention, before calling the server interface corresponding to the client to perform interface verification on the service access request, it also includes: configuring an interface verification script in the server interface to achieve matching with the service access request. Specifically, configuring the interface verification script in the server interface includes: obtaining the interface parameter object of the server interface, converting the interface parameter object into a corresponding interface response message using the session method, parsing the interface response message using the JavaScript scripting language, and generating a corresponding interface verification script.
[0062] For details, see Figure 2 As shown, the interface verification of the service access request using the server interface corresponding to the client to obtain the verification result includes:
[0063] S20, transmitting the service access request to the server interface corresponding to the client;
[0064] S21. Perform an interface verification on the transmitted service access request using an interface verification script in the server interface to obtain a verification result.
[0065] In an optional embodiment, the transmission of the service access request is achieved by the client calling an http request.
[0066] In an optional embodiment, the interface verification of the transmitted service access request using the interface verification script in the server interface includes: calculating the matching degree between the service access request and the interface response message in the interface verification script, if the matching degree is not greater than a preset matching degree, the service access request verification fails, if the matching degree is greater than a preset matching degree, the service access request verification succeeds. Optionally, the preset matching degree is 0.89.
[0067] Furthermore, the matching degree between the service access request and the interface verification script is calculated using the following method:
[0068]
[0069] Among them, T(x, y) represents the matching degree, x i represents the i-th service access request in the service access request, y i The response message of the i-th interface in the interface verification script.
[0070] The embodiment of the present invention first receives the service access request of the client, and accesses the pre-created filter in the software development kit corresponding to the service access request, thereby avoiding the need to configure different filters to perform interception verification of the corresponding service access request, realizing the universalization of the filter, and improving the timeliness of the service request verification; secondly, the embodiment of the present invention uses the verification rules in the filter to perform data verification on the service access request, and when the service access request verification is successful, calls the server interface corresponding to the client to perform interface verification on the service access request to obtain the verification result, and adopts the filter + server verification mode to ensure the accuracy and reliability of the service request verification. Therefore, the present invention can improve the timeliness of the service request verification.
[0071] like Figure 3 FIG. 1 is a functional module diagram of the service request verification device of the present invention.
[0072] The service request verification device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the service request verification device can include an access module 101, a filter verification module 102, and an interface verification module 103. The module described in the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0073] In this embodiment, the functions of each module / unit are as follows:
[0074] The access module 101 is used to receive a service access request from a client, and access a pre-created filter in a software development kit corresponding to the service access request.
[0075] In the embodiment of the present invention, the client may also be referred to as a mobile terminal, which is used to access web pages, including a PC. The server access request refers to the need to access server services, such as user login requirements, finding the IP address of a server, and querying mall orders, etc. The software development kit (SDK) refers to a set of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
[0076] Furthermore, it should be understood that when accessing web resources on the server side, a lot of illegal data may exist in the corresponding service access request, such as incorrect character encoding format, blocked access rights, and incorrect user information, etc. Therefore, the present invention intercepts illegal data in the service access request by connecting a pre-created filter to the software development kit corresponding to the service access request, thereby ensuring normal access to the service access request.
[0077] In detail, the pre-created filter is accessed in the software development kit corresponding to the service access request, and the access module 101 is executed in the following manner: obtaining the interface address of the filter and the compilation environment of the software development kit; using a preset link instruction to load the interface address into the compilation environment.
[0078] Among them, the interface address refers to the link address configured when creating the filter, the compilation environment refers to the code compilation environment of the software tool development kit, such as Myeclipse, and the preset link instruction is the herf instruction, which is used to implement the access of the filter.
[0079] Furthermore, in one embodiment of the present invention, the filter is developed using a Java framework, the Java framework includes: a Spring framework, a Mybatis framework, and a SpringMVC framework, and the filter includes a filter filter and a Servlet filter. The filter creation technology is a relatively mature technology at present, and will not be further described here.
[0080] The filter verification module 102 is used to perform data verification on the service access request using the verification rules in the filter.
[0081] In an embodiment of the present invention, before the verification rules in the filter are used to verify the service access request, the filter verification module 102 further includes: configuring the verification rules in the filter using a preset data verification tool. The data verification tool is essentially an independent project software, compiled using the Java language. The embodiment of the present invention introduces the data verification tool into the filter in the form of a jar package to implement the configuration of the verification rules. The preset data verification tools include: md5 data verification tools, such as sendto md5.
[0082] Furthermore, the verification rules include: verification logic and verification mode, and the verification logic includes: whether the data value is required, whether the letters filled in the data must be uppercase and lowercase, and whether the length of the characters filled in the data cannot exceed a preset threshold, etc. The verification mode includes: Mode 1, immediately stop the verification of the remaining configuration items of the subsequent data upon encountering an error and return the error data; Mode 2, do not stop upon encountering an error until all configuration items of the data are verified, summarize all data configuration items with errors and return.
[0083] Further, the verification rule in the filter is used to perform data verification on the service access request, and the filter verification module 102 is executed in the following manner: calculating the edit distance between the service access request and the verification logic in the verification rule, and selecting the verification logic whose edit distance is less than a preset threshold to obtain the service verification logic; performing the verification of the service access request according to the verification method of the verification rule and the service verification logic to obtain the verification result. Optionally, the preset threshold is 8.
[0084] Furthermore, the filter verification module 102 calculates the edit distance between the service access request and the verification logic in the verification rule in the following manner: an edit function is used to calculate the number of mutual conversions between the character length of the service access request and the verification logic in the verification rule to obtain the edit distance.
[0085] In one of the optional embodiments of the present invention, the editing function may be an edit[][] function.
[0086] Furthermore, another embodiment of the present invention also includes: when the service access request verification fails, re-receiving the service access request of the client.
[0087] Furthermore, in order to ensure the availability and privacy of the verification rules, the verification rules can also be stored in a blockchain node.
[0088] The interface verification module 103 is used to call the server interface corresponding to the client to perform interface verification on the service access request when the service access request data verification succeeds, and obtain a verification result.
[0089] In an embodiment of the present invention, when the service access request data verification is successful, it means that the service access request can normally access the corresponding server-side business. Therefore, the embodiment of the present invention performs interface verification on the service access request by calling the server-side interface corresponding to the client, so as to transmit the corresponding service access request to the corresponding server-side business module.
[0090] Furthermore, in an embodiment of the present invention, before calling the server interface corresponding to the client to perform interface verification on the service access request, the interface verification module 103 also includes: configuring an interface verification script in the server interface to achieve matching with the service access request. Specifically, the interface verification script is configured in the server interface, and the interface verification module 103 is executed in the following manner: obtaining the interface parameter object of the server interface, converting the interface parameter object into a corresponding interface response message using the session method, and parsing the interface response message using the JavaScript scripting language to generate a corresponding interface verification script.
[0091] In detail, the service access request is subjected to interface verification using the server interface corresponding to the client to obtain a verification result, and the interface verification module 103 is executed in the following manner: the service access request is transmitted to the server interface corresponding to the client; the interface verification script in the server interface is used to perform interface verification on the transmitted service access request to obtain a verification result.
[0092] In an optional embodiment, the transmission of the service access request is achieved by the client calling an http request.
[0093] In an optional embodiment, the interface verification script in the server interface is used to perform interface verification on the transmitted service access request, and the interface verification module 103 is executed in the following manner: the matching degree between the service access request and the interface response message in the interface verification script is calculated, and if the matching degree is not greater than the preset matching degree, the service access request verification fails, and if the matching degree is greater than the preset matching degree, the service access request verification succeeds. Optionally, the preset matching degree is 0.89.
[0094] Furthermore, the interface verification module 103 calculates the matching degree between the service access request and the interface verification script using the following method:
[0095]
[0096] Among them, T(x, y) represents the matching degree, x i represents the i-th service access request in the service access request, y i The response message of the i-th interface in the interface verification script.
[0097] The embodiment of the present invention first receives the service access request of the client, and accesses the pre-created filter in the software development kit corresponding to the service access request, thereby avoiding the need to configure different filters to perform interception verification of the corresponding service access request, realizing the universalization of the filter, and improving the timeliness of the service request verification; secondly, the embodiment of the present invention uses the verification rules in the filter to perform data verification on the service access request, and when the service access request verification is successful, calls the server interface corresponding to the client to perform interface verification on the service access request to obtain the verification result, and adopts the filter + server verification mode to ensure the accuracy and reliability of the service request verification. Therefore, the present invention can improve the timeliness of the service request verification.
[0098] like Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the service request verification method of the present invention.
[0099] The electronic device 1 may include a processor 10 , a memory 11 , and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a service request verification program 12 .
[0100] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as service request verification codes, etc., but also be used to temporarily store data that has been output or is to be output.
[0101] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits 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, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing service request verification, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0102] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0103] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0104] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0105] Furthermore, the electronic device 1 may also include a network interface. 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 is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0106] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0107] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0108] The service request check 12 stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs, which, when executed in the processor 10, can achieve:
[0109] Receive a service access request from a client, and access a pre-created filter in a software development kit corresponding to the service access request;
[0110] Performing data verification on the service access request using the verification rules in the filter;
[0111] When the service access request data verification succeeds, the server interface corresponding to the client is called to perform interface verification on the service access request to obtain a verification result.
[0112] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0113] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0114] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0115] Receive a service access request from a client, and access a pre-created filter in a software development kit corresponding to the service access request;
[0116] Performing data verification on the service access request using the verification rules in the filter;
[0117] When the service access request data verification succeeds, the server interface corresponding to the client is called to perform interface verification on the service access request to obtain a verification result.
[0118] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0119] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0121] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0122] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0123] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0124] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A service request verification method, characterized in that: The method comprises: Establishing a software development tool set according to a preset software package, software framework, hardware platform, and operating system, and creating a filter according to the software development tool set; Receive a service access request from a client, access the filter in a software development kit corresponding to the service access request, obtain a link address configured when creating the filter as an interface address of the filter, obtain a code compilation environment of the software development kit as a compilation environment of the software development kit, and load the interface address into the compilation environment; Obtaining the verification rules in the filter, obtaining the service verification logic of the verification rules, and performing verification of the service access request according to the verification method of the verification rules and the service verification logic; When the service access request data verification succeeds, the server interface corresponding to the client is called to perform interface verification on the service access request to obtain a verification result.
2. The service request verification method according to claim 1, characterized in that: The service verification logic for obtaining the verification rule includes: The edit distance between the service access request and the verification logic in the verification rule is calculated, and the verification logic whose edit distance is less than a preset threshold is selected to obtain the service verification logic.
3. The service request verification method according to claim 1, characterized in that: Before calling the server interface corresponding to the client to perform interface verification on the service access request, the method further includes: The interface parameter object of the server interface is obtained, the interface parameter object is converted into a corresponding interface response message, and the corresponding interface verification script is generated after parsing the interface response message.
4. The service request verification method according to any one of claims 1 to 3, characterized in that: The calling of the server interface corresponding to the client to perform interface verification on the service access request to obtain a verification result includes: Transmitting the service access request to the server interface corresponding to the client; The interface verification script in the server interface is used to perform interface verification on the transmitted service access request to obtain a verification result.
5. The service request verification method as claimed in claim 4, characterized in that: The performing interface verification on the transmitted service access request by using the interface verification script in the server interface includes: Calculating the matching degree between the service access request and the interface response message in the interface verification script; If the matching degree is not greater than the preset matching degree, the service access request verification fails; If the matching degree is greater than a preset matching degree, the service access request verification is successful.
6. The service request verification method according to claim 5, characterized in that: Calculating the matching degree between the service access request and the interface verification script includes: The matching degree between the service access request and the interface verification script is calculated using the following method: Among them, T(x, y) represents the matching degree, represents the i-th service access request in the service access request, The response message of the i-th interface in the interface verification script.
7. A service request verification device, characterized in that: The device comprises: The access module is used to establish a software development tool set according to a preset software package, software framework, hardware platform, and operating system, and create a filter according to the software development tool set; receive a service access request from a client, access the filter in the software development tool kit corresponding to the service access request, obtain the link address configured when creating the filter as the interface address of the filter, obtain the code compilation environment of the software development tool kit as the compilation environment of the software development tool kit, and load the interface address into the compilation environment; A filter verification module, used to obtain the verification rules in the filter, obtain the service verification logic of the verification rules, and perform verification of the service access request according to the verification method of the verification rules and the service verification logic; The interface verification module is used to call the server interface corresponding to the client to perform interface verification on the service access request when the service access request verification is successful, and obtain a verification result.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the service request verification method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the service request verification method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Filtering method and device suitable for different service scenes and storage medium
CN110874244A
Service system interface recognition method and device and storage medium
CN111209325A
Information verification method and device, electronic equipment and storage medium
CN111651585A