WO2020259147A1 - Field information checking method and apparatus - Google Patents

Field information checking method and apparatus Download PDF

Info

Publication number
WO2020259147A1
WO2020259147A1 PCT/CN2020/091658 CN2020091658W WO2020259147A1 WO 2020259147 A1 WO2020259147 A1 WO 2020259147A1 CN 2020091658 W CN2020091658 W CN 2020091658W WO 2020259147 A1 WO2020259147 A1 WO 2020259147A1
Authority
WO
WIPO (PCT)
Prior art keywords
field
preset
rule
combination
configuration
Prior art date
Application number
PCT/CN2020/091658
Other languages
French (fr)
Chinese (zh)
Inventor
曲鸣
江旻
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020259147A1 publication Critical patent/WO2020259147A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the invention relates to the field of financial technology (Fintech) and the field of information inspection, and in particular to a method and device for field information inspection.
  • the services of each access party are different, so the field information transmitted by each access party on the same external service interface may also be more or less different.
  • platform 1 uses an interface
  • platform 1 needs to transmit three business fields A, B, and C to the interface
  • platform 2 needs to transmit three business fields A, C, and D to the interface.
  • Field the service fields of all access parties are checked according to the same general field check rule.
  • different access parties may have different requirements for the service field.
  • the value range of business field A in platform 1 is required to be 0-100
  • the value range in platform 2 is required to be 50-200.
  • the present application provides a field information verification method and device to solve the problem that the general field verification rules in the prior art have poor adaptability to field information verification of different access parties.
  • this application provides a field information verification method, including:
  • the field information includes configuration field information and service field information, the configuration field information includes at least one configuration field; using the at least one configuration field as the current configuration field combination, and obtaining the current configuration field according to a preset operation
  • the preset field check rule corresponding to the configuration field combination wherein the preset operation is: match the current configuration field combination with a preset check rule table; the preset check rule table includes at least one field check Rule; if the field verification rule can be matched, the field verification rule is output as the preset field verification rule; if the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, Then remove one configuration field from the current configuration field combination, and re-use the configuration field combination after removing the one configuration field as the current configuration field combination, and return the combination of the configuration field and The step of matching a preset check rule table; check the business field information according to the preset field check rule.
  • the configuration field information is first matched with the preset inspection rule table. Since the current configuration field combination is the configuration field information, the current configuration field combination can include the most configuration fields, so it matches the preset inspection rule table The obtained field inspection rules can best adapt to the field information inspection. When the match fails, the configuration field combination after removing a configuration field is re-used as the current configuration field combination and matched with the preset inspection rule table to be able to find Adapt to the preset field inspection rules of field information as much as possible to improve the adaptability of field information inspection.
  • the matching the current configuration field combination with a preset inspection rule table includes: mapping the current interface field combination into a string according to the preset mapping rule; Determine the sub-check rule table corresponding to the type of the character string in the preset check rule table; determine whether the character string has a corresponding field check rule in the sub-check rule table.
  • the current interface field combination is mapped to a string according to the preset mapping rule, and in the sub-check rule table corresponding to the type of the string, it is determined whether there is a corresponding field check rule, so that the type of the string can be
  • the corresponding sub-inspection rule table can be flexibly set to classify the field inspection rules.
  • each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute
  • the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment.
  • the effective period attribute indicates that the field verification rule can be matched at the current moment;
  • the matching the current configuration field combination with the preset verification rule table also includes: combining the current configuration field combination with the first The aging inspection rule table is matched; the first aging inspection rule table is a combination of field inspection rules in the preset inspection rule table after the field inspection rules that mark the attribute of the expiration period are removed; and/or, the current The configuration field combination of is matched with the second aging inspection rule table; the second aging inspection rule table is a combination of field inspection rules marked with valid period attributes in the preset inspection rule table.
  • the current configuration field can be combined with the first aging test rule table and/or the second time period attribute.
  • the aging inspection rule table is matched, which can increase the consideration of effective or invalid dimensions, and further increase the diversity and flexibility of the matched field inspection rules.
  • the verifying the business field information according to the preset field verification rule includes: if the preset field verification rule marks the first business field as the business information If the service information does not include the first service field, or the value of the first service field is empty, it is determined that the service information is illegal; for the second service field, The second service field is any service field that exists in both the service field information and the preset field check rule, if any one of the at least one check of the second service field is invalid , It is determined that the business information is illegal; the at least one check includes: whether the format of the value of the second business field conforms to the preset format of the second business field, if not, it is illegal ; Whether the length of the value of the second service field meets the preset length of the second service field, if not, it is illegal; if the preset field check rule marks the second service field as Optional field, it is determined whether the value of the second service field is within the preset value range of the optional field, if not, it is illegal.
  • the above method can judge whether the business information is illegal according to the first business field, and can judge whether the business information is illegal according to the second business field, and can also judge whether the business information is illegal when the second business field is an optional field.
  • the default general field check rule in the preset check rule table is used as the preset field check rule.
  • the above method provides the field check rule when there is only one configuration field in the current configuration field combination, that is, the default general field check rule, so that the field information can match the preset field check rule with a greater probability.
  • this application provides a field information verification device, including:
  • An obtaining module for obtaining field information includes configuration field information and service field information, and the configuration field information includes at least one configuration field;
  • the processing module is configured to use the at least one configuration field as the current configuration field combination, and obtain the preset field inspection rule corresponding to the current configuration field combination according to a preset operation; the preset operation is: The configuration field combination of is matched with a preset check rule table; the preset check rule table includes at least one field check rule; if the field check rule can be matched, the field check rule is output as the preset field check rule ; If the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, one configuration field is removed from the current configuration field combination, and after removing the one configuration field The combination of configuration fields is re-used as the current configuration field combination, and the step of matching the configuration field combination with the preset inspection rule table is returned; and the business field information is checked according to the preset field inspection rule. Perform inspection.
  • the processing module is specifically configured to: map the current interface field combination to a character string according to a preset mapping rule; determine the character string from the preset check rule table The sub-check rule table corresponding to the type; determine whether the character string has a corresponding field check rule in the sub-check rule table.
  • each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute
  • the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment.
  • the effective period attribute indicates that the field inspection rule can be matched at the current moment;
  • the processing module is further used to: match the current configuration field combination with the first aging inspection rule table;
  • the first aging inspection rule table is the The combination of field inspection rules in the preset inspection rule table after removing the field inspection rules that mark the attributes of the expiration period; and/or, matching the current configuration field combination with the second aging inspection rule table;
  • the second The time-effectiveness inspection rule table is a combination of field inspection rules marked with the effective period attribute in the preset inspection rule table.
  • the processing module is specifically configured to: if the first service field is marked as a required field in the service information in the preset field check rule, and the service information does not include all The first business field, or the value of the first business field is empty, it is determined that the business information is illegal; for the second business field, the second business field is in the business field information and For any business field that exists in the preset field verification rules, if any one of the at least one verification of the second business field is not legal, it is determined that the business information is illegal; A test includes: whether the format of the value of the second service field conforms to the preset format of the second service field, if not, it is illegal; whether the length of the value of the second service field conforms If the preset length of the second business field does not match, it is illegal; if the second business field is marked as an optional field in the preset field inspection rule, the second business field is determined Whether the value is within the preset value range of the optional field, if not, it is illegal.
  • the processing module is further configured to: if there is one and only one configuration field in the current configuration field combination, use the default common field check rule in the preset check rule table as The preset field inspection rule.
  • the present application provides a computer device including a program or instruction, and when the program or instruction is executed, it is used to execute the above-mentioned method of the first aspect and each implementation manner of the first aspect.
  • the present application provides a storage medium including a program or instruction, and when the program or instruction is executed, it is used to execute the method of the first aspect and the implementation manners of the first aspect.
  • FIG. 1 is a schematic diagram of the process flow of a method for verifying field information provided by an embodiment of this application;
  • FIG. 2 is a schematic flowchart of specific steps of a method for verifying field information provided by an embodiment of the application
  • FIG. 3 is a schematic structural diagram of a field information checking device provided by an embodiment of this application.
  • Figure 4 is a schematic structural diagram of a computer device provided by an embodiment of the application.
  • the configuration field information in the embodiment of the present application is used to determine a preset field check rule that the field information matches, and the configuration field information may include at least one configuration field.
  • the configuration field information may include one or more of the following:
  • MERCHANT_ID refers to the ID number of the partner's platform to access the bank
  • PS_CODE refers to the product type
  • TXN_ID refers to the transaction code
  • TXN_TYPE refers to the transaction type.
  • the business field information in the embodiment of the present application refers to the combination of the fields to be checked in the field information, and the field checking rules for the business fields in the business field information depend on the configuration field information.
  • the service field information can include one or more of the following:
  • APP_NO refers to the application number
  • NAME refers to the name
  • ID_TYPE refers to the type of certificate submission.
  • the embodiment of the present application provides a field information verification method to solve the technical problem that the general field verification rule in the prior art has poor adaptability to field information verification of different access parties.
  • Fig. 1 is a schematic flow chart of the steps of a method for verifying field information provided by an embodiment of the application.
  • the applicable field information in the method shown in FIG. 1 may be an interface field when inputting an application system interface, or may also be field information in other scenarios, and the scenario is not limited here.
  • the method shown in FIG. 1 can be used, for example, to perform differentiated configuration and management of a system interface, and can realize differentiated processing of the field information requirements sent by different access parties through quick configuration.
  • the method includes:
  • Step 101 Obtain field information, where the field information includes configuration field information and service field information, and the configuration field information includes field information of at least one configuration field.
  • Step 102 Use the at least one configuration field as a current configuration field combination, and obtain a preset field check rule corresponding to the current configuration field combination according to a preset operation.
  • Step 103 Check the service field information according to the preset field check rule.
  • Table 1 is a schematic table of a data structure of field information provided in an embodiment of the application:
  • the field item name of each row in rows 1 to 4 is a configuration field, and the field item names in rows 1 to 4 constitute the configuration field information.
  • the column item name of each row in the 5th to 13th rows is a business field, and the column item names in the 5th to 13th rows constitute the business field information.
  • R means required items
  • O means optional items.
  • the preset operation may specifically be:
  • the current configuration field combination is matched with at least one field inspection rule in the preset inspection rule table, and if the field inspection rule can be matched, the field inspection rule is output as the preset field inspection rule. If the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, one configuration field will be removed from the current configuration field combination, and the configuration field combination after removing one configuration field will be used as the current configuration field combination. And return to the step of matching the configuration field combination with the preset inspection rule table. Among them, removing a configuration field from the current configuration field combination can be specifically removed according to a preset priority order.
  • the preset operation may also include: if there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule.
  • the current configuration field combination is ABCD.
  • ABCD is matched with the preset inspection rule table. If the field inspection rule cannot be matched, and the preset priority indicates that D is removed, the current configuration field combination is updated to ABC. Then ABC is matched with the preset inspection rule table. If the field inspection rule is still not matched, and the preset priority indicates that C is removed, the current configuration field combination is updated to AB. Then match AB with the preset inspection rule table. If the field inspection rule is still not matched, and the preset priority indicates that B is removed, the current configuration field combination is updated to A.
  • the preset field inspection rule corresponding to the configuration field combination A can be determined through the following optional implementation manners:
  • the default general field check rule in the preset check rule table is used as the preset field check rule. That is, when the current configuration field combination is A, the preset field verification rule is the default general field verification rule.
  • mapping rules map the current interface field combination to a string, determine the sub-inspection rule table corresponding to the type of the string from the preset inspection rule table, and determine whether the string has a corresponding field in the sub-inspection rule table testing regulations.
  • Table 2 is a schematic table of a correspondence relationship between a character string and a sub-check rule table provided in an embodiment of the application.
  • the INTERFACE_KEY column represents the string
  • the INTERFACE_VALUE column represents the sub-inspection rule table when the type of the string is a string mapped by TXN_ID, TXN_TYPE, MERCHANT_ID, and PS_CODE.
  • AVAILABLE indicates whether the field inspection rule in each row of the sub-inspection rule table exists, and Y means it exists.
  • the KEY value can be flexibly combined in the key fields of TXN_ID, TXN_TYPE, MERCHANT_ID, PS_CODE. For example, under the same TXN_ID and TXN_TYPE, only different MERCHANT_IDs need to be distinguished by interface field differences. There is no difference between different PS_CODEs, so the KEY value only needs to include TXN_ID, TXN_TYPE, MERCHANT_ID. Similarly, if there is no difference between different MERCHANT_IDs under the same TXN_ID and TXN_TYPE, the KEY value only needs to include TXN_ID and TXN_TYPE. By analogy, if it is an interface field common to all partners and products, then only TXN_ID can be configured for the KEY value.
  • the most refined KEY value may be used for matching first to determine whether there is a corresponding interface verification rule configuration.
  • map TXN_ID, TXN_TYPE, MERCHANT_ID, and PS_CODE to different strings. If the KEY value does not match the rule, continue matching according to TXN_ID, TXN_TYPE, and MERCHANT_ID.
  • TXN_ID By analogy, if it fails to match, continue to use TXN_ID, TXN_TYPE or TXN_ID to match.
  • TXN_ID is used to match the field verification rules, it is actually equivalent to the caller without customizing the interface rules. , Using the default common interface verification rules.
  • the method for verifying the field information can be continuously optimized in the future.
  • the effective period attribute and the expiration period attribute can be added to the preset field verification rule configuration, so that it can be configured in advance for some predictable changes, and the effective period of the new configuration item can be set to the required period.
  • Using this method can solve the limitation that the current field inspection change can only be changed at a specified time (for example, when the user cooperates with the change at the same time), making it more flexible in actual use.
  • Each field inspection rule in the preset inspection rule table is used to mark the expiration period attribute and/or the effective period attribute.
  • the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment
  • the effective period attribute indicates that the field inspection rule can be matched at the current moment. .
  • matching the current configuration field combination with the preset inspection rule table may also include:
  • the current configuration field combination with the first aging inspection rule table which is a combination of field inspection rules in the preset inspection rule table after removing the field inspection rules that mark the expiration period attribute; and/or ,
  • the current configuration field combination is matched with the second aging inspection rule table.
  • the second aging inspection rule table is a combination of field inspection rules marked with the effective period attribute in the preset inspection rule table.
  • the legality of the business information of the system called by the transaction requester can also be verified in combination with the preset field verification rules.
  • the preset field verification rules can be stored in an Extensible Markup Language (xml) format, or can be stored in other data storage files, such as excel.
  • xml Extensible Markup Language
  • the configuration content is loaded into the memory by loading the module, and organized in a certain way, so that when the requester calls the interface, it matches the field information sent by the requester. The same effect can be achieved.
  • the preset field verification rule may include a verification rule for each business field in the business field.
  • each business field can have the following attributes:
  • fieldName indicates the name of the business field
  • fieldType indicates the type of business field (such as String, BigDecimal, Array, etc.);
  • fmtRegular indicates the length of the business field format
  • fieldLevel indicates the level (normally 1 level, if there is an array, the business fields in the array are 2 levels, and so on);
  • forceExist indicates whether the business field is a required field (true indicates that the field must appear in the interface request message and have a value);
  • dic Indicates that the service field is not required. If the service field needs to limit the value sent, configure dic. For example, the above example indicates that the value of this field can only be uploaded as normal (NORMAL) or computer command (SUSPEND), and other values are illegal.
  • a preset field verification rule is a collection of multiple such field verification rules.
  • an optional implementation manner of the foregoing step 103 is as follows:
  • the first business field For the first business field, if the first business field is marked as a required field in the business information in the preset field check rule, and the business information does not include the first business field, or the value of the first business field is empty, then Determine that the business information is illegal.
  • the second business field if the second business field is any business field that exists in both the business field information and the preset field verification rules, if any one of at least one verification of the second business field is verified If the verification is illegal, the business information is determined to be illegal.
  • At least one test includes one or more of the following:
  • the second business field is marked as an optional field in the preset field verification rule, it is determined whether the value of the second business field is within the preset value range of the optional field, if not, it is illegal.
  • the specific process of the foregoing implementation manner may include:
  • the configuration field information is first matched with the preset inspection rule table. Since the current configuration field combination is the configuration field information, the current configuration field combination can include the most configuration fields, so it matches the preset inspection rule table The obtained field inspection rules can best adapt to the field information inspection. When the match fails, the configuration field combination after removing a configuration field is re-used as the current configuration field combination and matched with the preset inspection rule table, so as to be able to do the best It is possible to find a preset field inspection rule that adapts to field information to improve the adaptability of field information inspection. In addition, the same field inspection rules can also be flexibly changed according to factors such as the user and business scenarios, so that the interface inspection rules can be quickly adapted and managed without requiring adjustments at the application layer.
  • FIG. 2 exemplarily shows a schematic flowchart of a combined field information verification method provided by an embodiment of the present application.
  • the first configuration field shown in FIG. 2 refers to TXN_ID
  • the second configuration field shown in FIG. 2 refers to TXN_TYPE
  • the third configuration field shown in FIG. 2 refers to MERCHANT_ID
  • the fourth configuration field shown in FIG. 2 Refers to PS_CODE.
  • an embodiment of the present application also provides a field information checking device, and the specific implementation of the device can refer to the foregoing method.
  • FIG. 3 is a schematic structural diagram of a field information checking device provided by an embodiment of the application. As shown in FIG. 3, the device includes:
  • the obtaining module 301 is configured to obtain field information; the field information includes configuration field information and service field information, and the configuration field information includes at least one configuration field;
  • the processing module 302 is configured to use the at least one configuration field as a current configuration field combination, and obtain a preset field inspection rule corresponding to the current configuration field combination according to a preset operation;
  • the preset operation is: matching the current configuration field combination with a preset inspection rule table; the preset inspection rule table includes at least one field inspection rule; if the field inspection rule can be matched, then The field check rule is output as the preset field check rule; if the field check rule cannot be matched, and the current configuration field combination includes at least two configuration fields, then one is removed from the current configuration field combination Configure fields, and re-use the configuration field combination after removing the one configuration field as the current configuration field combination, and return to the step of matching the configuration field combination with the preset inspection rule table;
  • the preset field inspection rules are described, and the business field information is inspected.
  • processing module 302 is specifically configured to:
  • mapping rule map the current interface field combination to a character string; determine the sub-check rule table corresponding to the type of the character string from the preset check rule table; determine that the character string is in the Whether there is a corresponding field inspection rule in the sub-inspection rule table.
  • each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute, and the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment.
  • the effective period attribute indicates that the field inspection rule can be matched at the current moment;
  • the processing module 302 is also used for:
  • the current configuration field combination is matched with the first aging inspection rule table; the first aging inspection rule table is the field inspection rule after the field inspection rule marking the invalidation period attribute is removed from the preset inspection rule table And/or, matching the current configuration field combination with a second aging inspection rule table; the second aging inspection rule table is a field inspection rule marked with an effective period attribute in the preset inspection rule table The combination.
  • processing module 302 is specifically configured to:
  • the service information does not include the first service field, or the value of the first service field If it is empty, it is determined that the business information is illegal;
  • the second business field is any business field that exists in both the business field information and the preset field verification rule, if at least one of the second business fields is verified If any item of verification is illegal, it is determined that the business information is illegal;
  • the at least one check includes: whether the format of the value of the second service field conforms to the preset format of the second service field, if not, it is illegal; the value of the second service field is Whether the length meets the preset length of the second service field, if not, it is illegal; if the second service field is marked as an optional field in the preset field check rule, the second service field is determined Whether the value of the field is within the preset value range of the optional field, if not, it is illegal.
  • processing module 302 is further configured to:
  • the default general field check rule in the preset check rule table is used as the preset field check rule.
  • the embodiment of the present invention provides a computer device. As shown in FIG. 4, it includes at least one processor 401 and a memory 402 connected to the at least one processor.
  • the embodiment of the present invention does not limit the processor.
  • the connection between the processor 401 and the memory 402 in FIG. 4 is taken as an example.
  • the bus can be divided into address bus, data bus, control bus, etc.
  • the memory 402 stores instructions that can be executed by at least one processor 401, and the at least one processor 401 can execute the steps included in the aforementioned field information verification method by executing the instructions stored in the memory 402.
  • the processor 401 is the control center of the terminal device, which can use various interfaces and lines to connect to various parts of the terminal device, and realize data by running or executing instructions stored in the memory 402 and calling data stored in the memory 402. deal with.
  • the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor.
  • the application processor mainly processes an operating system, a user interface, and an application program.
  • the adjustment processor mainly handles issuing instructions. It can be understood that the foregoing modem processor may not be integrated into the processor 401.
  • the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented on separate chips.
  • the processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic devices, discrete gates or transistors Logic devices and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention.
  • the general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiment of checking with field information can be directly embodied as executed and completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the memory 402 as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules.
  • the memory 402 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic memory, disk , CD, etc.
  • the memory 402 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory 402 in the embodiment of the present invention may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
  • the embodiment of the present application provides a storage medium including a program or instruction, and when the program or instruction is executed, it is used to execute a field information verification method and any optional method provided in the embodiment of the present application.
  • the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this 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, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

A field information checking method and apparatus, applied to the field of financial technologies (Fintech), and used for solving the problem in the prior art of poor adaptability of field information checking. Said method comprises: acquiring configuration field information and service field information; using at least one configuration field in the configuration field information as a current configuration field combination; acquiring a corresponding preset field checking rule according to a preset operation; and using the preset field checking rule to check the service field information. The preset field checking rule matching the configuration field information is the most adaptable for checking the service field information. When no matched preset field checking rule is found, the preset field checking rule is rematched in the configuration field combination from which a configuration field is removed. In this way, the preset field checking rule adaptable to the field information can be found with maximum possibility, thereby improving the adaptability of the field information checking.

Description

一种字段信息检验方法及装置Method and device for checking field information
相关申请的交叉引用Cross references to related applications
本申请要求在2019年06月28日提交中国专利局、申请号为201910580581.3、申请名称为“一种字段信息检验方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on June 28, 2019, the application number is 201910580581.3, and the application name is "a field information inspection method and device", the entire content of which is incorporated into this application by reference in.
技术领域Technical field
本发明涉及金融科技(Fintech)领域和信息检验领域,尤其涉及一种字段信息检验方法及装置。The invention relates to the field of financial technology (Fintech) and the field of information inspection, and in particular to a method and device for field information inspection.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(例如大数据技术、分布式技术、区块链(Blockchain)技术、人工智能技术等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。目前,金融科技领域中,一些金融系统需要通过对外服务接口传入字段来实现金融交易功能,由于金融交易对运行稳定性的要求较高,因此需要对传入金融系统的字段信息进行校验。With the development of computer technology, more and more technologies (such as big data technology, distributed technology, blockchain technology, artificial intelligence technology, etc.) are applied in the financial field. The traditional financial industry is gradually turning to financial technology ( Fintech) transformation. At present, in the field of financial technology, some financial systems need to pass in fields through external service interfaces to realize financial transaction functions. Because financial transactions require high operational stability, it is necessary to verify the field information passed into the financial system.
实际操作中,各接入方的业务有所不同,因此各接入方在同一个对外服务接口上传输的字段信息也可能会存在或多或少的差异。如平台1在使用某接口时,需要平台1向该接口传A、B、C三个业务字段,而平台2同样使用该接口时,需要平台2向该接口传A、C、D三个业务字段。现有技术中,针对于所有接入方的业务字段,都是按照同一个通用字段校验规则来进行检验。然而,针对于同一个业务字段,不同接入方对该业务字段的要求可能并不一样。举例来说,业务字段A,在平台1中的取值范围要求为0~100,而在平台2中的取值范围要求为50~200。这就需要在检验业务字段A时首先判断是来自平台1还是平台2,再根据对应平台的检验要求进行检验。而且,后续检验每个业务字段时都需要采用这种方式进行先判断再校验。显然,现有技术中的通用字段校验规则对不同接入方的字段信息检验的适应性较差。In actual operation, the services of each access party are different, so the field information transmitted by each access party on the same external service interface may also be more or less different. For example, when platform 1 uses an interface, platform 1 needs to transmit three business fields A, B, and C to the interface, and when platform 2 also uses this interface, platform 2 needs to transmit three business fields A, C, and D to the interface. Field. In the prior art, the service fields of all access parties are checked according to the same general field check rule. However, for the same service field, different access parties may have different requirements for the service field. For example, the value range of business field A in platform 1 is required to be 0-100, and the value range in platform 2 is required to be 50-200. It is necessary to first determine whether it is from platform 1 or platform 2 when inspecting business field A, and then perform inspection according to the inspection requirements of the corresponding platform. Moreover, it is necessary to use this method to judge before verifying each business field in subsequent inspections. Obviously, the general field verification rules in the prior art have poor adaptability to field information verification of different access parties.
发明内容Summary of the invention
本申请提供一种字段信息检验方法及装置,用以解决现有技术中的通用字段校验规则对不同接入方的字段信息检验的适应性较差的问题。The present application provides a field information verification method and device to solve the problem that the general field verification rules in the prior art have poor adaptability to field information verification of different access parties.
第一方面,本申请提供一种字段信息检验方法,包括:In the first aspect, this application provides a field information verification method, including:
获取字段信息;所述字段信息包括配置字段信息和业务字段信息,所述配置字段信息包括至少一个配置字段;将所述至少一个配置字段作为当前的配置字段组合,按照预设操作获取所述当前的配置字段组合对应的预设字段检验规则;其中,所述预设操作为:将所述当前的配置字段组合与预设检验规则表进行匹配;所述预设检验规则表包括至少一个字段检验规则;若能匹配到字段检验规则,则将该字段检验规则作为所述预设字段检验规则输出;若不能匹配到字段检验规则,且所述当前的配置字段组合中包括至少两个配置字段,则从所述当前的配置字段组合中去除一个配置字段,并将去除了所述一个配置字段后的配置字段组合重新作为所述当前的配置字段组合,并返回所述将所述配置字段组合与预设检验规则表进行匹配的步骤;按照所述预设字段检验规则,对所述业务字段信息进行检验。Obtain field information; the field information includes configuration field information and service field information, the configuration field information includes at least one configuration field; using the at least one configuration field as the current configuration field combination, and obtaining the current configuration field according to a preset operation The preset field check rule corresponding to the configuration field combination; wherein the preset operation is: match the current configuration field combination with a preset check rule table; the preset check rule table includes at least one field check Rule; if the field verification rule can be matched, the field verification rule is output as the preset field verification rule; if the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, Then remove one configuration field from the current configuration field combination, and re-use the configuration field combination after removing the one configuration field as the current configuration field combination, and return the combination of the configuration field and The step of matching a preset check rule table; check the business field information according to the preset field check rule.
上述方法中,首先将配置字段信息与预设检验规则表进行匹配,由于当前的配置字段组合为配置字段信息时,当前的配置字段组合能够包括最多的配置字段,因此与预设检验规则表匹配到的字段检验规则能够最适应字段信息的检验,当匹配不到时再将去除了一个配置字段后的配置字段组合重新作为当前的配置字段组合,与预设检验规则表进行匹配,从而能够找到尽可能适应字段信息的预设字段检验规则,提升字段信息检验的适应性。In the above method, the configuration field information is first matched with the preset inspection rule table. Since the current configuration field combination is the configuration field information, the current configuration field combination can include the most configuration fields, so it matches the preset inspection rule table The obtained field inspection rules can best adapt to the field information inspection. When the match fails, the configuration field combination after removing a configuration field is re-used as the current configuration field combination and matched with the preset inspection rule table to be able to find Adapt to the preset field inspection rules of field information as much as possible to improve the adaptability of field information inspection.
一种可选实施方式中,所述将所述当前的配置字段组合与预设检验规则表进行匹配,包括:按照预设映射规则,将所述当前的接口字段组合映射为字符串;从所述预设检验规则表中确定所述字符串的类型对应的子检验规则表;确定所述字符串在所述子检验规则表中是否有对应的字段检验规则。In an optional implementation manner, the matching the current configuration field combination with a preset inspection rule table includes: mapping the current interface field combination into a string according to the preset mapping rule; Determine the sub-check rule table corresponding to the type of the character string in the preset check rule table; determine whether the character string has a corresponding field check rule in the sub-check rule table.
上述方法中,按照预设映射规则,将当前的接口字段组合映射为字符串,在字符串的类型对应的子检验规则表中,确定是否有对应的字段检验规则,从而可根据字符串的类型灵活设置对应的子检验规则表,以对字段检验规则进行归类。In the above method, the current interface field combination is mapped to a string according to the preset mapping rule, and in the sub-check rule table corresponding to the type of the string, it is determined whether there is a corresponding field check rule, so that the type of the string can be The corresponding sub-inspection rule table can be flexibly set to classify the field inspection rules.
一种可选实施方式中,所述预设检验规则表中每条字段检验规则标记了失效时段属性和/或生效时段属性,所述失效时段属性指示字段检验规则在当前时刻不可匹配,所述生效时段属性指示字段检验规则在当前时刻可匹配;具体实施中,所述将所述当前的配置字段组合与预设检验规则表进行匹配,还包括:将所述当前的配置字段组合与第一时效检验规则表进行匹配;所述第一时效检验规则表为所述预设检验规则表中去除了标记失效时段属性的字段检验规则后的字段检验规则的组合;和/或,将所述当前的配置字段组合与第二时效检验规则表进行匹配;所述第二时效检验规则表为所述预设检验规 则表中标记生效时段属性的字段检验规则的组合。In an optional implementation manner, each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute, and the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment. The effective period attribute indicates that the field verification rule can be matched at the current moment; in specific implementation, the matching the current configuration field combination with the preset verification rule table also includes: combining the current configuration field combination with the first The aging inspection rule table is matched; the first aging inspection rule table is a combination of field inspection rules in the preset inspection rule table after the field inspection rules that mark the attribute of the expiration period are removed; and/or, the current The configuration field combination of is matched with the second aging inspection rule table; the second aging inspection rule table is a combination of field inspection rules marked with valid period attributes in the preset inspection rule table.
上述方法中,通过对所述预设检验规则表中每条字段检验规则标记失效时段属性和/或生效时段属性,可选择将当前的配置字段组合与第一时效检验规则表和/或第二时效检验规则表进行匹配,从而可以增加对生效或失效维度的考虑,进一步增加匹配到的字段检验规则的多样性和灵活性。In the above method, by marking the invalidation period attribute and/or the effective period attribute of each field test rule in the preset test rule table, the current configuration field can be combined with the first aging test rule table and/or the second time period attribute. The aging inspection rule table is matched, which can increase the consideration of effective or invalid dimensions, and further increase the diversity and flexibility of the matched field inspection rules.
一种可选实施方式中,所述按照所述预设字段检验规则,对所述业务字段信息进行检验,包括:若所述预设字段检验规则中标记了第一业务字段为所述业务信息中的必填字段,且所述业务信息未包括所述第一业务字段,或者所述第一业务字段的取值为空,则确定所述业务信息为不合法;对于第二业务字段,所述第二业务字段为在所述业务字段信息和所述预设字段检验规则中均存在的任一业务字段,若所述第二业务字段的至少一项校验中任一项校验不合法,则确定所述业务信息为不合法;所述至少一项检验包括:所述第二业务字段的取值的格式是否符合所述第二业务字段的预设格式,若不符合,则不合法;所述第二业务字段的取值的长度是否符合所述第二业务字段的预设长度,若不符合,则不合法;若所述预设字段检验规则中标记所述第二业务字段为选填字段,则确定所述第二业务字段的取值是否在所述选填字段的预设取值范围内,若不在,则不合法。In an optional implementation manner, the verifying the business field information according to the preset field verification rule includes: if the preset field verification rule marks the first business field as the business information If the service information does not include the first service field, or the value of the first service field is empty, it is determined that the service information is illegal; for the second service field, The second service field is any service field that exists in both the service field information and the preset field check rule, if any one of the at least one check of the second service field is invalid , It is determined that the business information is illegal; the at least one check includes: whether the format of the value of the second business field conforms to the preset format of the second business field, if not, it is illegal ; Whether the length of the value of the second service field meets the preset length of the second service field, if not, it is illegal; if the preset field check rule marks the second service field as Optional field, it is determined whether the value of the second service field is within the preset value range of the optional field, if not, it is illegal.
上述方式能够根据第一业务字段判断业务信息是否不合法,以及能够根据第二业务字段判断业务信息是否不合法,还能够在第二业务字段为选填字段的情况下判断业务信息是否不合法。The above method can judge whether the business information is illegal according to the first business field, and can judge whether the business information is illegal according to the second business field, and can also judge whether the business information is illegal when the second business field is an optional field.
一种可选实施方式中,若所述当前的配置字段组合中有且仅有一个配置字段,则将所述预设检验规则表中的默认通用字段检验规则作为所述预设字段检验规则。In an optional implementation manner, if there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule.
上述方式提供了当前的配置字段组合中有且仅有一个配置字段时的字段检验规则,即为默认通用字段检验规则,从而使得字段信息能够以较大概率匹配到预设字段检验规则。The above method provides the field check rule when there is only one configuration field in the current configuration field combination, that is, the default general field check rule, so that the field information can match the preset field check rule with a greater probability.
第二方面,本申请提供一种字段信息检验装置,包括:In the second aspect, this application provides a field information verification device, including:
获取模块,用于获取字段信息;所述字段信息包括配置字段信息和业务字段信息,所述配置字段信息包括至少一个配置字段;An obtaining module for obtaining field information; the field information includes configuration field information and service field information, and the configuration field information includes at least one configuration field;
处理模块,用于将所述至少一个配置字段作为当前的配置字段组合,按照预设操作获取所述当前的配置字段组合对应的预设字段检验规则;所述预设操作为:将所述当前的配置字段组合与预设检验规则表进行匹配;所述预设检验规则表包括至少一个字段检验规则;若能匹配到字段检验规则,则将 该字段检验规则作为所述预设字段检验规则输出;若不能匹配到字段检验规则,且所述当前的配置字段组合中包括至少两个配置字段,则从所述当前的配置字段组合中去除一个配置字段,并将去除了所述一个配置字段后的配置字段组合重新作为所述当前的配置字段组合,并返回所述将所述配置字段组合与预设检验规则表进行匹配的步骤;按照所述预设字段检验规则,对所述业务字段信息进行检验。The processing module is configured to use the at least one configuration field as the current configuration field combination, and obtain the preset field inspection rule corresponding to the current configuration field combination according to a preset operation; the preset operation is: The configuration field combination of is matched with a preset check rule table; the preset check rule table includes at least one field check rule; if the field check rule can be matched, the field check rule is output as the preset field check rule ; If the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, one configuration field is removed from the current configuration field combination, and after removing the one configuration field The combination of configuration fields is re-used as the current configuration field combination, and the step of matching the configuration field combination with the preset inspection rule table is returned; and the business field information is checked according to the preset field inspection rule. Perform inspection.
一种可选实施方式中,所述处理模块具体用于:按照预设映射规则,将所述当前的接口字段组合映射为字符串;从所述预设检验规则表中确定所述字符串的类型对应的子检验规则表;确定所述字符串在所述子检验规则表中是否有对应的字段检验规则。In an optional implementation manner, the processing module is specifically configured to: map the current interface field combination to a character string according to a preset mapping rule; determine the character string from the preset check rule table The sub-check rule table corresponding to the type; determine whether the character string has a corresponding field check rule in the sub-check rule table.
一种可选实施方式中,所述预设检验规则表中每条字段检验规则标记了失效时段属性和/或生效时段属性,所述失效时段属性指示字段检验规则在当前时刻不可匹配,所述生效时段属性指示字段检验规则在当前时刻可匹配;所述处理模块还用于:将所述当前的配置字段组合与第一时效检验规则表进行匹配;所述第一时效检验规则表为所述预设检验规则表中去除了标记失效时段属性的字段检验规则后的字段检验规则的组合;和/或,将所述当前的配置字段组合与第二时效检验规则表进行匹配;所述第二时效检验规则表为所述预设检验规则表中标记生效时段属性的字段检验规则的组合。In an optional implementation manner, each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute, and the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment. The effective period attribute indicates that the field inspection rule can be matched at the current moment; the processing module is further used to: match the current configuration field combination with the first aging inspection rule table; the first aging inspection rule table is the The combination of field inspection rules in the preset inspection rule table after removing the field inspection rules that mark the attributes of the expiration period; and/or, matching the current configuration field combination with the second aging inspection rule table; the second The time-effectiveness inspection rule table is a combination of field inspection rules marked with the effective period attribute in the preset inspection rule table.
一种可选实施方式中,所述处理模块具体用于:若所述预设字段检验规则中标记了第一业务字段为所述业务信息中的必填字段,且所述业务信息未包括所述第一业务字段,或者所述第一业务字段的取值为空,则确定所述业务信息为不合法;对于第二业务字段,所述第二业务字段为在所述业务字段信息和所述预设字段检验规则中均存在的任一业务字段,若所述第二业务字段的至少一项校验中任一项校验不合法,则确定所述业务信息为不合法;所述至少一项检验包括:所述第二业务字段的取值的格式是否符合所述第二业务字段的预设格式,若不符合,则不合法;所述第二业务字段的取值的长度是否符合所述第二业务字段的预设长度,若不符合,则不合法;若所述预设字段检验规则中标记所述第二业务字段为选填字段,则确定所述第二业务字段的取值是否在所述选填字段的预设取值范围内,若不在,则不合法。In an optional implementation manner, the processing module is specifically configured to: if the first service field is marked as a required field in the service information in the preset field check rule, and the service information does not include all The first business field, or the value of the first business field is empty, it is determined that the business information is illegal; for the second business field, the second business field is in the business field information and For any business field that exists in the preset field verification rules, if any one of the at least one verification of the second business field is not legal, it is determined that the business information is illegal; A test includes: whether the format of the value of the second service field conforms to the preset format of the second service field, if not, it is illegal; whether the length of the value of the second service field conforms If the preset length of the second business field does not match, it is illegal; if the second business field is marked as an optional field in the preset field inspection rule, the second business field is determined Whether the value is within the preset value range of the optional field, if not, it is illegal.
一种可选实施方式中,所述处理模块还用于:若所述当前的配置字段组合中有且仅有一个配置字段,则将所述预设检验规则表中的默认通用字段检验规则作为所述预设字段检验规则。In an optional implementation manner, the processing module is further configured to: if there is one and only one configuration field in the current configuration field combination, use the default common field check rule in the preset check rule table as The preset field inspection rule.
上述第二方面及第二方面各个实施方式的有益效果,可以参考上述第一 方面及第一方面各个实施方式的有益效果,这里不再赘述。For the beneficial effects of the foregoing second aspect and the various embodiments of the second aspect, reference may be made to the beneficial effects of the foregoing first aspect and the various embodiments of the first aspect, which will not be repeated here.
第三方面,本申请提供一种计算机设备,包括程序或指令,当所述程序或指令被执行时,用以执行上述第一方面及第一方面各个实施方式的方法。In a third aspect, the present application provides a computer device including a program or instruction, and when the program or instruction is executed, it is used to execute the above-mentioned method of the first aspect and each implementation manner of the first aspect.
第四方面,本申请提供一种存储介质,包括程序或指令,当所述程序或指令被执行时,用以执行上述第一方面及第一方面各个实施方式的方法。In a fourth aspect, the present application provides a storage medium including a program or instruction, and when the program or instruction is executed, it is used to execute the method of the first aspect and the implementation manners of the first aspect.
附图说明Description of the drawings
图1为本申请实施例提供的一种字段信息检验方法的步骤流程示意图;FIG. 1 is a schematic diagram of the process flow of a method for verifying field information provided by an embodiment of this application;
图2为本申请实施例提供的一种字段信息检验方法的具体步骤流程示意图;FIG. 2 is a schematic flowchart of specific steps of a method for verifying field information provided by an embodiment of the application;
图3为本申请实施例提供的一种字段信息检验装置的结构示意图;FIG. 3 is a schematic structural diagram of a field information checking device provided by an embodiment of this application;
图4为本申请实施例提供的一种计算机设备的结构示意图。Figure 4 is a schematic structural diagram of a computer device provided by an embodiment of the application.
具体实施方式Detailed ways
为了更好的理解上述技术方案,下面将结合说明书附图及具体的实施方式对上述技术方案进行详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本申请技术方案的详细的说明,而不是对本申请技术方案的限定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互结合。In order to better understand the above technical solutions, the above technical solutions will be described in detail below with reference to the drawings and specific implementations of the specification. It should be understood that the embodiments of the application and the specific features in the embodiments are detailed to the technical solutions of the application. Note, rather than limiting the technical solution of the present application, the embodiments of the present application and the technical features in the embodiments can be combined with each other if there is no conflict.
为方便叙述,首先介绍本申请中出现的关键词和缩略语。To facilitate the description, first introduce the keywords and abbreviations that appear in this application.
1、配置字段信息。1. Configure field information.
本申请实施例中的配置字段信息用于确定字段信息匹配的预设字段检验规则,配置字段信息可以包括至少一个配置字段。The configuration field information in the embodiment of the present application is used to determine a preset field check rule that the field information matches, and the configuration field information may include at least one configuration field.
举例来说,配置字段信息可以包括以下内容中的一项或多项:For example, the configuration field information may include one or more of the following:
MERCHANT_ID:是指合作方平台接入本行的ID号;MERCHANT_ID: refers to the ID number of the partner's platform to access the bank;
PS_CODE:是指产品类型;PS_CODE: refers to the product type;
TXN_ID:是指交易码;TXN_ID: refers to the transaction code;
TXN_TYPE:是指交易类型。TXN_TYPE: refers to the transaction type.
2、业务字段信息。2. Business field information.
本申请实施例中的业务字段信息是指字段信息中待检验的字段的组合,对业务字段信息中业务字段的字段检验规则,依赖于配置字段信息。The business field information in the embodiment of the present application refers to the combination of the fields to be checked in the field information, and the field checking rules for the business fields in the business field information depend on the configuration field information.
举例来说,业务字段信息可以包括以下内容中的一项或多项:For example, the service field information can include one or more of the following:
APP_NO:是指申请编号;APP_NO: refers to the application number;
NAME:是指姓名;NAME: refers to the name;
ID_TYPE:是指证件提交类型。ID_TYPE: refers to the type of certificate submission.
金融机构(例如银行机构、保险机构或证券机构)在进行业务(如银行的贷款业务、存款业务等)运转过程中,一些金融系统需要通过对外服务接口传入字段来实现金融交易功能。由于金融交易对运行稳定性的要求较高,因此需要对传入金融系统的字段信息进行校验。然而,由于各接入方的业务有所不同,同一个对外服务接口在字段信息上可能会存在或多或少的差异。现有技术中,针对于所有接入方的业务字段,都是按照同一个通用字段校验规则进行检验。然而,同一个业务字段对不同接入方的要求可能并不一样,从而导致现有技术中的通用字段校验规则对不同接入方的字段信息检验的适应性较差。显然地,这种情况无法符合银行等金融机构的需求,从而可能会对金融机构各项业务的高效运转产生影响。During the operation of financial institutions (such as banking institutions, insurance institutions or securities institutions) (such as bank loan business, deposit business, etc.), some financial systems need to pass in fields through the external service interface to implement financial transaction functions. Because financial transactions have high requirements for operational stability, it is necessary to verify the field information passed into the financial system. However, due to the different services of each access party, the same external service interface may have more or less differences in field information. In the prior art, the service fields of all access parties are checked according to the same general field check rule. However, the same service field may have different requirements for different access parties, which leads to poor adaptability of the general field verification rules in the prior art to field information verification of different access parties. Obviously, this situation cannot meet the needs of banks and other financial institutions, which may affect the efficient operation of various businesses of financial institutions.
为此,本申请实施例提供一种字段信息检验方法,用以解决现有技术中的通用字段校验规则对不同接入方的字段信息检验的适应性较差的技术问题。To this end, the embodiment of the present application provides a field information verification method to solve the technical problem that the general field verification rule in the prior art has poor adaptability to field information verification of different access parties.
图1为本申请实施例提供的一种字段信息检验方法的步骤流程示意图。需要说明的是,图1示出的方法中适用的字段信息可以为输入一个应用系统接口时的接口字段,或者也可以为其它场景中的字段信息,在此并不对场景做限定。图1示出的方法,例如可用于对一个系统接口进行差异化配置和管理,可通过快速配置实现对不同接入方所上送的字段信息的要求进行差异化处理。如图1所示,该方法包括:Fig. 1 is a schematic flow chart of the steps of a method for verifying field information provided by an embodiment of the application. It should be noted that the applicable field information in the method shown in FIG. 1 may be an interface field when inputting an application system interface, or may also be field information in other scenarios, and the scenario is not limited here. The method shown in FIG. 1 can be used, for example, to perform differentiated configuration and management of a system interface, and can realize differentiated processing of the field information requirements sent by different access parties through quick configuration. As shown in Figure 1, the method includes:
步骤101:获取字段信息,所述字段信息包括配置字段信息和业务字段信息,所述配置字段信息包括至少一个配置字段的字段信息。Step 101: Obtain field information, where the field information includes configuration field information and service field information, and the configuration field information includes field information of at least one configuration field.
步骤102:将所述至少一个配置字段作为当前的配置字段组合,按照预设操作获取所述当前的配置字段组合对应的预设字段检验规则。Step 102: Use the at least one configuration field as a current configuration field combination, and obtain a preset field check rule corresponding to the current configuration field combination according to a preset operation.
步骤103:按照所述预设字段检验规则,对所述业务字段信息进行检验。Step 103: Check the service field information according to the preset field check rule.
示例性地,表1为本申请实施例提供的一种字段信息的数据结构的示意表:Exemplarily, Table 1 is a schematic table of a data structure of field information provided in an embodiment of the application:
Figure PCTCN2020091658-appb-000001
Figure PCTCN2020091658-appb-000001
表1Table 1
下面结合表1对字段信息的具体数据结构进行详细说明。如表1所示,在字段信息的数据结构中,第1~4行的每行的栏位项目名称即为一个配置字段,1~4行的栏位项目名称组成了配置字段信息。而第5~13行的每行的栏目项目名称即为一个业务字段,第5~13行的栏目项目名称组成了业务字段信息。其中,R表示必填项,O表示选填项。The specific data structure of the field information will be described in detail below in conjunction with Table 1. As shown in Table 1, in the data structure of the field information, the field item name of each row in rows 1 to 4 is a configuration field, and the field item names in rows 1 to 4 constitute the configuration field information. The column item name of each row in the 5th to 13th rows is a business field, and the column item names in the 5th to 13th rows constitute the business field information. Among them, R means required items, O means optional items.
由表1可以看出,对于交易服务码TXN_ID为90032的接口,有两类功 能,当交易类型是0时表示执行审批功能,当交易类型是1时只做信息同步。表现在字段信息上,即TXN_ID为90032的字段信息,可按照交易类型TXN_TYPE分为两类。对于同一个接口,不同的交易类型对于字段的要求存在差异,而每一种交易类型对于不同的合作方字段也会存在差异,对于同一个合作方,不同的产品类别字段也可能存在差异。因此,可根据配置字段对字段信息分类,按照相应的字段检验规则对业务字段进行检验。It can be seen from Table 1 that for the interface with the transaction service code TXN_ID of 90032, there are two types of functions. When the transaction type is 0, the approval function is executed, and when the transaction type is 1, only information synchronization is performed. Shown in the field information, that is, the field information with TXN_ID 90032 can be divided into two types according to the transaction type TXN_TYPE. For the same interface, different transaction types have different requirements for fields, and each transaction type has different fields for different partners. For the same partner, different product category fields may also have differences. Therefore, field information can be classified according to configuration fields, and business fields can be checked according to corresponding field checking rules.
示例性地,在上述步骤102中,预设操作具体可以为:Exemplarily, in the foregoing step 102, the preset operation may specifically be:
将当前的配置字段组合与预设检验规则表中的至少一个字段检验规则进行匹配,若能匹配到字段检验规则,则将该字段检验规则作为预设字段检验规则输出。若不能匹配到字段检验规则,且当前的配置字段组合中包括至少两个配置字段,则从当前的配置字段组合中去除一个配置字段,并将去除了一个配置字段后的配置字段组合重新作为当前的配置字段组合,并返回至将配置字段组合与预设检验规则表进行匹配的步骤。其中,从当前的配置字段组合中去除一个配置字段,具体可根据预设优先级的顺序来去除。The current configuration field combination is matched with at least one field inspection rule in the preset inspection rule table, and if the field inspection rule can be matched, the field inspection rule is output as the preset field inspection rule. If the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, one configuration field will be removed from the current configuration field combination, and the configuration field combination after removing one configuration field will be used as the current configuration field combination. And return to the step of matching the configuration field combination with the preset inspection rule table. Among them, removing a configuration field from the current configuration field combination can be specifically removed according to a preset priority order.
需要说明的是,预设操作还可以包括:若当前的配置字段组合中有且仅有一个配置字段,则将预设检验规则表中的默认通用字段检验规则作为所述预设字段检验规则。It should be noted that the preset operation may also include: if there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule.
举例来说,假设配置字段组合中存在4个配置字段:A、B、C和D。当前的配置字段组合为ABCD。首先将ABCD与预设检验规则表进行匹配,若匹配不到字段检验规则,且预设优先级指示去除D,则当前的配置字段组合更新为ABC。再将ABC与预设检验规则表进行匹配,若仍然没有匹配到字段检验规则,且预设优先级指示去除C,则当前的配置字段组合更新为AB。再将AB与预设检验规则表匹配,若仍然没有匹配到字段检验规则,且预设优先级指示去除B,则当前的配置字段组合更新为A。For example, suppose there are 4 configuration fields in the configuration field combination: A, B, C, and D. The current configuration field combination is ABCD. First, ABCD is matched with the preset inspection rule table. If the field inspection rule cannot be matched, and the preset priority indicates that D is removed, the current configuration field combination is updated to ABC. Then ABC is matched with the preset inspection rule table. If the field inspection rule is still not matched, and the preset priority indicates that C is removed, the current configuration field combination is updated to AB. Then match AB with the preset inspection rule table. If the field inspection rule is still not matched, and the preset priority indicates that B is removed, the current configuration field combination is updated to A.
示例性地,可通过以下可选实施方式确定配置字段组合A对应的预设字段检验规则:Exemplarily, the preset field inspection rule corresponding to the configuration field combination A can be determined through the following optional implementation manners:
若当前的配置字段组合中有且仅有一个配置字段,则将预设检验规则表中的默认通用字段检验规则作为预设字段检验规则。即当前的配置字段组合为A时,预设字段检验规则为默认通用字段检验规则。If there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule. That is, when the current configuration field combination is A, the preset field verification rule is the default general field verification rule.
下面结合表1,以具体示例说明步骤102中将所述当前的配置字段组合与预设检验规则表进行匹配的一种可选实施方式:In the following, in conjunction with Table 1, an optional implementation manner for matching the current configuration field combination with the preset inspection rule table in step 102 is described with a specific example:
按照预设映射规则,将当前的接口字段组合映射为字符串,从预设检验规则表中确定字符串的类型对应的子检验规则表,确定字符串在子检验规则 表中是否有对应的字段检验规则。According to the preset mapping rules, map the current interface field combination to a string, determine the sub-inspection rule table corresponding to the type of the string from the preset inspection rule table, and determine whether the string has a corresponding field in the sub-inspection rule table testing regulations.
假设将TXN_ID、TXN_TYPE、MERCHANT_ID、PS_CODE这4个字段作为配置字段信息,则根据上送内容的不同,可以获取到对应的预设字段检验规则。示例性地,表2为本申请实施例提供的一种字符串与子检验规则表对应关系的示意表。Assuming that the four fields of TXN_ID, TXN_TYPE, MERCHANT_ID, and PS_CODE are used as configuration field information, the corresponding preset field verification rules can be obtained according to the content of the upload. Exemplarily, Table 2 is a schematic table of a correspondence relationship between a character string and a sub-check rule table provided in an embodiment of the application.
Figure PCTCN2020091658-appb-000002
Figure PCTCN2020091658-appb-000002
表2Table 2
其中,INTERFACE_KEY一列表示字符串,INTERFACE_VALUE一列表示字符串的类型为TXN_ID、TXN_TYPE、MERCHANT_ID、PS_CODE映射的字符串时的子检验规则表。另外,AVAILABLE表示子检验规则表每一行中的字段检验规则是否存在,Y表示存在。Among them, the INTERFACE_KEY column represents the string, and the INTERFACE_VALUE column represents the sub-inspection rule table when the type of the string is a string mapped by TXN_ID, TXN_TYPE, MERCHANT_ID, and PS_CODE. In addition, AVAILABLE indicates whether the field inspection rule in each row of the sub-inspection rule table exists, and Y means it exists.
基于这种KEY、VALUE的接口配置设计,KEY值可以做到在TXN_ID、TXN_TYPE、MERCHANT_ID、PS_CODE这几个关键字段中的灵活组合。比如在同一TXN_ID、TXN_TYPE下,只需要对不同的MERCHANT_ID做接口字段差异区分,不同的PS_CODE之间没有差异,则KEY值只需要包含TXN_ID、TXN_TYPE、MERCHANT_ID。同样的,如果在同一TXN_ID、TXN_TYPE下不同的MERCHANT_ID之间没有差异,则KEY值只需要包含TXN_ID、TXN_TYPE即可。以此类推,如果是一个对于所有合作方和产品都通用的接口字段,那KEY值则只配置TXN_ID即可。Based on this KEY and VALUE interface configuration design, the KEY value can be flexibly combined in the key fields of TXN_ID, TXN_TYPE, MERCHANT_ID, PS_CODE. For example, under the same TXN_ID and TXN_TYPE, only different MERCHANT_IDs need to be distinguished by interface field differences. There is no difference between different PS_CODEs, so the KEY value only needs to include TXN_ID, TXN_TYPE, MERCHANT_ID. Similarly, if there is no difference between different MERCHANT_IDs under the same TXN_ID and TXN_TYPE, the KEY value only needs to include TXN_ID and TXN_TYPE. By analogy, if it is an interface field common to all partners and products, then only TXN_ID can be configured for the KEY value.
上述可选实施方式中,可以优先取最细化的KEY值进行匹配,以确定是否有对应的接口校验规则配置。也就是说,将TXN_ID、TXN_TYPE、 MERCHANT_ID、PS_CODE映射为不同的字符串,如果该KEY值未匹配到规则,则根据TXN_ID、TXN_TYPE、MERCHANT_ID继续匹配。以此类推如还匹配不到,则继续使用TXN_ID、TXN_TYPE或TXN_ID去匹配,当使用TXN_ID才匹配到字段校验规则的时候,实际上等同于对该调用方不需要进行接口规则的定制化管理,使用的是默认通用接口校验规则。In the foregoing optional implementation manner, the most refined KEY value may be used for matching first to determine whether there is a corresponding interface verification rule configuration. In other words, map TXN_ID, TXN_TYPE, MERCHANT_ID, and PS_CODE to different strings. If the KEY value does not match the rule, continue matching according to TXN_ID, TXN_TYPE, and MERCHANT_ID. By analogy, if it fails to match, continue to use TXN_ID, TXN_TYPE or TXN_ID to match. When TXN_ID is used to match the field verification rules, it is actually equivalent to the caller without customizing the interface rules. , Using the default common interface verification rules.
示例性地,后续还可以持续对该字段信息检验方法进行优化。例如可以在预设字段校验规则配置上增加生效时段属性和失效时段属性,这样能够针对于一些可预期的变化进行提前配置,将新的配置项的生效时段设置为需要的时段,并可以同样地对失效时段属性进行配置,这样到该设置的生效时段或失效时段后,旧的字段检验规则配置自动失效,服务将自动使用新的已生效的字段检验规则。采用该种方式,能够解决目前字段检验变更只能在指定时间(比如使用方同时配合变更的时候)进行配置变更的局限,使得在实际使用中能够更加灵活。Exemplarily, the method for verifying the field information can be continuously optimized in the future. For example, the effective period attribute and the expiration period attribute can be added to the preset field verification rule configuration, so that it can be configured in advance for some predictable changes, and the effective period of the new configuration item can be set to the required period. Configure the expiration period attribute locally, so that after the effective period or expiration period of the setting, the old field verification rule configuration automatically becomes invalid, and the service will automatically use the new effective field verification rule. Using this method can solve the limitation that the current field inspection change can only be changed at a specified time (for example, when the user cooperates with the change at the same time), making it more flexible in actual use.
示例性地,基于生效时段和失效时段,将当前的配置字段组合与预设检验规则表进行匹配的另一种可选实施方式如下:Exemplarily, based on the effective period and the invalid period, another optional implementation manner of matching the current configuration field combination with the preset inspection rule table is as follows:
预设检验规则表中的每条字段检验规则用于标记失效时段属性和/或生效时段属性,失效时段属性指示字段检验规则在当前时刻不可匹配,生效时段属性指示字段检验规则在当前时刻可匹配。如此,将当前的配置字段组合与预设检验规则表进行匹配,还可以包括:Each field inspection rule in the preset inspection rule table is used to mark the expiration period attribute and/or the effective period attribute. The expiration period attribute indicates that the field inspection rule cannot be matched at the current moment, and the effective period attribute indicates that the field inspection rule can be matched at the current moment. . In this way, matching the current configuration field combination with the preset inspection rule table may also include:
将当前的配置字段组合与第一时效检验规则表进行匹配,第一时效检验规则表为预设检验规则表中去除了标记失效时段属性的字段检验规则后的字段检验规则的组合;和/或,Match the current configuration field combination with the first aging inspection rule table, which is a combination of field inspection rules in the preset inspection rule table after removing the field inspection rules that mark the expiration period attribute; and/or ,
将当前的配置字段组合与第二时效检验规则表进行匹配,第二时效检验规则表为预设检验规则表中标记生效时段属性的字段检验规则的组合。The current configuration field combination is matched with the second aging inspection rule table. The second aging inspection rule table is a combination of field inspection rules marked with the effective period attribute in the preset inspection rule table.
示例性地,在上述步骤102之后,还可以结合预设字段校验规则对交易请求方调用的本系统的业务信息进行合法性校验。其中,预设字段校验规则可以使用可扩展标记语言(Extensible Markup Language,xml)的格式存放,也可以使用其他数据存储文件存放,如excel。举例来说,在excel表格中设计好每一类交易对应的业务字段的维度控制,将该excel文件放到应用服务的工程下,同时写一套解析该excel表格的文件格式和内容的模块。当应用进程启动时,通过加载该模块将这些配置内容加载到内存中,并按照一定的方式组织起来,如此,在请求方调用接口时,将其与请求方上送的字段信息进行匹配,也可以实现同样的效果。Exemplarily, after the above step 102, the legality of the business information of the system called by the transaction requester can also be verified in combination with the preset field verification rules. Among them, the preset field verification rules can be stored in an Extensible Markup Language (xml) format, or can be stored in other data storage files, such as excel. For example, design the dimensional control of the business fields corresponding to each type of transaction in the excel table, put the excel file under the application service project, and write a set of modules to analyze the file format and content of the excel table. When the application process starts, the configuration content is loaded into the memory by loading the module, and organized in a certain way, so that when the requester calls the interface, it matches the field information sent by the requester. The same effect can be achieved.
本申请实施例中,预设字段校验规则可以包括对业务字段中每个业务字段的校验规则。举例来说,每个业务字段可以存在以下几个属性:In this embodiment of the application, the preset field verification rule may include a verification rule for each business field in the business field. For example, each business field can have the following attributes:
fieldName:表示该业务字段的名称;fieldName: indicates the name of the business field;
fieldType:表示业务字段类型(如String、BigDecimal、Array等);fieldType: indicates the type of business field (such as String, BigDecimal, Array, etc.);
fmtRegular:表示业务字段格式长度;fmtRegular: indicates the length of the business field format;
fieldLevel:表示层级(正常是1层,如有数组,则数组里面的业务字段是2层,依次类推);fieldLevel: indicates the level (normally 1 level, if there is an array, the business fields in the array are 2 levels, and so on);
forceExist:表示该业务字段是否为必填字段(true表示该字段必须在接口请求报文中出现且有值);forceExist: indicates whether the business field is a required field (true indicates that the field must appear in the interface request message and have a value);
dic:表示该业务字段为非必填字段,如果该业务字段需要对上送值进行限制,则配置dic。举例来说,上述示例表示该字段的值只能上传正常(NORMAL)或计算机指令(SUSPEND),如是其他值则为不合法。dic: Indicates that the service field is not required. If the service field needs to limit the value sent, configure dic. For example, the above example indicates that the value of this field can only be uploaded as normal (NORMAL) or computer command (SUSPEND), and other values are illegal.
以上是取其中一个业务字段的检验规则进行详细说明,一个预设字段检验规则是多个这种字段检验规则的集合。The above is a detailed description of the verification rule of one of the business fields. A preset field verification rule is a collection of multiple such field verification rules.
示例性地,上述步骤103的一种可选实施方式如下:Exemplarily, an optional implementation manner of the foregoing step 103 is as follows:
对于第一业务字段,若预设字段检验规则中标记了第一业务字段为业务信息中的必填字段,且业务信息未包括第一业务字段,或者第一业务字段的取值为空,则确定业务信息为不合法。For the first business field, if the first business field is marked as a required field in the business information in the preset field check rule, and the business information does not include the first business field, or the value of the first business field is empty, then Determine that the business information is illegal.
对于第二业务字段,在第二业务字段为在业务字段信息和预设字段检验规则中均存在的任一业务字段的情况下,若第二业务字段的至少一项校验中任一项校验不合法,则确定业务信息为不合法。For the second business field, if the second business field is any business field that exists in both the business field information and the preset field verification rules, if any one of at least one verification of the second business field is verified If the verification is illegal, the business information is determined to be illegal.
其中,至少一项检验包括以下内容中的一项或多项:Among them, at least one test includes one or more of the following:
第二业务字段的取值的格式是否符合第二业务字段的预设格式,若不符合,则不合法;Whether the format of the value of the second business field conforms to the preset format of the second business field, if not, it is illegal;
第二业务字段的取值的长度是否符合第二业务字段的预设长度,若不符合,则不合法;Whether the length of the value of the second business field meets the preset length of the second business field, if not, it is illegal;
若预设字段检验规则中标记第二业务字段为选填字段,则确定第二业务字段的取值是否在选填字段的预设取值范围内,若不在,则不合法。If the second business field is marked as an optional field in the preset field verification rule, it is determined whether the value of the second business field is within the preset value range of the optional field, if not, it is illegal.
结合表2示出的字段信息的数据结构的示意图,上述实施方式的具体过程可以包括:With reference to the schematic diagram of the data structure of the field information shown in Table 2, the specific process of the foregoing implementation manner may include:
(1)如果在预设字段检验规则中,必须存在(forceExist)配置是否为真(true)的业务字段,在调用方上送的字段信息中如果没有、或者有这个业务字段但是值为空的话,则返回“校验不通过,字段不能为空”的提示。(1) If there must be a business field whose (forceExist) configuration is true (true) in the preset field verification rules, if there is no or there is this business field but the value is empty in the field information sent by the caller , It will return the prompt of "verification failed, field cannot be empty".
(2)如果字段信息中的业务字段在接口校验规则中不存在,则业务字段会被过滤掉,不会进入参与预设字段检验规则的检验。(2) If the business field in the field information does not exist in the interface verification rule, the business field will be filtered out and will not enter the verification that participates in the preset field verification rule.
(3)如果字段信息中的业务字段在接口校验规则中存在,则根据字段格式(fieldType)检验字段值的格式是否正确,如果格式正确,则检验字段值长度是否符合;如检验不通过,则返回“字段格式不正确”的提示。(3) If the business field in the field information exists in the interface verification rules, check whether the format of the field value is correct according to the field format (fieldType), if the format is correct, check whether the length of the field value is consistent; if the check fails, It returns the prompt of "The field format is incorrect".
(4)如果业务字段存在有dic配置项,则表示业务字段的值有明确的内容范围检验,业务字段上送的值必须在dic配置的范围内,如果不在范围内,则检验不通过,返回“字段值不正确”的提示。(4) If there is a dic configuration item in the business field, it means that the value of the business field has a clear content range test. The value sent in the business field must be within the range of the dic configuration. If it is not in the range, the test fails and returns "The field value is incorrect" prompt.
上述方法中,首先将配置字段信息与预设检验规则表进行匹配,由于当前的配置字段组合为配置字段信息时,当前的配置字段组合能够包括最多的配置字段,因此与预设检验规则表匹配到的字段检验规则能够最适应字段信息的检验,当匹配不到时,再将去除一个配置字段后的配置字段组合重新作为当前的配置字段组合,与预设检验规则表进行匹配,从而能够尽可能找到适应字段信息的预设字段检验规则,提升字段信息检验的适应性。另外,同一字段检验规则还可根据使用方和业务场景等因素灵活变化,从而接口检查规则可以快速地进行适配管理,而可以不需要在应用层进行调整。In the above method, the configuration field information is first matched with the preset inspection rule table. Since the current configuration field combination is the configuration field information, the current configuration field combination can include the most configuration fields, so it matches the preset inspection rule table The obtained field inspection rules can best adapt to the field information inspection. When the match fails, the configuration field combination after removing a configuration field is re-used as the current configuration field combination and matched with the preset inspection rule table, so as to be able to do the best It is possible to find a preset field inspection rule that adapts to field information to improve the adaptability of field information inspection. In addition, the same field inspection rules can also be flexibly changed according to factors such as the user and business scenarios, so that the interface inspection rules can be quickly adapted and managed without requiring adjustments at the application layer.
本申请实施例提供的字段信息检验方法中的各个可选实施方式可相互结合。图2示例性示出本申请实施例提供的一种结合后的字段信息检验方法的流程示意图。其中,图2所示意的第一配置字段是指TXN_ID,图2所示意的第二配置字段是指TXN_TYPE,图2所示意的第三配置字段是指MERCHANT_ID,图2所示意的第四配置字段是指PS_CODE。The optional implementation manners in the field information verification method provided in the embodiments of the present application can be combined with each other. FIG. 2 exemplarily shows a schematic flowchart of a combined field information verification method provided by an embodiment of the present application. Among them, the first configuration field shown in FIG. 2 refers to TXN_ID, the second configuration field shown in FIG. 2 refers to TXN_TYPE, the third configuration field shown in FIG. 2 refers to MERCHANT_ID, and the fourth configuration field shown in FIG. 2 Refers to PS_CODE.
针对于上述方法,本申请实施例还提供一种字段信息检验装置,该装置的具体实现可以参照上述方法。In view of the foregoing method, an embodiment of the present application also provides a field information checking device, and the specific implementation of the device can refer to the foregoing method.
图3为本申请实施例提供的一种字段信息检验装置的结构示意图,如图3所示,该装置包括:FIG. 3 is a schematic structural diagram of a field information checking device provided by an embodiment of the application. As shown in FIG. 3, the device includes:
获取模块301,用于获取字段信息;所述字段信息包括配置字段信息和业务字段信息,所述配置字段信息包括至少一个配置字段;The obtaining module 301 is configured to obtain field information; the field information includes configuration field information and service field information, and the configuration field information includes at least one configuration field;
处理模块302,用于将所述至少一个配置字段作为当前的配置字段组合,按照预设操作获取所述当前的配置字段组合对应的预设字段检验规则;The processing module 302 is configured to use the at least one configuration field as a current configuration field combination, and obtain a preset field inspection rule corresponding to the current configuration field combination according to a preset operation;
其中,所述预设操作为:将所述当前的配置字段组合与预设检验规则表进行匹配;所述预设检验规则表包括至少一个字段检验规则;若能匹配到字段检验规则,则将该字段检验规则作为所述预设字段检验规则输出;若不能匹配到字段检验规则,且所述当前的配置字段组合中包括至少两个配置字段, 则从所述当前的配置字段组合中去除一个配置字段,并将去除了所述一个配置字段后的配置字段组合重新作为所述当前的配置字段组合,并返回所述将所述配置字段组合与预设检验规则表进行匹配的步骤;按照所述预设字段检验规则,对所述业务字段信息进行检验。Wherein, the preset operation is: matching the current configuration field combination with a preset inspection rule table; the preset inspection rule table includes at least one field inspection rule; if the field inspection rule can be matched, then The field check rule is output as the preset field check rule; if the field check rule cannot be matched, and the current configuration field combination includes at least two configuration fields, then one is removed from the current configuration field combination Configure fields, and re-use the configuration field combination after removing the one configuration field as the current configuration field combination, and return to the step of matching the configuration field combination with the preset inspection rule table; The preset field inspection rules are described, and the business field information is inspected.
一种可选实施方式中,所述处理模块302具体用于:In an optional implementation manner, the processing module 302 is specifically configured to:
按照预设映射规则,将所述当前的接口字段组合映射为字符串;从所述预设检验规则表中确定所述字符串的类型对应的子检验规则表;确定所述字符串在所述子检验规则表中是否有对应的字段检验规则。According to a preset mapping rule, map the current interface field combination to a character string; determine the sub-check rule table corresponding to the type of the character string from the preset check rule table; determine that the character string is in the Whether there is a corresponding field inspection rule in the sub-inspection rule table.
一种可选实施方式中,所述预设检验规则表中每条字段检验规则标记了失效时段属性和/或生效时段属性,所述失效时段属性指示字段检验规则在当前时刻不可匹配,所述生效时段属性指示字段检验规则在当前时刻可匹配;In an optional implementation manner, each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute, and the expiration period attribute indicates that the field inspection rule cannot be matched at the current moment. The effective period attribute indicates that the field inspection rule can be matched at the current moment;
所述处理模块302还用于:The processing module 302 is also used for:
将所述当前的配置字段组合与第一时效检验规则表进行匹配;所述第一时效检验规则表为所述预设检验规则表中去除了标记失效时段属性的字段检验规则后的字段检验规则的组合;和/或,将所述当前的配置字段组合与第二时效检验规则表进行匹配;所述第二时效检验规则表为所述预设检验规则表中标记生效时段属性的字段检验规则的组合。The current configuration field combination is matched with the first aging inspection rule table; the first aging inspection rule table is the field inspection rule after the field inspection rule marking the invalidation period attribute is removed from the preset inspection rule table And/or, matching the current configuration field combination with a second aging inspection rule table; the second aging inspection rule table is a field inspection rule marked with an effective period attribute in the preset inspection rule table The combination.
一种可选实施方式中,所述处理模块302具体用于:In an optional implementation manner, the processing module 302 is specifically configured to:
若所述预设字段检验规则中标记了第一业务字段为所述业务信息中的必填字段,且所述业务信息未包括所述第一业务字段,或者所述第一业务字段的取值为空,则确定所述业务信息为不合法;If the first service field is marked as a required field in the service information in the preset field check rule, and the service information does not include the first service field, or the value of the first service field If it is empty, it is determined that the business information is illegal;
对于第二业务字段,所述第二业务字段为在所述业务字段信息和所述预设字段检验规则中均存在的任一业务字段,若所述第二业务字段的至少一项校验中任一项校验不合法,则确定所述业务信息为不合法;For the second business field, the second business field is any business field that exists in both the business field information and the preset field verification rule, if at least one of the second business fields is verified If any item of verification is illegal, it is determined that the business information is illegal;
所述至少一项检验包括:所述第二业务字段的取值的格式是否符合所述第二业务字段的预设格式,若不符合,则不合法;所述第二业务字段的取值的长度是否符合所述第二业务字段的预设长度,若不符合,则不合法;若所述预设字段检验规则中标记所述第二业务字段为选填字段,则确定所述第二业务字段的取值是否在所述选填字段的预设取值范围内,若不在,则不合法。The at least one check includes: whether the format of the value of the second service field conforms to the preset format of the second service field, if not, it is illegal; the value of the second service field is Whether the length meets the preset length of the second service field, if not, it is illegal; if the second service field is marked as an optional field in the preset field check rule, the second service field is determined Whether the value of the field is within the preset value range of the optional field, if not, it is illegal.
一种可选实施方式中,所述处理模块302还用于:In an optional implementation manner, the processing module 302 is further configured to:
若所述当前的配置字段组合中有且仅有一个配置字段,则将所述预设检验规则表中的默认通用字段检验规则作为所述预设字段检验规则。If there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule.
基于相同的技术构思,本发明实施例提供了一种计算机设备,如图4所 示,包括至少一个处理器401,以及与至少一个处理器连接的存储器402,本发明实施例中不限定处理器401与存储器402之间的具体连接介质,图4中处理器401和存储器402之间通过总线连接为例。总线可以分为地址总线、数据总线、控制总线等。Based on the same technical concept, the embodiment of the present invention provides a computer device. As shown in FIG. 4, it includes at least one processor 401 and a memory 402 connected to the at least one processor. The embodiment of the present invention does not limit the processor. For the specific connection medium between the 401 and the memory 402, the connection between the processor 401 and the memory 402 in FIG. 4 is taken as an example. The bus can be divided into address bus, data bus, control bus, etc.
在本发明实施例中,存储器402存储有可被至少一个处理器401执行的指令,至少一个处理器401通过执行存储器402存储的指令,可以执行前述的字段信息检验方法中所包括的步骤。In the embodiment of the present invention, the memory 402 stores instructions that can be executed by at least one processor 401, and the at least one processor 401 can execute the steps included in the aforementioned field information verification method by executing the instructions stored in the memory 402.
其中,处理器401是终端设备的控制中心,可以利用各种接口和线路连接终端设备的各个部分,通过运行或执行存储在存储器402内的指令以及调用存储在存储器402内的数据,从而实现数据处理。可选的,处理器401可包括一个或多个处理单元,处理器401可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理下发指令。可以理解的是,上述调制解调处理器也可以不集成到处理器401中。在一些实施例中,处理器401和存储器402可以在同一芯片上实现,在一些实施例中,它们也可以在独立的芯片上分别实现。Among them, the processor 401 is the control center of the terminal device, which can use various interfaces and lines to connect to various parts of the terminal device, and realize data by running or executing instructions stored in the memory 402 and calling data stored in the memory 402. deal with. Optionally, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, and an application program. The adjustment processor mainly handles issuing instructions. It can be understood that the foregoing modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented on separate chips.
处理器401可以是通用处理器,例如中央处理器(CPU)、数字信号处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本发明实施例中公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合字段信息检验实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。The processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic devices, discrete gates or transistors Logic devices and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiment of checking with field information can be directly embodied as executed and completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
存储器402作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器402可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(Random Access Memory,RAM)、静态随机访问存储器(Static Random Access Memory,SRAM)、可编程只读存储器(Programmable Read Only Memory,PROM)、只读存储器(Read Only Memory,ROM)、带电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性存储器、磁盘、光盘等等。存储器402是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本发明实施例中的存储器402还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。The memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 402 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic memory, disk , CD, etc. The memory 402 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present invention may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
本申请实施例提供一种存储介质,包括程序或指令,当所述程序或指令被执行时,用以执行本申请实施例提供的一种字段信息检验方法及任一可选方法。The embodiment of the present application provides a storage medium including a program or instruction, and when the program or instruction is executed, it is used to execute a field information verification method and any optional method provided in the embodiment of the present application.
最后应说明的是:本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、光学存储器等)上实施的计算机程序产品的形式。Finally, it should be noted that those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this 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, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.

Claims (12)

  1. 一种字段信息检验方法,其特征在于,包括:A method for checking field information, which is characterized in that it comprises:
    获取字段信息;所述字段信息包括配置字段信息和业务字段信息,所述配置字段信息包括至少一个配置字段;Obtaining field information; the field information includes configuration field information and service field information, and the configuration field information includes at least one configuration field;
    将所述至少一个配置字段作为当前的配置字段组合,按照预设操作获取所述当前的配置字段组合对应的预设字段检验规则;所述预设操作为:将所述当前的配置字段组合与预设检验规则表进行匹配;所述预设检验规则表包括至少一个字段检验规则;若能匹配到字段检验规则,则将该字段检验规则作为所述预设字段检验规则输出;若不能匹配到字段检验规则,且所述当前的配置字段组合中包括至少两个配置字段,则从所述当前的配置字段组合中去除一个配置字段,并将去除了所述一个配置字段后的配置字段组合重新作为所述当前的配置字段组合,并返回所述将所述配置字段组合与预设检验规则表进行匹配的步骤;The at least one configuration field is used as the current configuration field combination, and the preset field verification rule corresponding to the current configuration field combination is obtained according to a preset operation; the preset operation is: combining the current configuration field combination with The preset check rule table is matched; the preset check rule table includes at least one field check rule; if the field check rule can be matched, the field check rule is output as the preset field check rule; if it cannot be matched Field verification rules, and the current configuration field combination includes at least two configuration fields, then one configuration field is removed from the current configuration field combination, and the configuration field combination after the one configuration field is removed is renewed As the current configuration field combination, and return to the step of matching the configuration field combination with the preset inspection rule table;
    按照所述预设字段检验规则,对所述业务字段信息进行检验。According to the preset field check rule, check the service field information.
  2. 如权利要求1所述的方法,其特征在于,所述将所述当前的配置字段组合与预设检验规则表进行匹配,包括:8. The method of claim 1, wherein the matching the current configuration field combination with a preset inspection rule table comprises:
    按照预设映射规则,将所述当前的接口字段组合映射为字符串;According to the preset mapping rule, map the current interface field combination into a string;
    从所述预设检验规则表中确定所述字符串的类型对应的子检验规则表;Determine the sub-check rule table corresponding to the type of the character string from the preset check rule table;
    确定所述字符串在所述子检验规则表中是否有对应的字段检验规则。It is determined whether the character string has a corresponding field check rule in the sub check rule table.
  3. 如权利要求1所述的方法,其特征在于,所述预设检验规则表中每条字段检验规则标记了失效时段属性和/或生效时段属性,所述失效时段属性指示字段检验规则在当前时刻不可匹配,所述生效时段属性指示字段检验规则在当前时刻可匹配;The method according to claim 1, wherein each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute, and the expiration period attribute indicates that the field inspection rule is at the current moment. Unmatchable, the effective period attribute indicates that the field verification rule can be matched at the current moment;
    所述将所述当前的配置字段组合与预设检验规则表进行匹配,还包括:The matching the current configuration field combination with the preset inspection rule table further includes:
    将所述当前的配置字段组合与第一时效检验规则表进行匹配;所述第一时效检验规则表为所述预设检验规则表中去除了标记失效时段属性的字段检验规则后的字段检验规则的组合;The current configuration field combination is matched with the first aging inspection rule table; the first aging inspection rule table is the field inspection rule after the field inspection rule marking the invalidation period attribute is removed from the preset inspection rule table The combination;
    和/或,将所述当前的配置字段组合与第二时效检验规则表进行匹配;所述第二时效检验规则表为所述预设检验规则表中标记生效时段属性的字段检验规则的组合。And/or, matching the current configuration field combination with a second aging inspection rule table; the second aging inspection rule table is a combination of field inspection rules marked with an effective period attribute in the preset inspection rule table.
  4. 如权利要求1-3任一所述的方法,其特征在于,所述按照所述预设字段检验规则,对所述业务字段信息进行检验,包括:The method according to any one of claims 1 to 3, wherein the checking the service field information according to the preset field checking rule comprises:
    若所述预设字段检验规则中标记了第一业务字段为所述业务信息中的必填字段,且所述业务信息未包括所述第一业务字段,或者所述第一业务字段的取值为空,则确定所述业务信息为不合法;If the first service field is marked as a required field in the service information in the preset field check rule, and the service information does not include the first service field, or the value of the first service field If it is empty, it is determined that the business information is illegal;
    对于第二业务字段,所述第二业务字段为在所述业务字段信息和所述预设字段检验规则中均存在的任一业务字段,若所述第二业务字段的至少一项校验中任一项校验不合法,则确定所述业务信息为不合法;所述至少一项检验包括:所述第二业务字段的取值的格式是否符合所述第二业务字段的预设格式,若不符合,则不合法;所述第二业务字段的取值的长度是否符合所述第二业务字段的预设长度,若不符合,则不合法;For the second business field, the second business field is any business field that exists in both the business field information and the preset field verification rule, if at least one of the second business fields is verified If any one of the checks is illegal, it is determined that the service information is illegal; the at least one check includes: whether the value format of the second service field meets the preset format of the second service field, If not, it is illegal; whether the length of the value of the second service field meets the preset length of the second service field, if it does not, it is illegal;
    若所述预设字段检验规则中标记所述第二业务字段为选填字段,则确定所述第二业务字段的取值是否在所述选填字段的预设取值范围内,若不在,则不合法。If the second business field is marked as an optional field in the preset field verification rule, it is determined whether the value of the second business field is within the preset value range of the optional field, if not, Is not legal.
  5. 如权利要求1-3任一所述的方法,其特征在于,所述预设操作还包括:The method according to any one of claims 1-3, wherein the preset operation further comprises:
    若所述当前的配置字段组合中有且仅有一个配置字段,则将所述预设检验规则表中的默认通用字段检验规则作为所述预设字段检验规则。If there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule.
  6. 一种字段信息检验装置,其特征在于,包括:A field information checking device is characterized in that it comprises:
    获取模块,用于获取字段信息;所述字段信息包括配置字段信息和业务字段信息,所述配置字段信息包括至少一个配置字段;An obtaining module for obtaining field information; the field information includes configuration field information and service field information, and the configuration field information includes at least one configuration field;
    处理模块,用于将所述至少一个配置字段作为当前的配置字段组合,按照预设操作获取所述当前的配置字段组合对应的预设字段检验规则;所述预设操作为:将所述当前的配置字段组合与预设检验规则表进行匹配;所述预设检验规则表包括至少一个字段检验规则;若能匹配到字段检验规则,则将该字段检验规则作为所述预设字段检验规则输出;若不能匹配到字段检验规则,且所述当前的配置字段组合中包括至少两个配置字段,则从所述当前的配置字段组合中去除一个配置字段,并将去除了所述一个配置字段后的配置字段组合重新作为所述当前的配置字段组合,并返回所述将所述配置字段组合与预设检验规则表进行匹配的步骤;按照所述预设字段检验规则,对所述业务字段信息进行检验。The processing module is configured to use the at least one configuration field as the current configuration field combination, and obtain the preset field inspection rule corresponding to the current configuration field combination according to a preset operation; the preset operation is: The configuration field combination of is matched with a preset check rule table; the preset check rule table includes at least one field check rule; if the field check rule can be matched, the field check rule is output as the preset field check rule ; If the field verification rule cannot be matched, and the current configuration field combination includes at least two configuration fields, one configuration field is removed from the current configuration field combination, and after removing the one configuration field The combination of configuration fields is re-used as the current configuration field combination, and the step of matching the configuration field combination with the preset inspection rule table is returned; and the business field information is checked according to the preset field inspection rule. Perform inspection.
  7. 如权利要求6所述的装置,其特征在于,所述处理模块具体用于:The device according to claim 6, wherein the processing module is specifically configured to:
    按照预设映射规则,将所述当前的接口字段组合映射为字符串;According to the preset mapping rule, map the current interface field combination into a string;
    从所述预设检验规则表中确定所述字符串的类型对应的子检验规则表;Determine the sub-check rule table corresponding to the type of the character string from the preset check rule table;
    确定所述字符串在所述子检验规则表中是否有对应的字段检验规则。It is determined whether the character string has a corresponding field check rule in the sub check rule table.
  8. 如权利要求6所述的装置,其特征在于,所述预设检验规则表中每条 字段检验规则标记了失效时段属性和/或生效时段属性,所述失效时段属性指示字段检验规则在当前时刻不可匹配,所述生效时段属性指示字段检验规则在当前时刻可匹配,所述处理模块还用于:The device according to claim 6, wherein each field inspection rule in the preset inspection rule table marks an expiration period attribute and/or an effective period attribute, and the expiration period attribute indicates that the field inspection rule is at the current moment. Unmatchable, the effective period attribute indicates that the field check rule can be matched at the current moment, and the processing module is further configured to:
    将所述当前的配置字段组合与第一时效检验规则表进行匹配;所述第一时效检验规则表为所述预设检验规则表中去除了标记失效时段属性的字段检验规则后的字段检验规则的组合;The current configuration field combination is matched with the first aging inspection rule table; the first aging inspection rule table is the field inspection rule after the field inspection rule marking the invalidation period attribute is removed from the preset inspection rule table The combination;
    和/或,将所述当前的配置字段组合与第二时效检验规则表进行匹配;所述第二时效检验规则表为所述预设检验规则表中标记生效时段属性的字段检验规则的组合。And/or, matching the current configuration field combination with a second aging inspection rule table; the second aging inspection rule table is a combination of field inspection rules marked with an effective period attribute in the preset inspection rule table.
  9. 如权利要求6-8任一所述的装置,其特征在于,所述处理模块具体用于:The device according to any one of claims 6-8, wherein the processing module is specifically configured to:
    若所述预设字段检验规则中标记了第一业务字段为所述业务信息中的必填字段,且所述业务信息未包括所述第一业务字段,或者所述第一业务字段的取值为空,则确定所述业务信息为不合法;If the first service field is marked as a required field in the service information in the preset field check rule, and the service information does not include the first service field, or the value of the first service field If it is empty, it is determined that the business information is illegal;
    对于第二业务字段,所述第二业务字段为在所述业务字段信息和所述预设字段检验规则中均存在的任一业务字段,若所述第二业务字段的至少一项校验中任一项校验不合法,则确定所述业务信息为不合法;所述至少一项检验包括:所述第二业务字段的取值的格式是否符合所述第二业务字段的预设格式,若不符合,则不合法;所述第二业务字段的取值的长度是否符合所述第二业务字段的预设长度,若不符合,则不合法;For the second business field, the second business field is any business field that exists in both the business field information and the preset field verification rule, if at least one of the second business fields is verified If any one of the checks is illegal, it is determined that the service information is illegal; the at least one check includes: whether the value format of the second service field meets the preset format of the second service field, If not, it is illegal; whether the length of the value of the second service field meets the preset length of the second service field, if it does not, it is illegal;
    若所述预设字段检验规则中标记所述第二业务字段为选填字段,则确定所述第二业务字段的取值是否在所述选填字段的预设取值范围内,若不在,则不合法。If the second business field is marked as an optional field in the preset field verification rule, it is determined whether the value of the second business field is within the preset value range of the optional field, if not, Is not legal.
  10. 如权利要求6-8任一所述的装置,其特征在于,所述处理模块还用于:8. The device according to any one of claims 6-8, wherein the processing module is further configured to:
    若所述当前的配置字段组合中有且仅有一个配置字段,则将所述预设检验规则表中的默认通用字段检验规则作为所述预设字段检验规则。If there is one and only one configuration field in the current configuration field combination, the default general field check rule in the preset check rule table is used as the preset field check rule.
  11. 一种计算机设备,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1至5中任意一项所述的方法被执行。A computer device characterized by comprising a program or an instruction, and when the program or an instruction is executed, the method according to any one of claims 1 to 5 is executed.
  12. 一种存储介质,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1至5中任意一项所述的方法被执行。A storage medium, characterized by comprising a program or instruction, and when the program or instruction is executed, the method according to any one of claims 1 to 5 is executed.
PCT/CN2020/091658 2019-06-28 2020-05-21 Field information checking method and apparatus WO2020259147A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910580581.3 2019-06-28
CN201910580581.3A CN110287383B (en) 2019-06-28 2019-06-28 Method and device for checking field information

Publications (1)

Publication Number Publication Date
WO2020259147A1 true WO2020259147A1 (en) 2020-12-30

Family

ID=68019818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/091658 WO2020259147A1 (en) 2019-06-28 2020-05-21 Field information checking method and apparatus

Country Status (2)

Country Link
CN (1) CN110287383B (en)
WO (1) WO2020259147A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065920A (en) * 2021-04-12 2021-07-02 北京京东振世信息技术有限公司 Data processing method and system
CN113268290A (en) * 2021-06-16 2021-08-17 中移(杭州)信息技术有限公司 Software container optimization method, device, equipment and computer program product
CN113535776A (en) * 2021-05-28 2021-10-22 国网辽宁省电力有限公司 Parameter validity checking method and system applied to monitoring device
CN113609014A (en) * 2021-08-04 2021-11-05 深圳鼎盛电脑科技有限公司 Interface field checking method and device, storage medium and electronic equipment
CN113836126A (en) * 2021-09-22 2021-12-24 上海妙一生物科技有限公司 Data cleaning method, device, equipment and storage medium
CN114968410A (en) * 2022-06-06 2022-08-30 携程商旅信息服务(上海)有限公司 Data configuration form generation method, system, electronic equipment and storage medium
CN116415199A (en) * 2023-04-13 2023-07-11 广东铭太信息科技有限公司 Business data outlier analysis method based on audit intermediate table
CN116719875A (en) * 2023-08-09 2023-09-08 恩核(北京)信息技术有限公司 Data standardization maintenance method, system, equipment and medium
CN117151864A (en) * 2023-09-13 2023-12-01 中邮消费金融有限公司 Automatic bad loan responsibility identification method and system

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287383B (en) * 2019-06-28 2023-06-09 深圳前海微众银行股份有限公司 Method and device for checking field information
CN110704686B (en) * 2019-10-08 2022-03-18 北京锐安科技有限公司 Quality detection method and device for semi-structured data, storage medium and equipment
CN111159482A (en) * 2019-12-19 2020-05-15 贝壳技术有限公司 Data verification method and system
CN111209538A (en) * 2020-01-03 2020-05-29 北京明略软件系统有限公司 Table data quality probing method and device
CN111459970A (en) * 2020-03-31 2020-07-28 交通银行股份有限公司 Method for checking uniqueness of object information
CN111754232B (en) * 2020-06-29 2023-11-28 上海通联金融服务有限公司 Control method for verifying key fields before non-financial transaction
CN112015728A (en) * 2020-09-08 2020-12-01 浙江惠瀜网络科技有限公司 Method for automatically checking acquired data
CN112256737B (en) * 2020-10-30 2024-05-28 深圳前海微众银行股份有限公司 Method, equipment and storage medium for matching HIVE rule with data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170063696A1 (en) * 2015-08-27 2017-03-02 Hewlett Packard Enterprise Development Lp Data packet flow rule field range of an application specific integrated circuit
CN108132880A (en) * 2017-12-21 2018-06-08 武汉斑马快跑科技有限公司 A kind of parameter verification method and device
CN109726370A (en) * 2018-12-29 2019-05-07 北京中电普华信息技术有限公司 A kind of configurable verification rule packaging method and device
CN110287383A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of field information method of inspection and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170063696A1 (en) * 2015-08-27 2017-03-02 Hewlett Packard Enterprise Development Lp Data packet flow rule field range of an application specific integrated circuit
CN108132880A (en) * 2017-12-21 2018-06-08 武汉斑马快跑科技有限公司 A kind of parameter verification method and device
CN109726370A (en) * 2018-12-29 2019-05-07 北京中电普华信息技术有限公司 A kind of configurable verification rule packaging method and device
CN110287383A (en) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 A kind of field information method of inspection and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065920A (en) * 2021-04-12 2021-07-02 北京京东振世信息技术有限公司 Data processing method and system
CN113535776A (en) * 2021-05-28 2021-10-22 国网辽宁省电力有限公司 Parameter validity checking method and system applied to monitoring device
CN113268290A (en) * 2021-06-16 2021-08-17 中移(杭州)信息技术有限公司 Software container optimization method, device, equipment and computer program product
CN113609014A (en) * 2021-08-04 2021-11-05 深圳鼎盛电脑科技有限公司 Interface field checking method and device, storage medium and electronic equipment
CN113836126A (en) * 2021-09-22 2021-12-24 上海妙一生物科技有限公司 Data cleaning method, device, equipment and storage medium
CN113836126B (en) * 2021-09-22 2024-01-30 上海妙一生物科技有限公司 Data cleaning method, device, equipment and storage medium
CN114968410A (en) * 2022-06-06 2022-08-30 携程商旅信息服务(上海)有限公司 Data configuration form generation method, system, electronic equipment and storage medium
CN116415199A (en) * 2023-04-13 2023-07-11 广东铭太信息科技有限公司 Business data outlier analysis method based on audit intermediate table
CN116415199B (en) * 2023-04-13 2023-10-20 广东铭太信息科技有限公司 Business data outlier analysis method based on audit intermediate table
CN116719875A (en) * 2023-08-09 2023-09-08 恩核(北京)信息技术有限公司 Data standardization maintenance method, system, equipment and medium
CN116719875B (en) * 2023-08-09 2023-12-26 恩核(北京)信息技术有限公司 Data standardization maintenance method, system, equipment and medium
CN117151864A (en) * 2023-09-13 2023-12-01 中邮消费金融有限公司 Automatic bad loan responsibility identification method and system

Also Published As

Publication number Publication date
CN110287383A (en) 2019-09-27
CN110287383B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
WO2020259147A1 (en) Field information checking method and apparatus
JP6975101B2 (en) Methods, devices and non-temporary computer-readable storage media for transaction execution and validation in the blockchain (transaction execution and validation in the blockchain)
US11070360B2 (en) Parallel transaction validation and block generation in a blockchain
CN109791591B (en) Method and system for identity and credential protection and verification via blockchain
US11151236B2 (en) File verification database system
US11693840B2 (en) Database storing authenticated skill-based attributes
JP2021525931A (en) Efficient verification for blockchain
CN112840617B (en) Method and computing node for managing blockchain resources, computer readable medium
US20190147553A1 (en) Storing linked lists of mineral rights transactions in directed acyclic graphs of cryptographic hash pointers
US11025430B2 (en) File provenance database system
CN107016047A (en) Document query, document storing method and device
US11068462B1 (en) Accelerated system and method for providing data correction
US11139960B2 (en) File redaction database system
WO2020259035A1 (en) Service code generating and executing methods and devices
US11070563B2 (en) Trace-based transaction validation and commitment
WO2020134614A1 (en) Blockchain-based invoice voiding method and apparatus, and electronic device
CN108053545A (en) Certificate verification method and apparatus, server, storage medium
WO2020233402A1 (en) Accounts payable order validation method, apparatus and device, and storage medium
CN110956166A (en) Bill marking method and device
CN111010282A (en) Information processing method based on block chain and related device
WO2021129005A1 (en) Blockchain state change-based transaction tracking method and device
CN112416784A (en) Interface checking method, system and device based on configuration center and storage medium
CN108241705A (en) A kind of data insertion method and device
US11973878B2 (en) Non-fungible token custody chain for multi-component hardware devices
CN110347691B (en) Certificate type verification method, certificate type verification device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20830916

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.04.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20830916

Country of ref document: EP

Kind code of ref document: A1