Method for realizing self-adaptive interface parameter verification in software architecture

Through the adaptive interface parameter verification method, using the parameter verification configuration center and the Validate interface written in Groovy, the automatic verification and real-time update of interface parameters are realized, which solves the problems of cumbersome interface parameter verification and insufficient flexibility, and improves development efficiency and system stability.

CN120803560APending Publication Date: 2025-10-17BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510873883.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the existing technology, interface parameter verification methods are cumbersome and error-prone, making it difficult to cope with complex data structures and rapidly changing business needs, resulting in high development costs and high risk of errors. In addition, aspect verification lacks flexibility, affecting system stability and response speed.

Method used

Adopting the adaptive interface parameter verification method, the verification logic is uniformly managed through the parameter verification configuration center. The Validate interface written in Groovy is used to implement dynamic loading and hot loading. The application is automatically updated at startup, supports the separation of parameter verification rules, and realizes automatic verification and real-time update of parameters by integrating the application SDK.

Benefits of technology

It reduces manual coding errors, improves development efficiency, enhances system flexibility and maintainability, supports rapid response to changes in business needs without modifying application code or restarting services, and improves system adaptability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803560A_ABST
    Figure CN120803560A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing adaptive interface parameter verification in a software architecture. The parameter verification method comprises the following steps: performing parameter logic configuration on adaptive interface parameters; performing application integration verification according to the parameter logic configuration to obtain a verification result; and updating in real time to take effect according to the verification result. The manual writing of repeated verification codes in each application is avoided, errors caused by manual coding are reduced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of parameter verification of software systems, and in particular to a method for implementing adaptive interface parameter verification in a software architecture. BACKGROUND

[0002] With the rapid development of information technology, the scale and complexity of software systems are increasing, and interfaces, as the key part of interaction between different system components, their stability and security are crucial to the entire system. Interface parameter verification is an important means to ensure data correctness and system security, which can prevent system errors or security vulnerabilities caused by illegal data input. Traditional interface parameter verification methods usually require developers to manually write a large amount of verification code, which not only increases the development workload, but also is prone to omissions and errors. In addition, as business requirements change, the original verification rules may need to be updated frequently, and manual maintenance of these rules becomes increasingly difficult.

[0003] Some existing solutions on the market, such as using annotations, xml configurations or aop (aspect-oriented programming) to implement parameter verification, although to some extent, it reduces the burden of developers, but these methods still have shortcomings. They often lack flexibility, difficult to adapt to rapidly changing business requirements, and when faced with complex data structures and variable verification logic, configuration and management become extremely cumbersome.

[0004] The technical problems existing in the prior art include:

[0005] Disadvantages of coding parameter verification strategy

[0006] The process of manually writing verification code is tedious and prone to errors. For complex systems and variable business requirements, the parameters that need to be verified can be very numerous, and the rules may change frequently. Developers need to spend a lot of time and effort to write and maintain these verification codes, which not only increases development costs, but also increases the risk of errors.

[0007] Manually writing verification code is difficult to deal with complex data structures and nested parameter relationships, and is prone to omissions and errors. In actual application, parameter verification rules in different business scenarios may differ, and unified verification logic is difficult to cover all cases, requiring separate processing for different scenarios, further increasing the difficulty of development and maintenance. This strategy has poor flexibility. When business requirements change, the original verification rules may no longer be applicable, requiring manual code modification and redeployment, which is particularly inconvenient in a fast iteration development environment.

[0008] Disadvantages of unified aspect parameter verification strategy

[0009] The lack of a unified mechanism for dynamically modifying the verification parameters can result in insufficient flexibility in dealing with complex and changing business requirements. Although the aspect method can centrally manage the verification logic, in actual application, the situation of dynamically adjusting the verification parameters for different transaction scenarios may be encountered. If each change needs to modify the aspect code and redeploy the entire application, not only the maintenance cost is increased, but also the response speed and stability of the system may be affected. When new logic is added, the lack of a flexible mechanism for identifying verification parameters increases the complexity of development and debugging.

[0010] When the business logic becomes more and more complex, the aspect code itself also becomes large and difficult to maintain. If the logic in the aspect cannot be well decoupled from the specific transaction logic, when adding or modifying the verification rules, it may be necessary to deeply understand the specific implementation details of each transaction, which not only increases the difficulty of development and maintenance, but also easily leads to the introduction of errors. SUMMARY

[0011] In view of the above problems, the present application is proposed in order to provide a method for implementing adaptive interface parameter verification in a software architecture to overcome the above problems or at least partially solve the above problems.

[0012] According to one aspect of the present application, a method for implementing adaptive interface parameter verification in a software architecture is provided, the parameter verification method comprising:

[0013] configuring the adaptive interface parameters with parameter logic;

[0014] performing application integration verification according to the parameter logic configuration to obtain a verification result;

[0015] updating in real time according to the verification result.

[0016] Optionally, the configuring the adaptive interface parameters with parameter logic specifically comprises:

[0017] maintaining the parameter name and verification logic of the parameter verification in the form of parameters to a parameter verification configuration center;

[0018] The rule of the verification logic is implemented by adopting an open source verification strategy, the individual responsible verification uniformly implements the Validate interface, is written by using Groovy, and the verification rules are dynamically loaded during application integration.

[0019] Optionally, the performing application integration verification according to the parameter logic configuration to obtain a verification result specifically comprises:

[0020] A plurality of applications register to the configuration center in the form of integrated sdk according to their own use, and check the corresponding parameter verification rules;

[0021] When the application is started, the checked parameter verification rule verification logic configuration is obtained from the configuration registration center, the application is automatically loaded, and parameter verification is performed using annotations.

[0022] Optionally, the real-time updating in effect according to the verification result specifically includes:

[0023] When the verification logic needs to be changed, the configuration center issues an event change notification after the change, and the application automatically updates the parameter verification rule and hot loads the verification logic.

[0024] Optionally, the parameter logic configuration of the adaptive interface parameter specifically includes:

[0025] The parameter name and verification logic of parameter verification are maintained in the form of parameters to the parameter verification configuration center, wherein the verification logic uniformly implements the Validate interface, is written in Groovy, and is dynamically loaded by the application when integrated.

[0026] The parameter name and verification logic are separated, and the verification rule is adjusted or added by updating the parameter in the configuration center without modifying the code.

[0027] Groovy is used as a script language to meet business requirements.

[0028] Optionally, the application integration verification according to the parameter logic configuration further includes:

[0029] The application is registered to the configuration center in the form of integrated SDK according to its own use;

[0030] In the registration process, the corresponding parameter verification rule is checked;

[0031] When the application is started, the automatically checked parameter verification rule is obtained from the configuration registration center;

[0032] The parameter verification rule is used to implement automatic verification of the parameter.

[0033] After the application receives a user request and extracts the corresponding parameter, the parameter is checked one by one using the previously loaded verification rule. If the parameter meets the preset rule, the parameter is considered valid and processing continues. Otherwise, if the parameter does not meet the rule, it is considered invalid, and the application may throw an exception or return error information.

[0034] Optionally, the real-time updating in effect according to the verification result specifically includes:

[0035] When the verification logic needs to be changed, the configuration center receives a corresponding change request.

[0036] After the change is completed in the configuration center, an event change notification mechanism is automatically triggered;

[0037] When the configuration center issues the event change notification, each application receives the notification;

[0038] The logic inside the application is automatically triggered to update the parameter verification rule;

[0039] The hot loading application loads the new verification logic without interrupting the service;

[0040] Optionally, the parameter verification rule includes a required field, data format and value range of the field.

[0041] The adaptive interface parameter verification method provided by the software architecture of the application comprises the following steps: performing parameter logic configuration on the adaptive interface parameter; performing application integration verification according to the parameter logic configuration to obtain a verification result; and updating the verification result in real time according to the verification result. The method avoids manually writing repeated verification codes in each application, reduces errors caused by manual coding, and improves development efficiency.

[0042] The above description is only a summary of the technical scheme of the application. In order to more clearly understand the technical means of the application, the content of the specification can be implemented, and in order to make the above and other purposes, characteristics and advantages of the application more obvious and easy to understand, the specific embodiments of the application are described below. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical scheme of the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.

[0044] Figure 1 The flowchart of the adaptive interface parameter verification method in the software architecture of the embodiment of the application is provided;

[0045] Figure 2 The flowchart of the adaptive interface parameter verification method in the software architecture of the embodiment of the application is provided;

[0046] Figure 3 The flowchart of the adaptive interface parameter verification method in the software architecture of the embodiment of the application is provided;

[0047] Figure 4 The flowchart of the adaptive interface parameter verification method in the software architecture of the embodiment of the application is provided. DETAILED DESCRIPTION

[0048] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.

[0049] The terms "include" and "have" and their any variants, as used in the specification and claims of the present disclosure and the accompanying drawings, are intended to cover the non-exclusive inclusion, for example, the inclusion of a series of steps or units.

[0050] The technical solutions of the present application will be described in further detail below in conjunction with the drawings and examples.

[0051] As shown in Figure 1 The adaptive interface parameter verification method provided by the present application in a software architecture includes: parameter logic configuration of adaptive interface parameters; application integration verification according to the parameter logic configuration to obtain a verification result; and real-time update of the verification result.

[0052] The adaptive interface parameter verification method provided by the present application in a software architecture includes: parameter logic configuration, application integration verification, and real-time update.

[0053] Parameter logic configuration: parameter names and verification logic of parameter verification are maintained in a parameter verification configuration center in the form of parameters, wherein simple logic verification rules can be implemented using an open-source verification strategy, and individualized responsible verification is implemented by unifying a Validate interface and using Groovy to write. Such an implementation manner facilitates dynamic loading of verification rules during application integration.

[0054] Application integration verification: each application registers to the configuration center in an integrated sdk manner according to its own use, and checks the corresponding parameter verification rules. When the application starts, the parameter verification rule verification logic configuration checked is obtained from the configuration registration center, and then the application automatically loads and uses annotations to perform parameter verification.

[0055] Real-time update and effectiveness: when the verification logic needs to be changed, the configuration center will issue an event change notification after the change in the configuration center, and the application will automatically update the parameter verification rules and hot load the verification logic.

[0056] As shown in Figure 2 The parameter logic configuration includes:

[0057] The parameter name and the verification logic of the parameter verification are maintained in the parameter verification configuration center in the form of parameters, wherein the verification logic uniformly implements the Validate interface and is written in Groovy. Such an implementation enables dynamic loading of the verification rules during integration of the application, thereby improving the flexibility and maintainability of the system.

[0058] By separating the parameter name and the verification logic, the verification rules can be adjusted or added by updating the parameters in the configuration center without modifying the code. This not only improves the scalability of the system but also reduces the maintenance cost. Meanwhile, using Groovy as the script language, more flexible and powerful verification logic can be implemented to meet various complex business requirements.

[0059] As shown in Figure 3 , the application integrates the verification:

[0060] The application is registered to the configuration center in the form of integrated SDK according to its own usage. During the registration process, the developer checks the corresponding parameter verification rules. The parameter verification rules are predefined to ensure that the application can perform effective parameter verification when processing requests.

[0061] When the application starts, it automatically obtains the parameter verification rules that have been checked from the configuration registration center. This process is usually completed by communicating with the API interface of the registration center to ensure that the latest and most relevant verification rules are obtained. Once the rules are obtained, the application loads them into the memory for subsequent use.

[0062] The parameter verification rules are used to implement automatic verification of parameters. After receiving a user request and extracting the corresponding parameters, the application checks the parameters one by one using the previously loaded verification rules. If the parameters meet the preset rules, the parameters are considered valid and the processing continues; otherwise, if the parameters do not meet the rules, they are considered invalid and the application may throw an exception or return an error message.

[0063] As shown in Figure 4 , real-time updates take effect:

[0064] When the verification logic needs to be changed, the configuration center will first receive the corresponding change request. After the configuration center completes the change, it will automatically trigger the event change notification mechanism. This notification mechanism ensures that all related applications can timely obtain the latest configuration information.

[0065] When the configuration center issues an event change notification, each application will receive this notification. The logic inside the application will be automatically triggered to update the parameter verification rules. These rules may include mandatory fields, data formats, value ranges, etc. By automatically updating these rules, the application can ensure that the new verification logic takes effect immediately without the need for redeployment or restart.

[0066] The hot loading mechanism is also an important part of this process. Hot loading means that the application can load new verification logic without interrupting service. This ensures that users hardly feel any changes during the update process, improving user experience and system availability.

[0067] Benefits:

[0068] 1. Improve development efficiency and reduce error rate: By centralized management of parameter verification rules through the unified configuration center, the need for manual coding of repetitive verification code in each application is avoided, reducing errors introduced by manual coding and improving development efficiency. Developers only need to define the verification logic once in the configuration center, which can be reused in all registered applications, simplifying the development process.

[0069] 2. Enhance system flexibility and maintainability: The method of the present application supports dynamic loading and updating of verification rules, enabling the system to flexibly respond to changes in business requirements without modifying application code or restarting services. This design improves the adaptability and maintainability of the system, reducing long-term maintenance costs. At the same time, the unified configuration center facilitates management and auditing of verification rules, ensuring consistency and correctness of verification logic.

[0070] The above specific embodiments further detail the purpose, technical solutions and benefits of the present application. It should be understood that the above is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for implementing adaptive interface parameter verification in a software architecture, characterized in that: The parameter verification method includes: Configure the adaptive interface parameters logically; Perform application integration verification according to the parameter logic configuration to obtain a verification result; The verification is updated in real time according to the verification result.

2. The method for implementing adaptive interface parameter verification in a software architecture according to claim 1, wherein: The parameter logic configuration of the adaptive interface parameters specifically includes: Maintain the parameter names and verification logic of parameter verification in the parameter verification configuration center in the form of parameters; The validation logic rules are implemented using an open-source validation strategy. Personalized validation uniformly implements the Validate interface and is written in Groovy. The validation rules are dynamically loaded during application integration.

3. The method for implementing adaptive interface parameter verification in a software architecture according to claim 1, wherein: The performing application integration verification according to the parameter logic configuration and obtaining the verification result specifically includes: Multiple applications can register with this configuration center by integrating SDKs based on their own usage, and check the corresponding parameter verification rules; When the application starts, the selected parameter verification rule verification logic configuration is obtained from the configuration registration center, the application is automatically loaded, and annotations are used for parameter verification.

4. The method for implementing adaptive interface parameter verification in a software architecture according to claim 1, wherein: The real-time updating and taking effect according to the verification result specifically includes: When the verification logic needs to be changed, after the configuration center is changed, the configuration center sends an event change notification, the application automatically updates the parameter verification rules and hot loads the verification logic.

5. The method for implementing adaptive interface parameter verification in a software architecture according to claim 1, wherein: The parameter logic configuration of the adaptive interface parameters specifically includes: The parameter names and validation logic of parameter validation are maintained in the parameter validation configuration center in the form of parameters. The validation logic uniformly implements the Validate interface and is written in Groovy. The validation rules are dynamically loaded during application integration. Separate parameter names from validation logic. Without modifying the code, you can adjust or add validation rules by updating the parameters in the configuration center. Use Groovy as scripting language to meet business needs.

6. The method for implementing adaptive interface parameter verification in a software architecture according to claim 1, wherein: The performing application integration verification according to the parameter logic configuration further includes: Applications register with this configuration center by integrating SDK according to their own usage; During the registration process, check the corresponding parameter verification rules; When the application starts, it automatically obtains the selected parameter verification rules from the configuration registry; Parameter validation rules are used to implement automatic validation of parameters; After receiving the user request and extracting the corresponding parameters, the application checks the parameters one by one using the previously loaded validation rules. If the parameters meet the preset rules, they are considered valid and processing continues; conversely, if the parameters do not meet the rules and are considered invalid, the application may throw an exception or return an error message.

7. The method for implementing adaptive interface parameter verification in a software architecture according to claim 1, wherein: The real-time updating and taking effect according to the verification result specifically includes: When the verification logic needs to be changed, the configuration center receives the corresponding change request; After the change is completed in the configuration center, the event change notification mechanism is automatically triggered; When the configuration center sends an event change notification, each application will receive the notification; The logic within the application will be automatically triggered to update the parameter verification rules; Hot reloading of applications loads new validation logic without interrupting service.

8. The method for implementing adaptive interface parameter verification in a software architecture according to claim 7, wherein: The parameter verification rules include mandatory items of the fields, data format and value range.

Citation Information

Cited By

  • Interface data exception monitoring and reporting method and device for end side

    CN121333707A