A data verification method and device, electronic equipment and storage medium
By obtaining the validation type of the data submission request and processing the corresponding data input page and applying validation rules, the problem of uncontrollable data validation between the front-end and back-end was solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AGRICULTURAL BANK OF CHINA
- Filing Date
- 2022-02-25
- Publication Date
- 2026-06-02
Smart Images

Figure CN114564353B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data verification method, apparatus, electronic device and storage medium. Background Technology
[0002] Data verification at both the front-end and back-end is an important part of data processing in the Internet field. It has the advantage of timely detection of data security risks and can help operations and maintenance personnel quickly locate potential risks and carry out timely maintenance.
[0003] Currently, the front-end and back-end perform data validation separately according to business rules and data requirements. However, when actually validating the data, there are often cases where the front-end misses validation or the front-end bypasses the back-end without performing secondary validation. This results in uncontrollable validation behavior and a poor user experience in the existing front-end and back-end data validation. Summary of the Invention
[0004] This invention provides a data verification method, apparatus, electronic device, and storage medium, which can flexibly and controllably verify front-end and back-end data, thereby improving user experience.
[0005] In a first aspect, embodiments of the present invention provide a data verification method, including:
[0006] In response to a data submission request, obtain the data validation type that matches the data submission request. The data validation type includes: front-end validation and / or back-end validation.
[0007] The feedback corresponds to the data input page that matches the data submission request, and the data to be verified is received through the data input page.
[0008] Perform data validation on the data to be validated, matching the data validation type.
[0009] Secondly, embodiments of the present invention also provide a data verification device, comprising:
[0010] The data acquisition module is used to respond to data submission requests and obtain the data verification type that matches the data submission request. The data verification type includes: front-end verification and / or back-end verification.
[0011] The data to be verified receiving module is used to provide feedback on the data input page that matches the data submission request, and to receive the data to be verified through the data input page.
[0012] The data validation module is used to perform data validation on the data to be validated, matching the data validation type.
[0013] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the data verification method provided in any embodiment of the present invention.
[0017] Fourthly, embodiments of the present invention also provide a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the data verification method provided in any embodiment of the present invention.
[0018] The technical solution of this embodiment, in response to a data submission request, obtains a data validation type matching the data submission request, including front-end validation and / or back-end validation, and then provides a data input page matching the data submission request. The data to be validated is received through the data input page, and thus, data validation matching the data validation type is performed on the data to be validated. Since the data validation type matching the data submission request includes front-end validation, back-end validation, or any one of front-end and back-end validation, the selection can be flexibly made according to actual validation needs when performing data validation matching the data to be validated. This solves the problems of uncontrollable front-end and back-end data validation behavior and poor user experience in existing technologies, enabling flexible and controllable validation of front-end and back-end data and improving user experience. Attached Figure Description
[0019] Figure 1 This is a flowchart of a data verification method provided in Embodiment 1 of the present invention;
[0020] Figure 2 This is a flowchart of a data verification method provided in Embodiment 2 of the present invention;
[0021] Figure 3 This is a flowchart of online transaction data processing based on a rule engine, provided in Embodiment 2 of the present invention;
[0022] Figure 4 This is a schematic diagram of a data verification device provided in Embodiment 3 of the present invention;
[0023] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0024] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it.
[0025] It should also be noted that, for ease of description, the accompanying drawings show only the parts relevant to the invention and not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it may also have additional steps not included in the drawings. The process may correspond to a method, function, procedure, subroutine, subprogram, etc.
[0026] Example 1
[0027] Figure 1 This is a flowchart of a data verification method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations requiring flexible verification of both the front-end and back-end. The method can be executed by a data verification device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. This electronic device can be a terminal device, a server device, etc. The present invention does not limit the type of electronic device executing the data verification method. Correspondingly, as... Figure 1 As shown, the method includes the following operations:
[0028] S110. In response to the data submission request, obtain the data validation type that matches the data submission request.
[0029] The data submission request can be a request to obtain the required data. For example, a data submission request may include a request to submit a required page or a request to submit a required database. This embodiment of the invention does not limit the data type of the required data submitted in the data submission request. The data validation type can be a category of data validation operations, used to distinguish different data validation operations. The data validation type can include: front-end validation and / or back-end validation. Front-end validation can be validation on the side directly interacting with the user. Back-end validation can be validation on the side not directly interacting with the user, matching the front-end. For example, front-end validation can include client-side validation, etc. Back-end validation can include server-side validation, etc. It is understood that when front-end validation is client-side validation, back-end validation is server-side validation.
[0030] In this embodiment of the invention, upon receiving a data submission request, a response can be provided to obtain the data verification type matching the data submission request by parsing the request. Optionally, there is a one-to-one correspondence between data submission requests and data verification types. The data verification type matching the data submission request needs to be set according to the verification requirements. For example, the data verification type matching the data submission request can be set to front-end verification, back-end verification, or any one of front-end verification and back-end verification, depending on the verification requirements.
[0031] S120, Feedback and data submission request match the data input page, and receive the data to be verified through the data input page.
[0032] The data input page is an interface for data input, and there is a one-to-one correspondence between data submission requests and data input pages. The data to be validated can be the data entered into the data input page that needs to be validated.
[0033] In this embodiment of the invention, the type of data to be requested can be determined based on the data submission request, and then a data input page matching the data submission request can be determined based on the type of data to be requested. The data input page matching the data submission request can then be displayed so that the user can input data through the data input page and receive the data to be verified through the data input page.
[0034] S130. Perform data validation on the data to be validated, matching the data validation type.
[0035] In this embodiment of the invention, data verification can be performed on the data to be verified according to the data verification type that matches the data submission request and the verification rules that match the data verification type.
[0036] The technical solution of this embodiment, in response to a data submission request, obtains a data validation type matching the data submission request, including front-end validation and / or back-end validation, and then provides a data input page matching the data submission request. The data to be validated is received through the data input page, and thus, data validation matching the data validation type is performed on the data to be validated. Since the data validation type matching the data submission request includes front-end validation, back-end validation, or any one of front-end and back-end validation, the selection can be flexibly made according to actual validation needs when performing data validation matching the data to be validated. This solves the problems of uncontrollable front-end and back-end data validation behavior and poor user experience in existing technologies, enabling flexible and controllable validation of front-end and back-end data and improving user experience.
[0037] Example 2
[0038] Figure 2This is a flowchart of a data verification method provided in Embodiment 2 of the present invention. This embodiment is a specific embodiment based on the above embodiment. In this embodiment, specific optional implementation methods are given for obtaining the data verification type matching the data submission request and performing data verification on the data to be verified in accordance with the data verification type. Specifically, while obtaining the target verification control field matching the target rule verification interface, it may also include: obtaining the target verification rule matching the target rule verification interface; the specific process of performing data verification on the data to be verified in accordance with the data verification type may be: using the target verification rule, performing data verification on the data to be verified in accordance with the data verification type. Correspondingly, as Figure 2 As shown, the method includes the following operations:
[0039] S210. In response to the data submission request, obtain the data verification type that matches the data submission request, and obtain the target verification rule that matches the target rule verification interface.
[0040] The target rule validation interface can be a predefined function or an agreement connecting different components of a software system, used to obtain validation rules that match the data submission request. The target validation rule can be a validation rule that matches the data call request, used to validate the data to be validated. The target validation rule can be stored in the target rule validation interface of the rule engine. The rule engine, evolved from the inference engine, is a component embedded in an application that separates business decisions from application code. It uses predefined semantic templates to write business decisions, accepts data input, interprets business rules, and makes business decisions based on those rules. For example, a rule engine can be created separately outside the backend, with the backend interacting with the rule engine through an interface to implement data validation. Alternatively, the backend can be embedded within the rule engine component, with the backend calling the target rule validation interface provided by the component to implement data validation.
[0041] In this embodiment of the invention, when responding to a data submission request, the data verification type matching the data submission request can be obtained, and the target rule verification interface matching the data submission request can be determined at the same time. Then, the data in the target rule verification interface is parsed to obtain the target verification rule matching the target rule verification interface.
[0042] In an optional embodiment of the present invention, obtaining the data verification type matching the data submission request may include: identifying the data submission type matching the data submission request; obtaining the data submission type and determining the target rule verification interface of the rule engine; obtaining the target verification control field matching the target rule verification interface, wherein the target verification control field may include a front-end verification control field and a back-end verification control field.
[0043] The data submission type can be the data type of the required data to be obtained through a data submission request. The target validation control field can be a field configured in the target rule validation interface to determine the data validation type. The front-end validation control field and the back-end validation control field can be used to indicate the data validation type. The front-end validation control field can be a pre-defined front-end validation control field based on validation requirements; that is, it can be used to determine whether front-end validation should be performed. The back-end validation control field can be a pre-defined back-end validation control field based on validation requirements; that is, it can be used to determine whether back-end validation should be performed.
[0044] In this embodiment of the invention, the data submission type matching the data submission request can be identified by parsing the data submission request. Then, based on the data submission type, the target rule validation interface matching the data submission request in the rule engine can be called. This allows parsing the configuration data of the target rule validation interface to obtain the target validation control field matching the target rule validation interface. In other words, the front-end validation control field and the back-end validation control field can be obtained from the parsing results of the configuration data of the target rule validation interface. After obtaining the front-end validation control field and the back-end validation control field, the data validation type matching the data submission request can be determined based on these fields.
[0045] S220, the data input page that matches the feedback and data submission request, and the data to be verified is received through the data input page.
[0046] S230. Using the target verification rules, perform data verification on the data to be verified, matching the data verification type.
[0047] In this embodiment of the invention, data verification can be performed on the data to be verified on the front end and / or back end according to the data verification type that matches the data submission request and through the target verification rules.
[0048] In an optional embodiment of the present invention, using target verification rules to perform data verification matching the data verification type on the data to be verified may include: when it is determined that the front-end verification control field is a front-end verification enabled field and the back-end verification control field is a back-end verification enabled field, verifying the front-end data to be verified in the data to be verified according to the target verification rules, and verifying the back-end data to be verified in the data to be verified according to the target verification rules.
[0049] The front-end validation enable field can be determined based on the front-end validation control field, representing the field that enables front-end validation. The back-end validation enable field can be determined based on the back-end validation control field, representing the field that enables back-end validation. The front-end data to be validated can be data that needs to be validated on the front end. The back-end data to be validated can be data that needs to be validated on the back end. Optionally, the data content of the front-end data to be validated and the back-end data to be validated can be partially or completely the same.
[0050] In this embodiment of the invention, the target validation control field matching the target rule validation interface can be parsed to determine the front-end validation control field and the back-end validation control field, thereby identifying the content of the front-end validation control field and the back-end validation control field respectively. If the front-end validation control field is a front-end validation enabled field and the back-end validation control field is a back-end validation enabled field, then the front-end data to be validated in the data to be validated is validated according to the target validation rule, and the back-end data to be validated in the data to be validated is also validated according to the target validation rule, so as to achieve the same rule for front-end and back-end validation.
[0051] For example, in online product transaction processes within the banking and other financial industries, it's not only necessary to verify transaction data, but also to add pre-verification on the client side based on the same target verification rules. This serves two purposes: firstly, invalid data requests can be effectively filtered out on the client side; secondly, by comparing the verification results from the front end and back end, malicious transactions can be effectively identified, strengthening financial risk prevention and control. The data verification method in this solution enables dual verification of both the client and server sides based on the same target verification rules.
[0052] In an optional embodiment of the present invention, after verifying the front-end data to be verified in the data to be verified according to the target verification rule, the method may further include: obtaining front-end default verification data and verifying the front-end data to be verified in the data to be verified according to the front-end default verification data; after verifying the back-end data to be verified in the data to be verified according to the target verification rule, the method may further include: obtaining back-end default verification data and verifying the back-end data to be verified in the data to be verified according to the back-end default verification data.
[0053] The front-end default validation data can be pre-set and is used to validate the data to be validated on the front-end; it differs from the target validation rules. Similarly, the back-end default validation data can be pre-set and is used to validate the data to be validated on the back-end; it also differs from the target validation rules. For example, the front-end default validation data can be used to validate the data range, maximum value, and minimum value in the front-end data to be validated. The back-end default validation data can be used to validate the data range, maximum value, and minimum value in the back-end data to be validated.
[0054] In this embodiment of the invention, front-end default verification data and back-end default verification data can be set according to known conventional verification settings for front-end and back-end. Then, after verifying the front-end data to be verified in the data to be verified according to the target verification rules, the front-end data to be verified in the data to be verified is further verified by the front-end default verification data. Thus, after verifying the back-end data to be verified in the data to be verified according to the target verification rules, the back-end data to be verified in the data to be verified is verified by the back-end default verification data.
[0055] In an optional embodiment of the present invention, the target verification rule is used to perform data verification matching the data verification type on the data to be verified. This may include: when it is determined that the front-end verification control field is a front-end verification closed field and the back-end verification control field is a back-end verification enabled field, verifying the front-end data to be verified in the data to be verified according to the front-end default verification data, and verifying the back-end data to be verified in the data to be verified according to the target verification rule.
[0056] Among them, the front-end validation disable field can be determined based on the front-end validation control field, and represents the field that disables front-end validation.
[0057] In this embodiment of the invention, the target validation control field matching the target rule validation interface can be parsed to determine the front-end validation control field and the back-end validation control field, thereby identifying the content of the front-end validation control field and the back-end validation control field respectively. If the front-end validation control field is a front-end validation disabled field and the back-end validation control field is a back-end validation enabled field, then the front-end data to be validated in the data to be validated is validated according to the front-end default validation data, and the back-end data to be validated in the data to be validated is validated according to the target validation rule. By setting the front-end validation control field and the back-end validation control field, it is possible to control whether the front-end and back-end perform validation using the same target validation rule, thereby achieving flexible validation of the front-end and back-end against the target validation rule, that is, it is possible to control the client and server to perform validation separately.
[0058] In an optional embodiment of the present invention, the target verification rule is used to perform data verification matching the data verification type on the data to be verified. This may include: when it is determined that the front-end verification control field is a front-end verification enabled field and the back-end verification control field is a back-end verification disabled field, verifying the front-end data to be verified in the data to be verified according to the target verification rule, and verifying the back-end data to be verified in the data to be verified according to the back-end default verification data.
[0059] Among them, the backend validation disable field can be determined based on the backend validation control field, and represents the field that disables backend validation.
[0060] In this embodiment of the invention, the target validation control field matching the target rule validation interface can be parsed to determine the front-end validation control field and the back-end validation control field, thereby identifying the content of the front-end validation control field and the back-end validation control field respectively. If the front-end validation control field is a front-end validation enabled field and the back-end validation control field is a back-end validation disabled field, then the front-end data to be validated in the data to be validated is validated according to the target validation rule, and the back-end data to be validated in the data to be validated is validated according to the back-end default validation data. By setting the front-end validation control field and the back-end validation control field, it is possible to control whether the front-end and back-end are validated by the same target validation rule, thereby realizing flexible validation of the front-end and back-end against the target validation rule, that is, it is possible to control the client and the server to perform validation separately.
[0061] Figure 3 This is a flowchart of an online transaction data processing method based on a rule engine, as provided in Embodiment 2 of the present invention. Figure 3 As shown, before submitting a page request (data submission request) to the server, the client can pre-configure the server, such as configuring rules (target validation rules), switches (target validation control fields), rule interfaces (target rule validation interfaces), and rule execution. Then, the client sends a page submission request to the server to request the initial transaction interface (data input page). The server submits the requested page to the client, returning the initial transaction interface, which the client then renders. The rule execution configuration can include configuring the execution order of the target validation rules. After receiving the initial transaction interface, the client sends an asynchronous request rule file to the server to asynchronously call the rule file. Upon receiving the asynchronous request rule file, the server processes the rule file in its rule engine to obtain a rule execution file including the target validation rules and target validation control fields. This rule execution file is then sent to the client to enable the client to complete data validation. Specifically, the client obtains the front-end validation control fields according to the rule execution file, parses these fields, and determines whether the client-side data validation switch is enabled. If the client-side data validation switch is enabled (the front-end validation control field is the field where front-end validation is enabled), the client validates the front-end data to be validated according to the general form data rules (target validation rules) in the rule file, and also validates the front-end data to be validated according to the custom form data JS (the front-end default validation data). If the client-side data validation switch is disabled, the client validates the front-end data to be validated according to the custom form data JS. Here, JS validation refers to validation using the JavaScript programming language.
[0062] After the client completes the data validation for the front-end data, it can submit a form request to the server to provide feedback on the validated data. Upon receiving the form request, the server performs data validation according to the rule execution file. Specifically, the server can parse the back-end validation control fields to determine whether server-side data validation is enabled. If server-side data validation is enabled (the back-end validation control field is set to "back-end validation enabled"), the server executes the general form data rules (target validation rules) to validate the front-end data and the custom server-side data (back-end default validation data) to validate the back-end data. If server-side data validation is disabled, the server validates the back-end data according to the custom server-side data. After completing the back-end data validation, the server can perform other server-side processing and send the results back to the client as the target request page.
[0063] In this solution, dual verification can be performed on both the client and server based on the same target verification rules. A verification switch can control whether the server and client perform verification, comparing and checking the consistency of the verification results. The target verification rules are stored in a rule engine implemented in JavaScript, and each rule is also written in JavaScript. Target verification rules are specifically stored in the database of the target rule verification interface. The storage fields of the target verification rules include rule ID, switch flag (target verification control field), rule function, rule priority, and data dependencies. The target verification interface allows both the client and server to call the target verification rules. Client verification (front-end verification) obtains the target verification rules through the rule engine's target rule verification interface and executes them directly to obtain the verification result. Server verification (back-end verification) provides the data to be verified, rule ID, etc., to the rule engine, which then executes the verification rules and returns the verification result. This allows the client to perform rule verification in advance based on the same rule configuration before the server-side verification. While blocking invalid requests, it can also accurately locate malicious data submitted by bypassing client verification. The front-end and back-end verification switch configuration makes it easy for developers and testers to compare the front-end and back-end verification results and control the verification switches of specific transactions. In other words, it can control the rule switches of different granularities such as the overall rule set or specific transactions according to actual needs, which is convenient for comparing the front-end and back-end verification results and customizing the transaction rule configuration.
[0064] Optionally, the rule engine can provide a unified rule writing standard and a unified rule configuration page, allowing users to add, modify, delete, and publish rules. It also allows for rule configuration based on business scenarios and API request fields. The rule engine provides an on / off control function; by modifying the on / off flag of a specified rule in the database, the on / off state of rule validation can be controlled, determining whether the rule is executed. The relevant validation results from the rule engine can also be incorporated into a unified log platform and risk transaction monitoring platform, and abnormal validation results can be pushed to relevant systems.
[0065] The technical solution of this embodiment, in response to a data submission request, obtains the data verification type matching the data submission request and the target verification rule matching the target rule verification interface. It then feeds back a data input page matching the data submission request and receives the data to be verified through the data input page. The target verification rule is then used to perform data verification on the data to be verified, matching the data verification type. Since the data verification type matching the data submission request includes front-end verification, back-end verification, or any one of both, the selection can be flexible according to actual verification needs when performing data verification on the data to be verified. This solves the problems of uncontrollable front-end and back-end data verification behavior and poor user experience in existing technologies, enabling flexible and controllable verification of front-end and back-end data and improving user experience.
[0066] It should be noted that any arrangement or combination of the technical features in the above embodiments also falls within the protection scope of this invention.
[0067] Example 3
[0068] Figure 4 This is a schematic diagram of a data verification device provided in Embodiment 3 of the present invention, as shown below. Figure 4 As shown, the device includes: a data acquisition module 310, a data receiving module 320 to be verified, and a data verification module 330, wherein:
[0069] The data acquisition module 310 is used to respond to a data submission request and acquire a data verification type that matches the data submission request. The data verification type includes: front-end verification and / or back-end verification.
[0070] The data receiving module 320 is used to provide feedback to the data input page that matches the data submission request, and to receive the data to be verified through the data input page.
[0071] The data verification module 330 is used to perform data verification on the data to be verified, matching the data verification type.
[0072] The technical solution of this embodiment, in response to a data submission request, obtains a data validation type matching the data submission request, including front-end validation and / or back-end validation, and then provides a data input page matching the data submission request. The data to be validated is received through the data input page, and thus, data validation matching the data validation type is performed on the data to be validated. Since the data validation type matching the data submission request includes front-end validation, back-end validation, or any one of front-end and back-end validation, the selection can be flexibly made according to actual validation needs when performing data validation matching the data to be validated. This solves the problems of uncontrollable front-end and back-end data validation behavior and poor user experience in existing technologies, enabling flexible and controllable validation of front-end and back-end data and improving user experience.
[0073] Optionally, the data acquisition module 310 is specifically used to identify the data submission type matching the data submission request; acquire the data submission type, determine the target rule verification interface of the rule engine; acquire the target verification control field matching the target rule verification interface, the target verification control field including a front-end verification control field and a back-end verification control field; wherein, the front-end verification control field and the back-end verification control field are used to indicate the data verification type.
[0074] Optionally, the data verification device further includes a target verification rule acquisition module, used to acquire target verification rules that match the target rule verification interface.
[0075] Optionally, the data verification module 330 is specifically used to perform data verification on the data to be verified, matching the data verification type, using the target verification rule.
[0076] Optionally, the data verification module 330 is specifically used to verify the front-end data to be verified in the data to be verified according to the target verification rule, and to verify the back-end data to be verified in the data to be verified according to the target verification rule, when it is determined that the front-end verification control field is a front-end verification enabled field and the back-end verification control field is a back-end verification enabled field.
[0077] Optionally, the data verification device further includes a first default data verification module, used to obtain front-end default verification data and verify the front-end data to be verified in the data to be verified based on the front-end default verification data.
[0078] Optionally, the data verification device further includes a second default data verification module, used to obtain backend default verification data and verify the backend data to be verified in the data to be verified based on the backend default verification data.
[0079] Optionally, the data verification module 330 is specifically used to verify the front-end data to be verified in the data to be verified according to the front-end default verification data, and to verify the back-end data to be verified in the data to be verified according to the target verification rules, when it is determined that the front-end verification control field is a front-end verification disabled field and the back-end verification control field is a back-end verification enabled field.
[0080] Optionally, the data verification module 330 is specifically used to verify the front-end data to be verified in the data to be verified according to the target verification rules, and to verify the back-end data to be verified in the data to be verified according to the back-end default verification data, when it is determined that the front-end verification control field is a front-end verification enabled field and the back-end verification control field is a back-end verification disabled field.
[0081] The data verification device described above can execute the data verification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the data verification method provided in any embodiment of the present invention.
[0082] Since the data verification device described above is an apparatus capable of executing the data verification method in the embodiments of the present invention, those skilled in the art can understand the specific implementation and various variations of the data verification device in this embodiment based on the data verification method described in the embodiments of the present invention. Therefore, how the data verification device implements the data verification method in the embodiments of the present invention will not be described in detail here. Any apparatus used by those skilled in the art to implement the data verification method in the embodiments of the present invention falls within the scope of protection of this application.
[0083] Example 4
[0084] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 5 A block diagram is shown of an electronic device 412 suitable for implementing embodiments of the present invention. Figure 5 The electronic device 412 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0085] like Figure 5 As shown, electronic device 412 is represented in the form of a general-purpose computing device. The components of electronic device 412 may include, but are not limited to: one or more processors 416, storage device 428, and bus 418 connecting different system components (including storage device 428 and processor 416).
[0086] Bus 418 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0087] Electronic device 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 412, including volatile and non-volatile media, removable and non-removable media.
[0088] Storage device 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Electronic device 412 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 434 may be used to read and write non-removable, non-volatile magnetic media (… Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc-read-only memory (CD-ROM), a digital video disc-read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 418 via one or more data media interfaces. Storage device 428 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0089] A program 436 having at least one set of program modules 426 may be stored in, for example, a storage device 428. Such program modules 426 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 426 typically perform the functions and / or methods described in the embodiments of the present invention.
[0090] Electronic device 412 can also communicate with one or more external devices 414 (e.g., keyboard, pointing device, camera, display 424, etc.), and with one or more devices that enable a user to interact with the electronic device 412, and / or with any device that enables the electronic device 412 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 422. Furthermore, electronic device 412 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN)) and / or public networks, such as the Internet) via network adapter 420. As shown, network adapter 420 communicates with other modules of electronic device 412 via bus 418. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with electronic device 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) systems, tape drives, and data backup storage systems.
[0091] The processor 416 executes various functional applications and data processing by running programs stored in the storage device 428, such as implementing the data verification method provided in the above embodiments of the present invention, including: in response to a data submission request, obtaining a data verification type matching the data submission request, the data verification type including: front-end verification and / or back-end verification; providing feedback on a data input page matching the data submission request, and receiving the data to be verified through the data input page; and performing data verification on the data to be verified in accordance with the data verification type.
[0092] The technical solution of this embodiment, in response to a data submission request, obtains a data validation type matching the data submission request, including front-end validation and / or back-end validation, and then provides a data input page matching the data submission request. The data to be validated is received through the data input page, and thus, data validation matching the data validation type is performed on the data to be validated. Since the data validation type matching the data submission request includes front-end validation, back-end validation, or any one of front-end and back-end validation, the selection can be flexibly made according to actual validation needs when performing data validation matching the data to be validated. This solves the problems of uncontrollable front-end and back-end data validation behavior and poor user experience in existing technologies, enabling flexible and controllable validation of front-end and back-end data and improving user experience.
[0093] Example 5
[0094] Embodiment 5 of the present invention also provides a computer storage medium for storing a computer program. When executed by a computer processor, the computer program is used to perform any of the data verification methods described in the above embodiments of the present invention, including: responding to a data submission request, obtaining a data verification type matching the data submission request, the data verification type including: front-end verification and / or back-end verification; providing feedback on a data input page matching the data submission request, and receiving data to be verified through the data input page; and performing data verification on the data to be verified that matches the data verification type.
[0095] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0096] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0097] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, radio frequency (RF), or any suitable combination thereof.
[0098] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0099] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A data verification method, characterized in that, include: In response to a data submission request, obtain the data verification type that matches the data submission request, wherein the data verification type includes: front-end verification and / or back-end verification; The system provides feedback on a data input page that matches the data submission request, and receives the data to be verified through the data input page; wherein, the data input page is the interface for the user to input the data to be verified, and the data input page has a corresponding relationship with the data submission request; For the data to be verified, perform data verification that matches the data verification type; Obtain the data validation type that matches the data submission request, including: Identify the data submission type that matches the data submission request; obtain the data submission type and determine the target rule verification interface of the rule engine; obtain the target verification control field that matches the target rule verification interface, the target verification control field including a front-end verification control field and a back-end verification control field; wherein, the front-end verification control field and the back-end verification control field are used to indicate the data verification type.
2. The method according to claim 1, characterized in that, In addition to obtaining the target verification control field that matches the target rule verification interface, the process also includes: Obtain the target verification rule that matches the target rule verification interface; For the data to be verified, perform data verification matching the data verification type, including: Using the target verification rule, the data to be verified is subjected to data verification that matches the data verification type.
3. The method according to claim 2, characterized in that, The step of performing data verification on the data to be verified, using the target verification rule and matching the data verification type, includes: When it is determined that the front-end verification control field is a front-end verification enabled field and the back-end verification control field is a back-end verification enabled field, the front-end data to be verified in the data to be verified is verified according to the target verification rule, and the back-end data to be verified in the data to be verified is verified according to the target verification rule.
4. The method according to claim 3, characterized in that, After verifying the front-end data to be verified in the data to be verified according to the target verification rule, the method further includes: Obtain the front-end default verification data, and verify the front-end data to be verified in the data to be verified based on the front-end default verification data; After verifying the backend data to be verified in the data to be verified according to the target verification rules, the method further includes: Obtain the backend default verification data, and verify the backend data to be verified in the data to be verified based on the backend default verification data.
5. The method according to claim 2, characterized in that, The step of performing data verification on the data to be verified, using the target verification rule and matching the data verification type, includes: When it is determined that the front-end verification control field is a front-end verification disabled field and the back-end verification control field is a back-end verification enabled field, the front-end data to be verified in the data to be verified is verified according to the front-end default verification data, and the back-end data to be verified in the data to be verified is verified according to the target verification rules.
6. The method according to claim 2, characterized in that, The step of performing data verification on the data to be verified, using the target verification rule and matching the data verification type, includes: When it is determined that the front-end verification control field is a front-end verification enabled field and the back-end verification control field is a back-end verification disabled field, the front-end data to be verified in the data to be verified is verified according to the target verification rule, and the back-end data to be verified in the data to be verified is verified according to the back-end default verification data.
7. A data verification device, characterized in that, include: The data acquisition module is used to respond to a data submission request and acquire a data verification type that matches the data submission request. The data verification type includes: front-end verification and / or back-end verification. The data to be verified receiving module is used to provide feedback on a data input page that matches the data submission request, and to receive the data to be verified through the data input page; wherein, the data input page is an interface for the user to input the data to be verified, and the data input page has a corresponding relationship with the data submission request; The data verification module is used to perform data verification on the data to be verified, matching the data verification type. The data acquisition module is specifically used to identify the data submission type that matches the data submission request; acquire the data submission type, determine the target rule verification interface of the rule engine; acquire the target verification control field that matches the target rule verification interface, the target verification control field including a front-end verification control field and a back-end verification control field; wherein, the front-end verification control field and the back-end verification control field are used to indicate the data verification type.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data verification method as described in any one of claims 1-6.
9. A computer storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the data verification method as described in any one of claims 1-6.