A data connection method, database, system and computer-readable storage medium

By creating multiple transmission pipelines in a large-scale parallel database to transmit data in parallel, the problem of insufficient data docking processing capabilities in the existing technology is solved, efficient data docking is achieved, and the data interoperability needs of multiple platforms are met.

CN113515563BActive Publication Date: 2024-10-15ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110352154.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2024-10-15
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

Existing technologies have weak processing capabilities during the data docking process, resulting in slow data query, entry or export speeds, and are unable to meet the data interoperability needs of different business needs.

Method used

Adopt a data docking method based on a large-scale parallel database, create multiple transmission pipelines to transmit data in parallel, and use the matching number of multiple transmission pipelines and data export fields to achieve efficient data transmission, improving the speed and consumption capacity of data docking.

Benefits of technology

By transmitting data in parallel, the speed and efficiency of data docking are significantly improved, the data transmission time is shortened, the needs of multi-platform data interoperability are met, and the consumption power of data docking is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113515563B_ABST
    Figure CN113515563B_ABST
Patent Text Reader

Abstract

The present application discloses a data docking method, a database, a system and a computer-readable storage medium, which is applied to a large-scale parallel database, and includes: creating multiple transmission pipelines; importing the data export fields in the large-scale parallel database into the corresponding transmission pipelines in parallel, so as to import the data docking fields into the data docking platform through the corresponding transmission pipelines; or receiving the data export fields in the data docking platform in parallel through multiple transmission pipelines, wherein the number of multiple transmission pipelines matches the number of data export fields. In the above manner, the present application can improve the speed of data docking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a data docking method, a database, a system and a computer-readable storage medium. Background Art

[0002] There are many demands on current Internet products. Different business demands are different, and different business data is stored in different databases. When a business needs to refer to data in other databases, data consumption is required, and different databases are used to query, enter or import / export data. However, the current data docking solutions have weak data processing capabilities. Summary of the invention

[0003] The present application provides a data docking method, a database, a system and a computer-readable storage medium, which can improve the speed of data docking.

[0004] To solve the above technical problems, the technical solution adopted in the present application is: to provide a data docking method based on a large-scale parallel database, which is applied to a large-scale parallel database, and the method includes: creating multiple transmission pipelines; importing the data export fields in the large-scale parallel database into the corresponding transmission pipelines in parallel, so as to import the data docking fields into the data docking platform through the corresponding transmission pipelines; or receiving the data export fields in the data docking platform in parallel through multiple transmission pipelines, wherein the number of multiple transmission pipelines matches the number of data export fields.

[0005] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a large-scale parallel database, which includes a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the data docking method based on the large-scale parallel database in the above technical solution.

[0006] To solve the above-mentioned technical problems, another technical solution adopted in the present application is: to provide a data docking system, which includes a large-scale parallel database and a data docking platform that are connected to each other, and the large-scale parallel database is used to send data to the data docking platform or receive data sent by the data docking platform, wherein the large-scale parallel database is a large-scale parallel database based on the large-scale parallel database of the above-mentioned technical solution.

[0007] To solve the above technical problems, another technical solution adopted in the present application is: to provide a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the data docking method based on a large-scale parallel database in the above technical solution.

[0008] Through the above scheme, the beneficial effects of the present application are: first, multiple transmission pipelines are constructed through external table technology, each transmission pipeline serves as a data transmission channel connecting a large-scale parallel database and a data docking platform, and then the large-scale parallel database can import its stored data into the data docking platform through each transmission pipeline, or the large-scale parallel database can receive the data exported by the data docking platform through each transmission pipeline; since multiple transmission pipelines are used to transmit the exported data in parallel, more data can be transmitted at the same time, which can greatly improve the consumption capacity of data docking, increase the speed of data docking, and shorten the time spent on data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0010] Figure 1 It is a flow chart of an embodiment of a data docking method based on a large-scale parallel database provided by the present application;

[0011] Figure 2 It is a flowchart of another embodiment of the data docking method based on a large-scale parallel database provided by the present application;

[0012] Figure 3 It is a schematic diagram of the data export field provided by the present application being transmitted to the transmission pipeline;

[0013] Figure 4 It is a schematic diagram of the export process and import process provided by this application;

[0014] Figure 5 It is a structural diagram of an embodiment of a large-scale parallel database provided by the present application;

[0015] Figure 6 It is a structural diagram of an embodiment of a data docking system provided by the present application;

[0016] Figure 7 It is a structural schematic diagram of another embodiment of the data docking system provided by the present application;

[0017] Figure 8 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. 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 creative work are within the scope of protection of this application.

[0019] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a data docking method based on a massively parallel database provided by the present application. The method is applied to a massively parallel (Massively Parallel Processing, MPP) database. The method includes:

[0020] Step 11: Create multiple transport pipelines.

[0021] In order to perform data docking, the MPP database can create multiple transmission pipelines based on user operations (such as receiving data docking instructions input by users) to interact with the data docking platform; further, the MPP database can be used as a data import end (i.e., the end that receives data) to consume data, and can also be used as a data export end (i.e., the end that sends data) to produce data; similarly, the data docking platform (i.e., the third-party platform) can be used as a data import end to consume data, and can also be used as a data export end to produce data, to achieve data transmission between the MPP database and the data docking platform. The data docking platform can be a message middleware (Message Queue, MQ), KAFKA or Elasticsearch (ES), and the MPP database can also be replaced with a Greenplum database (GPDB), that is, to achieve data interaction between the GPDB database and MQ, KAFKA or ES.

[0022] Step 12: Import the data export fields in the MPP database into the corresponding transmission pipeline in parallel, so as to import the data docking fields into the data docking platform through the corresponding transmission pipeline; or receive the data export fields in the data docking platform in parallel through multiple transmission pipelines.

[0023] When the MPP database is the data export end and the data docking platform is the data import end, the MPP database can use the constructed multiple transmission pipelines to send the data to be transmitted (i.e., data export fields), and the number of multiple transmission pipelines matches the number of data export fields. Each transmission pipeline can transmit one data export field, and can transmit multiple data export fields to the data docking platform through corresponding transmission pipelines in parallel, thereby realizing the transmission of data in the MPP database to the data docking platform; when the MPP database is the data import end, the data docking platform is the data export end, and the data docking platform is responsible for outputting multiple data export fields. The multiple data export fields output by the data docking platform enter the MPP database through corresponding transmission pipelines, thereby realizing the transmission of data in the data docking platform to the MPP database.

[0024] This embodiment provides a data docking method, which adopts pipeline technology and multi-threading technology to construct multiple transmission pipelines as data transmission channels connecting the data import end and the data export end. The multiple transmission pipelines can be used to transmit the data exported by the data export end in parallel, which greatly improves the consumption capacity of data docking and increases the speed of data docking.

[0025] See also Figure 2 , Figure 2 : is a flow chart of another embodiment of a data docking method based on an MPP database provided by the present application. The method is applied to an MPP database. The method includes:

[0026] Step 21: Obtain first relevant information of the data export end and second relevant information of the data import end.

[0027] The MPP database obtains information related to the data export end (i.e., the first relevant information) and information related to the data import end (i.e., the second relevant information). The first relevant information includes the type of the data export end, the connection information of the data export end, the data export filter conditions, the data export table or the data export format. The second relevant information includes the type of the data import end, the connection information of the data import end or the data import table.

[0028] Step 22: Determine the number of multiple transmission pipelines using the first relevant information and the second relevant information.

[0029] After obtaining the first relevant information and the second relevant information, the first relevant information and the second relevant information can be analyzed to obtain the maximum concurrency of the data export end and the maximum concurrency of the data import end; then the maximum concurrency of the data export end, the maximum concurrency of the data import end and the preset maximum concurrency are used to determine the current maximum concurrency. Specifically, the preset maximum concurrency can be the maximum concurrency set in the work pool, and the current maximum concurrency is the minimum value among the maximum concurrency of the data export end, the maximum concurrency of the data import end and the preset maximum concurrency; then the current maximum concurrency is used as the number of multiple transmission pipelines.

[0030] Step 23: Create multiple transport pipelines.

[0031] Step 23 is the same as step 11 and will not be described again here.

[0032] Step 24: Import the data export fields in the MPP database into the corresponding transmission pipeline in parallel, so as to import the data docking fields into the data docking platform through the corresponding transmission pipeline; or receive the data export fields in the data docking platform in parallel through multiple transmission pipelines.

[0033] The number of the multiple transmission channels is the same as the number of the multiple data export fields, and the transmission channels correspond to the data export fields one by one. For example, Figure 3 As shown, assuming that the total number of multiple data export fields is N, the multiple data export fields are respectively recorded as Segment1-SegmentN, and the multiple transmission pipelines are respectively recorded as Pipe1-PipeN, then the data export field Segment1 is transmitted through the transmission pipeline Pipe1, the data export field Segment2 is transmitted through the transmission pipeline Pipe2, and so on, the data export field SegmentN is transmitted through the transmission pipeline PipeN. Furthermore, multiple threads can be set to handle data docking tasks, such as Figure 4 As shown, the number of import processes and export processes is N. Export process 1 corresponds to import process 1 to transmit data export field Segment1; export process 2 corresponds to import process 2 to transmit data export field Segment2, and so on. Export process N corresponds to import process N to transmit data export field SegmentN.

[0034] In order to achieve selective data export instead of full data export, the MPP database can obtain pre-set data export filtering conditions, and then use the data export filtering conditions to filter the data export table to obtain a target export table, which includes multiple data export fields, that is, the fields in the target export table are part of the fields in the data export table; for example, assuming that the MPP database is the data export end, the MPP database stores a data export table, which is as follows:

[0035] age height gender A1 B1 C1 A2 B2 C2 A3 B3 C3

[0036] The data export filtering conditions are age and gender, and the target export table exported from the MPP database is as follows:

[0037] age gender A1 C1 A2 C2 A3 C3

[0038] In a specific embodiment, the data export end is an MPP database, and the data import end is a data docking platform. A first external table can be created based on the data export field, and the data export field can be inserted into the first external table; then each data export field in the first external table is imported into the corresponding transmission pipeline in parallel, and then the data export field in the transmission pipeline is transmitted to the data docking platform through each transmission pipeline.

[0039] In another specific embodiment, the data export end is a data docking platform, and the data import end is an MPP database. The data import field can be obtained and a second external table can be created using the data import field; the data export field in each transmission pipeline is inserted into the second external table; and then the data export field in the second external table is inserted into the data import table to realize the import of the data export field in the data docking platform into the MPP database.

[0040] In another specific embodiment, the MPP database is provided with a format conversion plug-in, and the MPP database can determine whether the format of the data export field is the same as the preset format, which is the format required by the data import end; if the format of the data export field is different from the preset format, the format conversion plug-in is called to perform format conversion on the data export field to convert the format of the data export field into the preset format to meet the needs of flexible docking of different data formats.

[0041] In other specific embodiments, after completing the data docking task, multiple transmission pipelines and the first external table / second external table can be cleaned up; it can also be determined whether the number of fields exported from the data export end is the same as the number of fields received at the data import end; if the number of fields exported from the data export end is different from the number of fields received at the data import end, it indicates that an abnormality has occurred in this docking, and the amount of data received by the data import end is different from the amount of data sent by the data export end. At this time, the docking abnormality can be displayed to remind the staff to perform maintenance in time; if the number of fields exported from the data export end is the same as the number of fields received by the data import end, it indicates that the amount of data transmitted in this data docking is consistent, and the conditions for executing the data docking task again are met.

[0042] The solution adopted in this embodiment can connect to multiple platforms for data processing, broaden the application scenarios of data connection; realize the import / export of distributed connection data, and the actual concurrency number is controllable, and can adaptively adjust the number of data fields transmitted at one time based on different data connection platforms, thereby improving the efficiency of data transmission; and can specify the data import and export format, use the import and export data format processing technology to convert the data fields, and flexibly connect to different data formats; in addition, the import and export data can be filtered to meet different application requirements.

[0043] See also Figure 5 , Figure 5 It is a structural diagram of an embodiment of an MPP database provided in the present application. The MPP database 50 includes a memory 51 and a processor 52 connected to each other. The memory 51 is used to store a computer program. When the computer program is executed by the processor 52, it is used to implement the data docking method in the above embodiment.

[0044] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of a data docking system provided in the present application. The data docking system 60 includes an MPP database 61 and a data docking platform 62 that are interconnected. The MPP database 61 is used to send data to the data docking platform 62 or receive data sent by the data docking platform 62, wherein the MPP database 61 is the MPP database in the above embodiment.

[0045] This embodiment provides a data processing system for docking multiple platforms based on the MPP architecture, which can greatly improve the consumption capacity of data docking based on the external table technology, pipeline technology and multi-threading technology of GPDB.

[0046] See also Figure 7 , Figure 7 It is a structural diagram of another embodiment of the data docking system provided by the present application. The data docking system 70 includes an MPP database 71 and a data docking platform 72 that are interconnected. The MPP database 71 includes a parameter configuration module 711, a management and control module 712, and an import and export data format module 713.

[0047] In order to determine the relevant information of the data export end and the data import end (not shown in the figure), the parameter configuration module 711 can be used to perform parameter configuration to generate corresponding configuration information. The configuration of the data export end includes the type of the data export end, the connection information of the data export end, adding data export filter conditions, specifying the data export table or specifying the data export format; the configuration of the data import end includes the type of the data export end, the connection information of the data export end or specifying the data import table. The connection information of the data export end and the connection information of the data import end can be the address, port or information of the connected database.

[0048] The management and control module 712 is connected to the parameter configuration module 711, which is used to parse the parameter configuration, analyze the maximum concurrency that the data export end can support, the maximum concurrency that the data import end can support, and the maximum concurrency set in the work pool (not shown in the figure), so as to determine the most reasonable maximum concurrency at the moment (recorded as the current maximum concurrency).

[0049] The control module 712 can also create a transmission pipeline 714 according to the current maximum concurrency number, start a parallel file service component (such as gpfdist) for the created external table to use, and can create external tables based on gpfdist for different purposes according to the configuration information.

[0050] The control module 712 may also send concurrent tasks of the import end to the data import end, and send concurrent tasks of the export end to the data export end, so as to notify the data import end and the data export end to prepare for data docking. After receiving the concurrent tasks of the import end, the data import end may send the first status information to the control module 712 to notify the control module 712 that it is ready for data docking; after receiving the concurrent tasks of the export end, the data export end may send the second status information to the control module 712 to notify the control module 712 that it is ready for data docking; it can be understood that the status information (including the first status information and the second status information) may also be information such as exiting data docking or completing docking.

[0051] Furthermore, the data import end and the data export end are connected by a transmission pipeline 714. The management and control module 712 creates the connected transmission pipeline 714 while issuing tasks. When the data import end is ready to consume data, the management and control module 712 notifies the data export end to export data, and the data is transmitted to the data import end through the transmission pipeline 714 for data consumption.

[0052] After the data export end is started, it can send a prepared status to the management and control module 712. After the management and control module 712 sends the information that the data import end is ready, the data export end can export the data and send the stream data to the transmission pipeline 714 according to the configuration information for consumption by the data import end.

[0053] Further, if the MPP database 71 is used as a data export end, it can create a first external table according to the specified data export field, and the data export field is of the same type as the data export table; when the data docking task is started, the MPP database 71 executes the data export task, queries the data in the data export table and inserts it into the first external table, and then exports the data in the first external table to the created transmission pipeline 714; after completing the task, an end status can be sent to the management and control module 712 to close the MPP database 71 connection; taking the GPDB database as an example, since the GPDB database is distributed, the process of querying the data export table to the first external table is executed on the distributed slave nodes, and does not need to be aggregated and processed by the master node, and can be processed directly on each slave node. It can be understood that the data docking platform can consume the stream data in the transmission pipeline 714 according to the data import process.

[0054] After the management and control module 712 issues the data docking task, the data import end docks with the transmission pipeline 714 and sends the prepared status to the management and control module 712 to inform the data import end that it is ready to consume. The management and control module 712 can inform the data export end to start executing the data docking task. When the streaming data is sent to the transmission pipeline 714, the data import end continuously consumes the data to import the data into the data storage system.

[0055] Furthermore, if the MPP database 71 is used as the data import end, a second external table can be created according to the specified import field, and the specified import field and the data import table type are the same; when the data docking task is started, the MPP database 71 queries the data of the transmission pipeline 714 corresponding to the second external table and inserts it into the data import table. Similar to data export, this operation is also performed on the slave node. There is no need to aggregate the data on the master node and then send it to the slave node. It can be processed directly on each slave node to improve the processing speed. It can be understood that the data docking platform only needs to efficiently import the data into the transmission pipeline 714 according to the data export process.

[0056] In another embodiment, the data types to be exported and imported can be specified, and combined with source code writing, the data import and export formats can be specified in the MPP database 71. When in use, the import and export data format module 713 can directly import and export the corresponding format according to the specified data format. Specifically, it can be directly installed in the GPDB database in a plug-in manner to perform format conversion.

[0057] In other embodiments, the management and control module 712 may also clean up the transmission pipeline 714, tasks and external tables (including the first external table or the second external table) after the data docking task is completed; the management and control module 712 is also responsible for exception handling and monitoring whether there are abnormal phenomena so as to handle abnormal situations in a timely manner.

[0058] The MPP database provided in this embodiment can be connected to multiple platforms, and all platforms that adapt to the overall system can be added as data docking platforms for the MPP database; the MPP database uses external table technology to sink data to the slave node for data import and export, and there is no need to aggregate data through the master node; in addition, there is no need to perform format conversion in the program, and the format conversion plug-in is added to the GPDB database through database plug-in technology, which improves the rate of data import and export; in addition, the imported and exported data can be filtered, and the filtering conditions can be configured when the full data export is not required to export the required data, and the required data can be exported, which is flexible and meets different application requirements.

[0059] See also Figure 8 , Figure 8 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 80 is used to store a computer program 81. When the computer program 81 is executed by the processor, it is used to implement the data docking method based on the MPP database in the above embodiment.

[0060] The computer-readable storage medium 80 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other media that can store program codes.

[0061] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0062] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0063] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0064] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data docking method based on a large-scale parallel database, It is characterized in that Applied to a large-scale parallel database, the method comprises: Create multiple transport pipelines; The massively parallel database serves as a data export end, and the data docking platform serves as a data import end. Each distributed slave node corresponding to the massively parallel database creates a first external table based on the data export field, and inserts the data export field into the first external table; and imports the data export field in the first external table into the corresponding transmission pipeline in parallel, so as to import the data export field into the data docking platform through the corresponding transmission pipeline; The method further comprises: The large-scale parallel database serves as a data import end, and the data docking platform serves as a data export end. Each distributed slave node corresponding to the large-scale parallel database obtains a data import field, and uses the data import field to create a second external table; the data export field in the data docking platform is received in parallel through the multiple transmission pipelines, and the data export field in each transmission pipeline is inserted into the second external table; the data export field in the second external table is inserted into the data import table; wherein the number of the multiple transmission pipelines matches the number of the data export fields, and each transmission pipeline transmits one data export field correspondingly; Among them, the large-scale parallel database is provided with a format conversion plug-in, and the method also includes: determining whether the format of the data export field is the same as a preset format; if not, calling the format conversion plug-in to perform format conversion on the data export field to convert the format of the data export field into the preset format.

2. The data docking method based on a large-scale parallel database according to claim 1, It is characterized in that Before the step of creating multiple transmission pipelines, the method includes: Acquire first relevant information of a data export end and second relevant information of a data import end, wherein the first relevant information includes the type of the data export end, connection information of the data export end, data export filtering conditions, a data export table or a data export format, and the second relevant information includes the type of the data import end, connection information of the data import end or a data import table; The number of the plurality of transmission pipelines is determined using the first relevant information and the second relevant information.

3. The data docking method based on a large-scale parallel database according to claim 2, It is characterized in that The step of determining the number of the plurality of transmission pipelines by using the first relevant information and the second relevant information comprises: Parse the first relevant information and the second relevant information to obtain the maximum concurrent number of the data export end and the maximum concurrent number of the data import end; Determine the current maximum concurrency number by using the maximum concurrency number of the data export end, the maximum concurrency number of the data import end, and the preset maximum concurrency number; The current maximum concurrent number is used as the number of the multiple transmission pipelines.

4. The data docking method based on a large-scale parallel database according to claim 2, It is characterized in that The first relevant information includes a data export filtering condition and a data export table; The method further comprises: The data export filtering condition is obtained, and the data export table is screened using the data export filtering condition to obtain a target export table, wherein the target export table includes a plurality of the data export fields.

5. The data docking method based on a large-scale parallel database according to claim 1, It is characterized in that The method further comprises: After completing the data docking task, the multiple transmission pipelines and the first external table / the second external table are cleaned up; Determining whether the number of fields exported from the data export end is the same as the number of fields received from the data import end; If not, it will show that the connection is abnormal.

6. A massively parallel database, It is characterized in that It comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the data docking method according to any one of claims 1 to 5.

7. A data docking system, It is characterized in that It comprises a large-scale parallel database and a data docking platform that are connected to each other, wherein the large-scale parallel database is used to send data to the data docking platform or receive data sent by the data docking platform, wherein the large-scale parallel database is the large-scale parallel database described in claim 6.

8. A computer-readable storage medium for storing a computer program, It is characterized in that When the computer program is executed by a processor, it is used to implement the data docking method based on a large-scale parallel database according to any one of claims 1 to 5.