Method, apparatus, computing device, and medium for mapping processing
By generating mapping files and address files, the mapping processing of spreadsheet column names is automatically implemented, which solves the merging error problem caused by inconsistent column names in different tables and improves merging efficiency and user experience.
Patent Information
- Application Number
- CN202211029727.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-25
AI Technical Summary
When merging spreadsheets, errors occur during the merging process due to inconsistent column names used by different users. Existing technologies require manual modification of column names to achieve consistency, which is inefficient and provides a poor user experience.
By generating mapping files and address files, inconsistent column names in multiple tables are automatically mapped to consistent mapping column names, and mapping files and address files are used to achieve automatic mapping and merging of column names.
Improves the efficiency and speed of table merging, enhances the user experience, eliminates the need to manually modify column names, and achieves consistent mapping of column names.
Smart Images

Figure CN115329729B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer science and technology, and more particularly, to a method, apparatus, computing device, computer-readable storage medium, and computer program product for mapping processing. Background Art
[0002] With the popularization and development of computer science and technology, spreadsheets are widely used in data processing. Data integration is an important step in data processing. By merging different spreadsheets, data from different spreadsheets can be integrated, providing a foundation for subsequent data analysis and processing. Summary of the Invention
[0003] In view of this, embodiments of the present disclosure provide a method, an apparatus, a computing device, a computer-readable storage medium, and a computer program product for mapping processing.
[0004] According to a first aspect of the present disclosure, a method for processing data is provided. The method includes: based on received attribute settings, obtaining a set of column names from multiple tables, wherein the set of column names is stored in a cache file. The method also includes, in response to a mapping setting operation for the set of column names, generating a mapping file and an address file, wherein the mapping file includes a mapping relationship between the set of column names and mapped column names for the set of column names, and the set of address files stores the addresses of the mapped column names in the cache file. The method also includes, in response to a mapping application operation, outputting the mapped column names based on the mapping file, the address file, and the cache file.
[0005] According to a second aspect of the present disclosure, a computing device is provided, comprising at least one processing unit and at least one memory, wherein the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when executed by the at least one processing unit, the instructions cause the computing device to perform the method according to the first aspect of the present disclosure.
[0006] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, comprising machine-executable instructions. When the machine-executable instructions are executed by a device, the device executes the method according to the first aspect of the present disclosure.
[0007] According to a fourth aspect of the present disclosure, a computer program product is provided, comprising machine-executable instructions, which, when executed by a device, cause the device to perform the method according to the first aspect of the present disclosure.
[0008] This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.
[0010] Figure 1 A schematic diagram illustrating an example environment in which various embodiments of the present disclosure can be implemented;
[0011] Figure 2A A schematic flow chart illustrating a process for mapping processing according to an embodiment of the present disclosure is shown;
[0012] Figure 2B A schematic flow chart of performing mapping based on multiple files associated with the mapping according to an embodiment of the present disclosure is shown;
[0013] Figure 3 A schematic diagram showing an interface of an application program using a mapping process according to an embodiment of the present disclosure is shown;
[0014] FIG4 is a schematic diagram showing example tables to be merged;
[0015] Figure 5 A schematic diagram showing an interface of an application program that uses a mapping process according to an embodiment of the present disclosure during use;
[0016] Figure 6 A schematic diagram showing an interface of an application program using a mapping process according to an embodiment of the present disclosure after mapping is completed;
[0017] Figure 7 A schematic diagram showing a mapping operation interface of an application program using a mapping process according to an embodiment of the present disclosure is shown;
[0018] Figure 8 A schematic diagram showing a mapping operation interface of an application program using a mapping process according to an embodiment of the present disclosure during use is shown;
[0019] Figure 9 A schematic flowchart for determining table headers of tables to be merged according to an embodiment of the present disclosure is shown;
[0020] Figure 10 An example table with multiple layers of headers to be merged is shown;
[0021] Figure 11 The following illustrates a schematic process of obtaining column names in a multi-layer header according to an embodiment of the present disclosure; and
[0022] Figure 12 A schematic block diagram of an example device that may be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0024] As used herein, the term "including" and its variations represent open inclusion, i.e., "including but not limited to." Unless otherwise stated, the term "or" means "and / or." The term "based on" means "based at least in part on." The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment." The terms "first," "second," etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0025] It should be noted that the numbers or numerical values used in this document are for facilitating the understanding of the technology of the present disclosure, and are not intended to limit the scope of the present disclosure.
[0026] With the popularization and development of computer science and technology, spreadsheets are increasingly used in data processing. Data integration is a crucial step in data processing. By merging different spreadsheets, data from different spreadsheets can be integrated, providing a foundation for subsequent data analysis and processing.
[0027] Usually, the amount of data to be processed is very large, and accordingly, the number of tables to be merged is relatively large, and the tables processed by different users may have inconsistent column names. For example, Table 1 processed by User A has a column name "Image Size", while Table 2 processed by User B uses a column name "Image Dimensions". Although the data in the columns corresponding to the column names "Image Size" and "Image Dimensions" are consistent, due to the inconsistent column names, in the process of merging Table 1 and Table 2, the user needs to manually modify the column names in each table to be consistent (for example, unify them to "Image Size" or "Image Dimensions"), otherwise problems such as merging errors will occur.
[0028] In view of this, embodiments of the present disclosure provide a technique for mapping processing. Compared to existing techniques, the method according to embodiments of the present disclosure can automatically map inconsistent column names across multiple tables containing data. The method according to embodiments of the present disclosure includes: obtaining a set of column names from multiple tables based on received property settings, wherein the set of column names is stored in a cache file. The method also includes, in response to a mapping setting operation for the set of column names, generating a mapping file and an address file, wherein the mapping file stores a mapping relationship between the set of column names and mapped column names for the set of column names, and the address file stores the addresses of the mapped column names in the cache file. The method also includes, in response to a mapping application operation, outputting the mapped column names based on the mapping file, the address file, and the cache file. In this manner, the technique according to embodiments of the present disclosure can conveniently map inconsistent column names across multiple different tables to consistent mapped column names, eliminating the need for users to manually modify and unify column names before merging tables. This significantly improves the efficiency and speed of table merging and significantly enhances the user experience.
[0029] Figure 1 A schematic diagram of an example environment 100 in which various embodiments of the present disclosure can be implemented is shown. Environment 100 includes a computing device 110. Computing device 110 may include any device with computing capabilities, such as a personal computer, a tablet computer, a wearable device, a smart home device, a cloud server, a mainframe, and a distributed computing system. Computing device 110 may include a single device or a cluster of multiple devices.
[0030] According to an embodiment of the present disclosure, computing device 110 can be used for mapping processing. For example, computing device 110 can be used to merge multiple tables 121, perform mapping processing on inconsistent column names in the multiple tables during the merging process, and output the merged table 122. The table can include electronic tables in various formats, such as Excel tables, CSV tables, etc., and the present disclosure does not limit the format of the electronic table.
[0031] In one embodiment, during the process of merging tables, the computing device 110 may obtain a first table and a second table to be merged; determine a first table header of the first table and a second table header of the second table based on attribute settings; obtain a group of column names in the first table header and the second table header, wherein the group of column names includes a first column name in the first table and a second column name in the second table; map the group of column names to mapped column names; merge the first table and the second table based on the mapped column names; and output the merged table.
[0032] It should be understood that Figure 1The illustrated environment 100 is merely an example of an embodiment of the present disclosure that may be implemented therein and is not intended to limit the scope of the present disclosure. The embodiments of the present disclosure are also applicable to other systems or architectures.
[0033] The following combination Figure 2A A flowchart of a method 200 for mapping processing according to an embodiment of the present disclosure is described. The method 200 may be Figure 1 10 and any other suitable computing device. In one embodiment, the method 200 for mapping processing according to an embodiment of the present disclosure can be applied to a scenario where multiple tables containing data are merged. The method 200 will be described below in conjunction with the scenario of merging tables. It should be understood that the method 200 for mapping processing according to an embodiment of the present disclosure can also be applied to any other scenario where data is mapped consistently, and the present disclosure is not limited thereto.
[0034] At block 202 , the computing device 110 obtains a set of column names from a plurality of tables based on the received property settings, wherein the set of column names is stored in a cache file.
[0035] In one embodiment, the computing device 110 may obtain multiple tables to be merged, for example, a first table T1 and a second table T2, for processing the data in the tables. In one embodiment, the table may include a header area and a data area, wherein the data area includes multiple cells for storing data; and the header area includes multiple cells, and the fields in the cells represent the column names of the corresponding columns. It is understandable that a form (sheet) in a file (such as Excel) may include one table or multiple tables. The corresponding table can be determined by the header area of each table, and the multiple tables can be distinguished by the header area. The computing device 110 can receive property settings and, based on the received property settings, obtain a set of column names S from multiple tables (for example, tables T1 and T2). name .
[0036] In one embodiment, the property setting includes setting a table header for one of the multiple tables (e.g., setting a starting row number and setting an ending row number) and specifying a common column name among the column names in the multiple tables. The computing device 110 may determine the table header of each table based on the property setting, and obtain a set of column names S from the determined table header. name .
[0037] In one embodiment, the set of columns is named S name The first column name C in the first table T1 may be included name1 and the second column name C in the second table T2 name2 , and the first column is named Cname1 and the second column name C name2 The data in the corresponding columns have the same reference, but the first column is named C name1 and the second column name C name2 Not the same.
[0038] It should be understood that although tables T1 and T2 are used as examples above, those skilled in the art should understand that the present disclosure does not limit the number of tables to be merged. Accordingly, each column name in a column name group can come from the corresponding column in the corresponding table.
[0039] At box 204, the computing device 110 generates a mapping file and an address file in response to the mapping setting operation for the group of column names, wherein the mapping file stores the mapping relationship between the group of column names and the mapped column names for the group of column names, and the address file stores the address of the mapped column name in the cache file.
[0040] In one embodiment, the computing device 110 may receive a mapping setup operation (eg, a user triggering a mapping operation control), the mapping setup operation being used to initiate a mapping operation to uniformly map inconsistent column names in a set of column names to a mapped column name C. name The computing device 110 may generate a mapping file File in response to the mapping setting operation for the set of column names. map and address file addr , where the mapping file File map Stores the mapping relationship between the set of column names and the mapping column names used for the set of column names, and the address file File addr The address of the mapped column name in the cache file is stored. In one embodiment, the mapping relationship includes the mapped column name. In addition, the mapping relationship also includes the association relationship between the mapped column name and the group of column names. For example, according to the mapping setting operation, in the mapping file File map A mapping relationship R1 is stored in the , which indicates that a set of column names S name The first column name in C name1 and the second column name C name2 Both are mapped to column name C name , so that consistent mapping of the group of column names can be achieved.
[0041] At block 206 , the computing device 110 outputs a mapping column name based on the mapping file, the address file, and the cache file in response to the mapping apply operation.
[0042] In one embodiment, the computing device 110 may receive a mapping application operation, which indicates a user's confirmation of the mapping operation. The user may provide the mapping application operation through an interactive component such as a control in the application program interface. In response to the mapping application operation, the computing device 110 may output a mapping column name based on the mapping file, the address file, and the cache file. In one embodiment, the computing device 110 may display the mapping column name in the application program interface, as described below in conjunction with Figure 2B Described in detail.
[0043] Figure 2B A schematic diagram of mapping based on multiple files associated with mapping according to an embodiment of the present disclosure is shown. The computing device 110 receives the header data of the table to be merged at block 210 and generates a cache file based on the received data (as shown in block 212). The cache file is used to store the column name information of the table to be merged. In one embodiment, as described above, the column name group S name The first column name in C name1 and the second column name C name2 are stored in the cache file and have respective addresses addr1 and addr2 in the cache file. In one embodiment, in response to the mapping setup operation, the computing device 110 determines the first column name C name1 and the second column name C name2 The name of the mapped column, for example, the first column name is C name1 The computing device 110 generates a mapping file (as shown in block 213) and an address file (as shown in block 214), and the computing device 110 generates the mapping file File map Store the first column name C name1 and the second column name C name2 with the mapped column name C mapped to name (In this embodiment, the first column is named C name1 ) and store the mapping column name C in the address file name Address information in the cache file, for example, the first address information addr1. In one embodiment, the mapping relationship includes the mapped column name. In addition, the mapping relationship also includes an association relationship between the mapped column name and the group of column names. It should be understood that although the column name group is described above using two column names as an example, the column name group according to the embodiment of the present disclosure does not limit the number of column names in the group.
[0044] In one embodiment, the mapping file and the address file can be stored in association. Specifically, the mapping file and the address file have the same format, and respectively store the mapping column name in the mapping relationship and the address of the mapping column name in the cache file. For example, the mapping file may include a mapping table, the address file may include an address table, and the mapping table and the address table have the same format. The mapping table stores the mapping column name at the first position in the mapping table, and the address table stores the address of the mapping column name in the cache file at the second position in the address table corresponding to the first position. In addition, it can be understood that the mapping file and the address file can also have other formats besides the table, and the present disclosure does not limit this.
[0045] When a mapping application operation is received (eg, mapping is performed through an application program interface at block 220 ), the computing device 110 determines the storage mapping column name C according to the mapping relationship in the mapping file. name , and according to the mapping column name stored in the address file C name The address information (eg, first address information addr1) of the column name is retrieved from the cache file, and the mapped column name is output (as shown in block 230), thereby prompting the user that the group of column names is uniformly mapped to the mapped column name.
[0046] In addition, in one embodiment, the computing device 110 may also generate an original information file based on the header data of the tables to be merged, for storing the original information of each table to be merged, including the original header information of each table. The computing device 110 may display the original table information of the table associated with the selected column name in response to the user's selection of the viewing operation. Figure 8 Describes in more detail the operation of viewing original table information.
[0047] It is understandable that the table merging process using mapping described in the present disclosure can be implemented as an application program and provided to users for easy use in the process of processing data. The data processing method according to the embodiment of the present disclosure will be described below in conjunction with an exemplary application program interface.
[0048] Figure 3 The exemplary interface of an application program using the mapping process according to an embodiment of the present disclosure is shown. The application program interface can be used to merge tables to achieve data processing, and the mapping process method according to an embodiment of the present disclosure is used in the process of merging tables. It can be understood that Figure 3 The interfaces in are only exemplary.
[0049] Figure 3FIG3 is an interface 300 of an application program that uses the mapping process according to an embodiment of the present disclosure. The application program can be installed in the computing device 110 to implement a merging operation on multiple tables to implement data processing. Figure 3 As shown, Figure 3 The interface 300 may include multiple display areas: an identifier display area 310 for displaying the identifier of the table to be merged, wherein the identifier display area 310 includes a file identifier display sub-area 312 and a form identifier display sub-area 314, respectively for displaying the identifier of the file containing the table to be merged and the identifier of the form in the selected file; a table display area 330, in response to selecting a table identifier in the identifier display area 310, for displaying the table associated with the selected table identifier; a column name display area 340, including a common column name display sub-area 342 and a non-common column name display sub-area 344, wherein the common column name display sub-area 342 is used to display the common column names in the tables to be merged, and the non-common column name display sub-area 344 is used to display the non-common column names (e.g., the column name group described above) in the tables to be merged; and a setting area 320 for receiving property settings provided by the user, such as the user's settings for the table header of one of the tables to be merged and the settings for the common fields. The detailed operation process of the application will be described below using a specific example.
[0050] Figures 4A-4B Two exemplary tables T1 and T2 are shown. These two tables record image information, including "image name (image name)", "image size (size)", "resolution", "DPI (dots per inch (DPI))", and "image set to which the image belongs" represented by column names respectively. Moreover, each table includes multiple rows and can record the above-mentioned information of multiple images. In addition, from Figure 4A and Figure 4B As can be seen from the row numbers in the table, table T1 and table T2 are located in two different sheets respectively. It is understandable that the present disclosure does not limit the location of the table. Multiple tables can be located in different sheets or in the same sheet. In addition, different tables can be distinguished by the table header area. Figure 4A Table T1 in and Figure 4B Take table T2 in the example, and combine Figure 3 The application program interface 300 in the embodiment of the present disclosure is used to describe the mapping processing method according to the embodiment of the present disclosure. It can be understood that although Figures 4A-4B Only two tables are illustrated, but any number of tables can be operated according to the embodiments of the present disclosure; and although image information is presented in tables T1 and T2, it can be understood that tables recording any data can be processed according to the embodiments of the present disclosure.
[0051] The following will be combined Figure 5 The operation process of merging table T1 and table T2 to implement data processing by adopting the mapping process according to the embodiment of the present disclosure is schematically described. Figure 5 The application to which the application interface 500 shown in FIG. 5 belongs is installed in the computing device 110 . Accordingly, the computing device 110 may perform a merge operation on the tables T1 and T2 .
[0052] like Figure 5 As shown in , computing device 110 obtains tables T1 and T2 to be merged. In one embodiment, a user can upload tables T1 and T2 to be merged to computing device 110 by triggering the "Import Data" control 322. Assume that table T1 is located in sheet 1 of file 1, and table T2 is located in sheet 1 of file 2. After the upload is complete, file identification display sub-area 312 in identification display area 310 displays the received file names (e.g., "File 1.xlsx" and "File 2.xlsx"), and in response to the user selecting a file in file identification display sub-area 312, form identification display sub-area 314 displays the form name in the selected file. In response to the user selecting a form identification (e.g., form name) associated with a table in form display sub-area 314, computing device 110 displays information about the table associated with the selected form identification (e.g., selected form name) in form display area 330. For example, after receiving the user's selection of form Sheet1 in file 1, the computing device 110 displays the information of table T1 stored in form sheet1 in file 1 in the table display area 330, and the relevant information of the table displayed in the table display area 330 can be displayed on the right side of the table display area, as shown in controls 332 and 334, which respectively display the file name (for example, "file 1") and form name (for example, "sheet1") of the table currently displayed in the table display area 330. The user can also select other forms in other files by operating the above controls 332 and 334 (for example, drop-down selection), and the computing device 110 updates the table displayed in the table display area 330 accordingly.
[0053] Figure 5The application interface 500 is also provided with a setting area 320, which includes a header setting sub-area for setting the header of the table, and the sub-area includes a start row setting control, an end row setting control, and a common field setting control 324. In one embodiment, the start row control and the end row control are used to set the start row and the end row of the table T1 currently displayed in the table display area 330, and the common field setting control 324 is used to set the common fields between the column names in the tables to be merged. In one embodiment, the common fields include the common column names between the column names in the tables to be merged. For example, Figure 5 As shown in , the table T1 displayed in the table display area 330 has a row of headers, and the row number of the header area is 1. Accordingly, the user can set the start row and the end row of the table T1 to "1" in the start row control and the end row control. In one embodiment, in response to the setting of the start row and the end row, the computing device 110 can highlight the set header area in the table display area 330, as shown by the header in the gray area. And, as Figure 4A and Figure 4B As shown in FIG, tables T1 and T2 share common column names "resolution" and "image set". Accordingly, to accurately merge the tables, the user can enter one of the common column names, such as "resolution", in the common field control 324. After determining the common field, the computing device 110 can highlight the column name corresponding to the set common field in the interface 500, for example, by adding a display mark to highlight the column name, to prompt the user that the common column name is set as a common field.
[0054] In response to receiving the user's attribute setting for the table header, the computing device can determine the first table header 420 of table T1 and the second table header 440 of table T2. The application interface also includes a column name acquisition control (e.g., "extract column name" control 326) for receiving a column name acquisition operation from the user. The computing device 110 receives the user's trigger operation on the control 326, and acquires a set of column names in the first table header 420 and the second table 440, wherein the set of column names includes the first column name from table T1 and the second column name from table T2. For example, Figure 5 For example, in response to receiving a user trigger on the "Extract Column Name" control 326, the computing device 110 obtains a group of column names, which may include the column name "Image Name" in table T1 and the column name "Image Name" in table T2. In addition, the computing device may also obtain other groups of column names, and the column names in the column name groups correspond to the columns of data with the same reference in tables T1 and T2. In other words, the computing device 110 groups the obtained column names by column.
[0055] As described above, column name display area 340 includes a shared column name display sub-area 342 and a non-shared column name display sub-area 344. The shared field "Resolution" and the other shared column name "Image Belongs to Image Set" between tables T1 and T2 are displayed in shared column name display sub-area 342. Non-shared column names between the tables are displayed in non-shared column name display sub-area 344. Non-shared column names can refer to inconsistent column names corresponding to columns with the same designation. For example, area 344 displays the column name "Image Name" in table T1 and the column name "Image Name" in table T2, and the column names "Image Name" in table T1 and "Image Name" in table T2 are inconsistent.
[0056] In one embodiment, in order to make the column names in each column name group in the table to be merged consistent, the user can start a mapping operation. For example, Figure 5 A mapping operation start control (e.g., a "unified column name" 346 control) is provided in the application interface 500. The user can trigger the control to map the inconsistent column names in each column name group to consistent mapped column names. In one embodiment, the computing device 110 can map the inconsistent column names in each column name group to their respective mapped column names based on the user's initiation mapping operation (e.g., the user triggers the "unified column name" 346 control). For example, the column name group "size" and "image size" can be mapped to "image size"; the column name group "DPI" and "dots per inch (DPI)" can be mapped to "DPI"; and the column name group "image name" and "image name" can be mapped to "image name". In addition, the unified groups of column names, i.e., mapped column names, can be displayed in the common column name display sub-area 342, and since there are no inconsistent column names in table T1 and table T2, accordingly, after the mapping is completed, no column name is displayed in the non-common column name display sub-area 344. As Figure 6 As shown. For the implementation process of mapping, please refer to Figure 2A The data processing process 200 in FIG. 2 is understood, and for the sake of brevity, it is not repeated here.
[0057] Figure 6 FIG shows an application interface 600 after the mapping is completed. Figure 5 In the interface, Figure 6The interface 600 in the figure shows the interface after the mapping operation is completed. The shared column name display sub-area 342 displays the mapped column names of each column name group in the table to be merged after mapping, and the non-shared column name display sub-area 344 does not display any column name information. The computing device 110 receives a merge operation instruction from the user (for example, the user triggers the "Start Merging" control 328). The computing device 110 merges tables T1 and T2 based on the mapped column names, and the computing device 110 can output the merged table. For example, the computing device 110 can save the merged table in a predetermined storage location in the computing device 110. Moreover, the computing device 110 can also display the merged table in response to the user's operation of viewing the merged table. In addition, the computing device can also prompt the user with the progress of merging the tables through the progress indicator component 360 set in the interface 600.
[0058] In one embodiment, when merging tables T1 and T2, the computing device 110 may obtain the first column corresponding to the first column name (image name) in table T1 based on the mapped column name (eg, image name), such as Figure 4A The computing device 110 can also obtain the second column corresponding to the second column name (image name) of the table T2 based on the mapping column name (eg, image name), as shown in FIG. Figure 4B Column 430 is shown. The computing device 110 can merge columns 410 and 430 to obtain a merged column, and the column name corresponding to the merged column is the mapping column name (for example, "image name". For other columns, the computing device 110 can perform similar operations to obtain a merged column, and accordingly, the computing device 110 can obtain a merged table.
[0059] Combination of the above Figure 3-Figure 6 The operation process of merging tables is described. The mapping processing method according to the embodiment of the present disclosure can be used to implement the mapping of column names in the process of merging tables. Figure 7 The mapping operation and specific implementation methods are described in detail. It should be understood that Figure 7 The interface in is also exemplary and the present disclosure is not limited to this.
[0060] In one embodiment, the computing device 110 displays the following information in response to receiving a mapping initiation operation (eg, a user triggering operation on a mapping initiation control (such as the "unify column names" control 346)). Figure 7 In one embodiment, the interface 700 may be in the form of a pop-up window and may be displayed in a superimposed manner on the Figure 6 In another embodiment, the interface 700 may be an interface jumped from the interface 600, and the present disclosure does not limit the specific display form of the interface 700.
[0061] like Figure 7 As shown in Figure 7 The application interface 700 in FIG. 7 may include a column name management area 710 and a mapping area 720. In one embodiment, the column name management area 710 displays the various column name groups in the table to be merged, and each group of column names is arranged and displayed in a column manner. For example, Figure 4A-4B Taking tables T1 and T2 in FIG as an example, column 0 in the column name management area 710 displays the column name group "image name" and "image name"; column 1 displays the column name group "image size" and "size", and so on.
[0062] The computing device 110 may receive a mapping operation performed by a user on a group of column names to be mapped in the column name management area 710. Specifically, the computing device 110 receives a selection operation by the user on at least one of the first column name and the second column name in the column name management area, determines a mapped column name for the selected column name, and displays the selected column name and the determined mapped column name in the mapping area, wherein the selected column name and the mapped column name are displayed in the same column.
[0063] Can be combined Figure 8 To understand the display and operation in the mapping area. The computing device 110 can display the column name group and the corresponding mapping column name in the same column based on the determined mapping column name. For example Figure 8 As shown in , in the mapping area 720, the mapping column name "Image Name" and the column name group "Image Name" are displayed in the same column, and the mapping name for the column name group is located in the table header, so that the user can be prompted that the group of column names is mapped to the mapping column name.
[0064] The computing device 110 can determine the mapped column name for a group of column names in a variety of ways. In one embodiment, for a certain group of column names, when the header area in the mapping area 720 has displayed the mapped column name for one or more column names in the group of column names (for example, one column name in the group of column names has been selected as the mapped column name and displayed in the mapping area 720), when the user selects other column names in the group of column names for mapping in the column name management area 710, the computing device 110 can provide an option including the mapped column name in the column name setting control, and based on the received user selection for the mapped column name, map the other column names selected by the user in the column name management area 710 to the mapped column name. In addition, in one embodiment, when the user selects multiple column names in a certain group of column names in the column name management area 710, the computing device 110 can set the column name of the column name group that is first displayed in the column name management area 710 as the mapped column name. For example, Figure 7As shown, when the user selects "Image Size" and "Size" in column name management area 710, the computing device may determine the first displayed column name, "Image Size," as the mapped column name for the group. Furthermore, the mapped column name may be determined in other ways, as long as a group of column names can be mapped into a unified mapped column name. This disclosure does not limit the method for determining the mapped column name.
[0065] In one embodiment, Figure 7 The column names displayed in column name management area 710 are multiple column name groups obtained from multiple tables based on the received property settings. Each column name group is displayed by column in column name management area 710. Accordingly, the column names displayed in column name management area 710 can be stored in the cache file described in method 200, that is, the cache file includes each column name group in table T1 and table T2. In addition, the mapped column names in mapping area 720 can be stored in the mapping file. In other words, computing device 110 stores the column names in the corresponding files according to the area where the column names are displayed.
[0066] As described at block 204 of method 200, in response to a mapping setup operation for a set of column names, computing device 110 generates a mapping file and an address file, and the mapping file stores a mapping relationship between the set of column names and the mapped column names of the set of column names. The mapping relationship may include the mapped column names to which the set of column names are mapped. In one embodiment, the mapping setup operation may include the above combined Figure 7 and Figure 8 The mapping-related operations described in . The mapping file generated by the computing device 110 includes a mapping relationship between a group of column names and the mapped column names of the group of column names. In addition, the address file includes address information of the mapped column names in the cache file.
[0067] In one embodiment, the mapping file and the address file are stored in association. Specifically, the mapping file and the address file have the same format, and respectively store the mapping column name in the mapping relationship and the address of the mapping column name in the cache file. For example, the mapping file may include a mapping table, the address file may include an address table, and the mapping table and the address table have the same format. The mapping table stores the mapping column name at the first position in the mapping table, and the address table stores the address of the mapping column name in the cache file at the second position in the address table corresponding to the first position. In addition, it can be understood that the mapping file and the address file may also have other formats besides the table, and the present disclosure does not limit this.
[0068] In one embodiment, the computing device 110 may output the mapped column names based on the cache file, the address file, and the mapping file in response to the mapping application operation. Specifically, the computing device 110 outputs the mapped column names corresponding to each group of column names to the cache file, the address file, and the mapping file in response to the mapping application operation from the user (e.g., the user triggers the "Apply" control 760). Figure 6 The common column names shown in the display sub-area 342 are as shown in Figure 6 shown.
[0069] As above combined Figure 2A As described in the process 200, the first column name C in a set of column names name1 and the second column name C name2 are stored in the cache file, and the first column is named C name1 and the second column name C name2 The address information in the cache file is addr1 and addr2. In one embodiment, in response to a mapping setting operation from a user, the computing device 110 generates a mapping file File map , and in the generated mapping file File map Store the first column name C name1 and the second column name C name2 with the mapped column name C mapped to name The computing device 110 stores the address information of the corresponding mapping column name in the cache file in the address file. For example, the computing device 110 determines that the first column name C name1 and the second column name C name2 The mapped column name is the first column name C name1 Correspondingly, the first column name and the second column name are stored in the mapping file together with the mapping column name (in this embodiment, the first column name C name1 ), the mapping relationship between the address file stores the mapping column name (in this embodiment, the first column name C name1 ) in the cache file. The mapping relationship may include the corresponding mapping column name. When receiving a mapping application operation (e.g., a user triggers the "Apply" control 760), when outputting the mapping column name, the computing device 110 determines the mapping column name C according to the mapping relationship stored in the mapping file. name , and according to the address of the mapping column name in the cache file stored in the address file, the mapping column name can be retrieved from the cache file and output.
[0070] In addition, in one embodiment, the computing device 110 may also generate an original information file for storing the original header information in each table to be merged. The computing device may display the table associated with the column name selected in the column name management area 710 in response to the user's selection of a viewing operation. For example, when the user selects the column name "Image Name" in the column name management area 710, in response to the user's operation on the viewing control (such as the "Original Form" control), the computing device 110 displays the original table information of the table where the column name is located, and the column name set as a "common field" is highlighted or marked with a logo to prompt the user that the column name is set as a "common field".
[0071] As described above, the technology according to the embodiments of the present disclosure can conveniently map inconsistent column names between multiple different tables into consistent mapped column names, without the need for users to manually modify and unify column names before merging tables, significantly improving the efficiency and speed of table merging, and also significantly improving the user's operating experience.
[0072] In an embodiment according to the present disclosure, obtaining the first column name and the second column name in the table to be merged can be achieved in the following manner: the computing device 110 determines the first header of the first table T1 and the second header of the second table T2 based on the attribute settings, and obtains the corresponding groups of column names from the first header and the second header.
[0073] by Figure 4A and Figure 4B For example, the computing device may determine the first header 420 of the first table T1 and the second header 440 of the second table T2 based on the attribute settings. The header may include the column names in the table. For example, the first header 420 may include the column names "image name", "image size", "resolution", "DPI" and "image set to which the image belongs". The second header 440 may include the column names "image name", "size", "resolution", "dots per inch (DPI)" and "image set to which the image belongs". The computing device 110 may obtain each column name from the header, and group the obtained column names according to the reference to the data in each column corresponding to each column name, thereby obtaining each column name group, that is, the computing device 110 groups the column names by column.
[0074] like Figure 5 As shown, the property settings may include information for the table header, including the starting row number, the ending row number, and the common fields (e.g., common column names) in the tables to be merged for the table displayed in the table display area 330. Figure 9 The method 900 in FIG. 1 describes the implementation process of determining the header of each table.
[0075] like Figure 9As shown, in block 902, the computing device 110 may determine the first table header based on the first starting row number and the first ending row number in the property setting. Figure 5 For example, for the table in the table display area 330, the first starting row number and the first ending row number are both 1. This is because the table is only a layer of header, and the row number where the header is located is 1. Therefore, the area in the first row is the header area, and the header area includes multiple column names, and the common field "resolution" is located in the header.
[0076] In block 904, computing device 110 determines a second starting row number and a second ending row number for the second table based on the first common field and the first starting row number and the first ending row number. The process of determining the second starting row number and the second ending row number in the second table will be described in detail below.
[0077] In block 906 , the computing device 110 may determine a second header of the second table based on the second starting row number and the second ending row number. For example, the header area is the area defined by the second starting row number and the second ending row number.
[0078] In one embodiment, the computing device 110 may traverse the first table T1 and the second table T2 when determining the second starting row number. The computing device 110 may generate a first index set based on the traversal and attribute setting information, and the first index set includes the first segment row number of the first common field in the first table and the second field row number of the first common field in the second table T2. The computing device 110 may generate a starting row index set and an ending row index set based on the first index set, wherein the starting row index set includes the first starting row number for the first table T1 and the second starting row number for the second table T2, and the ending row index set includes the first ending row number for the first table T1 and the second ending row number for the second table T2.
[0079] When determining the starting row index set, the computing device 110 may determine the first row spacing d1 based on the first field row number and the first starting row number in the property setting information, and generate the starting row index set based on the first row spacing d1 and the first index set. For example, the computing device 110 may subtract the first row spacing d1 from each element in the first index set to obtain the starting row index set. In addition, when determining the ending row index set, the computing device 110 may determine the second row spacing d2 based on the first field row number and the first ending row number in the property setting information, and generate the ending row index set based on the second row spacing d2 and the first index set. For example, the computing device 110 may add the second row spacing d2 to each element in the first index set to obtain the ending row index set.
[0080] For example, Figure 10 The table in is used as an example to illustrate. Figure 10 The table T10 and the table T20 are both provided with multi-layer headers. For example, the header in each table includes two rows. Assume that for table T10, the property settings have been set as follows: the first starting row number is 2, the first ending row number is 3, and the first common field is "resolution". The computing device 110 determines the second header of the second table T20 based on the property settings. Specifically, the computing device can traverse the first tables T10 and T20, and generate a first index set Index1{2,13} based on the traversal and property setting information. The index set table has the first field row number (for example, 2) of the common field "resolution" in table T10 and the second field row number (for example, 13) in table T20. The computing device 110 can determine that the first row spacing is 2-2=0 based on the first field row number and the first starting row number, so d1=0. The computing device 110 can generate a starting row index StartIndex={2-0,13-0}={2,13} based on the first row spacing and the first index set Index1. When determining the ending row index EndIndex, the computing device 110 can determine that the second row spacing is 3-2=1 based on the first field row number and the first ending row number, so d2=1. The computing device 110 can generate an ending row index set EndIndex={2+1,13+1}={3,14} based on the second row spacing and the first index set Index1. Thus, the computing device can determine that the header of table T10 is the header area determined by row 2 and row 3, and the header of table T20 is the header determined by row 13 and row 14. The computing device 110 can further obtain the column names in each table from the header of table T10 and the header of table T20.
[0081] Although the above describes the process of determining the table header in conjunction with two tables, it is understandable that the method according to the embodiment of the present disclosure can be applied to multiple tables. Figure 10 The figure shows a situation where multiple tables to be merged are in a single form. It is understood that the method according to the embodiments of the present disclosure can also be used when multiple tables are stored in multiple forms. The elements in the corresponding starting row index set and ending row index set can contain information about the form in which the table is located to determine the starting row and ending row. The process of generating the starting row index set and ending row index set is similar to the process described above and will not be repeated here for the sake of brevity.
[0082] For a single-layer header, the computing device 110 can obtain the column name by column. For a multi-layer header, the computing device 110 can pre-process the header, convert the multi-layer header into a single-layer header, and then obtain the column name from the converted single-layer header. Figure 11Describe the pre-processing process of the multi-layer header by the computing device 110. It can be understood that Figure 11 The processing sequence in the example is only illustrative, and those skilled in the art may use different processing sequences. Figure 11 The processing order in is used to process multi-layer headers.
[0083] like Figure 11 As shown, when the computing device 110 extracts the column names in the table, for the multi-layer header (eg Figure 11 The header 1 in the table has two layers of headers, and the two layers of headers occupy two rows. The header 1 includes merged cells C1, C2 and C7. The computing device 110 splits the merged cells in the header 1 (S1110). In one embodiment, the computing device 110 can split the merged cells according to the direction of the cells when they are merged. For example, for cell C1, the cell is merged in a first direction (for example, the Y-axis direction) when it is merged. Accordingly, when the computing device 110 splits the cell, it splits the cell C1 in the first direction (for example, the Y-axis direction). Similarly, when cell C34R1 is merged, it is merged in a second direction (for example, the X-axis direction). Accordingly, when the computing device 110 splits the cell, it can split the merged cell in the second direction (for example, the X-axis direction). As Figure 11 As shown, after being split, header 1 is converted into header 2. In header 2, the merged cell in header 1 is split into multiple cells, and the split cells correspond to their respective columns. For example, the merged cell C1 in header 1 is split into two cells C1R1 and C1R2.
[0084] Each row in the split table header has multiple cells corresponding to the columns of the table. For example, as shown in Table Header 2, the first row has cells corresponding to the columns, for example, cells C1R1, C2R1, C3R1, C4R1, C5R1, C6R1, and C7R1. It can be understood that in the process of splitting and merging cells, blank cells may appear. As shown in Table 2, cells C1R2, C2R2, C4R1, C6R1, and C7R2 are blank. The computing device 110 can fill the blank cells with fields in the adjacent cells of the multiple blank cells, so as to obtain a filled table header. In one embodiment, the computing device 110 can fill the blank cells with the adjacent cells in the direction of the split cells. For example, the computing device 110 can fill the blank cells split in the first direction with the fields in the adjacent cells of the blank cells in the first direction. As Figure 11As shown in S1120 in . For the blank cells C1R2, C2R2 and C7R2 that are split out in the first direction (for example, the Y-axis direction), the computing device 110 fills the blank cell with the fields in the cells adjacent to the blank cell in the first direction. For example, for the blank cell C1R2, the computing device fills the blank cell C1R2 with the field "image name" in the adjacent cell C1R1 in the first direction (the Y-axis direction). The computing device 110 fills the blank cells C2R2 and C7R2 in a similar manner to obtain the table header after filling in the first direction, for example Figure 11 As shown in Table 3.
[0085] Afterwards, the computing device 110 may fill the blank cells split in the second direction with fields in the adjacent cells in the second direction. Figure 11 As shown in S1130 in . For the blank cells C4R1 and C6R1 that are split out in the second direction (e.g., the X-axis direction), the computing device 110 fills the blank cells with fields in the cells adjacent to the blank cells in the second direction. For example, for the blank cell C4R1, the computing device fills the blank cell C4R1 with the field "resolution" in the cell C3R1 adjacent to the second direction (X-axis direction). The computing device 110 similarly fills the blank cell C6R1 to obtain the table header after filling in the second direction, for example Figure 11 As shown in Table 4.
[0086] After filling as above S1120 and S1130, all cells in the header are filled. For the filled header (for example, header 4), the computing device 110 performs a compression operation (such as S1140) on the filled header to obtain a compressed header (for example, header 5). The compressed header occupies a row in the table. In one embodiment, the computing device 110 compresses the header in a first direction (for example, the Y-axis direction), and the computing device 110 adjusts the fields in the cells in the compressed header during the compression process. The fields in the adjusted cells correspond to the column names in the table where the header is located, and are thus used to obtain the column names in the table. When adjusting the fields in the cells, the computing device 110 can determine whether the fields in the multiple cells in the first direction are consistent. If they are consistent, the consistent fields are used as the fields in the compressed cells; if they are inconsistent, the computing device combines the fields in each of the multiple cells in the first direction and separates them by an identifier such as a "vertical line" (the identifier of the vertical line can indicate that the column name comes from multiple layers of headers), thereby obtaining the adjusted fields. As Figure 11As shown in , in table header 5, the fields in cells C1R1 and C1R2 are consistent. Therefore, the field in cell C1R1 after compression is "Image Name"; the fields in cells C3R1 and C3R2 are "Resolution" and "Width" respectively, which are inconsistent fields. Accordingly, the computing device 110 combines "Resolution" and "Width" in the compressed cell C3R1 and uses a vertical line to distinguish them, as shown in FIG. Figure 11 After obtaining the compressed table header, the computing device 110 may obtain the column names of each table from the compressed table header.
[0087] In the above manner, the data processing method according to the embodiment of the present disclosure can merge tables with multiple layers of headers and inconsistent column names in the headers, thereby greatly improving the application potential of the merged tables, and eliminating the need for users to manually process headers of various types of formats (for example, modify and unify column names) before merging the tables, significantly improving the efficiency and speed of table merging, and also significantly improving the user's operating experience.
[0088] Figure 12 A schematic block diagram of an example device 1200 that can be used to implement an embodiment of the present disclosure is shown. For example, a computing device 1210 according to an embodiment of the present disclosure can be implemented by device 1200. As shown, device 1200 includes a central processing unit (CPU) or a graphics processing unit (GPU) 1201, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 1202 or loaded from a storage unit 1208 into a random access memory (RAM) 1203. In RAM 1203, various programs and data required for the operation of device 1200 can also be stored. CPU / GPU 1201, ROM 1202, and RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to bus 1204.
[0089] Various components in device 1200 are connected to I / O interface 1205, including an input unit 1206, such as a keyboard and mouse; an output unit 1207, such as various types of displays and speakers; a storage unit 1208, such as a magnetic disk and optical disk; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0090] The various processes and processing described above, such as processes 200 and / or 900, may be performed by processing unit 1201. For example, in some embodiments, method processes 200 and / or 900 may be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by CPU / GPU 1201, one or more actions of processes 200 and / or 900 described above may be performed.
[0091] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0092] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0093] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that 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, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0094] The embodiments of the present disclosure may provide at least the following subjects.
[0095] Clause 1. A method for processing data, comprising:
[0096] Based on the received property settings, obtaining a set of column names from the plurality of tables, wherein the set of column names is stored in a cache file;
[0097] In response to a mapping setting operation for the set of column names, generating a mapping file and an address file, wherein the mapping file stores a mapping relationship between the set of column names and mapped column names for the set of column names, and the address file stores addresses of the mapped column names in the cache file; and
[0098] In response to a mapping apply operation, the mapping column name is output based on the mapping file, the address file, and the cache file.
[0099] Clause 2. The method of clause 1, wherein the set of column names includes a first column name in a first table and a second column name in a second table, and the first column name and the second column name are different.
[0100] Item 3. A method according to Item 1, wherein the format of the mapping file is the same as the format of the address file, and the mapping file and the address file respectively store the mapping column name and the address of the mapping column name in the cache file.
[0101] Clause 4. The method of clause 1, wherein outputting the mapped column name comprises:
[0102] Determine the mapping column name according to the mapping relationship stored in the mapping file;
[0103] Retrieving the mapped column name from the cache file based on the address of the mapped column name stored in the address file; and
[0104] Outputs the mapped column names.
[0105] Clause 5. The method of clause 2, wherein the mapping setup operation comprises:
[0106] receiving a selection operation on at least one of the first column name and the second column name;
[0107] determining the mapped column name for the selected column name; and
[0108] Displays the selected column name in the mapping area.
[0109] Wherein, in the mapping area, the selected column name and the mapped column name are displayed in the same column.
[0110] Clause 6. The method of clause 5, wherein the mapped column name is from at least one of:
[0111] The column names that exist in the mapping area and are selected by the user; and
[0112] The column name to set by default from the set of column names.
[0113] Clause 7. The method of clause 1, wherein the set of column names includes a first column name in a first table and a second column name in a second table, the method further comprising:
[0114] In response to a merge operation, merging the first table and the second table based on the mapped column name; and
[0115] Output the merged table.
[0116] Clause 8. The method of clause 7, wherein merging the first table and the second table comprises:
[0117] Based on the mapped column name, obtaining a first column corresponding to the first column name in the first table;
[0118] Based on the mapped column name, obtaining a second column corresponding to the second column name in the second table; and
[0119] Merge the first column and the second column to obtain a merged column,
[0120] The column name corresponding to the merged column is the mapped column name.
[0121] Clause 9. The method of Clause 1, wherein the set of column names includes a first column name in a first table and a second column name in a second table, and the method further comprises:
[0122] determining a first table header of the first table and a second table header of the second table based on the attribute setting information; and
[0123] Obtaining the first column name from the first table header; and
[0124] Get the second column name from the second table header.
[0125] Item 10. A method according to Item 9, wherein the attribute setting information includes: a first starting row number and a first ending row number for the first table, and a first common field between the column names in the first table and the column names in the second table.
[0126] Clause 11. The method of clause 10, wherein determining a first header of the first table and a second header of the second table comprises:
[0127] Determine the first table header based on the first starting row number and the first ending row number;
[0128] determining a second starting row number and a second ending row number for the second table based on the first common field and the first starting row number and the first ending row number; and
[0129] The second table header of the second table is determined based on the second starting row number and the second ending row number.
[0130] Clause 12. The method of clause 11, wherein determining a second starting row number and a second ending row number for the second table comprises:
[0131] traversing the first table and the second table; and
[0132] Generate a first index set according to the traversal and the attribute setting information, wherein the first index set includes a first field row number of the first common field in the first table and a second field row number in the second table;
[0133] Based on the first index set, a start row index set and an end row index set are generated.
[0134] Wherein, the starting row index set includes the first starting row number for the first table and the second starting row number for the second table, and the ending row index set includes the first ending row number for the first table and the second ending row number for the second table.
[0135] Clause 13. The method of clause 12, wherein generating the set of starting row indices comprises:
[0136] determining a first line spacing based on the first field line number and the first starting line number in the attribute setting information; and
[0137] The starting row index set is generated based on the first row spacing and the first index set.
[0138] Clause 14. The method of clause 12, wherein generating the set of ending row indices comprises:
[0139] determining a second line spacing based on the first field line number and the end line number in the attribute setting information; and
[0140] The end row index set is generated based on the second row spacing and the first index set.
[0141] Clause 15. The method of clause 11, further comprising:
[0142] Determine the first table header and the second table header according to the start row index set and the end row index set;
[0143] Based on the first table header, obtaining the first column name in the first table; and
[0144] Based on the second table header, the second column name in the second table is obtained.
[0145] Clause 16. The method of Clause 15, wherein the first header comprises a plurality of rows and the second header comprises a plurality of rows, the method further comprising:
[0146] Splitting the merged cells in the first header and the second header respectively, wherein each row of the split first header and the split second header has a plurality of cells corresponding to the columns of the corresponding table;
[0147] Filling the blank cells in the plurality of cells with fields in adjacent cells of the blank cells to obtain a filled first table header and a filled second table header respectively;
[0148] compressing the filled first table header to obtain the first column name of the first table; and
[0149] The filled second table header is compressed to obtain the second column name of the second table.
[0150] Clause 17. A computing device comprising:
[0151] at least one processing unit; and
[0152] at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to perform a method according to any one of clauses 1 to 16.
[0153] Clause 18. A computer-readable storage medium comprising machine-executable instructions that, when executed by a device, cause the device to perform the method of any one of Clauses 1 to 16.
[0154] Clause 19. A computer program product comprising machine-executable instructions that, when executed by a device, cause the device to perform the method of any one of Clauses 1 to 16.
[0155] Clause 20. A method comprising:
[0156] Get the first table and the second table to be merged;
[0157] determining a first table header of the first table and a second table header of the second table based on the received attribute settings;
[0158] Obtain a group of column names in the first table header and the second table header, wherein the group of column names includes a first column name in the first table and a second column name in the second table;
[0159] Mapping the set of column names to mapped column names;
[0160] Merging the first table and the second table based on the mapped column names; and
[0161] Output the merged table.
[0162] Clause 21. The method of clause 20, wherein the first column name is different from the second column name.
[0163] Clause 22. The method of claim 20, wherein merging the first table and the second table comprises:
[0164] Based on the mapped column name, obtaining a first column corresponding to the first column name in the first table;
[0165] Based on the mapped column name, obtaining a second column corresponding to the second column name in the second table; and
[0166] Merge the first column and the second column to obtain a merged column,
[0167] The column name corresponding to the merged column is the mapped column name.
[0168] Clause 23. The method of clause 20, further comprising:
[0169] In response to a mapping start operation, displaying a column name management area and a mapping area, wherein the set of column names is displayed in the column name management area;
[0170] receiving, in a column name management display area, a selection operation on at least one of the first column name and the second column name;
[0171] determining the mapped column name for the selected column name; and
[0172] Displays the selected column name in the mapping area.
[0173] Wherein, in the mapping area, the selected column name and the mapped column name are displayed in the same column.
[0174] Clause 24. The method of clause 23, wherein the mapped column name is from at least one of:
[0175] The column names that exist in the mapping area and are selected by the user; and
[0176] The column name to set by default from the set of column names.
[0177] Clause 25. The method of clause 20, wherein the attribute setting information comprises a first common field between the column name in the first header and the column name in the second header, the method further comprising:
[0178] The mapped column name and the first common field are displayed together in a common column name area in the application user interface.
[0179] Clause 26. The method of clause 25, further comprising:
[0180] Obtaining a second set of column names, the second set of column names including a third column name in the first table and a fourth column name in the second table, wherein the third column name is different from the fourth column name; and
[0181] The second set of column names is displayed in a non-common column name area in the application user interface.
[0182] Item 27. A method according to Item 20, wherein the attribute setting information includes: a first starting row number and a first ending row number for the first table, and a first common field between the column name in the first table header and the column name in the second table header.
[0183] Clause 28. The method of Clause 27, wherein determining a first header of the first table and a second header of the second table comprises:
[0184] Determine the first table header of the first table based on the first starting row number and the first ending row number;
[0185] determining a second starting row number and a second ending row number for the second table based on the first common field and the first starting row number and the first ending row number; and
[0186] A second table header of the second table is determined based on the second starting row number and the second ending row number.
[0187] Clause 29. The method of clause 28, wherein determining a second starting row number and a second ending row number of the second table comprises:
[0188] traversing the first table and the second table; and
[0189] Generate a first index set according to the traversal and the attribute setting information, wherein the first index set includes a first field row number of the first common field in the first table and a second field row number in the second table;
[0190] Based on the first index set, a start row index set and an end row index set are generated.
[0191] Wherein, the starting row index set includes the first starting row number for the first table and the second starting row number for the second table, and the ending row index set includes the first ending row number for the first table and the second ending row number for the second table.
[0192] Clause 30. The method of clause 29, wherein generating the set of starting row indices comprises:
[0193] determining a first line spacing based on the first field line number and the first starting line number in the attribute setting information; and
[0194] The starting row index set is generated based on the first row spacing and the first index set.
[0195] Clause 31. The method of clause 29, wherein generating the set of ending row indices comprises:
[0196] determining a second line spacing based on the first field line number and the end line number in the attribute setting information; and
[0197] The end row index set is generated based on the second row spacing and the first index set.
[0198] Clause 32. The method of clause 29, further comprising:
[0199] Determine the first table header and the second table header according to the start row index set and the end row index set;
[0200] Based on the first table header, obtaining the first column name in the first table; and
[0201] Based on the second table header, the second column name in the second table is obtained.
[0202] Clause 33. The method of clause 32, wherein the first header comprises a plurality of rows and the second header comprises a plurality of rows, the method further comprising:
[0203] Splitting the merged cells in the first header and the second header respectively, wherein each row of the split first header and the split second header has a plurality of cells corresponding to the columns of the corresponding table;
[0204] Filling the blank cells in the plurality of cells with fields in adjacent cells of the blank cells to obtain a filled first table header and a filled second table header respectively;
[0205] compressing the filled first table header to obtain the first column name of the first table; and
[0206] The filled second table header is compressed to obtain the second column name of the second table.
[0207] Clause 34. A computing device comprising:
[0208] at least one processing unit; and
[0209] At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to perform a method according to any one of items 20 to 33.
[0210] Clause 35. A computer-readable storage medium comprising machine-executable instructions that, when executed by a device, cause the device to perform the method of any one of clauses 20 to 33.
[0211] Clause 36. A computer program product comprising machine-executable instructions that, when executed by a device, cause the device to perform the method of any one of clauses 20 to 33.
[0212] Clause 37. A method comprising:
[0213] Receive display property settings;
[0214] displaying the property settings in a settings area in a user interface of the application, wherein the property settings include a first common column name between the column names in the first table and the column names in the second table;
[0215] Based on the property setting, displaying the first common column name in a first sub-area of a column name display area in the application user interface, and displaying a group of column names in a second sub-area of the column name display area, wherein the group of column names includes a first column name in the first table and a second column name in the second table;
[0216] In response to a mapping operation, mapping the set of column names to mapped column names;
[0217] Simultaneously displaying the first common column name and the mapped column name in the first sub-area;
[0218] Merging the first table and the second table based on the mapped column names; and
[0219] Output the merged table.
[0220] Clause 38. The method of clause 37, wherein the first column name is different from the second column name.
[0221] Clause 39. The method of clause 37, wherein obtaining the combined form comprises:
[0222] Based on the mapped column name, obtaining a first column corresponding to the first column name in the first table;
[0223] Based on the mapped column name, obtaining a second column corresponding to the second column name in the second table; and
[0224] Merge the first column and the second column to obtain a merged column,
[0225] The column name corresponding to the merged column is the mapped column name.
[0226] Clause 40. The method of clause 37, further comprising:
[0227] In response to the initiation of the mapping operation, a pop-up window is displayed, the pop-up window including a column name management area and a mapping area;
[0228] The group of column names is displayed in the column name management area.
[0229] Clause 41. The method of clause 40, further comprising:
[0230] receiving, in the column name management area, a selection operation on at least one of the first column name and the second column name;
[0231] determining the mapped column name for the selected column name; and
[0232] displaying the selected column name in the mapping area,
[0233] Wherein, in the mapping area, the selected column name and the mapped column name are displayed in the same column.
[0234] Clause 42. The method of clause 41, wherein, when the mapped column names are displayed in the mapping area, determining the mapped column name for a selected column name comprises:
[0235] providing the option to include the mapped column names; and
[0236] Based on the received selection of the mapped column name, determining the selected column name as the mapped column name,
[0237] The mapped column name is selected from the set of column names.
[0238] Clause 43. The method of clause 41, further comprising:
[0239] In response to simultaneous selection of the first column name and the second column name, a column name of the first column name and the second column name that is displayed first in the column name management area is determined as the mapped column name.
[0240] Clause 44. The method of clause 41, further comprising:
[0241] The set of column names and the mapped column names are displayed in the mapping area of the pop-up window, but are not displayed in the column name management area.
[0242] Clause 45. The method of clause 41, further comprising:
[0243] In response to selection of a view operation, a table associated with the column name selected in the column name management area is displayed.
[0244] Clause 46. The method of claim 37, wherein the application user interface further comprises a table display area and a logo display area, the method comprising:
[0245] In response to selecting a table identifier, displaying a table associated with the table identifier in the table display area,
[0246] The table logo is displayed in the logo display area.
[0247] Clause 47. The method of clause 46, wherein the first common column name in the property setting is identified in the table display area.
[0248] Clause 48. A computing device comprising:
[0249] at least one processing unit; and
[0250] At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to perform a method according to any one of items 37 to 47.
[0251] Clause 49. A computer-readable storage medium comprising machine-executable instructions that, when executed by a device, cause the device to perform the method of any one of clauses 37 to 47.
[0252] Clause 50. A computer program product comprising machine-executable instructions that, when executed by a device, cause the device to perform the method of any one of claims 37 to 47.
[0253] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for mapping processing, comprising: Based on the received property settings, obtaining a set of column names from the plurality of tables, wherein the set of column names is stored in a cache file; In response to a mapping setting operation for the set of column names, generating a mapping file and an address file, wherein the mapping file stores a mapping relationship between the set of column names and mapped column names for the set of column names, and the address file stores addresses of the mapped column names in the cache file; as well as In response to a mapping application operation, the mapping column name is output based on the mapping file, the address file and the cache file, wherein the set of column names includes a first column name in a first table and a second column name in a second table, and the first column name and the second column name are different, The mapping setting operation includes: receiving a selection operation on at least one of the first column name and the second column name; determining the mapped column name for the selected column name; and Displays the selected column name in the mapping area. Wherein, in the mapping area, the selected column name and the mapped column name are displayed in the same column. 2 . The method according to claim 1 , wherein a format of the mapping file is the same as a format of the address file, and the mapping file and the address file respectively store the mapping column name and the address of the mapping column name in the cache file correspondingly.
3. The method according to claim 1, wherein outputting the mapped column name comprises: Determine the mapping column name according to the mapping relationship stored in the mapping file; Retrieving the mapping column name from the cache file based on the address of the mapping column name stored in the address file; as well as Outputs the mapped column names.
4. The method of claim 1 , wherein the mapped column name is selected from at least one of the following: The column names that exist in the mapping area and are selected by the user; and The column name to set by default from the set of column names.
5. The method of claim 1 , wherein the set of column names comprises a first column name in a first table and a second column name in a second table, the method further comprising: In response to a merge operation, merging the first table and the second table based on the mapped column name; as well as Output the merged table.
6. The method of claim 5, wherein merging the first table and the second table comprises: Based on the mapped column name, obtaining a first column corresponding to the first column name in the first table; Based on the mapped column name, obtaining a second column corresponding to the second column name in the second table; as well as Merge the first column and the second column to obtain a merged column, The column name corresponding to the merged column is the mapped column name.
7. The method of claim 1 , wherein the set of column names comprises a first column name in a first table and a second column name in a second table, and the method further comprises: determining a first table header of the first table and a second table header of the second table based on the attribute setting information; as well as Obtain the first column name from the first table header; as well as Get the second column name from the second table header.
8. The method according to claim 7, wherein the attribute setting information comprises: A first starting row number and a first ending row number for the first table, and a first common field between the column names in the first table and the column names in the second table.
9. The method according to claim 8, wherein determining a first header of the first table and a second header of the second table comprises: Determine the first table header based on the first starting row number and the first ending row number; determining a second starting row number and a second ending row number for the second table based on the first common field and the first starting row number and the first ending row number; and The second table header of the second table is determined based on the second starting row number and the second ending row number.
10. The method of claim 9, wherein determining a second starting row number and a second ending row number for the second table comprises: traversing the first table and the second table; as well as Generate a first index set according to the traversal and the attribute setting information, wherein the first index set includes a first field row number of the first common field in the first table and a second field row number in the second table; Based on the first index set, a start row index set and an end row index set are generated. Wherein, the starting row index set includes the first starting row number for the first table and the second starting row number for the second table, and the ending row index set includes the first ending row number for the first table and the second ending row number for the second table.
11. The method according to claim 10, wherein generating a starting row index set comprises: determining a first line spacing based on the first field line number and the first starting line number in the attribute setting information; as well as The starting row index set is generated based on the first row spacing and the first index set.
12. The method according to claim 10, wherein generating the end row index set comprises: determining a second line spacing based on the first field line number and the end line number in the attribute setting information; as well as The end row index set is generated based on the second row spacing and the first index set.
13. The method according to claim 9, further comprising: Determine the first table header and the second table header according to the start row index set and the end row index set; Based on the first table header, obtain the first column name in the first table; as well as Based on the second table header, the second column name in the second table is obtained.
14. The method according to claim 13, wherein the first header comprises a plurality of lines and the second header comprises a plurality of lines, the method further comprising: Splitting the merged cells in the first header and the second header respectively, wherein each row of the split first header and the split second header has a plurality of cells corresponding to the columns of the corresponding table; Filling the blank cells in the plurality of cells with fields in adjacent cells of the blank cells to obtain a filled first table header and a filled second table header respectively; Compressing the filled first table header to obtain the first column name in the first table; as well as The filled second table header is compressed to obtain the second column name in the second table.
15. A computing device comprising: at least one processing unit; and At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to perform the method according to any one of claims 1 to 14.
16. A computer-readable storage medium comprising machine-executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 14.
17. A computer program product comprising machine-executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Table integration method and device
CN110427604A
Method and computer program for integrating spread sheet with database
KR1020180004632A