Method, apparatus, terminal device, and storage medium for performing field verification based on customer parameters
By analyzing customer codes to obtain parameter information and dynamically configure verification devices and transaction templates, the problem of resource consumption and verification rules that cannot be flexibly configured in the business system when handling illegal requests is solved, and efficient field checksum resource optimization is achieved.
Patent Information
- Application Number
- CN202210292399.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-03-24
AI Technical Summary
In the prior art, business systems consume a lot of resources when handling a large number of illegal requests, and the verification rules of different cooperative institutions cannot be flexibly configured, resulting in poor scalability and waste of resources.
By analyzing customer codes, obtaining parameter information, dynamically configure verification devices and transaction templates, field verification at the access layer is realized, personalized verification rules of different cooperative institutions are supported, and invalid requests are processed in the access layer, reducing pressure on the business system.
It improves business processing efficiency, reduces the pressure on the business system, realizes flexible verification rules configuration, and avoids resource waste and system downtime risks.
Smart Images

Figure CN114661509B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer systems, and in particular to a method, apparatus, terminal equipment and storage medium for performing field verification based on customer parameters. Background Art
[0002] In actual business transaction scenarios, to prevent issues like null pointers and array out-of-bounds from negatively impacting system operations, and even to ensure that values meet business requirements, field values are often validated within the program before specific business processing is performed. Currently, the most direct approach is for developers to hard-code validation directly into the business interface. However, this approach is not very scalable. Adding new validation fields or rules requires re-release of the code, and all transaction requests are forwarded to the business interface. When a large number of invalid requests arrive, the business interface consumes significant resources to process these validations, significantly reducing the success rate of legitimate requests and even causing business system downtime. To reduce the pressure on business systems, some institutions have added an access layer between the request and the business system. This access layer handles field validation, significantly alleviating the pressure on business systems and allowing for dynamic scalability of field validation. However, this only performs simple validation on interface fields. Furthermore, at the interface level, validation rules and values are identical across different partnering institutions, preventing different partners from reusing the same interface for the same business. This presents a major technical drawback.
[0003] 1. Low scalability - new validation rules are added or the name of the validation field changes, which requires frequent code modifications.
[0004] Validation rules and field values cannot be customized for each partner. This means that when different partner organizations request the same business interface, the validation rules are identical. For example, if A and B simultaneously initiate a loan application, the business rules stipulate that only loans up to 100,000 yuan can be issued to A, while loans up to 1 million yuan can be issued to B. Field validation within the same interface is impossible. The only solution is to release a new interface with the same processing logic but different field validation ranges, resulting in redundancy and resource waste. Summary of the Invention
[0005] In order to reduce the pressure and damage caused by invalid or malicious attacks in the Internet to the business system and enable the business system to better handle valid transactions, the embodiments of the present invention provide a method, apparatus, terminal device and storage medium for field verification based on customer parameters.
[0006] A method for performing field verification based on customer parameters, comprising the following steps:
[0007] First parse the URL and get the client code;
[0008] Then determine whether the customer code exists. If so, obtain the customer parameter information and execute the next step. If not, the verification ends.
[0009] Based on the obtained customer parameter information, the call interface permission is enabled for the customer. If the activation is successful, the next step is executed. If the activation fails, the verification ends.
[0010] Based on the above permissions, the interface template is parsed in turn, and the message is parsed, including obtaining the field verification configuration, including the verification field name, verifier name, customer parameter key and verification prompt information; the verification field value is obtained by parsing the message;
[0011] Verify the field and its value, using the configured customer parameter value as input and the validator logic processing;
[0012] If the verification is successful, the system service is called and a verification prompt message is returned. If the verification fails, the verification ends.
[0013] Furthermore: the device includes a customer parameter maintenance module, a verifier management module, a transaction template configuration module and an online transaction module.
[0014] Furthermore: The customer parameter maintenance module is used to maintain verification values of cooperative institutions. A customer can add one or more parameters. The customer information is parsed according to the customer code to obtain a key-value pair consisting of parameter name and parameter value. The parameter name as the key is customized, and the value is obtained from the parameter dimension group.
[0015] Further: Validator management module, which realizes dynamic addition of validators. The validator includes validator name, processing logic and validator description. The input parameter is an object array consisting of the field to be verified and the customer parameter configuration field.
[0016] Further: The transaction template configuration module is used to add field verification configuration to the corresponding fields in the interface template. A field can perform multiple verifications at the same time, and the verification order can be specified. The field verification information includes the verifier name, execution conditions, input parameters (parameter names configured by customer parameters), and return prompt information.
[0017] Further: the terminal device may include: a processor, a storage medium and a bus, the storage medium stores machine-readable instructions executable by the processor, when the terminal device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the deep learning model training method described in the above embodiments.
[0018] Further: A storage medium storing a computer program, wherein the computer program executes the steps of the above method when executed by a processor.
[0019] The beneficial effects of the present invention are as follows: the present invention adds field verification at the access layer that can set different verification standards for different cooperative organizations, processes invalid requests at the access layer, greatly reduces the pressure on the business system, and improves business processing efficiency. The present invention performs field verification based on the cooperative organization, and can set different verification values for different cooperative organizations, and the verification rules are dynamically added through configuration without the need for re-publishing. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 Shown is a schematic flow chart of the method of the present invention;
[0022] Figure 2 Shows a schematic diagram of the composition of the device of the present invention;
[0023] Figure 3 A schematic diagram showing the composition of the terminal device of the present invention is shown; DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be understood that the drawings in the present invention only serve the purpose of illustration and description and are not used to limit the scope of protection of the present invention. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in the present invention illustrate the operations implemented according to some embodiments of the present invention. It should be understood that the operations of the flowchart can be implemented out of sequence, and steps that have no logical context relationship can be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of the present invention, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0025] In addition, the embodiments described in the present invention are only some of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0026] It should be noted that the term "including" will be used in the embodiments of the present invention to indicate the presence of the features declared thereafter, but does not exclude the addition of other features. It should also be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of the present invention, it should also be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0027] Figure 1 A flow chart showing the steps of the method of the present invention is shown.
[0028] A method for performing field verification based on customer parameters, comprising the following steps:
[0029] First parse the URL and get the client code;
[0030] Then determine whether the customer code exists. If so, obtain the customer parameter information and execute the next step. If not, the verification ends.
[0031] Based on the obtained customer parameter information, the call interface permission is enabled for the customer. If the activation is successful, the next step is executed. If the activation fails, the verification ends.
[0032] Based on the above permissions, the interface template is parsed in turn, and the message is parsed, including obtaining the field verification configuration, including the verification field name, verifier name, customer parameter key and verification prompt information; the verification field value is obtained by parsing the message;
[0033] Verify the field and its value, using the configured customer parameter value as input and the validator logic processing;
[0034] If the verification is successful, the system service is called and a verification prompt message is returned. If the verification fails, the verification ends.
[0035] like Figure 2 As shown, the device of the present invention includes a customer parameter maintenance module, a verifier management module, a transaction template configuration module and an online transaction module;
[0036] The customer parameter maintenance module is used to maintain verification values for partner institutions. A customer can add one or more parameters. Customer information is parsed based on the customer code to generate a key-value pair consisting of the parameter name and value. The parameter name, serving as the key, is user-defined, and the value is derived from a parameter dimension group. A parameter dimension group consists of one or more parameter dimensions, and the order and scenarios of their combination can be specified. Parameter dimensions typically represent transaction fields, such as the customer code key, target system key, interface code key, and customer specification key. The transaction request processing process retrieves the corresponding values from the parameter dimensions (i.e., customer code, target system code, interface code, and customer specification). The parameter dimension values obtained in the transaction are then compared with the configured dimension values. If they match, the configured parameter value is retrieved; if they differ, the parameter value is left blank. For example, if customer A configures the parameter name limit, the parameter dimension is the interface code key, the dimension value is AI001, and the parameter value is 100, then the configured parameter value 100 will only be retrieved when customer A requests the AI001 interface, resulting in a key-value pair of limit:100. Otherwise, no result is obtained. When customer A requests interface AI002, the result is limit:null; when customer B requests interface AI001, there is no key-value pair. If customer A configures the parameter name limit, the parameter dimension is customer code key, and the parameter value is 100, then customer A will receive limit:100 when requesting all interfaces.
[0037] The validator management module allows for dynamic addition of validators. Its implementation logic uses Groovy syntax and dynamically loads Groovy classes via the GroovyClassLoader. A validator includes the validator name, processing logic, and a description. The input parameters are an array of objects consisting of the fields to be validated and customer parameter configuration fields. Once a validator is approved, it takes effect immediately.
[0038] In the transaction template configuration module, field validation configuration is added to the corresponding fields in the interface template. Multiple validations can be performed on a field at the same time, and the validation order can be specified. The field validation information includes the validator name, execution conditions, input parameters (parameter names configured by the customer parameters), and return prompt information.
[0039] In the online transaction module, during the actual transaction process, the access layer processes the transaction through the following steps based on the customer parameter configuration to obtain the parameter name-parameter value key-value pair, that is, to set the verification standard for the customer. The standards of different cooperative institutions can be different.
[0040] like Figure 3As shown, the terminal device 6 may include: a processor 601, a storage medium 602, and a bus 603. The storage medium 602 stores machine-readable instructions executable by the processor 601. When the terminal device is running, the processor 601 communicates with the storage medium 602 via the bus 603. The processor 601 executes the machine-readable instructions to perform the steps of the deep learning model training method described in the above embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.
[0041] For ease of description, only one processor is described in the above terminal device. However, it should be noted that in some embodiments, the terminal device in the present invention may also include multiple processors, and thus the steps performed by one processor described in the present invention may also be performed jointly or individually by multiple processors.
[0042] The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for field verification based on customer parameters, characterized in that: First parse the URL and get the client code; Then determine whether the customer code exists. If so, obtain the customer parameter information and execute the next step. If not, the verification ends. Based on the obtained customer parameter information, the call interface permission is enabled for the customer. If the activation is successful, the next step is executed. If the activation fails, the verification ends. Based on the above permissions, the interface template and the message are parsed in turn; Verify the field and its value, using the configured customer parameter value as input and the validator logic processing; If the verification is successful, the system service is called and the verification prompt information is returned; if the verification fails, the verification ends; Among them, the key-value pair consisting of parameter name and parameter value is obtained by parsing customer information according to the customer code. The parameter name used as the key is customized, and the value is obtained from the parameter dimension group. Parameter dimensions include the customer code key, target system key, and interface code key. The customer specification key can represent the transaction field. During the transaction request processing, the corresponding value can be obtained based on the parameter dimension. The parameter dimension value obtained in the transaction is then compared with the configured dimension value. If they are the same, the configured parameter value is retrieved. If they are different, the parameter value is left empty.
2. The method according to claim 1, characterized in that Parse the interface template to obtain the field validation configuration, including the validation field name, validator name, customer parameter key, and validation prompt information.
3. The method according to claim 1, characterized in that Parse the message to obtain the checksum field value.
4. A device for performing field verification based on customer parameters, characterized in that: It includes customer parameter maintenance module, validator management module, transaction template configuration module and online transaction module; The customer parameter maintenance module is used to maintain verification values for partner organizations. A customer can add one or more parameters. The module parses customer information based on the customer code to obtain a key-value pair consisting of the parameter name and parameter value. The parameter name used as the key is customized, and the value is obtained from the parameter dimension group. Parameter dimensions include the customer code key, target system key, and interface code key. The customer specification key can represent the transaction field. During the transaction request processing, the corresponding value can be obtained based on the parameter dimension. The parameter dimension value obtained in the transaction is then compared with the configured dimension value. If they are the same, the configured parameter value is retrieved. If they are different, the parameter value is left empty.
5. The device according to claim 4, characterized in that The validator management module implements dynamic addition of validators. The validator includes the validator name, processing logic, and validator description. The input parameter is an object array consisting of the field to be verified and the customer parameter configuration field.
6. The device according to claim 4, characterized in that The transaction template configuration module is used to add field validation configuration to the corresponding fields in the interface template. A field can perform multiple validations at the same time, and the validation order can be specified. The field validation information includes the validator name, execution conditions, input parameters, and return prompt information.
7. A terminal device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the terminal device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the method according to any one of claims 1 to 3.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Data verification method and device
CN113779004A