Parameter verification method and device, electronic equipment and computer readable storage medium

By obtaining client data requests and obtaining verification rules from the distributed configuration management platform for interface parameter verification, the problem of frequent code modification in the existing technology of interface parameter verification is solved, and the flexibility and efficiency improvement is achieved .

CN119046080APending Publication Date: 2024-11-29PING AN BANK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411270611.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing interface parameter verification method requires frequent code modification, which limits the scalability of the interface and increases development costs, and cannot flexibly respond to changes in financial business needs.

Method used

By obtaining the client's data request, intercepting and processing the input interface parameters, determining the interface name, and obtaining the target parameter verification rules from the distributed configuration management platform for verification, realizing flexible interface parameter verification.

Benefits of technology

The verification rules can be changed without the need for developers to rewrite code, which improves the flexibility and efficiency of interface parameter verification and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046080A_ABST
    Figure CN119046080A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of financial science and technology, and provides a parameter verification method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining a data request of a client; intercepting the input interface parameter according to the data request to obtain a to-be-verified interface parameter; determining an interface name according to the to-be-verified interface parameter; determining a target parameter verification rule from a preset distributed configuration management platform according to the interface name; and performing verification processing on the to-be-verified interface parameters according to the target parameter verification rule to obtain a parameter verification result. According to the technical scheme, the interface input parameter verification can be more flexible, simple and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing technology. The embodiments of the present application are applicable to but not limited to the field of financial technology, and in particular relate to a parameter verification method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the financial industry, financial systems have been increasingly used to manage various financial businesses; among them, interface input parameter verification refers to the verification of the legality and correctness of input parameters in web page development to ensure that the data requested by the interface conforms to the expected format and rules. In the interface request, the input parameters usually include various types of data such as files, strings, and numbers. Currently, interface input parameter verification is usually implemented by server-side code, which can check the format, length, validity, etc. of the input parameters. If the parameters do not conform to the expected rules, an error message is returned or the request is rejected so that the developer can handle the error or make modifications.

[0003] However, as time goes by and the needs of financial services change, the verification conclusions and prompt information may change over time. Implementing interface verification through coding requires constant code modification, which in turn limits the scalability of the interface and increases the cost of interface development. Summary of the invention

[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0005] In order to solve the problems mentioned in the above background technology, the embodiments of the present application provide a parameter verification method, device, electronic device and computer-readable storage medium, which can make the interface input parameter verification more flexible and convenient.

[0006] In a first aspect, an embodiment of the present application provides a parameter verification method, including:

[0007] Get the client's data request;

[0008] Intercepting and processing the input interface parameters according to the data request to obtain the interface parameters to be verified;

[0009] Determine the interface name according to the interface parameters to be verified;

[0010] According to the interface name, determining a target parameter verification rule from a preset distributed configuration management platform;

[0011] The interface parameters to be verified are verified according to the target parameter verification rules to obtain parameter verification results.

[0012] According to some embodiments of the present application, intercepting the input interface parameters according to the data request to obtain the interface parameters to be verified includes:

[0013] Analyzing and processing the data request to obtain data ownership information;

[0014] The input interface parameters are intercepted and processed according to the data attribution information to obtain the interface parameters to be verified.

[0015] According to some embodiments of the present application, determining the interface name according to the interface parameter to be verified includes:

[0016] Decomposing the interface parameters to be verified to obtain multiple interface information blocks;

[0017] The interface name is determined from the multiple interface information blocks.

[0018] According to some embodiments of the present application, a plurality of parameter verification rules are set in the distributed configuration management platform, and each of the parameter verification rules corresponds to a name information; determining the target parameter verification rule from the preset distributed configuration management platform according to the interface name includes:

[0019] Matching the interface name with the name information in the distributed configuration management platform to obtain target name information;

[0020] The parameter verification rule corresponding to the target name information is determined as the target parameter verification rule.

[0021] According to some embodiments of the present application, the step of performing verification processing on the interface parameter to be verified according to the target parameter verification rule to obtain a parameter verification result includes:

[0022] In the case where there are multiple target name information, multiple target parameter verification rules are determined;

[0023] Traversing each of the target parameter verification rules, and verifying the interface parameters to be verified according to the target parameter verification rules;

[0024] In the case where the interface parameter to be checked passes all the target parameter verification rules, passing the interface parameter verification is taken as the parameter verification result;

[0025] In the case that the interface parameters to be checked fail to pass the target parameter verification rule, the failure of the interface parameter verification is taken as the parameter verification result.

[0026] According to some embodiments of the present application, after the interface parameter to be verified is verified according to the target parameter verification rule and a parameter verification result is obtained, the method further includes:

[0027] When the parameter verification result is that the interface parameter verification has passed, executing the interface parameter to be verified according to a preset execution strategy;

[0028] When the parameter verification result is that the interface parameter verification fails, a verification failure prompt message is fed back to the client.

[0029] According to some embodiments of the present application, after determining the interface name according to the interface parameters to be verified, the method further includes:

[0030] In the case that the target parameter verification rule corresponding to the interface name is not matched from the preset distributed configuration management platform, the interface parameter to be verified is scheduled according to a preset scheduling strategy.

[0031] In a second aspect, an embodiment of the present application further provides a parameter verification device, the device comprising:

[0032] A first processing module, used for obtaining a data request from a client;

[0033] A second processing module is used to intercept and process the input interface parameters according to the data request to obtain the interface parameters to be verified;

[0034] A third processing module, used to determine the interface name according to the interface parameters to be checked;

[0035] A fourth processing module, used to determine a target parameter verification rule from a preset distributed configuration management platform according to the interface name;

[0036] The fifth processing module is used to perform verification processing on the interface parameters to be verified according to the target parameter verification rule to obtain parameter verification results.

[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the parameter verification method as described in the first aspect above is implemented.

[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the parameter verification method described in the first aspect above.

[0039] According to the parameter verification method of the embodiment provided by the present application, at least the following beneficial effects are achieved: in the process of parameter verification processing, first obtain the data request of the client, then intercept and process the input interface parameters according to the data request, and then obtain the interface parameters to be verified; then determine the interface name according to the interface tree to be verified; then determine the target parameter verification rules from the preset distributed configuration management platform according to the interface name; finally, verify and process the interface parameters to be verified according to the target parameter verification rules, and finally obtain the parameter verification results. Through the above technical scheme, only the target parameter verification rules need to be modified to change the verification rules, so that the interface input parameter verification can be more flexible and simple, without the need for developers to rewrite related codes, thus saving development costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0041] Figure 1 is a flow chart of a parameter verification method provided by an embodiment of the present application;

[0042] Figure 2 is a specific flow chart of step S200 provided in one embodiment of the present application;

[0043] Figure 3 is a specific flow chart of step S300 provided in one embodiment of the present application;

[0044] Figure 4 is a specific flow chart of step S400 provided in one embodiment of the present application;

[0045] Figure 5 is a specific flow chart of step S500 provided in one embodiment of the present application;

[0046] Figure 6 is a flow chart of a parameter verification method provided by another embodiment of the present application;

[0047] Figure 7 It is a flowchart of scheduling the interface parameters to be checked according to a preset scheduling strategy provided by an embodiment of the present application;

[0048] Figure 8 is a schematic diagram of a parameter verification device provided by an embodiment of the present application;

[0049] Fig. 9 It is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0052] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0053] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0054] AI is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial intelligence is a branch of computer science. Artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0055] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0056] Artificial intelligence is AI. AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0057] The servers involved in artificial intelligence technology can be independent servers or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0058] The present application provides a parameter verification method, device, electronic device and computer-readable storage medium. In the process of parameter verification processing, first obtain the client's data request, then intercept and process the input interface parameters according to the data request, and then obtain the interface parameters to be verified; then determine the interface name according to the interface tree to be verified; then determine the target parameter verification rules from the preset distributed configuration management platform according to the interface name; finally, verify the interface parameters to be verified according to the target parameter verification rules, and finally obtain the parameter verification results. Through the above technical solution, it is only necessary to modify the target parameter verification rules to achieve the change of the verification rules, so that the interface input parameter verification can be more flexible and simple, without the need for developers to rewrite related codes, which saves development costs well.

[0059] The parameter verification method provided in the embodiment of the present application relates to the field of financial technology. The parameter verification method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the parameter verification method, etc., but is not limited to the above forms.

[0060] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0061] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0062] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0063] like Figure 1 As shown, Figure 1 It is a flow chart of a parameter verification method provided by an embodiment of the present application, and the parameter verification method includes but is not limited to steps S100 to S500.

[0064] Step S100, obtaining a data request from a client;

[0065] Step S200, intercepting and processing the input interface parameters according to the data request to obtain the interface parameters to be verified;

[0066] Step S300, determining the interface name according to the interface parameters to be verified;

[0067] Step S400, determining a target parameter verification rule from a preset distributed configuration management platform according to the interface name;

[0068] Step S500: Verify the interface parameters to be verified according to the target parameter verification rule to obtain the parameter verification result.

[0069] It should be noted that in the process of parameter verification, first obtain the client's data request, then intercept and process the input interface parameters according to the data request, and then obtain the interface parameters to be verified; then determine the interface name according to the interface tree to be verified; then determine the target parameter verification rules from the preset distributed configuration management platform according to the interface name; finally, verify the interface parameters to be verified according to the target parameter verification rules, and finally obtain the parameter verification results. Through the above technical solution, only the target parameter verification rules need to be modified to change the verification rules, making the interface input parameter verification more flexible and simple, without the need for developers to rewrite related codes, thus saving development costs.

[0070] It is worth noting that in the process of obtaining the data request from the client, the server will first obtain the user's permission or consent, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or consent through a pop-up window or jump to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the embodiment of the present application to operate normally is obtained. Exemplarily, when the insurance query server receives the data request sent by the user's mobile phone, it will intercept the input interface parameters to obtain the interface parameters to be verified, and will subsequently verify the interface parameters to be verified.

[0071] It is worth noting that the embodiment of the present application performs verification processing on the interface parameters to be verified, which can verify the type of the interface parameters to be verified and ensure that the received data type is consistent with the expectation. For example, if an integer is expected, a string should not be received; the length of the interface parameters to be verified can also be verified to limit the length of the data to prevent problems such as buffer overflow caused by excessively long input data; the format of the interface parameters to be verified can also be verified to check whether the data meets specific format requirements, such as email addresses, telephone numbers, and dates; the data range of the interface parameters to be verified can also be verified to ensure that the data is within a reasonable numerical range.

[0072] It is worth noting that after determining the interface name based on the interface parameters to be verified, the target parameter verification rules can be determined from the preset distributed configuration management platform based on the interface name, so that the target parameter verification rules can be used to verify the interface parameters to be verified, making the entire data verification process simpler and faster.

[0073] It is worth noting that a distributed configuration management platform is a system used to centrally manage configuration information in a distributed system. This platform allows developers and operation and maintenance teams to uniformly manage and update configurations across multiple services, applications, or servers without having to directly modify the configuration files of each node. The following are some key features and advantages of a distributed configuration management platform: centralized storage, configuration information is stored in a central location, easy to access and manage; dynamic update, configuration can be dynamically updated at runtime without restarting services or applications; version control, support for configuration version management, can track historical changes and roll back to old versions; environment isolation, can provide different configurations for different deployment environments (such as development, testing, and production); access control, fine-grained permission management, to ensure that only authorized users can access or modify configurations; configuration templates, support for configuration templates, can quickly deploy services with similar configurations; service discovery, integration with service discovery mechanism, automatic registration and discovery of service instances; high availability, the configuration service itself needs to be highly available to ensure that configuration information is always accessible; auditing and monitoring, record the configuration change history, provide monitoring and alarm functions; multi-tenant support, in a multi-tenant environment, provide isolated configuration space for different tenants; configuration push, after the configuration is updated, it can be automatically pushed to all related services or applications; configuration verification, before applying the configuration, you can verify the correctness and validity of the configuration; configuration encryption, for sensitive information, provide encrypted storage and transmission capabilities.

[0074] It is worth noting that a plurality of parameter verification rules are set in the distributed configuration management platform. According to the interface name, the target parameter verification rule can be determined from the multiple parameter verification rules in the distributed configuration management platform; finally, the interface parameters to be verified are verified according to the target parameter verification rule, and the corresponding parameter verification result can be obtained. Exemplarily, a plurality of insurance system parameter verification rules are set in the distributed configuration management platform. According to the interface name of the insurance system, the target parameter verification rule can be determined from the multiple insurance system parameter verification rules in the distributed configuration management platform; finally, the interface parameters to be verified of the insurance system can be verified according to the target parameter verification rule, so as to obtain the corresponding parameter verification result.

[0075] It should be noted that, through the above technical solution, by configuring custom validation rules, more restrictions and checks can be made on input parameters for specific business needs or abnormal situations, thereby improving the security and correctness of interface requests and reducing problems such as data leakage and identity authentication failure. Reduce unnecessary development and testing work. By configuring custom validation rules, it is possible to avoid repeated parameter legitimacy checks during the development process, reduce the time and effort of interface development, and improve development efficiency and system stability. Support automated testing. By configuring custom validation rules, parameter legitimacy checks can be automatically performed to improve the efficiency and accuracy of interface testing, and provide support for continuous integration and continuous deployment of the system. Flexible customization, the configuration and expansion method of interface input parameter validation is flexible, and can be configured and expanded accordingly according to actual needs to meet different business needs and scenarios. High maintainability. By configuring custom validation rules, the legitimacy and correctness requirements of input parameters can be more clearly defined, the inconsistency of interface parameters can be reduced, and the maintainability and scalability of the code can be improved.

[0076] In some embodiments, Figure 2 As shown, the above step S200 may include but is not limited to steps S210 to S220.

[0077] Step S210, analyzing and processing the data request to obtain data ownership information;

[0078] Step S220, intercepting and processing the input interface parameters according to the data attribution information to obtain the interface parameters to be verified.

[0079] It should be noted that in the process of intercepting and processing the input interface parameters according to the client's data request, the data attribution information can be obtained by first analyzing and processing the client's data request; then, the input interface parameters are intercepted and processed according to the data attribution information to obtain the interface parameters to be verified; through the above technical solution, the interface parameters to be verified can be determined according to the data request, thereby making prerequisite preparations for subsequent data verification.

[0080] It is worth noting that the data attribution information can be obtained by analyzing and processing the data request, and the interface parameters to be verified can be determined from the input interface parameters according to the data attribution information, so as to prepare for the subsequent parameter determination. Among them, the data request can be analyzed and processed to determine which specific parameters in the input interface parameters need to be subsequently verified, so as to prepare for the verification of the interface parameters to be verified.

[0081] In some embodiments, Figure 3 As shown, the above step S300 may include but is not limited to step S310 and step S320.

[0082] Step S310, decomposing the interface parameters to be checked to obtain multiple interface information blocks;

[0083] Step S320: Determine and obtain an interface name from multiple interface information blocks.

[0084] It should be noted that, in the process of determining the interface name according to the interface parameters to be verified, the interface parameters to be verified are first decomposed to obtain multiple interface information blocks; then the corresponding interface name can be determined from the multiple interface information blocks, and then the target parameter verification rule can be determined from the preset distributed configuration management platform according to the interface name. Through the above technical solution, the interface name can be determined more accurately.

[0085] It is worth noting that multiple interface information blocks can be obtained by decomposing the interface parameters to be verified; the corresponding interface name can be obtained by semantically identifying each interface information block. For example, for an intelligent dialogue robot, the user can directly ask the dialogue robot about relevant financial issues, such as the current deposit interest rate and the current types of insurance; the dialogue robot is equipped with an intelligent dialogue system, and multiple interface information blocks can be obtained by decomposing the interface parameters to be verified of the intelligent dialogue system; the interface name of the intelligent dialogue system can be determined based on the interface information block.

[0086] In some embodiments, Figure 4 As shown, a plurality of parameter verification rules are set in the distributed configuration management platform, each parameter verification rule corresponds to a name information, and the above step S400 may include but is not limited to step S410 and step S420.

[0087] Step S410, matching the interface name with the name information in the distributed configuration management platform to obtain target name information;

[0088] Step S420: determine the parameter verification rule corresponding to the target name information as the target parameter verification rule.

[0089] It should be noted that, in the process of determining the corresponding target parameter verification rules from the preset distributed configuration management platform according to the interface name, the interface name is first matched with the name information in the distributed configuration management platform to obtain the target name information; then the parameter verification rules corresponding to the target name information are determined as the target parameter verification rules, and then the interface parameters to be verified can be verified according to the target parameter verification rules, so that the verification process of the interface parameters to be verified can be more accurate and faster.

[0090] It is worth noting that since the distributed configuration management platform is equipped with multiple parameter verification rules, and each parameter verification rule corresponds to a name information; therefore, it is only necessary to match the interface name with the name information in the distributed configuration management platform to obtain the target name information; after determining the target name information, the parameter verification rule corresponding to the target name information can be determined as the target parameter verification rule, and then the determined target parameter verification rule can be used to verify the interface parameters to be verified.

[0091] It is worth noting that parameter verification rules may include but are not limited to the following rules: data type verification: ensure that the input parameter type is consistent with the expected, such as string, integer, floating point number, etc.; length verification: for parameters of string or array type, check whether their length is within the allowed range; range verification: for parameters of numeric type, check whether they are within a specific range; format verification: for parameters that require a specific format (such as date, email address, phone number, etc.), use regular expressions or other methods to perform format verification; null value verification: check whether the parameter is empty or null, and decide whether to allow null values ​​based on program logic; custom rule verification: according to business needs, specific logical verification of parameters may be required, such as password strength, uniqueness of username, etc.; dependency verification: some parameters may depend on the values ​​of other parameters, and corresponding dependency verification is required; security verification: appropriate filtering and escaping of input parameters; error prompts: when parameter verification fails, provide clear and specific error prompt information to help users understand the problem; logging: during the parameter verification process, record key information for problem tracking and debugging.

[0092] In some embodiments, Figure 5 As shown, the above step S500 may include but is not limited to step S510 and step S540.

[0093] Step S510, when there are multiple target name information, determine to obtain multiple target parameter verification rules;

[0094] Step S520, traverse each target parameter verification rule, and verify the interface parameters to be verified according to the target parameter verification rule;

[0095] Step S530, when the interface parameter to be verified passes all target parameter verification rules, the interface parameter verification passing is taken as the parameter verification result;

[0096] Step S540: If the interface parameter to be checked fails to pass the target parameter verification rule, the failure of the interface parameter verification is taken as the parameter verification result.

[0097] It should be noted that, in the process of verifying the interface parameters to be verified according to the target parameter verification rules to obtain the parameter verification results, when there are multiple target name information, multiple target parameter verification rules can be determined; then each target parameter verification rule is traversed and verified according to the target parameter verification rules; and when the interface parameters to be verified pass all target parameter verification rules, the interface parameter verification pass can be used as the parameter verification result; when the interface parameters to be verified fail to pass the target parameter verification rules, the interface parameter verification failure can be used as the parameter verification result; through the above technical scheme, the verification processing of the interface parameters to be verified can be simpler, faster and more reliable.

[0098] It is worth noting that, since the target name information corresponds to the target parameter verification rule one by one, when there are multiple target name information, there will be multiple target parameter verification rules; then each target parameter verification rule is traversed and processed, and the interface parameters to be verified are verified according to the target parameter verification rule; when the interface parameters to be verified pass all the target parameter verification rules, the interface parameter verification pass can be used as the parameter verification result; when the interface parameters to be verified do not pass any number of target parameter verification rules, the interface parameter verification failure can be used as the parameter verification result. Through the above technical solution, the verification of the interface parameters to be verified can be more accurate and reliable.

[0099] In some embodiments, Figure 6 As shown, after executing the above step S500, it may also include but not limited to step S610 and step S620.

[0100] Step S610, when the parameter verification result is that the interface parameter verification has passed, executing the interface parameter to be verified according to a preset execution strategy;

[0101] Step S620: When the parameter verification result is that the interface parameter verification fails, a verification failure prompt message is fed back to the client.

[0102] It should be noted that after the interface parameters to be checked are checked according to the target parameter verification rules to obtain the parameter verification results, when the parameter verification result is that the interface parameter verification passes, the interface parameters to be checked can be executed according to the pre-set execution strategy; when the parameter verification result is that the interface parameter verification fails, the verification failure prompt information can be fed back to the client; through the above technical solution, different operations are performed according to different parameter verification results, so that the parameter verification process can be more reliable.

[0103] It is worth noting that when the parameter verification result is that the interface parameter verification passes, the pre-set execution strategy can be used to execute the interface parameters to be verified. For example, the interface parameters can be forwarded and scheduled, or calculated, which is not limited here.

[0104] It is worth noting that, when the parameter verification result is that the interface parameter verification fails, a verification failure prompt message can be fed back to the client to inform the user that the interface parameter verification fails, which brings a better user experience. The client can be a mobile phone, computer or tablet, which is not limited here.

[0105] In some embodiments, Figure 7 As shown, after executing step S300, step S330 may also be included but not limited to.

[0106] Step S330: When no target parameter verification rule corresponding to the interface name is matched from the preset distributed configuration management platform, the interface parameters to be verified are scheduled according to the preset scheduling strategy.

[0107] It should be noted that after determining the interface name according to the interface parameters to be checked, if the target parameter verification rule corresponding to the interface name cannot be matched from the preset distributed configuration management platform, the interface parameters to be checked can be scheduled according to the preset scheduling strategy; if the target parameter verification rule corresponding to the interface name of the interface parameters to be checked cannot be matched in the distributed configuration management platform, the interface parameters to be checked can be scheduled using the preset scheduling strategy, for example, forwarding the verification interface parameters, and the whole process is simple and quick.

[0108] In addition, if Figure 8 As shown, an embodiment of the present application further provides a parameter verification device 10, comprising:

[0109] The first processing module 100 is used to obtain a data request from a client;

[0110] The second processing module 200 is used to intercept the input interface parameters according to the data request to obtain the interface parameters to be verified;

[0111] The third processing module 300 is used to determine the interface name according to the interface parameters to be checked;

[0112] The fourth processing module 400 is used to determine a target parameter verification rule from a preset distributed configuration management platform according to the interface name;

[0113] The fifth processing module 500 is used to perform verification processing on the interface parameters to be verified according to the target parameter verification rule to obtain parameter verification results.

[0114] It should be noted that in the process of parameter verification, first obtain the client's data request, then intercept and process the input interface parameters according to the data request, and then obtain the interface parameters to be verified; then determine the interface name according to the interface tree to be verified; then determine the target parameter verification rules from the preset distributed configuration management platform according to the interface name; finally, verify the interface parameters to be verified according to the target parameter verification rules, and finally obtain the parameter verification results. Through the above technical solution, only the target parameter verification rules need to be modified to change the verification rules, making the interface input parameter verification more flexible and simple, without the need for developers to rewrite related codes, thus saving development costs.

[0115] It is worth noting that in the process of obtaining the data request from the client, the server will first obtain the user's permission or consent, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or consent through a pop-up window or jump to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the embodiment of the present application to operate normally is obtained. Exemplarily, when the insurance query server receives the data request sent by the user's mobile phone, it will intercept the input interface parameters to obtain the interface parameters to be verified, and will subsequently verify the interface parameters to be verified.

[0116] It is worth noting that the embodiment of the present application performs verification processing on the interface parameters to be verified, which can verify the type of the interface parameters to be verified and ensure that the received data type is consistent with the expectation. For example, if an integer is expected, a string should not be received; the length of the interface parameters to be verified can also be verified to limit the length of the data to prevent problems such as buffer overflow caused by excessively long input data; the format of the interface parameters to be verified can also be verified to check whether the data meets specific format requirements, such as email addresses, telephone numbers, and dates; the data range of the interface parameters to be verified can also be verified to ensure that the data is within a reasonable numerical range.

[0117] It is worth noting that after determining the interface name based on the interface parameters to be verified, the target parameter verification rules can be determined from the preset distributed configuration management platform based on the interface name, so that the target parameter verification rules can be used to verify the interface parameters to be verified, making the entire data verification process simpler and faster.

[0118] It is worth noting that a distributed configuration management platform is a system used to centrally manage configuration information in a distributed system. This platform allows developers and operation and maintenance teams to uniformly manage and update configurations across multiple services, applications, or servers without having to directly modify the configuration files of each node. The following are some key features and advantages of a distributed configuration management platform: centralized storage, configuration information is stored in a central location, easy to access and manage; dynamic update, configuration can be dynamically updated at runtime without restarting services or applications; version control, support for configuration version management, can track historical changes and roll back to old versions; environment isolation, can provide different configurations for different deployment environments (such as development, testing, and production); access control, fine-grained permission management, to ensure that only authorized users can access or modify configurations; configuration templates, support for configuration templates, can quickly deploy services with similar configurations; service discovery, integration with service discovery mechanism, automatic registration and discovery of service instances; high availability, the configuration service itself needs to be highly available to ensure that configuration information is always accessible; auditing and monitoring, record the configuration change history, provide monitoring and alarm functions; multi-tenant support, in a multi-tenant environment, provide isolated configuration space for different tenants; configuration push, after the configuration is updated, it can be automatically pushed to all related services or applications; configuration verification, before applying the configuration, you can verify the correctness and validity of the configuration; configuration encryption, for sensitive information, provide encrypted storage and transmission capabilities.

[0119] The specific implementation of the parameter verification device 10 is basically the same as the specific implementation of the above-mentioned parameter verification method, and will not be repeated here.

[0120] In addition, if Fig. 9 As shown, an embodiment of the present application further provides an electronic device 700 , which includes: a memory 720 , a processor 710 , and a computer program stored in the memory 720 and executable on the processor 710 .

[0121] The processor 710 and the memory 720 may be connected via a bus or in other ways.

[0122] The non-transitory software programs and instructions required to implement the parameter verification methods of the above embodiments are stored in the memory 720 , and when executed by the processor 710 , the parameter verification methods of the above embodiments are executed.

[0123] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, 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.

[0124] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by a processor 710 or a controller, for example, by a processor 710 in the above-mentioned device embodiment, so that the above-mentioned processor 710 can execute the parameter verification method in the above-mentioned embodiment.

[0125] The above embodiments may be used in combination, and modules with the same name in different embodiments may be the same or different.

[0126] The above describes specific embodiments of the present application, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0127] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0128] The apparatus, device, computer-readable storage medium and method provided in the embodiments of the present application correspond to each other. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be repeated here.

[0129] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs. The original code before compiling must also be written in a specific programming language, which is called Hardware Description Language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Bootean Express Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell Unity Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used one is VHDL (Very-High-Speed ​​Integrated Ci rcu i tHardware Descr i pt i on Language) and Ver il og.Those skilled in the art should also be aware that it is easy to obtain a hardware circuit that implements the logical method flow by simply performing some logic programming on the method flow using the above-mentioned hardware description languages ​​and programming it into an integrated circuit.

[0130] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.

[0131] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0132] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of the present application may adopt 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.) that contain computer-usable program code.

[0134] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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 device that provides the functions specified in a block or multiple blocks.

[0135] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0136] 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 for the functions specified in one or more boxes.

[0137] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0138] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash memory (Flash RAM). The memory is an example of a computer-readable medium.

[0139] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (Transitory Med ia), such as modulated data signals and carrier waves.

[0140] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0141] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0142] Embodiments of the present application may be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. Embodiments of the present application may also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0143] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A parameter verification method, characterized in that: include: Get the client's data request; Intercepting and processing the input interface parameters according to the data request to obtain the interface parameters to be verified; Determine the interface name according to the interface parameters to be verified; According to the interface name, determining a target parameter verification rule from a preset distributed configuration management platform; The interface parameters to be verified are verified according to the target parameter verification rules to obtain parameter verification results.

2. The parameter verification method according to claim 1, characterized in that: The step of intercepting the input interface parameters according to the data request to obtain the interface parameters to be verified includes: Analyzing and processing the data request to obtain data ownership information; The input interface parameters are intercepted and processed according to the data attribution information to obtain the interface parameters to be verified.

3. The parameter verification method according to claim 1, characterized in that: The determining the interface name according to the interface parameters to be checked includes: Decomposing the interface parameters to be verified to obtain multiple interface information blocks; The interface name is determined from a plurality of the interface information blocks.

4. The parameter verification method according to claim 1, characterized in that: The distributed configuration management platform is provided with a plurality of parameter verification rules, each of which corresponds to a name information; the target parameter verification rule is determined from the preset distributed configuration management platform according to the interface name, including: Matching the interface name with the name information in the distributed configuration management platform to obtain target name information; The parameter verification rule corresponding to the target name information is determined as the target parameter verification rule.

5. The parameter verification method according to claim 4, characterized in that: The verifying the interface parameter to be verified according to the target parameter verification rule to obtain the parameter verification result includes: In the case where there are multiple target name information, multiple target parameter verification rules are determined; Traversing each of the target parameter verification rules, and verifying the interface parameters to be verified according to the target parameter verification rules; In the case where the interface parameter to be checked passes all the target parameter verification rules, passing the interface parameter verification is taken as the parameter verification result; In the case that the interface parameters to be checked fail to pass the target parameter verification rule, the failure of the interface parameter verification is taken as the parameter verification result.

6. The parameter verification method according to claim 5, characterized in that: After the interface parameters to be verified are verified according to the target parameter verification rule and a parameter verification result is obtained, the method further includes: When the parameter verification result is that the interface parameter verification has passed, executing the interface parameter to be verified according to a preset execution strategy; When the parameter verification result is that the interface parameter verification fails, a verification failure prompt message is fed back to the client.

7. The parameter verification method according to claim 1, characterized in that: After determining the interface name according to the interface parameters to be verified, the method further includes: In the case that the target parameter verification rule corresponding to the interface name is not matched from the preset distributed configuration management platform, the interface parameters to be verified are scheduled according to a preset scheduling strategy.

8. A parameter verification device, characterized in that: include: A first processing module, used for obtaining a data request from a client; A second processing module is used to intercept and process the input interface parameters according to the data request to obtain the interface parameters to be verified; A third processing module, used to determine the interface name according to the interface parameters to be checked; A fourth processing module, used to determine a target parameter verification rule from a preset distributed configuration management platform according to the interface name; The fifth processing module is used to perform verification processing on the interface parameters to be verified according to the target parameter verification rule to obtain parameter verification results.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the parameter verification method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to execute the parameter verification method described in any one of claims 1 to 7.

Citation Information

Cited By

  • API calling method and device and readable storage medium

    CN119537061A