Method and device for filling data, electronic device, and medium
By obtaining the character characteristics of table cell data, the database fields are automatically determined, which solves the problem of low efficiency in manual designation of correspondence relationships in the prior art, and realizes efficient automatic filling of table data.
Patent Information
- Application Number
- CN202210195567.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-03-01
AI Technical Summary
When storing data in tables to a database, the prior art requires manual specification of the correspondence between the data column and the database field, which is extremely inefficient.
By obtaining the character characteristics of cell data in the table, it automatically determines its corresponding fields in the preset database and fills the data into the database.
Automatic filling of table data is realized, greatly improving the efficiency of storing table data to the database and avoiding the inefficient process of manual confirmation.
Smart Images

Figure CN114861614B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, for example, to a method and device for filling data, an electronic device, and a storage medium. Background Art
[0002] In the operation process of modern enterprises, it is often necessary to organize various types of spreadsheet files to record various data in the production process. For example, Excel spreadsheet files are used to record different types of data such as personnel, transportation, literature, R&D data, asset data, financial data, etc. In order to realize the information management of the enterprise, it is usually necessary to store the data in these spreadsheets in the database, and then use the information management system to call the relevant data in the database for analysis, display and other operations.
[0003] Due to regional differences, different business perceptions, etc., even for the same type of tables, the format of stored data or the order of data columns often vary greatly. For example, Table A and Table B are both used to store financial data, where the first column of data in Table A is type A data and the second column of data is type B data, while the first column of data in Table B is type B data and the second column of data is type A data. Therefore, in the process of storing the data in the table into the database, the corresponding relationship between the data columns and the fields in the database needs to be manually specified for different tables, and this manual confirmation method is extremely inefficient. Summary of the invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] The embodiments of the present disclosure provide a method and device for filling data, an electronic device, and a storage medium to improve the efficiency of storing data in a table into a database.
[0006] In some embodiments, the method for filling data includes: obtaining a table uploaded by a user, the table including a number of cells; obtaining character features of the data in each cell; determining the corresponding fields of the data in each cell in a preset database according to each of the character features; and filling the data in each cell into the database according to the fields corresponding to the data in each cell.
[0007] In some embodiments, the device for filling data includes: a first acquisition module, configured to acquire a table uploaded by a user, wherein the table includes a plurality of cells; a second acquisition module, configured to acquire character features of the data in each cell; a determination module, configured to determine the corresponding fields of the data in each cell in a preset database according to the character features; and a filling module, configured to fill the data in each cell into the database according to the fields corresponding to the data in each cell.
[0008] In some embodiments, an electronic device includes a processor and a memory storing program instructions, and the processor is configured to execute the above-mentioned method for filling data when running the program instructions.
[0009] In some embodiments, the storage medium stores program instructions, and when the program instructions are run, the above method for filling data is executed.
[0010] The method and device, electronic device, and storage medium for filling in data provided by the embodiments of the present disclosure can achieve the following technical effects: according to the character features of the data in each cell in the table, the corresponding fields of the data in each cell in the preset database are determined respectively, and then the data in each cell are filled into the database according to the corresponding fields, without the need to manually determine the correspondence between the data and the fields, and the database can be automatically filled with the table data, which greatly improves the efficiency of storing the data in the table into the database.
[0011] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0013] Figure 1 is a schematic diagram of a method for filling data provided by an embodiment of the present disclosure;
[0014] Figure 2 is a schematic diagram of a device for filling data provided by an embodiment of the present disclosure;
[0015] Figure 3 It is a schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0017] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0018] Unless otherwise stated, the term "plurality" means two or more.
[0019] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0020] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0021] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0022] Combination Figure 1 As shown, a method for filling data provided by an embodiment of the present disclosure includes:
[0023] Step S101, obtaining a table uploaded by a user, the table including a number of cells;
[0024] Step S102, obtaining character features of data in each cell;
[0025] Step S103, determining the corresponding field of the data in each cell in a preset database according to the characteristics of each character;
[0026] Step S104, filling the data in each cell into the database according to the field corresponding to the data in each cell.
[0027] By adopting the method for filling data provided by the embodiment of the present disclosure, the corresponding fields of the data in each cell in the table are determined according to the character features of the data in each cell, and then the data in each cell is filled into the database according to the corresponding field. There is no need to manually determine the correspondence between the data and the field, and the database can be automatically filled with the table data, which greatly improves the efficiency of storing the data in the table into the database.
[0028] Filling the data in each cell into the database according to the fields corresponding to the data in each cell includes: filling the data in each cell in the table row by row into the fields corresponding to the data in each cell in the database, or filling the data in each cell in the table column by column into the fields corresponding to the data in each cell in the database.
[0029] Optionally, the character features of the data in the cell include the length of the string. Determining the fields corresponding to the data in the cell in a preset database according to the character features includes: determining the string length of the data in the cell, performing a table lookup operation on the determined string length in a preset field table to obtain the field corresponding to the string length, and then determining the field obtained by the table lookup as the field corresponding to the data in the cell in the preset database. The preset field table stores the string length range and the corresponding field.
[0030] Optionally, the character features of the data in the cell include one or more of character boldness, font type, character color, and string type. Among them, the character boldness is used to indicate whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc. Determine the fields corresponding to the data in the cell in a preset database according to the character features, including: determining the character features of the data in the cell, performing a table lookup operation on the determined character features in a preset field table to obtain the field corresponding to the character features, and then determining the field obtained by the table lookup as the field corresponding to the data in the cell in the preset database. The preset field table stores character features and corresponding fields.
[0031] Optionally, determining the corresponding field of the data in each cell in a preset database according to each character feature includes:
[0032] Determine whether the data in cells of different columns are of the same data type according to the characteristics of each character;
[0033] When the data in the cells of each column are of the same data type, any cell in each column is determined as a candidate cell;
[0034] Determine the corresponding field of the data in each candidate cell in a preset database according to the character features of the data in each candidate cell;
[0035] The fields corresponding to the data in each candidate cell in a preset database are determined as the fields corresponding to the data in each column of cells in a column of cells corresponding to each candidate cell.
[0036] Before filling in data, first determine whether the data in cells of different columns are of the same data type, which can verify the data in the table, avoid errors when manually entering table data, and improve the accuracy of the data filled in the database.
[0037] Optionally, determining whether data in cells of different columns are of the same data type according to the characteristics of each character includes:
[0038] For each column of cells, get the string length of the data in each cell;
[0039] For each column of cells, the character features in each cell and the corresponding string length in each cell are input into a preset data type prediction model for data type prediction to obtain a prediction result corresponding to each column of cells. The prediction result is used to characterize whether the data in each cell in each column of cells is of the same data type, wherein the character features include one or more of character boldness, font type, character color, and string type.
[0040] In this way, the efficiency of storing the data in the table into the database can be improved while ensuring the accuracy of the filled data.
[0041] Optionally, the data type prediction model is obtained by:
[0042] Acquire first sample data with a data type label, the first sample data including a character feature sample and a string length sample;
[0043] The first sample data with the data type label is input into a preset first neural network model for training to obtain a data type prediction model.
[0044] Optionally, the character feature sample includes one or more of character boldness, font type, character color and string type. The character boldness is used to indicate whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc.
[0045] Optionally, determining the corresponding field of the data in each cell in a preset database according to each character feature includes:
[0046] Get the user information of the user and get the location information of each cell;
[0047] The user information, the character features corresponding to each cell and the position information of each cell are input into a preset field prediction model for field prediction to obtain the field corresponding to the data in each cell in a preset database.
[0048] In the above embodiment, the character features corresponding to each cell include one or more of character boldness, font type, character color, string length and string type. Among them, the character boldness is used to indicate whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc.
[0049] Optionally, the position information of the cell is the row and column information of the cell in the table, for example, the third row and the second column, or (3,2). (3,2) represents the cell in the third row and the second column of the table. Optionally, the position information of the cell is the column information of the cell in the table, for example, the second column, or 2, where 2 represents the cell in the second column of the table.
[0050] Optionally, the user information includes one or more of the user's position, age, gender, work experience, and form browsing history.
[0051] Optionally, the user information is received by storing the user information input by the user in a preset user information table. When the form uploaded by the user is obtained, the user information corresponding to the user is matched in the user information table.
[0052] In some embodiments, the user's position, the character features corresponding to each cell, and the location information of each cell are input into a preset field prediction model for field prediction, and the fields corresponding to the data in each cell in the preset database are obtained. That is, for each cell in the table, the user's position corresponding to the table, the character features corresponding to the cell, and the location information corresponding to the cell are input into the preset field prediction model for field prediction. The character features corresponding to the cell include one or more of the character bolding, font type, character color, string length, and string type. Among them, the character bolding is used to characterize whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc. In this way, since different positions usually have conventional form filling requirements, that is, the data of which fields (attribute values) are filled in each column of data in the table will have different requirements due to different positions. Therefore, the corresponding fields in the database are determined in combination with the user's position, which further ensures the accuracy of the filled data while ensuring the efficiency of data filling.
[0053] In some embodiments, the user's age, the character features corresponding to each cell, and the location information of each cell are input into a preset field prediction model for field prediction, and the fields corresponding to the data in each cell in the preset database are obtained. That is, for each cell in the table, the user's age corresponding to the table, the character features corresponding to the cell, and the location information corresponding to the cell are input into a preset field prediction model for field prediction. The character features corresponding to the cell include one or more of the character bolding, font type, character color, string length, and string type. Among them, the character bolding is used to characterize whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc. In this way, since users of different age groups usually have different habits of filling in forms, that is, the data of which fields (attribute values) are filled in each column of data in the table will have different habits due to different ages. Therefore, the corresponding fields in the database are determined in combination with the user's age, which further ensures the accuracy of the filled data while ensuring the efficiency of data filling.
[0054] In some embodiments, the user's gender, the character features corresponding to each cell, and the location information of each cell are input into a preset field prediction model for field prediction, and the fields corresponding to the data in each cell in the preset database are obtained. That is, for each cell in the table, the user's gender corresponding to the table, the character features corresponding to the cell, and the location information corresponding to the cell are input into the preset field prediction model for field prediction. The character features corresponding to the cell include one or more of the character bolding, font type, character color, string length, and string type. Among them, the character bolding is used to characterize whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc. In this way, since users of different genders usually have different habits of filling in forms, that is, the data of which fields (attribute values) are filled in each column of data in the table will have different habits due to different genders. Therefore, the corresponding fields in the database are determined in combination with the user's gender, which further ensures the accuracy of the filled data while ensuring the efficiency of data filling.
[0055] In some embodiments, the user's work experience, the character features corresponding to each cell, and the location information of each cell are input into a preset field prediction model for field prediction, and the corresponding field of the data in each cell in the preset database is obtained. That is, for each cell in the table, the user's work experience corresponding to the table, the character features corresponding to the cell, and the location information corresponding to the cell are input into the preset field prediction model for field prediction. The character features corresponding to the cell include one or more of the character bolding, font type, character color, string length, and string type. Among them, the character bolding is used to characterize whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc. In this way, since users with different work experiences usually have different form filling habits, that is, the data of which fields (attribute values) are filled in each column of data in the table will be different due to different work experiences, and different work experiences will often continue the form filling habits to new jobs. The corresponding fields in the database are determined in combination with the user's work experience, while ensuring the efficiency of data filling, the accuracy of the filled data is further guaranteed. Among them, the work experience includes: time information and the position information corresponding to the time information, or, time information and the unit type corresponding to the time information.
[0056] In some embodiments, the table browsing record of the user, the character features corresponding to each cell and the position information of each cell are input into a preset field prediction model for field prediction, and the field corresponding to the data in each cell in the preset database is obtained. That is, for each cell in the table, the table browsing record of the user corresponding to the table, the character features corresponding to the cell and the position information corresponding to the cell are input into the preset field prediction model for field prediction. The character features corresponding to the cell include one or more of the character bolding, font type, character color, string length and string type. Among them, the character bolding is used to characterize whether the character is bold, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc. In this way, since users with different table browsing records are likely to be affected by different form filling habits, in other words, the same table browsing record will also affect the user to process the table data with the same form filling habit, that is, the data of which fields (attribute values) are filled in each column of the table will be different due to different table browsing records. The corresponding fields in the database are determined in combination with the user's table browsing record, while ensuring the efficiency of data filling, the accuracy of the filled data is further guaranteed. Among them, the work experience includes: time information and the table name corresponding to the time information.
[0057] In some embodiments, in some embodiments, the user's position, age, gender, work experience and table browsing records, the character features corresponding to each cell and the location information of each cell are input into a preset field prediction model for field prediction, and the corresponding field of the data in each cell in the preset database is obtained. That is, for each cell in the table, the user's position, age, gender, work experience and table browsing records corresponding to the table, the character features corresponding to the cell and the location information corresponding to the cell are input into a preset field prediction model for field prediction. The character features corresponding to the cell include one or more of the character bolding, font type, character color, string length and string type. Among them, the character bolding is used to indicate whether the character is bolded, and the string type includes a numeric string, an English string, a Chinese string, a date string, etc.
[0058] The above-mentioned embodiment reflects the user portrait through one or more of the user's position, age, gender, work experience and table browsing history, and determines the correspondence between the data in the table and the fields in the database according to the different characteristics of the user, so as to efficiently and accurately fill the data in the table into the database.
[0059] Optionally, the field prediction model is obtained by:
[0060] Acquire second sample data with field labels, the second sample data including user information samples, character feature samples and cell position samples;
[0061] The first sample data with the data type label is input into a preset second neural network model for training to obtain a data type prediction model.
[0062] Optionally, the user information sample includes one or more of the user's position, age, gender, work experience, and form browsing history.
[0063] Combination Figure 2 As shown, an embodiment of the present disclosure provides a device for filling data, including: a first acquisition module 201, configured to obtain a table uploaded by a user, wherein the table includes a plurality of cells; a second acquisition module 202, configured to obtain character features of the data in each cell; a determination module 203, configured to determine the fields corresponding to the data in each cell in a preset database according to the character features; and a filling module 204, configured to fill the data in each cell into the database according to the fields corresponding to the data in each cell.
[0064] By using the device for filling in data provided by the embodiment of the present disclosure, the corresponding fields of the data in each cell in the table are determined according to the character features of the data in each cell, and then the data in each cell is filled into the database according to the corresponding field. There is no need to manually determine the correspondence between the data and the field, and the database can be automatically filled with table data, which greatly improves the efficiency of storing the data in the table into the database.
[0065] Combination Figure 3 As shown, an embodiment of the present disclosure provides an electronic device, including a processor (processor) 300 and a memory (memory) 301. Optionally, the electronic device may also include a communication interface (Communication Interface) 302 and a bus 303. Among them, the processor 300, the communication interface 302, and the memory 301 can communicate with each other through the bus 903. The communication interface 302 can be used for information transmission. The processor 300 can call the logic instructions in the memory 301 to execute the method for filling data in the above embodiment.
[0066] In addition, the logic instructions in the memory 301 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0067] The memory 301 is a computer-readable storage medium that can be used to store software programs, computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 300 executes functional applications and data processing by running the program instructions / modules stored in the memory 301, that is, implementing the method for filling data in the above-mentioned embodiments.
[0068] The memory 301 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 301 may include a high-speed random access memory and may also include a non-volatile memory.
[0069] Optionally, the electronic devices include: personal computers, servers, mobile phones, tablet computers, etc.
[0070] By using the electronic device provided by the embodiment of the present disclosure, the corresponding fields of the data in each cell in the table are determined according to the character features of the data in each cell, and then the data in each cell are filled into the database according to the corresponding fields. There is no need to manually determine the correspondence between the data and the fields, and the database can be automatically filled with the table data, which greatly improves the efficiency of storing the data in the table into the database.
[0071] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above method for filling data.
[0072] An embodiment of the present disclosure provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above method for filling data.
[0073] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0074] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0075] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0076] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0077] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0078] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for filling data, characterized in that include: Obtain a table uploaded by a user, wherein the table includes a number of cells; Get the character features of the data in each cell; Determine the corresponding field of the data in each cell in a preset database according to each of the character features; Filling the data in each cell into the database according to the fields corresponding to the data in each cell; Determining the fields corresponding to the data in each cell in a preset database according to the character features, including: obtaining the user information of the user and obtaining the location information of each cell, wherein the user information includes the user's position, age, gender, work experience and table browsing records, and the cell location information is the row and column information of the cell in the table; inputting the user's position, age, gender, work experience and table browsing records, the character features corresponding to each cell and the location information of each cell into a preset field prediction model for field prediction, and obtaining the fields corresponding to the data in each cell in the preset database.
2. The method according to claim 1, characterized in that Determining the corresponding fields of the data in each cell in a preset database according to each of the character features, including: Determine whether the data in cells of different columns are of the same data type according to the character features; When the data in the cells of each column are of the same data type, any cell in each column is determined as a candidate cell; Determine the fields corresponding to the data in each candidate cell in a preset database according to the character features of the data in each candidate cell; The fields corresponding to the data in each candidate cell in a preset database are determined as the fields corresponding to the data in each column of cells in a column of cells corresponding to each candidate cell.
3. The method according to claim 2, characterized in that Determining whether data in cells of different columns are of the same data type according to the character features includes: For each column of cells, get the string length of the data in each cell; For each column of cells, the character features in each cell and the corresponding string length in each cell are input into a preset data type prediction model to perform data type prediction, and a prediction result corresponding to each column of cells is obtained. The prediction result is used to characterize whether the data in each cell in each column of cells is of the same data type.
4. The method according to claim 3, characterized in that: The data type prediction model is obtained in the following way: Acquire first sample data with a data type label, wherein the first sample data includes a character feature sample and a string length sample; The first sample data with the data type label is input into a preset first neural network model for training to obtain a data type prediction model.
5. The method according to claim 1, characterized in that: The field prediction model is obtained in the following way: Acquire second sample data with field labels, wherein the second sample data includes a user information sample, a character feature sample, and a cell position sample; The first sample data with the data type label is input into a preset second neural network model for training to obtain a data type prediction model.
6. A device for filling data, characterized in that include: A first acquisition module is configured to acquire a table uploaded by a user, wherein the table includes a plurality of cells; A second acquisition module is configured to acquire character features of data in each cell; A determination module is configured to determine the corresponding field of the data in each cell in a preset database according to each of the character features; A filling module, configured to fill the data in each cell into the database according to the field corresponding to the data in each cell; Determining the fields corresponding to the data in each cell in a preset database according to the character features, including: obtaining the user information of the user and obtaining the location information of each cell, wherein the user information includes the user's position, age, gender, work experience and table browsing records, and the cell location information is the row and column information of the cell in the table; inputting the user's position, age, gender, work experience and table browsing records, the character features corresponding to each cell and the location information of each cell into a preset field prediction model for field prediction, and obtaining the fields corresponding to the data in each cell in the preset database.
7. An electronic device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for filling data according to any one of claims 1 to 5 when running the program instructions.
8. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the method for filling data according to any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
A table data import method based on BS architecture
CN109241167A