Paging form verification method and device, equipment and medium
By obtaining and verifying the data fields of the paging form, combining third-party verification components and semantic rules, the error problem caused by paging in traditional form verification methods is solved, and the complete verification and accurate results of each page form are achieved, improving the The accuracy of form verification.
Patent Information
- Application Number
- CN202411010011.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-01
AI Technical Summary
Traditional form verification methods When there are too many product items that need to be entered in the form, the front-end page will automatically paginate, resulting in only the form on the current page being checked, and subsequent paging forms cannot be checked, resulting in errors in the form verification results and reduced accuracy. .
By obtaining the data fields of the paging form to be checked, the preset third-party verification component is called for semantic, numerical accuracy and position size verification, identifying the constraint relationship between the data fields, verifying the data in combination with semantic rules, and determining The fields are not passed and the value is assigned to ensure that the form data on each page can be verified and improve the accuracy of the verification.
Complete verification of form data per page is achieved, errors in calibration results are avoided, and the accuracy of form verification is improved. By identifying the association information and position information of the data field, it facilitates accurate positioning of error fields.
Smart Images

Figure CN118886404A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a paging form verification method, device, equipment and medium. Background Art
[0002] Form validation refers to when inputting data into a Web front-end application, the application verifies whether the input data is correct to ensure the validity of the input data. With the development of the Internet, forms are used in various activity scenarios. For example, in the financial field, some insurance activity scenarios require batch selection of insurance products or physical goods participating in the activity and record them in the form of a table, so ensuring the correctness of the recorded data has become an urgent problem to be solved.
[0003] Traditional form validation is implemented through JavaScript and HTML technology.
[0004] However, when there are too many product items to be entered in the form, the front-end page will automatically be paginated to display the product items. If the form is verified at this time, only the form on the current front-end page can be verified, and the subsequent paginated forms cannot be verified, resulting in errors in the form verification results and reducing the accuracy of the form verification. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a paged form verification method, device, equipment and medium, the main purpose of which is to improve the accuracy of form verification.
[0006] In order to solve the above technical problems, the present application embodiment provides a paging form verification method, which adopts the following technical solution:
[0007] Obtain the paged form to be verified, and extract the data fields of the paged form to be verified;
[0008] Obtaining a target field to be verified of the data field;
[0009] Calling a preset third-party verification component, performing semantic verification, numerical precision verification and position size verification on the target field to be verified respectively according to the semantic rules, numerical precision rules and position size rules included in the third-party verification component, and obtaining a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification and a position size verification result corresponding to the position size verification;
[0010] identifying constraint relationships between the data fields;
[0011] According to the constraint relationship, the field that failed the verification in the data verification result is used as the error target field, and the error target field is assigned a value to obtain a target verification result.
[0012] Further, performing semantic verification on the target field to be verified according to the semantic rule to obtain a semantic verification result includes:
[0013] Performing a semantic ambiguity check on the target field to be checked according to the semantic rule to obtain a first semantic check result;
[0014] Performing an aggregate function check on the target field to be checked according to the semantic rule to obtain a second semantic check result;
[0015] The semantic verification result is obtained by combining the first semantic verification result and the second semantic verification result.
[0016] Further, the identifying the constraint relationship between the data fields includes:
[0017] Extracting a header data field from the data field as a first table unit;
[0018] extracting an associated data field associated with the table header data field as a second table unit;
[0019] Acquire the horizontal position and the vertical position of the data field as a third table unit;
[0020] The first table unit, the second table unit and the third table unit are sequentially mapped to a set to obtain the constraint relationship.
[0021] Furthermore, the step of taking the fields that failed the verification in the data verification result as the error target fields according to the constraint relationship includes:
[0022] Determine the page number and row number to which the field that failed the check belongs according to the constraint relationship and the data check result;
[0023] The fields that failed the check are highlighted based on the page number and the number of rows to obtain the error target fields.
[0024] Further, the obtaining of the target field to be verified of the data field includes:
[0025] Receive the verification request sent by the front end;
[0026] Find the specific position of the field to be verified in the data field according to the verification request;
[0027] The target field to be checked is located in the data field according to the specific position.
[0028] Furthermore, before obtaining the paged form to be verified, the method further includes:
[0029] Obtain the form data to be verified, traverse the number of the form data to be verified, and obtain the total number of data entries;
[0030] Configure a splitting mark for the total number of data entries, and paginate the total number of data entries according to the splitting mark to obtain an initial paging form;
[0031] A response event is added to the initial paging form to obtain the paging form to be verified.
[0032] In order to solve the above technical problems, the embodiment of the present application also provides a paging form verification device, which adopts the following technical solution:
[0033] An extraction module is used to obtain a paged form to be verified and extract data fields of the paged form to be verified;
[0034] An acquisition module, used for acquiring a target field to be verified of the data field;
[0035] A first verification module is used to call a preset third-party verification component, and perform semantic verification, numerical precision verification and position size verification on the target field to be verified according to the semantic rules, numerical precision rules and position size rules included in the third-party verification component, respectively, to obtain a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification and a position size verification result corresponding to the position size verification;
[0036] an identification module, used to identify the constraint relationship between the data fields; and
[0037] The second verification module is used to use the fields that failed the verification in the data verification result as error target fields according to the constraint relationship, and perform assignment verification on the error target fields to obtain a target verification result.
[0038] In order to solve the above technical problems, the embodiment of the present application further provides a device, which adopts the following technical solution:
[0039] a memory storing at least one computer program; and
[0040] The processor executes the computer program stored in the memory to implement the paging form verification method described above.
[0041] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable medium, which adopts the following technical solution:
[0042] The computer-readable medium stores at least one computer program, and the at least one computer program is executed by a processor in an electronic device to implement the paginated form verification method described above.
[0043] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0044] In the embodiment of the present application, after obtaining the paginated form to be verified, extracting the data fields of the paginated form to be verified, and obtaining the target fields to be verified of the data fields, the paginated data verification is performed on the target fields respectively according to the semantic rules, numerical precision rules and position size rules included in the called three-party verification component, so that each page of form data can be verified in time to ensure the integrity of the form verification, avoid errors in the results of the form verification, and improve the accuracy of the verification; further, by identifying the constraint relationship between the data fields, the association information and position information of the data fields in the form can be retained, which is convenient for improving the accuracy of the subsequent erroneous field positioning, and by only being able to verify the form of the current front-end page, the subsequent paginated forms cannot be verified, so that the results of the form verification have errors, which further improves the accuracy of the form verification. Therefore, the paginated form verification method, device, equipment and medium proposed in the present application can improve the accuracy of form verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0047] Figure 2 A flowchart of an embodiment of a pagination form verification method according to the present application;
[0048] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S203;
[0049] Figure 4 It is a structural schematic diagram of an embodiment of a paging form verification device according to the present application;
[0050] Figure 5 It is a structural schematic diagram of an embodiment of a device according to the present application. DETAILED DESCRIPTION
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0053] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0054] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0055] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0056] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture E Group Audio Layer III), MP4 (Moving Picture E Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0057] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0058] It should be noted that the paging form verification method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the paging form verification device is generally arranged in the server / terminal device.
[0059] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0060] Continue to refer Figure 2 , shows a flow chart of an embodiment of a paging form verification method according to the present application. The paging form verification method comprises the following steps:
[0061] S201, obtaining a paged form to be verified, and extracting data fields of the paged form to be verified.
[0062] In the embodiment of the present application, the paged form to be verified stores data filled in by the user, including text data, numerical data, form button elements, and a table storing data. For example, in the financial field, the paged form to be verified may be quotation data corresponding to each insurance product filled in by the user.
[0063] In an embodiment of the present application, the data field is the smallest unit of the paginated form to be verified, and each data field stores the cell content information and location information corresponding to the form, such as auto insurance products, auto insurance prices, cumulative prices of all auto insurances, auto insurance tax rates and auto insurance inventory, etc.
[0064] In an optional embodiment of the present application, before obtaining the paged form to be verified, the method further includes:
[0065] Obtain the form data to be verified, traverse the number of the form data to be verified, and obtain the total number of data entries;
[0066] Configure a splitting mark for the total number of data entries, and paginate the total number of data entries according to the splitting mark to obtain an initial paging form;
[0067] A response event is added to the initial paging form to obtain the paging form to be verified.
[0068] Among them, the form data to be verified can be obtained through the template tag in the element-ui component.
[0069] In one embodiment of the present application, by adding a total function in the template, the total number of data entries in the form data to be verified can be read.
[0070] Furthermore, in an embodiment of the present application, the split identifier is used to determine the number of data entries displayed on each page and the total number of pages, etc., and the data entries displayed on each page and the current page number can be determined respectively through the page-sizes function and the current-page function.
[0071] In the embodiment of the present application, the response event may be a click event, and specifically, corresponding paging data will be displayed when different paging numbers are clicked.
[0072] In an embodiment of the present application, by configuring a split identifier for the total number of data entries, the total number of data entries is paged according to the split identifier to obtain an initial paging form. This can avoid the situation in which the traditional method can only verify the form of the current front-end page, while subsequent paging forms cannot be verified, and facilitates subsequent verification of each page of the form to improve the accuracy of subsequent form verification.
[0073] S202: Obtain a target field to be verified of the data field.
[0074] In the embodiment of the present application, the target field to be verified refers to a field in the data field that needs to be verified. For example, in the financial field, the target field to be verified may be the price of the car insurance that needs to be verified.
[0075] As an embodiment of the present application, the step of obtaining a target field to be verified of the data field includes:
[0076] Receive the verification request sent by the front end;
[0077] Find the specific position of the field to be verified in the data field according to the verification request;
[0078] The target field to be checked is located in the data field according to the specific position.
[0079] Among them, the verification request can be a verification request carrying target field verification issued by the front end. By responding to the target field verification request and finding the row position and column position of the verification field in the data field, the target field to be verified is located according to the row position and column position.
[0080] S203. Call a preset third-party verification component, and perform semantic verification, numerical precision verification, and position size verification on the target field to be verified according to the semantic rules, numerical precision rules, and position size rules included in the third-party verification component, to obtain a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification, and a position size verification result corresponding to the position size verification.
[0081] In the embodiment of the present application, the third-party verification component may be ant-des i gn-vue.
[0082] In the embodiment of the present application, the data verification result includes a semantic verification result, a numerical precision verification result and a position size verification result, and as long as one of the results fails, the verification fails. Only when all three results pass the verification, it means that the verification passes.
[0083] For example, if there is a target field to be checked, which is the car insurance price, then it is checked whether the car insurance price is within the preset maximum and minimum price range. If so, the check passes; if not, the check fails.
[0084] In an embodiment of the present application, the semantic rule is to verify whether the syntax and semantics of the target field to be verified comply with the rules. For example, if the field of the target field to be verified is a sum value, the verification is passed by verifying that the target field is also the value output by the Sum function.
[0085] In one embodiment of the present application, the numerical accuracy rules include minimum numerical check, maximum numerical check, cumulative numerical check, product tax rate check and minimum product inventory check rules for numerical type fields. For example, the target field to be checked is the car insurance price, and the check requirement is to select the lowest car insurance price. In this case, the lowest car insurance price is selected from the car insurance prices as the check result.
[0086] Furthermore, in the embodiment of the present application, the position size rule includes the row position and column position of the target data to be verified in the paginated form to be verified, which is used to ensure that the target field to be verified is aligned in the overall form. For example, if a car insurance price is located at column A5 and row B1 on page 5 in the paginated form, the car insurance price should be located at column A5 and row B on page 5 of the paginated form.
[0087] As an embodiment of the present application, refer to Figure 3As shown, performing semantic verification on the target field to be verified according to the semantic rule to obtain a semantic verification result includes the following steps S2031-S2034:
[0088] S2031, performing a semantic ambiguity check on the target field to be checked according to the semantic rule to obtain a first semantic check result;
[0089] S2032, performing an aggregate function check on the target field to be checked according to the semantic rule to obtain a second semantic check result;
[0090] S2033. Combine the first semantic verification result and the second semantic verification result to obtain the semantic verification result.
[0091] Among them, the semantic ambiguity check is to verify whether there is ambiguity in the target field to be checked. Specifically, whether the target field to be checked appears repeatedly in the form. If it appears repeatedly in the form, a scene or product field can be added to the target field to be checked to distinguish it and prevent semantic ambiguity.
[0092] In one embodiment of the present application, the aggregate function check refers to whether the target field to be checked belongs to the field output by the aggregate function (such as Sum, Average function). If it is a field of the aggregate function, it is necessary to verify whether the numerical field output by the aggregate function can be found in the preset numerical grouping. If it can be found in the grouping, it means that the check has passed. For example, there is a preset grouping including 56, 32, and 49 values. If the field to be checked is 49, it can be found in the grouping, indicating that the check has passed.
[0093] In an embodiment of the present application, by performing semantic verification, numerical precision verification and position size verification on the target field to be verified according to the semantic rules, numerical precision rules and position size rules included in the third-party verification component, a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification and a position size verification result corresponding to the position size verification is obtained. Not only can a single data field be verified, but also the position size and field type verification of the data field are combined to ensure that the type of the verified data field is accurate and the position of the data field is aligned, thereby further improving the accuracy of the form verification.
[0094] In an optional embodiment of the present application, after obtaining the data verification results, the data verification results are submitted in batches. If the submission is successful, it means that there are no fields that failed the verification. If the submission is unsuccessful, it means that there are fields that failed the verification. The fields that failed the verification need to be verified again to ensure the accuracy of the verification results.
[0095] S204: Identify the constraint relationship between the data fields.
[0096] In an embodiment of the present application, the constraint relationship refers to a hierarchical association relationship between data fields. For example, if the table header includes auto insurance products and auto insurance prices, then a hierarchical association relationship exists between auto insurance product A, auto insurance product B, and auto insurance.
[0097] As an embodiment of the present application, the identifying the constraint relationship between the data fields includes:
[0098] Extracting a header data field from the data field as a first table unit;
[0099] extracting an associated data field associated with the table header data field as a second table unit;
[0100] Acquire the horizontal position and the vertical position of the data field as a third table unit;
[0101] The first table unit, the second table unit and the third table unit are sequentially mapped to a set to obtain the constraint relationship.
[0102] In an embodiment of the present application, the first table unit is used to mark the header data field as a first-level unit; the second table unit is used to mark the associated data field associated with the header data as a second-level unit; the third table unit is used to mark the row position and column position of the associated data field in the paginated form as a third-level unit, and the first table unit, the second table unit and the third table unit can be represented by numbers.
[0103] For example, the first table unit corresponding to the table header data field of auto insurance product can be represented by 11, the second table unit corresponding to the data field related to the image of auto insurance product is insurance product A can be represented by 12, and the third table unit corresponding to the horizontal position of auto insurance product A being the a5th row in the table and the vertical position being the b5th column in the table can be represented by 13. By mapping 11, 12, and 13, we can obtain the constraint relationship of 11-auto insurance product, 12-auto insurance product A, and 13-a5 row and b5 column.
[0104] In an embodiment of the present application, by mapping the first table unit, the second form and the third table unit to the set in sequence, the constraint relationship is obtained, which can retain the association information and position information of the data field in the form, thereby facilitating improving the accuracy of subsequent locating of erroneous target fields.
[0105] S205. According to the constraint relationship, the fields that failed the verification in the data verification result are used as error target fields, and the error target fields are assigned a value to obtain a target verification result.
[0106] In an embodiment of the present application, the assignment check can be performed by generating a check mark for the error target field and inversely assigning the check mark isError to the error target field. If the output result of the assignment is false, it indicates that the error target field is the final check failure result; if the output result of the assignment is true, it indicates that there is no problem with the check of the error target field, and the check result of the error target field should be a check pass result.
[0107] As an embodiment of the present application, taking the field that failed the verification in the data verification result as the error target field according to the constraint relationship includes:
[0108] Determine the page number and row number to which the field that failed the check belongs according to the constraint relationship and the data check result;
[0109] The fields that failed the check are highlighted based on the page number and the number of rows to obtain the error target fields.
[0110] Among them, the row position and column position of the field that failed the verification and the header field with the associated relationship can be displayed according to the constraint relationship and data verification results, and the table pager (such as el-pagination) can be used to jump to the specified page of the field that failed the verification, and the error target field can be highlighted in red.
[0111] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0112] In the embodiment of the present application, after obtaining the paginated form to be verified, extracting the data fields of the paginated form to be verified, and obtaining the target fields to be verified of the data fields, the paginated data verification is performed on the target fields respectively according to the semantic rules, numerical precision rules and position size rules included in the called three-party verification component, so that each page of form data can be verified in time to ensure the integrity of the form verification, avoid errors in the results of the form verification, and improve the accuracy of the verification; further, by identifying the constraint relationship between the data fields, the associated information and position information of the data fields in the form can be retained, which is convenient for improving the accuracy of the subsequent erroneous field positioning, and by only being able to verify the form of the current front-end page, the subsequent paginated forms cannot be verified, so that the results of the form verification have errors, which further improves the accuracy of the form verification. Therefore, the paginated form verification method proposed in the present application can improve the accuracy of the form verification.
[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned medium can be a non-volatile medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0114] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0115] Further references Figure 4 , as a response to the above Figure 2 The present application provides an embodiment of a paging form verification device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0116] like Figure 4 As shown, the paging form verification device 400 described in this embodiment includes: an extraction module 401, an acquisition module 402, a first verification module 403, an identification module 404 and a second verification module 405. Among them:
[0117] The extraction module 401 is used to obtain the paged form to be verified and extract the data fields of the paged form to be verified;
[0118] The acquisition module 402 is used to acquire the target field to be verified of the data field;
[0119] The first verification module 403 is used to call a preset third-party verification component, and perform semantic verification, numerical precision verification and position size verification on the target field to be verified according to the semantic rules, numerical precision rules and position size rules included in the third-party verification component, respectively, to obtain a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification and a position size verification result corresponding to the position size verification;
[0120] The identification module 404 is used to identify the constraint relationship between the data fields; and
[0121] The second verification module 405 is used to use the fields that failed the verification in the data verification result as error target fields according to the constraint relationship, and perform assignment verification on the error target fields to obtain a target verification result.
[0122] In this embodiment, the functions of each module / unit are as follows:
[0123] The extraction module is further used for:
[0124] A traversal submodule is used to obtain the form data to be verified, traverse the number of the form data to be verified, and obtain the total number of data entries;
[0125] A paging submodule, used for configuring a splitting mark of the total number of data entries, paging the total number of data entries according to the splitting mark, and obtaining an initial paging form;
[0126] Add a submodule, used for adding a response event to the initial paging form to obtain the paging form to be verified.
[0127] The acquisition module comprises:
[0128] The receiving submodule is used to receive the verification request sent by the front end;
[0129] A search submodule, used for searching the specific position of the field to be checked in the data field according to the check request;
[0130] A positioning submodule is used to locate the target field to be checked in the data field according to the specific position.
[0131] The first verification module comprises:
[0132] A first check submodule, configured to perform a semantic ambiguity check on the target field to be checked according to the semantic rule to obtain a first semantic check result;
[0133] A second check sub-model is used to perform an aggregate function check on the target field to be checked according to the semantic rule to obtain a second semantic check result;
[0134] A combining submodule is used to combine the first semantic verification result with the second semantic verification result to obtain the semantic verification result.
[0135] The identification module comprises:
[0136] A first extraction submodule, used for extracting a header data field from the data field as a first table unit;
[0137] A second extraction submodule, used for extracting the associated data field associated with the table header data field as a second table unit;
[0138] A third extraction submodule, used for obtaining the horizontal position and the vertical position to which the data field belongs as a third table unit;
[0139] A mapping submodule is used to map the first table unit, the second form and the third table unit to a set in sequence to obtain the constraint relationship.
[0140] The second verification module comprises:
[0141] A positioning submodule, used to determine the page number and row number to which the field that failed the check belongs according to the constraint relationship and the data check result;
[0142] The identification submodule is used to highlight the fields that failed the verification based on the page number and the number of rows to obtain the error target field.
[0143] In the embodiment of the present application, after obtaining the paginated form to be verified, extracting the data fields of the paginated form to be verified, and obtaining the target fields to be verified of the data fields, the paginated data verification is performed on the target fields respectively according to the semantic rules, numerical precision rules and position size rules included in the called three-party verification component, so that each page of form data can be verified in time to ensure the integrity of the form verification, avoid errors in the results of the form verification, and improve the accuracy of the verification; further, by identifying the constraint relationship between the data fields, the association information and position information of the data fields in the form can be retained, which is convenient for improving the accuracy of the subsequent erroneous field positioning, and by only being able to verify the form of the current front-end page, the subsequent paginated forms cannot be verified, so that the results of the form verification have errors, which further improves the accuracy of the form verification. Therefore, the paginated form verification device proposed in the present application can improve the accuracy of the form verification.
[0144] The device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected through a system bus. It should be noted that the figure only shows a device 5 having components 51-53, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0145] The device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0146] The memory 51 includes at least one type of readable medium, and the readable medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D paging form verification memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of the device 5, such as a hard disk or memory of the device 5. In other embodiments, the memory 51 can also be an external storage device of the device 5, such as a plug-in hard disk equipped on the device 5, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 51 can also include both the internal storage unit of the device 5 and its external storage device. In this embodiment, the memory 51 is usually used to store the operating system and various application software installed on the device 5, such as computer-readable instructions of the paging form verification method, etc. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or are to be output.
[0147] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 52 is generally used to control the overall operation of the device 5. In this embodiment, the processor 52 is used to run the computer-readable instructions stored in the memory 51 or process data, such as running the computer-readable instructions of the paging form verification method.
[0148] The network interface 53 may include a wireless network interface or a wired network interface, and the network interface 53 is generally used to establish a communication connection between the device 5 and other electronic devices.
[0149] In the embodiment of the present application, after obtaining the paginated form to be verified, extracting the data fields of the paginated form to be verified, and obtaining the target fields to be verified of the data fields, the paginated data verification is performed on the target fields respectively according to the semantic rules, numerical precision rules and position size rules included in the called three-party verification component, so that each page of form data can be verified in time to ensure the integrity of the form verification, avoid errors in the results of the form verification, and improve the accuracy of the verification; further, by identifying the constraint relationship between the data fields, the associated information and position information of the data fields in the form can be retained, which is convenient for improving the accuracy of the subsequent erroneous field positioning, and by only being able to verify the form of the current front-end page, the subsequent paginated forms cannot be verified, so that the results of the form verification have errors, which further improves the accuracy of the form verification. Therefore, the paginated form verification medium proposed in the present application can improve the accuracy of the form verification.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0151] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A paging form verification method, It is characterized in that The steps include: Obtain the paged form to be verified, and extract the data fields of the paged form to be verified; Obtaining a target field to be verified of the data field; Calling a preset third-party verification component, performing semantic verification, numerical precision verification and position size verification on the target field to be verified respectively according to the semantic rules, numerical precision rules and position size rules included in the third-party verification component, and obtaining a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification and a position size verification result corresponding to the position size verification; identifying constraint relationships between the data fields; According to the constraint relationship, the field that failed the verification in the data verification result is used as the error target field, and the error target field is assigned a value to obtain a target verification result.
2. The paging form verification method according to claim 1, It is characterized in that The performing semantic verification on the target field to be verified according to the semantic rule to obtain a semantic verification result includes: Performing a semantic ambiguity check on the target field to be checked according to the semantic rule to obtain a first semantic check result; Performing an aggregate function check on the target field to be checked according to the semantic rule to obtain a second semantic check result; The semantic verification result is obtained by combining the first semantic verification result and the second semantic verification result.
3. The paging form verification method according to claim 1, It is characterized in that The identifying the constraint relationship between the data fields includes: Extracting a header data field from the data field as a first table unit; extracting an associated data field associated with the table header data field as a second table unit; Acquire the horizontal position and the vertical position of the data field as a third table unit; The first table unit, the second table unit and the third table unit are sequentially mapped to a set to obtain the constraint relationship.
4. According to the paging form verification method described in claim 1, It is characterized in that The step of taking the field that failed the verification in the data verification result as the error target field according to the constraint relationship includes: Determine the page number and row number to which the field that failed the check belongs according to the constraint relationship and the data check result; The fields that failed the check are highlighted based on the page number and the number of rows to obtain the error target fields.
5. The paginated form verification method according to any one of claims 1 to 4, It is characterized in that The obtaining of the target field to be verified of the data field comprises: Receive the verification request sent by the front end; Find the specific position of the field to be verified in the data field according to the verification request; The target field to be checked is located in the data field according to the specific position.
6. According to the paging form verification method described in claim 1, It is characterized in that Before obtaining the paged form to be verified, the method further includes: Obtain the form data to be verified, traverse the number of the form data to be verified, and obtain the total number of data entries; Configure a splitting mark for the total number of data entries, and paginate the total number of data entries according to the splitting mark to obtain an initial paging form; A response event is added to the initial paging form to obtain the paging form to be verified.
7. A paging form verification device, It is characterized in that include: An extraction module is used to obtain a paged form to be verified and extract data fields of the paged form to be verified; An acquisition module, used for acquiring a target field to be verified of the data field; A first verification module is used to call a preset third-party verification component, and perform semantic verification, numerical precision verification and position size verification on the target field to be verified according to the semantic rules, numerical precision rules and position size rules included in the third-party verification component, respectively, to obtain a data verification result including a semantic verification result corresponding to the semantic verification, a numerical precision verification result corresponding to the numerical precision verification and a position size verification result corresponding to the position size verification; An identification module, used for identifying the constraint relationship between the data fields; and The second verification module is used to use the fields that failed the verification in the data verification result as error target fields according to the constraint relationship, and perform assignment verification on the error target fields to obtain a target verification result.
8. The paging form verification device according to claim 7, It is characterized in that The identification module comprises: A first extraction submodule, used for extracting a header data field from the data field as a first table unit; A second extraction submodule, used for extracting the associated data field associated with the table header data field as a second table unit; A third extraction submodule, used for obtaining the horizontal position and the vertical position to which the data field belongs as a third table unit; A mapping submodule is used to map the first table unit, the second form and the third table unit to a set in sequence to obtain the constraint relationship.
9. A device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the paging form verification method according to any one of claims 1 to 6 when executing the computer-readable instructions.
10. A computer readable medium, It is characterized in that The computer-readable medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the paginated form verification method according to any one of claims 1 to 6 are implemented.
