A data sharing method and device for multi-source heterogeneous data, a storage medium and a terminal
By pre-setting a multi-source heterogeneous data conversion model, receiving and processing data sharing requests, the problem of data sharing between heterogeneous databases is solved, achieving rapid conversion and efficient sharing, and improving compatibility between system terminals.
Patent Information
- Application Number
- CN202310323884.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-03-29
AI Technical Summary
The lack of data sharing methods between heterogeneous databases from different vendors makes data sharing difficult, especially in the case of multi-source, heterogeneous, and massive data, where efficient sharing is difficult to achieve.
By pre-setting a multi-source heterogeneous data conversion model, receiving data sharing requests, determining the source end, constructing a multi-source heterogeneous data conversion model for the target end, querying and processing the data to be converted in the target database, and finally sharing the response data to the target end.
It improves data compatibility between different system endpoints, quickly converts source data into target data, and solves the problem of data sharing between heterogeneous databases.
Smart Images

Figure CN116467274B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, storage medium, and terminal for sharing multi-source heterogeneous data. Background Technology
[0002] Currently, heterogeneous databases are widely used in enterprise application systems. These heterogeneous databases often differ significantly, such as in data storage structure, data type, and data representation method, which greatly hinders data sharing between databases. Furthermore, the rapid development of information technology infrastructure has led to a massive increase in the amount of data that needs to be shared, resulting in data sharing being characterized by multiple sources, heterogeneity, and sheer volume.
[0003] In the existing technology, database software vendors provide data sharing methods between their own products. For example, Microsoft's SQL Server, Excel and Access can use DTS, and Oracle can use materialized views, DBLink and other technologies. However, there is no corresponding data sharing method between products from different vendors.
[0004] Therefore, how to achieve online data sharing between heterogeneous databases from different vendors has become a pressing problem that needs to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and terminal for sharing multi-source heterogeneous data. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general description, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.
[0006] In a first aspect, embodiments of this application provide a data sharing method for multi-source heterogeneous data, the method comprising:
[0007] Receive a data sharing request from the target end, and determine the source end based on the data sharing request;
[0008] When the first database type at the source end is inconsistent with the second database type at the target end, obtain the multi-source heterogeneous data conversion model built for the target end;
[0009] Based on the data sharing request, query the data to be converted in the second database;
[0010] The multi-source heterogeneous data conversion model processes the data to be converted to obtain response data and shares the response data with the target end.
[0011] Optionally, the source can be determined based on the data sharing request, including:
[0012] Parse the data sharing request to obtain multiple target request parameters;
[0013] Multiple target request parameters are entered one by one into a pre-set sliding window until the target database identifier corresponding to the data sharing request is output; among them...
[0014] Multiple heterogeneous database identifiers are pre-bound to a pre-defined sliding window. The pre-defined sliding window is used to map the corresponding database identifier according to the input target request parameters.
[0015] The source is determined based on the target database identifier.
[0016] Optionally, the method also includes:
[0017] If the first database type on the source end is consistent with the second database type on the target end, data is queried in the second database according to the data sharing request, and the queried data is shared to the target end.
[0018] Optionally, before receiving a data sharing request from the target end, the following steps are also included:
[0019] Iterate through all system endpoints and their identifiers in the current business process;
[0020] Receive multiple heterogeneous database identifiers for each end identifier input;
[0021] For each heterogeneous database identifier, set data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules to obtain a set of multi-source heterogeneous data conversion models for each endpoint identifier;
[0022] Establish a mapping relationship between each endpoint identifier and its set of multi-source heterogeneous data conversion models to obtain the pre-constructed mapping relationship between endpoint identifiers and the set of multi-source heterogeneous data conversion models.
[0023] Optionally, obtain the multi-source heterogeneous data transformation model built for the target end, including:
[0024] Obtain the set of multi-source heterogeneous data transformation models for the target end from the mapping relationship;
[0025] Identify the heterogeneous database identifier for the second database type;
[0026] Obtain the multi-source heterogeneous data conversion model of the second database type from the multi-source heterogeneous data conversion model set at the target end.
[0027] Optionally, based on the data sharing request, query the data to be transformed in the second database, including:
[0028] Generate data query parameters based on the data sharing request;
[0029] Construct a data query statement based on the data query parameters;
[0030] Send the data query statement to the preset data query engine to retrieve the data to be transformed from the second database.
[0031] Optionally, the data to be transformed is processed based on a multi-source heterogeneous data transformation model to obtain response data, including:
[0032] Extract the target script expressions for data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules in the multi-source heterogeneous data conversion model;
[0033] The target script expression is associated with the data to be converted, and the associated script expression is executed to obtain the response data.
[0034] Secondly, embodiments of this application provide a data sharing device for multi-source heterogeneous data, the device comprising:
[0035] The source determination module is used to receive data sharing requests from the target end and determine the source end based on the data sharing requests.
[0036] The model acquisition module is used to acquire a multi-source heterogeneous data transformation model built for the target end when the first database type on the source end is inconsistent with the second database type on the target end.
[0037] The data query module is used to query the data to be converted in the second database based on the data sharing request;
[0038] The data response module is used to process the data to be transformed based on a multi-source heterogeneous data transformation model, obtain response data, and share the response data to the target end.
[0039] Thirdly, embodiments of this application provide a computer storage medium storing multiple instructions adapted for loading and execution of the above-described method steps by a processor.
[0040] Fourthly, embodiments of this application provide a terminal that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed by the above-described method steps.
[0041] The technical solutions provided in this application embodiment may include the following beneficial effects:
[0042] In this embodiment, the data sharing device for multi-source heterogeneous data first receives a data sharing request from the target end, determines the source end based on the data sharing request, and then, if the first database type of the source end is inconsistent with the second database type of the target end, obtains a multi-source heterogeneous data conversion model constructed for the target end. Next, it queries the second database for data to be converted according to the data sharing request, and finally processes the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, and shares the response data to the target end. Because this application pre-sets a multi-source heterogeneous data conversion model, even if the first database type of the source end is inconsistent with the second database type of the target end, the data from the source end can be quickly converted into data usable by the target end through this model, thereby realizing the sharing of multi-source heterogeneous data and improving compatibility between different system ends.
[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0045] Figure 1 This is a flowchart illustrating a data sharing method for multi-source heterogeneous data provided in an embodiment of this application;
[0046] Figure 2 This is a schematic diagram of heterogeneous database interaction provided in an embodiment of this application;
[0047] Figure 3 This is a schematic diagram of the structure of a data sharing device for multi-source heterogeneous data provided in an embodiment of this application;
[0048] Figure 4 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation
[0049] The following description and accompanying drawings fully illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
[0050] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0051] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0052] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances. Furthermore, in the description of this invention, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0053] This application provides a method, apparatus, storage medium, and terminal for sharing multi-source heterogeneous data to solve the problems existing in the aforementioned related technologies. In the technical solution provided by this application, because a multi-source heterogeneous data conversion model is pre-set, when the first database type at the source end and the second database type at the target end are inconsistent, the data at the source end can be quickly converted into usable data at the target end through this model, thereby realizing the sharing of multi-source heterogeneous data and improving compatibility between different system ends. The following detailed description uses exemplary embodiments.
[0054] The following will be combined with the appendix Figure 1 - Appendix Figure 2 This application provides a detailed description of a data sharing method for multi-source heterogeneous data provided in its embodiments. This method can be implemented using a computer program and can run on a data sharing device for multi-source heterogeneous data based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application.
[0055] Please see Figure 1 This is a flowchart illustrating a method for sharing multi-source heterogeneous data, as provided in an embodiment of this application. Figure 1 As shown, the method in this application embodiment may include the following steps:
[0056] S101, Receive a data sharing request from the target end, and determine the source end based on the data sharing request;
[0057] The target end can be any subsystem connected to the data server. In this application, the data server can be abstracted as a direct route, and each subsystem connected to this route can interact with multi-source heterogeneous databases. For example... Figure 2 As shown, the current end-to-end links form a complex mesh structure, which is very fragmented and makes it impossible to abstract the core synchronization logic. The concept of the data express in this application is to act as a core synchronization carrier connecting various data sources. When each subsystem needs data synchronization, it only needs to be connected to the data express as a plug-in, thereby transforming the complex mesh structure into a star topology. The source end is a heterogeneous database.
[0058] In this embodiment of the application, when determining the source based on the data sharing request, the data sharing request is first parsed to obtain multiple target request parameters. Then, the multiple target request parameters are input one by one into a pre-set sliding window until the target database identifier corresponding to the data sharing request is output. The pre-set sliding window is pre-bound with multiple heterogeneous database identifiers. The pre-set sliding window is used to map the corresponding database identifier according to the input target request parameters. Finally, the source is determined based on the target database identifier.
[0059] In one possible implementation, the data express first receives a data sharing request from a subsystem, and then identifies the source by parsing the database identifier in the data sharing request.
[0060] Furthermore, before receiving data sharing requests from the target end, it is necessary to generate a pre-built mapping relationship between end identifiers and a set of multi-source heterogeneous data conversion models. First, it iterates through multiple end identifiers of all system ends existing in the current business. Then, it receives multiple heterogeneous database identifiers as input for each end identifier. Next, it sets data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules for each heterogeneous database identifier to obtain a set of multi-source heterogeneous data conversion models for each end identifier. Finally, it establishes a mapping relationship between each end identifier and its set of multi-source heterogeneous data conversion models to obtain the pre-built mapping relationship between end identifiers and the set of multi-source heterogeneous data conversion models.
[0061] S102, when the first database type of the source end is inconsistent with the second database type of the target end, obtain the multi-source heterogeneous data conversion model constructed for the target end;
[0062] In this embodiment of the application, when the first database type at the source end is inconsistent with the second database type at the target end, the multi-source heterogeneous data conversion model set at the target end is first obtained from the mapping relationship, then the heterogeneous database identifier of the second database type is determined, and finally the multi-source heterogeneous data conversion model of the second database type is obtained from the multi-source heterogeneous data conversion model set at the target end.
[0063] Furthermore, if the first database type at the source end is consistent with the second database type at the target end, data is queried in the second database according to the data sharing request, and the queried data is shared to the target end.
[0064] S103, query the data to be converted in the second database according to the data sharing request;
[0065] In this embodiment of the application, when querying the data to be converted in the second database according to the data sharing request, data query parameters are first generated according to the data sharing request, then a data query statement is constructed based on the data query parameters, and finally the data query statement is sent to the preset data query engine to query the data to be converted in the second database.
[0066] S104, based on the multi-source heterogeneous data conversion model, processes the data to be converted to obtain response data, and shares the response data to the target end.
[0067] In this embodiment of the application, when processing the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, the target script expressions of the data version conversion rules, field name processing rules, entity table conversion rules and data type conversion rules in the multi-source heterogeneous data conversion model are first extracted. Then, the target script expressions are associated with the data to be converted, and the associated script expressions are executed to obtain response data.
[0068] Furthermore, after obtaining the response data, the response data can be shared with the target end.
[0069] It should be noted that the data server in this application provides functions for creating and managing data exchange tasks. The purpose is to meet the data transmission and management needs between existing homogeneous or heterogeneous data sources in a task bus-like manner. By abstracting the data sources involved in data exchange, data source connections can be updated and modified at any time. The execution flow of data exchange tasks is also broken down into several parts, allowing for finer-grained management of tasks, rapid data transfer across different computing and storage systems, and resolving issues such as long serialization and deserialization times, transmission rate limiting, data read / write permission control, and component version compatibility encountered during data sharing.
[0070] This application also provides a stable and secure data transmission and exchange channel, a unified standard data exchange protocol, a platform management tool for data in different network environments, and a user-level product to solve the problems that data usually corresponds to different data owners and user permissions and the uncontrollable data exchange between different users.
[0071] In this embodiment, the data sharing device for multi-source heterogeneous data first receives a data sharing request from the target end, determines the source end based on the data sharing request, and then, if the first database type of the source end is inconsistent with the second database type of the target end, obtains a multi-source heterogeneous data conversion model constructed for the target end. Next, it queries the second database for data to be converted according to the data sharing request, and finally processes the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, and shares the response data to the target end. Because this application pre-sets a multi-source heterogeneous data conversion model, even if the first database type of the source end is inconsistent with the second database type of the target end, the data from the source end can be quickly converted into data usable by the target end through this model, thereby realizing the sharing of multi-source heterogeneous data and improving compatibility between different system ends.
[0072] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention.
[0073] Please see Figure 3 This diagram illustrates the structure of a data sharing device for multi-source heterogeneous data provided in an exemplary embodiment of the present invention. This data sharing device for multi-source heterogeneous data can be implemented as all or part of a terminal through software, hardware, or a combination of both. The device 1 includes a source determination module 10, a model acquisition module 20, a data query module 30, and a data response module 40.
[0074] Source determination module 10 is used to receive a data sharing request from the target end and determine the source end based on the data sharing request.
[0075] The model acquisition module 20 is used to acquire a multi-source heterogeneous data conversion model built for the target end when the first database type at the source end is inconsistent with the second database type at the target end.
[0076] Data query module 30 is used to query the data to be converted in the second database according to the data sharing request;
[0077] The data response module 40 is used to process the data to be converted based on the multi-source heterogeneous data conversion model, obtain response data, and share the response data to the target end.
[0078] It should be noted that the data sharing device for multi-source heterogeneous data provided in the above embodiments is only illustrated by the division of the above functional modules when executing the data sharing method for multi-source heterogeneous data. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the data sharing device for multi-source heterogeneous data provided in the above embodiments and the data sharing method embodiments for multi-source heterogeneous data belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0079] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0080] In this embodiment, the data sharing device for multi-source heterogeneous data first receives a data sharing request from the target end, determines the source end based on the data sharing request, and then, if the first database type of the source end is inconsistent with the second database type of the target end, obtains a multi-source heterogeneous data conversion model constructed for the target end. Next, it queries the second database for data to be converted according to the data sharing request, and finally processes the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, and shares the response data to the target end. Because this application pre-sets a multi-source heterogeneous data conversion model, even if the first database type of the source end is inconsistent with the second database type of the target end, the data from the source end can be quickly converted into data usable by the target end through this model, thereby realizing the sharing of multi-source heterogeneous data and improving compatibility between different system ends.
[0081] The present invention also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the data sharing method for multi-source heterogeneous data provided in the above-described method embodiments.
[0082] The present invention also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute a data sharing method for multi-source heterogeneous data in the above-described method embodiments.
[0083] Please see Figure 4 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Figure 4 As shown, terminal 1000 may include: at least one processor 1001, at least one network interface 1004, user interface 1003, memory 1005, and at least one communication bus 1002.
[0084] The communication bus 1002 is used to realize the connection and communication between these components.
[0085] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0086] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0087] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts within the electronic device 1000 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip, without being integrated into the processor 1001.
[0088] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 4 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a data sharing application for multi-source heterogeneous data.
[0089] exist Figure 4 In the terminal 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and to obtain the user's input data; while the processor 1001 can be used to call the data sharing application of multi-source heterogeneous data stored in the memory 1005, and specifically perform the following operations:
[0090] Receive a data sharing request from the target end, and determine the source end based on the data sharing request;
[0091] When the first database type at the source end is inconsistent with the second database type at the target end, obtain the multi-source heterogeneous data conversion model built for the target end;
[0092] Based on the data sharing request, query the data to be converted in the second database;
[0093] The multi-source heterogeneous data conversion model processes the data to be converted to obtain response data and shares the response data with the target end.
[0094] In one embodiment, when the processor 1001 determines the source based on the data sharing request, it specifically performs the following operations:
[0095] Parse the data sharing request to obtain multiple target request parameters;
[0096] Multiple target request parameters are entered one by one into a pre-set sliding window until the target database identifier corresponding to the data sharing request is output; among them...
[0097] Multiple heterogeneous database identifiers are pre-bound to a pre-defined sliding window. The pre-defined sliding window is used to map the corresponding database identifier according to the input target request parameters.
[0098] The source is determined based on the target database identifier.
[0099] In one embodiment, the processor 1001 also performs the following operations:
[0100] If the first database type on the source end is consistent with the second database type on the target end, data is queried in the second database according to the data sharing request, and the queried data is shared to the target end.
[0101] In one embodiment, before executing the data sharing request from the target end, the processor 1001 also performs the following operations:
[0102] Iterate through all system endpoints and their identifiers in the current business process;
[0103] Receive multiple heterogeneous database identifiers for each end identifier input;
[0104] For each heterogeneous database identifier, set data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules to obtain a set of multi-source heterogeneous data conversion models for each endpoint identifier;
[0105] Establish a mapping relationship between each endpoint identifier and its set of multi-source heterogeneous data conversion models to obtain the pre-constructed mapping relationship between endpoint identifiers and the set of multi-source heterogeneous data conversion models.
[0106] In one embodiment, when the processor 1001 executes the operation of acquiring the multi-source heterogeneous data conversion model constructed for the target end, it specifically performs the following operations:
[0107] Obtain the set of multi-source heterogeneous data transformation models for the target end from the mapping relationship;
[0108] Identify the heterogeneous database identifier for the second database type;
[0109] Obtain the multi-source heterogeneous data conversion model of the second database type from the multi-source heterogeneous data conversion model set at the target end.
[0110] In one embodiment, when the processor 1001 queries the data to be converted in the second database according to the data sharing request, it specifically performs the following operations:
[0111] Generate data query parameters based on the data sharing request;
[0112] Construct a data query statement based on the data query parameters;
[0113] Send the data query statement to the preset data query engine to retrieve the data to be transformed from the second database.
[0114] In one embodiment, when the processor 1001 processes the data to be converted based on a multi-source heterogeneous data conversion model to obtain response data, it specifically performs the following operations:
[0115] Extract the target script expressions for data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules in the multi-source heterogeneous data conversion model;
[0116] The target script expression is associated with the data to be converted, and the associated script expression is executed to obtain the response data.
[0117] In this embodiment, the data sharing device for multi-source heterogeneous data first receives a data sharing request from the target end, determines the source end based on the data sharing request, and then, if the first database type of the source end is inconsistent with the second database type of the target end, obtains a multi-source heterogeneous data conversion model constructed for the target end. Next, it queries the second database for data to be converted according to the data sharing request, and finally processes the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, and shares the response data to the target end. Because this application pre-sets a multi-source heterogeneous data conversion model, even if the first database type of the source end is inconsistent with the second database type of the target end, the data from the source end can be quickly converted into data usable by the target end through this model, thereby realizing the sharing of multi-source heterogeneous data and improving compatibility between different system ends.
[0118] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The data sharing program for multi-source heterogeneous data can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium for the data sharing program for multi-source heterogeneous data can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0119] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for sharing multi-source heterogeneous data, characterized in that, The method includes: Iterate through all system endpoints and multiple endpoint identifiers existing in the current business; receive multiple heterogeneous database identifiers input for each endpoint identifier; set data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules for each heterogeneous database identifier to obtain a set of multi-source heterogeneous data conversion models for each endpoint identifier; establish a mapping relationship between each endpoint identifier and its set of multi-source heterogeneous data conversion models to obtain a pre-constructed mapping relationship between endpoint identifiers and sets of multi-source heterogeneous data conversion models. Receive a data sharing request from the target end, and determine the source end based on the data sharing request; the target end is any subsystem connected to the data server, and each subsystem can interact with multi-source heterogeneous databases; When the first database type at the source end is inconsistent with the second database type at the target end, obtaining a multi-source heterogeneous data conversion model constructed for the target end includes: obtaining a set of multi-source heterogeneous data conversion models for the target end from the mapping relationship; determining the heterogeneous database identifier of the second database type; and obtaining the multi-source heterogeneous data conversion model of the second database type from the set of multi-source heterogeneous data conversion models for the target end. Query the data to be converted in the second database according to the data sharing request; The process of processing the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, and sharing the response data to the target end, includes: extracting the target script expressions for the data version conversion rules, field name processing rules, entity table conversion rules, and data type conversion rules in the multi-source heterogeneous data conversion model; associating the target script expressions with the data to be converted, and executing the associated script expressions to obtain response data.
2. The method according to claim 1, characterized in that, The step of determining the source end based on the data sharing request includes: The data sharing request is parsed to obtain multiple target request parameters; The multiple target request parameters are input one by one into a pre-set sliding window until the target database identifier corresponding to the data sharing request is output; wherein... The pre-set sliding window is pre-bound with multiple heterogeneous database identifiers. The pre-set sliding window is used to map the corresponding database identifier according to the input target request parameters. The source is determined based on the target database identifier.
3. The method according to claim 1, characterized in that, The method further includes: If the first database type at the source end is consistent with the second database type at the target end, data is queried in the second database according to the data sharing request, and the queried data is shared to the target end.
4. The method according to claim 1, characterized in that, The step of querying the data to be converted in the second database according to the data sharing request includes: Generate data query parameters based on the data sharing request; Construct a data query statement based on the data query parameters; The data query statement is sent to a preset data query engine to retrieve the data to be converted from the second database.
5. A data sharing device for multi-source heterogeneous data implemented using the method according to any one of claims 1-4, characterized in that, The device includes: The source determination module is used to receive a data sharing request from the target end and determine the source end based on the data sharing request. The model acquisition module is used to acquire a multi-source heterogeneous data conversion model constructed for the target end when the first database type at the source end is inconsistent with the second database type at the target end. The data query module is used to query the data to be converted in the second database according to the data sharing request; The data response module is used to process the data to be converted based on the multi-source heterogeneous data conversion model to obtain response data, and to share the response data to the target terminal.
6. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the method as described in any one of claims 1-4.
7. A terminal, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1-4.
Citation Information
Patent Citations
HBase-based heterogeneous database online exchange and sharing system in big data environment
CN107045534A
Heterogeneous database data synchronous analysis method
CN114490882A
