Information processing method and device, equipment, storage medium and program product
By automating single-field and multi-field verification of interface requests in the internal bank system, combined with the tangential programming technology, the code redundancy and maintenance difficulties in interface parameter verification are solved, and the system security and Reliability enables a more flexible and efficient verification mechanism.
Patent Information
- Application Number
- CN202411373720.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
The existing technology interface parameter verification method in the bank's internal system has problems such as code redundancy, maintenance difficulties, and error-prone, making it difficult to meet the security and reliability requirements of the transaction entrance.
By intercepting target requests, obtaining interface fields and verifying them according to preset single-field and multi-field verification rules, including verification of numerical, value list, number, mailbox and other types, ensuring the legality of interface requests and business rules. The compliance of the system uses section-oriented programming technology to achieve automated verification, reducing code redundancy and maintenance costs.
Effectively reduce the risk of illegal requests and malicious attacks, improve system security and reliability, reduce transaction errors, improve the flexibility and maintainability of interface parameter verification, and reduce manual intervention and repetition costs.
Smart Images

Figure CN119272252A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of secure access technology, and in particular, relates to an information processing method, device, equipment, storage medium and program product. Background Art
[0002] With the rapid development of the financial industry and the continuous advancement of information technology, the security and stability of the bank's internal systems have become increasingly important. In the bank's internal system, each interface is called a transaction entry, which is an important channel for the bank system to interact with external systems. Since the interface involves multiple systems and business processes, in order to ensure the security and reliability of the transaction entry, the interface input parameters need to be verified. If the input parameter verification is not strict, it may cause data errors, system failures, and even security vulnerabilities.
[0003] The current method of input parameter verification is usually to directly write the verification logic in the interface code. This method has some disadvantages, such as code redundancy, difficult maintenance, and prone to errors. It is difficult to meet the security and reliability requirements of the transaction entry. Summary of the invention
[0004] The embodiments of the present application provide an information processing method, apparatus, device and computer storage medium, which can improve the flexibility and security of interface input parameter verification.
[0005] In a first aspect, an embodiment of the present application provides an information processing method, including:
[0006] When a target request is detected, the target request is intercepted, wherein the target request includes an interface request sent to a target interface;
[0007] Get multiple interface fields corresponding to the target request;
[0008] Perform single-field checking on the multiple interface fields according to the target single-field checking rules corresponding to the multiple interface fields;
[0009] When the single-field check passes, the association and logical relationship between multiple interface fields are checked using the target multi-field check rule to obtain a target check result.
[0010] In an optional implementation, when a target request is detected, intercepting the target request includes:
[0011] When a target request is detected, the target request is intercepted using aspect-oriented programming technology.
[0012] In an optional implementation, according to the target single field check rules corresponding to each of the multiple interface fields, before performing single field check on the multiple interface fields, the method further includes performing the following steps for each of the multiple interface fields to obtain the target single field check rules corresponding to each of the multiple interface fields:
[0013] Match the interface field with multiple preset fields in the preset data dictionary to obtain the target preset field corresponding to the interface field;
[0014] The single-field checking rule corresponding to the target preset field is determined as the target single-field checking rule corresponding to the interface field.
[0015] In an optional implementation, when the single field check passes, the association and logical relationship between the multiple interface fields are checked by the target multi-field check rule, and before obtaining the target check result, the method further includes:
[0016] Determine the target business rules corresponding to the target interface;
[0017] The multi-field verification rule corresponding to the target business rule is determined as the target multi-field verification rule.
[0018] In an optional implementation, before performing single-field checking on the multiple interface fields according to the target single-field checking rules corresponding to the multiple interface fields, the method further includes:
[0019] Acquire multiple preset fields corresponding to multiple preset interfaces, where the multiple preset interfaces include a target interface;
[0020] Store multiple preset fields into a preset data dictionary;
[0021] Classify multiple preset fields to obtain classification results;
[0022] According to the classification results, corresponding single-field checking rules are configured for each preset field.
[0023] In an optional implementation, the single-field check rule includes at least one of a numerical check, a value list check, a digit check, a letter check, and an email check.
[0024] In an optional implementation, when the single field check passes, the association and logical relationship between the multiple interface fields are checked by the target multi-field check rule, and before obtaining the target check result, the method further includes:
[0025] Get multiple business rules corresponding to multiple preset interfaces;
[0026] For each of the multiple business rules, perform the following steps:
[0027] Determine multiple associated preset fields corresponding to the business rules from a preset data dictionary;
[0028] According to business rules, determine the association and logical relationship between multiple associated preset fields;
[0029] According to the association and logical relationship between multiple associated preset fields, configure the multi-field verification rules corresponding to the business rules.
[0030] In an optional embodiment, the method further includes:
[0031] If the single field check fails, or the target check result used to represent the association and logical relationship check fails, the target request is rejected.
[0032] In an optional embodiment, the method further includes:
[0033] When the target check result is used to represent that the association and logical relationship check have passed, the target request is released so that the target request reaches the target interface.
[0034] In a second aspect, an embodiment of the present application provides an information processing device, including:
[0035] An interception module, used for intercepting a target request when a target request is detected, wherein the target request includes an interface request sent to a target interface;
[0036] An acquisition module, used to acquire multiple interface fields corresponding to a target request;
[0037] A checking module, used for performing single-field checking on the multiple interface fields according to target single-field checking rules corresponding to the multiple interface fields;
[0038] The checking module is also used to check the association and logical relationship between multiple interface fields through the target multi-field checking rule when the single field checking passes, so as to obtain the target checking result.
[0039] In a third aspect, an embodiment of the present application provides an information processing device, the device comprising:
[0040] A processor and a memory storing computer program instructions; when the processor executes the computer program instructions, any one of the above information processing methods is implemented.
[0041] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any one of the above-mentioned information processing methods is implemented.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform any one of the above-mentioned information processing methods.
[0043] The information processing method, device, equipment and computer storage medium of the embodiment of the present application can intercept the target request when the target request is detected. Among them, the target request includes an interface request sent to the target interface. Then, multiple interface fields corresponding to the target request are obtained. According to the target single field verification rules corresponding to each of the multiple interface fields, a single field verification is performed on the multiple interface fields. In this way, the multiple interface fields contained in the interface request can be respectively checked for legality according to the pre-configured single field verification rules. Then, in the case where the single field verification passes, the association and logical relationship between the multiple interface fields are checked by the target multi-field verification rules to obtain the target verification result. In this way, it is possible to check whether the multiple interface fields contained in the interface request meet the expected business rules to check the integrity and validity of the transaction data. Therefore, by performing a comprehensive and strict verification of the interface request, on the one hand, the risk of illegal requests and malicious attacks reaching the interface can be effectively reduced, and the security and reliability of the system can be improved; on the other hand, the transaction data can be checked in advance, thereby reducing the occurrence of transaction errors. In addition, the embodiment of the present application automatically checks interface requests through pre-configured rules, and can easily add new rules or modify existing rules without modifying the interface code. It is not only easy to expand, but also can reduce interface code redundancy and improve the flexibility of interface input parameter verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0045] Figure 1 It is a flowchart of an information processing method provided by an embodiment of the present application;
[0046] Figure 2 is a flowchart of an information processing method provided by another embodiment of the present application;
[0047] Figure 3 is a flowchart of an information processing method provided by yet another embodiment of the present application;
[0048] Figure 4 is a structural diagram of an information processing device provided by yet another embodiment of the present application;
[0049] Figure 5It is a structural diagram of an information processing device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0050] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0051] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0052] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0053] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0054] In the internal system of a bank, each interface is called a transaction entry. These interfaces are important channels for the bank system to interact with external systems. Interfaces involve multiple systems and business processes. Interface input parameter verification is often used to ensure the correctness and security of various business processes and transactions. For example, in resource replacement applications, resource transfers and other businesses, interface input parameter verification can be used to verify the accuracy and legitimacy of important information such as customer identity, account information, resource transfer amount, date, etc. Therefore, in order to ensure the security and reliability of the transaction entry, the interface input parameters need to be verified. If the input parameter verification is not strict, it may cause data errors, system failures and even security vulnerabilities.
[0055] The related technology involves an input parameter verification method that directly writes verification logic in the interface code. The technical principle of this method is to add input parameter verification logic to the interface method, and verify the input parameter fields one by one through conditional statements such as if-else. This method requires writing parameter verification logic in each interface method, which makes the code difficult to reuse and easily causes code redundancy, reduces the readability of the code, and increases the maintenance cost of the code. In addition, when the verification rules change, this method needs to modify the verification logic in each interface method, further increasing the maintenance cost.
[0056] Related technologies also involve methods for implementing parameter validation based on annotations. This method is based on the validation specification of reusable components (JavaBean) and the validator interface, and uses @Validated and @Valid annotations to mark the interface class that requires parameter validation and the parameter object of the interface method, respectively, and formulates validation rules in the parameter object members through annotations such as @Size and @NotNull. However, this method is highly invasive and requires adding specific annotations to methods or parameters, which will cause the code to be tightly coupled with the framework, making it difficult to reuse and maintain the code. In addition, the annotation method usually performs parameter validation through annotations provided by the framework, which means that developers can only use the validation rules provided by the framework, lack the flexibility of customizing rules, and the annotations themselves cannot fully express the details of the validation rules. It is difficult to customize error messages when business needs cannot be met. Therefore, this method is only suitable for simple data validation, and is not suitable for complex validation logic or validation rules that require dynamic calculation.
[0057] Related technologies also involve methods for implementing parameter verification based on interceptors. The technical principle of this method is: using the interceptor in the Spring framework, the interface input parameters are verified before entering the controller. Customized interceptors or Interceptors provided by Spring can be used. The matching relationship between the interceptor and the corresponding interface layer can be specified in the configuration file and the interface input parameter verification can be implemented in the interceptor code. Although this method can achieve unified processing of parameter verification through interceptors, it is still necessary to manually write interceptors and configuration files, which increases the amount of code and still has the risk of omissions. In addition, parameter verification in the interceptor requires writing certain logic codes, which easily leads to overly complex interceptor logic and poor readability. The error messages of the interceptor method for verifying parameters are usually more uniform, which is difficult to meet the personalized error message customization requirements of different interfaces. In addition, the interceptor is applicable to the global verification of the specified interface class. When the demand changes, the logic of the interceptor may need to be modified, resulting in difficulties in maintenance and expansion.
[0058] In order to solve the problems of the prior art, the embodiments of the present application provide an information processing method, apparatus, device and computer storage medium.
[0059] The following first introduces the information processing method provided by the embodiment of the present application in conjunction with the accompanying drawings. The information processing method provided by the embodiment of the present application, the device executing the method may be an information processing device, or a partial module in the information processing device for executing the information processing method. In the embodiment of the present application, the information processing method provided by the embodiment of the present application is described in detail by taking the information processing device executing the information processing method as an example.
[0060] Figure 1 FIG. 1 is a flow chart showing an information processing method provided by an embodiment of the present application. Figure 1 As shown, the method may include the following steps S110 to S140.
[0061] S110, when a target request is detected, intercepting the target request, wherein the target request includes an interface request sent to a target interface.
[0062] In step S110, the target interface may include any interface of the system. For example, the target interface may include an interface for the internal system to interact with the outside.
[0063] S120, obtaining multiple interface fields corresponding to the target request.
[0064] In step S120, obtaining multiple interface fields corresponding to the target request can be implemented by methods known in the art, and the present application embodiment does not limit this. Exemplarily, each field of the interface request can be obtained based on the reflection mechanism of the object-oriented programming language (Java) to obtain the above multiple interface fields.
[0065] S130: Perform single-field check on the multiple interface fields according to the target single-field check rules corresponding to the multiple interface fields.
[0066] In step S130, the single field check may include checking the legality of a single interface field to verify whether the input field meets the expected constraint conditions.
[0067] S140, when the single field check passes, the association and logical relationship between the multiple interface fields are checked using the target multi-field check rule to obtain a target check result.
[0068] In step S140, checking the association and logical relationship between the multiple interface fields may include checking whether the association and logical relationship between the multiple interface fields conform to expected rules to verify the integrity and validity of the transaction data.
[0069] The information processing method of the embodiment of the present application can intercept the target request when the target request is detected. Wherein, the target request includes an interface request sent to the target interface. Then, multiple interface fields corresponding to the target request are obtained. According to the target single field verification rules corresponding to each of the multiple interface fields, a single field verification is performed on the multiple interface fields. In this way, the multiple interface fields contained in the interface request can be respectively verified for legitimacy according to the pre-configured single field verification rules. Then, in the case where the single field verification passes, the association and logical relationship between the multiple interface fields are verified by the target multi-field verification rules to obtain the target verification result. In this way, it is possible to verify whether the multiple interface fields contained in the interface request meet the expected business rules to verify the integrity and validity of the transaction data. Therefore, by performing a comprehensive and strict verification of the interface request, on the one hand, the risk of illegal requests and malicious attacks reaching the interface can be effectively reduced, and the security and reliability of the system can be improved; on the other hand, the transaction data can be verified in advance, thereby reducing the occurrence of transaction errors. In addition, the embodiment of the present application automatically checks interface requests through pre-configured rules, and can easily add new rules or modify existing rules without modifying the interface code. It is not only easy to expand, but also can reduce interface code redundancy and improve the flexibility of interface input parameter verification.
[0070] In addition, the embodiments of the present application can also reduce manual intervention and repeated manpower costs through an automated verification mechanism, which is beneficial to reducing the cost of interface input parameter verification.
[0071] In one embodiment, when a target request is detected, intercepting the target request may specifically include:
[0072] When a target request is detected, the target request is intercepted using aspect-oriented programming technology.
[0073] Aspect Oriented Programming (AOP) is a technology that achieves unified maintenance of program functions through pre-compilation and dynamic proxy during runtime. It is an important part of the Spring framework. AOP can be used to isolate various parts of business logic, thereby reducing the coupling between the various parts of business logic and improving the reusability of the program.
[0074] In the above implementation, input parameter verification is implemented by AOP using aspect injection. By setting the entry point, the injected interface can be flexibly set, and there is no need to write repeated verification logic in each interface, which reduces code redundancy and helps to improve the readability and maintainability of the code. In addition, injecting the verification logic into the interface through Spring's aspect can make the interface function more focused on the business logic itself, which helps to improve development efficiency. In addition, according to the above implementation, when it is necessary to modify or add new verification logic, it is only necessary to make corresponding modifications in the configuration file without modifying the code of each interface. In this way, the difficulty of maintenance can be further reduced and maintainability can be improved.
[0075] In one embodiment, before performing single field check on the multiple interface fields according to the target single field check rules corresponding to the multiple interface fields, the method may further include performing the following steps for each of the multiple interface fields to obtain the target single field check rules corresponding to the multiple interface fields:
[0076] The interface field is matched with multiple preset fields in the preset data dictionary to obtain a target preset field corresponding to the interface field.
[0077] The single-field checking rule corresponding to the target preset field is determined as the target single-field checking rule corresponding to the interface field.
[0078] The embodiment of the present application does not specifically limit the matching method. For example, matching can be performed by field name. For example, matching can also be performed by field content or classification information.
[0079] According to the above implementation, by matching the interface field with the field in the preset data dictionary, the target single-field verification rule corresponding to the interface field can be determined according to the matching result. In this way, for different interface fields, the single-field verification rule configured for them can be quickly determined, thereby improving the efficiency and accuracy of input parameter verification.
[0080] In one embodiment, when the single field check passes, the association and logical relationship between multiple interface fields are checked by the target multi-field check rule. Before obtaining the target check result, the method may further include:
[0081] Determine the target business rules corresponding to the target interface.
[0082] The multi-field verification rule corresponding to the target business rule is determined as the target multi-field verification rule.
[0083] For a system, different interfaces are used to implement different functions, so as to match different businesses. Accordingly, different interfaces can correspond to different business rules.
[0084] According to the above implementation, the corresponding target multi-field check rule can be determined according to the target business rule corresponding to the target interface, so as to associate and logically check the multiple interface fields included in the interface request. In this way, it is possible to verify whether the fields input by the interface meet the expected business rules of the interface, and in the case where the transaction data corresponding to the interface field is incomplete or invalid, the interface request can be filtered in time. In this way, the occurrence of transaction errors can be reduced and potential transaction risks can be reduced.
[0085] In one embodiment, before performing single-field checking on the multiple interface fields according to the target single-field checking rules corresponding to the multiple interface fields, the method may further include:
[0086] A plurality of preset fields corresponding to a plurality of preset interfaces are obtained, where the plurality of preset interfaces include a target interface.
[0087] Store multiple preset fields into a preset data dictionary.
[0088] Classify multiple preset fields to obtain classification results.
[0089] According to the classification results, corresponding single-field checking rules are configured for each preset field.
[0090] In the above implementation, the plurality of preset interfaces may be interfaces that require input parameter verification. For example, all interfaces for the system to interact with the outside may be included. Classifying the plurality of preset fields may include classifying the plurality of preset fields according to the information in the interface documents corresponding to the plurality of preset interfaces. In some examples, the fields may also be defined, and the definition results and the classification results may be stored in a data dictionary.
[0091] According to the above implementation, by establishing a data dictionary, the transaction fields can be stored and managed more comprehensively. By configuring the corresponding single-field verification rules for the fields in the data dictionary, the input interface fields can be fully and strictly verified. In this way, the risk of user misoperation or intentionally input erroneous data reaching the transaction interface can be reduced, and the accuracy of transaction data can be improved.
[0092] In one embodiment, the single-field check rule may include at least one of a numerical value check, a value list check, a digit check, a letter check, and an email check.
[0093] According to the above implementation, suitable single-field checking rules can be configured for different types of interface fields, so as to verify whether the input field meets the expected constraint conditions, thereby accurately checking the legitimacy of a single field.
[0094] In one embodiment, when the single field check passes, the association and logical relationship between multiple interface fields are checked by the target multi-field check rule. Before obtaining the target check result, the method may further include:
[0095] Get multiple business rules corresponding to multiple preset interfaces.
[0096] For each of the multiple business rules, perform the following steps:
[0097] Multiple associated preset fields corresponding to the business rules are determined from a preset data dictionary.
[0098] According to business rules, determine the association and logical relationship between multiple associated preset fields.
[0099] According to the association and logical relationship between multiple associated preset fields, configure the multi-field verification rules corresponding to the business rules.
[0100] The above-mentioned multi-field verification rule may be composed of a series of judgment and conditional statements, which are used to verify the association relationship and logical consistency between multiple associated preset fields.
[0101] According to the above implementation, for system interfaces that require input parameter verification, corresponding multi-field verification rules can be set for all business rules involved in the interface. In this way, when the input parameter verification is performed later, the corresponding multi-field verification rules can be flexibly selected according to the different interfaces. Only when the data carried by the interface request meets the expected business rules can it pass the verification and reach the corresponding interface, otherwise it will be filtered. In this way, the security of the data, the integrity and validity of the transaction data can be verified, thereby effectively reducing malicious attacks and illegal operations, helping to identify and intercept potential security risks, and protecting the security of the system and user data.
[0102] In one embodiment, the method may further include:
[0103] If the single field check fails, or the target check result used to represent the association and logical relationship check fails, the target request is rejected.
[0104] According to the above implementation, when there is a single field that does not meet the expected constraint conditions among the multiple interface fields corresponding to the interface request, or when the association and logical relationship of the multiple interface fields do not meet the expected business rules, the corresponding interface request can be filtered. In this way, the risk of malicious attacks, illegal operations or erroneous transaction data reaching the interface can be effectively reduced, thereby protecting the security of the system and user data.
[0105] In one embodiment, the method may further include:
[0106] When the target check result is used to represent that the association and logical relationship check have passed, the target request is released so that the target request reaches the target interface.
[0107] According to the above implementation, the interface request can be released only when the multiple interface fields corresponding to the interface request all meet the expected constraints and the association and logical relationship of the multiple interface fields meet the expected business rules. In this way, the risk of malicious attacks, illegal operations or erroneous transaction data reaching the interface can be effectively reduced, thereby protecting the security of the system and user data.
[0108] In order to better describe the entire solution, based on the above embodiments, a specific example is given to illustrate the information processing method of the embodiment of the present application. This is explained in detail below. It should be noted that the following examples are only for explaining the embodiment of the present application, and do not constitute a limitation on the embodiment of the present application.
[0109] Take the example of parameter verification for the transaction entry of the bank's internal system interacting with the external system. Before performing parameter verification, you can first perform the steps of establishing a transaction input field data dictionary, configuring single-field verification rules, and configuring multi-field verification rules.
[0110] Exemplarily, establishing a transaction input field data dictionary may include: acquiring all transaction input fields corresponding to all transaction entries, establishing a data dictionary, and defining and classifying the transaction input fields.
[0111] Exemplarily, a single field check rule can be used to describe how to check the polarity legitimacy of a field in a data dictionary. Specifically, the single field check rule configuration may include: configuring corresponding check rules according to the classification information of the field, such as numerical check (for example, checking by conditions such as greater than or less than), value list check, number check, letter check, email check, etc. These rules can ensure that the input field meets the expected constraints.
[0112] Exemplarily, the multi-field verification rule configuration may include establishing the association and verification logic between multiple fields corresponding to the business rules in the data dictionary according to specific business rules, and naming them according to the business rules. The multi-field verification rules may include a series of judgment and conditional statements for verifying the association relationship and logical consistency between multiple fields. Through the multi-field verification rules, it can be ensured that the data input by the interface complies with the expected business rules to ensure the integrity and validity of the transaction data.
[0113] In one example, after completing the above steps, the input parameter verification logic can be injected into each transaction entry by means of aspect code, without writing repeated verification logic in each transaction entry. It is understandable that the aspect code can be managed and run by the internal system.
[0114] In an example, the process of verifying the transaction entry parameters can be found in Figure 2 .like Figure 2 As shown, the information processing method may include the following steps S210 to S240.
[0115] S210, obtaining multiple interface fields corresponding to the interface request based on reflection.
[0116] In step S210, each interface can be intercepted by using the AOP of the Spring framework, and each field of the transaction input can be obtained based on the reflection mechanism of Java.
[0117] S220, performing single field check.
[0118] In step S220, each field may be matched with a field in the data dictionary, and a single field check may be performed according to a previously established single field check rule.
[0119] S230: When the single-field check passes, a multi-field check is performed.
[0120] In step S230, a multi-field check may be performed according to the business rules corresponding to the interface and the multi-field check rules established previously.
[0121] In one example, when a single field check fails, the interface request may be rejected, and an exception message may be generated and returned to the external system.
[0122] S240: If the multi-field check passes, the interface request is released.
[0123] In step S240, after the interface request is released, the interface request can reach the corresponding transaction entry so that the internal system can perform corresponding transaction operations according to the interface request.
[0124] In one example, when the multi-field check fails, the interface request may be rejected, and an exception message may be generated and returned to the external system.
[0125] In one example, the transaction entry parameter verification may be performed by an information processing device. The information processing device may be set in an internal system. For example, the interaction process between the external system, the information processing device and the transaction entry during the transaction entry parameter verification process may be referred to in Figure 3 .like Figure 3 As shown, the interaction process may include steps S310 to S350.
[0126] S310, the external system sends a transaction entry interface request to the internal system.
[0127] S320, the information processing device intercepts the interface request and obtains multiple interface fields corresponding to the interface request.
[0128] S330, the information processing device performs a single field check on each interface field according to a preset single field check rule.
[0129] S340, when the single field check passes, the information processing device checks the association and logical relationship between the multiple interface fields according to the preset multi-field check rules. In one example, when the single field check fails, the information processing device can reject the interface request and generate an exception message and return it to the external system.
[0130] S350, when the association and logical relationship between the multiple interface fields are checked and passed, the information processing device sends an interface request to the transaction entry.
[0131] In one example, when the association and logical relationship check between multiple interface fields fails, the information processing device can reject the interface request and generate an exception message and return it to the external system.
[0132] The information processing method according to the above example can have the following advantages when applied in the financial field.
[0133] Improve the accuracy of transaction data: By establishing a transaction input field data dictionary set and a legality check configuration, you can perform comprehensive and strict verification of input data. This can prevent users from making mistakes or intentionally entering wrong data, and improve the accuracy of transaction data.
[0134] Enhance system security: In the financial field, data security and transaction integrity are crucial. By establishing multi-data dictionary field verification logic based on business rules, malicious attacks and illegal operations can be effectively prevented. This verification mechanism can help identify and intercept potential security risks and protect the security of system and user data.
[0135] Improve development efficiency and maintainability: By injecting the validation logic into each interface through Spring aspects, the interface function can be more focused on the business logic itself and reduce the repetitive validation code writing. This can improve development efficiency, and when you need to modify or add new validation logic, you only need to make corresponding changes in the configuration file without modifying the code of each interface, which improves the maintainability of the system.
[0136] Reduced risk and cost: In the financial field, transaction errors may lead to higher risks and losses. By verifying the input data in advance, the occurrence of transaction errors can be reduced and potential risks can be reduced. In addition, through the automated verification mechanism, manual intervention and repeated labor costs can be reduced.
[0137] It can be seen that the embodiments of the present application have broad application prospects and value in the financial field. For example, the information processing method of the embodiments of the present application can be applied to various internal systems of banks, such as transaction processing systems, risk management systems, payment systems, etc. Through effective interface input parameter verification, the operating efficiency of financial institutions can be improved, risks can be reduced, and safer and more reliable services can be provided, further enhancing the stability and credibility of the financial system.
[0138] Based on the information processing method provided in the above embodiments, the present application also provides a specific implementation of the information processing device. Please refer to the following embodiments.
[0139] See first Figure 4 The information processing device 400 provided in the embodiment of the present application includes an interception module 401, an acquisition module 402 and a verification module 403.
[0140] The interception module 401 is used to intercept the target request when a target request is detected, wherein the target request includes an interface request sent to a target interface.
[0141] The acquisition module 402 is used to acquire multiple interface fields corresponding to the target request.
[0142] The checking module 403 is used to perform single-field checking on the multiple interface fields according to the target single-field checking rules corresponding to the multiple interface fields.
[0143] The checking module 403 is further used to check the association and logical relationship between multiple interface fields according to the target multi-field checking rule when the single field checking passes, so as to obtain the target checking result.
[0144] The information processing device of the embodiment of the present application can intercept the target request when the target request is detected. Among them, the target request includes an interface request sent to the target interface. Then, multiple interface fields corresponding to the target request are obtained. According to the target single field verification rules corresponding to each of the multiple interface fields, a single field verification is performed on the multiple interface fields. In this way, the multiple interface fields contained in the interface request can be respectively verified for legitimacy according to the pre-configured single field verification rules. Then, in the case where the single field verification passes, the association and logical relationship between the multiple interface fields are verified by the target multi-field verification rules to obtain the target verification result. In this way, it is possible to verify whether the multiple interface fields contained in the interface request meet the expected business rules to verify the integrity and validity of the transaction data. Therefore, by performing a comprehensive and strict verification of the interface request, on the one hand, the risk of illegal requests and malicious attacks reaching the interface can be effectively reduced, and the security and reliability of the system can be improved; on the other hand, the transaction data can be verified in advance, thereby reducing the occurrence of transaction errors. In addition, the embodiment of the present application automatically checks interface requests through pre-configured rules, and can easily add new rules or modify existing rules without modifying the interface code. It is not only easy to expand, but also can reduce interface code redundancy and improve the flexibility of interface input parameter verification.
[0145] In addition, the embodiments of the present application can also reduce manual intervention and repeated manpower costs through an automated verification mechanism, which is beneficial to reducing the cost of interface input parameter verification.
[0146] In one embodiment, the interception module may be specifically used to:
[0147] When a target request is detected, the target request is intercepted using aspect-oriented programming technology.
[0148] In one embodiment, the device may also include: a matching module and a determination module, which are used to perform the following steps for each of the multiple interface fields before performing single-field checks on the multiple interface fields according to the target single-field check rules corresponding to the multiple interface fields, so as to obtain the target single-field check rules corresponding to the multiple interface fields.
[0149] The matching module is used to match the interface field with multiple preset fields in the preset data dictionary to obtain the target preset field corresponding to the interface field.
[0150] The determination module is used to determine the single-field verification rule corresponding to the target preset field as the target single-field verification rule corresponding to the interface field.
[0151] In one embodiment, the apparatus may further include:
[0152] The determination module is used to check the association and logical relationship between multiple interface fields through the target multi-field verification rules when the single field verification passes, and determine the target business rules corresponding to the target interface before obtaining the target verification result.
[0153] The determination module is also used to determine the multi-field verification rule corresponding to the target business rule as the target multi-field verification rule.
[0154] In one embodiment, the acquisition module is further used to acquire multiple preset fields corresponding to multiple preset interfaces before performing single field check on multiple interface fields according to target single field check rules corresponding to the multiple interface fields respectively, and the multiple preset interfaces include the target interface.
[0155] The device may also include:
[0156] The storage module is used to store multiple preset fields in a preset data dictionary.
[0157] The classification module is used to classify multiple preset fields and obtain classification results.
[0158] The configuration module is used to configure corresponding single-field checking rules for each preset field according to the classification results.
[0159] In one embodiment, the single-field check rule may include at least one of a numerical value check, a value list check, a digit check, a letter check, and an email check.
[0160] In one embodiment, the acquisition module is also used to check the association and logical relationship between multiple interface fields through the target multi-field verification rules when the single field verification passes, and obtain multiple business rules corresponding to multiple preset interfaces before obtaining the target verification result.
[0161] The device may also include a determination module and a configuration module, which are used to respectively perform the following steps for each of the multiple business rules.
[0162] The determination module is used to determine multiple associated preset fields corresponding to the business rules from the preset data dictionary.
[0163] The determination module is also used to determine the association and logical relationship between multiple associated preset fields according to business rules.
[0164] The configuration module is used to configure the multi-field verification rules corresponding to the business rules according to the association and logical relationship between multiple associated preset fields.
[0165] In one embodiment, the apparatus may further include:
[0166] The rejection module is used to reject the target request when the single field check fails or the target check result used to represent the association and logical relationship check fails.
[0167] In one embodiment, the apparatus may further include:
[0168] The release module is used to release the target request when the target check result is used to characterize the association and the logical relationship check and pass, so that the target request reaches the target interface.
[0169] Each module of the information processing device provided in the embodiment of the present application can realize Figure 1 The functions of each step of the information processing method are provided, and the corresponding technical effects can be achieved. For the sake of concise description, they will not be repeated here.
[0170] Figure 5 A schematic diagram of the hardware structure of an information processing device provided in an embodiment of the present application is shown.
[0171] The information processing device may include a processor 501 and a memory 502 storing computer program instructions.
[0172] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0173] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 502 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0174] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0175] The processor 501 implements any one of the information processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 502 .
[0176] In one example, the information processing device may further include a communication interface 503 and a bus 510. Figure 5 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0177] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0178] Bus 510 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 510 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0179] The information processing device can execute the information processing method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 4 The information processing method and device described herein. The information processing method in the above embodiments can be implemented by providing a computer storage medium in the present application embodiment. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the information processing methods in the above embodiments is implemented.
[0180] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the information processing methods in the above embodiments when the computer program is processed and executed.
[0181] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0182] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0183] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0184] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box 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, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0185] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An information processing method, characterized in that: include: In case of detecting a target request, intercepting the target request, wherein the target request includes an interface request sent to a target interface; Obtain multiple interface fields corresponding to the target request; Performing single-field checking on the multiple interface fields according to target single-field checking rules corresponding to the multiple interface fields respectively; In the case that the single field check passes, the association and logical relationship between the multiple interface fields are checked using a target multi-field check rule to obtain a target check result.
2. The information processing method according to claim 1, characterized in that: When a target request is detected, intercepting the target request includes: When a target request is detected, the target request is intercepted using aspect-oriented programming technology.
3. The information processing method according to claim 1, characterized in that: Before performing single field checking on the multiple interface fields according to the target single field checking rules respectively corresponding to the multiple interface fields, the method further comprises, for each of the multiple interface fields, performing the following steps respectively to obtain the target single field checking rules respectively corresponding to the multiple interface fields: Matching the interface field with a plurality of preset fields in a preset data dictionary to obtain a target preset field corresponding to the interface field; The single-field checking rule corresponding to the target preset field is determined as the target single-field checking rule corresponding to the interface field.
4. The information processing method according to claim 1, characterized in that: In the case where the single field check passes, checking the association and logical relationship between the multiple interface fields by using the target multi-field check rule, before obtaining the target check result, the method further includes: Determine a target business rule corresponding to the target interface; The multi-field checking rule corresponding to the target business rule is determined as the target multi-field checking rule.
5. The information processing method according to claim 1, characterized in that: Before performing single-field checking on the multiple interface fields according to the target single-field checking rules corresponding to the multiple interface fields, the method further includes: Acquire a plurality of preset fields corresponding to a plurality of preset interfaces, wherein the plurality of preset interfaces include the target interface; Storing the plurality of preset fields in a preset data dictionary; Classifying the multiple preset fields to obtain classification results; According to the classification result, a corresponding single-field checking rule is configured for each of the preset fields.
6. The information processing method according to claim 5, characterized in that: The single-field checking rule includes at least one of a numerical value check, a value list check, a digit check, a letter check, and an email check.
7. The information processing method according to claim 5, characterized in that: In the case where the single field check passes, checking the association and logical relationship between the multiple interface fields by using the target multi-field check rule, before obtaining the target check result, the method further includes: Acquire multiple business rules corresponding to the multiple preset interfaces; For each of the multiple business rules, perform the following steps respectively: Determine a plurality of associated preset fields corresponding to the business rule from the preset data dictionary; Determining the association and logical relationship between the plurality of associated preset fields according to the business rules; According to the association and logical relationship between the multiple associated preset fields, a multi-field checking rule corresponding to the business rule is configured.
8. The information processing method according to any one of claims 1 to 7, characterized in that: The method further comprises: In the case where the single field check fails, or the target check result used to characterize the association and logical relationship check fails, the target request is rejected.
9. The information processing method according to any one of claims 1 to 7, characterized in that: The method further comprises: When the target check result is used to characterize that the association and logical relationship check have passed, the target request is released so that the target request reaches the target interface.
10. An information processing device, characterized in that: include: An interception module, configured to intercept a target request when a target request is detected, wherein the target request includes an interface request sent to a target interface; An acquisition module, used for acquiring a plurality of interface fields corresponding to the target request; A checking module, configured to perform single-field checking on the multiple interface fields according to target single-field checking rules corresponding to the multiple interface fields respectively; The checking module is further configured to check the association and logical relationship between the multiple interface fields according to a target multi-field checking rule when the single-field checking passes, so as to obtain a target checking result.
11. An information processing device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the information processing method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the information processing method according to any one of claims 1 to 9 is implemented.
13. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the information processing method as described in any one of claims 1 to 9.