CN113742103A - Cross-data-source service implementation method and device and electronic equipment - Google Patents

Cross-data-source service implementation method and device and electronic equipment Download PDF

Info

Publication number
CN113742103A
CN113742103A CN202111007505.7A CN202111007505A CN113742103A CN 113742103 A CN113742103 A CN 113742103A CN 202111007505 A CN202111007505 A CN 202111007505A CN 113742103 A CN113742103 A CN 113742103A
Authority
CN
China
Prior art keywords
service
data
atomic
target
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111007505.7A
Other languages
Chinese (zh)
Inventor
臧翔宇
马金韬
张迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202111007505.7A priority Critical patent/CN113742103A/en
Publication of CN113742103A publication Critical patent/CN113742103A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and a device for realizing cross-data-source service and electronic equipment, wherein the method comprises the following steps: respectively encapsulating access modes for accessing service data from each data source of a plurality of data sources to obtain a plurality of data access interfaces; aiming at a plurality of data access interfaces, registering each data access interface as an atomic service in a service mode to obtain a plurality of atomic services; and displaying the business control corresponding to each atomic service so that the user can acquire business data from the corresponding data source based on the data access interface corresponding to the target atomic service under the condition that the user triggers the target business control. In the embodiment of the invention, the data access interface obtained by encapsulation is not required to be provided for business personnel, but is registered as the atomic service, the business control corresponding to the atomic service is provided for the business personnel, the business personnel are not required to know the acquisition process of the bottom data, and the requirement on the business personnel is reduced.

Description

Cross-data-source service implementation method and device and electronic equipment
Technical Field
The invention relates to the field of data query, in particular to a method and a device for realizing cross-data-source service and electronic equipment.
Background
At present, in various large platforms and applications under the internet, a database is mostly adopted to store bottom layer data. And (3) storing the bottom layer data by adopting different storage modes according to the requirements and styles of the platforms or the development teams of the applications. When a third party wants to obtain the underlying data of an application, it is a common practice that a developer of the application encapsulates the data loading logic into an interface, and provides the data to the third party through the interface.
In many cases, however, an enterprise or company typically owns multiple applications. In some scenarios, data in multiple applications needs to be acquired simultaneously, i.e., data is acquired across data sources. For example, when the third party is a service person, the service person counts the download amount, the play amount, and the like of all applications of the company. Because the applications operate independently, different applications correspond to different data sources, that is, each application uses different databases to store data related to the application. In this case, developers of each application can only encapsulate the interfaces based on the storage manner of the data in the database of the application, and then provide the data in each application through the interfaces.
However, the above method not only causes that each interface is not uniform enough, but also requires service personnel to know the underlying storage method of data in each application, which has higher requirements for the service personnel.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method and an apparatus for implementing a cross-data-source service, and an electronic device, so as to solve the problems that in the prior art, when data is acquired across data sources, interfaces are not uniform enough, and requirements for service personnel are high.
In a first aspect of the present invention, a method for implementing a service across data sources is provided, where the method includes:
respectively encapsulating access modes for accessing service data from each of a plurality of data sources to obtain a plurality of data access interfaces;
aiming at the plurality of data access interfaces, registering each data access interface as an atomic service in a service mode to obtain a plurality of atomic services;
and displaying the business control corresponding to each atomic service so as to enable a user to acquire business data from a corresponding data source based on a data access interface corresponding to the target atomic service under the condition that the user triggers the target business control, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any one of the atomic services.
In a second aspect of the present invention, there is also provided an apparatus for implementing a service across data sources, the apparatus including:
the encapsulation module is used for respectively encapsulating access modes for accessing service data from each data source of a plurality of data sources to obtain a plurality of data access interfaces;
the registration module is used for registering each data access interface as an atomic service in a service mode aiming at the plurality of data access interfaces to obtain a plurality of atomic services;
the first display module is configured to display a service control corresponding to each atomic service, so that a user acquires service data from a corresponding data source based on a data access interface corresponding to a target atomic service when triggering the target service control, where the target service control is the service control corresponding to the target atomic service, and the target atomic service is any one of the atomic services.
In a third aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the cross-data-source service realization method when executing the program stored in the memory.
In a fourth aspect implemented by the present invention, there is also provided a computer-readable storage medium on which a computer program is stored, which computer program, when executed by a processor, implements the steps of the method for service implementation across data sources as described in the first aspect.
In a fifth aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the above-mentioned method for implementing a service across data sources.
Aiming at the prior art, the invention has the following advantages:
the method for realizing the service across the data sources can respectively encapsulate the access modes of accessing the service data from each data source of a plurality of data sources to obtain a plurality of data access interfaces. Thereby, service data can be accessed from different data sources through the data access interface. Aiming at a plurality of data access interfaces, registering each data access interface as an atomic service in a service mode to obtain a plurality of atomic services, registering access modes for accessing business data from different data sources as different atomic services in the service registration mode, and then displaying a business control corresponding to each atomic service so that a user can obtain the business data from the corresponding data source based on the data access interface corresponding to the target atomic service under the condition that the user triggers the target business control, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any one atomic service in the plurality of atomic services. In the embodiment of the invention, the application developers corresponding to the data sources do not need to respectively package the data obtaining mode in the data sources, but uniformly package the access mode of accessing the service data from each data source of the plurality of data sources, thereby obtaining a uniform data access interface. And the data access interface obtained by encapsulation is not required to be provided for business personnel, but is registered as an atomic service, the business control corresponding to the atomic service is provided for the business personnel, the business personnel can acquire data across data sources by triggering the business control, the business personnel are not required to know the acquisition process of bottom data, and the requirements on the business personnel are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flowchart illustrating steps of a method for implementing a service across data sources according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a directed acyclic graph according to an embodiment of the present invention;
FIG. 3 is an application architecture diagram of a method for implementing a cross-data-source service according to an embodiment of the present invention;
FIG. 4 is a block diagram of a cross-data-source service implementation apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a method for implementing a service across data sources, where the method includes:
step 101: and respectively encapsulating access modes for accessing the service data from each data source of the plurality of data sources to obtain a plurality of data access interfaces.
It should be noted that each data source corresponds to an application, and the data source is used as data required in the running process 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.
The access mode of accessing the service data from the data source may be understood as a query logic for querying data from the data source. Taking an application as an example for illustration, the application includes a client and a server, where the client is used for interacting with a user, the server is used for interacting with the client, and the server stores a large amount of bottom data required by the client in the process of interacting with the user, and the bottom data can be understood as a data source corresponding to the application. The data source is stored in a database of the server side in a preset storage mode, and a corresponding query logic party is required to obtain data from the database, so that the access mode is the query logic.
Step 102: aiming at a plurality of data access interfaces, each data access interface is registered as an atomic service in a service mode to obtain a plurality of atomic services.
It should be noted that an atomic service is a basic service unit that is not resolvable. Each atomic service may implement business logic that queries/accesses data in a data source. Specifically, for each data source, business logic for inquiring/accessing different data from the data source is registered as different atomic services, so that a large number of atomic services are formed, and the atomic services are directly provided for a third party to use as exposed services. All the atomic services can be registered on the same data bus, and the unification among the services is realized. Meanwhile, data discovery and data sharing of upper-layer services are facilitated.
Step 103: and displaying the business control corresponding to each atomic service so that the user can acquire business data from the corresponding data source based on the data access interface corresponding to the target atomic service under the condition that the user triggers the target business control.
It should be noted that different business controls will trigger different atomic services. The target business control is a business control corresponding to the target atomic service, and the target atomic service is any one of the atomic services. That is, when a user triggers a certain service control, the atomic service corresponding to the triggered service control is performed, and the service data is acquired from the corresponding data source. It can be understood that, the relevant information of the atomic service corresponding to each business control is displayed on each business control to remind the user which atomic service corresponds to each business control, so that the user can select the corresponding business control to trigger according to the own requirements.
In the embodiment of the invention, the access mode of accessing the service data from each data source of a plurality of data sources can be respectively encapsulated to obtain a plurality of data access interfaces. Thereby, service data can be accessed from different data sources through the data access interface. Aiming at a plurality of data access interfaces, registering each data access interface as an atomic service in a service mode to obtain a plurality of atomic services, registering access modes for accessing business data from different data sources as different atomic services in the service registration mode, and then displaying a business control corresponding to each atomic service so that a user can obtain the business data from the corresponding data source based on the data access interface corresponding to the target atomic service under the condition that the user triggers the target business control, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any one atomic service in the plurality of atomic services. In the embodiment of the invention, the application developers corresponding to the data sources do not need to respectively package the data obtaining mode in the data sources, but uniformly package the access mode of accessing the service data from each data source of the data sources, so that a uniform data access interface can be obtained. And the data access interface obtained by encapsulation is not required to be provided for business personnel, but is registered as an atomic service, the business control corresponding to the atomic service is provided for the business personnel, the business personnel can acquire data across data sources by triggering the business control, the business personnel are not required to know the acquisition process of bottom data, and the requirements on the business personnel are reduced.
Optionally, after registering each data access interface as an atomic service in a service manner for a plurality of data access interfaces and obtaining a plurality of atomic services, the method further includes:
and displaying a service configuration page based on a plurality of atomic services and preset service combination operation.
It should be noted that the service configuration page displays a plurality of controls including a control associated with each of the plurality of atomic services and a control associated with a preset service composition operation. And the user randomly combines different atomic services through the control displayed by the service configuration page. Preferably, the predetermined service combination operation includes a preset relational operation, and the relational operation may be a union, a join, and the like in an SQL (Structured Query Language) statement for merging, but is not limited thereto.
And the configuration module is used for generating a configuration diagram according to service combination operation selected by a user on the service configuration page and at least two atomic services.
It should be noted that the configuration module can create an operational relationship between different atomic services, thereby providing a basis for triggering multiple different atomic services simultaneously. Here, the configuration graph generated by the configuration module is associated with a user's operation on a service configuration page. It will be appreciated that the configuration module is completed during the development phase as a functional module that executes the first target logic. The first target logic is a configuration diagram generated according to the service combination operation selected by the user on the service configuration page and at least two atomic services. Therefore, in the process of inquiring business data, business personnel can trigger the configuration module to generate the configuration diagram by operating the service configuration page.
And generating a target resolver based on the configuration module, wherein the target resolver is used for resolving the configuration diagram to obtain service combination operation selected by the user on the service configuration page and at least two atomic services, acquiring business data from corresponding data sources based on the at least two atomic services, and performing operation on the acquired business data by adopting the service combination operation selected by the user and outputting an operation result.
It should be noted that the target parser is completed in the development phase, being a functional module that executes the second target logic. The second target logic is to analyze the configuration diagram to obtain service combination operation selected by the user on the service configuration page and at least two atomic services, acquire service data from the corresponding data source based on the at least two atomic services, and perform operation and output operation results on the acquired service data by adopting the service combination operation selected by the user. Therefore, in the process of inquiring business data, business personnel can see the operation result output by the target resolver after operating on the service configuration page.
In the embodiment of the invention, aiming at the requirements which can not be met by a single atomic service, the service configuration page is provided for the user to freely select a plurality of atomic services and the combination mode among the atomic services, thereby realizing the combination function of the data access interface and meeting more requirements of the user. Meanwhile, the original development facing to the bottom data source is changed into the development facing to the service level, so that the development period can be shortened, and the maintenance cost can be reduced.
Optionally, the configuration graph is a directed acyclic graph, the configuration graph is analyzed to obtain a service combination operation selected by a user on a service configuration page and at least two atomic services, the service data is obtained from a corresponding data source based on the at least two atomic services, and the operation and output operation results are performed on the obtained service data by using the service combination operation selected by the user, including:
and analyzing the directed acyclic graph to obtain the topological ordering of each node in the directed acyclic graph and the atomic service and service combination operation corresponding to each node.
It should be noted that a directed acyclic graph refers to a loop-free directed graph. The involved atomic services and service combination operations can be accurately characterized through the directed acyclic graph.
According to the topological sorting of each node, acquiring service data from a corresponding data source based on the atomic service corresponding to each node;
and calculating the acquired service data based on the service combination operation corresponding to each node and outputting an operation result.
It should be noted that, as shown in fig. 2, a schematic diagram is shown for a target directed acyclic graph, and after starting, the query service 1 and the query service 2 are executed simultaneously through a copy function. After executing query service 1 and query service 2, the query results are merged by unions. For example, when the query service 1 is used to query the video playback volume in the data source corresponding to the application a at the personal computer end, and the query service 2 is used to query the video playback volume in the data source corresponding to the application a at the mobile phone end, the relational operation may be a merging operation of the two playback volume data. And obtaining and outputting a calculation result after the two video playing quantities are combined.
In the embodiment of the invention, atomic services and service combination operation related to directed acyclic graph representation are utilized, and data query is easily realized in the process of cross-data query by service personnel.
Optionally, displaying a business control corresponding to each atomic service includes:
and packaging a plurality of atomic services into a unified interface by adopting a preset same format, wherein the variables in the unified interface corresponding to each atomic service are different.
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 as a unified interface, unification and development of the platform are facilitated. Different atomic services can be distinguished by variables in the unified interface.
And generating and displaying a business control aiming at the uniform interface corresponding to each atomic service.
In the embodiment of the invention, different atomic services are encapsulated by utilizing the uniform interface, so that the interface uniformity is realized; and different atomic services are distinguished based on variables in the unified interface, so that a plurality of different atomic services can be triggered through the business control.
Optionally, encapsulating access manners for accessing service data from each of the plurality of data sources, respectively, to obtain a plurality of data access interfaces, including:
and acquiring a data storage structure of the database corresponding to each data source.
It should be noted that different databases have different data storage structures, and after knowing the data storage structures, the corresponding data can be freely stored and acquired.
And determining an access mode for accessing the service data from each data source based on the data storage structure.
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, a Java Database Connectivity (JDBC) access method may be used to access data therein. Therefore, the first data storage structure corresponds to a Java database connection access mode. Similarly, for the data storage structure of the databases such as Impala and Kylin, an access mode of Online Analytical Processing (PLAP) may be used for access, and for the data storage structure of an HTTP (HyperText Transfer Protocol) interface, an access mode of a client programming package (HttpClient) may be used for access.
And generating a data access interface aiming at the access mode of accessing the service data from each data source.
It should be noted that, since the number of data sources is multiple, multiple data access interfaces may be generated, and each data access interface corresponds to one access mode.
In the embodiment of the invention, the access mode of accessing the service data from the data source can be determined based on the data storage structure of the database corresponding to the data source, and then the data access interface is generated based on the access mode. Therefore, the generated data access interface can be used for successfully accessing the service data from the corresponding data source.
Optionally, the accessing manner for accessing the service data from each of the plurality of data sources includes: the Java database connection access mode, the online analysis processing access mode and the client programming package access mode.
In the embodiment of the application, the access mode of accessing the service data from the data source covers three common access modes. The purpose of accessing service data from almost all data sources can be achieved.
As shown in fig. 3, it is an application architecture diagram of a cross-data-source service implementation method provided in the embodiment of the present invention; which comprises the following steps:
and the access layer is provided with a user interface and a unified interface. Wherein the user interface is used for enabling interaction with a user. The uniform interface is used for generating an interface request with a uniform format according to the input of a user and transmitting the interface request into the analysis and processing layer.
The analysis and processing layer is provided with an analyzer, a variable registration module, an input/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. The parser is used for parsing the directed acyclic graph to obtain the topological order and the service operation corresponding to each node. And the variable registration module is used for identifying the variable in the interface request. And the input and output module is used for receiving the interface request transmitted by the unified interface and transmitting a response message to the unified interface. The user-defined function module, the first operation module, the second operation module, the third operation module and the fourth operation module respectively execute different relational operations on the inquired data. Specifically, the first operation module is used for executing the union in the SQL statement. The second operation module is used for executing the join in the SQL statement. Similarly, the third operation module is used for Projector, and the fourth operation module is used for executing Filter. The user-defined function module is used for executing user-defined relational operation. And the metadata management module is used for storing the inquired metadata. The cache is used for storing the query result after the relational operation.
And the resource downloading layer is provided with a first access module, a second access module and a third access module and is used for inquiring data from the resource layer by adopting a corresponding access mode and loading the inquired metadata into the metadata management module through a uniform data bus. Specifically, for a data source indicated by the MySQL database, access can be performed in a Java database connection access manner. For data sources indicated by databases such as Impala and Kylin, an online analysis processing access mode can be adopted for access, for data sources indicated by an HTTP interface, and for data sources indicated by a client programming package access mode can be adopted for access.
And the resource layer is provided with various types of databases and is used for storing bottom layer data of a plurality of different applications as data sources.
When a service person queries service data in the application architecture diagram shown in fig. 3, each database of the resource layer is disposed in a different server, and stores a data source corresponding to a different application. After a user inputs a trigger target business control, related business data are inquired in a database according to the atomic service corresponding to the target business control. And outputting the inquired result to a user interface for the user to check.
In the embodiment of the invention, the data sources corresponding to different applications can be accessed in a unified manner, and then data query and output are carried out in the corresponding data sources according to the user requirements, only business personnel need to pay attention to business logic, the realization of a bottom layer does not need to be known, and meanwhile, the process of packaging interfaces by developers is avoided.
The method for implementing a service across data sources according to the embodiment of the present invention is described above, and a device for implementing a service across data sources according to the embodiment of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 4, an embodiment of the present invention further provides a device for implementing a service across data sources, where the device includes:
an encapsulating module 41, configured to encapsulate access manners for accessing service data from each of the multiple data sources, respectively, to obtain multiple data access interfaces;
a registration module 42, configured to register each data access interface as an atomic service in a service manner for multiple data access interfaces, so as to obtain multiple atomic services;
the first display module 43 is configured to display a service control corresponding to each atomic service, so that a user obtains service data from a corresponding data source based on a data access interface corresponding to a target atomic service when triggering the target service control, where the target service control is the service control corresponding to the target atomic service, and the target atomic service is any one of a plurality of atomic services.
Optionally, the apparatus further comprises:
the second display module is used for displaying a service configuration page based on a plurality of atomic services and preset service combination operation;
the system comprises a first generation module, a configuration module and a second generation module, wherein the first generation module is used for generating a configuration module based on a service configuration page, and the configuration module is used for generating a configuration diagram according to service combination operation selected by a user on the service configuration page and at least two atomic services;
and the second generation module is used for generating a target resolver based on the configuration module, the target resolver is used for resolving the configuration diagram to obtain service combination operation selected by the user on the service configuration page and at least two atomic services, acquiring business data from corresponding data sources based on the at least two atomic services, and calculating and outputting an operation result on the acquired business data by adopting the service combination operation selected by the user.
Optionally, the configuration graph is a directed acyclic graph, the configuration graph is analyzed to obtain a service combination operation selected by a user on a service configuration page and at least two atomic services, the service data is obtained from a corresponding data source based on the at least two atomic services, and the operation and output operation results are performed on the obtained service data by using the service combination operation selected by the user, including:
analyzing the directed acyclic graph to obtain topological sequencing of each node in the directed acyclic graph and atomic service and service combination operation corresponding to each node; according to the topological sorting of each node, acquiring service data from a corresponding data source based on the atomic service corresponding to each node; and calculating the acquired service data based on the service combination operation corresponding to each node and outputting an operation result.
Optionally, the first display module 43 includes:
the packaging unit is used for packaging a plurality of atomic services into uniform interfaces by adopting a preset same format, and the variables in the uniform interfaces corresponding to each atomic service are different;
and the display unit is used for generating and displaying a business control aiming at the uniform interface corresponding to each atomic service.
Optionally, the encapsulation module 41 includes:
the acquisition unit is used for acquiring a data storage structure of a database corresponding to each data source;
a determining unit, configured to determine, based on the data storage structure, an access manner for accessing the service data from each data source;
and the generating unit is used for generating a data access interface according to the access mode of accessing the service data from each data source.
Optionally, the accessing manner for accessing the service data from each of the plurality of data sources includes: the Java database connection access mode, the online analysis processing access mode and the client programming package access mode.
In the embodiment of the invention, the application developers corresponding to the data sources do not need to respectively package the data obtaining mode in the data sources, but uniformly package the access mode of accessing the service data from each data source of the data sources, thereby obtaining a uniform data access interface. And the data access interface obtained by encapsulation is not required to be provided for business personnel, but is registered as an atomic service, the business control corresponding to the atomic service is provided for the business personnel, the business personnel can acquire data across data sources by triggering the business control, the business personnel are not required to know the acquisition process of bottom data, and the requirements on the business personnel are reduced.
The embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504;
a memory 503 for storing a computer program;
the processor 501, when executing the program stored in the memory 503, implements the following steps:
respectively encapsulating access modes for accessing service data from each data source of a plurality of data sources to obtain a plurality of data access interfaces;
aiming at a plurality of data access interfaces, registering each data access interface as an atomic service in a service mode to obtain a plurality of atomic services;
and displaying the business control corresponding to each atomic service so that a user can acquire business data from a corresponding data source based on the data access interface corresponding to the target atomic service under the condition that the user triggers the target business control, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any one of the atomic services.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the computer is caused to execute the service implementation method across data sources in any one of the above embodiments.
In yet another embodiment provided by the present invention, a computer program product containing instructions is also provided, which when run on a computer, causes the computer to execute the method for implementing a service across data sources as described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for implementing a service across data sources is characterized by comprising the following steps:
respectively encapsulating access modes for accessing service data from each of a plurality of data sources to obtain a plurality of data access interfaces;
aiming at the plurality of data access interfaces, registering each data access interface as an atomic service in a service mode to obtain a plurality of atomic services;
and displaying the business control corresponding to each atomic service so as to enable a user to acquire business data from a corresponding data source based on a data access interface corresponding to the target atomic service under the condition that the user triggers the target business control, wherein the target business control is the business control corresponding to the target atomic service, and the target atomic service is any one of the atomic services.
2. The method of claim 1, wherein after the registering each data access interface as an atomic service in a service manner for the plurality of data access interfaces and obtaining a plurality of atomic services, the method further comprises:
displaying a service configuration page based on the plurality of atomic services and preset service combination operation;
generating a configuration module based on the service configuration page, wherein the configuration module is used for generating a configuration diagram according to service combination operation selected by a user on the service configuration page and at least two atomic services;
and generating a target resolver based on the configuration module, wherein the target resolver is used for resolving the configuration diagram to obtain service combination operation selected by the user on the service configuration page and at least two atomic services, acquiring business data from corresponding data sources based on the at least two atomic services, and calculating and outputting an operation result on the acquired business data by adopting the service combination operation selected by the user.
3. The method for implementing a service across data sources according to claim 2, wherein the configuration graph is a directed acyclic graph, and the analyzing of the configuration graph is performed to obtain a service combination operation selected by a user on the service configuration page and at least two atomic services, obtain service data from a corresponding data source based on the at least two atomic services, and perform an operation on the obtained service data by using the service combination operation selected by the user and output an operation result, includes:
analyzing the directed acyclic graph to obtain topological sequencing of each node in the directed acyclic graph and atomic service and service combination operation corresponding to each node;
according to the topological sorting of each node, acquiring service data from a corresponding data source based on the atomic service corresponding to each node;
and calculating the acquired service data based on the service combination calculation corresponding to each node and outputting a calculation result.
4. The method of claim 1, wherein the displaying the business control corresponding to each atomic service comprises:
packaging the plurality of atomic services into unified interfaces by adopting a preset same format, wherein the unified interfaces corresponding to the atomic services have different variables;
and generating and displaying the business control aiming at the uniform interface corresponding to each atomic service.
5. The method for implementing service across data sources according to claim 1, wherein the step of encapsulating access modes for accessing service data from each of the plurality of data sources to obtain a plurality of data access interfaces comprises:
acquiring a data storage structure of a database corresponding to each data source;
determining an access mode for accessing service data from each data source based on the data storage structure;
and generating the data access interface according to the access mode of accessing the service data from each data source.
6. The method of claim 1, wherein the accessing of the service data from each of the plurality of data sources comprises: the Java database connection access mode, the online analysis processing access mode and the client programming package access mode.
7. An apparatus for implementing a service across data sources, the apparatus comprising:
the encapsulation module is used for respectively encapsulating access modes for accessing service data from each data source of a plurality of data sources to obtain a plurality of data access interfaces;
the registration module is used for registering each data access interface as an atomic service in a service mode aiming at the plurality of data access interfaces to obtain a plurality of atomic services;
the first display module is configured to display a service control corresponding to each atomic service, so that a user acquires service data from a corresponding data source based on a data access interface corresponding to a target atomic service when triggering the target service control, where the target service control is the service control corresponding to the target atomic service, and the target atomic service is any one of the atomic services.
8. The device of claim 7, wherein the device further comprises:
the second display module is used for displaying a service configuration page based on the plurality of atomic services and preset service combination operation;
the first generation module is used for generating a configuration module based on the service configuration page, and the configuration module is used for generating a configuration diagram according to service combination operation selected by a user on the service configuration page and at least two atomic services;
and the second generation module is used for generating a target resolver based on the configuration module, the target resolver is used for resolving the configuration diagram to obtain service combination operation selected by the user on the service configuration page and at least two atomic services, acquiring business data from corresponding data sources based on the at least two atomic services, and calculating and outputting an operation result on the acquired business data by adopting the service combination operation selected by the user.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method of implementing a service across data sources as claimed in any one of claims 1 to 6 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method for service implementation across data sources of any one of claims 1 to 6.
CN202111007505.7A 2021-08-30 2021-08-30 Cross-data-source service implementation method and device and electronic equipment Pending CN113742103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111007505.7A CN113742103A (en) 2021-08-30 2021-08-30 Cross-data-source service implementation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111007505.7A CN113742103A (en) 2021-08-30 2021-08-30 Cross-data-source service implementation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113742103A true CN113742103A (en) 2021-12-03

Family

ID=78733966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111007505.7A Pending CN113742103A (en) 2021-08-30 2021-08-30 Cross-data-source service implementation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113742103A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120130987A1 (en) * 2010-11-19 2012-05-24 International Business Machines Corporation Dynamic Data Aggregation from a Plurality of Data Sources
CN107276992A (en) * 2017-05-26 2017-10-20 亿海蓝(北京)数据技术股份公司 A kind of method and system of multi-data source access
CN111198901A (en) * 2020-01-06 2020-05-26 北京邮电大学 Unified data service opening method and system based on multiple data sources
CN112272240A (en) * 2020-11-17 2021-01-26 珠海大横琴科技发展有限公司 Data cloud method and device
CN112306568A (en) * 2019-07-26 2021-02-02 广州虎牙科技有限公司 Service instance configuration method and device, electronic equipment and storage medium
CN112445851A (en) * 2019-09-02 2021-03-05 北京神州泰岳软件股份有限公司 Plug-in ORM framework implementation method and device, electronic equipment and storage medium
CN112445811A (en) * 2020-11-09 2021-03-05 广东华兴银行股份有限公司 Data service method, device, storage medium and component based on SQL configuration

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120130987A1 (en) * 2010-11-19 2012-05-24 International Business Machines Corporation Dynamic Data Aggregation from a Plurality of Data Sources
CN107276992A (en) * 2017-05-26 2017-10-20 亿海蓝(北京)数据技术股份公司 A kind of method and system of multi-data source access
CN112306568A (en) * 2019-07-26 2021-02-02 广州虎牙科技有限公司 Service instance configuration method and device, electronic equipment and storage medium
CN112445851A (en) * 2019-09-02 2021-03-05 北京神州泰岳软件股份有限公司 Plug-in ORM framework implementation method and device, electronic equipment and storage medium
CN111198901A (en) * 2020-01-06 2020-05-26 北京邮电大学 Unified data service opening method and system based on multiple data sources
CN112445811A (en) * 2020-11-09 2021-03-05 广东华兴银行股份有限公司 Data service method, device, storage medium and component based on SQL configuration
CN112272240A (en) * 2020-11-17 2021-01-26 珠海大横琴科技发展有限公司 Data cloud method and device

Similar Documents

Publication Publication Date Title
CN114064690A (en) Data processing method and device
CN110320378B (en) Method, apparatus, device and computer readable storage medium for applying for a quality control test
CN111225018A (en) Request message processing method and device and electronic equipment
CN114610598A (en) Test method, test device, electronic equipment and computer readable storage medium
CN111581431B (en) Data exploration method and device based on dynamic evaluation
CN111198677A (en) Equipment object generation method, device and equipment
CN112083982A (en) Information processing method and device
CN110874365A (en) Information query method and related equipment thereof
CN113742103A (en) Cross-data-source service implementation method and device and electronic equipment
CN108399223B (en) Data acquisition method and device and electronic equipment
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN114036132A (en) Object information processing method and device, storage medium and electronic equipment
CN115034175A (en) Table data processing method, device, terminal and storage medium
CN111045724A (en) Query method and device for call chain information and readable storage medium
CN113761588A (en) Data verification method and device, terminal equipment and storage medium
CN110874305A (en) User operation recording method and device and server
US20230385132A1 (en) Destination toolkit for destination actions
CN116028138B (en) Application publishing method and device
CN117555533B (en) Code generation method, electronic device and storage medium
CN115600023A (en) Client page skipping method, device and equipment and storage medium
CN116820652A (en) Method and device for realizing service call link visualization based on Nacos
CN117687608A (en) Method, device, equipment and storage medium for generating orchestration stream
CN113391930A (en) Application loading method and device, electronic equipment and readable storage medium
CN114116823A (en) Query interface generation method, data query method and device
CN117311713A (en) Page object configuration method, device, electronic equipment, storage medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination