Method and system for processing discrete data in spreadsheet, medium and electronic equipment
By using QLExpress for discrete data processing in spreadsheets, the problem of displaying data distributed in different rows or columns is solved, automatic aggregation calculation and intuitive display are realized, user operations are simplified, and configuration complexity and error risks are reduced.
Patent Information
- Application Number
- CN202410449501.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-10-01
AI Technical Summary
When a spreadsheet displays discrete data that needs to be aggregated, the data may be distributed in different rows or columns, resulting in display limitations. Users need to use JavaScript scripts or configure multiple tables, which increases complexity and the risk of errors.
Provides a method for processing discrete data in spreadsheets. By obtaining the discrete data parameters and data processing method parameters configured by the user, it uses the open source rule engine QLExpress to perform analysis and aggregation calculations to achieve automatic aggregation and calculation of discrete cell data and display calculations. result.
It realizes the automatic processing of discrete data in spreadsheets according to user needs, reduces the difficulty of user operations, simplifies the configuration process, and improves the intuitiveness and accuracy of data display.
Smart Images

Figure CN118734818A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a discrete data processing method, system, medium and electronic device in an electronic spreadsheet. Background Art
[0002] When users use spreadsheets to display data or do data statistics, they often aggregate or calculate the data of the desired combination of dimensions, and then display or compare the results. Since a spreadsheet is a two-dimensional table, data display is based on the row and column structure, which leads to certain limitations in the display of spreadsheet data. When users need to aggregate and display data of a certain dimension combination, the data to be aggregated may be discretely distributed in different rows or columns. Simple data tiling is not enough, so JavaScript scripts have to be used for secondary processing or multiple tables have to be configured to meet the needs of use.
[0003] Scripts or multiple tables not only place high technical requirements on users, but also increase the complexity of configuration and the risk of errors. Summary of the invention
[0004] The present application provides a method, system, medium and electronic device for processing discrete data in an electronic form, which are used to automatically process discrete data in an electronic form according to the calculation and display requirements of the user.
[0005] In a first aspect, an embodiment of the present application provides a method for processing discrete data in a spreadsheet, comprising: before the spreadsheet is opened, obtaining discrete data parameters and data processing method parameters of the spreadsheet configured by the user; in response to receiving an opening instruction of the spreadsheet, parsing the discrete data parameters and the data processing method parameters, obtaining row and column dimension combination data and a dimension data calculation method, and obtaining discrete cell data and a discrete data calculation method based on the row and column dimension combination data and the dimension data calculation method; performing aggregation calculation on the discrete cell data to obtain discrete data aggregation results, and performing calculations based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain calculation results; after the spreadsheet is opened, displaying the calculation results on the spreadsheet.
[0006] In an implementation of the first aspect, obtaining discrete data parameters and data processing method parameters of a user-configured electronic form includes: providing a parameter configuration interface; the parameter configuration interface includes at least a discrete parameter configuration box for configuring the discrete data parameters and a data processing method configuration box for configuring the data processing method parameters; obtaining the discrete data parameters from the discrete parameter configuration box, and obtaining the data processing method parameters from the data processing method configuration box.
[0007] In an implementation of the first aspect, the discrete parameters include the row number and column number of the selected cell; wherein there are more than two cells.
[0008] In an implementation of the first aspect, when there are more than one cells, the cells are adjacent cells in the same row or column or cells with a gap, or the cells are cells in different rows or columns.
[0009] In an implementation of the first aspect, the data processing method parameters include: a row header or a column header, a discrete data calculation formula that performs operations with a row keyword or a column keyword, and a combination of the discrete data calculation formula and constraints; wherein the row keyword corresponds to a preset row marker, and the column keyword corresponds to a preset column marker; and the constraints are configured in the form of text or programming grammar sentences.
[0010] In an implementation of the first aspect, the parsing of the discrete data parameters and the data processing method parameters to obtain row-column dimension combination data and the dimension data calculation method, and obtaining discrete cell data and the discrete data calculation method based on the row-column dimension combination data and the dimension data calculation method includes: calling the open source rule engine QLExpress, parsing the discrete data parameters and the data processing method parameters through the open source rule engine QLExpress to obtain row-column dimension combination data and the dimension data calculation method, and obtaining discrete cell data and the discrete data calculation method based on the row-column dimension combination data and the dimension data calculation method; using the DataContainer in QLExpress as a stack to encapsulate the obtained discrete cell data and the data calculation method.
[0011] In an implementation of the first aspect, the method of obtaining discrete cell data and calculating discrete data also includes: detecting whether the corresponding cell has corresponding cell data based on the discrete data parameters; in response to the corresponding cell not having corresponding cell data, requesting a remote device to obtain the corresponding cell data.
[0012] In an implementation of the first aspect, the aggregation calculation of the discrete cell data includes: obtaining a data aggregation method; calling an aggregation function in the QLExpress module based on the data aggregation method; wherein the aggregation function is any one of sum, avg, max, and min; and performing aggregation calculation on the discrete cell data through the aggregation function to generate a discrete data aggregation result.
[0013] In an implementation of the first aspect, it also includes: configuring the display method of the calculation results, including: configuring any one or more combinations of row and / or column field names, display decimal places, data types, negative number display formats, and zero value display methods.
[0014] In an implementation of the first aspect, after the spreadsheet is opened, displaying the calculation result in the spreadsheet includes: obtaining the current row and column data area of the spreadsheet; determining the fill position of the calculation result based on the current row and column data area; calling the spreadsheet's data filling tool or VLOOKUP function to fill the data of the spreadsheet into the current row and column data area and the fill position of the calculation result.
[0015] In a second aspect, an embodiment of the present application provides a discrete data processing system in a spreadsheet, comprising: a parameter configuration acquisition module, used to obtain discrete data parameters and data processing method parameters of the spreadsheet configured by the user before the spreadsheet is opened; a data parsing module, in response to receiving an opening instruction of the spreadsheet, parsing the discrete data parameters and the data processing method parameters, obtaining row and column dimension combination data and a dimension data calculation method, and obtaining discrete cell data and a discrete data calculation method based on the row and column dimension combination data and the dimension data calculation method; a data automatic calculation module, used to perform aggregation calculations on the discrete cell data, obtain discrete data aggregation results, and perform calculations based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain calculation results; a display processing module, which displays the calculation results on the spreadsheet after the spreadsheet is opened.
[0016] In a third aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is cached. When the computer program is executed by a processor, the method for processing discrete data in an electronic spreadsheet described in any one of the first aspects of the present application is implemented.
[0017] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory, which caches a computer program; and a processor, which is communicatively connected to the memory and executes the discrete data processing method in an electronic spreadsheet described in any one of the first aspects of the present application when calling the computer program.
[0018] The discrete data processing method in a spreadsheet provided in the embodiment of the present application can realize the aggregation and calculation of discrete cell data distributed in different rows or columns in the spreadsheet through simple configuration on the spreadsheet, so as to achieve the purpose of automatically realizing discrete data processing in the spreadsheet according to the calculation and display requirements of the user, and the user data aggregation display is more intuitive, the configuration is simple, and it is easy to master, thereby reducing the user usage threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 Shown is a schematic diagram of the principle of a discrete data processing method in an electronic table according to an embodiment of the present application.
[0020] Figure 2 Shown is a flow chart of a discrete data processing method in an electronic table according to an embodiment of the present application.
[0021] Figure 3 Shown is a schematic diagram of the parameter configuration principle in a discrete data processing method in an electronic table according to an embodiment of the present application.
[0022] Figure 4 Shown is an example diagram of configuring row parameters and column parameters in a parameter configuration interface in a discrete data processing method in an electronic table according to an embodiment of the present application.
[0023] Figure 5 Shown is an example diagram of a data processing method configured in a parameter configuration interface in a discrete data processing method in an electronic form according to an embodiment of the present application.
[0024] Figure 6 Shown is a flow chart of data parsing in a discrete data processing method in an electronic table according to an embodiment of the present application.
[0025] Figure 7 Shown is a principle block diagram of a discrete data processing system in an electronic spreadsheet according to an embodiment of the present application.
[0026] Figure 8 Shown is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
[0027] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments.
[0028] Component number description
[0029] 100 Discrete Data Processing Systems in Spreadsheets
[0030] 110 Parameter configuration acquisition module
[0031] 120 Data analysis module
[0032] 130 Data automatic calculation module
[0033] 140 Display processing module
[0034] 10 Electronic devices
[0035] 101 Memory
[0036] 102 Processor
[0037] 103 Display
[0038] S100~S400 steps
[0039] Steps S310 to S320 DETAILED DESCRIPTION
[0040] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0041] A spreadsheet is a software tool used to record, organize, and analyze data. It consists of a series of rows and columns that form a grid-like structure, and each cell can be configured with data, formulas, or functions. Spreadsheets are widely used by individuals, businesses, and educational institutions for a variety of tasks, such as budgeting, financial reporting, data analysis, scheduling, etc.
[0042] When the data that needs to be aggregated in a spreadsheet may be discretely distributed in different rows or columns, it is necessary to use JavaScript scripts or configure multiple tables, which makes user operation difficult.
[0043] An embodiment of the present application provides a method for processing discrete data in an electronic form, which is used to automatically process discrete data in an electronic form according to the calculation and display requirements of a user.
[0044] Figure 1 The schematic diagram of the principle of the discrete data processing method in the electronic table of one embodiment of the present application is shown. The discrete data processing method in the electronic table of this embodiment is used to automatically calculate and display the discrete cell data distributed in different rows or columns in the electronic table through simple configuration. Figure 1As shown, the discrete data processing method in the electronic spreadsheet of this embodiment is applied to the client. Among them, the number of clients can be one or more, which is not specifically limited in this application. The client is used to realize human-computer interaction and can be deployed on a terminal device or a computing device. The terminal device includes a personal computer, a smart phone, a wearable device, a handheld processing device, a tablet computer, a mobile notebook, an augmented reality (AR) device, a virtual reality (VR) device, an integrated handheld device, a wearable device, a vehicle-mounted device, an intelligent conference device, an intelligent advertising device, a smart home appliance, etc. The smart home appliance can be a sweeping robot, a mopping robot, etc., which is not specifically limited here.
[0045] In a specific implementation, the application of the above-mentioned client can be software or an application running on a terminal device or a computing device controlled by a user, such as a personal computer (PC) client, or a web client accessed based on a browser, or an application (APP) client running on a mobile terminal, or a console of a cloud platform, which is not specifically limited in this application.
[0046] like Figure 1 As shown, the discrete data processing method in the electronic form in this embodiment involves the back-end processing of the electronic form. First, before the electronic form is opened, the user configures the aggregated rows and columns independently according to the calculation requirements of the electronic form data on the user terminal, configures the information of the discrete data parameters involved in the calculation, and the discrete data processing method, and the configured discrete data parameters and discrete data processing method parameters enter the server for background processing. When the electronic form is opened, the server parses the received discrete data parameters and data processing method parameters, obtains the discrete cell data and the discrete data calculation method, and then aggregates the discrete cell data. After that, the data after the aggregate calculation is combined with the data processing method configured by the user for personalized demand calculation, generates the calculation result, and displays the calculation result on the interface of the front-end display according to the data display processing method.
[0047] It can be seen that when a user configures a spreadsheet in the discrete data processing method provided in the embodiment of the present application, the aggregated rows and columns are independently configured, and data operations are performed according to their own needs, so as to realize the aggregation and calculation of discrete cell data distributed in different rows or columns in the spreadsheet, thereby achieving the purpose of automatically realizing discrete data processing in the spreadsheet according to the user's calculation and display requirements.
[0048] The following will be combined with the attached examples of the present application Figure 2 To Attachment Figure 6, a method for processing discrete data in an electronic spreadsheet in an embodiment of the present application is described in detail.
[0049] Figure 2 The flowchart of the discrete data processing method in the electronic table in the embodiment of the present application is shown. Figure 2 As shown, the discrete data processing method in the electronic form provided in the embodiment of the present application includes the following steps S100 to S400.
[0050] Step S100, before the electronic form is opened, obtaining discrete data parameters and data processing method parameters of the electronic form configured by the user;
[0051] Step S200, in response to receiving the opening instruction of the electronic form, parsing the discrete data parameter and the data processing method parameter, acquiring row-column-dimensional combination data and the dimension data calculation method, and acquiring discrete cell data and the discrete data calculation method based on the row-column-dimensional combination data and the dimension data calculation method;
[0052] Step S300, performing aggregation calculation on the discrete cell data to obtain discrete data aggregation results, and performing calculation based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain a calculation result;
[0053] Step S400, after the electronic form is opened, display the calculation result on the electronic form.
[0054] The following specifically describes steps S100 to S400 of the method for processing discrete data in an electronic form of this embodiment.
[0055] Step S100, before the electronic form is opened, obtaining discrete data parameters and data processing method parameters of the electronic form configured by the user.
[0056] In this embodiment, the user can customize the configuration of each cell of the row or column to be calculated according to the calculation requirements of the data in the electronic form. In this embodiment, the configuration of discrete cells in different rows or columns can be performed to realize personalized calculation of discrete cells in different rows or columns.
[0057] In some implementations, the discrete parameters include the row number and column number of the selected cell; wherein there are more than two cells.
[0058] The row number is the position number of a specified row, such as row 1, row 2, etc. In Excel, row numbers are used to determine the horizontal position of data. Row names are usually implemented by assigning a name to a row or a cell in a row. Row names can be used as parameters in formulas to more intuitively reference specific rows. The row parameter can be a specific row number, a row position calculated by a function, or a row name.
[0059] The column number is the position number of the specified column, such as column 1, column 2, etc. In Excel, the column number is used to determine the vertical position of the data. Column names are implemented by assigning a name to a column or a cell in a column. Column names can be used as parameters in formulas to more intuitively reference specific columns. The column parameter can be a specific column number, a column position calculated by a function, or a column name.
[0060] In one implementation of this embodiment, when there are more than one cell, the cells are adjacent cells in the same row or column or cells with intervals, or the cells are cells in different rows or columns. That is, the cells can be multiple continuous cells in the same row, or discrete cells in different rows and columns.
[0061] That is, in this embodiment, the user can configure multiple continuous or discrete cell data in adjacent multiple rows or columns for calculation, and can also configure multiple continuous or discrete cell data across rows or columns for calculation.
[0062] In this embodiment, the data processing method parameters include at least one function and / or a calculation formula. The function and the calculation formula can be selected through a built-in function or formula menu template, and the configuration discrete data parameters are input into the function template or formula template to form the data processing method parameters.
[0063] Figure 3 The following is a schematic diagram showing the parameter configuration principle of the discrete data processing method in the electronic table of an embodiment of the present application. Figure 3 As shown, in an implementation of this embodiment, the step of obtaining discrete data parameters and data processing method parameters of the electronic form configured by the user includes:
[0064] A parameter configuration interface is provided, wherein the parameter configuration interface at least includes a discrete parameter configuration box for configuring the discrete data parameters and a data processing mode configuration box for configuring the data processing mode parameters; the discrete data parameters are obtained from the discrete parameter configuration box, and the data processing mode parameters are obtained from the data processing mode configuration box.
[0065] Figure 4The figure shows an example of configuring discrete data parameters in the parameter configuration interface of the discrete data processing method in the electronic form of an embodiment of the present application. Figure 4 As shown, the row parameter configuration box may include multiple function button controls and edit input controls to implement the configuration of discrete data.
[0066] Figure 5 The figure shows an example of a configuration data processing method in a parameter configuration interface in a discrete data processing method in an electronic table according to an embodiment of the present application. Figure 5 As shown, in one implementation of this embodiment, the data processing method parameters include: a row header or a column header, a discrete data calculation formula that is operated with a row keyword or a column keyword, and a combination of the discrete data calculation formula and a constraint condition; wherein the row keyword corresponds to a preset row marker, and the column keyword corresponds to a preset column marker; and the constraint condition is configured in the form of text or programming grammar sentences. For the convenience of identification and detection, the preset row marker is, for example, row, and the preset column marker is, for example, col.
[0067] In some implementations, the data processing method parameters may include only the discrete data calculation formula, or may include a combination of the discrete data calculation formula and constraint conditions. The user may customize the constraint conditions.
[0068] In this embodiment, the constraint condition is associated with the data of the electronic form. For example, only when certain data of the electronic form meets specific conditions, the corresponding calculation is performed according to the discrete data calculation formula. Among them, the constraint condition can be an equation or an inequality. For example, in a linear programming problem, the constraint condition is usually expressed as a set of linear equations or inequalities, and the objective function is an expression that needs to be maximized or minimized. The constraint condition can also be a programming conditional sentence, such as an if...else programming conditional sentence. In addition, the constraint condition can also be a combination of a constraint condition and an objective function to form a Lagrangian function. The configuration method of the data processing method parameters can be selected according to the degree of language mastered by the user.
[0069] Step S200, in response to receiving an opening instruction of the electronic spreadsheet, the discrete data parameters and the data processing method parameters are parsed to obtain row and column dimension combination data and the dimension data calculation method, and discrete cell data and the discrete data calculation method are obtained based on the row and column dimension combination data and the dimension data calculation method.
[0070] Figure 6 The flowchart of data parsing in the discrete data processing method in the electronic table of one embodiment of the present application is shown. Figure 6As shown, in an implementation of the present embodiment, the discrete data parameters and the data processing method parameters are parsed to obtain row and column dimension combination data and the dimension data calculation method, and the discrete cell data and the discrete data calculation method are obtained based on the row and column dimension combination data and the dimension data calculation method, including the following steps S310 to S320.
[0071] Step S310, calling the open source rule engine QLExpress, parsing the discrete data parameters and the data processing method parameters through the open source rule engine QLExpress, obtaining row-column-dimensional combination data and the dimension data calculation method, and obtaining discrete cell data and the discrete data calculation method based on the row-column-dimensional combination data and the dimension data calculation method;
[0072] Step S320: Use the DataContainer in QLExpress as a stack to encapsulate the obtained discrete cell data and the data calculation method.
[0073] In this embodiment, discrete data parameters are parsed to obtain dimension combinations of data rows and columns, and it is urgently necessary to obtain discrete cells hit by the dimension combinations in the spreadsheet based on the dimension combinations of rows and columns, and then obtain the data in the corresponding cells, and then perform aggregation and calculation.
[0074] QLExpress is a lightweight, dynamic scripting language for the Java platform. QLExpress has a set of custom instruction sets that are used to parse and execute expressions. In the runtime environment (RunEnvironment), QLExpress implements the calculation of each instruction one by one through the jump of the function pointer programPoint.
[0075] Temporary variables generated during the operation are all thread-local, ensuring security during concurrent execution. It also caches the time-consuming script compilation process locally and optimizes the creation of temporary variables through buffer pool technology. By setting operating parameters, it can prevent risky situations such as dead loops and high-risk system API calls.
[0076] In QLExpress, DataContainer is a container class that implements a stack data structure for storing variables and temporary values in expressions. When executing an expression, QLExpress pushes each variable or temporary value into the stack and pops these values from the stack for calculation when needed. By using DataContainer as a stack to encapsulate data, QLExpress can easily handle complex expressions and ensure that the correct order and priority are maintained during calculation.
[0077] In addition, in other implementations, the pandas module may be imported, and the read_excel function of the pandas module may be used to read the spreadsheet file and convert it into a DataFrame object. Then, the discrete cell data and the data calculation method corresponding to the discrete data parameter and the data processing method parameter are obtained through the index and column name of the DataFrame object.
[0078] Depending on your needs, you can select the row or column data to be calculated by the index and column name of the DataFrame object. For example, you can use df.loc[row_index] to get the data of a specified row, or use df[column_name] to get the data of a specified column.
[0079] In one implementation of this embodiment, the method of obtaining discrete cell data and calculating discrete data also includes: detecting whether the corresponding cell has corresponding cell data based on the discrete data parameters; in response to the corresponding cell not having corresponding cell data, requesting a remote device to obtain the corresponding cell data.
[0080] In this embodiment, the detection of cell data in the electronic table is included, and the detection of whether the cell data in the electronic table exists or is complete. If the located cell does not have data or is missing, the corresponding cell is automatically filled in with the corresponding data in the electronic table by requesting a remote device to obtain the corresponding cell, so as to ensure the accuracy of the calculation.
[0081] Step S300, performing aggregation calculation on the discrete cell data to obtain discrete data aggregation results, and performing calculation based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain a calculation result.
[0082] In one implementation of this embodiment, the aggregation calculation of the discrete cell data includes: obtaining a data aggregation method; calling an aggregation function in the QLExpress module based on the data aggregation method; wherein the aggregation function is any one of sum, avg, max, and min; and performing aggregation calculation on the discrete cell data through the aggregation function to generate a discrete data aggregation result.
[0083] Use the aggregation functions provided by pandas (such as sum, avg, max, etc.) to perform aggregate calculations on discrete cells in the same row or column. For example, you can use df['column_name'].sum() to calculate the sum of cells in a specified column, or use df.loc[row_index].avg() to calculate the average value of discrete cell data in a specified row or rows. According to actual needs, you can define different data calculation formula functions and call the corresponding functions in the main program for calculation. For example, you can define functions such as square root and exponential, and calculate according to the formula. Perform the corresponding calculation operation based on the results of the aggregate calculation and the data calculation formula.
[0084] Step S400, after the electronic form is opened, display the calculation result on the electronic form.
[0085] In an implementation of this embodiment, it also includes: configuring the display method of the calculation results, specifically including: configuring any one or more combinations of row and / or column field names, display decimal places, data types, negative number display formats, and zero value display methods.
[0086] In an implementation of this embodiment, after the electronic form is opened, displaying the calculation result on the electronic form includes:
[0087] 1) Obtaining the current row and column data area of the electronic table;
[0088] 2) determining a filling position of the calculation result based on the current row and column data area;
[0089] 3) Calling the data filling tool or VLOOKUP function of the electronic spreadsheet to fill the data of the electronic spreadsheet into the filling position of the current row and column data area and the calculation result.
[0090] In the process of obtaining the current row and column data area of the electronic table, the cell function, row function, col function, etc. of the electronic table are called. The cell function returns the address of the specified cell, and then the row function and col function can obtain the number of rows and columns.
[0091] In some implementations, determining the filling position of the calculation result may be achieved by combining multiple functions.
[0092] 1) Use the MATCH function: Use the MATCH function to find the position of a specified value in a range and return the relative position of the value.
[0093] 2) Nested MATCH and INDEX functions: Use the MATCH function in conjunction with the INDEX function to return the cell contents where a value is located in a specified range.
[0094] 3) Nesting the MATCH function with the VLOOKUP function: The VLOOKUP function is used to find a specific value in a column of a table and return the value of another column in the same row. By using the result of the MATCH function as the column index parameter of VLOOKUP, more complex search and fill operations can be achieved.
[0095] 4) Using LARGE function with ROW or COLUMN function: If you want to sort or fill based on row or column number, you can use LARGE function in combination with ROW or COLUMN function.
[0096] 5) Use the OFFSET function: The OFFSET function can return a reference to a cell or range of cells based on a given starting point, row offset, and column offset. When used in conjunction with the MATCH function, the OFFSET offset can be dynamically determined based on the position returned by MATCH.
[0097] Through the above method, the filling position of the calculation result can be determined according to the current row and column data area, thereby realizing real-time calculation and dynamic update of electronic spreadsheet data.
[0098] As can be seen from the above, the discrete data processing method in the spreadsheet provided in the embodiment of the present application can be simply configured on the spreadsheet to realize the aggregation and calculation of discrete cell data distributed in different rows or columns in the spreadsheet, so as to achieve the purpose of automatically realizing discrete data processing in the spreadsheet according to the user's calculation and display requirements, and the user data aggregation display is more intuitive, the configuration is simple, and it is easy to master, which reduces the user usage threshold.
[0099] The protection scope of the discrete data processing method in the electronic spreadsheet described in the embodiment of the present application is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0100] The present application embodiment also provides a discrete data processing system 100 in an electronic spreadsheet. Figure 7 The schematic diagram of the discrete data processing system 100 in the electronic spreadsheet of this embodiment is shown. Figure 7 As shown, the discrete data processing system 100 in the electronic form of this embodiment includes: a parameter configuration acquisition module 110 , a data analysis module 120 , a data automatic calculation module 130 and a display processing module 140 .
[0101] Among them, the parameter configuration acquisition module 110 is used to obtain the discrete data parameters and data processing method parameters of the electronic form configured by the user before the electronic form is opened; the data analysis module 120, in response to receiving the opening instruction of the electronic form, analyzes the discrete data parameters and the data processing method parameters, obtains the row and column dimension combination data and the dimension data calculation method, and obtains the discrete cell data and the discrete data calculation method based on the row and column dimension combination data and the dimension data calculation method; the data automatic calculation module 130 is used to perform aggregation calculation on the discrete cell data, obtain discrete data aggregation results, and perform calculations based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain the calculation results; the display processing module 140 displays the calculation results on the electronic form after the electronic form is opened.
[0102] In this embodiment, the implementation principles of each module of the discrete data processing system 100 in the electronic spreadsheet are the same as the implementation principles of each step of the discrete data processing method in the electronic spreadsheet described above, and the implementation principles and specific implementation methods of the discrete data processing system 100 in the electronic spreadsheet are not repeated here.
[0103] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is cached. When the computer program is executed by a processor, the discrete data processing method in the electronic spreadsheet provided in any embodiment of the present application is implemented.
[0104] In the embodiment of the present application, any combination of one or more storage media can be used. The storage medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or caching a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0105] An embodiment of the present application also provides an electronic device. Figure 8Shown is a schematic diagram of the structure of the electronic device 10 provided in the embodiment of the present application. In some embodiments, the electronic device can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA) and other terminal devices. In addition, the discrete data processing method in the electronic form provided in the present application can also be applied to databases, servers, and service response systems based on terminal artificial intelligence. The embodiment of the present application does not impose any restrictions on the specific application scenarios of the discrete data processing method in the electronic form.
[0106] like Figure 8 As shown, the electronic device 10 provided in the embodiment of the present application includes a memory 101 and a processor 102 .
[0107] The memory 101 is used to cache computer programs; preferably, the memory 101 includes: ROM, RAM, disk, USB flash drive, cache card or CD, etc., which can cache program codes.
[0108] Specifically, the memory 101 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The electronic device 10 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 101 may include at least one program product having a set (e.g., at least one) of program modules, which are configured to perform the functions of the various embodiments of the present application.
[0109] The processor 102 is connected to the memory 101 and is used to execute the computer program cached in the memory 101 so that the electronic device 10 executes the discrete data processing method in the electronic table provided in any embodiment of the present application.
[0110] Optionally, the processor 102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0111] Optionally, the electronic device 10 in this embodiment may further include a display 103. The display 103 is communicatively connected with the memory 101 and the processor 102, and is used to display a GUI interaction interface related to the discrete data processing method in the electronic form.
[0112] Furthermore, the electronic device 10 also includes: a firewall, a load balancer, a communication component, a power supply component and other components. Figure 8 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 8 Components shown.
[0113] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes a plurality of computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0114] In summary, the discrete data processing method in the electronic form provided by the embodiment of the present application can realize the aggregation and calculation of discrete cell data distributed in different rows or columns in the electronic form through simple configuration on the electronic form, so as to achieve the purpose of automatically realizing the discrete data processing in the electronic form according to the calculation and display requirements of the user, and the user data aggregation display is more intuitive, the configuration is simple, and it is easy to master, which reduces the user's use threshold. Therefore, the present application effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.
[0115] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for processing discrete data in an electronic form, characterized in that: include: Before the electronic form is opened, discrete data parameters and data processing method parameters of the electronic form configured by the user are obtained; In response to receiving an opening instruction of the electronic form, the discrete data parameter and the data processing method parameter are parsed to obtain row-column-dimensional combination data and a dimension data calculation method, and discrete cell data and a discrete data calculation method are obtained based on the row-column-dimensional combination data and the dimension data calculation method; Performing aggregation calculation on the discrete cell data to obtain discrete data aggregation results, and performing calculation based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain a calculation result; After the electronic spreadsheet is opened, the calculation result is displayed on the electronic spreadsheet.
2. The method for processing discrete data in an electronic form according to claim 1, characterized in that: The discrete data parameters and data processing method parameters of the electronic form configured by the user are obtained, including: Providing a parameter configuration interface; the parameter configuration interface at least includes a discrete parameter configuration box for configuring the discrete data parameters and a data processing mode configuration box for configuring the data processing mode parameters; The discrete data parameters are obtained from the discrete parameter configuration box, and the data processing mode parameters are obtained from the data processing mode configuration box.
3. The method for processing discrete data in an electronic form according to claim 1 or 2, characterized in that: The discrete parameters include the row number and column number of the selected cell; wherein there are more than two cells.
4. The method for processing discrete data in an electronic form according to claim 3, characterized in that: When there are more than one cell, the cells are adjacent cells in the same row or column or cells with a gap, or the cells are cells in different rows or columns.
5. The method for processing discrete data in an electronic form according to claim 1, characterized in that: The data processing method parameters include: a row header or a column header, a discrete data calculation formula that operates with a row keyword or a column keyword, and a combination of the discrete data calculation formula and constraints; wherein the row keyword corresponds to a preset row marker, and the column keyword corresponds to a preset column marker; the constraints are configured in the form of text or programming syntax sentences.
6. The method for processing discrete data in an electronic form according to claim 1, characterized in that: The step of parsing the discrete data parameters and the data processing method parameters to obtain row-column-dimensional combination data and a dimensional data calculation method, and obtaining discrete cell data and a discrete data calculation method based on the row-column-dimensional combination data and the dimensional data calculation method includes: Calling the open source rule engine QLExpress, parsing the discrete data parameters and the data processing method parameters through the open source rule engine QLExpress, obtaining row-column-dimensional combination data and the dimension data calculation method, and obtaining discrete cell data and the discrete data calculation method based on the row-column-dimensional combination data and the dimension data calculation method; The DataContainer in QLExpress is used as a stack to encapsulate the obtained discrete cell data and the data calculation method.
7. The method for processing discrete data in an electronic form according to claim 1 or 6, characterized in that: The method of obtaining discrete cell data and calculating discrete data also includes: Detecting whether a corresponding cell has corresponding cell data based on the discrete data parameters; In response to the corresponding cell not having the corresponding cell data, a remote device is requested to obtain the corresponding cell data.
8. The method for processing discrete data in an electronic form according to claim 6, characterized in that: The performing aggregate calculation on the discrete cell data includes: Get data aggregation method; Calling an aggregation function in the QLExpress module based on the data aggregation method; wherein the aggregation function is any one of sum, avg, max, and min; Aggregation calculation is performed on the discrete cell data through the aggregation function to generate discrete data aggregation results.
9. The method for processing discrete data in an electronic form according to claim 1, characterized in that: Also includes: Configuring the display mode of the calculation result includes: configuring any one or more combinations of the field name of the row and / or column, the number of decimal places to be displayed, the data type, the negative number display format, and the zero value display mode.
10. The method for processing discrete data in an electronic form according to claim 1 or 9, characterized in that: After the electronic form is opened, displaying the calculation result on the electronic form includes: Obtaining the current row and column data area of the electronic table; Determine a filling position of the calculation result based on the current row and column data area; Call the data filling tool or VLOOKUP function of the electronic spreadsheet to fill the data of the electronic spreadsheet into the filling position of the current row and column data area and the calculation result.
11. A discrete data processing system in an electronic spreadsheet, characterized in that: include: The parameter configuration acquisition module is used to acquire the discrete data parameters and data processing method parameters of the electronic form configured by the user before the electronic form is opened; a data parsing module, in response to receiving an opening instruction of the electronic form, parsing the discrete data parameter and the data processing method parameter, obtaining row-column-dimensional combination data and a dimension data calculation method, and obtaining discrete cell data and a discrete data calculation method based on the row-column-dimensional combination data and the dimension data calculation method; The data automatic calculation module is used to perform aggregation calculation on the discrete cell data to obtain discrete data aggregation results, and perform calculation based on each discrete data aggregation result and the corresponding discrete data calculation method to obtain a calculation result; The display processing module displays the calculation result on the electronic form after the electronic form is opened.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the discrete data processing method in an electronic table according to any one of claims 1 to 10 is implemented.
13. An electronic device, characterized in that: The electronic device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and executes the discrete data processing method in an electronic table according to any one of claims 1 to 10 when calling the computer program.
