A method, device and medium for migrating table data

By adding unique identification attributes to the data nodes in the graph database and building a data conversion model, the table data is migrated to the graph database, and the problems of low migration efficiency and high error rate in the existing technology are solved, and efficient and accurate data migration is achieved.

CN115599764BActive Publication Date: 2025-06-06INSPUR ZHUOSHU BIG DATA IND DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211171933.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-06-06
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

When migrating tabular data to a graph database, the prior art lacks process processing, is low efficiency, and errors in the data migration process are prone to occur.

Method used

By adding unique identification attributes to the data nodes in the graph database and building a data conversion model, the table data is converted into graph database data, and data migration is realized using the preset application interface.

Benefits of technology

The process-based processing of table data migration is realized, the transmission efficiency is improved, and the error rate in the data migration process is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599764B_ABST
    Figure CN115599764B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and medium for migrating tabular data, wherein the method comprises: adding a unique identification attribute to each data node in a graphical database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting tabular data into graphical database data; converting the tabular data into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in; calling a preset application interface, and migrating the data in the preset format to the graphical database through the data conversion model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and medium for migrating table data. Background Art

[0002] With the rapid development of Internet applications, business needs are changing more and more frequently. As the amount of data grows rapidly, higher requirements are placed on the adaptability of databases. Under this development trend, another network structure besides the relational model was born, that is, the graph database in the non-relational database. Compared with the traditional relational database, the biggest advantage of the graph database is that it stores data in the form of a graph structure, which allows users to see the connection between data more intuitively. It not only has strong adaptability, but also can maintain efficient query performance.

[0003] With the advent of the big data era, many applications are facing problems such as slow retrieval speed and insufficient data storage, which has led more and more users to choose to store data originally stored in tables or relational databases in graph databases, thereby taking advantage of network storage to improve query efficiency and provide more flexible storage. Currently, data migration is usually carried out through cypher statements or ETL tools of graph databases, but the former cannot realize the process of data migration and is less efficient when processing large amounts of data, while the latter is prone to errors during data migration. Summary of the invention

[0004] In order to solve the above problems, this application proposes a method for migrating table data, including:

[0005] Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data;

[0006] The table data is converted into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in;

[0007] The preset application interface is called, and the preset format data is migrated to the graphic database through the data conversion model.

[0008] In one implementation of the present application, before adding a unique identification attribute to each data node in the graph database, the method further includes:

[0009] Preprocessing the table data to be migrated to determine first data description information corresponding to the table data; the first data description information at least includes a table name, a column name, a data format, and an auto-increment identification value adapted to the table data;

[0010] Obtain the second data description information corresponding to the data node, and determine the mapping relationship between the first data description information and the second data description information, so as to realize the migration of the table data according to the mapping relationship; wherein, the second data description information at least includes a node label and a node attribute, and the table name and the column name each have a mapping relationship with the node label and the node attribute.

[0011] In one implementation of the present application, before constructing a data conversion model for converting the table data into graphic database data, the method further includes:

[0012] Obtaining a preset graph database; wherein the graph database contains a plurality of data nodes for which table data migration has been completed;

[0013] Determine a plurality of data node pairs from the plurality of data nodes; the data node pairs are composed of a first data node and a second data node, and there is a relationship between the first data node and the second data node;

[0014] The relationship between the data node pairs is abstracted into a data node relationship description, so as to generate a second joint identifier according to the data node description; the data node relationship description is composed of a plurality of attribute fields.

[0015] In one implementation of the present application, the relationship between the data node pairs is abstracted into a data node relationship description, so as to generate a second joint identifier according to the data node description, specifically including:

[0016] Obtaining relationship description information of the data node pair; the relationship description information at least includes a first node label and a first unique identification value corresponding to the first data node, a second node label and a second unique identification value corresponding to the second data node, and a relationship type and relationship attributes corresponding to the relationship;

[0017] For at least part of the relationship description information, corresponding relationship attribute fields are generated respectively to obtain an abstracted data node relationship description; the data node relationship description includes the first node label, the first unique identification value, the second node label, the second unique identification value and the relationship attribute field corresponding to the relationship type;

[0018] The field value corresponding to the data node relationship description is used as the second joint identifier.

[0019] In one implementation of the present application, a data conversion model for converting the table data into graphic database data is constructed, specifically including:

[0020] Generate a node attribute field corresponding to the data node according to the second data description information corresponding to the data node and the unique identification value;

[0021] Generate a data node model for migrating the table data according to the node attribute field and the first joint identifier, and generate a relationship model for representing the association relationship between the table data according to the relationship attribute field and the second joint identifier;

[0022] According to the data node model, the relationship model and the preset mapping relationship, a data conversion model for converting the table data into graphic database data is constructed.

[0023] In an implementation of the present application, the application interface includes a first application interface applied to the data node and a second application interface applied to the relationship, calling a preset application interface and migrating the preset format data to the graph database through the data conversion model, specifically including:

[0024] Determine the type of data migration to be performed on the table data; the data migration type includes data addition, data update and data deletion;

[0025] According to the data migration type, determining respectively a first target application interface and a second target application interface to be called from the first application interface and the second application interface;

[0026] The first target application interface and the second target application interface are called, and the preset format data is migrated to the graphic database through the data conversion model.

[0027] In one implementation of the present application, before calling the first target application interface and the second target application interface, the method further includes:

[0028] Add request configuration information for the first target application interface and the second target application interface, and after completing the configuration, receive an interface call request initiated by the client.

[0029] In one implementation of the present application, the data nodes exist in the form of a list and support batch operations.

[0030] An embodiment of the present application provides a migration device for table data, characterized in that the device includes: at least one processor;

[0031] and, a memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0033] Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data;

[0034] The table data is converted into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in;

[0035] The preset application interface is called, and the preset format data is migrated to the graphic database through the data conversion model.

[0036] The embodiment of the present application provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:

[0037] Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data;

[0038] The table data is converted into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in;

[0039] The preset application interface is called, and the preset format data is migrated to the graphic database through the data conversion model.

[0040] The table data migration method provided by the embodiment of the present application can bring the following beneficial effects:

[0041] By calling the application interface, the table data converted into a preset format can be transferred to the application interface, thereby migrating the table data to the graphic database, realizing the process of table data migration, and no longer needing to write a separate query statement for a certain table data, effectively improving the transmission efficiency. A unique identification attribute is added to the graphic database, and the first joint identification obtained according to the unique identification attribute can make the graphic database and the table data associated, and in the data migration process, the first joint identification can play an identification role, effectively reducing the error rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 A flowchart of a table data migration method provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of a table data format conversion process provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of the structure of a table data migration device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0047] The embodiment of this specification provides a method for migrating table data. It should be noted that the execution subject in the embodiment of this specification can be a server or any device with data processing capabilities.

[0048] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0049] like Figure 1 As shown, a method for migrating table data provided in an embodiment of the present application includes:

[0050] S101: adding a unique identification attribute to each data node in a graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data.

[0051] Graph database is a kind of non-relational database, which stores the relationship between entities through the data structure of graph, including Neo4j, InfoGrid, etc. Taking Neo4j as an example, the graph database contains two important elements: nodes and relationships. Each data of Neo4j is stored on nodes and relationships, where each data node contains node labels and node attributes. The node label refers to the type or role of the data, which can be compared to the concept of tables in MySQL databases. For example, the population table and housing table in MySQL database correspond to the population label and housing label of Neo4j nodes respectively. The relationship is composed of relationship type and relationship attribute, which can express the connection between each data node in the form of a directed graph.

[0052] If the migration of tabular data is to be realized, the tabular data to be migrated needs to be preprocessed, and the tabular data needs to be converted into a unified format, so as to determine the first data description information corresponding to the tabular data. The first data description information at least includes the table name, column name, data format, and a self-increment identification value adapted to the tabular data. Among them, the column where the self-increment identification value is located can be determined according to the amount of data in the tabular data. After determining the first data description information, the second data description information corresponding to the data node in the graphic database is obtained, and the mapping relationship between the first data description information and the second data description information is determined, so as to realize the migration of the tabular data according to the mapping relationship. The second data description information at least includes a node label and a node attribute. The mapping relationship represents the corresponding relationship between the tabular data and the graphical database data when performing data migration, wherein the table name and the column name each have a mapping relationship with the node label and the node attribute. After determining the mapping relationship between the tabular data and the graphical database, when performing subsequent data migration, the conversion between different types of data can be realized directly according to the mapping relationship.

[0053] Since there is a self-incrementing identification value attribute in the table data, the embodiment of the present application also adds a unique identification attribute to each data node in the graphic database, and uses the unique identification value corresponding to the unique identification attribute and the node label of the data node as the first joint identification. In this way, the first joint identification establishes an association relationship between the table data and the data node. The data conversion model constructed according to the first joint identification can more conveniently perform data query, modification and deletion, and the first joint identification plays an identification role in the process of data migration, which can avoid the generation of data errors as much as possible and improve operability. The data conversion model further constructed by the first joint identification can also improve the problem of large data errors in the process of table data migration.

[0054] In the embodiment of the present application, since there may be connections between the table data, when converting it into graph database data, it is also necessary to ensure that there are connections between the data nodes. The connection between the data nodes is represented by a relationship. A relationship is an entity that can establish a relationship between two data nodes, with the source node pointing to the target node. Among them, the two data nodes with a relationship constitute a data node pair. The data node pair can be divided into a first data node as a source node and a second data node as a target node according to the relationship pointing. In addition, as an entity, the relationship also has attributes and corresponding attribute values.

[0055] That is to say, when migrating data between different types of databases, it is necessary not only to migrate the data but also to migrate the data relationship. Therefore, in order to improve the data governance system, it is also necessary to make the data tables related to each other to facilitate the conversion between relational data and non-relational data. This application identifies the relationship by generating a second joint identifier so that when migrating the table data, the relationship between the table data can be reflected at the same time, which reduces errors and is easy to operate.

[0056] Specifically, a preset graph database is obtained, and there are multiple data nodes in the graph database that have completed the migration of table data. From the multiple data nodes, several data node pairs are determined, and the data node pairs are composed of a first data node and a second data node, and there is a relationship between the first data node and the second data node. After the data node pairs are determined, the relationship between the data node pairs is abstracted into a data node relationship description, so as to generate a second joint identifier according to the data node description. The data node relationship description is an abstract description of the relationship, which can be regarded as a field set composed of several attribute fields.

[0057] If the second joint identifier is to be generated, the relationship description information of the data node pair must be obtained first. The relationship description information at least includes the first node label and the first unique identification value corresponding to the first data node, the second node label and the second unique identification value corresponding to the second data node, and the relationship type and relationship attribute corresponding to the relationship. For example, the first data node label is student A, the second data node label is school B, the relationship type between the first data node and the second data node is student, and the relationship attribute is the attribute information used to indicate the relationship between student A and school B, that is, the class of student A in school B. After obtaining the relationship description information, corresponding relationship attribute fields are generated for at least part of the relationship description information to obtain the abstracted data node relationship description; the data node relationship description includes the first node label, the first unique identification value, the second node label, the second unique identification value and the relationship attribute field corresponding to the relationship type. At this point, the relationship attribute field for abstractly describing the relationship between the data nodes is generated, and the field value corresponding to the data node relationship description needs to be used as the second joint identifier. In this way, in the process of data migration, not only can the normal conversion of the table data be guaranteed, but also the connection between different table data can be more intuitively obtained, thereby improving the effect of data governance.

[0058] In an embodiment of the present application, the server may generate a node attribute field corresponding to the data node based on the second data description information and the unique identification value corresponding to the data node. After generating the node attribute field, a data node model for migrating tabular data may be generated based on the first joint identification and the node attribute field mentioned above, and a relationship model for representing the association relationship between tabular data may be generated based on the relationship attribute field and the second joint identification. Due to the particularity of the graphical database for data representation, when migrating tabular data, the data needs to be divided into two types for conversion, one is the node, and the other is the relationship. Therefore, in order to simplify the migration process, a data conversion model combining the two conversion functions can be constructed based on the above-mentioned data node model, relationship model and preset mapping relationship to realize the migration of tabular data to graphical database data. It should be noted that the data conversion model also needs to set the specific transmission format of the tabular data. Usually, the tabular data is migrated in json format.

[0059] S102: Converting the table data into data in a preset format set by a data conversion model through a preset format conversion formula or a table add-in.

[0060] After building the data conversion model, in order to achieve smooth transmission of the table data, it is necessary to convert it into the preset format data specified by the data conversion model. This process can be achieved through a preset format conversion formula, such as an Excel formula, or a table add-in, namely Excel to JSON, such as Figure 2The schematic diagram of a table data format conversion process shown in the figure, the table data includes a table name, a column name, and an auto-increment identification value. After the table data is converted, it can exist in json format. In this process, the format conversion is realized based on the mapping relationship between the table data and the graphic database data.

[0061] S103: calling a preset application interface and migrating the preset format data to the graphic database through a data conversion model.

[0062] The embodiment of the present application can pre-write an application interface for implementing data migration through the flask framework and py2neo library in python. The application interface is divided into a first application interface for migrating data nodes and a second application interface for migrating data node relationships.

[0063] After the table data is converted into a preset format, the above-written application interface can be called, and the data in json format can be migrated to the graphic database according to the conversion rules set by the data conversion model. The specific execution logic can be realized through the application interface. The first application interface and the second application interface can be divided into data addition, data update and data deletion according to the different data migration types, that is, adding node interface, updating node interface, deleting node interface, adding relationship interface, updating relationship interface, and deleting relationship interface. Therefore, before calling the application interface, it is necessary to first determine the data migration type to be performed on the table data, and then determine the first target application interface and the second target application interface to be called from the first application interface and the second application interface according to the data migration type. At this time, the json format data is used as the transmission parameter of the application interface, and the first target application interface and the second target application interface are called, so that the preset format data can be migrated to the graphic database through the data conversion model. The json format data corresponds to the data format in the graphic database. The first joint identifier and the second joint identifier always play an identification role in the migration process, which is more convenient for adding, deleting and modifying data nodes. During the migration process, json format data can be automatically filled into the data nodes of the graph database as node attribute field values. At the same time, the server can identify the associated data tables in the tabular data and determine the relationship between the two, thereby determining the corresponding first node label, first unique identification value, second node label, second unique identification value, relationship type, and relationship attribute. Furthermore, the server can add or modify the relationship between data nodes based on the above determined information, thus realizing the migration of tabular data to the graph database.

[0064] It should be noted that before calling the application interface, the server needs to first add the request configuration information (post information and host information) for the first target application interface and the second target application interface, and after completing the configuration, receive the interface call request initiated by the client. Only after receiving the interface call request will the server respond to the interface call request and call the corresponding application interface to migrate the table data.

[0065] In the embodiment of the present application, the data nodes exist in the form of a list and support batch operations. It not only realizes the process migration of table data, but also enables batch processing, effectively improving the migration efficiency. When the amount of data is too large and the rate of adding new data nodes is too slow, the migration process can be optimized through the built-in module (for example, the bluk module) to improve the transmission efficiency.

[0066] The above are embodiments of the method proposed in this application. Based on the same idea, one or more embodiments of this specification also provide devices and media corresponding to the above method.

[0067] Figure 3 A schematic diagram of a structure of a table data migration device provided in an embodiment of the present application, the device comprising: at least one processor;

[0068] and, a memory communicatively connected to at least one processor; wherein,

[0069] The memory stores instructions executable by at least one processor, the instructions being executed by at least one processor to enable the at least one processor to:

[0070] Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data;

[0071] The table data is converted into the preset format data set by the data conversion model through the preset format conversion formula or table add-in;

[0072] Call the preset application interface and migrate the preset format data to the graphic database through the data conversion model.

[0073] The embodiment of the present application provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:

[0074] Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data;

[0075] The table data is converted into the preset format data set by the data conversion model through the preset format conversion formula or table add-in;

[0076] Call the preset application interface and migrate the preset format data to the graphic database through the data conversion model.

[0077] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0078] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0079] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0084] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0085] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0086] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0087] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for migrating table data. It is characterized in that The method comprises: Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data; The table data is converted into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in; Calling a preset application interface, and migrating the preset format data to the graphic database through the data conversion model; Before constructing a data conversion model for converting the table data into graph database data, the method further includes: Obtaining a preset graph database; wherein the graph database contains a plurality of data nodes for which table data migration has been completed; Determine a plurality of data node pairs from the plurality of data nodes; the data node pairs are composed of a first data node and a second data node, and there is a relationship between the first data node and the second data node; Abstracting the relationship between the data node pairs into a data node relationship description, so as to generate a second joint identifier according to the data node relationship description; the data node relationship description is composed of a plurality of attribute fields; Constructing a data conversion model for converting the table data into graph database data, specifically including: Generate a node attribute field corresponding to the data node according to the second data description information corresponding to the data node and the unique identification value; Generate a data node model for migrating the table data according to the node attribute field and the first joint identifier, and generate a relationship model for representing the association relationship between the table data according to the relationship attribute field and the second joint identifier; According to the data node model, the relationship model and the preset mapping relationship, a data conversion model for converting the table data into graphic database data is constructed.

2. A method for migrating table data according to claim 1, It is characterized in that Before adding a unique identification attribute to each data node in the graph database, the method further includes: Preprocessing the table data to be migrated to determine first data description information corresponding to the table data; the first data description information at least includes a table name, a column name, a data format, and an auto-increment identification value adapted to the table data; Obtain the second data description information corresponding to the data node, and determine the mapping relationship between the first data description information and the second data description information, so as to realize the migration of the table data according to the mapping relationship; wherein, the second data description information at least includes a node label and a node attribute, and the table name and the column name each have a mapping relationship with the node label and the node attribute.

3. A method for migrating table data according to claim 1, It is characterized in that Abstracting the relationship between the data node pairs into a data node relationship description, and generating a second joint identifier according to the data node relationship description, specifically includes: Obtaining relationship description information of the data node pair; the relationship description information at least includes a first node label and a first unique identification value corresponding to the first data node, a second node label and a second unique identification value corresponding to the second data node, and a relationship type and relationship attributes corresponding to the relationship; For at least part of the relationship description information, corresponding relationship attribute fields are generated respectively to obtain an abstracted data node relationship description; the data node relationship description includes the first node label, the first unique identification value, the second node label, the second unique identification value and the relationship attribute field corresponding to the relationship type; The field value corresponding to the data node relationship description is used as the second joint identifier.

4. A method for migrating table data according to claim 1, It is characterized in that The application interface includes a first application interface applied to the data node and a second application interface applied to the relationship, calling a preset application interface and migrating the preset format data to the graph database through the data conversion model, specifically including: Determine the type of data migration to be performed on the table data; the data migration type includes data addition, data update and data deletion; According to the data migration type, determining respectively a first target application interface and a second target application interface to be called from the first application interface and the second application interface; The first target application interface and the second target application interface are called, and the preset format data is migrated to the graphic database through the data conversion model.

5. A method for migrating table data according to claim 4, It is characterized in that Before calling the first target application interface and the second target application interface, the method further includes: Add request configuration information for the first target application interface and the second target application interface, and after completing the configuration, receive an interface call request initiated by the client.

6. A method for migrating table data according to claim 1, It is characterized in that The data nodes exist in the form of a list and support batch operations.

7. A migration device for table data, It is characterized in that The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data; The table data is converted into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in; Calling a preset application interface, and migrating the preset format data to the graphic database through the data conversion model; Before building a data conversion model for converting the table data into graph database data, the method further includes: Obtaining a preset graph database; wherein the graph database contains a plurality of data nodes for which table data migration has been completed; Determine a plurality of data node pairs from the plurality of data nodes; the data node pairs are composed of a first data node and a second data node, and there is a relationship between the first data node and the second data node; Abstracting the relationship between the data node pairs into a data node relationship description, so as to generate a second joint identifier according to the data node relationship description; the data node relationship description is composed of a plurality of attribute fields; Constructing a data conversion model for converting the table data into graph database data, specifically including: Generate a node attribute field corresponding to the data node according to the second data description information corresponding to the data node and the unique identification value; Generate a data node model for migrating the table data according to the node attribute field and the first joint identifier, and generate a relationship model for representing the association relationship between the table data according to the relationship attribute field and the second joint identifier; According to the data node model, the relationship model and the preset mapping relationship, a data conversion model for converting the table data into graphic database data is constructed.

8. A non-volatile computer storage medium storing computer executable instructions, It is characterized in that The computer executable instructions are configured to: Adding a unique identification attribute to each data node in the graph database, and using a unique identification value corresponding to the unique identification attribute and a node label of the data node as a first joint identification to construct a data conversion model for converting table data into graph database data; The table data is converted into data in a preset format set by the data conversion model through a preset format conversion formula or a table add-in; Calling a preset application interface, and migrating the preset format data to the graphic database through the data conversion model; Before building a data conversion model for converting the table data into graph database data, the method further includes: Obtaining a preset graph database; wherein the graph database contains a plurality of data nodes for which table data migration has been completed; Determine a plurality of data node pairs from the plurality of data nodes; the data node pairs are composed of a first data node and a second data node, and there is a relationship between the first data node and the second data node; Abstracting the relationship between the data node pairs into a data node relationship description, so as to generate a second joint identifier according to the data node relationship description; the data node relationship description is composed of a plurality of attribute fields; Constructing a data conversion model for converting the table data into graph database data, specifically including: Generate a node attribute field corresponding to the data node according to the second data description information corresponding to the data node and the unique identification value; Generate a data node model for migrating the table data according to the node attribute field and the first joint identifier, and generate a relationship model for representing the association relationship between the table data according to the relationship attribute field and the second joint identifier; According to the data node model, the relationship model and the preset mapping relationship, a data conversion model for converting the table data into graphic database data is constructed.

Citation Information

Patent Citations

  • Database migration method and device thereof

    CN105808553A

  • Data processing apparatus and data mapping method thereof

    US20160092527A1