A data import / export method, device, equipment and storage medium

By parsing the table templates and configuring the location of data objects in the ERP system, the problem of single data format in existing technologies is solved, enabling flexible import and export of data objects, meeting the needs of multiple data formats, and improving the efficiency of data import.

CN115658786BActive Publication Date: 2026-04-07KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing data import/export methods complete data import/export by defining the association between columns and data models, resulting in a single format that cannot meet different data format requirements.

Method used

By obtaining the data object to be imported/exported, parsing the table area in the table template, configuring the data field position of the data object in the table area according to the field type of the data object, generating configuration information, and obtaining the position information matching the data field position in the ERP system, the import or export of the data object can be realized.

Benefits of technology

It can dynamically configure the row and column positions of data objects and table areas to meet the requirements of different data formats, improve data import efficiency, and ensure that imported data meets the preset format requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658786B_ABST
    Figure CN115658786B_ABST
Patent Text Reader

Abstract

This invention discloses a data import / export method, apparatus, device, and storage medium. The method includes: obtaining a data object to be imported / exported; importing a table template and parsing the table area in the table template; obtaining the field type of the data object; configuring the data field position of the data object in the table area according to the field type to obtain configuration information; obtaining location information matching the data field position in the ERP system based on the configuration information; and importing or exporting the data object from the ERP system based on the location information. This invention configures the data object and the data field position in the table area according to the field type of the data object to obtain configuration information. Based on this configuration information, the data object can be imported into or exported from the ERP system, enabling the imported and exported data to meet different data format requirements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a data import / export method, device, equipment and storage medium. BACKGROUND

[0002] With the increasing demand of daily office, more and more browsers and server application systems involve table data import / export function. The existing data import / export method usually directly completes the data import / export by defining the association of columns and data templates, and directly stores the imported / exported data into the database.

[0003] The existing data import / export method directly completes the data import by defining the association of columns and data models, and the format of data import / export is single, which cannot meet the requirements of different data formats. SUMMARY

[0004] The present application provides a data import / export method, device, equipment and storage medium to solve the technical problem that the existing data import / export method directly completes the data import by defining the association of columns and data models, and the format of data import / export is single, which cannot meet the requirements of different data formats.

[0005] One embodiment of the present application provides a data import / export method, comprising:

[0006] obtaining a data object to be imported / exported;

[0007] importing a table template and parsing a table area in the table template;

[0008] obtaining a field type of the data object, configuring a data field position of the data object in the table area according to the field type, and obtaining configuration information;

[0009] obtaining position information in an ERP system matched with the data field position according to the configuration information;

[0010] based on the position information, importing the data object into the ERP system or exporting the data object from the ERP system.

[0011] Further, the obtaining of the field type of the data object and the configuration of the data field position of the data object in the table area according to the field type to obtain the configuration information comprises:

[0012] parsing the field type of the data object, wherein the field type comprises a document header field, a document body title and a document body field;

[0013] The bill header field is configured in preset rows and columns of the table area, the bill body title is configured in preset rows of the table area, and the bill body field is configured in preset columns of the table area.

[0014] According to the relationship between the field type and the data domain position of the table area, configuration information is generated.

[0015] Further, the configuration information is used to obtain position information in the ERP system that matches the data domain position, including:

[0016] All position information in the ERP system is obtained, and all position information is matched with the data domain position in the configuration information to obtain position information in the ERP system that matches the data domain position.

[0017] Further, the table area in the table template is parsed, including:

[0018] The rows and columns of the table template are parsed to obtain the table area of the table template.

[0019] Further, after the data object is imported into the ERP system or exported from the ERP system, the method further includes:

[0020] The data object is formatted and filtered according to a preset filtering condition.

[0021] Further, the data object is formatted, including:

[0022] The data object is formatted by using an enumeration value conversion method.

[0023] One embodiment of the present application provides a data import / export device, including:

[0024] A data object acquisition module is configured to acquire a data object to be imported / exported.

[0025] A template parsing module is configured to import a table template and parse a table area in the table template.

[0026] A configuration module is configured to acquire a field type of the data object, configure a data domain position of the data object in the table area according to the field type, and obtain configuration information.

[0027] A position information acquisition module is configured to acquire position information in an ERP system that matches the data domain position according to the configuration information.

[0028] The data import / export module is used to import the data object into the ERP system or export the data object from the ERP system based on the location information.

[0029] An embodiment of the present invention provides a data import / export device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor, and the processor implementing the data import / export method as described above when executing the computer program.

[0030] One embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the data import / export method as described above.

[0031] One embodiment of the present invention provides a computer program product that, when run on a computer, causes the computer to perform the data import / export method as described above.

[0032] This invention, through its embodiments, acquires the data objects to be imported or exported, parses the table areas in the table template, and configures the data objects and their corresponding data field positions in the table areas according to the data object's field type, obtaining configuration information. Based on this configuration information, the data objects can be imported into or exported from the ERP system. The invention can dynamically configure the row and column positions of the data objects and the table areas in the table template as needed, and can import or export data objects in different formats by dynamically modifying the configuration information, thereby meeting various data format requirements. Furthermore, based on the configuration information, this invention acquires location information in the ERP system that matches the data field positions, and imports the data objects into the ERP system for display based on this location information. The invention allows modification of the configuration information before importing the data objects into the database, ensuring that the imported data meets preset data format requirements, thus effectively improving the efficiency of data import. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating a data import / export method provided in an embodiment of the present invention;

[0034] Figure 2 This is a schematic diagram of a data import result provided in an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of a document import configuration provided in an embodiment of the present invention;

[0036] Figure 4A schematic diagram illustrating the process of generating configuration information is provided for an embodiment of the present invention;

[0037] Figure 5 This is a schematic diagram of a process for importing data based on configuration information, provided by an embodiment of the present invention.

[0038] Figure 6 A schematic diagram of a data model configuration provided for an embodiment of the present invention;

[0039] Figure 7 This is a schematic diagram of the structure of a data import / export device provided in an embodiment of the present invention. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more.

[0042] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0043] Please see Figure 1 One embodiment of the present invention provides a data import / export method, including:

[0044] S1. Obtain the data object to be imported / exported;

[0045] In this embodiment of the invention, the data objects to be imported / exported include text, basic information, dates, etc.

[0046] S2. Import the table template and parse the table area in the table template;

[0047] In this embodiment of the invention, the imported table template can be any table-style data template, including several rows and several columns. Parsing the table template yields a table area, which is a two-dimensional data area composed of rows and columns. In this embodiment, the table template can be an Excel template.

[0048] S3. Obtain the field type of the data object, configure the data field position of the data object in the table area according to the field type, and obtain the configuration information;

[0049] In this embodiment of the invention, the field types include document header fields, document body titles, and document body fields. The corresponding field types can be set according to different data objects. For example, the date can be set as a document header field, basic information can be set as a document body field, and text can be set as a document body field, etc.

[0050] After obtaining the field types of data objects, this embodiment of the invention can configure the data objects in the data field positions of a table according to actual needs. This means configuring different data objects in different positions within the table area. Configuration information is generated based on the data objects and their corresponding table area positions. This configuration information reflects the positional relationship between the data objects and the table area. This configuration information enables the import and export of table data. When importing table data, the data object's position in the table area can be configured according to requirements, resulting in various data representation formats to meet the data format requirements of different scenarios. When exporting table data, the data object's position in the table area can be configured according to requirements, allowing the export of data objects with specified content at specified locations, thus meeting the data requirements of different scenarios.

[0051] S4. Based on the configuration information, obtain the location information in the ERP system that matches the data domain location;

[0052] In this embodiment of the invention, location information is predefined in the ERP system. This location information is consistent with the format of the data field location in the table area. Based on the configuration information, the location information matching the data field location in the ERP system can be obtained. When it is necessary to import data objects into the ERP system, the data objects can be imported into the specified location in the ERP system as required. When it is necessary to export data objects from the ERP system, the specified data objects can be exported from the ERP system as required.

[0053] S5. Based on location information, import data objects into the ERP system or export data objects from the ERP system.

[0054] This invention obtains the data object to be imported or exported, parses the table area in the table template, configures the data field position of the data object and the table area according to the field type of the data object, and obtains configuration information. Based on the configuration information, the data object can be imported into the ERP system or exported from the ERP system. The row and column positions of the data object and the table area can be dynamically configured according to the requirements. Different formats of data objects can be imported or exported by dynamically modifying the configuration information, thereby meeting different data format requirements.

[0055] Please see Figure 2 This is a schematic diagram of a data import result provided in an embodiment of the present invention.

[0056] In one embodiment, the field type of the data object is obtained, and the data field position of the data object in the table area is configured according to the field type to obtain configuration information, including:

[0057] The data object's field types are parsed and include document header fields, document body title fields, and document body fields.

[0058] In this embodiment of the invention, the data object may include various data types, such as text, basic data type, date, etc. These data types have different functions. For example, text can be a document header field, document body title, etc., basic data type can be a document body field, and date can be a document body field. This embodiment of the invention can parse the data object and set the field types of the data object according to actual needs.

[0059] Configure the document header fields in the preset rows and columns of the table area, configure the document body title in the preset rows of the table area, and configure the document body fields in the preset columns of the table area;

[0060] In this embodiment of the invention, the positions of different field types in the table area can be set according to actual needs. That is, when the field type is a document header field, it is configured in the row and column of the table area; when the field type is a document body title, it is configured in the row of the table area; when the field type is a document body field, it is configured in the column of the table area, so that the positions of each field type in the table area form a corresponding positional relationship to generate configuration information.

[0061] Please see Figure 3 This is a schematic diagram illustrating a document import configuration according to an embodiment of the present invention. Figure 3 As shown, embodiments of the present invention can set field names, rows and columns of the table area where the field names are located as needed, and configure whether the field needs to be imported or exported, thereby enabling the configuration of the position of different field types in the table area according to actual needs, so that importing or exporting data can meet various user needs.

[0062] The configuration information is generated based on the relationship between the field type and the data field location in the table area.

[0063] Please see Figure 4 This is a schematic diagram illustrating a configuration information generation process according to an embodiment of the present invention. Please refer to... Figure 5 This is a schematic diagram of a process for importing data based on configuration information, provided by an embodiment of the present invention.

[0064] In one embodiment, based on configuration information, location information matching the data domain location in the ERP system is obtained, including:

[0065] Obtain all location information in the ERP system, match all location information with the data domain locations in the configuration information, and obtain the location information in the ERP system that matches the data domain locations.

[0066] In this embodiment of the invention, data objects in the ERP system can be modified. For example, the material name "pen" corresponds to the basic material information in the ERP system, and the document should display the object "pen" instead of the name "pen".

[0067] In one embodiment, parsing a table region in a table template includes:

[0068] The rows and columns of the table template are parsed to obtain the table area of ​​the table template.

[0069] In this embodiment of the invention, after obtaining the table area of ​​the table template, the positions of data objects of different field types in the table area can be configured based on the table area of ​​the table template, thereby establishing the positional relationship between the data objects and the rows and columns of the table area, and the data objects can be further imported or exported to the ERP system based on the positional relationship.

[0070] In one embodiment, the table area in the parsed table template can be parsed as follows: the configuration of the header field is parsed row by row. If the A1 area has a value (company name) and the A2 area is empty, then the B1 area is a dynamic value area. For example, if all 13 rows of the document body have values ​​and all the rows below are empty, then it represents the document body. The dynamic number of rows is 15. The table area is a two-dimensional data area containing rows and columns.

[0071] In one embodiment, after importing or exporting a data object from an ERP system, the method further includes:

[0072] The data object is formatted, and the formatted data object is filtered according to preset filtering conditions.

[0073] In this embodiment of the invention, the preset filtering conditions include filtering by name and filtering by code. The data object import result is a Map collection. In this embodiment of the invention, the processing of special model fields involves data querying followed by value assignment. For example, the basic data type in the special model field needs to be queried and assigned a value according to the filtering conditions in the configuration. After obtaining the value to be assigned and determining which field to assign it to, the assignment is completed by setting `setValue`.

[0074] Please see Figure 6 This is a schematic diagram of a data model configuration provided in one embodiment of the present invention.

[0075] In one embodiment, formatting a data object includes:

[0076] The data object is formatted using an enumeration value conversion method.

[0077] Implementing the embodiments of the present invention has the following beneficial effects:

[0078] This invention, through its embodiments, acquires the data objects to be imported or exported, parses the table areas in the table template, and configures the data objects and their corresponding data field positions within the table areas based on the data object's field type. This configuration information allows the data objects to be imported into or exported from the ERP system. It enables dynamic configuration of the row and column positions of the data objects and table areas as needed, and allows for the import or export of data objects in different formats by dynamically modifying the configuration information, thus meeting diverse data format requirements. Furthermore, this invention, based on the configuration information, acquires location information matching the data field positions within the ERP system and imports the data objects into the ERP system for display. It allows modification of the configuration information before importing the data objects into the database, ensuring the imported data meets preset data format requirements, thereby effectively improving data import efficiency.

[0079] Please see Figure 7 Based on the same inventive concept as the above embodiments, one embodiment of the present invention provides a data import / export device, comprising:

[0080] Data object acquisition module 10 is used to acquire data objects to be imported / exported;

[0081] Template parsing module 20 is used to import table templates and parse the table areas in the table templates;

[0082] Configuration module 30 is used to obtain the field type of the data object, configure the data field position of the data object in the table area according to the field type, and obtain configuration information;

[0083] The location information acquisition module 40 is used to acquire location information that matches the data domain location in the ERP system based on the configuration information.

[0084] The data import / export module 50 is used to import data objects into the ERP system or export data objects from the ERP system based on location information.

[0085] In one embodiment, the configuration module 30 is further configured to:

[0086] The data object's field types are parsed and include document header fields, document body title fields, and document body fields.

[0087] Configure the document header fields in the preset rows and columns of the table area, configure the document body title in the preset rows of the table area, and configure the document body fields in the preset columns of the table area;

[0088] The configuration information is generated based on the relationship between the field type and the data field location in the table area.

[0089] In one embodiment, the location information acquisition module 40 is further configured to:

[0090] Obtain all location information in the ERP system, match all location information with the data domain locations in the configuration information, and obtain the location information in the ERP system that matches the data domain locations.

[0091] In one embodiment, the template parsing module 20 is further configured to:

[0092] The rows and columns of the table template are parsed to obtain the table area of ​​the table template.

[0093] In one embodiment, the device further includes a filtering module for:

[0094] The data object is formatted, and the formatted data object is filtered according to preset filtering conditions.

[0095] In one embodiment, formatting a data object includes:

[0096] The data object is formatted using an enumeration value conversion method.

[0097] One embodiment of the present invention provides a data import / export device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. The memory is coupled to the processor, and the processor implements the data import / export method as described above when executing the computer program.

[0098] One embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the data import / export method as described above.

[0099] One embodiment of the present invention provides a computer program product that, when run on a computer, causes the computer to perform the data import / export method as described above.

[0100] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data import / export method, characterized in that, include: Get the data object to be imported / exported; Import the table template and parse the table area in the template. The data object's field types are parsed to obtain the field types, which include document header fields, document body title fields, and document body fields. Configure the document header field in the preset rows and columns of the table area, configure the document body title in the preset rows of the table area, and configure the document body field in the preset columns of the table area; Based on the relationship between the field type and the data field position of the table area, configuration information is generated; Based on the configuration information, obtain the location information in the ERP system that matches the location of the data domain; Based on the location information, the data object is imported into the ERP system or exported from the ERP system.

2. The data import / export method as described in claim 1, characterized in that, The step of obtaining location information in the ERP system that matches the data domain location based on the configuration information includes: Obtain all location information in the ERP system, match all location information with the data domain location in the configuration information, and obtain the location information in the ERP system that matches the data domain location.

3. The data import / export method as described in claim 1, characterized in that, The parsing of the table area in the table template includes: The rows and columns of the table template are parsed to obtain the table area of ​​the table template.

4. The data import / export method as described in claim 1, characterized in that, After importing the data object into the ERP system, or exporting the data object from the ERP system, the method further includes: The data object is formatted, and the formatted data object is filtered according to preset filtering conditions.

5. The data import / export method as described in claim 4, characterized in that, The formatting process for the data object includes: The data object is formatted using an enumeration value conversion method.

6. A data import / export device, characterized in that, include: The data object acquisition module is used to acquire the data object to be imported / exported; The template parsing module is used to import table templates and parse the table areas in the table templates. The configuration module is used to parse and obtain the field types of the data object, wherein the field types include document header fields, document body title fields, and document body fields; Configure the document header field in a preset row and column of the table area, configure the document body title in a preset row of the table area, and configure the document body field in a preset column of the table area; generate configuration information based on the relationship between the field type and the data field position of the table area; The location information acquisition module is used to acquire location information in the ERP system that matches the location of the data domain, based on the configuration information. The data import / export module is used to import the data object into the ERP system or export the data object from the ERP system based on the location information.

7. A data import / export device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor, and the processor implementing the data import / export method as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the data import / export method as described in any one of claims 1 to 5.

9. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the data import / export method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Reconfigurable multi-source data importing method in ERP system

    CN104317974A