Spreadsheet creating method and device and computer equipment

文档序号:1544846 发布日期:2020-01-17 浏览:30次 中文

阅读说明:本技术 电子表格的创建方法、装置及计算机设备 (Spreadsheet creating method and device and computer equipment ) 是由 胡友兵 陈晓羽 于 2019-08-22 设计创作,主要内容包括:本申请公开了一种电子表格的创建方法、装置及计算机设备,涉及计算机技术领域,能有效解决生成电子表格时,容易出现的效率低下、准确性低、创建成本高的问题。其中方法包括:接收电子表格的生成请求,所述生成请求中携带有待生成电子表格的用户需求信息;筛选出符合所述用户需求信息的目标表格组件;按照待输入数据调整所述目标表格组件;利用调整后的所述目标表格组件构建初始电子表格;将所述待输入数据上传到所述初始电子表格中,以便生成完整电子表格。本申请适用于电子表格的自动生成。(The application discloses a spreadsheet establishing method, a spreadsheet establishing device and computer equipment, relates to the technical field of computers, and can effectively solve the problems of low efficiency, low accuracy and high establishing cost easily caused by generating a spreadsheet. The method comprises the following steps: receiving a spreadsheet generation request, wherein the generation request carries user demand information of a spreadsheet to be generated; screening out target table components meeting the user requirement information; adjusting the target table component according to the data to be input; constructing an initial spreadsheet using the adjusted target form component; and uploading the data to be input into the initial electronic form so as to generate a complete electronic form. The application is applicable to automatic generation of spreadsheets.)

1. A method of spreadsheet creation, comprising:

receiving a spreadsheet generation request, wherein the generation request carries user demand information of a spreadsheet to be generated;

screening out target table components meeting the user requirement information;

adjusting the target table component according to the data to be input;

constructing an initial spreadsheet using the adjusted target form component;

and uploading the data to be input into the initial electronic form so as to generate a complete electronic form.

2. The method of claim 1, further comprising, prior to screening out target form components that meet the user demand information:

obtaining sample table data containing different spreadsheet types;

extracting a table component from the sample table data;

configuring and generating original generation codes of all the form components and assembling code of the components among the form components;

a first mapping between the spreadsheet type and the form component, a second mapping between the form component and the originally generated code is created.

3. The method of claim 2, wherein the user requirement information comprises a target spreadsheet type and a preset keyword;

screening out the target table components meeting the user requirement information specifically comprises:

searching a table component to be selected corresponding to the type of the target electronic table in the first mapping relation;

dividing the component types of the table components to be selected;

and respectively screening the table component to be selected with the highest matching degree with the preset keyword from each component category, determining the table component to be selected as a target table component, and extracting an original generation code corresponding to the target table component based on the second mapping relation.

4. The method according to claim 3, wherein the request for generating the spreadsheet also carries a title name or a data link of the data to be input;

the adjusting the target table component according to the data to be input specifically comprises:

searching data to be input matched with the title name in a database; or

Skipping according to the data link to acquire the data to be input;

determining a data structure diagram according to a data node label and a data node hierarchy contained in the data to be input;

and adjusting the target table component according to the data structure diagram.

5. The method according to claim 4, wherein the determining a data structure diagram according to the data node labels and the data node hierarchy included in the data to be input specifically comprises:

extracting target data containing data node labels and data node levels in the data to be input;

classifying the target data into row attribute target data, column attribute target data and non-attribute target data according to the data node labels;

constructing a line attribute data structure diagram by using the data node hierarchy corresponding to the line attribute target data;

and constructing a column attribute data structure diagram according to the data node hierarchy corresponding to the column attribute target data.

6. The method of claim 5, wherein said adjusting the target table component according to the data structure diagram specifically comprises:

determining the number of first data nodes of each level in the line attribute data structure chart and the corresponding positions of the first data nodes;

determining the number of second data nodes of each level in the column attribute data structure chart and the positions of the corresponding second data nodes;

determining the number and the position of a third data node of the body according to the first data node and the second data node;

if the line head component in the target table component is judged not to meet the first data node number and/or the first data node position, modifying the original generation code of the line head component into a first generation code matched with the first data node number and the first data node position;

if the column head component in the target table component is judged not to meet the second data node number and/or the second data node position, modifying the original generation code of the column head component into a second generation code matched with the second data node number and the second data node position;

and if the table body component in the target table component is judged not to meet the third data node number and/or the third data node position, modifying the original generation code of the table body component into a third generation code matched with the third data node number and the third data node position.

7. The method according to claim 6, wherein the building an initial spreadsheet using the adjusted target form components comprises:

generating a target row head component, a target column head component and a target body component based on the first generation code, the second generation code and the third generation code respectively;

and calling the component assembling code to assemble the target row head component, the target column head component and the target body component so as to obtain an initial spreadsheet.

8. An apparatus for creating a spreadsheet, comprising:

the receiving module is used for receiving a spreadsheet generation request, wherein the generation request carries user demand information of a spreadsheet to be generated;

the screening module is used for screening out target table components meeting the user requirement information;

the adjusting module is used for adjusting the target table component according to the data to be input;

a building module for building an initial spreadsheet using the adjusted target form component;

and the uploading module is used for uploading the data to be input to the initial spreadsheet so as to generate a complete spreadsheet.

9. A non-transitory readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the method of creating a spreadsheet as claimed in any one of claims 1 to 7.

10. A computer device comprising a non-volatile readable storage medium, a processor, and a computer program stored on the non-volatile readable storage medium and executable on the processor, wherein the processor implements the method of creating a spreadsheet according to any of claims 1 to 7 when executing the program.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for creating an electronic form, and a computer device.

Background

With the popularization of computers and the increasing degree of enterprise informatization, forms for making tables by computers are increasingly emerging. Spreadsheets are widely used in various industries as a highly refined, centralized form of information presentation, with their intuitive interface, excellent computing capabilities, and graphical tools.

At present, the background generation of the electronic forms is widely different in implementation mode, a fixed general method is not available, most forms are manually selected or form styles are newly developed and designed according to application requirements, data are input into corresponding positions of the forms, and then the electronic forms are created.

However, if the above method for creating an electronic form is completely manually repeated, the time consumption of creating the form is long, the creating efficiency is low, the accuracy cannot be guaranteed, and the creating cost of the electronic form is also increased.

Disclosure of Invention

In view of this, the present application provides a method and an apparatus for creating an electronic form, and a computer device, and mainly aims to solve the problems of low efficiency, low accuracy, and high creation cost that are easily generated when an electronic form is generated.

According to an aspect of the present application, there is provided a method of creating a spreadsheet, the method comprising:

receiving a spreadsheet generation request, wherein the generation request carries user demand information of a spreadsheet to be generated;

screening out target table components meeting the user requirement information;

adjusting the target table component according to the data to be input;

constructing an initial spreadsheet using the adjusted target form component;

and uploading the data to be input into the initial electronic form so as to generate a complete electronic form.

According to another aspect of the present application, there is provided an apparatus for creating a spreadsheet, the apparatus comprising:

the receiving module is used for receiving a spreadsheet generation request, wherein the generation request carries user demand information of a spreadsheet to be generated;

the screening module is used for screening out target table components meeting the user requirement information;

the adjusting module is used for adjusting the target table component according to the data to be input;

a building module for building an initial spreadsheet using the adjusted target form component;

and the uploading module is used for uploading the data to be input to the initial spreadsheet so as to generate a complete spreadsheet.

According to still another aspect of the present application, there is provided a non-transitory readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described spreadsheet creation method.

According to still another aspect of the present application, there is provided a computer apparatus including a nonvolatile readable storage medium, a processor, and a computer program stored on the nonvolatile readable storage medium and executable on the processor, the processor implementing the above-described spreadsheet creation method when executing the program.

By means of the technical scheme, compared with the existing mode of manually creating the form, the form creating method, the form creating device and the computer equipment provided by the application screen out the target form component according to the user requirement information contained in the generating request after the generating request of the electronic form is acquired, adjust the display cells in the components according to the data to be input so that the adjusted target form component meets the display requirement of the data to be input, then uniformly create and generate the initial electronic form by using the adjusted target form component, and finish automatic creation of the electronic form after the data to be input is uploaded to the initial electronic form. According to the form generation method and device, the form generation operation is divided into the generation operation of each form component, the target form component is directly selected from each form component template according to the user requirement information, when the form component does not accord with the display requirement, only targeted simple adjustment is needed, and the electronic form does not need to be re-formulated, so that the form generation step is simplified, and the form creation time is reduced. And the matching of the data to be input and the form can be realized, the data to be input is accurately uploaded to the corresponding position in the form, the whole operation can be completed by a computer, the labor is saved, the working efficiency is improved, and the generation cost of the electronic form is reduced.

The above description is only an outline of the technical solution of the present application, and the present application can be implemented in accordance with the content of the description so as to make the technical means of the present application more clearly understood, and the detailed description of the present application will be given below so that the above and other objects, features, and advantages of the present application can be more clearly understood.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application to the disclosed embodiment. In the drawings:

FIG. 1 is a flow chart illustrating a method for creating a spreadsheet according to an embodiment of the present application;

FIG. 2 is a flow chart illustrating another spreadsheet creation method provided by the embodiments of the present application;

FIG. 3 is a diagram illustrating an example of a structure of a deterministic data structure provided in an embodiment of the present application;

FIG. 4 is a schematic structural diagram of an apparatus for creating a spreadsheet according to an embodiment of the present application;

fig. 5 is a schematic structural diagram illustrating another spreadsheet creation apparatus provided in the embodiment of the present application.

Detailed Description

The present application will be described in detail below with reference to embodiments and with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.

Aiming at the problems of low efficiency, low accuracy and high creation cost which are easily caused when the electronic form is generated at present, the application provides a method for creating the electronic form, as shown in fig. 1, the method comprises the following steps:

101. and receiving a spreadsheet generation request, wherein the generation request carries user requirement information of the spreadsheet to be generated.

In a specific application scenario, a spreadsheet generation request is received, a spreadsheet generation task is created, and personalized customization of the spreadsheet is realized according to user requirement information contained in the generation request.

The execution subject of the embodiment may be a device or an apparatus for creating an electronic form, and specifically, according to a received generation request, a target form component matched with user requirement information is screened out, adaptive adjustment on the target form component is realized according to data to be input, then, an electronic form is created by using the adjusted target form component, and the data to be input is synchronously uploaded to the created electronic form, so that automatic creation of the electronic form is completed.

102. And screening out target table components meeting the user requirement information.

For the embodiment, in a specific application scenario, in order to adapt to the diversified generation requirements of the electronic forms, form components of various styles and categories can be provided in advance, so that when the electronic forms are created, the most suitable target form components are selected according to user requirement information, and further the personalized design requirements of users are met.

103. And adjusting the target table component according to the data to be input.

Correspondingly, for the embodiment, after the target form component is screened out, the number of cells that the form needs to be loaded and the merging state may be different due to different data to be input, and the target component cannot cover all form display conditions, so when it is determined that the target form component cannot display complete data to be input, the target component needs to be properly adjusted, so that the data to be input can be completely and accurately displayed in the corresponding cells of the target form component.

104. An initial spreadsheet is constructed using the adjusted target form component.

Wherein the initial electronic form is an empty electronic form which is preliminarily created by utilizing the adjusted target form component and has no input data.

For the embodiment, in a specific application scenario, the creation of the target spreadsheet is divided into the screening and creation of each target spreadsheet component, and after the target spreadsheet components of different component types are screened out, each target spreadsheet component can be spliced together, thereby completing the construction of the initial spreadsheet.

105. And uploading the data to be input into the initial spreadsheet so as to generate a complete spreadsheet.

By the method for creating the electronic form, after a request for generating the electronic form is obtained, the target form component is screened out according to user requirement information contained in the request for generating the electronic form, the display cells in the component are adjusted according to the data to be input, so that the adjusted target form component meets the display requirement of the data to be input, then the adjusted target form component is used for creating and generating the initial electronic form in a unified mode, and after the data to be input are uploaded to the initial electronic form, automatic creation of the electronic form is completed. According to the form generation method and device, the form generation operation is divided into the generation operation of each form component, the target form component is directly selected from each form component template according to the user requirement information, when the form component does not accord with the display requirement, only targeted simple adjustment is needed, and the electronic form does not need to be re-formulated, so that the form generation step is simplified, and the form creation time is reduced. And the matching of the data to be input and the form can be realized, the data to be input is accurately uploaded to the corresponding position in the form, the whole operation can be completed by a computer, the labor is saved, the working efficiency is improved, and the generation cost of the electronic form is reduced.

Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully explain the specific implementation process in the embodiment of the present application, another method for creating a spreadsheet is provided, as shown in fig. 2, the method includes:

201. and receiving a spreadsheet generation request, wherein the generation request carries user requirement information of the spreadsheet to be generated.

The user requirement information can comprise a target electronic form type and a preset keyword, wherein the target electronic form type is a form type corresponding to an electronic form to be generated, such as a specific certain industry field or a certain attribute department; the preset keywords are one or more keywords used for defining specific display styles in the target spreadsheet types, such as related keywords for setting a commute style, a lovely style, a simple style and the like.

In a specific application scenario, in order to provide a plurality of selectable table components, as a preferred mode, the method may further include: obtaining sample table data containing different spreadsheet types; extracting a table component from the sample table data; configuring and generating original generation codes of all table components and component assembly codes among the assembled table components; a first mapping between spreadsheet types and form components, and a second mapping between form components and the originally generated code are created.

202. And searching a table component to be selected corresponding to the type of the target electronic table in the first mapping relation.

For the embodiment, after the target spreadsheet type is received, the table component to be selected corresponding to the target spreadsheet type is screened out from the database through the first mapping relationship created in the above embodiment, so as to further screen out the target table component.

203. And dividing the component categories of the table components to be selected.

The component categories may include row head components, column head components, form templates, overall style components, and the like.

For the embodiment, the table component to be selected, which conforms to the type of the target spreadsheet, in the database may include a plurality of component categories, and the same component category may include a plurality of building styles, and the division of the component categories on the table component to be selected is to facilitate screening out one target table component from each component category, and further, construct the initial spreadsheet by using each target table component together.

204. And respectively screening the table component to be selected with the highest matching degree with the preset key words from all the component categories, determining the table component to be selected as a target table component, and extracting an original generation code corresponding to the target table component based on the second mapping relation.

In a specific application scenario, when configuring a form component, corresponding attribute tags may be labeled on each form component in advance according to a display style, for this embodiment, when determining a target form component from the form components to be selected, preset keywords may be respectively matched with the attribute tags of each form component to be selected, the form component to be selected with the highest matching degree in the same component category is determined as the target form component, and an original generated code corresponding to the target form component is extracted from a database based on the second mapping relationship created in embodiment step 201, so as to further generate the target form component meeting the user requirement by calling or adjusting the original generated code.

For example, determining that the A target spreadsheet type corresponds to the component category that needs to be generated includes: the component type a, the component type b and the component type c are in various display forms aiming at the component type a, so that preset keywords can be sequentially matched with attribute labels of all table components to be selected in the component type a, and the table component to be selected with the highest matching rate is determined as a target table component of the component type a. And b, determining corresponding target table components according to the component class b and the component class c in the screening form, and extracting original generation codes corresponding to the target table components from the database according to the second mapping relation.

205. And retrieving the data to be input according to the generation request of the electronic form.

In a specific application scenario, because data to be input is sometimes huge, much time is wasted by user input, and errors are easy to occur. However, the data to be input generally exists in a specific location, such as a database. For the embodiment, as a preferable mode, the corresponding data to be input can be automatically queried by using the file or title name, the data link and the like of the data to be input, so that the efficiency of data searching is improved.

For this embodiment, the request for generating the electronic form may further include a title name or a data link of the data to be input, so step 205 of this embodiment may specifically include: searching data to be input matched with the title name in a database; or skipping according to the data link to acquire the data to be input.

When the data to be input matched with the title name is searched in the database, a preset threshold value can be preset, and the data which has the highest similarity with the title name and is larger than the preset threshold value in the database is determined as the data to be input.

206. And determining a data structure diagram according to the data node labels and the data node hierarchy contained in the data to be input.

In a specific application scenario, because the format of the obtained table data is unknown, the number of cells required to be loaded in the table and the merging state may be different, and because the target component cannot cover all table display conditions, when it is determined that the target table component cannot display complete data to be input, the target table component needs to be adjusted appropriately. In the embodiment, the contrast adjustment of the target table component can be realized by constructing a data structure diagram.

For the present embodiment, the step 206 of the embodiment may specifically include: extracting target data containing data node labels and data node levels in data to be input; classifying the target data into row attribute target data, column attribute target data and non-attribute target data according to data node labels; constructing a line attribute data structure diagram by using a data node hierarchy corresponding to the line attribute target data; and constructing a column attribute data structure diagram according to the data node hierarchy corresponding to the column attribute target data.

When the data to be input is derived, the data node labels and the data node hierarchies of the data to be input are acquired, so that line headers and column headers and corresponding sub-nodes at each level are obtained, and a tree structure corresponding to the lines and the columns is formed. The construction of the line attribute data structure chart and the column attribute data structure chart is determined by utilizing data node labels and the hierarchies of the data nodes, the data node labels and the data node hierarchies can be labeled on data to be input in advance, the data node labels and the data node hierarchies can be determined by semantic analysis of the data to be input, then target data is extracted, then the progressive relation of the data node hierarchies is taken as a clue, the data relation is represented by a top-down connecting line, the content of the data is noted, and the hierarchical structure of the data to be input is reflected macroscopically.

Taking semantic analysis on data to be input to determine a data node label and a data node hierarchy, for example, the specific content of the data to be input is obtained as follows: the average scores of mathematics, Chinese, English, physics and chemistry of the first middle school in Shanghai city are respectively as follows: 0. 0, 0 and 0, and the results of mathematics, language, English, physics and chemistry of the second middle school, Zhang III, Shanghai city are respectively as follows: 100. 0, 0. The achievements of mathematics, language, English, physics and chemistry of the second middle school of Shanghai City, namely Li four, are respectively as follows: 0. 100, 99, 0. The results of mathematics, language, English, physics and chemistry of the second middle school, the second class and the fifth school in Shanghai city are respectively as follows: 0. 0, 0. ... Such as: the second middle school in Shanghai city is a phrase for one class and two classes, the second middle school in Shanghai city can be used as a list head, and the first class and the second class can be used as a next-level list head corresponding to the second middle school in Shanghai city, namely a second-level list head; the first class is the idiom of zhang san and lie si, zhang san and lie si can be used as the next-level list head corresponding to the first class, i.e. the third-level list head, similarly, the second class is the idiom of wang wu, and wang wu can be used as the next-level list head corresponding to the second class, i.e. the other third-level list head. Accordingly, the first school in Shanghai city can be considered as a list head in parallel with the second school in Shanghai city. For the mathematics, the language, the English, the physics and the chemistry of the line header, as the final phrase of the specific score, the final score is the specific filling data without attribute (whether the data needs to be filled is judged by a digital character identification mode), so for the mathematics, the language, the English, the physics and the chemistry of the line header, the first-level line header does not have the next-level line header. An exemplary graph of the data structure graph as shown in fig. 3 may be generated at the end.

207. And adjusting the target table component according to the data structure diagram.

For this embodiment, in a specific application scenario, the step 207 of the embodiment may specifically include: determining the number of first data nodes of each level in the line attribute data structure chart and the corresponding positions of the first data nodes; determining the number of second data nodes of each level in the column attribute data structure chart and the positions of the corresponding second data nodes; determining the number and the position of a third data node of the body according to the first data node and the second data node; if the line head component in the target table component is judged not to meet the first data node number and/or the first data node position, the original generation code of the line head component is modified into a first generation code matched with the first data node number and the first data node position; if the column head component in the target table component is judged not to meet the number of the second data nodes and/or the positions of the second data nodes, modifying the original generation code of the column head component into a second generation code matched with the number of the second data nodes and the positions of the second data nodes; and if the form body component in the target form component is judged not to meet the third data node number and/or the third data node position, modifying the original generation code of the form body component into a third generation code matched with the third data node number and the third data node position.

For example, based on the embodiment of the embodiment step 206, it can be determined that the row attribute data structure diagram in fig. 3 includes 1 data node hierarchy in total, and the number of the corresponding first data nodes is 5; determining that the column attribute data structure chart contains 3 data node levels in common, wherein the first data node level contains 3 second data nodes, the second data node level contains 2 second data nodes, and the third data node level contains 3 second data nodes; and the number of the third data nodes of the body can be determined to be 5 x 4 based on the first data nodes in the row attribute data structure diagram and the second data nodes in the column attribute data structure diagram. When the number of first data nodes contained in the row head component in the target table component is judged to be not equal to 5 or the positions of the corresponding first data nodes at all levels are not consistent with the structural deployment in the row attribute data structure diagram, modifying the original generation code of the row head component into a first generation code; if it is judged that any one or more second data nodes in the column head assembly of the target table assembly do not accord with the column attribute data structure diagram, the original generation code of the column head assembly can be modified into a second generation code according to the number of the second data nodes and the positions of the second data nodes; if the cells contained in the form body component are judged not to be in accordance with the format of 5 rows and 4 columns, the original generation code of the form body component needs to be modified into a third generation code, and the cell format of the form body data is made to be 5 rows and 4 columns.

Furthermore, the user-defined modification of the default style presented by the table can be realized by modifying the originally generated code of the overall style component, wherein the overall style component can comprise a printing format, a paper style, an alignment mode, a cell format and the like.

208. And generating a target row head component, a target column head component and a target body component based on the first generation code, the second generation code and the third generation code respectively.

For the embodiment, after the first generation code, the second generation code and the third generation code are obtained through modification, the target row head component for building the initial spreadsheet based on the first generation code, the target column head component for building the initial spreadsheet based on the second generation code and the target body component for building the initial spreadsheet based on the third generation code may be generated.

209. And calling the component assembling code to assemble the target row head component, the target column head component and the target body component so as to obtain the initial spreadsheet.

In a specific application scenario, the component assembly code can also be modified by a user, so that an original assembly rule is adjusted, and the electronic form display style is changed, if the original assembly rule is as follows: the title is at the top of the table, the list head is below the title, the row list head is at the left side of the table, and the body data is below the list head; if the user wants to modify the assembly rule into the condition that the title is on the leftmost side of the table, the row header is on the right side of the title, the body data is on the next right side of the row header, and the list header is on the upper side of the body data, the combined positions of the title, the row header, the list header and the body in the original assembly code can be modified according to the newly defined assembly rule, and the target table component is further adjusted and assembled into a user-defined modified combined form.

210. And uploading the data to be input into the initial spreadsheet so as to generate a complete spreadsheet.

In a specific application scenario, after the initial spreadsheet is created, target data extracted from data to be input may be uploaded to the initial spreadsheet based on a data node label and a data node hierarchy, and an uploading sequence of different attribute data may be specifically set, for example, the reading sequence is set as: line attribute target data, column attribute target data, no attribute target data. And in the process of reading the data with the same attribute, reading the data according to the increasing sequence of the data node levels, namely reading the content in the first data node level in the data structure diagram, finally reading the data in the highest data node level, and filling the data to be filled in the assembled initial electronic form according to the data sequence shown in the data structure diagram. For non-attribute target data, the data can be uploaded to the corresponding position of the form body based on semantic parsing. If the data to be input is acquired as the average scores of the first middle school mathematics, the Chinese and the English in Shanghai city, the average scores are respectively as follows: 1. 2 and 3. Then, based on semantic analysis, uploading the attribute-free target data 1 to a cell corresponding to the first middle school in Shanghai city with the row attribute being math and the column attribute being Shanghai city; uploading the non-attribute target data 2 to a cell corresponding to the first middle school in Shanghai city with the line attribute of Chinese and the column attribute of Shanghai city; and uploading the non-attribute target data 3 to a cell corresponding to the first middle school in Shanghai city with the line attribute of English and the column attribute of Shanghai city.

By the electronic form creating method, the table component to be selected corresponding to the type of the target electronic form can be obtained from the database based on the electronic form generating request, the target table component corresponding to each component type is further screened out, then whether the target table component needs to be modified or not is determined through the data to be input of the electronic form, if the target table component needs to be modified, the original generating code corresponding to the target electronic form is adjusted, then each target table component is generated by utilizing the modified component generating code, the electronic form is constructed, and the electronic form is automatically created after the data to be input is identified and uploaded to the created electronic empty form. According to the form generation method and device, the form generation operation is divided into the generation operation of each form component, the target form component is directly selected from each form component template according to the user requirement information, when the form component does not accord with the display requirement, only targeted simple adjustment is needed, and the electronic form does not need to be re-formulated, so that the form generation step is simplified, and the form creation time is reduced. And the matching of the data to be input and the form can be realized, the data to be input is accurately uploaded to the corresponding position in the form, the whole operation can be completed by a computer, the labor is saved, the working efficiency is improved, and the generation cost of the electronic form is reduced. When data are matched and uploaded, the scheme can utilize the data to be input to construct a data structure diagram, and adjust the target form component according to the data structure diagram, so that the personalized customization of the electronic form is completed, and the display form of the electronic form can meet the requirement of the data to be input. The structure level of the data to be input can be more visual and clear by constructing the data structure diagram, the table data can be more accurately matched with the corresponding cell position, and the automatic identification and uploading precision of the data is effectively improved.

Further, as a concrete embodiment of the method shown in fig. 1 and fig. 2, an embodiment of the present application provides an apparatus for creating a spreadsheet, as shown in fig. 4, the apparatus includes: the device comprises a receiving module 31, a screening module 32, an adjusting module 33, a constructing module 34 and an uploading module 35.

The receiving module 31 is configured to receive a request for generating an electronic form, where the request carries user requirement information of the electronic form to be generated;

the screening module 32 can be used for screening out target table components meeting the user requirement information;

an adjusting module 33, operable to adjust the target table component according to the data to be input;

a build module 34 operable to build an initial spreadsheet using the adjusted target form components;

and the uploading module 35 is used for uploading the data to be input into the initial spreadsheet so as to generate the complete spreadsheet.

In a specific application scenario, in order to provide a plurality of selectable table components, as shown in fig. 5, the apparatus further includes: an acquisition module 36, an extraction module 37, a configuration module 38, a creation module 39.

An obtaining module 36 operable to obtain sample table data containing different spreadsheet types;

an extraction module 37 operable to extract a table component from the sample table data;

a configuration module 38, configured to configure original generation codes for generating various form components and component assembly codes between assembled form components;

a creation module 39 is operable to create a first mapping between spreadsheet types and form components and a second mapping between form components and the originally generated code.

In a specific application scenario, the user requirement information may include a target spreadsheet type and a preset keyword, and in order to screen out a target spreadsheet component that meets the user requirement information, the screening module 32 may be specifically configured to search for a to-be-selected spreadsheet component corresponding to the target spreadsheet type in the first mapping relationship; dividing the component types of the table components to be selected; and respectively screening the table component to be selected with the highest matching degree with the preset key words from all the component categories, determining the table component to be selected as a target table component, and extracting an original generation code corresponding to the target table component based on the second mapping relation.

Correspondingly, the spreadsheet generation request may also carry a title name or a data link of the data to be input, and the adjustment module 33 may be specifically configured to search the data to be input matching with the title name in the database in order to adjust the target form component according to the data to be input; or skipping according to the data link to acquire data to be input; determining a data structure diagram according to a data node label and a data node hierarchy contained in data to be input; and adjusting the target table component according to the data structure diagram.

In a specific application scenario, in order to determine a data structure diagram according to a data node label and a data node hierarchy included in data to be input, the adjusting module 33 may be specifically configured to extract target data including the data node label and the data node hierarchy included in the data to be input; classifying the target data into row attribute target data, column attribute target data and non-attribute target data according to data node labels; constructing a line attribute data structure diagram by using a data node hierarchy corresponding to the line attribute target data; and constructing a column attribute data structure diagram according to the data node hierarchy corresponding to the column attribute target data.

Correspondingly, in order to adjust the target table component according to the data structure diagram, the adjusting module 33 is specifically configured to determine the number of first data nodes and the corresponding positions of the first data nodes in each level in the row attribute data structure diagram; determining the number of second data nodes of each level in the column attribute data structure chart and the positions of the corresponding second data nodes; determining the number and the position of a third data node of the body according to the first data node and the second data node; if the line head component in the target table component is judged not to meet the first data node number and/or the first data node position, the original generation code of the line head component is modified into a first generation code matched with the first data node number and the first data node position; if the column head component in the target table component is judged not to meet the number of the second data nodes and/or the positions of the second data nodes, modifying the original generation code of the column head component into a second generation code matched with the number of the second data nodes and the positions of the second data nodes; and if the form body component in the target form component is judged not to meet the third data node number and/or the third data node position, modifying the original generation code of the form body component into a third generation code matched with the third data node number and the third data node position.

In a specific application scenario, in order to construct an initial electronic form using the adjusted target form component, the construction module 34 is specifically configured to generate a target row header component, a target column header component, and a target body component based on the first generation code, the second generation code, and the third generation code, respectively; and calling the component assembling code to assemble the target row head component, the target column head component and the target body component so as to obtain the initial spreadsheet.

It should be noted that other corresponding descriptions of the functional units related to the apparatus for creating an electronic form provided in this embodiment may refer to the corresponding descriptions in fig. 1 to fig. 2, and are not described herein again.

Based on the methods shown in fig. 1 and fig. 2, correspondingly, the embodiment of the present application further provides a storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the method for creating the spreadsheet shown in fig. 1 and fig. 2.

Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present application.

Based on the method shown in fig. 1 and fig. 2 and the virtual device embodiment shown in fig. 4 and fig. 5, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above-described spreadsheet creation method as shown in fig. 1 and 2.

Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.

It will be understood by those skilled in the art that the computer device structure provided in the present embodiment is not limited to the physical device, and may include more or less components, or combine some components, or arrange different components.

The nonvolatile readable storage medium can also comprise an operating system and a network communication module. The operating system is a program of hardware and software resources of the physical device of the creation of the spreadsheet that supports the operation of information handling programs as well as other software and/or programs. The network communication module is used for realizing communication among components in the nonvolatile readable storage medium and communication with other hardware and software in the entity device.

Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. By applying the technical scheme, compared with the prior art, the method and the device for automatically creating the electronic form can acquire the table components to be selected corresponding to the types of the target electronic form from the database based on the electronic form generation request, further screen out the target table components corresponding to the component types, determine whether the target table components need to be modified according to the data to be input of the electronic form, adjust the original generation codes corresponding to the target electronic form if the target table components need to be modified, further generate the target table components by utilizing the modified component generation codes, achieve the building of the electronic form, and finish the automatic creation of the electronic form after the data to be input is identified and uploaded to the created electronic empty form. According to the form generation method and device, the form generation operation is divided into the generation operation of each form component, the target form component is directly selected from each form component template according to the user requirement information, when the form component does not accord with the display requirement, only targeted simple adjustment is needed, and the electronic form does not need to be re-formulated, so that the form generation step is simplified, and the form creation time is reduced. And the matching of the data to be input and the form can be realized, the data to be input is accurately uploaded to the corresponding position in the form, the whole operation can be completed by a computer, the labor is saved, the working efficiency is improved, and the generation cost of the electronic form is reduced. When data are matched and uploaded, the scheme can utilize the data to be input to construct a data structure diagram, and adjust the target form component according to the data structure diagram, so that the personalized customization of the electronic form is completed, and the display form of the electronic form can meet the requirement of the data to be input. The structure level of the data to be input can be more visual and clear by constructing the data structure diagram, the table data can be more accurately matched with the corresponding cell position, and the automatic identification and uploading precision of the data is effectively improved.

Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.

The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种型材下料表的转化方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!