CN111400380A - Method for checking table data, electronic device and storage medium - Google Patents

Method for checking table data, electronic device and storage medium Download PDF

Info

Publication number
CN111400380A
CN111400380A CN202010109756.5A CN202010109756A CN111400380A CN 111400380 A CN111400380 A CN 111400380A CN 202010109756 A CN202010109756 A CN 202010109756A CN 111400380 A CN111400380 A CN 111400380A
Authority
CN
China
Prior art keywords
table data
request
preset
formula
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010109756.5A
Other languages
Chinese (zh)
Inventor
陈真
熊晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010109756.5A priority Critical patent/CN111400380A/en
Publication of CN111400380A publication Critical patent/CN111400380A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Abstract

The invention relates to a data processing technology and provides a method for checking table data, an electronic device and a storage medium. The method comprises the steps of receiving a checking request of table data sent by a user, analyzing the request to obtain a configuration rule formula carried in the request, and converting the configuration rule formula into a rule expression based on a preset conversion rule. Then, the method acquires preset type table data input by a user in real time, carries out verification operation processing on the preset type table data based on a regular expression, judges whether the table data passes verification, feeds back first preset prompt information to the user when all the table data passes verification, and feeds back second preset prompt information to the user when any one preset type table data does not pass verification. The invention can improve the checking efficiency of the table data.

Description

Method for checking table data, electronic device and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method for checking table data, an electronic device, and a storage medium.
Background
At present, a web form is mainly realized by depending on a plug-in, for example, a SpreadJS plug-in does not need to develop and test a large amount of codes under the scenes of data visualization, formula reference, data binding and the like, the plug-in can realize the data format, formula customization, personalized display and the like of cells, but the plug-in cannot support dynamic configuration of the cell formulas on business logic, for example, when the correctness of the form data needs to be checked, the data between each cell has logical association, the data of each cell has logical association, special code realization needs to be carried out, and for a more complex web form, the business logical association needs to be realized on each cell through coding, so that the efficiency of checking the form data is extremely low.
Disclosure of Invention
In view of the above, the present invention provides a method, an electronic device, and a storage medium for checking table data, and aims to solve the problem of low checking efficiency of table data in the prior art.
In order to achieve the above object, the present invention provides a method for checking table data, including:
a receiving step: receiving a verification request of table data sent by a user, analyzing the verification request, and acquiring a configuration rule formula carried in the request;
a conversion step: converting the configuration rule formula into a regular expression based on a preset conversion rule, and storing the regular expression into a preset database;
a checking step: acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression; and
a feedback step: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
Preferably, the converting the configuration rule formula into a rule expression based on a preset conversion rule includes:
predefining attribute information of the cells corresponding to the configuration rule formula and storing the attribute information into the preset database;
analyzing the configuration rule formula based on the attribute information of the cell to obtain the attribute information of the configuration rule formula;
and filling the attribute information of the configuration rule formula into a preset expression template to generate the rule expression.
Preferably, the performing, based on the regular expression, a check operation on the preset type of table data includes:
traversing a preset cell list based on the regular expression to obtain formula identifiers of a plurality of cells in the cell list;
traversing the preset type of table data based on the formula identification, and replacing the formula identification of each cell with the corresponding preset type of table data to generate an operational expression;
and operating the operational expression by using a preset expression engine to obtain an operation result, and checking whether the operation result is the same as an expected result.
Preferably, the configuration rule formula comprises any combination of one or more of names, constants and operators.
Preferably, the receiving step further comprises:
judging whether the check request is a malicious request, determining that the check request is an abnormal request when the check request is the malicious request, rejecting the request and generating early warning information; and when the request is not a malicious request, determining that the request is a normal request, and responding to the request to execute the conversion step.
To achieve the above object, the present invention also provides an electronic device, including: the checking program of the table data is executed by the processor, and the following steps are realized:
a receiving step: receiving a verification request of table data sent by a user, analyzing the verification request, and acquiring a configuration rule formula carried in the request;
a conversion step: converting the configuration rule formula into a regular expression based on a preset conversion rule, and storing the regular expression into a preset database;
a checking step: acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression; and
a feedback step: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
Preferably, the converting the configuration rule formula into a rule expression based on a preset conversion rule includes:
predefining attribute information of the cells corresponding to the configuration rule formula and storing the attribute information into the preset database;
analyzing the configuration rule formula based on the attribute information of the cell to obtain the attribute information of the configuration rule formula;
and filling the attribute information of the configuration rule formula into a preset expression template to generate the rule expression.
Preferably, the performing, based on the regular expression, a check operation on the preset type of table data includes:
traversing a preset cell list based on the regular expression to obtain formula identifiers of a plurality of cells in the cell list;
traversing the preset type of table data based on the formula identification, and replacing the formula identification of each cell with the corresponding preset type of table data to generate an operational expression;
and operating the operational expression by using a preset expression engine to obtain an operation result, and checking whether the operation result is the same as an expected result.
Preferably, the receiving step further comprises:
judging whether the check request is a malicious request, determining that the check request is an abnormal request when the check request is the malicious request, rejecting the request and generating early warning information; and when the request is not a malicious request, determining that the request is a normal request, and responding to the request to execute the conversion step.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, which includes a checking program of table data, and when the checking program of table data is executed by a processor, the checking program of table data implements any step of the checking method of table data as described above.
According to the form data checking method, the electronic device and the storage medium, the user can customize the configuration rule, the configuration rule supports the configuration of most operation formulas, the checking and checking requirements on differentiated form service data of different users are met, the number of times of manually checking data formats of the users is reduced, and the correctness of formula calculation results and the checking efficiency of the form data are improved.
Drawings
FIG. 1 is a diagram of an electronic device according to a preferred embodiment of the present invention;
FIG. 2 is a block diagram illustrating a preferred embodiment of the table data verification process of FIG. 1;
FIG. 3 is a flowchart of a preferred embodiment of a method for verifying tabular data according to the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a schematic diagram of an electronic device 1 according to a preferred embodiment of the invention is shown.
The electronic device 1 includes but is not limited to: memory 11, processor 12, display 13, and network interface 14. The electronic device 1 is connected to a network through a network interface 14 to obtain raw data. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System for mobile communications (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or a communication network.
The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic apparatus 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided in the electronic apparatus 1. Of course, the memory 11 may also comprise both an internal memory unit of the electronic apparatus 1 and an external memory device thereof. In this embodiment, the memory 11 is generally used for storing an operating system installed in the electronic device 1 and various application software, such as a program code of the verification program 10 for table data. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally used for controlling the overall operation of the electronic device 1, such as performing data interaction or communication related control and processing. In this embodiment, the processor 12 is configured to run the program code stored in the memory 11 or process data, for example, the program code of the verification program 10 of the table data.
The display 13 may be referred to as a display screen or a display unit, in some embodiments the display 13 may be an L ED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic light-emitting diode (O L ED) touch-sensitive display, and the like, the display 13 is used for displaying information processed in the electronic device 1 and for displaying a visual work interface, such as displaying a result of data statistics.
The network interface 14 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), the network interface 14 typically being used for establishing a communication connection between the electronic apparatus 1 and other electronic devices.
Fig. 1 only shows the electronic device 1 with components 11-14 and the verification program 10 of the tabular data, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the electronic device 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and an optional user interface may also comprise a standard wired interface, a wireless interface, optionally, in some embodiments, the Display may be an L ED Display, a liquid crystal Display, a touch-sensitive liquid crystal Display, and an Organic light-Emitting Diode (O L ED) touch-sensitive device, etc., wherein the Display may also be appropriately referred to as a Display screen or Display unit for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
The electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described in detail herein.
In the above embodiment, the processor 12 may implement the following steps when executing the verification program 10 for table data stored in the memory 11:
a receiving step: receiving a verification request of table data sent by a user, analyzing the verification request, and acquiring a configuration rule formula carried in the request;
a conversion step: converting the configuration rule formula into a regular expression based on a preset conversion rule, and storing the regular expression into a preset database;
a checking step: acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression; and
a feedback step: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
The storage device may be the memory 11 of the electronic apparatus 1, or may be another storage device communicatively connected to the electronic apparatus 1.
For detailed description of the above steps, please refer to the following description of fig. 2 regarding a flowchart of an embodiment of the table data verification program 10 and fig. 3 regarding a flowchart of an embodiment of a table data verification method.
In other embodiments, the verification procedure 10 for the table data may be divided into a plurality of modules, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
Referring to fig. 2, a block diagram of an embodiment of the table data verification process 10 of fig. 1 is shown. In this embodiment, the verification procedure 10 of the table data may be divided into: a receiving module 110, a converting module 120, a verifying module 130 and a feedback module 140.
The receiving module 110 is configured to receive a check request of table data sent by a user, analyze the check request, and obtain a configuration rule formula carried in the request.
In this embodiment, a request for checking table data sent by a user is received, a configuration rule formula carried in the request for obtaining is analyzed, in an actual application scenario, when an underwriter of a certain insurance institution needs to perform verification check of a custom formula on cells in a web form, the underwriter can pre-configure a configuration rule formula required by the check, the configuration rule formula is input through a human-computer interaction interface, the front-end configuration page displays configurable row and column identification options, and data with different dimensions (such as mechanisms, rule classification and the like) can be configured, the verification requirements of different user differences are met, the row and column identification options can be displayed by initializing corresponding data through the script, specifically, the server can load the data corresponding to the row and column options into the cache from a preset database, and the data corresponding to the row and column options can be obtained from the cache according to the row and column identification. Further, the user may also configure any combination of one or more of names, constants and operators (+, -,/, >, <, >,) in the configuration rule formula, for example: "vehicle insurance integral _ vehicle share promotion > is 0.01".
In an embodiment, it may be further determined whether the verification request is a malicious request, and when the verification request is a malicious request, it is determined that the verification request is an abnormal request, and the request is rejected and early warning information is generated; and when the request is not a malicious request, determining that the request is a normal request, and responding to the request to execute the subsequent steps.
The conversion module 120 is configured to convert the configuration rule formula into a rule expression based on a preset conversion rule, and store the rule expression in a preset database.
In this embodiment, the configuration rule formula is converted into a rule expression based on a preset conversion rule, and the rule expression is stored in a preset database. The data stored to the database can be directly obtained from the database when the user needs to verify the data again.
Wherein converting the configuration rule formula into a rule expression based on a preset conversion rule comprises:
the attribute information of the cells corresponding to the configuration rule formula is predefined and stored in the preset database, the configuration rule formula is analyzed based on the attribute information of the cells to obtain the attribute information of the configuration rule formula, and the attribute information of the configuration rule formula is filled in a preset expression template to generate the rule expression. For example:
defining the attributes of the row and column cells in a preset database by using an sql script, wherein the attributes comprise the following steps:
CO L _ 01-A planned premium, { "targetType": "01", "attebuseName": "premium" }
And receiving a unit row and column selected by a user at the front end and an operator selection item combination (for example, configuration: vehicle insurance integral-vehicle insurance fee + channel-vehicle trader-vehicle acceleration rate), and storing the codes of the selection items in JSON regular expressions through JS and Java programs.
The checking module 130 is configured to obtain, in real time, preset type table data input by the user, and perform checking operation processing on the preset type table data based on the regular expression.
In this embodiment, the preset type of table data input by the user is acquired in real time, and the check operation processing is performed on the preset type of table data based on the regular expression. The report data of the preset type input by the user comprises three attributes, and each attribute of the report data is matched with the attribute of the regular expression.
The process of performing the checking operation on the report data of the preset type input by the user based on the regular expression specifically comprises the following steps: converting table data of a preset type input by a user into a JAVA object, acquiring the regular expression from the preset database, circularly traversing the preset cell list, acquiring a formula identifier of each cell in the cell list, traversing the table data submitted by the user based on the formula identifiers, replacing the formula identifier of each cell with corresponding table data to generate an operational expression, operating the operational expression by using a preset expression engine to obtain a calculation result, and checking whether the calculation result is the same as an expected structure.
Specifically, table data input by a user requests a background in http json format, a program is converted into a JAVA object through jsonobject, the object stores attributes of the table data and rule data, a correspondingly set rule is acquired, an sql (structured query language) integrated ibatis is used to query a database DB or a redis interface to query a redis database, a rule list is circularly traversed to acquire a formula identifier of each cell, the formula identifier of each cell can be stored in a temporary variable MAP, the table data submitted by the user is circularly traversed to replace the formula identifier of each cell with the table data to generate a data operation expression (for example, 2000+1000> -200), a JAVA integrated srripten engine is used to operate the expression to calculate a result, and then whether the calculation result is the same as an expected result is checked.
The feedback module 140 is configured to determine whether the preset type of table data passes verification, feed back first preset prompt information to the user when all the preset type of table data passes verification, and feed back second preset prompt information to the user when any one of the preset type of table data fails verification.
In this embodiment, whether the preset type of table data passes the verification is determined, when all the preset type of table data passes the verification, a first preset prompt message (for example, data is correct) is fed back to the user, and when any one of the preset type of table data fails the verification, a second preset prompt message (for example, data is wrong) is fed back to the user.
In an embodiment, after the verification operation is performed on the web page table, the verified table may be displayed, the display table may select a first display mode (e.g., a common table) or a second display mode (e.g., a binary tree mode), detailed information of each data may be visually and contrastingly viewed in the binary tree, and the front-end display of the related information may be implemented by a corresponding script.
In addition, the invention also provides a method for checking the table data. Fig. 3 is a schematic method flow chart of an embodiment of the method for checking tabular data according to the present invention. When the processor 12 of the electronic device 1 executes the verification program 10 of the table data stored in the memory 11, the following steps of the verification method of the table data are realized:
step S10: receiving a checking request of table data sent by a user, analyzing the checking request, and acquiring a configuration rule formula carried in the request.
In this embodiment, a request for checking table data sent by a user is received, a configuration rule formula carried in the request for obtaining is analyzed, in an actual application scenario, when an underwriter of a certain insurance institution needs to perform verification check of a custom formula on cells in a web form, the underwriter can pre-configure a configuration rule formula required by the check, the configuration rule formula is input through a human-computer interaction interface, the front-end configuration page displays configurable row and column identification options, and data with different dimensions (such as mechanisms, rule classification and the like) can be configured, the verification requirements of different user differences are met, the row and column identification options can be displayed by initializing corresponding data through the script, specifically, the server can load the data corresponding to the row and column options into the cache from a preset database, and the data corresponding to the row and column options can be obtained from the cache according to the row and column identification. Further, the user may also configure any combination of one or more of names, constants and operators (+, -,/, >, <, >,) in the configuration rule formula, for example: "vehicle insurance integral _ vehicle share promotion > is 0.01".
In an embodiment, it may be further determined whether the verification request is a malicious request, and when the verification request is a malicious request, it is determined that the verification request is an abnormal request, and the request is rejected and early warning information is generated; and when the request is not a malicious request, determining that the request is a normal request, and responding to the request to execute the subsequent steps.
Step S20: the configuration rule formula is converted into a rule expression based on a preset conversion rule, and the rule expression is stored in a preset database.
In this embodiment, the configuration rule formula is converted into a rule expression based on a preset conversion rule, and the rule expression is stored in a preset database. The data stored to the database can be directly obtained from the database when the user needs to verify the data again.
Wherein converting the configuration rule formula into a rule expression based on a preset conversion rule comprises:
the attribute information of the cells corresponding to the configuration rule formula is predefined and stored in the preset database, the configuration rule formula is analyzed based on the attribute information of the cells to obtain the attribute information of the configuration rule formula, and the attribute information of the configuration rule formula is filled in a preset expression template to generate the rule expression. For example:
defining the attributes of the row and column cells in a preset database by using an sql script, wherein the attributes comprise the following steps:
CO L _ 01-A planned premium, { "targetType": "01", "attebuseName": "premium" }
And receiving a unit row and column selected by a user at the front end and an operator selection item combination (for example, configuration: vehicle insurance integral-vehicle insurance fee + channel-vehicle trader-vehicle acceleration rate), and storing the codes of the selection items in JSON regular expressions through JS and Java programs.
Step S30: and acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression.
In this embodiment, the preset type of table data input by the user is acquired in real time, and the check operation processing is performed on the preset type of table data based on the regular expression. The report data of the preset type input by the user comprises three attributes, and each attribute of the report data is matched with the attribute of the regular expression.
The process of performing the checking operation on the report data of the preset type input by the user based on the regular expression specifically comprises the following steps: converting table data of a preset type input by a user into a JAVA object, acquiring the regular expression from the preset database, circularly traversing the preset cell list, acquiring a formula identifier of each cell in the cell list, traversing the table data submitted by the user based on the formula identifiers, replacing the formula identifier of each cell with corresponding table data to generate an operational expression, operating the operational expression by using a preset expression engine to obtain a calculation result, and checking whether the calculation result is the same as an expected structure.
Specifically, table data input by a user requests a background in http json format, a program is converted into a JAVA object through jsonobject, the object stores attributes of the table data and rule data, a correspondingly set rule is acquired, an sql (structured query language) integrated ibatis is used to query a database DB or a redis interface to query a redis database, a rule list is circularly traversed to acquire a formula identifier of each cell, the formula identifier of each cell can be stored in a temporary variable MAP, the table data submitted by the user is circularly traversed to replace the formula identifier of each cell with the table data to generate a data operation expression (for example, 2000+1000> -200), a JAVA integrated srripten engine is used to operate the expression to calculate a result, and then whether the calculation result is the same as an expected result is checked.
Step S40: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
In this embodiment, whether the preset type of table data passes the verification is determined, when all the preset type of table data passes the verification, a first preset prompt message (for example, data is correct) is fed back to the user, and when any one of the preset type of table data fails the verification, a second preset prompt message (for example, data is wrong) is fed back to the user.
In an embodiment, after the verification operation is performed on the web page table, the verified table may be displayed, the display table may select a first display mode (e.g., a common table) or a second display mode (e.g., a binary tree mode), detailed information of each data may be visually and contrastingly viewed in the binary tree, and the front-end display of the related information may be implemented by a corresponding script.
Furthermore, the embodiment of the present invention also provides a computer-readable storage medium, which may be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer readable storage medium includes a checking program 10 of table data, and when executed by a processor, the checking program 10 of table data implements the following operations:
a receiving step: receiving a verification request of table data sent by a user, analyzing the verification request, and acquiring a configuration rule formula carried in the request;
a conversion step: converting the configuration rule formula into a regular expression based on a preset conversion rule, and storing the regular expression into a preset database;
a checking step: acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression; and
a feedback step: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the above-mentioned table data checking method, and is not described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention essentially or contributing to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, an electronic device, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for checking table data is applied to an electronic device, and is characterized in that the method comprises the following steps:
a receiving step: receiving a verification request of table data sent by a user, analyzing the verification request, and acquiring a configuration rule formula carried in the request;
a conversion step: converting the configuration rule formula into a regular expression based on a preset conversion rule, and storing the regular expression into a preset database;
a checking step: acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression; and
a feedback step: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
2. A method for checking tabular data as claimed in claim 1, wherein said converting said configuration rule formula into a rule expression based on a preset conversion rule comprises:
predefining attribute information of the cells corresponding to the configuration rule formula and storing the attribute information into the preset database;
analyzing the configuration rule formula based on the attribute information of the cell to obtain the attribute information of the configuration rule formula;
and filling the attribute information of the configuration rule formula into a preset expression template to generate the rule expression.
3. A method for checking tabular data according to claim 1, wherein said performing checking operation processing on said preset type of tabular data based on said regular expression comprises:
traversing a preset cell list based on the regular expression to obtain formula identifiers of a plurality of cells in the cell list;
traversing the preset type of table data based on the formula identification, and replacing the formula identification of each cell with the corresponding preset type of table data to generate an operational expression;
and operating the operational expression by using a preset expression engine to obtain an operation result, and checking whether the operation result is the same as an expected result.
4. A method of validating tabular data as claimed in claim 1, wherein said configuration rule formula includes any combination of one or more of names, constants and operators.
5. A method of validating tabular data as claimed in any one of claims 1 to 4, wherein said receiving step further includes:
judging whether the check request is a malicious request, determining that the check request is an abnormal request when the check request is the malicious request, rejecting the request and generating early warning information; and when the request is not a malicious request, determining that the request is a normal request, and responding to the request to execute the conversion step.
6. An electronic device, comprising a memory and a processor, wherein a checking program of table data is stored in the memory, and the checking program of table data is executed by the processor, and the following steps are implemented:
a receiving step: receiving a verification request of table data sent by a user, analyzing the verification request, and acquiring a configuration rule formula carried in the request;
a conversion step: converting the configuration rule formula into a regular expression based on a preset conversion rule, and storing the regular expression into a preset database;
a checking step: acquiring preset type table data input by the user in real time, and executing verification operation processing on the preset type table data based on the regular expression; and
a feedback step: and judging whether the preset type table data passes the verification, feeding back first preset prompt information to the user when all the preset type table data passes the verification, and feeding back second preset prompt information to the user when any one preset type table data does not pass the verification.
7. The electronic device of claim 6, wherein the converting the configuration rule formula into a regular expression based on a preset conversion rule comprises:
predefining attribute information of the cells corresponding to the configuration rule formula and storing the attribute information into the preset database;
analyzing the configuration rule formula based on the attribute information of the cell to obtain the attribute information of the configuration rule formula;
and filling the attribute information of the configuration rule formula into a preset expression template to generate the rule expression.
8. The electronic device of claim 6, wherein the performing a check operation process on the preset type of table data based on the regular expression includes:
traversing a preset cell list based on the regular expression to obtain formula identifiers of a plurality of cells in the cell list;
traversing the preset type of table data based on the formula identification, and replacing the formula identification of each cell with the corresponding preset type of table data to generate an operational expression;
and operating the operational expression by using a preset expression engine to obtain an operation result, and checking whether the operation result is the same as an expected result.
9. The electronic device of claim 6, wherein the receiving step further comprises:
judging whether the check request is a malicious request, determining that the check request is an abnormal request when the check request is the malicious request, rejecting the request and generating early warning information; and when the request is not a malicious request, determining that the request is a normal request, and responding to the request to execute the conversion step.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a checking program of table data, and the checking program of table data implements the steps of the checking method of table data according to any one of claims 1 to 5 when executed by a processor.
CN202010109756.5A 2020-02-22 2020-02-22 Method for checking table data, electronic device and storage medium Pending CN111400380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010109756.5A CN111400380A (en) 2020-02-22 2020-02-22 Method for checking table data, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010109756.5A CN111400380A (en) 2020-02-22 2020-02-22 Method for checking table data, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN111400380A true CN111400380A (en) 2020-07-10

Family

ID=71433999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010109756.5A Pending CN111400380A (en) 2020-02-22 2020-02-22 Method for checking table data, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111400380A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113158633A (en) * 2021-04-16 2021-07-23 浙江鸿程计算机系统有限公司 Statistical report processing method and device
CN113807975A (en) * 2021-09-16 2021-12-17 平安健康保险股份有限公司 Method and device for checking information, computer equipment and storage medium
CN113806592A (en) * 2021-09-14 2021-12-17 北京天健源达科技股份有限公司 Method for processing electronic medical record display data
WO2022267457A1 (en) * 2021-06-22 2022-12-29 平安科技(深圳)有限公司 Method, apparatus, and device for processing spreadsheet data, and storage medium
WO2023124937A1 (en) * 2021-12-29 2023-07-06 北京字跳网络技术有限公司 Spreadsheet data validation method and apparatus, device, and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956410A (en) * 2016-07-01 2016-09-21 中国南方电网有限责任公司 Rapid universal detection method for IEC61850 full model
CN109558134A (en) * 2017-09-27 2019-04-02 北京京东尚科信息技术有限公司 The method and apparatus of business datum verification

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956410A (en) * 2016-07-01 2016-09-21 中国南方电网有限责任公司 Rapid universal detection method for IEC61850 full model
CN109558134A (en) * 2017-09-27 2019-04-02 北京京东尚科信息技术有限公司 The method and apparatus of business datum verification

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113158633A (en) * 2021-04-16 2021-07-23 浙江鸿程计算机系统有限公司 Statistical report processing method and device
WO2022267457A1 (en) * 2021-06-22 2022-12-29 平安科技(深圳)有限公司 Method, apparatus, and device for processing spreadsheet data, and storage medium
CN113806592A (en) * 2021-09-14 2021-12-17 北京天健源达科技股份有限公司 Method for processing electronic medical record display data
CN113807975A (en) * 2021-09-16 2021-12-17 平安健康保险股份有限公司 Method and device for checking information, computer equipment and storage medium
WO2023124937A1 (en) * 2021-12-29 2023-07-06 北京字跳网络技术有限公司 Spreadsheet data validation method and apparatus, device, and medium

Similar Documents

Publication Publication Date Title
CN111400380A (en) Method for checking table data, electronic device and storage medium
CN108388598B (en) Electronic device, data storage method, and storage medium
CN109947789B (en) Method, device, computer equipment and storage medium for processing data of multiple databases
CN110019486B (en) Data acquisition method, device, equipment and storage medium
CN108416485B (en) User identity recognition method, electronic device and computer readable storage medium
CN110647471B (en) Interface test case generation method, electronic device and storage medium
CN109471857B (en) SQL statement-based data modification method, device and storage medium
CN108628748B (en) Automatic test management method and automatic test management system
CN112559354A (en) Front-end code specification detection method and device, computer equipment and storage medium
CN107133233B (en) Processing method and device for configuration data query
CN113761012A (en) Analysis visualization method of remote sensing data, server and storage medium
CN111667231B (en) Automatic tax return method, device, system, computer equipment and storage medium
CN111459812A (en) Interface test case generation method, electronic device and storage medium
CN106354727B (en) Widget file generation method and device
CN116245074A (en) Chip verification method, device and storage medium
CN115455925A (en) Contract generation method and device, electronic equipment and storage medium
CN111402066A (en) Data processing method, server and storage medium
CN108805725B (en) Risk event confirmation method, server, and computer-readable storage medium
CN112000692B (en) Page query feedback method and device, computer equipment and readable storage medium
CN110837500B (en) Data screening method and device based on socal embedded window and computer equipment
CN113076094A (en) Front end component construction method and device and electronic equipment
CN112463799A (en) Data extraction method, device, equipment and storage medium
CN111767262A (en) Log display method, device, equipment and storage medium
CN111860641A (en) Power grid image identification method, electronic device and storage medium
CN110688315A (en) Interface code detection report generation method, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination