Method and system for dynamically verifying interface data based on verification intermediate layer

By introducing a verification intermediate layer in the interface design, the verification strategies and components are automatically identified, and data verification and business logic are decoupled, the problem of coupling verification logic and business logic in traditional interface design is solved, and efficient and flexible interface data verification is achieved.

CN119807034APending Publication Date: 2025-04-11CHINA CITIC BANK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411784248.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In traditional interface design, data rationality verification is closely coupled with business logic, resulting in complex code maintenance, and changes in verification rules affect system stability and flexibility. The existing verification mechanism does not support dynamic configuration and concurrent execution, which limits the system's processing capability and response speed.

Method used

The dynamic verification interface data method based on the verification intermediate layer is adopted. By receiving the interface call request and sending it to an independent verification intermediate layer, the verification policy configuration corresponding to the interface is automatically identified, the corresponding verification components are obtained from the verification component library, the interface data is verified, and the verification result is determined whether to send the request to the business logic layer.

Benefits of technology

It realizes decoupling of interface verification and business logic, supports dynamic configuration and concurrent execution, improves development efficiency and system flexibility, optimizes performance, and significantly reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807034A_ABST
    Figure CN119807034A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic interface data verification method and system based on a verification intermediate layer. The method specifically comprises the following steps: receiving an interface calling request of a service system and sending the interface calling request to the verification intermediate layer; the verification intermediate layer automatically identifies verification strategy configuration corresponding to the interface based on the interface identifier; obtaining a corresponding verification component from a verification component library according to the verification strategy configuration; verifying the interface data through a verification assembly; the verification intermediate layer judges according to the verification result, if the verification is passed, the interface calling request is sent to the business logic layer, and if the verification is not passed, error information is returned, so that the verification intermediate layer is designed to serve as a bridge of business logic and data verification, decoupling of interface verification and business logic is realized, and the verification efficiency is improved. The verification logic can be compiled according to service requirements, core service codes do not need to be modified, characteristics of different interfaces and system resource conditions can be flexibly adapted, the development efficiency is improved, the system flexibility is enhanced, and the maintenance cost is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software technology, in particular to data rationality verification technology for interfaces in service-oriented architecture (SOA) and microservice architecture. Specifically, a method and system for dynamically verifying interface data based on a verification middle layer are proposed. By decoupling verification logic from business logic and supporting dynamic configuration and concurrent execution, the method can cope with increasingly complex system requirements and changes in verification rules. Background Art

[0002] In the traditional interface design and implementation process, data rationality verification is usually directly embedded in the business logic code, resulting in a tight coupling between the verification logic and the business logic. This approach not only increases the complexity of code maintenance, but also often requires the modification of business code when the verification rules change, which undoubtedly greatly affects the stability and flexibility of the system. In addition, most existing verification mechanisms do not support dynamic configuration and concurrent execution, which limits the system's processing capacity and response speed.

[0003] With the development of the software development industry, the scale and complexity of projects are growing. Traditional interface rationality verification is often closely integrated with business operations, lacking flexibility and scalability, and is difficult to adapt to changing verification needs and increasingly complex system security requirements. Especially driven by new technologies such as big data and artificial intelligence, code security, data consistency, and document quality have become important indicators for rationality verification, and these verifications often require more professional technologies or tools as support. The traditional interface rationality verification method will cause the interface business logic to be mixed with a large amount of verification logic, that is, it will lead to repeated implementation of the same verification logic of a large number of interfaces, and also cause the strong coupling of verification logic and business logic to affect code quality. At the same time, it also leads to the inevitable need to modify all related interfaces when modifying the verification logic once, which not only increases the iteration workload but also fails to ensure the delivery quality and security.

[0004] In order to solve the above problems, the present invention proposes a dynamic verification interface data method and system based on a verification middle layer, which can automatically obtain the configured verification components and verification configurations according to the interface identifier, and realize comprehensive rationality verification from user permissions to task content to security, thereby ensuring the quality and security of project delivery, and improving development efficiency and team collaboration effectiveness. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the present invention proposes a method and system for dynamically verifying interface data based on a verification intermediate layer.

[0006] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0007] A method for dynamically verifying interface data based on a verification intermediate layer, characterized by comprising the following steps:

[0008] S1. Receive an interface call request from a business system and send the interface call request to a verification intermediate layer, wherein the verification intermediate layer is independent of the business system;

[0009] S2. The verification intermediate layer automatically identifies the verification policy configuration corresponding to the interface based on the interface identifier in the interface call request;

[0010] S3. The verification intermediate layer obtains the corresponding verification component from the verification component library according to the verification strategy configuration;

[0011] S4. Verify the interface data in the interface call request by the verification component;

[0012] S5. The verification middle layer makes a judgment based on the verification result. If the verification passes, the interface call request is sent to the business logic layer. If the verification fails, an error message is returned.

[0013] Furthermore, the verification strategy configuration includes an enable / disable status of the verification component, an execution strategy of the verification component, and a verification end strategy.

[0014] Furthermore, the execution strategy of the verification component includes concurrent verification and serial verification, and the verification middle layer selectively executes the verification component in parallel or sequentially according to the execution strategy.

[0015] Furthermore, the verification end strategy includes ending when any verification fails and ending after all verifications are executed. The verification middle layer determines when to terminate the verification process and feed back the verification result according to the verification end strategy.

[0016] Furthermore, the verification component library includes basic verification components and custom verification components; the basic verification components and the custom verification components are based on a unified definition specification.

[0017] Furthermore, the custom verification component is written using a component template according to business needs, and is configured in the verification component library after writing.

[0018] Furthermore, the step S4 further comprises:

[0019] S41. Dynamically load the verification component according to the verification strategy configuration;

[0020] S42. Execute the loaded verification component to perform a rationality check on each interface data in the interface call request.

[0021] In addition, the present invention also relates to a dynamic verification interface data system based on a verification intermediate layer, characterized in that it includes:

[0022] An interface receiving module, used for receiving an interface call request from a business system, and sending the interface call request to a verification middle layer, wherein the verification middle layer is independent of the business system;

[0023] An interface identification module is used to automatically identify the verification strategy configuration corresponding to the interface based on the interface identification in the interface call request;

[0024] A verification component acquisition module is used to obtain the corresponding verification component from the verification component library according to the verification strategy configuration;

[0025] A data verification execution module, used to verify the interface data in the interface call request through the verification component;

[0026] The verification result judgment module is used to make a judgment based on the verification result. If the verification passes, the interface call request is sent to the business logic layer. If the verification fails, an error message is returned.

[0027] In addition, the present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0028] The memory is used to store operation instructions;

[0029] The processor is used to execute the above method by calling the operation instruction.

[0030] In addition, the present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0031] The present invention discloses a method and system for dynamically checking interface data based on a verification middle layer, aiming to provide an efficient and flexible interface data verification solution to solve the problems of strong coupling between interface data rationality verification and business logic, static fixed rules and low verification efficiency. The method comprises the following steps: receiving an interface call request of a business system and sending it to a verification middle layer; the verification middle layer automatically identifies the verification strategy configuration corresponding to the interface based on the interface identifier; obtaining the corresponding verification component from the verification component library according to the verification strategy configuration; verifying the interface data through the verification component; the verification middle layer judges according to the verification result, if the verification passes, the interface call request is sent to the business logic layer, if the verification fails, an error message is returned. The method realizes the decoupling of interface verification and business logic by designing a verification middle layer as a bridge between business logic and data verification. At the same time, verification logic can be written according to business needs without modifying the core business code, and it can flexibly adapt to the characteristics of different interfaces and system resource conditions, thereby improving development efficiency, enhancing system flexibility, optimizing performance, and significantly reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A flowchart of a method for dynamically verifying interface data based on a verification intermediate layer provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of the structure of a dynamic verification interface data system based on a verification intermediate layer provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0036] Those skilled in the art can understand that, unless otherwise stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms, and the "first", "second", etc., are only used to distinguish and define objects for the purpose of introducing the scheme clearly, and do not limit the objects themselves. Of course, the objects defined by "first" and "second" may be the same terminal, device, user, etc., or the same type of terminal, device and user. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0037] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0038] like Figure 1 As shown, a method for dynamically verifying interface data based on a verification intermediate layer is characterized by comprising:

[0039] S1. Receive an interface call request from a business system and send the interface call request to a verification intermediate layer, wherein the verification intermediate layer is independent of the business system;

[0040] Specifically, the verification middle layer runs as an independent service and is not directly coupled with the logic code of the business system, thereby achieving decoupling of interface verification and business logic.

[0041] S2. The verification intermediate layer automatically identifies the verification policy configuration corresponding to the interface based on the interface identifier in the interface call request;

[0042] Specifically, by parsing the interface identifier (e.g., interface name or ID) in the request, the verification middle layer queries a preset verification strategy configuration database according to the interface identifier, and automatically identifies the verification strategy configuration corresponding to the interface, wherein the verification strategy configuration includes the enable / disable status of the verification component, the execution strategy of the verification component, and the verification end strategy;

[0043] The verification end strategy includes ending upon any verification failure and ending upon all verifications being executed;

[0044] The verification middle layer determines when to terminate the verification process according to the verification end strategy and feeds back the verification result.

[0045] S3. The verification intermediate layer obtains the corresponding verification component from the verification component library according to the verification strategy configuration;

[0046] Specifically, the verification middle layer retrieves and obtains the verification component to be executed from the verification component library;

[0047] The validation component library contains a series of predefined basic validation components and customized validation components based on business needs. All components follow a unified definition specification.

[0048] Among them, the basic verification component is used to perform data format verification, personnel verification, etc.;

[0049] The custom verification component is written according to business needs using a component template and is configured in a verification component library after writing. It can write verification logic according to business needs without modifying the core business code, and adapt to the characteristics of different interfaces and system resource conditions.

[0050] S4. Verify the interface data in the interface call request by the verification component;

[0051] Specifically, the verification component is dynamically loaded or the unnecessary verification component is dynamically unloaded according to the verification strategy configuration, so that the newly loaded verification component can be enabled to participate in the verification process of the interface data without restarting the service at runtime;

[0052] Execute the loaded verification component to perform a rationality check on each interface data in the interface call request.

[0053] S5. The verification middle layer makes a judgment based on the verification result. If the verification passes, the interface call request is sent to the business logic layer. If the verification fails, an error message is returned to guide the front end or the caller to correct the data.

[0054] The solution provided by the present application is adopted to receive the interface call request of the business system and send it to the verification middle layer; the verification middle layer automatically identifies the verification policy configuration corresponding to the interface based on the interface identifier; obtains the corresponding verification component from the verification component library according to the verification policy configuration; verifies the interface data through the verification component; the verification middle layer judges based on the verification result, if the verification passes, the interface call request is sent to the business logic layer, if the verification fails, an error message is returned. This method realizes the decoupling of interface verification and business logic by designing the verification middle layer as a bridge between business logic and data verification. At the same time, verification logic can be written according to business needs without modifying the core business code, and it can flexibly adapt to the characteristics of different interfaces and system resource conditions, improve development efficiency, enhance system flexibility, optimize performance, and significantly reduce maintenance costs.

[0055] In addition, another aspect also relates to a dynamic verification interface data system based on a verification intermediate layer, the structure of which is as follows: Figure 2 As shown, including:

[0056] The interface receiving module 201 is used to receive an interface call request from a business system and send the interface call request to a verification middle layer, wherein the verification middle layer is independent of the business system;

[0057] An interface identification recognition module 202, used to automatically identify the verification strategy configuration corresponding to the interface based on the interface identification in the interface call request;

[0058] The verification component acquisition module 203 is used to obtain the corresponding verification component from the verification component library according to the verification strategy configuration;

[0059] A data verification execution module 204, configured to verify the interface data in the interface call request through the verification component;

[0060] The verification result judgment module 205 is used to make a judgment based on the verification result. If the verification passes, the interface call request is sent to the business logic layer. If the verification fails, an error message is returned.

[0061] Furthermore, the verification strategy configuration includes an enable / disable status of the verification component, an execution strategy of the verification component, and a verification end strategy.

[0062] Furthermore, the execution strategy of the verification component includes concurrent verification and serial verification, and the verification middle layer selectively executes the verification component in parallel or sequentially according to the execution strategy.

[0063] Furthermore, the verification end strategy includes ending when any verification fails and ending after all verifications are executed. The verification middle layer determines when to terminate the verification process and feed back the verification result according to the verification end strategy.

[0064] Furthermore, the verification component library includes basic verification components and custom verification components; the basic verification components and the custom verification components are based on a unified definition specification.

[0065] Furthermore, the custom verification component is written using a component template according to business needs, and is configured in the verification component library after writing.

[0066] Furthermore, the data verification execution module 204 is also used for:

[0067] Dynamically load the verification component according to the verification strategy configuration;

[0068] Execute the loaded verification component to perform a rationality check on each interface data in the interface call request.

[0069] By using this system, the above method can be executed and the corresponding technical effects can be achieved.

[0070] An embodiment of the present invention further provides an electronic device for executing the above method, as an implementation device of the method, comprising a processor and a memory;

[0071] A memory, used for storing operation instructions;

[0072] The processor is used to execute a dynamic interface data verification method based on a verification intermediate layer provided in any embodiment of the present application by calling an operation instruction.

[0073] As an example, Figure 3A schematic diagram of the structure of an electronic device applicable to an embodiment of the present application is shown, and the electronic device 300 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may also include a display screen 305 for displaying images, or receiving user operation instructions when necessary.

[0074] The processor 301 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 304 may include a receiver and a transmitter. The transceiver 304 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0075] Processor 301 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0076] The processor 301 may also include one or more processing units, for example: the processor 301 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (Neural-network Processing Unit, NPU), etc. Different processing units can be independent devices or integrated into one or more processors. Among them, the controller can be the nerve center and command center of the electronic device 300. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory can also be set in the processor 301 for storing instructions and data. In some embodiments, the memory in the processor 301 is a cache memory. The memory can save instructions or data that the processor 301 has just used or circulated.

[0077] The processor 301 can run the dynamic verification interface data method based on the verification intermediate layer provided in the embodiment of the present application. The processor 301 may include different devices. For example, when the CPU and GPU are integrated, the CPU and the GPU can cooperate to execute the dynamic verification interface data method based on the verification intermediate layer provided in the embodiment of the present application. Part of the algorithm is executed by the CPU, and the other part of the algorithm is executed by the GPU to obtain faster processing efficiency.

[0078] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0079] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0080] Optionally, the memory 303 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the dynamic verification interface data method based on the verification intermediate layer provided in any embodiment of the present application.

[0081] The memory 303 can be used to store computer executable program codes, which include instructions. The processor 301 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the memory 303. The memory 303 may include a program storage area and a data storage area. Among them, the program storage area may store the code of the operating system, application program, etc. The data storage area may store data created during the use of the electronic device 300 (such as images, videos, etc. collected by the camera application), etc.

[0082] The memory 303 may also store one or more computer programs corresponding to the dynamic verification interface data method based on the verification intermediate layer provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 303 and are configured to be executed by the one or more processors 301. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.

[0083] Of course, the code of the method for dynamically verifying interface data based on the verification intermediate layer provided in the embodiment of the present application can also be stored in an external memory.

[0084] The display screen 305 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 305, where N is a positive integer greater than 1. The display screen 305 can be used to display information input by a user or information provided to a user and various graphical user interfaces (GUI). For example, the display screen 305 can display photos, videos, web pages, or files.

[0085] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.

[0086] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0087] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0089] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0091] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for dynamically verifying interface data based on a verification intermediate layer, characterized in that: include: S1. Receive an interface call request from a business system and send the interface call request to a verification intermediate layer, wherein the verification intermediate layer is independent of the business system; S2. The verification intermediate layer automatically identifies the verification policy configuration corresponding to the interface based on the interface identifier in the interface call request; S3. The verification intermediate layer obtains the corresponding verification component from the verification component library according to the verification strategy configuration; S4. Verify the interface data in the interface call request by the verification component; S5. The verification middle layer makes a judgment based on the verification result. If the verification passes, the interface call request is sent to the business logic layer. If the verification fails, an error message is returned.

2. The method according to claim 1, characterized in that The verification strategy configuration includes the enable / disable status of the verification component, the execution strategy of the verification component, and the verification end strategy.

3. The method according to claim 2, characterized in that The execution strategy of the verification component includes concurrent verification and serial verification, and the verification middle layer selectively executes the verification component in parallel or sequentially according to the execution strategy.

4. The method according to claim 2, characterized in that: The verification end strategy includes ending when any verification fails and ending after all verifications are executed. The verification middle layer determines when to terminate the verification process and feeds back the verification result according to the verification end strategy.

5. The method according to claim 1, characterized in that The verification component library includes basic verification components and custom verification components; the basic verification components and the custom verification components are based on a unified definition specification.

6. The method according to claim 5, characterized in that The custom verification component is written according to business needs using a component template and is configured into a verification component library after being written.

7. The method according to claim 1, characterized in that The step S4 further comprises: S41. Dynamically load the verification component according to the verification strategy configuration; S42. Execute the loaded verification component to perform a rationality check on each interface data in the interface call request.

8. A dynamic verification interface data system based on a verification intermediate layer, characterized in that: include: An interface receiving module, used for receiving an interface call request from a business system, and sending the interface call request to a verification middle layer, wherein the verification middle layer is independent of the business system; An interface identification module is used to automatically identify the verification strategy configuration corresponding to the interface based on the interface identification in the interface call request; A verification component acquisition module is used to obtain the corresponding verification component from the verification component library according to the verification strategy configuration; A data verification execution module, used to verify the interface data in the interface call request through the verification component; The verification result judgment module is used to make a judgment based on the verification result. If the verification passes, the interface call request is sent to the business logic layer. If the verification fails, an error message is returned.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 7 by calling the operation instruction.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Data flattening processing method, dynamic data verification method, equipment and medium

    CN121614121A