WO2024012195A1 - Unified verification method and apparatus, and device and storage medium - Google Patents

Unified verification method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2024012195A1
WO2024012195A1 PCT/CN2023/102863 CN2023102863W WO2024012195A1 WO 2024012195 A1 WO2024012195 A1 WO 2024012195A1 CN 2023102863 W CN2023102863 W CN 2023102863W WO 2024012195 A1 WO2024012195 A1 WO 2024012195A1
Authority
WO
WIPO (PCT)
Prior art keywords
verification
information
configuration information
field
special
Prior art date
Application number
PCT/CN2023/102863
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 WO2024012195A1 publication Critical patent/WO2024012195A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/226Validation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0234Rebates after completed purchase

Definitions

  • This application relates to a unified verification method, device, equipment and storage medium.
  • a unified verification method, device, equipment and storage medium are provided.
  • the first aspect is to provide a unified verification method, including:
  • a unified verification device including:
  • the acquisition module is used to obtain the system business information and field information of the currently accessed business system
  • Configuration module used to obtain corresponding verification configuration information based on system business information and field information
  • the verification module is used to verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
  • a computer device including a memory and one or more processors.
  • Computer readable instructions are stored in the memory. When the computer readable instructions are executed by the processor, the computer readable instructions cause the one to or multiple processors perform the following steps:
  • the field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
  • a fourth aspect provides one or more non-volatile storage media storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause one or more processors to perform the following steps:
  • the field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
  • Figure 1 is a system architecture diagram of a unified verification method according to one or more embodiments.
  • Figure 2 is a schematic flowchart of a unified verification method according to one or more embodiments.
  • Figure 3 is a schematic flowchart of step 203 in the unified verification method according to one or more embodiments.
  • Figure 4 is a block diagram of a unified verification device according to one or more embodiments.
  • Figure 5 is a block diagram of a computer device in accordance with one or more embodiments.
  • the unified verification method provided by one embodiment of this application can be applied to the system architecture as shown in Figure 1.
  • the system includes: access device 102-unified verification platform 104.
  • the access device 102 here can be multiple business systems. Each business system corresponds to a different supplier. Each business system needs to be connected to the unified verification platform 104 to complete unified verification of the services of each system; and each business The system is connected to the unified verification platform 104 in sequence. The unified verification platform 104 performs unified verification on the currently accessed business system. After the verification is completed, the next accessed business system is verified, and so on. This enables unified verification of each business system.
  • FIG. 2 is a flow chart of a unified verification method provided by one embodiment of the present application. This method can be executed by the unified verification platform 104 in the system shown in FIG. 1 . As shown in Figure 2, the method may include the following steps:
  • Step 201 Obtain system business information and field information of the currently accessed business system.
  • the unified verification platform obtains the system business information and field information of the currently accessed business system through the Java reflection mechanism.
  • the Java reflection mechanism means that in the running state of the program, you can construct objects of any class, you can understand the class to which any object belongs, you can understand the member variables and methods of any class, and you can adjust Use the properties and methods of any object.
  • This function of dynamically obtaining program information and dynamically calling objects is called the reflection mechanism of the Java language, and this reflection is regarded as the key to dynamic languages.
  • Step 203 Obtain corresponding verification configuration information based on system business information and field information.
  • Verification configuration information refers to the configuration information for verifying the field information contained in the current business system, which is the specific content information of the verification.
  • the unified verification platform searches for the verification configuration information corresponding to the business system according to the system business information and field information to obtain the verification configuration information.
  • Step 205 Verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
  • the unified verification platform verifies the field information in the currently accessed business system based on the corresponding verification configuration information. After the verification is completed, regardless of whether the verification passes or not, The verification result information needs to be returned to the currently connected business system so that the business system can proceed with the next step.
  • one of the embodiments of the present application first obtains the system business information and field information of the currently accessed business system; secondly, obtains the corresponding verification configuration information according to the system business information and field information; finally, obtains the corresponding verification configuration information according to the corresponding verification Verify the field information by verifying the configuration information, and return the verification result information to the currently accessed business system.
  • the data verification of the order circulation link of each business system can be unified and integrated to ensure the correctness and accuracy of the fee orders generated by the rebate system and the unity of multi-channel data, and it can improve the efficiency of order generation and quickly respond to needs. Effect.
  • the unified verification platform Before the unified verification platform obtains the system business information and field information of the currently accessed business system, Some preparatory operations still need to be done. Since the unified verification platform will provide unified verification services for multiple systems and multiple services, taking specific services as the main line and supporting multi-system access, it can perform common logic verification and verification of the special logic of individual systems based on the configuration information of each business system. , therefore, you need to configure the page of the unified verification platform first.
  • each business system needs to agree on a verification data model with the unified verification platform.
  • Both parties define the data structure and combine the field information of each business system with the unified verification platform.
  • One-to-one correspondence with the common data model of the test platform That is, the system business information, field information and verification logic of each business system are configured correspondingly with the universal data model of the unified verification platform, and a verification configuration corresponding to the system business information, field information and verification logic of each business system is obtained. information.
  • a universal data model defines and encapsulates the underlying data of sensors and their observations in a self-describing, semantically activated manner. More precisely, a common data model is used to define the representation, nature, structure, and encoding of data associated with sensors and their observations. The main purpose of this model is to realize sensor network interoperability, first at the syntax level, and later at the semantic level, so that sensors and their observation data can be better understood by machines and can be automatically processed in complex workflows. , can also be easily shared among smart sensor network nodes.
  • the Common Data Model defines the underlying data model that allows users and/or servers to organize, encode, and transmit sensor data sets in a self-describing and semantically activated manner.
  • each verification configuration information is stored and synchronized to the remote dictionary server using a relational database management system.
  • the remote dictionary server also needs to be synchronized to ensure the consistency of the corresponding verification configuration information.
  • the relational database management system can be Mysql (Structured Query Language).
  • Mysql stores data in different tables instead of placing all data in a large warehouse, which increases the computer's operating speed and improves flexibility.
  • the SQL language used by MySQL is the most commonly used standardized language for accessing databases. Therefore, MySQL is generally chosen as the website database for the development of small, medium and large websites.
  • the remote dictionary server can be Redis (Remote Dictionary Server), and Redis can be used as database, cache and message middleware. It is a non-relational database based on high-performance Key-Value and provides APIs in multiple languages. However, unlike traditional databases, redis data is stored in memory, so the storage and writing speed is very fast.
  • the unified verification platform can realize unified verification of each business system in the later stage based on the corresponding verification configuration information completed by each business system configuration and use mysql as the underlying data storage and redis as the application cache, which has the ability to improve reading Speed effect.
  • step 203 that is, "obtaining corresponding verification configuration information based on system business information and field information" is described in detail.
  • System business information includes system name and business name, field information includes field names and field values; corresponding verification configuration information includes corresponding special verification configuration information and corresponding default verification configuration information.
  • Step 301 Obtain the corresponding special verification configuration information according to the system name, business name and field name; if the corresponding special verification configuration information is obtained, perform step 303, that is, verify the field information according to the corresponding special verification configuration information; if If the corresponding special verification configuration information is not obtained, step 305 is executed, that is, the corresponding default verification configuration information is obtained according to the business name and field name.
  • the field information includes field names and field values.
  • the unified verification platform first obtains the corresponding special verification configuration information based on the system name, business name, and field name of the currently accessed business system, that is, to confirm whether the currently accessed business system has special verification requirements. If the corresponding special verification configuration information is obtained, it means that the currently accessed business system has special verification requirements, and the field information is verified based on the corresponding special verification configuration information. If the corresponding special verification configuration information is not obtained, it means that the currently accessed business system does not have special verification requirements, and then the corresponding default verification configuration information is obtained based on the business name and field name.
  • step 307 if the corresponding default verification configuration information is obtained, step 307 is performed, that is, the field information is verified according to the corresponding default verification configuration information; if the corresponding default verification configuration information is not obtained, step 309 is performed. , that is, the field information contained in the currently accessed business system does not need to be verified.
  • the field information is verified according to the corresponding default verification configuration information. That is, the field information contained in the business system still needs to be verified, but the corresponding default verification configuration is used. Information is uniformly verified. If the corresponding default verification configuration information is not obtained, the field information contained in the currently accessed business system does not need to be verified.
  • the above acquisition sequence is adopted because some suppliers have special requirements, so the corresponding special verification configuration information needs to be obtained first according to the business system; when it is confirmed that the supplier represented by the business system does not When there are special requirements, the corresponding default verification configuration information will be obtained; if the corresponding default verification configuration information is If the information cannot be obtained, it means that the field information contained in the currently accessed business system does not need to be verified. That is, through the above-mentioned progressive acquisition method, a comprehensive verification of each business system is achieved.
  • the above step 303 that is, "if the corresponding special verification configuration information is obtained, verify the field information according to the corresponding special verification configuration information" is described in detail.
  • the corresponding special verification configuration information includes the corresponding special basic verification configuration information and the corresponding special other verification configuration information; the verification includes the special basic verification and special other verifications, and the special basic verification includes the length, format and legality of the field information Verification, etc.; special other verification logic includes the correctness of the business system interface and multi-field information correlation verification, etc.
  • Special annotation information includes special annotation label information and special annotation attribute information.
  • the unified verification platform After obtaining the corresponding special basic verification configuration information, the unified verification platform adds annotations to the field information according to the corresponding special basic verification configuration information to obtain special annotation annotation information; it assigns annotations to the field information according to the corresponding special basic verification configuration information. Attributes get special annotation attribute information.
  • Dynamically add annotations to field information according to the corresponding special basic verification configuration information to obtain special annotation annotation information For example, @NotBlank and @NotNull both indicate non-empty, but the specific limited range is different. @Pattern indicates the content of the specific special verification logic that needs to be used for this field information. For example, the ten-digit number must start with two 0s, followed by 8 It cannot contain Chinese characters and the length of the field value must be 9 digits, etc. Of course, you can also customize special annotation information for field information. Assign annotation attributes to the field information according to the corresponding special basic verification configuration information to obtain special annotation attribute information. For example, message and regexp are error messages. When the verification fails, the error message will be returned to the connected business system.
  • Javaassist Java programming Assistant, Java Assist
  • Javassist is an open source library for analyzing, editing and creating Java bytecode. Its main advantage is that it is simple and fast. It can directly use java coding to dynamically change the structure of the class or dynamically generate the class.
  • the purpose of using Javaassist technology is mainly to explain what kind of basic verification needs to be done on the current field information and what kind of logic should be used to perform basic verification.
  • Hibernate Validator is an open source framework provided by Hibernate. It is very convenient to use annotations to implement server-side data verification. In daily development, Hibernate Validator is often used to validate fields based on annotations, which is convenient, fast and efficient. This is also the role of adding special annotation information. Only after adding special annotation information, Hibernate Validator will recognize the field information to verify the field information.
  • the unified verification platform when the unified verification platform obtains the corresponding special verification configuration information, it does not need to add special annotation information to the field information, and directly performs special verification on the field information based on the corresponding special verification configuration information.
  • the corresponding special verification configuration information includes the corresponding special basic verification configuration information and the corresponding special other verification configuration information
  • the verification includes special basic verification and special other verification; but the general basic verification is required. needs to be done, and other verifications can be determined according to specific needs.
  • the above step 307 that is, "if the corresponding default verification configuration information is obtained, verify the field information according to the corresponding default verification configuration information" is described in detail.
  • the corresponding default verification configuration information includes the corresponding default basic verification configuration information and the corresponding default other verification configuration information; the verification includes the default basic verification and default other verifications.
  • the operation after obtaining the corresponding default basic verification configuration information is the same as the above-mentioned operation after obtaining the corresponding special basic verification configuration information, except that the specific verification configuration information is different, and will not be repeated here.
  • the operation after obtaining the corresponding default other verification configuration information is the same as above to obtain the corresponding special other verification configuration information.
  • the operations after verifying the configuration information are the same, only the specific verification configuration information is different, and will not be repeated here.
  • the above step 205 that is, "verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system" is described in detail.
  • the verification is special basic verification or default basic verification; when the verification fails, the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently accessed business system; when the verification If the verification passes, the automatically generated basic verification passing information of the corresponding field information will be returned to the currently accessed business system.
  • the verification is special other verification or default other verification; when the verification fails, the automatically generated other verification exception information of the corresponding field information will be returned to the currently accessed business system; when the verification passes, then Return other automatically generated verification information of the corresponding field information to the currently accessed business system.
  • Hibernate Validator technology is used to perform special basic verification or default basic verification on field information, including: field required, field length, field format, field legality, etc.; for example, date field format / must be used, the legality of the date field cannot exceed the range, etc.
  • the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently connected business system; the annotation attribute information is the above message information; when the verification passes, the The automatically generated basic verification of the corresponding field information is returned to the currently accessed business system through information, so that the business system can perform the next operation based on the returned information.
  • the verification when the verification is a special other verification or a default other verification; when the verification fails, the automatically generated other verification exception information of the corresponding field information is returned to the current access business system; when the verification passes, other automatically generated verification passing information of the corresponding field information will be returned to the currently accessed business system. Since other verifications do not require annotation information, the returned information is the verification result information automatically generated by the unified verification platform.
  • steps in the flowcharts of FIGS. 2 and 3 are shown in sequence as indicated by arrows, these steps are not necessarily executed in the order indicated by arrows. Unless explicitly stated in the application, the execution order of these steps is not strictly limited, and these steps can be executed in other orders. Moreover, at least some of the steps in Figures 2 and 3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stage The order of execution is not necessarily sequential, but may be performed in turn or alternately with other steps or sub-steps of other steps or at least part of the stages.
  • Figure 4 is a schematic structural diagram of a unified verification device provided by one embodiment of the present application.
  • the device can be installed on the unified verification platform in the system shown in Figure 1 to perform the methods shown in Figures 2-3 process.
  • the device may include: an acquisition module 401, a configuration module 403 and a verification module 405.
  • the main functions of each component module are as follows:
  • the acquisition module 401 is used to obtain the system business information and field information of the currently accessed business system;
  • Configuration module 403 used to obtain corresponding verification configuration information based on system business information and field information.
  • the annotation module 405 is used to verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
  • the device is also used to:
  • system service information includes system name and service name
  • field information includes field names and field values
  • corresponding verification configuration information includes corresponding special verification configuration information and corresponding default verification configuration information
  • configuration module 403 is also used to :
  • the field information is verified according to the corresponding special verification configuration information
  • the corresponding default verification configuration information is obtained based on the business name and field name
  • the field information is verified according to the corresponding default verification configuration information.
  • the corresponding special verification configuration information includes corresponding special basic verification configuration information and corresponding Special other verification configuration information; verification includes special basic verification and special other verification.
  • Configuration module 403 is also used for:
  • the corresponding default verification configuration information includes the corresponding default basic verification configuration information and the corresponding default other verification configuration information; the verification includes the default basic verification and default other verifications, and the configuration module 403 is also used to:
  • the corresponding default basic verification configuration information If the corresponding default basic verification configuration information is obtained, add annotations and attributes to the field information according to the corresponding default basic verification configuration information to obtain the default annotation information; then perform default basic verification on the field information based on the default annotation information; and
  • the verification module 405 is also used to:
  • the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently connected business system;
  • the automatically generated basic verification passing information of the corresponding field information is returned to the currently accessed business system.
  • the verification module 405 is also used to:
  • the verification logic is configurable and supports special verification logic for special channels.
  • the two modes of general configuration + special configuration can be used to verify basic logic such as required fields, length, format, legality, etc., and can also be used with other configuration tables. Verify other verification logic.
  • one of the embodiments of this application may involve the use of user data.
  • it can be done in compliance with the applicable laws and regulations of the country (for example, the user explicitly agrees, and the user is effectively notified).
  • the user's explicit authorization, etc. the user's specific personal data will be used in the scenarios described in this article to the extent permitted by applicable laws and regulations.
  • a computer device and one or more non-volatile storage media storing computer-readable instructions are also provided.
  • Computer equipment is intended to mean any form of digital computer or mobile device.
  • Digital computers may include desktop computers, portable computers, workstations, personal digital assistants, servers, mainframe computers, and other suitable computers.
  • Mobile devices may include tablets, smartphones, wearable devices, etc.
  • the device 500 includes a computing unit 501, a ROM 502, a RAM 503, a bus 504, and an input/output (I/O) interface 505.
  • the computing unit 501, the ROM 502, and the RAM 503 are connected to each other through the bus 504.
  • Input/output (I/O) interface Y05 is also connected to bus 504.
  • the computing unit 501 can execute the application method according to computer instructions stored in the read-only memory (ROM) 502 or loaded from the storage unit 508 into the random access memory (RAM) 503. Various treatments in the method embodiment.
  • Computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities.
  • the computing unit 501 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors ( DSP), and any appropriate processor, controller, microcontroller, etc.
  • the methods provided by the embodiments of the present application can be implemented as computer software readable instructions, which are tangibly included in a non-volatile storage medium, such as the storage unit 508.
  • RAM 503 may also store various readable instructions and data required for operation of device 500. Some or all of the computer readable instructions may be loaded and/or installed onto device 500 via ROM 502 and/or communication unit 509.
  • the input unit 506, the output unit 507, the storage unit 508 and the communication unit 509 in the device 500 may be connected to the I/O interface 505.
  • the input unit 506 may be a keyboard, a mouse, a touch screen, a microphone, etc.; the output unit 507 may be a display, a speaker, an indicator light, etc.
  • the device 500 can exchange information, data, etc. with other devices through the communication unit 509.
  • the device may also include other components necessary for proper operation. It is also possible to include only the components necessary to implement the solution of the present application, and not necessarily include all the components shown in the figure.
  • Various implementations of the systems and techniques described herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software and/or a combination thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system
  • CPLD load programmable logic device
  • computer hardware firmware, software and/or a combination thereof.
  • Computer instructions for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 501, so that when executed by the computing unit 501, such as a processor, the computer instructions cause the steps involved in the method embodiments of the present application to be executed.
  • Non-volatile storage medium provided by this application may be a tangible medium, which may contain or store computer instructions to execute the steps involved in the method embodiments of this application.
  • Non-volatile storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic and other forms of storage media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Game Theory and Decision Science (AREA)
  • Artificial Intelligence (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A unified verification method, comprising: acquiring system service information and field information of a currently accessed service system; acquiring corresponding verification configuration information according to the system service information and the field information; and verifying the field information according to the corresponding verification configuration information, and returning verification result information to the currently accessed service system.

Description

统一校验方法、装置、设备和存储介质Unified verification methods, devices, equipment and storage media
相关申请的交叉引用Cross-references to related applications
本申请要求于2022年7月14日提交中国专利局,申请号为202210831529.2,申请名称为“统一校验方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application submitted to the China Patent Office on July 14, 2022, with the application number 202210831529.2 and the application title "Unified Verification Method, Device, Equipment and Storage Medium", the entire content of which is incorporated by reference. in this application.
技术领域Technical field
本申请涉及一种统一校验方法、装置、设备和存储介质。This application relates to a unified verification method, device, equipment and storage medium.
背景技术Background technique
目前,企业在根据核心业务进行返利费用生单的过程中,涉及到返利费用订单的订单创建、订单修改、订单确认、订单冲销、订单删除、订单批量导入、页面单条处理、页面批量处理以及对第三方接口赋能等,各个环节的操作均需要先进行校验。由于每个企业都可能会对接多个供应商,各供应商可能来自于不同的渠道,各渠道的业务数据内容又会存在差异,因此,在传统的实现方式中,校验平台需要对各渠道的业务数据进行单独校验。Currently, the company's process of generating rebate fee orders based on its core business involves order creation, order modification, order confirmation, order reversal, order deletion, order batch import, single page processing, page batch processing and processing of rebate fee orders. Third-party interface empowerment, etc., the operations of each link need to be verified first. Since each enterprise may connect with multiple suppliers, each supplier may come from different channels, and the business data content of each channel will be different. Therefore, in the traditional implementation method, the verification platform needs to Business data is independently verified.
然而,发明人意识到,采用上述对各渠道的业务数据进行单独校验的方式,当校验逻辑发生变更时,便需要跟随版本的迭代而上线,而版本在进行多次迭代后则会出现各渠道间校验逻辑不一致的现象,并且多渠道多校验标准的模式,可能会导致不同渠道订单处理结果不一致,出现虽然批量导入订单确认成功,但页面却确认失败等的异常情况以及相同的校验逻辑会发生冗余。由于在校验逻辑发生变更后无法做到及时的响应,因此,导致不能快速响应业务需求的现象发生。However, the inventor realized that using the above-mentioned method of separately verifying the business data of each channel, when the verification logic changes, it is necessary to follow the iteration of the version and go online, and the version will appear after multiple iterations. Inconsistency in verification logic between channels, and the multi-channel and multi-verification standard model may lead to inconsistent order processing results across different channels. Although batch import order confirmation is successful, the page confirmation fails and other abnormal situations occur, as well as the same The verification logic will be redundant. Since a timely response cannot be achieved after the verification logic is changed, the failure to respond quickly to business needs occurs.
发明内容Contents of the invention
根据本申请公开的各种实施例,提供一种统一校验方法、装置、设备和存储介质。 According to various embodiments disclosed in this application, a unified verification method, device, equipment and storage medium are provided.
第一方面,提供一种统一校验方法,包括:The first aspect is to provide a unified verification method, including:
获取当前接入的业务系统的系统业务信息和字段信息;Obtain the system business information and field information of the currently accessed business system;
根据系统业务信息和字段信息获取对应校验配置信息;及Obtain corresponding verification configuration information based on system business information and field information; and
根据对应校验配置信息对字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。Verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
第二方面,提供了一种统一校验装置,包括:In the second aspect, a unified verification device is provided, including:
获取模块,用于获取当前接入的业务系统的系统业务信息和字段信息;The acquisition module is used to obtain the system business information and field information of the currently accessed business system;
配置模块,用于根据系统业务信息和字段信息获取对应校验配置信息;及Configuration module, used to obtain corresponding verification configuration information based on system business information and field information; and
校验模块,用于根据对应校验配置信息对字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。The verification module is used to verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
第三方面,提供了一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:In a third aspect, a computer device is provided, including a memory and one or more processors. Computer readable instructions are stored in the memory. When the computer readable instructions are executed by the processor, the computer readable instructions cause the one to or multiple processors perform the following steps:
获取当前接入的业务系统的系统业务信息和字段信息;Obtain the system business information and field information of the currently accessed business system;
根据所述系统业务信息和所述字段信息获取对应校验配置信息;及Obtain corresponding verification configuration information according to the system business information and the field information; and
根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。The field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
第四方面,提供了一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:A fourth aspect provides one or more non-volatile storage media storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause one or more processors to perform the following steps:
获取当前接入的业务系统的系统业务信息和字段信息;Obtain the system business information and field information of the currently accessed business system;
根据所述系统业务信息和所述字段信息获取对应校验配置信息;及Obtain corresponding verification configuration information according to the system business information and the field information; and
根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。The field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features and advantages of the application will be apparent from the description, drawings, and claims.
附图说明 Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. Those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting creative efforts.
图1为根据一个或多个实施例中统一校验方法的系统架构图。Figure 1 is a system architecture diagram of a unified verification method according to one or more embodiments.
图2为根据一个或多个实施例中统一校验方法的流程示意图。Figure 2 is a schematic flowchart of a unified verification method according to one or more embodiments.
图3为根据一个或多个实施例中统一校验方法中步骤203的流程示意图。Figure 3 is a schematic flowchart of step 203 in the unified verification method according to one or more embodiments.
图4为根据一个或多个实施例中统一校验装置的框图。Figure 4 is a block diagram of a unified verification device according to one or more embodiments.
图5为根据一个或多个实施例中计算机设备的框图。Figure 5 is a block diagram of a computer device in accordance with one or more embodiments.
具体实施方式Detailed ways
以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
为了方便理解,首先对本申请所适用的系统进行描述。本申请其中一个实施例提供的统一校验方法,可以应用于如图1所示的系统架构中。该系统包括:接入设备102-统一校验平台104。To facilitate understanding, the system to which this application is applicable is first described. The unified verification method provided by one embodiment of this application can be applied to the system architecture as shown in Figure 1. The system includes: access device 102-unified verification platform 104.
这里的接入设备102可以为多个业务系统,每个业务系统对应不同的供应商,各业务系统均需要接入到统一校验平台104以完成对各系统业务的统一校验;且各业务系统是依次接入到统一校验平台104,统一校验平台104对当前接入的业务系统进行统一校验,校验完成后再对下个接入的业务系统进行校验,以此类推,进而实现对各业务系统的统一校验。The access device 102 here can be multiple business systems. Each business system corresponds to a different supplier. Each business system needs to be connected to the unified verification platform 104 to complete unified verification of the services of each system; and each business The system is connected to the unified verification platform 104 in sequence. The unified verification platform 104 performs unified verification on the currently accessed business system. After the verification is completed, the next accessed business system is verified, and so on. This enables unified verification of each business system.
图2为本申请其中一个实施例提供的统一检验方法的流程图,该方法可以由如图1所示系统中的统一校验平台104执行。如图2所示,该方法可以包括以下步骤:FIG. 2 is a flow chart of a unified verification method provided by one embodiment of the present application. This method can be executed by the unified verification platform 104 in the system shown in FIG. 1 . As shown in Figure 2, the method may include the following steps:
步骤201:获取当前接入的业务系统的系统业务信息和字段信息。Step 201: Obtain system business information and field information of the currently accessed business system.
具体地,统一校验平台通过Java反射机制获取当前接入的业务系统的系统业务信息和字段信息。Java反射机制是指在程序的运行状态中,可以构造任意一个类的对象,可以了解任意一个对象所属的类,可以了解任意一个类的成员变量和方法,且可以调 用任意一个对象的属性和方法。这种动态获取程序信息以及动态调用对象的功能称为Java语言的反射机制,该反射被视为动态语言的关键。Specifically, the unified verification platform obtains the system business information and field information of the currently accessed business system through the Java reflection mechanism. The Java reflection mechanism means that in the running state of the program, you can construct objects of any class, you can understand the class to which any object belongs, you can understand the member variables and methods of any class, and you can adjust Use the properties and methods of any object. This function of dynamically obtaining program information and dynamically calling objects is called the reflection mechanism of the Java language, and this reflection is regarded as the key to dynamic languages.
这里需要说明的是,由于业务系统有很多,需要逐个接入到统一校验平台进行校验,所以,统一检验平台在进行校验操作时,需要获取到当前接入到统一校验平台的业务系统的相关信息。What needs to be explained here is that since there are many business systems, they need to be connected to the unified verification platform one by one for verification. Therefore, when the unified verification platform performs verification operations, it needs to obtain the services currently connected to the unified verification platform. System-related information.
步骤203:根据系统业务信息和字段信息获取对应校验配置信息。Step 203: Obtain corresponding verification configuration information based on system business information and field information.
校验配置信息是指对当前业务系统中包含的字段信息进行校验的配置信息,即为校验的具体内容信息。Verification configuration information refers to the configuration information for verifying the field information contained in the current business system, which is the specific content information of the verification.
具体地,统一检验平台根据系统业务信息和字段信息查找对应于该业务系统的校验配置信息以获取该校验配置信息。Specifically, the unified verification platform searches for the verification configuration information corresponding to the business system according to the system business information and field information to obtain the verification configuration information.
步骤205:根据对应校验配置信息对字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。Step 205: Verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
这里,在获取到对应校验配置信息后,统一校验平台根据该对应校验配置信息对当前接入的业务系统中的字段信息进行校验,在校验完成之后,不论校验是否通过,均需将校验结果信息返回至当前接入的业务系统,以便于业务系统进行下一步的操作。Here, after obtaining the corresponding verification configuration information, the unified verification platform verifies the field information in the currently accessed business system based on the corresponding verification configuration information. After the verification is completed, regardless of whether the verification passes or not, The verification result information needs to be returned to the currently connected business system so that the business system can proceed with the next step.
可以看出,本申请其中一个实施例,首先,通过获取当前接入的业务系统的系统业务信息和字段信息;其次,根据系统业务信息和字段信息获取对应校验配置信息;最后,根据对应校验配置信息对字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。通过上述配置化设置,实现统一整合各业务系统订单流转环节的数据校验,保障返利系统生成费用订单的正确性、准确性以及多渠道数据的统一性,且具有提高生单效率,快速响应需求的效果。It can be seen that one of the embodiments of the present application first obtains the system business information and field information of the currently accessed business system; secondly, obtains the corresponding verification configuration information according to the system business information and field information; finally, obtains the corresponding verification configuration information according to the corresponding verification Verify the field information by verifying the configuration information, and return the verification result information to the currently accessed business system. Through the above configuration settings, the data verification of the order circulation link of each business system can be unified and integrated to ensure the correctness and accuracy of the fee orders generated by the rebate system and the unity of multi-channel data, and it can improve the efficiency of order generation and quickly respond to needs. Effect.
在一些实施例中,获取当前接入的业务系统的系统业务信息和字段信息之前,包括:In some embodiments, before obtaining the system service information and field information of the currently accessed service system, the following steps are included:
将各业务系统的系统业务信息、字段信息以及校验逻辑与统一校验平台的通用数据模型进行对应配置,得到与各业务系统相对应的对应校验配置信息,并将各对应校验配置信息同步至远程字典服务器。Configure the system business information, field information and verification logic of each business system correspondingly with the universal data model of the unified verification platform to obtain the corresponding verification configuration information corresponding to each business system, and combine each corresponding verification configuration information Synchronize to remote dictionary server.
这里,统一校验平台在获取当前接入的业务系统的系统业务信息和字段信息之前, 还需要做一些前置操作。由于统一校验平台将为多系统多业务提供统一校验服务,以具体业务为主线,支持多系统接入,根据各业务系统的配置信息可以进行公共逻辑校验以及个别系统特殊逻辑的校验,因此,需要先对统一校验平台进行页面的配置。Here, before the unified verification platform obtains the system business information and field information of the currently accessed business system, Some preparatory operations still need to be done. Since the unified verification platform will provide unified verification services for multiple systems and multiple services, taking specific services as the main line and supporting multi-system access, it can perform common logic verification and verification of the special logic of individual systems based on the configuration information of each business system. , therefore, you need to configure the page of the unified verification platform first.
具体地,由于各业务系统的校验逻辑基本都不一样,因此,各业务系统需要和统一校验平台约定校验的数据模型,双方定义好数据结构,将各业务系统的字段信息与统一校验平台的通用数据模型进行一一对应。即将各业务系统的系统业务信息、字段信息以及校验逻辑与统一校验平台的通用数据模型进行对应配置,得到与各业务系统的系统业务信息、字段信息以及校验逻辑相对应的校验配置信息。Specifically, since the verification logic of each business system is basically different, each business system needs to agree on a verification data model with the unified verification platform. Both parties define the data structure and combine the field information of each business system with the unified verification platform. One-to-one correspondence with the common data model of the test platform. That is, the system business information, field information and verification logic of each business system are configured correspondingly with the universal data model of the unified verification platform, and a verification configuration corresponding to the system business information, field information and verification logic of each business system is obtained. information.
通用数据模型是用一种以自我描述、语义激活的方式来定义和封装传感器及其观测的底层数据。更准确地说,通用数据模型用来定义传感器及其观测相关数据的表达、本质、结构和编码。该模型的主要目的是实现传感网互操作,首先可以在语法层面上,之后在语义层面上,使得传感器及其观测数据可以更好地被机器理解,在复杂的工作流程中可以被自动处理,在智能传感器网络节点之间也可以被轻松分享。通用数据模型定义了底层数据模型,其允许用户和/或服务器用一种自我描述和语义激活的方式组织、编码和传输传感器数据集。A universal data model defines and encapsulates the underlying data of sensors and their observations in a self-describing, semantically activated manner. More precisely, a common data model is used to define the representation, nature, structure, and encoding of data associated with sensors and their observations. The main purpose of this model is to realize sensor network interoperability, first at the syntax level, and later at the semantic level, so that sensors and their observation data can be better understood by machines and can be automatically processed in complex workflows. , can also be easily shared among smart sensor network nodes. The Common Data Model defines the underlying data model that allows users and/or servers to organize, encode, and transmit sensor data sets in a self-describing and semantically activated manner.
这里,统一校验平台在得到对应校验配置信息后,为了实现对应校验配置信息的持久化,将各校验配置信息使用关系型数据库管理系统存储同步至远程字典服务器中。这样,当订单页面发生变化,进行增加、修改、删除校验配置信息时,也需要对远程字典服务器进行同步操作,以保障对应校验配置信息的一致性。Here, after the unified verification platform obtains the corresponding verification configuration information, in order to achieve the persistence of the corresponding verification configuration information, each verification configuration information is stored and synchronized to the remote dictionary server using a relational database management system. In this way, when the order page changes and the verification configuration information is added, modified, or deleted, the remote dictionary server also needs to be synchronized to ensure the consistency of the corresponding verification configuration information.
关系型数据库管理系统可以是Mysql(Structured Query Language),Mysql将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了计算机的运行速度并提高了灵活性,且MySQL所使用的SQL语言是用于访问数据库的最常用标准化语言,因此,一般中小型和大型网站的开发都选择MySQL作为网站数据库。The relational database management system can be Mysql (Structured Query Language). Mysql stores data in different tables instead of placing all data in a large warehouse, which increases the computer's operating speed and improves flexibility. And the SQL language used by MySQL is the most commonly used standardized language for accessing databases. Therefore, MySQL is generally chosen as the website database for the development of small, medium and large websites.
远程字典服务器可以是Redis(Remote Dictionary Server),Redis可以用作数据库、缓存和消息中间件。它是基于高性能的Key-Value、并提供多种语言的API的非关系型数据库。不过与传统数据库不同的是redis的数据是存在内存中的,所以存写速度非常快。 The remote dictionary server can be Redis (Remote Dictionary Server), and Redis can be used as database, cache and message middleware. It is a non-relational database based on high-performance Key-Value and provides APIs in multiple languages. However, unlike traditional databases, redis data is stored in memory, so the storage and writing speed is very fast.
通过上述操作,统一校验平台可根据与各业务系统配置完成的对应校验配置信息,实现后期对各业务系统的统一校验且使用mysql作为底层数据存储,redis作为应用缓存,具有提高读取速度的效果。Through the above operations, the unified verification platform can realize unified verification of each business system in the later stage based on the corresponding verification configuration information completed by each business system configuration and use mysql as the underlying data storage and redis as the application cache, which has the ability to improve reading Speed effect.
在一些实施例中,参照图3,对上述步骤203即“根据系统业务信息和字段信息获取对应校验配置信息”进行详细描述。In some embodiments, with reference to Figure 3, the above step 203, that is, "obtaining corresponding verification configuration information based on system business information and field information", is described in detail.
系统业务信息包括系统名和业务名,字段信息包括字段名和字段值;对应校验配置信息包括对应特殊校验配置信息和对应默认校验配置信息。System business information includes system name and business name, field information includes field names and field values; corresponding verification configuration information includes corresponding special verification configuration information and corresponding default verification configuration information.
步骤301,根据系统名、业务名以及字段名获取对应特殊校验配置信息;若获取到对应特殊校验配置信息,执行步骤303,即根据对应特殊校验配置信息对字段信息进行校验;若未获取到对应特殊校验配置信息,执行步骤305,即根据业务名和字段名获取对应默认校验配置信息。Step 301: Obtain the corresponding special verification configuration information according to the system name, business name and field name; if the corresponding special verification configuration information is obtained, perform step 303, that is, verify the field information according to the corresponding special verification configuration information; if If the corresponding special verification configuration information is not obtained, step 305 is executed, that is, the corresponding default verification configuration information is obtained according to the business name and field name.
这里,由于系统业务信息包括系统名和业务名,字段信息包括字段名和字段值。统一校验平台优先根据当前接入的业务系统的系统名、业务名以及字段名获取对应特殊校验配置信息,即确认当前接入的业务系统是否有特殊的校验要求。若获取到对应特殊校验配置信息,说明当前接入的业务系统有特殊的校验要求,则根据对应特殊校验配置信息对字段信息进行校验。若未获取到对应特殊校验配置信息,说明当前接入的业务系统无特殊的校验要求,则再根据业务名和字段名获取对应默认校验配置信息。Here, since the system business information includes system name and business name, the field information includes field names and field values. The unified verification platform first obtains the corresponding special verification configuration information based on the system name, business name, and field name of the currently accessed business system, that is, to confirm whether the currently accessed business system has special verification requirements. If the corresponding special verification configuration information is obtained, it means that the currently accessed business system has special verification requirements, and the field information is verified based on the corresponding special verification configuration information. If the corresponding special verification configuration information is not obtained, it means that the currently accessed business system does not have special verification requirements, and then the corresponding default verification configuration information is obtained based on the business name and field name.
在步骤305之后,若获取到对应默认校验配置信息,则执行步骤307,即根据对应默认校验配置信息对字段信息进行校验;若未获取到对应默认校验配置信息,则执行步骤309,即当前接入的业务系统包含的字段信息无需进行校验。After step 305, if the corresponding default verification configuration information is obtained, step 307 is performed, that is, the field information is verified according to the corresponding default verification configuration information; if the corresponding default verification configuration information is not obtained, step 309 is performed. , that is, the field information contained in the currently accessed business system does not need to be verified.
具体地,若获取到对应默认校验配置信息,则根据对应默认校验配置信息对字段信息进行校验,即该业务系统包含的字段信息仍然是需要校验的,只是采用对应默认校验配置信息进行统一校验。若未获取到对应默认校验配置信息,则当前接入的业务系统包含的字段信息无需进行校验。Specifically, if the corresponding default verification configuration information is obtained, the field information is verified according to the corresponding default verification configuration information. That is, the field information contained in the business system still needs to be verified, but the corresponding default verification configuration is used. Information is uniformly verified. If the corresponding default verification configuration information is not obtained, the field information contained in the currently accessed business system does not need to be verified.
需要说明的是,之所以采用上述获取顺序,是因为有的供应商会有特殊的要求,因此需要先根据该业务系统来获取对应特殊校验配置信息;当确认该业务系统所代表的供应商没有特殊要求时,则再获取对应默认校验配置信息;若对应默认校验配置信 息也获取不到,则说明当前接入的业务系统包含的字段信息无需进行校验。即通过上述层层递进的获取方式,实现对各业务系统的全面校验。It should be noted that the above acquisition sequence is adopted because some suppliers have special requirements, so the corresponding special verification configuration information needs to be obtained first according to the business system; when it is confirmed that the supplier represented by the business system does not When there are special requirements, the corresponding default verification configuration information will be obtained; if the corresponding default verification configuration information is If the information cannot be obtained, it means that the field information contained in the currently accessed business system does not need to be verified. That is, through the above-mentioned progressive acquisition method, a comprehensive verification of each business system is achieved.
在一些实施例中,对上述步骤303即“若获取到对应特殊校验配置信息,则根据对应特殊校验配置信息对字段信息进行校验”进行详细描述。In some embodiments, the above step 303, that is, "if the corresponding special verification configuration information is obtained, verify the field information according to the corresponding special verification configuration information" is described in detail.
对应特殊校验配置信息包括对应特殊基础校验配置信息和对应特殊其它校验配置信息;校验包括特殊基础校验和特殊其它校验,特殊基础校验包括字段信息的长度、格式以及合法性的校验等;特殊其它校验逻辑包括业务系统接口的正确性以及多字段信息关联校验等。The corresponding special verification configuration information includes the corresponding special basic verification configuration information and the corresponding special other verification configuration information; the verification includes the special basic verification and special other verifications, and the special basic verification includes the length, format and legality of the field information Verification, etc.; special other verification logic includes the correctness of the business system interface and multi-field information correlation verification, etc.
在一种可实现的方式中,若获取到对应特殊基础校验配置信息,则根据对应特殊基础校验配置信息为字段信息添加标注和属性得到特殊注解信息;再根据特殊注解信息对字段信息进行特殊基础校验。In an implementable way, if the corresponding special basic verification configuration information is obtained, annotations and attributes are added to the field information according to the corresponding special basic verification configuration information to obtain special annotation information; and then the field information is processed based on the special annotation information. Special basic check.
特殊注解信息包括特殊注解标注信息和特殊注解属性信息。Special annotation information includes special annotation label information and special annotation attribute information.
这里,统一校验平台在获取到对应特殊基础校验配置信息后,根据对应特殊基础校验配置信息为字段信息添加标注得到特殊注解标注信息;根据对应特殊基础校验配置信息为字段信息赋值注解属性得到特殊注解属性信息。Here, after obtaining the corresponding special basic verification configuration information, the unified verification platform adds annotations to the field information according to the corresponding special basic verification configuration information to obtain special annotation annotation information; it assigns annotations to the field information according to the corresponding special basic verification configuration information. Attributes get special annotation attribute information.
根据对应特殊基础校验配置信息为字段信息动态添加标注得到特殊注解标注信息。例如,@NotBlank和@NotNull均表示非空,但是具体限定的范围不同,@Pattern表示该字段信息需要采用的具体特殊校验逻辑的内容,比如十位数字必须开头是两个0,后面的8为不能含中文以及字段值的长度必须是9位数等。当然,这里也可以为字段信息自定义特殊注解标注信息。根据对应特殊基础校验配置信息为字段信息赋值注解属性得到特殊注解属性信息。例如,如message和regexp即为报错信息,在校验不通过时,会将该报错信息返回至接入的业务系统。Dynamically add annotations to field information according to the corresponding special basic verification configuration information to obtain special annotation annotation information. For example, @NotBlank and @NotNull both indicate non-empty, but the specific limited range is different. @Pattern indicates the content of the specific special verification logic that needs to be used for this field information. For example, the ten-digit number must start with two 0s, followed by 8 It cannot contain Chinese characters and the length of the field value must be 9 digits, etc. Of course, you can also customize special annotation information for field information. Assign annotation attributes to the field information according to the corresponding special basic verification configuration information to obtain special annotation attribute information. For example, message and regexp are error messages. When the verification fails, the error message will be returned to the connected business system.
具体地,通过Javaassist(Java programming Assistant,Java辅助)技术为字段信息动态添加注解。Javassist是一个开源的分析、编辑和创建Java字节码的类库。其主要的优点在于简单且快速,可以直接使用java编码的形式,就能动态改变类的结构,或者动态生成类。采用Javaassist技术主要是为了说明需要对当前的字段信息做怎样的基础校验以及采用何种逻辑来进行基础校验等。 Specifically, annotations are dynamically added to field information through Javaassist (Java programming Assistant, Java Assist) technology. Javassist is an open source library for analyzing, editing and creating Java bytecode. Its main advantage is that it is simple and fast. It can directly use java coding to dynamically change the structure of the class or dynamically generate the class. The purpose of using Javaassist technology is mainly to explain what kind of basic verification needs to be done on the current field information and what kind of logic should be used to perform basic verification.
统一校验平台根据特殊注解信息采用Hibernate Validator方式对当前业务系统中包含的字段信息进行基础校验。Hibernate Validator是Hibernate提供的一个开源框架,使用注解方式非常方便的实现服务端的数据校验。在日常开发中,Hibernate Validator经常用来基于注解验证字段,方便快捷高效。这也是添加特殊注解信息的作用所在,只有在添加了特殊注解信息后,Hibernate Validator才会识别该字段信息以对该字段信息进行校验。The unified verification platform uses the Hibernate Validator method to perform basic verification on the field information contained in the current business system based on special annotation information. Hibernate Validator is an open source framework provided by Hibernate. It is very convenient to use annotations to implement server-side data verification. In daily development, Hibernate Validator is often used to validate fields based on annotations, which is convenient, fast and efficient. This is also the role of adding special annotation information. Only after adding special annotation information, Hibernate Validator will recognize the field information to verify the field information.
在另一种可实现的方式中,若获取到对应特殊其它校验配置信息,则根据对应特殊其它校验配置信息对字段信息进行特殊其它校验。In another implementable manner, if the corresponding special verification configuration information is obtained, special verification is performed on the field information according to the corresponding special verification configuration information.
这里,统一校验平台在获取到对应特殊其它校验配置信息时,无需进行为字段信息添加特殊注解信息的操作,直接根据对应特殊其它校验配置信息对字段信息进行特殊其它校验。Here, when the unified verification platform obtains the corresponding special verification configuration information, it does not need to add special annotation information to the field information, and directly performs special verification on the field information based on the corresponding special verification configuration information.
需要说明的是,虽然对应特殊校验配置信息包括对应特殊基础校验配置信息和对应特殊其它校验配置信息,且校验包括特殊基础校验和特殊其它校验;但一般基础校验是必须要做的,而其它校验可根据具体需求而定。It should be noted that although the corresponding special verification configuration information includes the corresponding special basic verification configuration information and the corresponding special other verification configuration information, and the verification includes special basic verification and special other verification; but the general basic verification is required. needs to be done, and other verifications can be determined according to specific needs.
在一些实施例中,对上述步骤307即“若获取到对应默认校验配置信息,则根据对应默认校验配置信息对字段信息进行校验”进行详细描述。In some embodiments, the above step 307, that is, "if the corresponding default verification configuration information is obtained, verify the field information according to the corresponding default verification configuration information" is described in detail.
对应默认校验配置信息包括对应默认基础校验配置信息和对应默认其它校验配置信息;校验包括默认基础校验和默认其它校验。The corresponding default verification configuration information includes the corresponding default basic verification configuration information and the corresponding default other verification configuration information; the verification includes the default basic verification and default other verifications.
在一种可实现的方式中,若获取到对应默认基础校验配置信息,则根据对应默认基础校验配置信息为字段信息添加标注和属性得到默认注解信息;再根据默认注解信息对字段信息进行默认基础校验。In an implementable way, if the corresponding default basic verification configuration information is obtained, annotations and attributes are added to the field information according to the corresponding default basic verification configuration information to obtain the default annotation information; and then the field information is processed based on the default annotation information. Default basic verification.
这里,在获取到对应默认基础校验配置信息后的操作与上述获取到对应特殊基础校验配置信息后的操作相同,仅仅是依据的具体校验配置信息不同,此处不再重复赘述。Here, the operation after obtaining the corresponding default basic verification configuration information is the same as the above-mentioned operation after obtaining the corresponding special basic verification configuration information, except that the specific verification configuration information is different, and will not be repeated here.
在另一种可实现的方式中,若获取到对应默认其它校验配置信息时,则根据对应默认其它校验配置信息对字段信息进行默认其它校验。In another implementable manner, if the corresponding default other verification configuration information is obtained, default other verification is performed on the field information according to the corresponding default other verification configuration information.
这里,在获取到对应默认其它校验配置信息后的操作与上述获取到对应特殊其它 校验配置信息后的操作相同,仅仅是依据的具体校验配置信息不同,此处不再重复赘述。Here, the operation after obtaining the corresponding default other verification configuration information is the same as above to obtain the corresponding special other verification configuration information. The operations after verifying the configuration information are the same, only the specific verification configuration information is different, and will not be repeated here.
在一些实施例中,对上述步骤205即“根据对应校验配置信息对字段信息进行校验,并将校验结果信息返回至当前接入的业务系统”进行详细描述。In some embodiments, the above step 205, that is, "verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system" is described in detail.
在校验为特殊基础校验或默认基础校验时;当校验不通过,则将对应字段信息的特殊注解信息或默认注解信息中的注解属性信息返回至当前接入的业务系统;当校验通过,则将自动生成的对应字段信息的基础校验通过信息返回至当前接入的业务系统。在校验为特殊其它校验或默认其它校验时;当校验不通过,则将自动生成的对应字段信息的其它校验异常信息返回至当前接入的业务系统;当校验通过,则将自动生成的对应字段信息的其它校验通过信息返回至当前接入的业务系统。When the verification is special basic verification or default basic verification; when the verification fails, the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently accessed business system; when the verification If the verification passes, the automatically generated basic verification passing information of the corresponding field information will be returned to the currently accessed business system. When the verification is special other verification or default other verification; when the verification fails, the automatically generated other verification exception information of the corresponding field information will be returned to the currently accessed business system; when the verification passes, then Return other automatically generated verification information of the corresponding field information to the currently accessed business system.
在一种可实现的方式中,采用Hibernate Validator技术对字段信息进行特殊基础校验或默认基础校验时,包括:字段必填、字段长度、字段格式以及字段合法性等;例如,日期字段格式必须用/,日期字段合法性不能超范围等。当校验不通过,则将对应字段信息的特殊注解信息或默认注解信息中的注解属性信息返回至当前接入的业务系统;注解属性信息即为上述的message信息;当校验通过,则将自动生成的对应字段信息的基础校验通过信息返回至当前接入的业务系统,以便于该业务系统根据返回的信息进行下一步的操作。In an achievable way, Hibernate Validator technology is used to perform special basic verification or default basic verification on field information, including: field required, field length, field format, field legality, etc.; for example, date field format / must be used, the legality of the date field cannot exceed the range, etc. When the verification fails, the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently connected business system; the annotation attribute information is the above message information; when the verification passes, the The automatically generated basic verification of the corresponding field information is returned to the currently accessed business system through information, so that the business system can perform the next operation based on the returned information.
在另一种可实现的方式中,在校验为特殊其它校验或默认其它校验时;当校验不通过,则将自动生成的对应字段信息的其它校验异常信息返回至当前接入的业务系统;当校验通过,则将自动生成的对应字段信息的其它校验通过信息返回至当前接入的业务系统。由于其它校验是不需要注解信息的,因此,其返回信息均为统一校验平台自动生成的校验结果信息。In another implementable way, when the verification is a special other verification or a default other verification; when the verification fails, the automatically generated other verification exception information of the corresponding field information is returned to the current access business system; when the verification passes, other automatically generated verification passing information of the corresponding field information will be returned to the currently accessed business system. Since other verifications do not require annotation information, the returned information is the verification result information automatically generated by the unified verification platform.
应该理解的是,虽然图2-图3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本申请中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-图3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段 的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although various steps in the flowcharts of FIGS. 2 and 3 are shown in sequence as indicated by arrows, these steps are not necessarily executed in the order indicated by arrows. Unless explicitly stated in the application, the execution order of these steps is not strictly limited, and these steps can be executed in other orders. Moreover, at least some of the steps in Figures 2 and 3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stage The order of execution is not necessarily sequential, but may be performed in turn or alternately with other steps or sub-steps of other steps or at least part of the stages.
图4为本申请其中一个实施例提供的统一校验装置的结构示意图,该装置可以设置于图1所示系统中的统一校验平台,用以执行如图2-图3中所示的方法流程。如图4所示,该装置可以包括:获取模块401、配置模块403以及校验模块405。各组成模块的主要功能如下:Figure 4 is a schematic structural diagram of a unified verification device provided by one embodiment of the present application. The device can be installed on the unified verification platform in the system shown in Figure 1 to perform the methods shown in Figures 2-3 process. As shown in Figure 4, the device may include: an acquisition module 401, a configuration module 403 and a verification module 405. The main functions of each component module are as follows:
获取模块401,用于获取当前接入的业务系统的系统业务信息和字段信息;The acquisition module 401 is used to obtain the system business information and field information of the currently accessed business system;
配置模块403,用于根据系统业务信息和字段信息获取对应校验配置信息;及Configuration module 403, used to obtain corresponding verification configuration information based on system business information and field information; and
注解模块405,用于根据对应校验配置信息对字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。The annotation module 405 is used to verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
在一些实施例中,该装置还用于:In some embodiments, the device is also used to:
将各业务系统的系统业务信息、字段信息以及校验逻辑与统一校验平台的通用数据模型进行对应配置,得到与各业务系统相对应的对应校验配置信息,并将各对应校验配置信息同步至远程字典服务器。Configure the system business information, field information and verification logic of each business system correspondingly with the universal data model of the unified verification platform to obtain the corresponding verification configuration information corresponding to each business system, and combine each corresponding verification configuration information Synchronize to remote dictionary server.
在一些实施例中,系统业务信息包括系统名和业务名,字段信息包括字段名和字段值;对应校验配置信息包括对应特殊校验配置信息和对应默认校验配置信息;配置模块403,还用于:In some embodiments, the system service information includes system name and service name, and the field information includes field names and field values; the corresponding verification configuration information includes corresponding special verification configuration information and corresponding default verification configuration information; the configuration module 403 is also used to :
根据系统名、业务名以及字段名获取对应特殊校验配置信息;Obtain the corresponding special verification configuration information based on the system name, business name and field name;
若获取到对应特殊校验配置信息,则根据对应特殊校验配置信息对字段信息进行校验;If the corresponding special verification configuration information is obtained, the field information is verified according to the corresponding special verification configuration information;
若未获取到对应特殊校验配置信息,则再根据业务名和字段名获取对应默认校验配置信息;If the corresponding special verification configuration information is not obtained, the corresponding default verification configuration information is obtained based on the business name and field name;
若获取到对应默认校验配置信息,则根据对应默认校验配置信息对字段信息进行校验;及If the corresponding default verification configuration information is obtained, the field information is verified according to the corresponding default verification configuration information; and
若未获取到对应默认校验配置信息,则当前接入的业务系统包含的字段信息无需进行校验。If the corresponding default verification configuration information is not obtained, the field information contained in the currently accessed business system does not need to be verified.
在一些实施例中,对应特殊校验配置信息包括对应特殊基础校验配置信息和对应 特殊其它校验配置信息;校验包括特殊基础校验和特殊其它校验,配置模块403,还用于:In some embodiments, the corresponding special verification configuration information includes corresponding special basic verification configuration information and corresponding Special other verification configuration information; verification includes special basic verification and special other verification. Configuration module 403 is also used for:
若获取到对应特殊基础校验配置信息,则根据对应特殊基础校验配置信息为字段信息添加标注和属性得到特殊注解信息;再根据特殊注解信息对字段信息进行特殊基础校验;及If the corresponding special basic verification configuration information is obtained, add annotations and attributes to the field information according to the corresponding special basic verification configuration information to obtain special annotation information; then perform special basic verification on the field information based on the special annotation information; and
若获取到对应特殊其它校验配置信息,则根据对应特殊其它校验配置信息对字段信息进行特殊其它校验。If the corresponding special verification configuration information is obtained, special verification is performed on the field information according to the corresponding special verification configuration information.
在一些实施例中,对应默认校验配置信息包括对应默认基础校验配置信息和对应默认其它校验配置信息;校验包括默认基础校验和默认其它校验,配置模块403,还用于:In some embodiments, the corresponding default verification configuration information includes the corresponding default basic verification configuration information and the corresponding default other verification configuration information; the verification includes the default basic verification and default other verifications, and the configuration module 403 is also used to:
若获取到对应默认基础校验配置信息,则根据对应默认基础校验配置信息为字段信息添加标注和属性得到默认注解信息;再根据默认注解信息对字段信息进行默认基础校验;及If the corresponding default basic verification configuration information is obtained, add annotations and attributes to the field information according to the corresponding default basic verification configuration information to obtain the default annotation information; then perform default basic verification on the field information based on the default annotation information; and
若获取到对应默认其它校验配置信息时,则根据对应默认其它校验配置信息对字段信息进行默认其它校验。If the corresponding default other verification configuration information is obtained, default other verification is performed on the field information according to the corresponding default other verification configuration information.
在一些实施例中,校验模块405,还用于:In some embodiments, the verification module 405 is also used to:
在校验为特殊基础校验或默认基础校验时;When the verification is special basic verification or default basic verification;
当校验不通过,则将对应字段信息的特殊注解信息或默认注解信息中的注解属性信息返回至当前接入的业务系统;及When the verification fails, the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently connected business system; and
当校验通过,则将自动生成的对应字段信息的基础校验通过信息返回至当前接入的业务系统。When the verification passes, the automatically generated basic verification passing information of the corresponding field information is returned to the currently accessed business system.
在一些实施例中,校验模块405,还用于:In some embodiments, the verification module 405 is also used to:
在校验为特殊其它校验或默认其它校验时;When the verification is special other verification or default other verification;
当校验不通过,则将自动生成的对应字段信息的其它校验异常信息返回至当前接入的业务系统;及When the verification fails, other automatically generated verification exception information corresponding to the field information will be returned to the currently accessed business system; and
当校验通过,则将自动生成的对应字段信息的其它校验通过信息返回至当前接入的业务系统。 When the verification passes, other automatically generated verification passing information of the corresponding field information is returned to the currently accessed business system.
根据本申请提供的具体实施例,本申请所提供的技术方案可以具备以下优点:According to the specific embodiments provided by this application, the technical solution provided by this application can have the following advantages:
1)提高需求响应速度,减少开发时间和投入成本,通过配置化统一校验平台可以在无需改动代码的前提下满足大多数校验逻辑的新增与变更,极大的缩减了开发时间和测试时间,大幅提升研发效率。1) Improve demand response speed, reduce development time and investment costs. Through the configured unified verification platform, most additions and changes of verification logic can be satisfied without changing the code, greatly reducing development time and testing. time, greatly improving R&D efficiency.
2)实现多渠道统一校验逻辑,将各业务系统订单校验标准化。无论是哪个渠道进行订单的操作都能保证最终的处理结果一致,保障了出单结果的正确性。2) Implement unified verification logic across multiple channels and standardize order verification for each business system. No matter which channel is used to operate the order, the final processing result can be guaranteed to be consistent, ensuring the accuracy of the order result.
3)校验逻辑配置化,同时支持特殊渠道特殊校验逻辑,使用通用配置+特殊配置两种模式可校验字段必填、长度、格式、合法性等等基础逻辑,亦可配合其他配置表校验其它校验逻辑。3) The verification logic is configurable and supports special verification logic for special channels. The two modes of general configuration + special configuration can be used to verify basic logic such as required fields, length, format, legality, etc., and can also be used with other configuration tables. Verify other verification logic.
可以理解的是,实施本申请的任一方法或产品并不一定需要同时达到以上的所有优点。It can be understood that implementing any method or product of the present application does not necessarily require achieving all the above advantages simultaneously.
上述各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The same and similar parts among the above embodiments can be referred to each other, and each embodiment focuses on its differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.
需要说明的是,本申请其中一个实施例中可能会涉及到对用户数据的使用,在实际应用中,可以在符合所在国的适用法律法规要求的情况下(例如用户明确同意,对用户切实通知,用户明确授权等),在适用法律法规允许的范围内在本文描述的方案中使用用户特定的个人数据。It should be noted that one of the embodiments of this application may involve the use of user data. In actual applications, it can be done in compliance with the applicable laws and regulations of the country (for example, the user explicitly agrees, and the user is effectively notified). , the user's explicit authorization, etc.), the user's specific personal data will be used in the scenarios described in this article to the extent permitted by applicable laws and regulations.
根据本申请的其中一个实施例,还提供了一种计算机设备、一个或多个存储有计算机可读指令的非易失性存储介质。According to one embodiment of the present application, a computer device and one or more non-volatile storage media storing computer-readable instructions are also provided.
如图5所示,是根据本申请其中一个实施例的计算机设备的框图。计算机设备旨在表示各种形式的数字计算机或移动装置。数字计算机可以包括台式计算机、便携式计算机、工作台、个人数字助理、服务器、大型计算机和其它适合的计算机。移动装置可以包括平板电脑、智能电话、可穿戴式设备等。As shown in Figure 5, it is a block diagram of a computer device according to one embodiment of the present application. Computer equipment is intended to mean any form of digital computer or mobile device. Digital computers may include desktop computers, portable computers, workstations, personal digital assistants, servers, mainframe computers, and other suitable computers. Mobile devices may include tablets, smartphones, wearable devices, etc.
如图5所示,设备500包括计算单元501、ROM 502、RAM 503、总线504以及输入/输出(I/O)接口505,计算单元501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口Y05也连接至总线504。As shown in Figure 5, the device 500 includes a computing unit 501, a ROM 502, a RAM 503, a bus 504, and an input/output (I/O) interface 505. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through the bus 504. Input/output (I/O) interface Y05 is also connected to bus 504.
计算单元501可以根据存储在只读存储器(ROM)502中的计算机指令或者从存储单元508加载到随机访问存储器(RAM)503中的计算机指令,来执行本申请方 法实施例中的各种处理。计算单元501可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元501可以包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。在一些实施例中,本申请实施例提供的方法可被实现为计算机软件可读指令,其被有形地包含于非易失性存储介质,例如存储单元508。The computing unit 501 can execute the application method according to computer instructions stored in the read-only memory (ROM) 502 or loaded from the storage unit 508 into the random access memory (RAM) 503. Various treatments in the method embodiment. Computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. The computing unit 501 may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors ( DSP), and any appropriate processor, controller, microcontroller, etc. In some embodiments, the methods provided by the embodiments of the present application can be implemented as computer software readable instructions, which are tangibly included in a non-volatile storage medium, such as the storage unit 508.
RAM 503还可存储设备500操作所需的各种可读指令和数据。计算机可读指令的部分或者全部可以经由ROM 502和/或通信单元509而被载入和/或安装到设备500上。RAM 503 may also store various readable instructions and data required for operation of device 500. Some or all of the computer readable instructions may be loaded and/or installed onto device 500 via ROM 502 and/or communication unit 509.
设备500中的输入单元506、输出单元507、存储单元508和通信单元509可以连接至I/O接口505。输入单元506可以是诸如键盘、鼠标、触摸屏、麦克风等;输出单元507可以是诸如显示器、扬声器、指示灯等。设备500能够通过通信单元509与其他设备进行信息、数据等的交换。The input unit 506, the output unit 507, the storage unit 508 and the communication unit 509 in the device 500 may be connected to the I/O interface 505. The input unit 506 may be a keyboard, a mouse, a touch screen, a microphone, etc.; the output unit 507 may be a display, a speaker, an indicator light, etc. The device 500 can exchange information, data, etc. with other devices through the communication unit 509.
需要说明的是,该设备还可以包括实现正常运行所必需的其他组件。也可以仅包含实现本申请方案所必需的组件,而不必包含图中所示的全部组件。It should be noted that the device may also include other components necessary for proper operation. It is also possible to include only the components necessary to implement the solution of the present application, and not necessarily include all the components shown in the figure.
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件和/或它们的组合中实现。Various implementations of the systems and techniques described herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software and/or a combination thereof.
用于实施本申请的方法的计算机指令可以采用一个或多个编程语言的任何组合来编写。这些计算机指令可以提供给计算单元501,使得计算机指令当由诸如处理器等计算单元501执行时使执行本申请方法实施例中涉及的各步骤。Computer instructions for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 501, so that when executed by the computing unit 501, such as a processor, the computer instructions cause the steps involved in the method embodiments of the present application to be executed.
本申请提供的非易失性存储介质可以是有形的介质,其可以包含或存储计算机指令,用以执行本申请方法实施例中涉及的各步骤。非易失性存储介质可以包括但不限于电子的、磁性的、光学的、电磁的等形式的存储介质。The non-volatile storage medium provided by this application may be a tangible medium, which may contain or store computer instructions to execute the steps involved in the method embodiments of this application. Non-volatile storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic and other forms of storage media.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。 The above-mentioned specific embodiments do not constitute a limitation on the scope of protection of the present application. It will be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions are possible depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application shall be included in the protection scope of this application.

Claims (10)

  1. 一种统一校验方法,其特征在于,包括:A unified verification method, characterized by including:
    获取当前接入的业务系统的系统业务信息和字段信息;Obtain the system business information and field information of the currently accessed business system;
    根据所述系统业务信息和所述字段信息获取对应校验配置信息;及Obtain corresponding verification configuration information according to the system business information and the field information; and
    根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。The field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
  2. 根据权利要求1所述的方法,其特征在于,所述获取当前接入的业务系统的系统业务信息和字段信息之前,包括:The method according to claim 1, characterized in that before obtaining the system business information and field information of the currently accessed business system, the method includes:
    将各业务系统的系统业务信息、字段信息以及校验逻辑与统一校验平台的通用数据模型进行对应配置,得到与各业务系统相对应的对应校验配置信息,并将所述各对应校验配置信息同步至远程字典服务器。Configure the system business information, field information and verification logic of each business system correspondingly with the universal data model of the unified verification platform to obtain the corresponding verification configuration information corresponding to each business system, and combine the corresponding verification Configuration information is synchronized to the remote dictionary server.
  3. 根据权利要求1所述的方法,其特征在于,所述系统业务信息包括系统名和业务名,所述字段信息包括字段名和字段值;所述对应校验配置信息包括对应特殊校验配置信息和对应默认校验配置信息;所述根据所述系统业务信息和所述字段信息获取对应校验配置信息,包括:The method according to claim 1, characterized in that the system service information includes system name and service name, the field information includes field names and field values; the corresponding verification configuration information includes corresponding special verification configuration information and corresponding Default verification configuration information; obtaining the corresponding verification configuration information based on the system business information and the field information includes:
    根据所述系统名、业务名以及字段名获取对应特殊校验配置信息;Obtain the corresponding special verification configuration information according to the system name, business name and field name;
    若获取到所述对应特殊校验配置信息,则根据所述对应特殊校验配置信息对所述字段信息进行校验;If the corresponding special verification configuration information is obtained, the field information is verified according to the corresponding special verification configuration information;
    若未获取到所述对应特殊校验配置信息,则再根据所述业务名和所述字段名获取对应默认校验配置信息;If the corresponding special verification configuration information is not obtained, then the corresponding default verification configuration information is obtained according to the business name and the field name;
    若获取到所述对应默认校验配置信息,则根据所述对应默认校验配置信息对所述字段信息进行校验;及If the corresponding default verification configuration information is obtained, the field information is verified according to the corresponding default verification configuration information; and
    若未获取到所述对应默认校验配置信息,则当前接入的所述业务系统包含的字段信息无需进行校验。If the corresponding default verification configuration information is not obtained, the field information contained in the currently accessed business system does not need to be verified.
  4. 根据权利要求3所述的方法,其特征在于,所述对应特殊校验配置信息包括对应特殊基础校验配置信息和对应特殊其它校验配置信息;所述校验包括特殊基础校验和特殊其它校验;所述若获取到所述对应特殊校验配置信息,则根据所述对应特殊校验 配置信息对所述字段信息进行校验,包括:The method according to claim 3, characterized in that the corresponding special verification configuration information includes corresponding special basic verification configuration information and corresponding special other verification configuration information; the verification includes special basic verification and special other Verification; if the corresponding special verification configuration information is obtained, then according to the corresponding special verification The configuration information verifies the field information, including:
    若获取到所述对应特殊基础校验配置信息,则根据所述对应特殊基础校验配置信息为所述字段信息添加标注和属性得到特殊注解信息;再根据所述特殊注解信息对所述字段信息进行特殊基础校验;及If the corresponding special basic verification configuration information is obtained, add annotations and attributes to the field information according to the corresponding special basic verification configuration information to obtain special annotation information; and then add the field information according to the special annotation information. Perform special basic checks; and
    若获取到所述对应特殊其它校验配置信息,则根据所述对应特殊其它校验配置信息对所述字段信息进行特殊其它校验。If the corresponding special other verification configuration information is obtained, special other verification is performed on the field information according to the corresponding special other verification configuration information.
  5. 根据权利要求3所述的方法,其特征在于,所述对应默认校验配置信息包括对应默认基础校验配置信息和对应默认其它校验配置信息;所述校验包括默认基础校验和默认其它校验;所述若获取到所述对应默认校验配置信息,则根据所述对应默认校验配置信息对所述字段信息进行校验,包括:The method according to claim 3, characterized in that the corresponding default verification configuration information includes corresponding default basic verification configuration information and corresponding default other verification configuration information; the verification includes default basic verification and default other Verification; if the corresponding default verification configuration information is obtained, the field information is verified according to the corresponding default verification configuration information, including:
    若获取到所述对应默认基础校验配置信息,则根据所述对应默认基础校验配置信息为所述字段信息添加标注和属性得到默认注解信息;再根据所述默认注解信息对所述字段信息进行默认基础校验;及If the corresponding default basic verification configuration information is obtained, add annotations and attributes to the field information according to the corresponding default basic verification configuration information to obtain default annotation information; and then add labels and attributes to the field information according to the default annotation information. Perform default basic verification; and
    若获取到所述对应默认其它校验配置信息时,则根据所述对应默认其它校验配置信息对所述字段信息进行默认其它校验。If the corresponding default other verification configuration information is obtained, default other verification is performed on the field information according to the corresponding default other verification configuration information.
  6. 根据权利要求4-5任意一项所述的方法,其特征在于,所述根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统,包括:The method according to any one of claims 4-5, characterized in that the field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed service. systems, including:
    在所述校验为特殊基础校验或默认基础校验时;When the verification is a special basic verification or a default basic verification;
    当校验不通过,则将对应字段信息的特殊注解信息或默认注解信息中的注解属性信息返回至当前接入的业务系统;及When the verification fails, the special annotation information of the corresponding field information or the annotation attribute information in the default annotation information is returned to the currently connected business system; and
    当校验通过,则将自动生成的对应所述字段信息的基础校验通过信息返回至当前接入的业务系统。When the verification passes, the automatically generated basic verification passing information corresponding to the field information is returned to the currently accessed business system.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统,还包括:The method according to claim 6, wherein the step of verifying the field information according to the corresponding verification configuration information and returning the verification result information to the currently accessed business system further includes:
    在所述校验为特殊其它校验或默认其它校验时;When the verification is a special other verification or a default other verification;
    当校验不通过,则将自动生成的对应所述字段信息的其它校验异常信息返回至当 前接入的业务系统;及When the verification fails, other automatically generated verification exception information corresponding to the field information will be returned to the local Business systems previously connected; and
    当校验通过,则将自动生成的对应所述字段信息的其它校验通过信息返回至当前接入的业务系统。When the verification passes, other automatically generated verification passing information corresponding to the field information is returned to the currently accessed business system.
  8. 一种统一校验装置,其特征在于,包括:A unified verification device, characterized by including:
    获取模块,用于获取当前接入的业务系统的系统业务信息和字段信息;The acquisition module is used to obtain the system business information and field information of the currently accessed business system;
    配置模块,用于根据所述系统业务信息和字段信息获取对应校验配置信息;及A configuration module configured to obtain corresponding verification configuration information based on the system business information and field information; and
    校验模块,用于根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。A verification module, configured to verify the field information according to the corresponding verification configuration information, and return the verification result information to the currently accessed business system.
  9. 一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. Computer-readable instructions are stored in the memory. It is characterized in that when the computer-readable instructions are executed by the processor, the one or more processors Each processor performs the following steps:
    获取当前接入的业务系统的系统业务信息和字段信息;Obtain the system business information and field information of the currently accessed business system;
    根据所述系统业务信息和所述字段信息获取对应校验配置信息;及Obtain corresponding verification configuration information according to the system business information and the field information; and
    根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。The field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
  10. 一个或多个存储有计算机可读指令的非易失性存储介质,其特征在于,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile storage media storing computer-readable instructions, characterized in that, when executed by one or more processors, the computer-readable instructions cause one or more processors to perform the following steps:
    获取当前接入的业务系统的系统业务信息和字段信息;Obtain the system business information and field information of the currently accessed business system;
    根据所述系统业务信息和所述字段信息获取对应校验配置信息;及Obtain corresponding verification configuration information according to the system business information and the field information; and
    根据所述对应校验配置信息对所述字段信息进行校验,并将校验结果信息返回至当前接入的业务系统。 The field information is verified according to the corresponding verification configuration information, and the verification result information is returned to the currently accessed business system.
PCT/CN2023/102863 2022-07-14 2023-06-27 Unified verification method and apparatus, and device and storage medium WO2024012195A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210831529.2A CN115390936A (en) 2022-07-14 2022-07-14 Unified verification method, device, equipment and storage medium
CN202210831529.2 2022-07-14

Publications (1)

Publication Number Publication Date
WO2024012195A1 true WO2024012195A1 (en) 2024-01-18

Family

ID=84117678

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102863 WO2024012195A1 (en) 2022-07-14 2023-06-27 Unified verification method and apparatus, and device and storage medium

Country Status (3)

Country Link
CN (1) CN115390936A (en)
CA (1) CA3203549A1 (en)
WO (1) WO2024012195A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115390936A (en) * 2022-07-14 2022-11-25 苏宁易购集团股份有限公司 Unified verification method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059517A1 (en) * 2006-08-31 2008-03-06 Sap Ag Data verification systems and methods using business objects
CN109474578A (en) * 2018-10-17 2019-03-15 平安健康保险股份有限公司 Message method of calibration, device, computer equipment and storage medium
CN110764942A (en) * 2019-09-17 2020-02-07 平安银行股份有限公司 Multi-type data checking method, device, computer system and readable storage medium
CN111897842A (en) * 2020-01-02 2020-11-06 北京京东尚科信息技术有限公司 Data checking method, device, computer system and medium
CN114139220A (en) * 2021-12-14 2022-03-04 北京中电普华信息技术有限公司 Data verification method and device
CN115390936A (en) * 2022-07-14 2022-11-25 苏宁易购集团股份有限公司 Unified verification method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059517A1 (en) * 2006-08-31 2008-03-06 Sap Ag Data verification systems and methods using business objects
CN109474578A (en) * 2018-10-17 2019-03-15 平安健康保险股份有限公司 Message method of calibration, device, computer equipment and storage medium
CN110764942A (en) * 2019-09-17 2020-02-07 平安银行股份有限公司 Multi-type data checking method, device, computer system and readable storage medium
CN111897842A (en) * 2020-01-02 2020-11-06 北京京东尚科信息技术有限公司 Data checking method, device, computer system and medium
CN114139220A (en) * 2021-12-14 2022-03-04 北京中电普华信息技术有限公司 Data verification method and device
CN115390936A (en) * 2022-07-14 2022-11-25 苏宁易购集团股份有限公司 Unified verification method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115390936A (en) 2022-11-25
CA3203549A1 (en) 2023-10-16

Similar Documents

Publication Publication Date Title
CN109491989B (en) Data processing method and device, electronic equipment and storage medium
KR102229010B1 (en) System and method for modelling data
WO2019179021A1 (en) Method and apparatus for importing excel data into database, and computer device and storage medium
CN111061739B (en) Method and device for warehousing massive medical data, electronic equipment and storage medium
WO2024012195A1 (en) Unified verification method and apparatus, and device and storage medium
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
CN111125064B (en) Method and device for generating database schema definition statement
CN114328574A (en) Data query method and device, electronic equipment and computer-readable storage medium
CN112860730A (en) SQL statement processing method and device, electronic equipment and readable storage medium
CN114722119A (en) Data synchronization method and system
CN113220710B (en) Data query method, device, electronic equipment and storage medium
CN112667598B (en) Data model rapid construction system based on business demand change
CN112765280B (en) Block data storage method and device, computer readable medium and electronic equipment
CN113962597A (en) Data analysis method and device, electronic equipment and storage medium
CN112597171A (en) Table relation visualization method and device, electronic equipment and storage medium
CN116185389A (en) Code generation method and device, electronic equipment and medium
WO2022220982A1 (en) Database query execution on multiple databases
CN109857390B (en) Annotation transmission method of Git warehouse file annotation system
CN113761040A (en) Database and application program bidirectional mapping method, device, medium and program product
US20130238669A1 (en) Using Target Columns in Data Transformation
CN117033249B (en) Test case generation method and device, computer equipment and storage medium
US11467752B2 (en) Data migration system and data migration method
CN115658694A (en) System, method and device for generating database table
CN116975080A (en) Data batch change processing method, device, equipment and storage medium
CN115981657A (en) Code generation method and device, electronic equipment and readable 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: 23838689

Country of ref document: EP

Kind code of ref document: A1