CN115081414B - Spreadsheet generation method, device, equipment and medium based on data model - Google Patents

Spreadsheet generation method, device, equipment and medium based on data model Download PDF

Info

Publication number
CN115081414B
CN115081414B CN202210983924.2A CN202210983924A CN115081414B CN 115081414 B CN115081414 B CN 115081414B CN 202210983924 A CN202210983924 A CN 202210983924A CN 115081414 B CN115081414 B CN 115081414B
Authority
CN
China
Prior art keywords
target
fields
data
data model
spreadsheet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210983924.2A
Other languages
Chinese (zh)
Other versions
CN115081414A (en
Inventor
陈大伟
黄潮勇
李中仁
李平
赵素明
吴华夫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Smart Software Co ltd
Original Assignee
Guangzhou Smart Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Smart Software Co ltd filed Critical Guangzhou Smart Software Co ltd
Priority to CN202210983924.2A priority Critical patent/CN115081414B/en
Publication of CN115081414A publication Critical patent/CN115081414A/en
Application granted granted Critical
Publication of CN115081414B publication Critical patent/CN115081414B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the technical field of electronic form development, and provides a method, a device, equipment and a medium for generating an electronic form based on a data model, wherein the method comprises the following steps: responding to a data model query triggering operation on the spreadsheet application interface, and displaying a plurality of data models; in response to a trigger operation for selecting and determining a target data model from the plurality of data models, displaying a plurality of fields of the target data model; responding to the trigger operation of selecting and determining at least two target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model; determining the corresponding relation between at least two target fields and cells of a preset spreadsheet document; and filling data corresponding to at least two target fields into corresponding cells of the preset spreadsheet document according to the corresponding relation to generate the spreadsheet, so that the efficiency of generating the spreadsheet is improved.

Description

Spreadsheet generation method, device, equipment and medium based on data model
Technical Field
The embodiment of the application relates to the technical field of electronic form development, in particular to an electronic form generation method and device based on a data model, computer equipment and a storage medium.
Background
With the advent of the digital age, in daily work, related personnel often need to process and analyze operation data of enterprises by using data processing tools, and finally present the processing and analysis results in the form of reports.
As the most widely used data processing tool, traditional spreadsheet applications such as Microsoft Office Excel and WPS forms have powerful and flexible data processing, data analysis, and data visualization functions. However, as the user's usage needs have increased, the conventional spreadsheet application has been unable to meet the user's usage needs.
Particularly, the process of acquiring data of the traditional spreadsheet application is troublesome, the data needs to be acquired from a database and then pasted into a spreadsheet document, particularly for business personnel lacking database skills, IT is often necessary to find help of IT personnel to acquire the data from the database, and this way has a high requirement on the professional level, and is difficult to be realized by ordinary users, and the users need to learn again, which increases the learning cost of the users.
Disclosure of Invention
The embodiment of the application provides a spreadsheet generation method, a spreadsheet generation device, computer equipment and a storage medium based on a data model, which can reduce the operation difficulty of a user and improve the spreadsheet generation efficiency, and the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a spreadsheet generation method based on a data model, including the steps of:
responding to a data model query triggering operation on an electronic form application interface, and displaying a data model query page on the electronic form application interface, wherein the data model query page displays a plurality of data models; each data model comprises a plurality of fields with incidence relations;
in response to a trigger operation for selecting a determined target data model from a number of the data models, displaying a number of fields of the target data model;
responding to the trigger operation of selecting and determining at least two target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model;
determining the corresponding relation between at least two target fields and cells of a preset electronic form document;
and filling data corresponding to at least two target fields into corresponding cells of a preset electronic form document according to the corresponding relation to generate the electronic form.
In a second aspect, an embodiment of the present application provides a spreadsheet generating apparatus based on a data model, including:
the query page display module is used for responding to data model query triggering operation on the spreadsheet application interface and displaying a data model query page on the spreadsheet application interface, wherein the data model query page displays a plurality of data models; each data model comprises a plurality of fields with incidence relations;
the field display module is used for responding to a trigger operation for selecting and determining a target data model from a plurality of data models and displaying a plurality of fields of the target data model;
the data acquisition module is used for responding to the trigger operation of selecting and determining at least two target fields from the fields and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model;
the corresponding relation determining module is used for determining the corresponding relation between at least two target fields and cells of a preset spreadsheet document;
and the electronic form generating module is used for filling the data corresponding to at least two target fields into corresponding cells of a preset electronic form document according to the corresponding relation to generate an electronic form.
In a third aspect, embodiments of the present application provide a computer device, a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the steps of the method according to the first aspect.
The method comprises the steps that a data model query page is displayed on an electronic form application interface through responding to data model query triggering operation on the electronic form application interface, and a plurality of data models are displayed on the data model query page; each data model comprises a plurality of fields with incidence relations; in response to a trigger operation for selecting a determined target data model from a number of the data models, displaying a number of fields of the target data model; responding to the trigger operation of selecting and determining at least two target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model; determining the corresponding relation between at least two target fields and cells of a preset electronic form document; and filling data corresponding to at least two target fields into corresponding cells of a preset spreadsheet document according to the corresponding relation to generate the spreadsheet. According to the method and the device, the fields are selected on the basis of the existing data model, and because the fields in the data model are correlated with one another, the data are acquired according to the correlation relation of the selected fields, rather than the data acquired according to a single field, and the spreadsheet generation efficiency is improved. Meanwhile, the user does not need to write a professional query statement, and the operation difficulty of the user is reduced.
For a better understanding and implementation, the technical solutions of the present application are described in detail below with reference to the accompanying drawings.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a spreadsheet generation method based on a data model according to an embodiment of the present application;
FIG. 2 is a schematic flowchart of step S30 in a spreadsheet generation method based on a data model according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a spreadsheet generating device based on a data model according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if as used herein may be interpreted as" at "8230; \8230when" or "when 8230; \823030, when" or "in response to a determination", depending on the context.
The data query method based on the data model provided in the embodiment of the present application may be executed by a data query device based on the data model, the data query device based on the data model may be implemented in a software and/or hardware manner, and the data query device based on the data model may be formed by two or more physical entities, or may be formed by one physical entity. The data query device based on the data model can be any electronic device provided with data processing software, and the electronic device can be an intelligent device such as a computer, a mobile phone or a tablet.
Referring to fig. 1, fig. 1 is a schematic flow chart of a spreadsheet generation method based on a data model according to a first embodiment of the present application, the method includes the following steps:
s10: responding to a data model query triggering operation on a spreadsheet application interface, and displaying a data model query page on the spreadsheet application interface, wherein the data model query page displays a plurality of data models; each data model comprises a plurality of fields with associated relations.
In an embodiment of the application, the spreadsheet application may be an EXCEL form or a WPS form, and after the user opens the spreadsheet application, a data model query operation may be performed at the spreadsheet application interface. Specifically, a data model query function control is displayed on the spreadsheet application interface, a user clicking the data model query function control is detected, and a data model query page is displayed above the spreadsheet application interface. The data model query page is used for querying and displaying a plurality of created data models, each data model comprises a plurality of dimensions and a plurality of measures, each dimension can comprise one or more dimension members, and the dimension members and the measures are fields of the data model.
Taking a product sales data model as an example, the product sales data model comprises a time dimension, a geographical dimension and a product dimension, wherein the time dimension comprises three dimension members of year, season and month, the geographical dimension comprises three dimension members of area, province and city, and the product dimension comprises two dimension members of product category and product name, and comprises three measures of sales volume, sales unit price and sales amount. In the data model, a time dimension, a region dimension, a product dimension, sales volume, sales unit price and sales amount are associated with each other, and data which needs to be inquired by a user can be determined through the data model. For example, the sales amount of sportswear in the first quarter of Guangzhou, guangdong province, and the sales amount of kettles in 2022 years in North China, for example, can be determined.
S20: in response to a trigger operation to select a target data model from a number of the data models, a number of fields of the target data model are displayed.
In the embodiment of the application, since the data model query page displays a plurality of data models, a user can select a target data model from the plurality of data models according to the requirement of generating the electronic form, and the target data model comprises fields related to the electronic form to be generated. Specifically, a user may click on the target data model on a data model query page, displaying several fields of the target data model. Optionally, the data model query page is provided with a data model search area for supporting fast positioning of the target data model. For example, a user may enter the name of the target data model in the data model search area, and then display the target data model in a data model query page.
S30: and responding to the trigger operation of selecting the determined at least two target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model.
In the embodiment of the application, a user selects and determines at least two target fields from a plurality of fields of a target data model, and the target fields can be dimension members or measures. The at least two goal fields may be a plurality of dimension members and one or more metrics. Since in the target data model, all dimension members and measures are interrelated. Therefore, the incidence relation of the at least two target fields in the target data model can be obtained, and the corresponding data can be obtained from the service database according to the incidence relation.
S40: and determining the corresponding relation between at least two target fields and the cells of the preset spreadsheet document.
In the embodiment of the application, the corresponding relation between at least two target fields and the cells of the preset spreadsheet document can be determined according to the dragging operation of the user. Specifically, a user may directly drag a target field into a cell of a preset spreadsheet document, thereby determining a correspondence between the target field and the cell. Optionally, the user may select a cell of the preset spreadsheet document, and then select a target field, thereby determining the corresponding relationship between the target field and the cell.
S50: and filling data corresponding to at least two target fields into corresponding cells of a preset electronic form document according to the corresponding relation to generate the electronic form.
In the embodiment of the present application, data corresponding to a target field is filled into a corresponding position of a preset spreadsheet document of a cell having a correspondence relationship established with the target field, for example, a column in which the cell having the correspondence relationship established with the target field is located, so as to obtain a spreadsheet.
By applying the embodiment of the application, a data model query page is displayed on the spreadsheet application interface by responding to the data model query triggering operation on the spreadsheet application interface, and the data model query page displays a plurality of data models; each data model comprises a plurality of fields with incidence relations; in response to a trigger operation for selecting a determined target data model from a number of the data models, displaying a number of fields of the target data model; responding to the trigger operation of selecting at least two determined target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model; determining the corresponding relation between at least two target fields and cells of a preset electronic form document; and filling data corresponding to at least two target fields into corresponding cells of a preset spreadsheet document according to the corresponding relation to generate the spreadsheet. According to the method and the device, the fields are selected on the basis of the existing data model, and because the fields in the data model are correlated with each other, the data is acquired according to the incidence relation of the selected fields, rather than the data is acquired according to a single field, so that the spreadsheet generation efficiency is improved. Meanwhile, the user does not need to write query sentences, and the operation difficulty of the user is reduced.
In an optional embodiment, before the step S10, the method includes:
s1: acquiring a plurality of data source tables; each of the data source tables includes a number of fields.
In the embodiment of the present application, the data source table is a service data table stored in a service database, and the service data table includes a plurality of fields. For example, taking four data source tables as a product table, a product category table, an order table and an order detail table as an example, the product table comprises a product number field, a product category field and a product name field, the product category table comprises a product category number field, a product category field and a product name field, the order table comprises an order number field, a customer name field, a product number field, a product name field, an order date field and an order quantity field, and the order detail table comprises an order number field, a product number field, a selling unit price field and a selling quantity field.
S2: and associating a plurality of data source tables according to the identification of the field.
The field identification, i.e., field name, is used to associate data source tables including the same field name, for example, a product table and a product category table both include a product category field, a product table and an order detail table both include a product name field, and a product table and a product category table and a product table and an order detail table may be associated with each other. Both the order form and the order detail form include an order number field, which may associate the order form with the order detail form.
S3: generating a dimension table and a fact table associated with the dimension table in response to a trigger operation of selecting a certain number of fields from the associated number of data source tables; the dimension table includes a number of dimension fields, and the fact table includes a measure field associated with the number of dimension fields.
The dimension table is a set of dimension attributes, is a window for analyzing problems, is a specific angle for people to observe data, is a type of attribute when considering the problems, and the set of attributes forms a dimension. For example, the geography dimension table comprises ID, area, province and city of the geography dimension table. The fact table stores therein fact data including an ID of each dimension table and a measure field.
In the embodiment of the application, a plurality of fields can be selected from a plurality of data source tables to generate the dimension table and the fact table associated with the dimension table. It is also possible to select several fields from a single data source table to generate a dimension table and a fact table associated with the dimension table. For example, a product category field is selected from a product category table and a product name field is selected from a product table, and a product dimension table is generated from the product category field and the product name field. Selecting an order date field from the order table, wherein the order date field comprises a year field, a season field and a month field, and generating a time dimension table through the year field, the season field and the month field. A quantity sold field is selected from the order detail table and used as a measure field of the fact table. Since the data source tables are related to each other by field identification, the dimension tables and the fact tables generated by the fields selected by the data source tables are also related to each other.
S4: and generating a plurality of data models according to the dimension table and the fact table.
In the embodiment of the present application, the data model is a multidimensional data model, and may be represented by a multidimensional data cube. Taking the product data model as an example, the corresponding multidimensional data cube includes a geographical dimension (attribute values include region, province and city), a time dimension (attribute values include year, season and month) and a product dimension (attribute values include product category and product name), and the geographical dimension, the time dimension and the product dimension are respectively used as three spatial axes of the multidimensional data cube. The intersection point of each dimension, namely, a space point of the multidimensional cube, stores a measurement field (including sales quantity, sales unit price and sales amount) of a fact table, namely, the multidimensional data cube comprises three dimension tables and one fact table, and the four dimension tables and the one fact table are associated through dimension table IDs recorded in the fact table.
The data model is generated by selecting the fields from the data source tables, so that the disordered data source tables are integrated and classified, data can be acquired according to the data model in the following process, and the spreadsheet generation efficiency is improved.
In an optional embodiment, the dimension table further comprises dimension data corresponding to a number of the dimension fields, and the fact table further comprises measure data corresponding to the measure fields; the step of generating a plurality of data models according to the dimension table and the fact table comprises:
s100: generating a plurality of data models according to the dimension field, the dimension data, the measurement field and the measurement data;
the step of acquiring data corresponding to at least two target fields according to the incidence relation of the at least two target fields in the target data model in response to the trigger operation of selecting the determined at least two target fields from the plurality of fields comprises:
s101: and responding to the triggering operation of selecting at least one target dimension field from the dimension fields and selecting at least one target measurement field from the measurement fields, and acquiring corresponding data according to a target data model where the at least one target dimension field and the at least one target measurement field are located.
In the embodiment of the application, after the dimension table and the fact table associated with the dimension table are created, the data in the database may be imported into the dimension table and the fact table. Specifically, according to the dimension field in the dimension table and the measurement field in the fact table, data are extracted from a plurality of data source tables in the service library, and dimension data corresponding to the dimension fields and measurement data corresponding to the measurement fields are obtained. And then, filling corresponding dimension data and measurement data into the data model according to the dimensions and the measurements in the data model and the incidence relation of the dimensions and the measurements.
Because the data model records the dimension data and the measurement data, the triggering operation of selecting the determined at least two target fields from the plurality of fields of the target data model by the user is responded, the data corresponding to the at least two target fields can be directly obtained from the data recorded in the target data model according to the incidence relation of the at least two target fields in the target data model, the data does not need to be obtained from the database, and the electronic form generation efficiency is improved.
In an alternative embodiment, referring to fig. 2, the step S30 includes steps S31 to S33, which are as follows:
s31: responding to the trigger operation of selecting at least two determined target fields from the plurality of fields, generating a query request according to the incidence relation of the at least two target fields in the target data model, and sending the query request to a background server;
s32: the background server analyzes the query request, generates an MDX query statement and sends the MDX query statement to a multidimensional query engine;
s33: and the multidimensional query engine converts the MDX query statement into an SQL query statement, and performs data query from a database according to the SQL query statement to obtain data corresponding to at least two target fields.
In the embodiment of the present application, the MDX query statement is a multidimensional query expression, and includes a data request (SELECT clause), a start point (FROM clause), and a filter (WHERE clause). The multidimensional query engine is a Mondrian engine. The background server analyzes the query request to generate an MDX query statement, the multidimensional query engine converts the MDX query statement into an SQL query statement and acquires data from the database according to the SQL query statement, so that the acquisition of the data corresponding to the target field is automatically and quickly realized.
In an optional embodiment, after the step S30, the method includes a step S300, which is specifically as follows:
s300: and storing at least two target fields and corresponding data as a target data set, and displaying the target data set on the spreadsheet application interface.
In the embodiment of the application, after the user selects and determines the target field and obtains the data corresponding to the target field on the data query page, the target field and the corresponding data can be stored as a target data set. Specifically, a user may click a save button of the data query page, and then a popup appears above the data query page, where the popup includes a name input box of a target data set, and the user may name the target data set in the name input box, and then display the target data set on the electronic application interface, so that a subsequent user may fill data of the target data set in a preset electronic form document on the electronic form application interface.
In an alternative embodiment, the spreadsheet application interface includes a dataset presentation area and an electronic document presentation area; the data set display area displays the target data set and at least two target fields; the electronic document display area displays the preset electronic form document; the preset electronic form document comprises a plurality of list head fields and a plurality of blank cells, and each list head field corresponds to a column of blank cells; the step S40 includes a step S41, which is specifically as follows:
s41: and in response to each target field of at least two target fields being dragged from the data set display area to a first blank cell of a column of blank cells corresponding to each head field of the list, determining a corresponding relationship between each target field and the corresponding first blank cell.
In the embodiment of the present application, the preset spreadsheet document includes a plurality of top-of-list fields and a plurality of blank cells, and names of the plurality of top-of-list fields may be the same as names of the target fields, or may be aliases of the names of the target fields. For example, the target field is a product category, year, quantity, unit price, and sales, and the list header field is also a product category, year, quantity, unit price, and sales.
When the target field is dragged, dragging the target field to a cell below a list head field with the same name as the target field, namely dragging the target field to a first blank cell of a row of blank cells corresponding to the list head field with the same name as the target field, so as to automatically and quickly determine the corresponding relation between each target field and the corresponding first blank cell.
In an alternative embodiment, the step S40 includes a step S400, which is specifically as follows:
s400: and responding to the preset selected operation of the cells of the spreadsheet document and the selected operation of each target field of at least two target fields, and determining the corresponding relation between each target field and the cells.
In this embodiment, a user may first select a cell of a preset spreadsheet document, and specifically, the cell may be a blank cell below a list header field in the preset spreadsheet document. The user may then select the target field, specifically, the user clicks on the target field in the data set presentation area, thereby determining a correspondence of the target field to a cell. Optionally, the user may select a plurality of cells of the preset spreadsheet document, and then, the user selects a plurality of target fields, thereby determining the corresponding relationship between the plurality of target fields and the plurality of cells.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a spreadsheet generating device based on a data model according to the present application. The spreadsheet generation apparatus 6 based on the data model provided by the embodiment of the present application includes:
the query page display module 61 is configured to display a data model query page on the spreadsheet application interface in response to a data model query triggering operation on the spreadsheet application interface, where the data model query page displays a plurality of data models; each data model comprises a plurality of fields with incidence relations;
a field display module 62, configured to display a number of fields of a target data model in response to a trigger operation for selecting and determining the target data model from a number of the data models;
a data obtaining module 63, configured to, in response to a trigger operation of selecting and determining at least two target fields from the multiple fields, obtain data corresponding to the at least two target fields according to an association relationship of the at least two target fields in the target data model;
a correspondence determining module 64, configured to determine a correspondence between at least two of the target fields and cells of a preset spreadsheet document;
and the electronic form generating module 65 is configured to fill the data corresponding to the at least two target fields into corresponding cells of a preset electronic form document according to the corresponding relationship, so as to generate an electronic form.
By applying the embodiment of the application, a data model query page is displayed on the spreadsheet application interface by responding to the data model query triggering operation on the spreadsheet application interface, and a plurality of data models are displayed on the data model query page; each data model comprises a plurality of fields with incidence relations; in response to a trigger operation for selecting and determining a target data model from a plurality of data models, displaying a plurality of fields of the target data model; responding to the trigger operation of selecting and determining at least two target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model; determining the corresponding relation between at least two target fields and cells of a preset electronic form document; and filling data corresponding to at least two target fields into corresponding cells of a preset spreadsheet document according to the corresponding relation to generate the spreadsheet. According to the method and the device, the fields are selected on the basis of the existing data model, and because the fields in the data model are correlated with each other, the data is acquired according to the incidence relation of the selected fields, rather than the data is acquired according to a single field, so that the spreadsheet generation efficiency is improved. Meanwhile, the user does not need to write query sentences, and the operation difficulty of the user is reduced.
Please refer to fig. 4, which is a schematic structural diagram of a computer device provided in the present application. As shown in fig. 4, the computer device 21 may include: a processor 210, a memory 211, and a computer program 212 stored in the memory 211 and operable on the processor 210, such as: a video data transmission program; the steps in the above embodiments are implemented when the processor 210 executes the computer program 212.
The processor 210 may include one or more processing cores, among other things. The processor 210 is connected to various parts in the computer device 21 by various interfaces and lines, performs various functions of the computer device 21 and processes data by executing or executing instructions, programs, code sets or instruction sets stored in the memory 211 and calling data in the memory 211, and optionally, the processor 210 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), programmable Logic Array (PLA). The processor 210 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the touch display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 210, but may be implemented by a single chip.
The Memory 211 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 211 includes a non-transitory computer-readable medium. The memory 211 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 211 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned method embodiments, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 211 may optionally be at least one memory device located remotely from the processor 210.
The embodiments of the present application further provide a computer storage medium, where multiple instructions may be stored in the computer storage medium, and the instructions are suitable for being loaded by a processor and being executed to perform the method steps of the embodiments, and for a specific execution process, reference may be made to the specific description of the embodiments, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described apparatus/terminal device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one type of logic function, and another division manner may be provided in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the above-described embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc.
The present invention is not limited to the above-described embodiments, and various modifications and variations of the present invention are intended to be included within the scope of the claims and the equivalent technology of the present invention if they do not depart from the spirit and scope of the present invention.

Claims (8)

1. A method for spreadsheet generation based on a data model, said method comprising the steps of:
responding to a data model query triggering operation on a spreadsheet application interface, and displaying a data model query page on the spreadsheet application interface, wherein the data model query page displays a plurality of data models; each data model comprises a plurality of fields with incidence relations;
in response to a trigger operation for selecting and determining a target data model from a plurality of data models, displaying a plurality of fields of the target data model;
responding to the trigger operation of selecting at least two determined target fields from the plurality of fields, and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model; storing at least two of the target fields and corresponding data as a target data set, and displaying the target data set on the spreadsheet application interface; the spreadsheet application interface comprises a data set display area and an electronic document display area; the data set display area displays the target data set and at least two target fields; the electronic document display area displays the preset electronic form document; the preset electronic form document comprises a plurality of list head fields and a plurality of blank cells, and each list head field corresponds to a column of blank cells;
determining the corresponding relation between at least two target fields and cells of a preset spreadsheet document; wherein, in response to each of the at least two target fields being dragged from the data set display area to a first blank cell of a column of blank cells corresponding to each of the headends of the lists, determining a correspondence between each of the target fields and the corresponding first blank cell;
and filling data corresponding to at least two target fields into corresponding cells of a preset spreadsheet document according to the corresponding relation to generate the spreadsheet.
2. The data model-based spreadsheet generation method of claim 1, wherein:
the step of determining the corresponding relationship between at least two target fields and the cells of the preset spreadsheet document comprises:
and responding to the preset selected operation of the cells of the spreadsheet document and the selected operation of each target field of at least two target fields, and determining the corresponding relation between each target field and the cells.
3. The data model-based spreadsheet generation method of claim 1, wherein said step of displaying a number of data models in response to a triggering operation on a spreadsheet application interface is preceded by the steps of:
acquiring a plurality of data source tables; each data source table comprises a plurality of fields;
associating a plurality of data source tables according to the identification of the field;
generating a dimension table and a fact table associated with the dimension table in response to a trigger operation of selecting a certain number of fields from the associated number of data source tables; the dimension table comprises a number of dimension fields, and the fact table comprises a measure field associated with the number of dimension fields;
and generating a plurality of data models according to the dimension table and the fact table.
4. The data model-based spreadsheet generation method of claim 3,
the dimension table further comprises dimension data corresponding to a plurality of the dimension fields, and the fact table further comprises measure data corresponding to the measure fields;
the step of generating a plurality of data models according to the dimension table and the fact table comprises:
generating a plurality of data models according to the dimension field, the dimension data, the measurement field and the measurement data;
the step of acquiring data corresponding to at least two target fields according to the incidence relation of the at least two target fields in the target data model in response to the trigger operation of selecting the determined at least two target fields from the plurality of fields comprises:
and responding to the triggering operation of selecting at least one target dimension field from the dimension fields and selecting at least one target measurement field from the measurement fields, and acquiring corresponding data according to a target data model where the at least one target dimension field and the at least one target measurement field are located.
5. The data model-based spreadsheet generation method of claim 1, wherein:
the step of acquiring data corresponding to at least two target fields according to the incidence relation of the at least two target fields in the target data model in response to the trigger operation of selecting the determined at least two target fields from the plurality of fields comprises:
responding to the trigger operation of selecting at least two determined target fields from the plurality of fields, generating a query request according to the incidence relation of the at least two target fields in the target data model, and sending the query request to a background server;
the background server analyzes the query request, generates an MDX query statement and sends the MDX query statement to a multidimensional query engine;
and the multidimensional query engine converts the MDX query statement into an SQL query statement, and performs data query from a database according to the SQL query statement to obtain data corresponding to at least two target fields.
6. An apparatus for spreadsheet generation based on a data model, comprising:
the query page display module is used for responding to data model query triggering operation on the spreadsheet application interface and displaying a data model query page on the spreadsheet application interface, wherein the data model query page displays a plurality of data models; each data model comprises a plurality of fields with incidence relations;
the field display module is used for responding to a trigger operation for selecting and determining a target data model from a plurality of data models and displaying a plurality of fields of the target data model;
the data acquisition module is used for responding to the trigger operation of selecting and determining at least two target fields from the fields and acquiring data corresponding to the at least two target fields according to the incidence relation of the at least two target fields in the target data model; saving at least two of the target fields and corresponding data as a target data set, and displaying the target data set on the spreadsheet application interface; the spreadsheet application interface comprises a data set display area and an electronic document display area; the data set display area displays the target data set and at least two target fields; the electronic document display area displays the preset electronic form document; the preset electronic form document comprises a plurality of list head fields and a plurality of blank cells, and each list head field corresponds to a column of blank cells;
the corresponding relation determining module is used for determining the corresponding relation between at least two target fields and cells of a preset spreadsheet document; wherein, in response to each of the at least two target fields being dragged from the data set display area to a first blank cell of a column of blank cells corresponding to each of the headends of the lists, determining a correspondence between each of the target fields and the corresponding first blank cell;
and the electronic form generation module is used for filling the data corresponding to at least two target fields into corresponding cells of a preset electronic form document according to the corresponding relation to generate the electronic form.
7. A computer device, comprising: processor, memory and computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 5 are implemented when the processor executes the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202210983924.2A 2022-08-17 2022-08-17 Spreadsheet generation method, device, equipment and medium based on data model Active CN115081414B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210983924.2A CN115081414B (en) 2022-08-17 2022-08-17 Spreadsheet generation method, device, equipment and medium based on data model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210983924.2A CN115081414B (en) 2022-08-17 2022-08-17 Spreadsheet generation method, device, equipment and medium based on data model

Publications (2)

Publication Number Publication Date
CN115081414A CN115081414A (en) 2022-09-20
CN115081414B true CN115081414B (en) 2022-12-02

Family

ID=83244183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210983924.2A Active CN115081414B (en) 2022-08-17 2022-08-17 Spreadsheet generation method, device, equipment and medium based on data model

Country Status (1)

Country Link
CN (1) CN115081414B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383545B (en) * 2023-06-05 2023-08-25 北京拓普丰联信息科技股份有限公司 Webpage report template generation method, device, equipment and medium
CN117454862A (en) * 2023-12-25 2024-01-26 青岛民航凯亚系统集成有限公司 Report generation method based on engine mode and self-service BI system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016041A1 (en) * 2006-07-14 2008-01-17 Frost Brandon H Spreadsheet-based relational database interface
US9773029B2 (en) * 2016-01-06 2017-09-26 International Business Machines Corporation Generation of a data model
CN113485781A (en) * 2021-07-23 2021-10-08 中国建设银行股份有限公司 Report generation method and device, electronic equipment and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A Spreadsheet Model for Using Web Service Data;Kerry Shih-Ping Chang et al.;《2014 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)》;20140728;第169-176页 *

Also Published As

Publication number Publication date
CN115081414A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN115081414B (en) Spreadsheet generation method, device, equipment and medium based on data model
CN107256265B (en) A kind of search-engine results data visualization methods of exhibiting and system
US10152560B2 (en) Graph database querying and visualization
US20170270177A1 (en) Data analysis engine
US9582573B2 (en) Interactive composite plot for visualizing multi-variable data
CN111143673A (en) Method and system for multi-channel customer information processing and automatic marketing
US20120260201A1 (en) Collection and analysis of service, product and enterprise soft data
CN111400599A (en) User group portrait generation method, device and system
US20160125345A1 (en) Systems, devices, and methods for determining an operational health score
EP3438843A1 (en) Uniform chart formatting based on semantics in data models
EP3617910A1 (en) Method and apparatus for displaying textual information
EP2883171A1 (en) Method and apparatus for searching information in electronic commerce platform
US20170140395A1 (en) Selling status display method, selling status display apparatus, and recording medium
CN112862525A (en) Shop site selection data determination method and system and electronic equipment
CN103853809A (en) Efficient space allocation for business objects
CN111340455A (en) Method, device and equipment for automatically generating data analysis result and storage medium
US10699451B1 (en) Generating digital graphical representations reflecting multiple data series utilizing dynamic y-axes
CN113129155A (en) Multi-type personnel information processing method, equipment and storage medium
CN115062133A (en) Data query method and device based on data model, computer equipment and medium
CN111950996A (en) Accounting processing method, device, equipment and medium
US10417258B2 (en) Interactive multi-dimensional nested table supporting scalable real-time querying of large data volumes
US10318627B2 (en) Visualizing dependencies of multi-dimensional data
JP2014229297A (en) Pivot analysis method using condition group
CN108132940A (en) A kind of application data extracting method and device
CN110737704B (en) Data display method and device

Legal Events

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