Cross-data source service implementation method and device, and electronic device

By encapsulating and registering multiple data sources as atomic services, unified business controls are provided, which solves the problem of inconsistent interfaces and high requirements for business personnel when acquiring data across data sources, and realizes the unified data acquisition and the reduction of technical requirements for business personnel.

CN113742103BActive Publication Date: 2025-02-28BEIJING IQIYI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111007505.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2025-02-28
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

The interfaces are not uniform enough when acquiring data across data sources in the prior art, and have high requirements for business personnel. It is necessary to understand the underlying storage method of data in each application.

Method used

By encapsulating the access method of accessing service data from multiple data sources, multiple data access interfaces are obtained, and these access interfaces are registered as atomic services, and a unified service control is provided for user triggering to realize data acquisition across data sources.

Benefits of technology

The unified data acquisition process across data sources is realized, and the technical requirements for business personnel are reduced, so that business personnel can achieve data acquisition without understanding the underlying data acquisition process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113742103B_ABST
    Figure CN113742103B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a cross-data source service implementation method and device, and an electronic device, including: respectively encapsulating the access method for accessing business data from each data source of multiple data sources to obtain multiple data access interfaces; for multiple data access interfaces, registering each data access interface as an atomic service in a service manner to obtain multiple atomic services; displaying the business control corresponding to each atomic service, so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service. In the embodiments of the present invention, there is no need to provide the encapsulated data access interface to the business personnel, but to register it as an atomic service, and provide the business control corresponding to the atomic service to the business personnel, so that the business personnel do not need to understand the acquisition process of the underlying data, thereby reducing the requirements for the business personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data query, and in particular to a method and device for implementing a cross-data source service, and an electronic device. Background Art

[0002] Currently, most major platforms and applications on the Internet use databases to store underlying data. The development team of each platform or application uses different storage methods to store underlying data based on their own needs and styles. When a third party wants to obtain the underlying data of an application, the developer of the application usually encapsulates the data loading logic into an interface and provides the data to the third party through the interface.

[0003] However, in many cases, enterprises or companies usually have multiple applications. In some scenarios, it is necessary to obtain data from multiple applications at the same time, that is, to obtain data across data sources. For example, when the third-party personnel are business personnel, the business personnel count the download volume, playback volume, etc. of all applications of the company. Since each application operates independently of each other, different applications correspond to different data sources, that is, each application uses a different database to store data related to the application. At this time, the developers of each application can only encapsulate the interface separately based on the storage method of the data in the database of this application, and then provide the data in each application through the interface.

[0004] However, the above method not only causes the interfaces to be less unified, but also requires business personnel to understand the underlying storage method of data in each application, which places high demands on business personnel. Summary of the invention

[0005] In view of the above problems, the embodiments of the present invention provide a cross-data source service implementation method and device, and an electronic device to solve the problems in the prior art of insufficient interface uniformity and high requirements for business personnel when acquiring data across data sources.

[0006] In a first aspect of the present invention, a method for implementing a cross-data source service is provided, the method comprising:

[0007] Encapsulating the access method of accessing business data from each of the multiple data sources respectively to obtain multiple data access interfaces;

[0008] For the multiple data access interfaces, register each of the data access interfaces as an atomic service in a service manner to obtain multiple atomic services;

[0009] The business control corresponding to each of the atomic services is displayed so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among the multiple atomic services.

[0010] In a second aspect of the present invention, a cross-data source service implementation device is provided, the device comprising:

[0011] An encapsulation module, used to encapsulate the access mode of accessing business data from each of the multiple data sources to obtain multiple data access interfaces;

[0012] A registration module, for registering each of the multiple data access interfaces as an atomic service in a service manner, thereby obtaining multiple atomic services;

[0013] The first display module is used to display the business controls corresponding to each of the atomic services, so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among the multiple atomic services.

[0014] In a third aspect of the present invention, there is also provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0015] Memory, used to store computer programs;

[0016] The processor is used to implement the steps of the above-mentioned cross-data source service implementation method when executing the program stored in the memory.

[0017] In a fourth aspect of the implementation of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the cross-data source service implementation method described in the first aspect are implemented.

[0018] In a fifth aspect of the implementation of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the above-mentioned cross-data source service implementation method.

[0019] Compared with the prior art, the present invention has the following advantages:

[0020] The cross-data source service implementation method provided by the present invention can encapsulate the access method of accessing business data from each data source of multiple data sources respectively, and obtain multiple data access interfaces. Thus, access to business data from different data sources can be realized through the data access interface. For multiple data access interfaces, each data access interface is registered as an atomic service in a service manner to obtain multiple atomic services, and the access method of accessing business data from different data sources is registered as different atomic services in a service registration manner, and then the business control corresponding to each atomic service is displayed, so that when the user triggers the target business control, based on the data access interface corresponding to the target atomic service, the business data is obtained from the corresponding data source, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among the multiple atomic services. In the embodiment of the present invention, the developers of the applications corresponding to each data source do not need to encapsulate the method of obtaining data from the data source respectively, but uniformly encapsulate the access method of accessing business data from each of the multiple data sources, so that a unified data access interface can be obtained. There is no need to provide the encapsulated data access interface to business personnel. Instead, it is registered as an atomic service, and the business controls corresponding to the atomic service are provided to business personnel. Business personnel can obtain data across data sources by triggering the business controls. Business personnel do not need to understand the underlying data acquisition process, which reduces the requirements for business personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0022] Figure 1 A flowchart of the steps of a method for implementing a cross-data source service provided by an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a directed acyclic graph provided by an embodiment of the present invention;

[0024] Figure 3 An application architecture diagram of a cross-data source service implementation method provided by an embodiment of the present invention;

[0025] Figure 4 A structural block diagram of a cross-data source service implementation device provided by an embodiment of the present invention;

[0026] Figure 5 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0029] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0030] See also Figure 1 The embodiment of the present invention provides a method for implementing a cross-data source service, the method comprising:

[0031] Step 101: Encapsulate the access method for accessing business data from each of the multiple data sources to obtain multiple data access interfaces.

[0032] It should be noted that each data source corresponds to an application, and the data source serves as the data required during the operation of the corresponding application. Different data sources may correspond to different databases or different data sources may correspond to different data tables in the same database.

[0033] The access method for accessing business data from a data source can be understood as the query logic for querying data from a data source. Take an application as an example. The application includes a client and a server. The client is used to interact with users, and the server is used to interact with the client. The server stores a large amount of underlying data required by the client in the process of interacting with users. The underlying data can be understood as the data source corresponding to the application. The data source is stored in the database of the server using a preset storage method. The corresponding query logic is required to obtain data from the database. The access method is the query logic.

[0034] Step 102: For multiple data access interfaces, each data access interface is registered as an atomic service in a service manner to obtain multiple atomic services.

[0035] It should be noted that atomic services are basic service units that cannot be decomposed any further. Each atomic service can implement the business logic of querying / accessing data in a data source. Specifically, for each data source, the business logic of querying / accessing different data from the data source is registered as a different atomic service, thereby forming a large number of atomic services, and the atomic services are directly provided to third parties as exposed services. Among them, all atomic services can be registered on the same data bus to achieve unification between services. At the same time, it also facilitates data discovery and data sharing of various upper-level services.

[0036] Step 103: Display the business control corresponding to each atomic service, so that when the user triggers the target business control, the user can obtain business data from the corresponding data source based on the data access interface corresponding to the target atomic service.

[0037] It should be noted that different business controls will trigger different atomic services. Among them, the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among multiple atomic services. In other words, when a user triggers a business control, the atomic service corresponding to the triggered business control will be performed to obtain business data from the corresponding data source. It is understandable that each business control displays relevant information of its corresponding atomic service to remind the user which atomic service each business control corresponds to, so that the user can select the corresponding business control to trigger according to their needs.

[0038] In an embodiment of the present invention, the access method for accessing business data from each data source of multiple data sources can be encapsulated respectively to obtain multiple data access interfaces. Thus, access to business data from different data sources can be achieved through the data access interface. For multiple data access interfaces, each data access interface is registered as an atomic service in a service manner to obtain multiple atomic services, and the access method for accessing business data from different data sources is registered as different atomic services in a service registration manner, and then the business control corresponding to each atomic service is displayed, so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among the multiple atomic services. In the embodiment of the present invention, the developers of the applications corresponding to each data source do not need to encapsulate the method for obtaining data from the data source respectively, but uniformly encapsulate the access method for accessing business data from each data source of multiple data sources, so that a unified data access interface can be obtained. There is no need to provide the encapsulated data access interface to business personnel. Instead, it is registered as an atomic service, and the business controls corresponding to the atomic service are provided to business personnel. Business personnel can obtain data across data sources by triggering the business controls. Business personnel do not need to understand the underlying data acquisition process, which reduces the requirements for business personnel.

[0039] Optionally, for multiple data access interfaces, each data access interface is registered as an atomic service in a service manner to obtain multiple atomic services, the method further includes:

[0040] Based on multiple atomic services and preset service combination operations, the service configuration page is displayed.

[0041] It should be noted that the service configuration page displays multiple controls, including controls associated with each of the multiple atomic services and controls associated with the preset service combination operation. The user can arbitrarily combine different atomic services through the controls displayed on the service configuration page. Preferably, the preset service combination operation includes a preset relational operation, which can be a relational operation for merging such as union and join in a SQL (Structured Query Language) statement, but is not limited to this.

[0042] A configuration module is generated based on the service configuration page, and the configuration module is used to generate a configuration diagram according to the service combination operation selected by the user on the service configuration page and at least two atomic services.

[0043] It should be noted that the configuration module can be used to create operational relationships between different atomic services, thereby providing a basis for triggering multiple different atomic services at the same time. Here, the configuration diagram generated by the configuration module is associated with the user's operation on the service configuration page. It can be understood that the configuration module is completed in the development stage and is a functional module that executes the first target logic. The first target logic is to generate a configuration diagram based on the service combination operation selected by the user on the service configuration page and at least two atomic services. In this way, when business personnel query business data, they can trigger the configuration module to generate a configuration diagram by operating on the service configuration page.

[0044] A target parser is generated based on the configuration module. The target parser is used to parse the configuration diagram, obtain the service combination operation selected by the user on the service configuration page and at least two atomic services, obtain business data from the corresponding data source based on the at least two atomic services, and use the service combination operation selected by the user to operate on the obtained business data and output the operation results.

[0045] It should be noted that the target parser is completed in the development stage and is a functional module that executes the second target logic. The second target logic is to parse the configuration diagram, obtain the service combination operation selected by the user on the service configuration page and at least two atomic services, and obtain business data from the corresponding data source based on the at least two atomic services, and use the service combination operation selected by the user to calculate the obtained business data and output the calculation results. In this way, when the business personnel query the business data, they can see the calculation results output by the target parser after operating on the service configuration page.

[0046] In the embodiment of the present invention, for the needs that cannot be met by a single atomic service, a service configuration page is provided for users to freely select multiple atomic services and the combination of atomic services, thereby realizing the combination function of the data access interface, which can meet more user needs. At the same time, the original development oriented to the underlying data source is transformed into the development oriented to the business level, which can shorten the development cycle and reduce maintenance costs.

[0047] Optionally, the configuration graph is a directed acyclic graph, and the configuration graph is parsed to obtain the service combination operation selected by the user on the service configuration page and at least two atomic services, and business data is obtained from the corresponding data source based on the at least two atomic services, and the obtained business data is operated using the service combination operation selected by the user and the operation result is output, including:

[0048] Parse the directed acyclic graph to obtain the topological order of each node in the directed acyclic graph and the atomic services and service combination operations corresponding to each node.

[0049] It should be noted that a directed acyclic graph refers to a directed graph without loops. The directed acyclic graph can accurately represent the atomic services involved and the service composition operations.

[0050] According to the topological sorting of each node, business data is obtained from the corresponding data source based on the atomic service corresponding to each node;

[0051] Based on the service combination operation corresponding to each node, the acquired business data is operated and the operation results are output.

[0052] It should be noted that if Figure 2 As shown, it is a schematic diagram showing the target directed acyclic graph. After starting, query business 1 and query business 2 are executed simultaneously through the replication function. After query business 1 and query business 2 are executed, the query results are merged through union. For example, when query business 1 is used to query the video playback volume in the data source corresponding to application A on the personal computer, and query business 2 is used to query the video playback volume in the data source corresponding to application A on the mobile phone, the relational operation can be a merge operation of the two playback volume data. After the two video playback volumes are merged, the calculation result is obtained and output.

[0053] In the embodiment of the present invention, a directed acyclic graph is used to represent the atomic services and service combination operations involved, so that data query can be easily implemented during the process of cross-data query by business personnel.

[0054] Optionally, the business controls corresponding to each atomic service are displayed, including:

[0055] Multiple atomic services are encapsulated into a unified interface using the same preset format, and the variables in the unified interface corresponding to each atomic service are different.

[0056] It should be noted that a unified platform can be created for business personnel to query data across data sources. Here, by encapsulating different atomic services into a unified interface, it is convenient to unify and develop the platform. Different atomic services can be distinguished through variables in the unified interface.

[0057] For the unified interface corresponding to each atomic service, a business control is generated and displayed.

[0058] In the embodiment of the present invention, different atomic services are encapsulated by using a unified interface to achieve interface unification; and different atomic services are distinguished based on variables in the unified interface, so that multiple different atomic services can be triggered by business controls.

[0059] Optionally, the access method for accessing the business data from each of the multiple data sources is encapsulated to obtain multiple data access interfaces, including:

[0060] Get the data storage structure of the database corresponding to each data source.

[0061] It should be noted that different databases have different data storage structures. After understanding the data storage structure, corresponding data can be freely stored and retrieved.

[0062] Based on the data storage structure, determine the access method for accessing business data from each data source.

[0063] It should be noted that the data storage structure and the access method have a fixed association relationship. For example, for the first data storage structure of the MySQL database, the data therein can be accessed using the Java Database Connectivity (JDBC) access method. Therefore, the first data storage structure corresponds to the Java Database Connectivity access method. Similarly, for the data storage structure of databases such as Impala and Kylin, the online analytical processing (PLAP) access method can be used for access, and for the data storage structure of the HTTP (Hypertext Transfer Protocol) interface, the client programming package (HttpClient) access method can be used for access.

[0064] A data access interface is generated for each data source access method for accessing business data.

[0065] It should be noted that, since there are multiple data sources, multiple data access interfaces can be generated, and each data access interface corresponds to an access method.

[0066] In the embodiment of the present invention, the access method of accessing business data from the data source can be determined based on the data storage structure of the database corresponding to the data source, and then a data access interface is generated based on the access method. Thus, the business data can be successfully accessed from the corresponding data source using the generated data access interface.

[0067] Optionally, the access method for accessing business data from each of the multiple data sources includes: a Java database connection access method, an online analytical processing access method, and a client programming package access method.

[0068] In the embodiment of the present application, the access method of accessing business data from a data source covers three commonly used access methods, and can achieve the purpose of accessing business data from almost all data sources.

[0069] like Figure 3As shown, it is an application architecture diagram of the cross-data source service implementation method provided by an embodiment of the present invention; it includes:

[0070] The access layer is provided with a user interface and a unified interface. The user interface is used to implement interaction with the user. The unified interface is used to generate an interface request in a unified format according to the user's input and pass the interface request to the parsing and processing layer.

[0071] The parsing and processing layer is provided with a parser, a variable registration module, an input and output module, a cache, a metadata management module, a custom function module, a first operation module, a second operation module, a third operation module, and a fourth operation module. Among them, the parser is used to parse and process the directed acyclic graph to obtain its topological order and the business operations corresponding to each node. The variable registration module is used to identify the variables in the interface request. The input and output module is used to receive the interface request transmitted by the unified interface and transmit the response message to the unified interface. The custom function module, the first operation module, the second operation module, the third operation module, and the fourth operation module respectively perform different relational operations on the queried data. Specifically, the first operation module is used to execute the union in the SQL statement. The second operation module is used to execute the join in the SQL statement. Similarly, the third operation module is used for Projector, and the fourth operation module is used to execute Filter. The custom function module is used to perform custom relational operations. The metadata management module is used to store the queried metadata. The cache is used to store the query results after the relational operation.

[0072] The resource download layer is provided with a first access module, a second access module, and a third access module, which are used to query data from the resource layer using corresponding access methods, and load the queried metadata into the metadata management module through a unified data bus. Specifically, for the data source indicated by the MySQL database, the Java database connection access method can be used for access. For the data source indicated by databases such as Impala and Kylin, the online analytical processing access method can be used for access, and for the data source indicated by the HTTP interface, the client programming package access method can be used for access.

[0073] The resource layer is equipped with various types of databases to store the underlying data of multiple different applications as data sources.

[0074] Business personnel in Figure 3 When querying business data in the application architecture diagram shown, each database in the resource layer is set in a different server to store data sources corresponding to different applications. After the user input triggers the target business control, the relevant business data is queried in the database according to the atomic service corresponding to the target business control. The query results are output to the user interface for the user to view.

[0075] In the embodiment of the present invention, the data sources corresponding to different applications can be uniformly accessed, and then data can be queried and output in the corresponding data sources according to user needs. Business personnel only need to focus on business logic without having to understand the underlying implementation, and the process of developers encapsulating interfaces can be avoided.

[0076] The above describes the cross-data source service implementation method provided by the embodiment of the present invention. The following describes the cross-data source service implementation device provided by the embodiment of the present invention in conjunction with the accompanying drawings.

[0077] See also Figure 4 The embodiment of the present invention further provides a cross-data source service implementation device, the device comprising:

[0078] The encapsulation module 41 is used to encapsulate the access mode of accessing the business data from each of the multiple data sources to obtain multiple data access interfaces;

[0079] A registration module 42 is used to register each data access interface as an atomic service in a service manner for multiple data access interfaces, thereby obtaining multiple atomic services;

[0080] The first display module 43 is used to display the business controls corresponding to each atomic service, so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among multiple atomic services.

[0081] Optionally, the device further comprises:

[0082] The second display module is used to display a service configuration page based on a combination of multiple atomic services and preset services;

[0083] A first generating module, used to generate a configuration module based on a service configuration page, the configuration module being used to generate a configuration diagram according to a service combination operation selected by a user on the service configuration page and at least two atomic services;

[0084] The second generation module is used to generate a target parser based on the configuration module. The target parser is used to parse the configuration diagram to obtain the service combination operation selected by the user on the service configuration page and at least two atomic services, and obtain business data from the corresponding data source based on the at least two atomic services, and use the service combination operation selected by the user to operate on the obtained business data and output the operation results.

[0085] Optionally, the configuration graph is a directed acyclic graph, and the configuration graph is parsed to obtain the service combination operation selected by the user on the service configuration page and at least two atomic services, and business data is obtained from the corresponding data source based on the at least two atomic services, and the obtained business data is operated using the service combination operation selected by the user and the operation result is output, including:

[0086] Parse the directed acyclic graph to obtain the topological ordering of each node in the directed acyclic graph and the atomic services and service combination operations corresponding to each node; according to the topological ordering of each node, obtain business data from the corresponding data source based on the atomic services corresponding to each node; perform operations on the obtained business data based on the service combination operations corresponding to each node and output the operation results.

[0087] Optionally, the first display module 43 includes:

[0088] The encapsulation unit is used to encapsulate multiple atomic services into a unified interface using a preset same format, and the variables in the unified interface corresponding to each atomic service are different;

[0089] The display unit is used to generate and display a business control for the unified interface corresponding to each atomic service.

[0090] Optionally, the encapsulation module 41 includes:

[0091] An acquisition unit, used to acquire a data storage structure of a database corresponding to each data source;

[0092] A determination unit, configured to determine, based on the data storage structure, an access method for accessing business data from each data source;

[0093] The generating unit is used to generate a data access interface according to the access mode of accessing the business data from each data source.

[0094] Optionally, the access method for accessing business data from each of the multiple data sources includes: a Java database connection access method, an online analytical processing access method, and a client programming package access method.

[0095] In the embodiment of the present invention, the developers of the applications corresponding to each data source do not need to encapsulate the methods of obtaining data from the data source respectively, but the access methods of accessing business data from each data source of multiple data sources are uniformly encapsulated, so that a unified data access interface can be obtained. In addition, the encapsulated data access interface does not need to be provided to the business personnel, but it is registered as an atomic service, and the business control corresponding to the atomic service is provided to the business personnel. The business personnel can obtain data across data sources by triggering the business control, and the business personnel do not need to understand the acquisition process of the underlying data, which reduces the requirements for the business personnel.

[0096] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;

[0097] Memory 503, used for storing computer programs;

[0098] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:

[0099] Encapsulating the access method of accessing business data from each of the multiple data sources respectively to obtain multiple data access interfaces;

[0100] For multiple data access interfaces, each data access interface is registered as an atomic service in a service manner to obtain multiple atomic services;

[0101] The business controls corresponding to each atomic service are displayed so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, where the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among multiple atomic services.

[0102] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0103] The communication interface is used for communication between the above terminal and other devices.

[0104] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0105] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0106] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the cross-data source service implementation method described in any of the above embodiments.

[0107] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes the cross-data source service implementation method described in the above embodiment.

[0108] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0109] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0110] Each embodiment in this specification is described in a related 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 system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A cross-data source service implementation method, characterized in that: include: Encapsulating the access method for accessing business data from each of the multiple data sources respectively to obtain multiple data access interfaces, including: obtaining the data storage structure of the database corresponding to each of the data sources; determining the access method for accessing business data from each of the data sources based on the data storage structure; generating a data access interface for the access method for accessing business data from each of the data sources; For the multiple data access interfaces, register each of the data access interfaces as an atomic service in a service manner to obtain multiple atomic services; The multiple atomic services are encapsulated into a unified interface using the same pre-set format, and the variables in the unified interface corresponding to each atomic service are different; for the unified interface corresponding to each atomic service, a business control is generated and displayed, so that when the user triggers the target business control, the business data can be obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among the multiple atomic services.

2. The cross-data source service implementation method according to claim 1, characterized in that: After registering each of the data access interfaces as an atomic service in a service manner for the multiple data access interfaces to obtain multiple atomic services, the method further includes: Based on the combination operation of the multiple atomic services and the preset services, display a service configuration page; Generate a configuration module based on the service configuration page, the configuration module is used to generate a configuration diagram according to the service combination operation and at least two atomic services selected by the user on the service configuration page; A target parser is generated based on the configuration module, and the target parser is used to parse the configuration diagram to obtain the service combination operation and at least two atomic services selected by the user on the service configuration page, and obtain business data from the corresponding data source based on the at least two atomic services, and use the service combination operation selected by the user to operate on the obtained business data and output the operation result.

3. The cross-data source service implementation method according to claim 2, characterized in that: The configuration diagram is a directed acyclic graph, and the configuration diagram is parsed to obtain the service combination operation selected by the user on the service configuration page and at least two atomic services, and business data is obtained from the corresponding data source based on the at least two atomic services, and the obtained business data is operated by using the service combination operation selected by the user and the operation result is output, including: Parsing the directed acyclic graph to obtain a topological ordering of the nodes in the directed acyclic graph and atomic services and service combination operations corresponding to the nodes; According to the topological sorting of each node, business data is obtained from the corresponding data source based on the atomic service corresponding to each node; The acquired business data is operated based on the service combination operation corresponding to each node and the operation result is output.

4. The cross-data source service implementation method according to claim 1, characterized in that: The access method for accessing business data from each of the multiple data sources includes: a Java database connection access method, an online analytical processing access method, and a client programming package access method.

5. A cross-data source service implementation device, characterized in that: The device comprises: The encapsulation module is used to encapsulate the access method of accessing business data from each of the multiple data sources to obtain multiple data access interfaces, including: obtaining the data storage structure of the database corresponding to each of the data sources; determining the access method of accessing business data from each of the data sources based on the data storage structure; and generating a data access interface for the access method of accessing business data from each of the data sources; A registration module, for registering each of the multiple data access interfaces as an atomic service in a service manner, thereby obtaining multiple atomic services; The first display module is used to encapsulate the multiple atomic services into a unified interface by using the same pre-set format, and the variables in the unified interface corresponding to each atomic service are different; for the unified interface corresponding to each atomic service, a business control is generated and displayed, so that when the user triggers the target business control, the business data is obtained from the corresponding data source based on the data access interface corresponding to the target atomic service, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any atomic service among the multiple atomic services.

6. The cross-data source service implementation device according to claim 5, characterized in that: The device also includes: A second display module, configured to display a service configuration page based on the plurality of atomic services and the preset service combination operation; A first generating module, configured to generate a configuration module based on the service configuration page, wherein the configuration module is configured to generate a configuration diagram according to a service combination operation and at least two atomic services selected by a user on the service configuration page; The second generation module is used to generate a target parser based on the configuration module, and the target parser is used to parse the configuration diagram to obtain the service combination operation and at least two atomic services selected by the user on the service configuration page, and obtain business data from the corresponding data source based on the at least two atomic services, and use the service combination operation selected by the user to perform operations on the obtained business data and output the operation results.

7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the cross-data source service implementation method as described in any one of claims 1 to 4 when executing the program stored in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cross-data source service implementation method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and system for multi-data source access

    CN107276992A