WO2023124937A1 - 一种表格数据验证方法、装置、设备及介质 - Google Patents

一种表格数据验证方法、装置、设备及介质 Download PDF

Info

Publication number
WO2023124937A1
WO2023124937A1 PCT/CN2022/138370 CN2022138370W WO2023124937A1 WO 2023124937 A1 WO2023124937 A1 WO 2023124937A1 CN 2022138370 W CN2022138370 W CN 2022138370W WO 2023124937 A1 WO2023124937 A1 WO 2023124937A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
format
target
verification
target cell
Prior art date
Application number
PCT/CN2022/138370
Other languages
English (en)
French (fr)
Inventor
林梓欢
温玮佳
谭枢铭
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023124937A1 publication Critical patent/WO2023124937A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging

Definitions

  • the present application relates to the field of computer technology, in particular to a form data verification method, device, equipment and medium.
  • a spreadsheet also known as a spreadsheet, is a series of cells composed of rows and columns.
  • Cells can store values, calculation formulas, text, etc.
  • spreadsheets support setting data validation for cells, so that data validation can be used to add certain restrictions to the entered data. For example, restricting only specific values to be entered in a cell, etc.
  • the present application provides a form data verification method, device, equipment and medium, so as to implement various restrictions through the data verification function of the cell, and meet the demand for more accurate and standardized data entry.
  • a form data verification method may include:
  • the format of the target data and the value of the target data are verified according to the data verification condition to obtain a verification result, and the format of the target data is a second format corresponding to the target cell.
  • a form data verification device is provided, and the device may include:
  • the first acquiring unit is configured to acquire data verification conditions set for the target cell in response to a user-triggered setting operation, where the data verification conditions include a first format and a data range;
  • the second acquiring unit is configured to acquire the target data input by the user in the target cell in response to the input operation triggered by the user;
  • the third acquisition unit is configured to verify the format of the target data and the value of the target data according to the data verification conditions, and obtain a verification result, and the format of the target data is the second cell corresponding to the target cell. Format.
  • an electronic device in a third aspect of the present application, includes: a processor and a memory;
  • said memory for storing instructions or computer programs
  • the processor is configured to execute the instructions or computer programs in the memory, so that the electronic device executes the form data verification method described in the first aspect.
  • a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a device, the device executes the method described in the first aspect. Form data validation method.
  • a computer program product is provided.
  • the computer program product is run on a computer, the computer is made to execute the form data verification method described in the first aspect.
  • the user can set the format of the target cell and the data verification condition of the cell, wherein the data verification condition includes the first format and the data range. That is, the data validation condition can not only verify the format of the input data in the cell, but also verify the range of the input data.
  • the data verification condition can not only verify the format of the input data in the cell, but also verify the range of the input data.
  • the target data is obtained, and the format and value of the target data are verified by using the set data verification conditions to obtain a verification result.
  • the format of the target data is the second format corresponding to the target cell. That is, use the data verification conditions to verify the format and value of the target data at the same time, so as to ensure that the format and value of the input target data match the format and data range restricted in the data verification conditions, and improve the accuracy of the target data.
  • Fig. 1 is a flow chart of a form data verification method provided by the embodiment of the present application.
  • FIG. 2a is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • Fig. 2b is a schematic rendering of a check box provided in the embodiment of the present application.
  • FIG. 2c is a schematic rendering of a progress bar provided in the embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a form data verification device provided in an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the data type may include: general, numerical value, currency, date, time, fraction, etc.
  • users can also set data validation for cells, so as to define the data that can be or should be input in cells by setting the validation conditions of data validation.
  • the data types that can be selected for the verification conditions in data verification include: integer, decimal, time, date, text length, etc., and the corresponding data range can also be set for the data types (data formats) that are allowed to be input. For example, if the verification condition selected is date, and the start date is set to 2021/11/1 and the end date is 2021/11/21, then the data verification only allows the user to enter between 2021/11/1-2021/11/21 The data.
  • the current data verification function is relatively strict in the verification of the data range, and there are still defects in the verification of the data type of the data, which cannot meet the more accurate and standardized information input requirements for data.
  • the data type of the cell format set by the user is "Numeric"
  • the data type in the data verification condition set for the cell is date
  • the start date is 2021/11/1
  • the end date is 2021/11/21
  • the data verification passes (only the data range is verified), and 44510.00 is displayed in the cell, It is not 2021/11/10; if the data entered by the user is 33100, since the date corresponding to the data is not within the above date range, it will prompt that the entered data is illegal.
  • the data type of the data verification condition set by the user is a date
  • the data input can pass the verification if and only if the data entered by the user is date type data.
  • date type data For example, when the user enters "2021/11/10" in the cell, the data type and value range both meet the set verification conditions, and 2021/11/10 is displayed in the cell.
  • the current data verification only supports the verification of the data range, and does not support the verification of the digital format, which cannot meet the actual needs.
  • the embodiment of the present application provides a form data verification method, so as to restrict the format of the cell when restricting the value of the cell, so that the input data meets actual requirements.
  • this figure is a flow chart of a form data verification method provided by the embodiment of the present application. As shown in Fig. 1, the method may include:
  • S101 In response to a setting operation triggered by a user, acquire a data verification condition set for a target cell.
  • the user in order to make the input data satisfy the preset condition, the user can set the data verification condition for the target cell, and the data verification condition includes the first format and the data range.
  • the data verification condition is used to verify whether the data input by the user in the target cell meets the preset condition, so as to ensure that the input data meets the user's requirements.
  • the target cell may be one or more cells in a table
  • the first format may include a data format and a rendering format.
  • the data format is used to indicate the type of data input in the target cell
  • the rendering format is used to indicate the style presented by the target cell.
  • Data format can include numeric type, date type, currency type, time type, etc.
  • rendering format can include check box format, progress bar format, cell style, font format, etc.
  • the cell style may include background style, border style, etc.
  • the font style may include font color, font type, alignment, etc.
  • the format set by the user in data validation is a checkbox format, it will be determined whether to render the cell as a checkbox based on the user input data. That is, when data validation is set for a cell, the cell can also be rendered according to a specific rendering rule, so that when the data entered in the cell conforms to the rendering rule, the user's desired presentation can be rendered in the cell style.
  • S102 In response to the input operation triggered by the user, acquire the target data input by the user in the target cell.
  • S103 Verify the format of the target data and the value of the target data according to the data verification condition, and obtain a verification result.
  • the target data input by the user will be obtained, and the format and value of the target data will be verified by using the pre-set data verification conditions, Get the verification result.
  • the value of the target data can be number, text or other verifiable content types.
  • the target data input by the user may be data that satisfies the data verification condition, or data that does not meet the data verification condition. Therefore, the verification result can include legitimate data and illegal data.
  • the data that does not meet the data verification conditions may include that the format of the target data does not meet the first format in the data verification conditions, and/or the value of the target data does not meet the data range in the data verification conditions.
  • the format of the target data refers to the second format corresponding to the target cell, that is, the cell format set by the user, and the second format mainly refers to the data format in the cell format.
  • the priority of the first format is higher than that of the second format, that is, the priority of the data format in data verification is higher than that of the data format in the cell format.
  • the target data in response to the format of the target data not matching the data format in the data verification condition, and/or the value of the target data not matching the data range in the data verification condition, it is determined that the target data is illegal data .
  • illegal data is invalid data.
  • the data format of the cell format set by the user is "value”
  • the data format in the data verification condition set for the cell is date
  • the start date is 2021/11/1
  • the end date is 2021/11/21
  • the target data is determined to be invalid.
  • each rendering format may have its corresponding data range. For example, when the rendering format is a checkbox format, it restricts the input of 0 or 1 to the cell, and if the target data entered by the user is 2, it is determined that the target data is invalid data; when the rendering format is a progress bar, it restricts the cell Input 0-1, if the target data input by the user is 1.1, it is determined that the target data is invalid data.
  • prompt information when it is determined through data verification that the target data is invalid data, prompt information may also be displayed, where the prompt information is used to prompt that the target data is invalid data.
  • the data format of the cell format set by the user is "value"
  • the data format in the data verification condition set for the cell is date, the start date is 2021/11/1, and the end date is 2021/11 /21
  • the target data input by the user is 40
  • the data verification condition set by the user is a check box
  • the data input condition corresponding to the check box is 0 or 1.
  • the target cell may also be rendered according to the verification result and the target data. That is, the content displayed in the target cell is determined according to the verification result and the target data. Specifically, in response to the fact that the first format is a data format and the verification result is invalid data, the target data is filled into the target cell, and the target cell is marked. This flag is used to prompt the user that the data in the target cell does not meet the conditions for data validation. For example, as shown in FIG. 2a, the data 40 is stored in a cell, and a triangle is marked on the upper right corner of the cell, so as to indicate that the data is invalid data through the triangle.
  • the target data is directly displayed in the cell.
  • the target cell when the first format is the rendering format, in response to the verification result being valid data, the target cell is rendered according to the rendering format and the target data; in response to the verification result being invalid data, the target Data is filled into the target cell and the target cell is marked. Wherein, the mark on the target cell is used to identify that the data in the target cell meets the conditions restricted by the data validation.
  • rendering the target cell according to the rendering format and the target data may include:
  • the verification result is valid data
  • the target data is the first value
  • a check box is displayed in the target cell, and the check box is in a selected state.
  • the first value may be preset, which is not limited in this embodiment. For example, if the first value is 1, and the user inputs 1 in the target form, a check box is displayed in the target form and the check box is in a selected state, as shown in the second check box in FIG. 2b.
  • the verification result is valid data
  • the target data is the second value
  • a check box is displayed in the target cell, and the check box is in an unselected state.
  • the second value is different from the first value. For example, if the second value is 0, and the user enters 0 in the target form, a check box is displayed in the target form but the check box is not selected, as shown in the first check box in FIG. 2b.
  • the first format is the progress bar format in the rendering format and the verification result is valid data
  • a progress bar is rendered in the target cell according to the target data
  • the length of the progress bar is related to the value of the target data. For example, as shown in Figure 2c, the data range corresponding to the progress bar is 0-1, and the target data input by the user is 0.5, then the length of the progress bar rendered in the target cell is half the length of the entire cell, and the displayed data is 0.5.
  • the first format is the checkbox format in the rendering format and the verification result is invalid data
  • no checkbox is displayed in the target cell. That is, when the target data entered by the user is invalid, the check box is not visible.
  • the first format is the progress bar format in the rendering format and the verification result is invalid data
  • no progress bar is rendered in the target cell.
  • the target data input by the user in the target cell is obtained; wherein the target data input by the user can be content data (for example, numbers, text or pictures, etc. ), it can also be formatting data, such as cell-like background style, border style, structural format, etc.
  • content data for example, numbers, text or pictures, etc.
  • formatting data such as cell-like background style, border style, structural format, etc.
  • verifying the format of the target data and the value of the target data according to the data verification condition in step 103 includes: judging whether the format of the cell is consistent with the value set in the verification condition Whether the format is consistent, the verification result is obtained according to the judgment result. For example, if the verification condition is set to the cell background color is red, then the user sets the cell color to yellow to fail the verification, and sets it to red to pass the verification; or set the verification condition to merge cells, filter cells or one of the frozen cells, then the verification will pass when the user sets the cell to the above format, otherwise the verification will not pass.
  • This embodiment can directly verify the format of the cell, breaking through the limitation that the traditional cell verification can only verify the input cell content, expanding the scope of cell verification, and enriching the verification in the process of editing the spreadsheet means.
  • the device may include: a first acquisition unit 301 , a second acquisition unit 302 and a third acquisition unit 303 .
  • the first acquiring unit 301 is configured to acquire data verification conditions set for the target cell in response to a user-triggered setting operation, where the data verification conditions include a first format and a data range;
  • the second acquiring unit 302 is configured to acquire the target data input by the user in the target cell in response to the input operation triggered by the user;
  • the third obtaining unit 303 is configured to verify the format of the target data and the value of the target data according to the data verification condition, and obtain a verification result, and the format of the target data is the first cell corresponding to the target cell. Second format.
  • the first format includes a data format and a rendering format
  • the data format is used to indicate the type of data input into the target cell
  • the rendering format is used to indicate the target cell grid rendering style
  • the data format includes at least one or more of numerical type, date type, currency type, and time type;
  • the rendering format includes a check box format or a progress bar format.
  • the third obtaining unit 303 is specifically configured to respond to the fact that the format of the target data does not match the data format in the data verification condition, and/or the value of the target data If it does not match the data range in the data verification condition, it is determined that the target data is invalid data.
  • the third acquiring unit 303 is specifically configured to respond to the first format being the rendering format and the data range of the target data being the same as the data range in the data verification condition does not match, determine that the target data is invalid data.
  • the device further includes: a display unit;
  • the display unit is configured to display a prompt message, and the prompt message is used to prompt that the target data is invalid data.
  • the device further includes: a processing unit;
  • the processing unit is configured to render the target cell according to the verification result and the target data.
  • the processing unit is specifically configured to, in response to the first format being a data format and the verification result being invalid data, filling the target data into the target cell, and marking the target cell; or, in response to the first format being a data format and the verification result being valid data, filling the target data into the target cell.
  • the processing unit is specifically configured to, in response to the first format being a rendering format and the verification result being valid data, perform an operation on the target according to the rendering format and the target data The cell is rendered; or, in response to the fact that the first format is a rendering format and the verification result is invalid data, filling the target data into the target cell and marking the target cell.
  • the processing unit is specifically configured to, in response to the first format being a check box format, the verification result being valid data, and the target data being a first value, in the A check box is displayed in the target cell, and the check box is in a selected state; or, in response to the fact that the first format is a check box format, the verification result is valid data, and the target data is a second value , to display a check box in the target cell, and the check box is in an unselected state.
  • the processing unit is specifically configured to, in response to the first format being a progress bar format and the verification result being valid data, rendering in the target cell according to the target data A progress bar, the length of the progress bar is related to the value of the target data.
  • the priority of the first format is higher than that of the second format.
  • FIG. 4 it shows a schematic structural diagram of an electronic device 400 suitable for implementing the embodiment of the present application.
  • the terminal equipment in the embodiment of the present application may include but not limited to mobile phones, notebook computers, digital broadcast receivers, PDA (Personal Digital Assistant, personal digital assistant), PAD (portable android device, tablet computer), PMP (Portable Media Player, portable multimedia player), mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs (television, television sets), desktop computers, and the like.
  • the electronic device shown in FIG. 4 is only an example, and should not limit the functions and scope of use of this embodiment of the present application.
  • an electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 401, which may be randomly accessed according to a program stored in a read-only memory (ROM) 402 or loaded from a storage device 408.
  • a processing device such as a central processing unit, a graphics processing unit, etc.
  • RAM read-only memory
  • various appropriate actions and processes are executed by programs in the memory (RAM) 403 .
  • RAM 403 In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored.
  • the processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404.
  • An input/output (I/O) interface 405 is also connected to bus 404 .
  • the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 407 such as a computer; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409.
  • the communication means 409 may allow the electronic device 400 to perform wireless or wired communication with other devices to exchange data. While FIG. 4 shows electronic device 400 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • the processes described above with reference to the flowcharts can be implemented as computer software programs.
  • the embodiments of the present application include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 409 , or from storage means 408 , or from ROM 402 .
  • the processing device 401 the above-mentioned functions defined in the methods of the embodiments of the present application are executed.
  • An embodiment of the present application provides a computer-readable medium on which a computer program is stored, wherein when the program is executed by a processor, the form data verification method as described in any of the above-mentioned embodiments is implemented.
  • the computer-readable medium mentioned above in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device is made to execute the above-mentioned form data verification method.
  • Computer program code for carrying out the operations of this application may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware.
  • the name of the unit/module does not constitute a limitation on the unit itself under certain circumstances, for example, the voice data collection module may also be described as a "data collection module”.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • each embodiment in this specification is described in a progressive manner, each embodiment focuses on the differences from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
  • the system or device disclosed in the embodiment since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for relevant details, please refer to the description of the method part.
  • At least one (item) means one or more, and “multiple” means two or more.
  • “And/or” is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, “A and/or B” can mean: only A exists, only B exists, and A and B exist at the same time , where A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship.
  • At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other Any other known storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请公开了一种表格数据验证方法,具体为,用户可以设置目标单元格的格式以及单元格的数据验证条件,其中,数据验证条件包括第一格式和数据范围。即数据验证条件不仅可以验证单元格中输入数据的格式,还可以验证输入数据的范围。在用户向目标单元格输入目标数据时,获取该目标数据,利用设置的数据验证条件对目标数据的格式以及目标数据的值进行验证,获得验证结果。其中,目标数据的格式为目标单元格对应的第二格式。即,利用数据验证条件同时对目标数据的格式以及值进行验证,以确保输入的目标数据的格式以及值与数据验证条件中所限制的格式以及数据范围相匹配,提高目标数据的准确性。

Description

一种表格数据验证方法、装置、设备及介质
本申请要求于2021年12月29日提交的申请号为202111643678.8、申请名称为“一种表格数据验证方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,具体涉及一种表格数据验证方法、装置、设备及介质。
背景技术
电子表格(Spreadsheet),又称电子数据表,是由一系列行与列构成的单元格。单元格内可以存放数值、计算式、文本等。目前,电子表格支持对单元格设置数据验证,以利用数据验证对输入的数据添加一定的限制条件。例如,限制单元格内只能输入特定的值等。
然而,目前单元格的数据验证功能限制能力较弱,无法满足对数据更准确、规范的数据录入的需求。
发明内容
有鉴于此,本申请提供一种表格数据验证方法、装置、设备及介质,以实现通过单元格的数据验证功能进行多方面的限制,满足对数据更准确、规范的数据录入需求。
为实现上述目的,本申请提供的技术方案如下:
在本申请第一方面,提供了一种表格数据验证方法,该方法可以包括:
响应于用户触发的设置操作,获取针对目标单元格设置的数据验证条件,所述数据验证条件包括第一格式和数据范围;
响应于用户触发的输入操作,获取用户在所述目标单元格输入的目标数据;
根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,所述目标数据的格式为所述目标单元格对应的第二格式。
在本申请第二方面,提供了一种表格数据验证装置,该装置可以包括:
第一获取单元,用于响应于用户触发的设置操作,获取针对目标单元格设置的数据验证条件,所述数据验证条件包括第一格式和数据范围;
第二获取单元,用于响应于用户触发的输入操作,获取用户在所述目标单元格输入的目标数据;
第三获取单元,用于根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,所述目标数据的格式为所述目标单元格对应的第二格式。
在本申请第三方面,提供了一种电子设备,所述设备包括:处理器和存储器;
所述存储器,用于存储指令或计算机程序;
所述处理器,用于执行所述存储器中的所述指令或计算机程序,以使得所述电子设备执行第一方面所述的表格数据验证方法。
在本申请第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在设备上运行时,使得所述设备执行第一方面所述的表格数据验证方法。
在本申请第五方面,提供了一种计算机程序产品,当所述计算机程序产品在计算机上 运行时,使得计算机执行第一方面所述的表格数据验证方法。
由此可见,本申请实施例具有如下有益效果:
在本申请中,用户可以设置目标单元格的格式以及单元格的数据验证条件,其中,数据验证条件包括第一格式和数据范围。即数据验证条件不仅可以验证单元格中输入数据的格式,还可以验证输入数据的范围。在用户向目标单元格输入目标数据时,获取该目标数据,利用设置的数据验证条件对目标数据的格式以及目标数据的值进行验证,获得验证结果。其中,目标数据的格式为目标单元格对应的第二格式。即,利用数据验证条件同时对目标数据的格式以及值进行验证,以确保输入的目标数据的格式以及值与数据验证条件中所限制的格式以及数据范围相匹配,提高目标数据的准确性。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种表格数据验证方法流程图;
图2a为本申请实施例提供的一种应用场景示意图;
图2b为本申请实施例提供的一种复选框渲染示意图;
图2c为本申请实施例提供的一种进度条渲染示意图;
图3为本申请实施例提供的一种表格数据验证装置结构示意图;
图4为本申请实施例提供的一种电子设备结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在实际应用中,用户在使用表格处理数据时,可以根据自身的需求对单元格格式中的数据类型进行设置,以确保所输入的数据可以按照设置的数据类型进行显示。其中,数据类型可以包括:常规、数值、货币、日期、时间、分数等。进一步地,为了提高工作效率,避免非法数据的录入,用户还可以针对单元格设置数据验证,以通过设置数据验证的验证条件定义可以在单元格输入或应该在单元格输入的数据。例如,数据验证中的验证条件可以选择的数据类型包括:整数、小数、时间、日期、文本长度等,而且还可以针对允许输入的数据类型(数据格式)设置对应的数据范围。例如,选择的验证条件为日期,同时设置起始日期为2021/11/1、结束日期为2021/11/21,则数据验证仅允许用户输入2021/11/1-2021/11/21之间的数据。
然而,目前数据验证功能在对数据范围的验证上较为严格,而对于数据的数据类型的验证还有缺陷,无法满足对数据要求更准确、规范的信息输入需求。例如,用户设置的单元格格式的数据类型为“数值”、针对单元格设置的数据验证条件中数据类型为日期、起始 日期为2021/11/1、结束日期为2021/11/21,当用户输入的数据为44510时,由于该44510对应的日期为2021/11/10,该日期位于上述日期范围之内,数据验证通过(仅对数据范围进行了验证),在单元格格内显示44510.00,并非是2021/11/10;如果用户输入的数据为33100时,由于该数据对应的日期未位于上述日期范围内,将提示输入的数据非法。
通常情况下,用户设置的数据验证条件的数据类型为日期,在进行数据输入时,当且仅当用户输入的数据为日期类型的数据时才能通过验证。例如,用户在单元格内输入“2021/11/10”时,数据类型和数值范围才均满足设置的验证条件,在单元格内显示2021/11/10。然而,目前的数据验证仅支持数据范围的验证,不支持对数字格式的验证,无法满足实际需求。
基于此,本申请实施例提供了一种表格数据验证方法,以实现在限制单元格的值时,限制单元格的格式,以使得输入的数据满足实际需求。
为便于理解本申请实施例提供的技术方案,下面将结合附图进行说明。
参见图1,该图为本申请实施例提供的一种表格数据验证方法流程图,如图1所示,该方法可以包括:
S101:响应于用户触发的设置操作,获取针对目标单元格设置的数据验证条件。
本实施例中,为使得输入的数据满足预设条件,用户可以针对目标单元格设置数据验证条件,该数据验证条件包括第一格式和数据范围。其中,数据验证条件用于验证用户在目标单元格内输入的数据是否符合预设条件,从而保证输入的数据满足用户需求。
其中,目标单元格可以是一个表格中的一个或多个单元格,第一格式可以包括数据格式和渲染格式。其中,数据格式用于指示输入目标单元格中数据的类型,渲染格式用于指示目标单元格呈现的样式。数据格式可以包括数值类型、日期类型、货币类型、时间类型等;渲染格式可以包括复选框格式、进度条格式、单元格样式、字体格式等。其中,单元格样式可以包括背景样式、边框样式等;字体样式可以包括字体颜色、字体类型、对齐方式等。例如,当用户在数据验证中设置的格式为复选框格式,则将根据用户输入数据确定是否将单元格渲染为复选框。即,对单元格设置数据验证时,还可以按照特定的渲染规则对单元格进行渲染,以使得当单元格中所输入的数据符合渲染规则时,可以在该单元格渲染出用户所需的呈现样式。
S102:响应于用户触发的输入操作,获取用户在目标单元格输入的目标数据。
S103:根据数据验证条件对目标数据的格式以及目标数据的值进行验证,获得验证结果。
在本公开的一些实施例中,在用户向目标单元格内输入数据时,将获取用户输入的目标数据,并利用预先设置好的数据验证条件对目标数据的格式以及目标数据的值进行验证,获得验证结果。其中,目标数据的值可以为数字、文字或其他可验证的内容类型。
在本公开的一些实施例中,用户输入的目标数据可能为满足数据验证条件的数据,也可能为不满足数据验证条件的数据。因此,验证结果可以包括合法数据和非法数据。进一步,对于不满足数据验证条件的数据可以包括目标数据的格式不满足数据验证条件中的第 一格式,和/或目标数据的值不满足数据验证条件中的数据范围。其中,目标数据的格式是指目标单元格对应的第二格式,即用户设置的单元格格式,该第二格式主要是指单元格格式中的数据格式。本实施例中,第一格式的优先级高于第二格式的优先级,即在,数据验证中的数据格式优先级高于单元格格式中的数据格式。
在本公开的一些实施例中,响应于目标数据的格式与数据验证条件中的数据格式不匹配,和/或目标数据的值与数据验证条件中的数据范围不匹配,确定目标数据为非法数据。其中,非法数据即为无效数据。例如,用户设置的单元格格式的数据格式为“数值”、针对单元格设置的数据验证条件中数据格式为日期、起始日期为2021/11/1、结束日期为2021/11/21,当用户输入的数据为44510时,将对目标数据的数据格式和数据范围进行验证,由于目标数据的数据格式为“数值”与数据验证中的数据格式“日期”不符,将确定输入的数据44510为无效数据。再例如如果用户输入的数据为33100时,由于目标数据的数据格式与数据验证条件中的数据格式“日期”不符,且该数据对应的日期未位于上述日期范围内,确定目标数据为无效数据。
在本公开的一些实施例中,当第一格式为渲染格式,且目标数据的值与数据验证条件中的数据范围不匹配时,确定目标数据为无效数据。即,在数据验证的第一格式为渲染格式时,每种渲染格式可以存在其对应的数据范围。例如,渲染格式为复选框格式时,其限制单元格输入0或1,如果用户输入的目标数据为2,则确定该目标数据为无效数据;当渲染格式为进度条时,其限制单元格输入0-1,如果用户输入的目标数据为1.1,则确定该目标数据为无效数据。
在本公开的一些实施例中,当通过数据验证确定出目标数据为无效数据时,还可以显示提示信息,该提示信息用于提示目标数据为无效数据。例如图2a所示,用户设置的单元格格式的数据格式为“数值”、针对单元格设置的数据验证条件中数据格式为日期、起始日期为2021/11/1、结束日期为2021/11/21;用户输入的目标数据为40,在根据数据验证条件对该目标数据验证时,确定该数据为无效数据,则显示提示消息。再例如,图2b所示,用户设置的数据验证条件为复选框,该复选框对应的数据输入条件为0或1,当用户输入的数据为3时,将确定该数据为无效数据,则显示提示消息。
在本公开的一些实施例中,在确定出验证结果后,还可以根据验证结果以及目标数据对目标单元格进行渲染。即,根据验证结果以及目标数据确定目标单元格中所展示的内容。具体地,响应于第一格式为数据格式且验证结果为无效数据,将目标数据填充至目标单元格,并对该目标单元格进行标记。该标记用于提示用户该目标单元格中的数据不符合数据验证的条件。例如,图2a所示,将数据40存储在单元格,并在单元格的右上角标记三角形,以通过该三角形提示该数据为无效数据。或者,响应于第一格式为数据格式且验证结果为有效数据,将目标数据填充至目标单元格。即,当目标数据的数据格式和值符合数据验证条件中的数据格式和数据范围时,直接将该目标数据显示在单元格内。
在本公开的一些实施例中,当第一格式为渲染格式时,响应于验证结果为有效数据,则根据渲染格式以及目标数据对目标单元格进行渲染;响应于验证结果为无效数据,将目标数据填充至目标单元格,并对该目标单元格进行标记。其中,对目标单元格的标记用于 标识目标单元格中的数据符合数据验证所限制的条件。
在本公开的一些实施例中,当第一格式为渲染格式时,响应于验证结果为有效数据,则根据渲染格式以及目标数据对目标单元格进行渲染,可以包括:
当第一格式为渲染格式中的复选框格式、验证结果为有效数据且目标数据为第一值时,在目标单元格中显示复选框,该复选框处于被选中状态。其中,第一值可以预先设定,本实施例在此不再限定。例如,第一值为1,用户在目标表格中输入1,则在目标表格中显示复选框且该复选框处于被选中状态,如图2b中第二个复选框所示。
当第一格式为渲染格式中的复选框格式、验证结果为有效数据且目标数据为第二值,在目标单元格中显示复选框,该复选框处于未被选中状态。其中,第二值与第一值不同。例如,第二值为0,用户在目标表格中输入0,则在目标表格中显示复选框但该复选框处于未被选中状态,如图2b中第一个复选框所示。
当第一格式为渲染格式中的进度条格式且验证结果为有效数据,则根据目标数据在目标单元格中渲染进度条,该进度条的长度与目标数据的值相关。例如图2c所述,进度条对应的数据范围为0-1,用户输入的目标数据为0.5,则目标单元格中所渲染的进度条长度整个单元格长度的一半,并显示数据0.5。
需要说明的是,当第一格式为渲染格式中的复选框格式且验证结果为无效数据时,在目标单元格中不显示复选框。即,在用户输入的目标数据为无效数据时,复选框不可见。当第一格式为渲染格式中的进度条格式且验证结果为无效数据时,在目标单元格中不渲染进度条。
在本公开的一些实施例中,步骤102中响应于用户触发的输入操作,获取用户在目标单元格输入的目标数据;其中用户输入的目标数据可以为内容数据(例如,数字、文字或图片等),也可以为格式数据,例如单元格样的背景样式、边框样式、结构格式等。
在本公开的一些实施例中,当目标数据为格式数据时,步骤103中根据数据验证条件对目标数据的格式以及目标数据的值进行验证包括:判断单元格的格式是否与验证条件中设置的格式是否一致,根据判断结果获得验证结果。例如,将验证条件设置为单元格背景颜色为红色,那么用户在将单元格的颜色设置为黄色则验证不通过,设置为红色则验证通过;或者将验证条件设置为合并单元格、筛选单元格或冻结单元格中的一种,那么用户在将单元格设置为上述格式时则验证通过,反之则验证不通过。本实施例可以直接对单元格的格式进行验证,突破了传统单元格验证仅可以对输入的单元格内容进行验证的局限性,扩展了单元格验证的范围,丰富了电子表格编辑过程中的验证手段。
基于上述方法实施例,本申请实施例提供了一种表格数据验证装置和电子设备,下面将结合附图进行说明。
参见图3,该图为本申请实施例提供了一种表格数据验证装置结构图,如图3所示,该装置可以包括:第一获取单元301、第二获取单元302和第三获取单元303。
第一获取单元301,用于响应于用户触发的设置操作,获取针对目标单元格设置的数据验证条件,所述数据验证条件包括第一格式和数据范围;
第二获取单元302,用于响应于用户触发的输入操作,获取用户在所述目标单元格输入的目标数据;
第三获取单元303,用于根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,所述目标数据的格式为所述目标单元格对应的第二格式。
在一种具体的实现方式中,所述第一格式包括数据格式和渲染格式,所述数据格式用于指示输入所述目标单元格中数据的类型,所述渲染格式用于指示所述目标单元格呈现的样式。
在一种具体的实现方式中,所述数据格式至少包括数值类型、日期类型、货币类型、时间类型中的一种或多种;所述渲染格式包括复选框格式、或进度条格式。
在一种具体的实现方式中,所述第三获取单元303,具体用于响应于所述目标数据的格式与所述数据验证条件中的数据格式不匹配,和/或所述目标数据的值与所述数据验证条件中的数据范围不匹配,确定所述目标数据为无效数据。
在一种具体的实现方式中,所述第三获取单元303,具体用于响应于所述第一格式为所述渲染格式且所述目标数据的数据范围与所述数据验证条件中的数据范围不匹配,确定所述目标数据为无效数据。
在一种具体的实现方式中,所述装置还包括:显示单元;
所述显示单元,用于显示提示消息,所述提示消息用于提示所述目标数据为无效数据。
在一种具体的实现方式中,所述装置还包括:处理单元;
所述处理单元,用于根据所述验证结果以及所述目标数据对所述目标单元格进行渲染。
在一种具体的实现方式中,所述处理单元,具体用于响应于所述第一格式为数据格式且所述验证结果为无效数据,将所述目标数据填充至所述目标单元格,并对所述目标单元格进行标记;或者,响应于所述第一格式为数据格式且所述验证结果为有效数据,将所述目标数据填充至所述目标单元格。
在一种具体的实现方式中,所述处理单元,具体用于响应于所述第一格式为渲染格式且所述验证结果为有效数据,根据所述渲染格式以及所述目标数据对所述目标单元格进行渲染;或者,响应于所述第一格式为渲染格式且所述验证结果为无效数据,将所述目标数据填充至所述目标单元格,并对所述目标单元格进行标记。
在一种具体的实现方式中,所述处理单元,具体用于响应于所述第一格式为复选框格式、所述验证结果为有效数据且所述目标数据为第一值,在所述目标单元格中显示复选框,所述复选框处于被选中状态;或者,响应于所述第一格式为复选框格式、所述验证结果为有效数据且所述目标数据为第二值,在所述目标单元格中显示复选框,所述复选框处于未被选中状态。
在一种具体的实现方式中,所述处理单元,具体用于响应于所述第一格式为进度条格式且所述验证结果为有效数据,根据所述目标数据在所述目标单元格中渲染进度条,所述进度条的长度与所述目标数据的值相关。
在一种具体的实现方式中,所述第一格式的优先级高于所述第二格式。
需要说明的是,本实施例中各个单元的实现可以参见上述方法实施例,本实施例在此不再赘述。
参见图4,其示出了适于用来实现本申请实施例的电子设备400的结构示意图。本申请实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(Personal Digital Assistant,个人数字助理)、PAD(portable android device,平板电脑)、PMP(Portable Media Player,便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV(television,电视机)、台式计算机等等的固定终端。图4示出的电子设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图4所示,电子设备400可以包括处理装置(例如中央处理器、图形处理器等)401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储装置408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。在RAM403中,还存储有电子设备400操作所需的各种程序和数据。处理装置401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。
通常,以下装置可以连接至I/O接口405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置406;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置407;包括例如磁带、硬盘等的存储装置408;以及通信装置409。通信装置409可以允许电子设备400与其他设备进行无线或有线通信以交换数据。虽然图4示出了具有各种装置的电子设备400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本申请的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置409从网络上被下载和安装,或者从存储装置408被安装,或者从ROM402被安装。在该计算机程序被处理装置401执行时,执行本申请实施例的方法中限定的上述功能。
本申请实施例提供的电子设备与上述实施例提供的表格数据验证方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。
本申请实施例提供一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如上述任一实施例所述的表格数据验证方法。
需要说明的是,本申请上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器 件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述表格数据验证方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元/模块的名称在某种情况下并不构成对该单元本身的限定,例如, 语音数据采集模块还可以被描述为“数据采集模块”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本申请的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
需要说明的是,本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统或装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般 原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (16)

  1. 一种表格数据验证方法,其特征在于,所述方法包括:
    响应于用户触发的设置操作,获取针对目标单元格设置的数据验证条件,所述数据验证条件包括第一格式和数据范围;
    响应于用户触发的输入操作,获取用户在所述目标单元格输入的目标数据;
    根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,所述目标数据的格式为所述目标单元格对应的第二格式。
  2. 根据权利要求1所述的方法,其特征在于,所述第一格式包括数据格式和渲染格式,所述数据格式用于指示输入所述目标单元格中数据的类型,所述渲染格式用于指示所述目标单元格呈现的样式。
  3. 根据权利要求2所述的方法,其特征在于,所述数据格式至少包括数值类型、日期类型、货币类型、时间类型中的一种或多种;所述渲染格式包括复选框格式、进度条格式。
  4. 根据权利要求2或3所述的方法,其特征在于,所述根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,包括:
    响应于所述目标数据的格式与所述数据验证条件中的数据格式不匹配,和/或所述目标数据的值与所述数据验证条件中的数据范围不匹配,确定所述目标数据为无效数据。
  5. 根据权利要求2或3所述的方法,其特征在于,所述根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,包括:
    响应于所述第一格式为所述渲染格式且所述目标数据的数据范围与所述数据验证条件中的数据范围不匹配,确定所述目标数据为无效数据。
  6. 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:
    显示提示消息,所述提示消息用于提示所述目标数据为无效数据。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据所述验证结果以及所述目标数据对所述目标单元格进行渲染。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述验证结果以及所述目标数据对所述目标单元格进行渲染,包括:
    响应于所述第一格式为数据格式且所述验证结果为无效数据,将所述目标数据填充至所述目标单元格,并对所述目标单元格进行标记;或者,
    响应于所述第一格式为数据格式且所述验证结果为有效数据,将所述目标数据填充至所述目标单元格。
  9. 根据权利要求7所述的方法,其特征在于,所述根据所述验证结果以及所述目标数据对所述目标单元格进行渲染,包括:
    响应于所述第一格式为渲染格式且所述验证结果为有效数据,根据所述渲染格式以及所述目标数据对所述目标单元格进行渲染;或者,
    响应于所述第一格式为渲染格式且所述验证结果为无效数据,将所述目标数据填充至所述目标单元格,并对所述目标单元格进行标记。
  10. 根据权利要求9所述的方法,其特征在于,所述响应于所述第一格式为渲染格式且 所述验证结果为有效数据,根据所述渲染格式以及所述目标数据对所述目标单元格进行渲染,包括:
    响应于所述第一格式为复选框格式、所述验证结果为有效数据且所述目标数据为第一值,在所述目标单元格中显示复选框,所述复选框处于被选中状态;或者,
    响应于所述第一格式为复选框格式、所述验证结果为有效数据且所述目标数据为第二值,在所述目标单元格中显示复选框,所述复选框处于未被选中状态。
  11. 根据权利要求9所述的方法,其特征在于,所述响应于所述第一格式为渲染格式且所述验证结果为有效数据,根据所述渲染格式以及目标数据对所述目标单元格进行渲染,包括:
    响应于所述第一格式为进度条格式且所述验证结果为有效数据,根据所述目标数据在所述目标单元格中渲染进度条,所述进度条的长度与所述目标数据的值相关。
  12. 根据权利要求1所述的方法,其特征在于,所述第一格式的优先级高于所述第二格式。
  13. 一种表格数据验证装置,其特征在于,所述装置包括:
    第一获取单元,用于响应于用户触发的设置操作,获取针对目标单元格设置的数据验证条件,所述数据验证条件包括第一格式和数据范围;
    第二获取单元,用于响应于用户触发的输入操作,获取用户在所述目标单元格输入的目标数据;
    第三获取单元,用于根据所述数据验证条件对所述目标数据的格式以及所述目标数据的值进行验证,获得验证结果,所述目标数据的格式为所述目标单元格对应的第二格式。
  14. 一种电子设备,其特征在于,所述设备包括:处理器和存储器;
    所述存储器,用于存储指令或计算机程序;
    所述处理器,用于执行所述存储器中的所述指令或计算机程序,以使得所述电子设备执行权利要求1-12任一项所述的表格数据验证方法。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在设备上运行时,使得所述设备执行权利要求1-12任一项所述的表格数据验证方法。
  16. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得计算机执行权利要求1-12任一项所述的表格数据验证方法。
PCT/CN2022/138370 2021-12-29 2022-12-12 一种表格数据验证方法、装置、设备及介质 WO2023124937A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111643678.8A CN114357954A (zh) 2021-12-29 2021-12-29 一种表格数据验证方法、装置、设备及介质
CN202111643678.8 2021-12-29

Publications (1)

Publication Number Publication Date
WO2023124937A1 true WO2023124937A1 (zh) 2023-07-06

Family

ID=81103419

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138370 WO2023124937A1 (zh) 2021-12-29 2022-12-12 一种表格数据验证方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN114357954A (zh)
WO (1) WO2023124937A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114357954A (zh) * 2021-12-29 2022-04-15 北京字跳网络技术有限公司 一种表格数据验证方法、装置、设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101252A1 (en) * 2005-10-27 2007-05-03 Microsoft Corporation Variable formatting of cells
US20170357628A1 (en) * 2016-06-08 2017-12-14 j5 International IP Corporation Spreadsheet-Based Form Design and Data Input
CN111400380A (zh) * 2020-02-22 2020-07-10 中国平安财产保险股份有限公司 表格数据的校验方法、电子装置及存储介质
CN112507677A (zh) * 2020-12-02 2021-03-16 建信金融科技有限责任公司 一种电子表单录入及展示的方法和装置
CN114357954A (zh) * 2021-12-29 2022-04-15 北京字跳网络技术有限公司 一种表格数据验证方法、装置、设备及介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451112B (zh) * 2017-07-24 2024-01-23 网易(杭州)网络有限公司 表格工具数据检查方法、装置、终端设备及存储介质
CN109408506B (zh) * 2018-09-05 2020-12-11 天津字节跳动科技有限公司 表格数据处理方法和装置
CN109522452B (zh) * 2018-11-13 2023-09-05 南京烽火星空通信发展有限公司 一种海量半结构化数据的处理方法
CN113504957A (zh) * 2021-07-27 2021-10-15 平安普惠企业管理有限公司 表格数据处理方法、装置、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101252A1 (en) * 2005-10-27 2007-05-03 Microsoft Corporation Variable formatting of cells
US20170357628A1 (en) * 2016-06-08 2017-12-14 j5 International IP Corporation Spreadsheet-Based Form Design and Data Input
CN111400380A (zh) * 2020-02-22 2020-07-10 中国平安财产保险股份有限公司 表格数据的校验方法、电子装置及存储介质
CN112507677A (zh) * 2020-12-02 2021-03-16 建信金融科技有限责任公司 一种电子表单录入及展示的方法和装置
CN114357954A (zh) * 2021-12-29 2022-04-15 北京字跳网络技术有限公司 一种表格数据验证方法、装置、设备及介质

Also Published As

Publication number Publication date
CN114357954A (zh) 2022-04-15

Similar Documents

Publication Publication Date Title
EP3547153A1 (en) Interactive geographical map
WO2020233166A1 (zh) 评论数据的提供、显示方法、装置、电子设备及存储介质
WO2022111591A1 (zh) 页面生成方法和装置、存储介质和电子设备
WO2022233311A1 (zh) 展示方法、装置和电子设备
WO2023124937A1 (zh) 一种表格数据验证方法、装置、设备及介质
WO2021197023A1 (zh) 多媒体资源筛选方法、装置、电子设备及计算机存储介质
CN110069459B (zh) 文件监控方法、装置和电子设备
WO2023124934A1 (zh) 一种表格数据处理方法、装置、设备及介质
WO2023065825A1 (zh) 信息处理方法、装置、设备及介质
US20240302947A1 (en) Method, apparatus, electronic device and storage medium for displaying reminding information
WO2023143070A1 (zh) 协同编辑的信息展示方法、装置、电子设备和可读介质
WO2023029850A1 (zh) 一种数据处理方法、装置、电子设备和介质
CN115587575A (zh) 数据表创建方法、目标数据查询方法、装置及设备
CN110069547B (zh) 在线数据库表格数据统计方法、装置、介质和电子设备
US20240086389A1 (en) Method, device and apparatus for spreadsheet importing, and medium
WO2022083239A1 (zh) 文字显示方法、装置、电子设备及计算机可读存储介质
WO2024109860A1 (zh) 一种交互方法、装置、电子设备、计算机可读介质
WO2023131263A1 (zh) 一种群成员添加方法、装置、设备及介质
US20220365644A1 (en) User interface presentation method and apparatus, computer-readable medium and electronic device
US20230409813A1 (en) Document processing method, apparatus and device, and medium
JP7223857B2 (ja) ドキュメントマーキング方法及び装置
WO2023001276A1 (zh) 信息展示方法、装置、终端和存储介质
WO2023001281A1 (zh) 表格数据处理方法、装置、终端和存储介质
WO2023088379A1 (zh) 表格处理方法、装置、电子设备和存储介质
WO2022017458A1 (zh) 同步数据方法、装置、电子设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914192

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE