Verification method and device of cell data, medium and equipment
By configuring independent data validation rules and rule editing boxes for each cell in the customized target table component, the problem of inflexible cell data validation in the Web front-end table component is solved, independent verification and flexible checking of cells are achieved, and user experience and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202510684043.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-26
AI Technical Summary
The existing Web front-end table component lacks flexibility in data validation and cannot independently validate different cells in the same column, resulting in poor flexibility in data validation.
In the customized target table component, configure independent data validation rules for each cell, and bind the rule edit box to the target event to allow users to customize and update the cell validation rules to achieve independent data validation for a single cell.
Improves the flexibility of cell data verification to meet the different validation rule requirements of different cells in the same column, provides intuitive user interaction and verification feedback mechanism, and reduces resource waste.
Smart Images

Figure CN120706412A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of web page table data display, and in particular to a method, device, medium and equipment for verifying cell data. Background Art
[0002] In web front-end development, tabular data display is a very common requirement. Tables can be used to display various types of data, such as user information, product lists, and statistical data. The table component is an important means of displaying tabular data on web pages. The table component retrieves the corresponding data from the back-end server and returns it to the front-end for tabular display.
[0003] However, in the existing web front-end table components, each cell data is returned at one time, and the corresponding verification method for each column of cell data is the same, resulting in poor flexibility in data verification. Summary of the Invention
[0004] The present application provides a cell data verification method, apparatus, medium, and device, which can independently verify the data of each cell and improve the flexibility of cell data verification.
[0005] A first aspect of an embodiment of the present application provides a method for verifying cell data, the method comprising: Acquire data to be displayed, and fill the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell; Based on the data validation rules corresponding to each cell, compliance verification is performed on the data filled in the cell to obtain a verification result.
[0006] Optionally, the method further includes: Obtain an initial table component, and provide a data function and a configuration function for the initial table component; wherein the data function is used to obtain the data to be displayed, and the configuration function is used to define the type of data received by each cell; In the configuration function, a target event is bound to each cell; In response to the target event being triggered, displaying a rule edit box corresponding to the cell; The data validation rule input by the user in the rule editing box is obtained, and the data validation rule is stored to obtain the target table component.
[0007] Optionally, storing the data validation rules includes: Get the location label corresponding to each cell; For any of the cells, the position label corresponding to the cell and the data validation rule are stored in correspondence; Based on the data validation rules corresponding to each cell, the data filled into the cell is checked for compliance, and a verification result is obtained, including: Obtain the position label corresponding to each cell; Based on the data validation rule corresponding to the position tag, compliance verification is performed on the data filled in the cell to obtain a verification result.
[0008] Optionally, the method further includes: When the target event corresponding to any of the cells is triggered, a rule editing box corresponding to the cell is displayed; In response to a rule modification instruction input by the user in the rule editing box, updating the data validation rule corresponding to the cell; The updated data validation rules are stored to obtain the updated target table component.
[0009] Optionally, after performing compliance verification on the data filled into each cell based on the data validation rule corresponding to the cell and obtaining the verification result, the method further includes: For any of the cells, if the verification result is successful, outputting a first prompt message, or displaying the data filled in the cell in a first display mode, or displaying the cell in the first display mode; the first prompt message and the first display mode are used to remind the user that the data in the cell complies with the data validation rule corresponding to the cell; When the verification result is a verification failure, a second prompt message is output, or the data filled in the cell is displayed in a second display mode, or the cell is displayed in the second display mode; the second prompt message and the second display mode are used to remind the user that the data in the cell does not comply with the data validation rules corresponding to the cell, and the second display mode is different from the first display mode.
[0010] Optionally, the method further includes: For any of the cells, if the verification result is a verification failure, in response to a cell value modification instruction of the user for the cell, updating the data filled in the cell; Based on the data validation rules corresponding to each cell, performing compliance verification on the updated data in the cell to obtain a first update result; When the first update result is verification success, the first prompt information is output, or the updated data in the cell is displayed in the first display mode, or the cell is displayed in the first display mode.
[0011] Optionally, the method further includes: For any of the cells, when the verification result is a verification failure, in response to a rule modification instruction from a user for the cell, updating the data validation rule corresponding to the cell; Based on the updated data validation rules, the data filled into the cell is again checked for compliance to obtain a second updated result; When the second update result is verification success, the first prompt information is output, or the data filled in the cell is displayed in the first display mode, or the cell is displayed in the first display mode.
[0012] Based on the same inventive concept, a second aspect of an embodiment of the present application provides a cell data verification device, the device comprising: A data acquisition module is used to acquire data to be displayed and fill the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell; The cell value verification module is used to perform compliance verification on the data filled in the cell based on the data verification rules corresponding to each cell to obtain a verification result.
[0013] Based on the same inventive concept, the third aspect of the embodiment of the present application provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the cell data verification method proposed in the first aspect of the present application.
[0014] Based on the same inventive concept, the fourth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes, the cell data verification method proposed in the first aspect of the present application is implemented.
[0015] Compared with the prior art, this application has the following advantages: The embodiment of the present application provides a method for verifying cell data, which obtains data to be displayed and fills the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell; based on the data validation rules corresponding to each cell, the data filled into the cell is checked for compliance to obtain a verification result. Thus, by inserting corresponding independent validation logic for a single cell in a custom target table component, and directly performing compliance verification on the data filled into the cell according to the data validation rules corresponding to the cell when applied, independent data verification of a single cell is achieved, thereby improving the flexibility of cell data verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] Figure 1 This is a flow chart of a method for verifying cell data in one embodiment of the present application; Figure 2 2 is a schematic diagram of a cell data acquisition and receiving process in an embodiment of the present application; Figure 3 This is a schematic diagram of the target table component construction process in one embodiment of the present application; Figure 4 1 is a schematic diagram of a cell data verification process in an embodiment of the present application; Figure 5 This is a functional module diagram of a cell data verification device according to an embodiment of the present application; Figure 6 It is a structural diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0019] Existing web front-end table components are adequate for displaying data, but most (such as Ant Design Table and ag-Grid) are data-driven, prioritizing performance and batch data rendering. They typically treat tables as structured data collections, defining data formats and validation rules through unified column configurations (such as the columns array). This design forces cells in the same column to share validation logic (e.g., email address formatting or number ranges), making it impossible to implement independent data validation for individual cells.
[0020] In view of this, this application proposes a cell data validation method. By inserting corresponding independent validation logic into a single cell in a custom target table component, and then directly performing compliance verification on the data filled into the cell according to the corresponding data validation rules of the cell, this method implements independent data verification for a single cell. This satisfies the requirement that different cells in the same column of the table component require different validation rules, and improves the flexibility of cell data verification.
[0021] Please refer to Figure 1 , Figure 1 This is a flow chart of a method for verifying cell data proposed in one embodiment of the present application. Figure 1 As shown, the method includes the following steps: S101: Acquire data to be displayed, and fill the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell.
[0022] In this embodiment, the target table component is a customized table component that can display data to the user in the form of a table.
[0023] For details, please refer to Figure 2 , Figure 2 Schematic diagram of the cell data acquisition and receiving process in one embodiment of the present application. Figure 2 As shown, a user accesses a web front-end page through a browser, triggering a data request (e.g., clicking a button or entering a query). This request is then sent to the back-end API (Application Programming Interface) via HTTP (Hypertext Transfer Protocol). The back-end then returns the corresponding data to be displayed. After receiving this data, the web front-end uses a custom target table component to display the data to the user in a table format on the page.
[0024] Among them, different users may have different access rights and data requirements. For example, assuming that user 1 is an ordinary user, he may only need to view basic data. For example, in an automobile e-commerce platform, he can view his own order information, including order number, product name, price, status, etc. Assuming that user 2 is an administrator, he may need to access more detailed data in order to manage the data. For example, he needs to view the order information of all users, including order details, user contact information, order status, refund details, etc. Assuming that user 3 is a data analyst, he may need to access more comprehensive data for in-depth analysis. For example, he needs to access detailed data of all orders, including timestamps, user behavior logs, payment methods, etc., in order to generate sales reports and user behavior analysis.
[0025] Secondly, if Figure 2 As shown in the figure, after obtaining the data to be displayed, it needs to be formatted in JSON to catch data anomalies such as network errors and data format errors, ensuring the legitimacy of the data to be displayed. Then, the target table component renders the JSON-formatted data and finally displays the data to the user in the form of a table.
[0026] In addition to displaying the data in a table format using the target table component, the data is also displayed in a raw tree format. This raw tree format preserves the nested hierarchical structure of the JSON data, making it easier for developers to debug or verify data. Users can switch between the "table view" and "raw JSON view" using a button on the web frontend.
[0027] It should be noted that the target table component in this application not only has the sorting, paging, filtering and other functions of ordinary open source table components, but also has the function of independently configuring corresponding data validation rules for each cell.
[0028] Ordinary open source table components such as Vue, React, etc. usually bind the entire data set at one time through dataSource, and the cell content is directly mapped to the properties of the data object. For example, the data with the attribute "name" in the data to be displayed is directly filled in the cells in the column with the column header "name" in the table; the data with the attribute "age" in the data to be displayed is directly filled in the cells in the column with the column header "age" in the table. At the same time, the validation rules of the data are also implemented through column configuration, that is, the cells in the same column share the same validation rules. For example, for a column of data with the column header "name", the data validation rule for each cell in the column is "the name is in English", so it is impossible to achieve independent verification of the data of a specific cell in the same column. When customizing the target table component, this application implements independent data validation for a single cell by inserting the corresponding independent validation logic into the single cell.
[0029] S102: Based on the data validation rules corresponding to each cell, the compliance of the data filled in the cell is checked to obtain a verification result.
[0030] In this embodiment, since each cell is pre-configured with its corresponding data validation rules, when performing a compliance check on the data, the data filled in the cell can be independently verified according to the data validation rules corresponding to the cell, and a verification result for the cell data can be obtained. Specifically, if the data in the cell complies with its corresponding data validation rules, the verification is successful; if the data in the cell does not comply with its corresponding data validation rules, the verification fails.
[0031] For example, for a column of cells with the column header "name", assume that the data validation rule for the cells in the second row of the column is "name is in English or empty", and the data validation rule for the cells in the third row is "name is in Chinese and less than three characters". At this time, for the cells in the second row of the column, if the data filled into the cell is a Chinese name, the cell validation fails; if the data filled into the cell is an English name, or the cell is not filled with data, the cell validation succeeds. For the cells in the third row of the column, if the data filled into the cell is an English name or a Chinese name with more than three characters, the cell validation fails; if the data filled into the cell is a Chinese name with less than three characters, the cell validation succeeds.
[0032] This embodiment implements independent data validation for individual cells by inserting corresponding independent validation logic into a custom target table component. When applied, the data filled into the cell is directly verified for compliance according to the corresponding data validation rules. This satisfies the requirement that different cells in the same column of the table component require different validation rules, improving the flexibility of cell data validation.
[0033] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the target table component construction process in one embodiment of the present application. Figure 3 As shown, the process mainly includes: S301: Obtain an initial table component and provide a data function and a configuration function for the initial table component; wherein the data function is used to obtain data to be displayed, and the configuration function is used to define the type of data received by each cell.
[0034] In this embodiment, the initial table component can be an open source table component such as Vue, React, etc. The data function, i.e., the data function, is used to obtain the data to be displayed. data is a collection of data displayed in the table, usually an array, where each element represents a row of data and each attribute corresponds to a column. For example: / / Data example data = [ { id: 1, name: "Alice", age: 25}, { id: 2, name: "Bob", age: 30} ]; The element "Alice" will be populated into the first row of cells in the column with the attribute "name" in the table component, and the element "Bob" will be populated into the second row of cells in the column with the attribute "name" in the table component. The element "25" will be populated into the first row of cells in the column with the attribute "age" in the table component, and the element "30" will be populated into the second row of cells in the column with the attribute "age" in the table component.
[0035] At the same time, the table component will automatically render the corresponding number of rows based on the length of data. For example, if the data function contains 30 sets of data, the final displayed table data will have 30 rows.
[0036] Configuration functions, also known as column functions, are used to define the type of data each cell receives. For example, you might define a table component's first column to receive data of the "name" type, the second column to receive data of the "age" type, and the third column to receive data of the "amount" type. Furthermore, column functions allow you to configure column sorting, filtering, formatting, custom rendering, and validation rules. Thus, you can use column functions to define the column structure of a table and control the column display logic.
[0037] Specifically, the column function contains the following key configuration items: the title attribute, which is used to define the column header (that is, the text displayed in the table header); the dataIndex attribute, which is used to associate the attribute name of the data object in data (such as dataIndex: "name" binds data[i].name); the key attribute, which is used to define the unique identifier of the column; the sorter attribute, which is used to define the sorting logic of the column (function or Boolean value); the filters attribute, which is used to define the filtering logic of the column (defining a list of filter items); the render attribute, which is used to customize cell content (formatting, adding interactive elements, etc.); and the rules attribute, which is used to customize the validation rules of the column.
[0038] For example, the column configuration is as follows: / / Ant Design Table columns configuration const columns = [ { title: "Age", dataIndex: "age", key: "age", rules: [{ required: true, message: "Age cannot be empty"}] / / Form validation rules } ]; Among them, the data validation rule defined for the cells in the "Age" column of the table component through the column function is "Age cannot be empty".
[0039] S302: In the configuration function, bind a target event to each cell.
[0040] In this embodiment, the render property of the column function can be used to add interactive elements to different cells in the same column to bind a target event to each cell, such as a double-click event, and the rules property can be used to configure a corresponding rule editing box for each cell to define the data validation rules for the cell.
[0041] S303: In response to the target event being triggered, displaying the rule editing box corresponding to the cell.
[0042] In this embodiment, when the target event is triggered, for example, the user double-clicks a cell, the row and column position of the cell and the current cell value of the cell are automatically obtained, and the rule editing box corresponding to the cell pops up to interact with the user.
[0043] S304: Acquire the data validation rules entered by the user in the rule editing box, store the data validation rules, and obtain a target table component.
[0044] In this embodiment, the user can edit the data validation rules for the cell in the rule editing box, thereby interacting with the user through the rule editing box, collecting and storing the user's custom data validation rules for each cell, and obtaining the target table component for subsequent independent verification of the cell data.
[0045] It should be noted that users can configure independent rules for only those cells in the same column that require different validation rules. When applied, cells with customized independent validation rules will be validated according to the customized validation rules. Cells without independent validation rules will be validated according to the column-level validation rules of the column in which the cell is located.
[0046] This embodiment customizes the target table component and, based on the functions of the open source table component, adds data validation functions for independent cells, thereby defining cell-level validation rules based on the column-level validation rule definition, thereby improving the flexibility of cell data verification.
[0047] Optionally, the data validation rules are stored in step S304, mainly including: Get the position label corresponding to each cell; for any cell, store the position label corresponding to the cell and the data validation rule in correspondence.
[0048] Based on the data validation rules corresponding to each cell, the data filled in the cell is checked for compliance to obtain a verification result, including: obtaining the position label corresponding to each cell; based on the data validation rules corresponding to the position label, the data filled in the cell is checked for compliance to obtain a verification result.
[0049] In this embodiment, the position label corresponding to the cell includes the row and column position of the cell. For example, in the first column "Name" cell, the position label corresponding to the second row cell can be recorded as A 1,2In the third column "Consumption Amount" cell, the position label corresponding to the cell in the fifth row can be recorded as A 3,5 .
[0050] After obtaining the data validation rules customized by the user for independent cells, the data validation rules are stored corresponding to the position labels corresponding to the cells, thereby decoupling the rules from the data in the target table component to form a position-rule mapping table for independent cells.
[0051] Later, when using the target table component to display table data and verify cell values, by reading the cell's location and querying the location-rule mapping table, the data validation rule corresponding to the cell's location label can be determined, and then the compliance of the current data in the cell can be checked accordingly to achieve independent verification of the cell data.
[0052] This embodiment stores the cell location label and the data validation rule in correspondence, which can be accurately applied to specific cells to avoid errors in matching data validation rules between cells. Moreover, after completing the verification, the cell that failed the verification can be directly located by the location label, which can facilitate the functional debugging of the target table component during the development phase. In addition, if multiple tables need to share some validation logic, such as the A 1,2 If all cells need to verify names, the rule base can be managed uniformly through location tags to achieve cross-table rule reuse and reduce repeated configuration. This is especially suitable for application scenarios that require high flexibility and complex verification.
[0053] Optionally, the method further comprises: When the target event corresponding to any cell is triggered, the rule editing box corresponding to the cell is displayed; in response to the rule modification instruction entered by the user in the rule editing box, the data validation rule corresponding to the cell is updated; the updated data validation rule is stored to obtain the updated target table component.
[0054] In this implementation, the user can double-click a cell to trigger the target event corresponding to that cell. Once the target event is triggered, a rule edit box corresponding to that cell pops up for user interaction. In this edit box, the user can modify the original data validation rule set for that cell to update the rule. The new data validation rule modified by the user is obtained and stored in association with the location tag corresponding to the cell, thereby updating the target table component.
[0055] This allows users to modify data validation rules directly when needed without leaving the table component or using other tools, providing a smoother and more intuitive user experience. Furthermore, allowing users to customize data validation rules makes the table component more flexible and configurable, allowing users to adjust the rules according to specific needs to adapt to different data input scenarios.
[0056] Optionally, after performing compliance verification on the data filled into each cell based on the data validation rule corresponding to the cell and obtaining the verification result, the method further includes: For any cell, if the verification result is successful, output a first prompt message, or display the data filled in the cell in a first display mode, or display the cell in the first display mode; the first prompt message and the first display mode are used to remind the user that the data in the cell complies with the data validation rules corresponding to the cell; When the verification result is a verification failure, a second prompt message is output, or the data filled in the cell is displayed in a second display mode, or the cell is displayed in a second display mode; the second prompt message and the second display mode are used to remind the user that the data in the cell does not comply with the data validation rules corresponding to the cell, and the second display mode is different from the first display mode.
[0057] In this embodiment, based on the data validation rules corresponding to each cell, after the data filled in the cell is verified for compliance, a corresponding prompt will be given based on the verification result to prompt the user whether the cell data verification is successful or failed.
[0058] For details, please refer to Figure 4 , Figure 4 Schematic diagram of the cell data verification process in one embodiment of the present application. Figure 4 As shown, if the data in the cell meets the data validation rules corresponding to the cell, the user can be prompted that the cell data verification is successful by outputting a first prompt message, or displaying the data filled in the cell in a first display mode, or displaying the cell in a first display mode.
[0059] Among them, the first prompt information can be set to "A 3,5 "Data verification successful", indicating that the data of the cell in the third column and the fifth row has been successfully verified. The first display mode can be set to display in green, for example, the data filled in the cell is displayed in green, or the cell background is displayed in green, so as to intuitively prompt the user that the cell data verification is successful.
[0060] If the data in the cell does not comply with the data validation rules corresponding to the cell, the user can be prompted that the cell data validation is successful by outputting a second prompt message, displaying the data filled in the cell in a second display mode, or displaying the cell in a second display mode.
[0061] Among them, the second prompt information can be set to "A 1,2 "Data validation failed" means that the data validation of the cell in the first column and second row has failed. The second display mode can be set to display in red. For example, the data filled in the cell is displayed in red, or the cell background is displayed in red, so as to intuitively prompt the user that the cell data validation has failed.
[0062] This embodiment enables users to understand the verification status of cell data in real time by providing corresponding prompts for the verification results, and provides feedback in the form of visual signals (color) or text prompts, so that users can intuitively understand the data status without having to memorize complex rules, preventing users from ignoring erroneous data and causing subsequent process interruptions.
[0063] Furthermore, after providing feedback on the verification result, the above method further includes: For any cell, when the verification result is verification failure, in response to the user's cell value modification instruction for the cell, the data filled in the cell is updated; based on the data validation rules corresponding to each cell, the updated data in the cell is checked for compliance to obtain a first update result; when the first update result is verification success, a first prompt message is output, or the updated data in the cell is displayed in a first display mode, or the cell is displayed in a first display mode.
[0064] In this embodiment, if Figure 4 As shown in the figure, if the background of a cell is displayed in red (or the data in the cell is displayed in red, or the second prompt message is output), it means that the cell data verification has failed. At this time, the user can modify the data in the cell by clicking on the cell. Afterwards, the cell data modified by the user is verified twice using the data validation rules corresponding to the cell to obtain the first update result. If the first update result is a successful verification, the cell background will change from red to green (or the data in the cell will change from red to green, or the first prompt message will be output) to prompt the user that the modified cell data meets the data validation rules corresponding to the cell.
[0065] If the first update result is validation failure, the cell background color remains unchanged and remains red (or the cell data remains displayed in red, or the second prompt message is still output), prompting the user that the modified cell data still does not meet the corresponding data validation rules. In this case, the user can continue to modify the cell data until it meets the corresponding data validation rules.
[0066] This way, after users modify data, the validation results (color, prompt) are immediately updated, forming a virtuous cycle of "action-feedback-correction." By tightly integrating the modification process with validation feedback, users don't need to memorize rules or leave the current form, keeping their focus on the task at hand. This approach is particularly suitable for complex form applications.
[0067] Furthermore, after providing feedback on the verification result, the above method further includes: For any cell, when the verification result is verification failure, in response to the user's rule modification instruction for the cell, the data validation rule corresponding to the cell is updated; based on the updated data validation rule, the compliance of the data filled in the cell is checked again to obtain a second updated result; when the second updated result is verification success, the first prompt information is output, or the data filled in the cell is displayed in the first display mode, or the cell is displayed in the first display mode.
[0068] In this embodiment, if Figure 4 As shown, if the background of a cell is displayed in red (or the data in the cell is displayed in red, or the second prompt message is output), it means that the data verification of the cell has failed. At this time, the user can trigger the target event corresponding to the cell by double-clicking the cell. After the target event is triggered, the rule editing box corresponding to the cell pops up for interaction with the user. The user can modify the data validation rule corresponding to the cell in the rule editing box. Afterwards, based on the new data validation rule modified by the user, the data filled in the cell is verified twice to obtain the second update result. If the second update result is a successful verification, the background of the cell will change from red to green (or the data in the cell will change from red to green, or the first prompt message will be output) to prompt the user that the data in the cell complies with the modified data validation rule of the cell.
[0069] If the second update result is a validation failure, the cell background color remains red (or the data in the cell is still displayed in red, or the second prompt message is still output), prompting the user that the data in the cell still does not meet the modified data validation rules for the cell. In this case, the user can continue to modify the data validation rules for the cell until the data in the cell meets the current data validation rules for the cell.
[0070] In this way, when validation fails, users can double-click a cell to modify the cell's data validation rules, enabling independent cell validation rules to be updated independently without waiting for developers to update code, improving the flexibility of cell data validation. Furthermore, when only some cells fail validation, the data validation rules for the failed cells can be modified or updated without re-rendering the entire table or column, saving service resources.
[0071] Please refer to Figure 5 Based on the same inventive concept, a second aspect of an embodiment of the present application provides a cell data verification device, the cell data verification device 500 comprising: The data acquisition module 501 is used to acquire the data to be displayed and fill the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell; The cell value verification module 502 is used to perform compliance verification on the data filled in the cell based on the data verification rules corresponding to each cell to obtain a verification result.
[0072] Optionally, the device further comprises: The initial table component construction module is used to obtain the initial table component and provide data functions and configuration functions for the initial table component; the data function is used to obtain the data to be displayed, and the configuration function is used to define the type of data received by each cell; Target event binding module, used to bind target events to each cell in the configuration function; A target event triggering module is used to display a rule editing box corresponding to a cell in response to a target event being triggered; The rule setting module is used to obtain the data validation rules entered by the user in the rule editing box, store the data validation rules, and obtain the target table component.
[0073] Optionally, the rule setting module includes: The location label acquisition submodule is used to obtain the location label corresponding to each cell; The label-rule correspondence storage submodule is used to store the position label corresponding to any cell and the data validation rule corresponding to the cell; The above-mentioned cell value checking module 502 includes: The cell position acquisition submodule is used to obtain the position label corresponding to each cell; The cell data verification submodule is used to perform compliance verification on the data filled in the cell based on the data validation rules corresponding to the position label to obtain the verification result.
[0074] Optionally, the device further comprises: The target event trigger module is used to display the rule editing box corresponding to any cell when the target event corresponding to the cell is triggered; A rule modification module, configured to update the data validation rule corresponding to the cell in response to a rule modification instruction input by a user in a rule editing box; The table component update module is used to store the updated data validation rules and obtain the updated target table component.
[0075] Optionally, the device further comprises: A first prompt module is configured to output a first prompt message, display the data filled in the cell in a first display mode, or display the cell in the first display mode for any cell when the verification result is successful; the first prompt message and the first display mode are configured to remind the user that the data in the cell complies with the data validation rule corresponding to the cell; The second prompt module is used to output a second prompt message, or display the data filled in the cell in a second display mode, or display the cell in a second display mode when the verification result is a verification failure; the second prompt message and the second display mode are used to remind the user that the data in the cell does not comply with the data validation rules corresponding to the cell, and the second display mode is different from the first display mode.
[0076] Optionally, the device further comprises: A cell value modification module is used to update the data filled in any cell in response to a user's cell value modification instruction for the cell when the verification result is a verification failure; A data secondary verification module is used to perform compliance verification on the updated data in each cell based on the data verification rules corresponding to the cell to obtain a first update result; The secondary verification judgment module is used to output a first prompt message, or display the updated data in the cell in the first display mode, or display the cell in the first display mode when the first update result is a successful verification.
[0077] Optionally, the device further comprises: A cell rule modification module is used to update the data validation rule corresponding to any cell in response to a user's rule modification instruction for the cell when the verification result is a verification failure; A rule secondary verification module is used to perform compliance verification on the data filled in the cell again based on the updated data verification rules to obtain a second updated result; The secondary verification judgment module is used to output the first prompt information, or display the data filled in the cell in the first display mode, or display the cell in the first display mode when the second update result is that the verification is successful.
[0078] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0079] On the third aspect, based on the same inventive concept, an embodiment of the present application provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the cell data verification method proposed in the first aspect of the present application.
[0080] It should be noted that the specific implementation of the storage medium in the embodiment of the present application refers to the specific implementation of the cell data verification method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0081] In the fourth aspect, based on the same inventive concept, refer to Figure 6 An embodiment of the present application provides an electronic device 600, including a processor 601 and a memory 602; the memory 602 stores machine executable instructions that can be executed by the processor 601, and the processor 601 is used to execute the machine executable instructions to implement the cell data verification method proposed in the first aspect of the present application.
[0082] It should be noted that the specific implementation of the electronic device 600 in the embodiment of the present application refers to the specific implementation of the cell data verification method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0083] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0084] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0088] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0089] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0090] The above is a detailed introduction to the cell data verification method, device, medium and equipment provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for verifying cell data, characterized in that: The method comprises: Acquire data to be displayed, and fill the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell; Based on the data validation rules corresponding to each cell, compliance verification is performed on the data filled in the cell to obtain a verification result.
2. The method according to claim 1, characterized in that The method further comprises: Obtain an initial table component, and provide a data function and a configuration function for the initial table component; wherein the data function is used to obtain the data to be displayed, and the configuration function is used to define the type of data received by each cell; In the configuration function, a target event is bound to each cell; In response to the target event being triggered, displaying a rule edit box corresponding to the cell; The data validation rule input by the user in the rule editing box is obtained, and the data validation rule is stored to obtain the target table component.
3. The method according to claim 2, characterized in that Storing the data validation rules includes: Get the location label corresponding to each cell; For any of the cells, the position label corresponding to the cell and the data validation rule are stored in correspondence; Based on the data validation rules corresponding to each cell, the data filled into the cell is checked for compliance, and a verification result is obtained, including: Obtain the position label corresponding to each cell; Based on the data validation rule corresponding to the position tag, compliance verification is performed on the data filled in the cell to obtain a verification result.
4. The method according to claim 2, characterized in that The method further comprises: When the target event corresponding to any of the cells is triggered, a rule editing box corresponding to the cell is displayed; In response to a rule modification instruction input by the user in the rule editing box, updating the data validation rule corresponding to the cell; The updated data validation rules are stored to obtain the updated target table component.
5. The method according to claim 1, wherein After performing compliance verification on the data filled into each cell based on the data verification rule corresponding to the cell and obtaining the verification result, the method further includes: For any of the cells, if the verification result is successful, outputting a first prompt message, or displaying the data filled in the cell in a first display mode, or displaying the cell in the first display mode; the first prompt message and the first display mode are used to remind the user that the data in the cell complies with the data validation rule corresponding to the cell; When the verification result is a verification failure, a second prompt message is output, or the data filled in the cell is displayed in a second display mode, or the cell is displayed in the second display mode; the second prompt message and the second display mode are used to remind the user that the data in the cell does not comply with the data validation rules corresponding to the cell, and the second display mode is different from the first display mode.
6. The method according to claim 5, characterized in that The method further comprises: For any of the cells, if the verification result is a verification failure, in response to a cell value modification instruction of the user for the cell, updating the data filled in the cell; Based on the data validation rules corresponding to each cell, performing compliance verification on the updated data in the cell to obtain a first update result; When the first update result is verification success, the first prompt information is output, or the updated data in the cell is displayed in the first display mode, or the cell is displayed in the first display mode.
7. The method according to claim 5, characterized in that The method further comprises: For any of the cells, when the verification result is a verification failure, in response to a rule modification instruction from a user for the cell, updating the data validation rule corresponding to the cell; Based on the updated data validation rules, the data filled into the cell is again checked for compliance to obtain a second updated result; When the second update result is verification success, the first prompt information is output, or the data filled in the cell is displayed in the first display mode, or the cell is displayed in the first display mode.
8. A cell data verification device, characterized in that: The device comprises: A data acquisition module is used to acquire data to be displayed and fill the data to be displayed into a predefined target table component; the target table component is configured with corresponding data validation rules for each cell; The cell value verification module is used to perform compliance verification on the data filled in the cell based on the data verification rules corresponding to each cell to obtain a verification result.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cell data verification method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the cell data verification method according to any one of claims 1 to 7 is implemented.