CN109656989A - Multi-data source integration method, device, computer equipment and storage medium - Google Patents
Multi-data source integration method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109656989A CN109656989A CN201811265525.2A CN201811265525A CN109656989A CN 109656989 A CN109656989 A CN 109656989A CN 201811265525 A CN201811265525 A CN 201811265525A CN 109656989 A CN109656989 A CN 109656989A
- Authority
- CN
- China
- Prior art keywords
- data source
- grafana
- inquiry request
- middleware
- client
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
The present invention relates to data processing field more particularly to a kind of multi-data source integration method, device, computer equipment and storage mediums.Multi-data source integration method includes: connection Grafana, obtains the inquiry request that user inputs in client by Grafana;Inquiry request is sent to middleware, middleware is between Grafana and multiple data sources;Corresponding data source location is obtained according to inquiry request, and passes through the interface of middleware and data source, the query result that search inquiry is requested from data source;Query result is fed back into user client by Grafana.The present invention is forwarded by passing through after encrypting to the information of access by Grafana, the data source realization support that do not supported originally a variety of Grafana is realized by integrating scripting access interface, efficiently solves the limited technical problem of the data source types of existing Grafana support.
Description
Technical field
The present invention relates to data processing field, in particular to a kind of multi-data source integration method, device, computer equipment and
Storage medium.
Background technique
Grafana is a visualization panel (Dashboard), has zingy chart and layout to show, function
Complete measurement instrument board and graphic editor, support Graphite, zabbix, InfluxDB, Prometheus,
OpenTSDB, MySql etc. are used as data source.Grafana key property: flexible graphical option abundant can mix a variety of
Style supports daytime and Night, multiple data sources.
There are still some drawbacks by existing Grafana, for example the data source types that can be supported are limited, while also needing to develop
Particular plug-in is to support certain types of data source;Need to do data source logic adjustment and permission control to improve its safety
Property, such as MySql data source, after needing to configure user, user could be made only to possess specific inquiry;Multiple numbers
Integration can not be carried out in same chart according to the data in source to show;It is handed over using the query statement and data source of data source itself
Mutually, the query statement of data source itself has certain limitation, might not support or even if support can bring efficiency,
Query statement readability problem so the particularity of individual data item is not easy to realize, for example needs complicated calculations, caching.
Summary of the invention
Based on this, it is necessary to which the data source supported for Grafana in the prior art is limited, to certain types of number
The problem of developing particular plug-in is needed according to source, a kind of data integration method, device, computer equipment and storage medium are provided.
A kind of multi-data source integration method, which is characterized in that the multi-data source integration method, comprising:
Grafana is connected, the inquiry request that user inputs in client, the Grafana are obtained by the Grafana
For obtaining the inquiry request of client's input after connecting with client;
The inquiry request is sent to middleware, the middleware is between the Grafana and multiple data sources;
The corresponding data source location is obtained according to the inquiry request, and passes through the middleware and the data source
Interface, the query result of the inquiry request is searched for from the data source;
The query result is fed back into user client by the Grafana.
In one embodiment, in the connection Grafana, user is obtained by the Grafana and is inputted in client
Inquiry request, the Grafana be used for connect with client after obtain client input inquiry request before, comprising:
Encryption configuration is generated according to certain encryption format to the access information of original data source to be visited;
The encryption configuration is sent to Grafana.
In one embodiment, the connection Grafana obtains what user inputted in client by the Grafana
Inquiry request, the Grafana obtain the inquiry request of client's input after being used to connect with client, comprising:
The communication interface of HTTP mode is supported in setting on middleware, connects Grafana by the communication interface;
The inquiry request that user inputs in client is obtained, and is sent to Grafana.
In one embodiment, described that the inquiry request is sent to middleware, the middleware is located at described
Between Grafana and multiple data sources, comprising:
The inquiry request got is encrypted;
The inquiry request after encryption is sent to the middleware, while query script and key being sent to
The middleware, the data that the query script needs to inquire for inquiring user in original data source, the key are used for
The inquiry request is decrypted.
In one embodiment, described that the corresponding data source location is obtained according to the inquiry request, and pass through institute
The interface for stating middleware Yu the data source searches for the query result of the inquiry request from the data source, comprising:
It is decrypted according to the inquiry request that key pair is got;
According to the access information obtained after decryption processing, the corresponding data source is positioned;
Connection is established according to the scripting access interface and the data source that are arranged on the middleware;
It is searched for from the data source and the inquiry request phase according to query script by the scripting access interface
Corresponding query result;
The query result corresponding with the inquiry request that will acquire feeds back to the Grafana.
In one embodiment, the described pair of inquiry request got is encrypted, comprising:
The inquiry request got is encrypted using CTR algorithm, the encryption function of the CTR algorithm is such as
Shown in formula (1),
C=E (K, P) (1),
C is ciphertext in formula (1), and E is encryption function, and K is key, and P is in plain text, i.e., using plaintext P and key K as encryption
After the parameter input of function, ciphertext C can be exported according to encryption function E;
Shown in encryption function such as formula (2) based on the CTR algorithm pattern,
Ei=0 to n-1 { KSi=VHk(ctr+i) } (2),
Wherein, E is encryption function, and K is key, and ctr is initial value, and the length is 64bit, VHkFor block cipher, KSiIt is close
Key stream, the value of i are [0, n-1].
In one embodiment, described according to the scripting access interface being arranged on the middleware and the data source
Establish connection, comprising:
The querying command and data source access path and access right for including in the inquiry request after obtaining decryption processing
Limit information establishes connection by scripting access interface and data source;
If successful connection, the query script for including in the inquiry request is executed in the data source, will be looked into
The result ask is sent to the Grafana and feeds back to user client;
If connection failure, the query script is not executed, and error message is sent to the Grafana, and pass through
Error message is fed back to user client by the Grafana.
Based on identical design, present invention also provides a kind of multi-data source integrating apparatus, the data integration device packet
It includes:
Module is obtained, connection Grafana is set as, the inquiry that user inputs in client is obtained by the Grafana
Request, the Grafana obtain the inquiry request of client's input after being used to connect with client;
Sending module is set as the inquiry request being sent to middleware, the middleware be located at the Grafana and
Between multiple data sources;
Enquiry module is set as obtaining the corresponding data source location according to the inquiry request, and passes through in described
Between part and the data source interface, the query result of the inquiry request is searched for from the data source;
Output module is set as the query result feeding back to user client by the Grafana.
Based on the same technical idea, the embodiment of the present application also provides a kind of computer equipment, the computer equipment packet
Include memory and processor, be stored with computer-readable instruction in the memory, the computer-readable instruction by one or
When multiple processors execute, so that the step of one or more processors execute above-mentioned multi-data source integration method.
Based on the same technical idea, the embodiment of the present application also provides a kind of storages for being stored with computer-readable instruction
Medium, when the computer-readable instruction is executed by one or more processors, so that one or more processors execute
Such as the step of above-mentioned institute's data source integration method.
Above-mentioned multi-data source integration method, device, computer equipment and storage medium pass through institute by connecting Grafana
It states Grafana and obtains the inquiry request that user inputs in client;The inquiry request is sent to middleware, the middleware
Between the Grafana and multiple data sources;The corresponding data source location is obtained according to the inquiry request, and is led to
The interface for crossing the middleware Yu the data source searches for inquiry knot corresponding with the inquiry request from the data source
Fruit;The query result is fed back into user client by the Grafana.Therefore, by adding to the information of access
It is forwarded after close by Grafana, realizes the data source that do not supported originally a variety of Grafana by integrating scripting access interface
It realizes and supports, efficiently solve the limited technical problem of the data source types of existing Grafana support.
Detailed description of the invention
Fig. 1 is the flow chart of the application multi-data source integration method in one embodiment;
Fig. 2 is the flow chart that the application sends inquiry request in one embodiment;
Fig. 3 is the flow chart of the application search query results in one embodiment;
Fig. 4 is the structural block diagram of the application multi-data source integrating apparatus in one embodiment.
Specific embodiment
It is more clearly understood in order to the purpose of the present invention, technical solution and a little, it is with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is the flow chart for the multi-data source integration method that the application provides in one embodiment, as shown, packet
It includes:
S1, connection Grafana obtain the inquiry request that user inputs in client by the Grafana, described
Grafana obtains the inquiry request of client's input after being used to connect with client;
The communication interface for supporting HTTP mode in this step by being arranged on middleware, realizes the connection with Grafana;
Through Grafana after the inquiry request that client obtains user's input, then through communication interface, the inquiry request that will acquire is sent out
It send to middleware.
S2, the inquiry request is sent to middleware, the middleware be located at the Grafana and multiple data sources it
Between;
In this step by the way that the inquiry request obtained from client is encrypted after, described in after encryption
Inquiry request is sent to middleware together with query script and key together, and the middleware is located at the Grafana and multiple numbers
According between source, essence has acted as the source of new data of the Grafana directly accessed.
S3, the corresponding data source location is obtained according to the inquiry request, and pass through the middleware and the number
According to the interface in source, the query result of the inquiry request is searched for from the data source;
This step middleware can be by the configuration mode that Grafana is supported to it before obtaining the data that Grafana is sent
Carry out preparatory encryption configuration, though Grafana by middleware arrange in the way of to it obtain user query solicited message into
It goes after encrypting, then ciphertext is sent to middleware.For example, Grafana support with configuration file lead-in mode realize to itself
Configuration, then preset configuration file is sent to Grafana by middleware, will be to acquisition to Grafana in the configuration file
The modes such as the word string merging for algorithm, inquiry request and the data source access address that information is encrypted make configuration.Grafana hair
The encryption information come is decrypted or obtains data source wherein included using the algorithm for inversion of Encryption Algorithm via middleware and accesses
Address, the content of the inquiry computer instruction used with inquiry;
In this step, to make middleware access the database that multiple Grafana are supported originally or do not supported, collect wherein
Data-interface, middleware is supported to connect by these interfaces with corresponding data source at multiple data sources to be visited, and
Grafana only needs connection middleware, the contradiction that itself can not while directly access multiple data sources can be solved, for this purpose, in
Between caching mechanism is set in part, the request that Grafana is inquired in the multiple pairs of different data sources that the same time sends
Query result is cached, while caching query results also can avoid because the access delay or query time of certain data sources are poor
The problem of inquiry data caused by different can not be saved and be lost.
S4, the query result is fed back into user client by the Grafana;
The query result that middleware will acquire in this step is sent to Grafana, then is looked by the Grafana by described
It askes result and is back to user, to increase the safety of query result in the transmission, passed back again after being encrypted to query result
The end Grafana, Encryption Algorithm are as follows:
Ei=0 to n-1 { KSi=VHk(ctr+i)}
Wherein, E is encryption function, and K is key, and ctr is initial value, and the length is 64bit, VHkFor block cipher, KSiIt is close
Key stream, the value of i are [0, n-1].
The present embodiment is led to by being forwarded to middleware by Grafana after encrypting to the inquiry request that user inputs
It crosses integrated scripting access interface and realizes the data source realization support that do not supported originally a variety of Grafana, efficiently solve existing
The limited technical problem of the data source types for thering is Grafana to support.
In one embodiment, in the connection Grafana, user is obtained by the Grafana and is inputted in client
Inquiry request, the Grafana be used for connect with client after obtain client input inquiry request before, comprising:
Encryption configuration is generated according to certain encryption format to the access information of original data source to be visited;
Encryption configuration is generated after the access information of each original data source to be visited is encrypted in this step,
The access information of the original data source includes the path address of original data source, data source correspondence database type, access account
Number and corresponding password etc., such as original data source before encrypting access information format are as follows: the type of database/address ip/end
Slogan/database-name/usemame/password, for example, some mongodb type original data source access information plaintext such as
Under:
"mongodb/127.0.0.1/27017/dbname/user_name/pass_word";
Pass through the ciphertext generated after encryption are as follows:
NJ1RQq5IfCfkhgURyIikxXPDh21u0/MsDgzdi+OTLns=.
The encryption configuration is sent to Grafana;
Original data source is sent to Grafana according to generated encryption configuration by this step, the encryption configuration according to
The difference of data source is different, such as: the configuration format on Grafana are as follows: http: // data source integration system ip: number
Believe according to the access of source integration system port/encrypted original data source 1 access information/encrypted original data source 2
Breath/... the access information of/encrypted original data source n;The access information of encrypted original data source is at the end Grafana
Configuration format are as follows: http: // data source integration system ip: data source integration system port/
NJ1RQq5IfCfkhgURyIikxXPDh21u0/MsDgzdi+OTLns=;So that Grafana is according to the encryption configuration pair sent
The encryption rule of itself is updated, for example, defining that Grafana asks the access of received original data source in encryption configuration
It is encrypted when the access information for including in asking is encrypted using CTR algorithm.It can also before encryption, according to certain splicing rule
The information such as the access IP address of original data source and port numbers are then spliced into a string of character strings, convenient for carrying out one to the character string
Secondary property integrally encrypts, and saves process resource and process flow.Grafana itself has according to the configuration arranged according to Grafana
The function that the configuration file that file format generates is updated the execution attribute of itself.
The present embodiment realizes Grafana to it after carrying out encryption configuration by the access information to original data source
Originally the access for the various original data sources that do not support is supported.
In one embodiment, the connection Grafana obtains what user inputted in client by the Grafana
Inquiry request, the Grafana obtain the inquiry request of client's input after being used to connect with client, comprising:
The communication interface of HTTP mode is supported in setting on middleware, connects Grafana by the communication interface;
The communication interface for supporting HTTP mode in this step by being arranged at middleware end, realizes the connection with Grafana,
The middleware essence has acted as the source of new data of Grafana directly accessed, and original data source can be Grafana and not prop up
The data source held, the data source that do not support include the data sources such as mySQL, oracle, mongodb, have been also possible to Grafana
Data source through supporting, the data sources such as including Graphite, zabbix, InfluxDB, Prometheus and OpenTSDB,
Grafana goes to access various original data sources by source of new data.
The inquiry request that user inputs in client is obtained, and is sent to Grafana;
Obtained in this step the inquiry request that is sent by user by forms such as the webpages that is set to client to
Grafana is recalled after the Grafana is encrypted the inquiry request and is transmitted to middleware.
The present embodiment passes through the communication port being arranged on middleware and obtains by the encrypted inquiry request of Grafana, is
Middleware described in subsequent calls goes the corresponding query result of search in data source to provide the foundation.
Fig. 2 is the flow chart for the transmission inquiry request that the application provides in one embodiment, as shown in the figure, comprising:
S201, the inquiry request got is encrypted;
The Grafana is called to add user using CTR algorithm in the inquiry request that client inputs in this step
Close processing.
S202, the inquiry request after encryption is sent to the middleware, while by query script and key
It is sent to the middleware, the data that the query script needs to inquire for inquiring user in original data source are described close
Key is for being decrypted the inquiry request;
The key of inquiry request and query script and encryption after encryption is sent to centre together in this step
Part, the query script are generally write as by SQL, the data for needing to inquire for inquiring user in original data source, described
Key is decrypted the inquiry request for the middleware.
The present embodiment is encrypted inquiry request by using CTR algorithm, by the inquiry request and inquiry foot
This and encryption key are sent to middleware together, are decrypted and provide to the inquiry request for the subsequent middleware
Basis.
Fig. 3 is the flow chart for the search query results that the application provides in one embodiment, as shown in the figure, comprising:
S301, it is decrypted according to the inquiry request that key pair is got;
Inquiry request is decrypted using CTR algorithm by the key obtained in this step, what be will acquire is close
Key is input in decipherment algorithm, can be converted into the ciphertext received in plain text.
S302, according to the access information obtained after decryption processing, position the corresponding data source;
The access information after decryption processing is obtained in this step, obtains the key of the access information generic
Word positions corresponding data source according to the keyword, for example the access information obtained after decryption processing is " in ten before ranking
State rich and powerful people " navigate to corresponding data source " Chinese plutocrat's list " according to its keyword " rich and powerful people ".
S303, connection is established according to the scripting access interface and the data source that are arranged on the middleware;
By the way that scripting access interface is arranged in middleware in this step, established by the scripting interface and data source
Connection, if successful connection, executes query script into the data source, if connection failure, does not execute the query script,
And the information of connection failure is fed back into user by Grafana.
S304, it is searched for from the data source according to query script by the scripting access interface and is asked with the inquiry
Seek corresponding query result;
By the scripting interface in this step, the inquiry is executed in the data source according to the inquiry request
The corresponding query script is requested, the corresponding inquiry of the inquiry request is obtained according to the implementing result of the query script and is tied
Fruit, such as the inquiry request are " ten Chinese plutocrats before ranking ", execute and look into corresponding data source " Chinese plutocrat's list "
Script is ask, to find Chinese plutocrat's list in ranking preceding ten.
S305, the query result corresponding with the inquiry request that will acquire feed back to the Grafana;
It will be executed in this step described in the query result that the query script obtains is sent to by the middleware
Grafana recalls the Grafana for the query result and feeds back to user.
After the present embodiment is decrypted by the inquiry request transmitted to the Grafana, pass through the foot
This change interface obtains the corresponding query result of the inquiry request after executing the query script in the data source,
By Grafana to the ciphering process of inquiry request and the decrypting process of middleware, the Grafana is allowed to support difference
The data source information of type.
In one embodiment, the described pair of inquiry request got is encrypted, comprising:
The inquiry request got is encrypted using CTR algorithm, the encryption function of the CTR algorithm is such as
Shown in formula (1),
C=E (K, P) (1),
C is ciphertext in formula (1), and E is encryption function, and K is key, and P is in plain text, i.e., using plaintext P and key K as encryption
After the parameter input of function, ciphertext C can be exported according to encryption function E;
Shown in encryption function such as formula (2) based on the CTR algorithm pattern,
Ei=0 to n-1 { KSi=VHk(ctr+i) } (2),
Wherein, E is encryption function, and K is key, and ctr is initial value, and the length is 64bit, VHkFor block cipher, KSiIt is close
Key stream, the value of i are [0, n-1];
The inquiry request is encrypted by CTR algorithm in this step, and retains the key of the ciphering process, by institute
It states key and is sent to middleware and the inquiry request is decrypted for the middleware to be subsequent.
By being encrypted to inquiry request in the present embodiment, the inquiry request after encryption is sent to described
Middleware is decrypted, and the Encryption Algorithm for the information of the data source of encryption type there is no limit, it is therefore provided that
Grafana during executing cryptographic operation for data source types there is no limit.
In one embodiment, described according to the scripting access interface being arranged on the middleware and the data source
Establish connection, comprising:
The querying command and data source access path and access right for including in the inquiry request after obtaining decryption processing
Limit information establishes connection by scripting access interface and data source;
Middleware is decrypted the inquiry request got by CTR algorithm in this step, and obtains solution
Querying command and data source access path and access authority information included in close treated the inquiry request, then pass through
The inquiry request establishes connection by the scripting access interface and data source.
If successful connection, the query script for including in the inquiry request is executed in the data source, will be looked into
The result ask is sent to the Grafana and feeds back to user client;If connection failure, the inquiry foot is not executed
This, and error message is sent to the Grafana, and error message is fed back to by user client by the Grafana;
Connection is established by the scripting interface and the data source in this step, if successful connection, the middleware
The query script is executed by built-in script engine, the data source is held according to the order and parameter of the query script
Row inquiry operation, and query result is back to Grafana, the query result is fed back into user by the Grafana;If
Connection failure, then do not execute the query script, and the middleware will return to error message to the Grafana, and by institute
It states Grafana and the error message is fed back into user.
The present embodiment is built by the scripting interface with the data source according to the inquiry request after decryption processing
Vertical connection, executes the query script, if connection failure feedback error information saves inquiry to user if successful connection
Time goes to execute the process once searched for without instructing for each inquiry request, improves work efficiency.
Based on identical design, the application also proposed a kind of multi-data source integrating apparatus, as shown in figure 4, the majority
It include obtaining module, sending module, enquiry module and output module according to source integrating apparatus, in which: obtain module, be set as connecting
Grafana obtains the inquiry request that user inputs in client by the Grafana;Sending module is set as looking into described
It askes request and is sent to middleware, the middleware is between the Grafana and multiple data sources;Enquiry module is set as
The corresponding data source location is obtained according to the inquiry request, and by the interface of the middleware and the data source,
The query result of the inquiry request is searched for from the data source;Output module is set as the query result passing through institute
It states Grafana and feeds back to user client.
In one embodiment, the multi-data source integrating apparatus further includes configuration module, and the configuration module includes:
Formatting unit is set as adding the access information of original data source to be visited according to the generation of certain encryption format
Close configuration;
Configuration unit is set as the encryption configuration being sent to Grafana.
In one embodiment, the execution sequence of the configuration module is located at before the acquisition module.
In one embodiment, the acquisition module includes:
Connection unit is set as the communication interface that HTTP mode is supported in the setting on middleware, passes through the communication interface
Connect Grafana;
Acquiring unit is set as obtaining the inquiry request that user inputs in client, and is sent to Grafana.
In one embodiment, the sending module includes:
Cryptographic processing unit is set as that the inquiry request got is encrypted;
Transmission unit is set as the inquiry request after encryption being sent to the middleware, while will inquiry
Script and key are sent to the middleware, the number that the query script needs to inquire for inquiring user in the data source
According to the key is for being decrypted the inquiry request.
In one embodiment, the enquiry module includes:
Decryption processing unit, the inquiry request for being set as being got according to key pair are decrypted;
Positioning unit is set as positioning the corresponding data source according to the access information obtained after decryption processing;
Data source connection unit is set as according to the scripting access interface and the data being arranged on the middleware
Connection is established in source;
Search unit, be set as being searched for from the data source according to query script by the scripting access interface with
The corresponding query result of the inquiry request;
Feedback unit, the query result corresponding with the inquiry request for being set as will acquire feed back to described
Grafana。
In one embodiment, the cryptographic processing unit further include:
Encryption Algorithm unit is set as that the inquiry request got is encrypted using CTR algorithm, described
Shown in the encryption function of CTR algorithm such as formula (1),
C=E (K, P) (1),
C is ciphertext in formula (1), and E is encryption function, and K is key, and P is in plain text, i.e., using plaintext P and key K as encryption
After the parameter input of function, ciphertext C can be exported according to encryption function E;
Shown in encryption function such as formula (2) based on the CTR algorithm pattern,
Ei=0 to n-1 { KSi=VHk(ctr+i) } (2),
Wherein, E is encryption function, and K is key, and ctr is initial value, and the length is 64bit, VHkFor block cipher, KSiIt is close
Key stream, the value of i are [0, n-1].
In one embodiment, the data source connection unit further include:
Connection unit is established, the querying command and data for including in the inquiry request after being set as acquisition decryption processing
Source access path and access authority information establish connection by scripting access interface and data source;
Query unit is executed, if being set as successful connection, is executed in the data source in the inquiry request and includes
The query script, the result inquired is sent to the Grafana and feeds back to user client;If connection failure,
It does not execute the query script then, and error message is sent to the Grafana, and believe mistake by the Grafana
Breath feeds back to user client.
Based on the same technical idea, the embodiment of the present application also provides a kind of computer equipment, the computer equipment packet
Memory and processor are included, computer-readable instruction is stored in memory, computer-readable instruction is handled by one or more
When device executes, so that one or more processors realize the majority in the various embodiments described above when executing computer-readable instruction
The step of according to source integration method.
Based on the same technical idea, the embodiment of the present application also provides a kind of storage Jie for being stored with computer-readable instruction
Matter, when the computer-readable instruction is executed by one or more processors, so that one or more processors execute institute
The step of realizing the multi-data source integration method in the various embodiments described above when stating computer-readable instruction.Wherein, the storage is situated between
Matter can be non-volatile memory medium.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random
Access Memory), disk or CD etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
Some exemplary embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but
It cannot be construed as a limitation to the scope of the present invention.It should be pointed out that for the ordinary skill people of this field
For member, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to of the invention
Protection scope.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of multi-data source integration method, which is characterized in that the multi-data source integration method, comprising:
Grafana is connected, the inquiry request that user inputs in client is obtained by the Grafana, the Grafana is used for
The inquiry request of client's input is obtained after connecting with client;
The inquiry request is sent to middleware, the middleware is between the Grafana and multiple data sources;
The corresponding data source location is obtained according to the inquiry request, and connecing by the middleware and the data source
Mouthful, the query result of the inquiry request is searched for from the data source;
The query result is fed back into user client by the Grafana.
2. a kind of multi-data source integration method as described in claim 1, which is characterized in that in the connection Grafana, pass through
The Grafana obtains the inquiry request that user inputs in client, and the Grafana is for obtaining visitor after connecting with client
Before the inquiry request of family input, comprising:
Encryption configuration is generated according to certain encryption format to the access information of original data source to be visited;
The encryption configuration is sent to Grafana.
3. a kind of multi-data source integration method as described in claim 1, which is characterized in that the connection Grafana passes through institute
It states Grafana and obtains the inquiry request that user inputs in client, the Grafana is for obtaining client after connecting with client
The inquiry request of input, comprising:
The communication interface of HTTP mode is supported in setting on middleware, connects Grafana by the communication interface;
The inquiry request that user inputs in client is obtained, and is sent to Grafana.
4. a kind of multi-data source integration method as described in claim 1, which is characterized in that described to be sent to the inquiry request
Middleware, the middleware is between the Grafana and multiple data sources, comprising:
The inquiry request got is encrypted;
The inquiry request after encryption is sent to the middleware, while query script and key being sent to described
Middleware, the data that the query script needs to inquire for inquiring user in original data source, the key are used for institute
Inquiry request is stated to be decrypted.
5. a kind of multi-data source integration method as described in claim 1, which is characterized in that described to be obtained according to the inquiry request
The corresponding data source location is taken, and by the interface of the middleware and the data source, is searched for from the data source
The query result of the inquiry request, comprising:
It is decrypted according to the inquiry request that key pair is got;
According to the access information obtained after decryption processing, the corresponding data source is positioned;
Connection is established according to the scripting access interface and the data source that are arranged on the middleware;
It is searched for from the data source according to query script by the scripting access interface corresponding with the inquiry request
Query result;
The query result corresponding with the inquiry request that will acquire feeds back to the Grafana.
6. a kind of multi-data source integration method as claimed in claim 2, which is characterized in that the described pair of inquiry got
Request is encrypted, comprising:
The inquiry request got is encrypted using CTR algorithm, the encryption function such as formula of the CTR algorithm
(1) shown in,
C=E (K, P) (1),
C is ciphertext in formula (1), and E is encryption function, and K is key, and P is in plain text, i.e., using plaintext P and key K as encryption function
Parameter input after, ciphertext C can be exported according to encryption function E;
Shown in encryption function such as formula (2) based on the CTR algorithm pattern,
Ei=0to n-1 { KSi=VHk(ctr+i) } (2),
Wherein, E is encryption function, and K is key, and ctr is initial value, and the length is 64bit, VHkFor block cipher, KSiFor key
Stream, the value of i are [0, n-1].
7. a kind of multi-data source integration method as claimed in claim 5, which is characterized in that described according to being arranged in the centre
Scripting access interface and the data source on part establish connection, comprising:
Querying command and data source access path and the access authority letter for including in the inquiry request after obtaining decryption processing
Breath establishes connection by scripting access interface and data source;
If successful connection, the query script for including in the inquiry request is executed in the data source, will be inquired
Result be sent to the Grafana and feed back to user client;
If connection failure, the query script is not executed, and error message is sent to the Grafana, and by described
Error message is fed back to user client by Grafana.
8. a kind of multi-data source integrating apparatus, which is characterized in that the multi-data source integrating apparatus includes:
Module is obtained, connection Grafana is set as, the inquiry request that user inputs in client is obtained by the Grafana,
The Grafana obtains the inquiry request of client's input after being used to connect with client;
Sending module is set as the inquiry request being sent to middleware, and the middleware is located at the Grafana and multiple
Between data source;
Enquiry module is set as obtaining the corresponding data source location according to the inquiry request, and passes through the middleware
With the interface of the data source, the query result of the inquiry request is searched for from the data source;
Output module is set as the query result feeding back to user client by the Grafana.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is described
When computer-readable instruction is executed by one or more processors, so that one or more processors execute such as right
It is required that described in any one of 1 to 7 the step of multi-data source integration method.
10. a kind of storage medium for being stored with computer-readable instruction, the computer-readable instruction is handled by one or more
When device executes, so that one or more processors execute the multi-data source integration as described in any one of claims 1 to 7
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811265525.2A CN109656989A (en) | 2018-10-29 | 2018-10-29 | Multi-data source integration method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811265525.2A CN109656989A (en) | 2018-10-29 | 2018-10-29 | Multi-data source integration method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109656989A true CN109656989A (en) | 2019-04-19 |
Family
ID=66110342
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811265525.2A Pending CN109656989A (en) | 2018-10-29 | 2018-10-29 | Multi-data source integration method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109656989A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704476A (en) * | 2019-10-08 | 2020-01-17 | 北京锐安科技有限公司 | Data processing method, device, equipment and storage medium |
CN112804050A (en) * | 2021-04-14 | 2021-05-14 | 湖南大学 | Multi-source data query system and method |
CN113778502A (en) * | 2020-06-29 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Data processing method, device, system and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020069355A1 (en) * | 1998-06-25 | 2002-06-06 | Fiware, Inc. | System and method for securely accessing a database from a remote location |
CN103946841A (en) * | 2011-11-17 | 2014-07-23 | 益焦.com有限公司 | Systems and methods for dynamic service integration |
CN104516908A (en) * | 2013-09-29 | 2015-04-15 | 华为技术有限公司 | Database access method and device |
CN106649630A (en) * | 2016-12-07 | 2017-05-10 | 乐视控股(北京)有限公司 | Data query method and device |
CN106844546A (en) * | 2016-12-30 | 2017-06-13 | 江苏号百信息服务有限公司 | Multi-data source positional information fusion method and system based on Spark clusters |
CN107122365A (en) * | 2016-02-25 | 2017-09-01 | 阿里巴巴集团控股有限公司 | The access method and device of heterogeneous database |
CN107370725A (en) * | 2017-06-21 | 2017-11-21 | 西安电子科技大学 | The access method and system of general encrypting database under a kind of cloud environment |
CN107818127A (en) * | 2017-09-09 | 2018-03-20 | 国网浙江省电力公司 | A kind of querying method and system for multi-source data |
CN108108439A (en) * | 2017-12-21 | 2018-06-01 | 北京奇艺世纪科技有限公司 | A kind of data query method, apparatus and electronic equipment |
-
2018
- 2018-10-29 CN CN201811265525.2A patent/CN109656989A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020069355A1 (en) * | 1998-06-25 | 2002-06-06 | Fiware, Inc. | System and method for securely accessing a database from a remote location |
CN103946841A (en) * | 2011-11-17 | 2014-07-23 | 益焦.com有限公司 | Systems and methods for dynamic service integration |
CN104516908A (en) * | 2013-09-29 | 2015-04-15 | 华为技术有限公司 | Database access method and device |
CN107122365A (en) * | 2016-02-25 | 2017-09-01 | 阿里巴巴集团控股有限公司 | The access method and device of heterogeneous database |
CN106649630A (en) * | 2016-12-07 | 2017-05-10 | 乐视控股(北京)有限公司 | Data query method and device |
CN106844546A (en) * | 2016-12-30 | 2017-06-13 | 江苏号百信息服务有限公司 | Multi-data source positional information fusion method and system based on Spark clusters |
CN107370725A (en) * | 2017-06-21 | 2017-11-21 | 西安电子科技大学 | The access method and system of general encrypting database under a kind of cloud environment |
CN107818127A (en) * | 2017-09-09 | 2018-03-20 | 国网浙江省电力公司 | A kind of querying method and system for multi-source data |
CN108108439A (en) * | 2017-12-21 | 2018-06-01 | 北京奇艺世纪科技有限公司 | A kind of data query method, apparatus and electronic equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704476A (en) * | 2019-10-08 | 2020-01-17 | 北京锐安科技有限公司 | Data processing method, device, equipment and storage medium |
CN113778502A (en) * | 2020-06-29 | 2021-12-10 | 北京沃东天骏信息技术有限公司 | Data processing method, device, system and storage medium |
CN112804050A (en) * | 2021-04-14 | 2021-05-14 | 湖南大学 | Multi-source data query system and method |
CN112804050B (en) * | 2021-04-14 | 2021-07-02 | 湖南大学 | Multi-source data query system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3916604B1 (en) | Method and apparatus for processing privacy data of block chain, device, storage medium and computer program product | |
JP6048414B2 (en) | Database apparatus, method and program | |
JP5344109B1 (en) | Database encryption system, method and program | |
US10235539B2 (en) | Server device, recording medium, and concealed search system | |
CN103051664B (en) | A kind of file management method of cloud storage system, device and this cloud storage system | |
US8458208B2 (en) | Automated data source assurance in distributed databases | |
US9858301B1 (en) | Selective flushing of a database journal for an asymmetrically-encrypted database | |
US11546348B2 (en) | Data service system | |
CN109656989A (en) | Multi-data source integration method, device, computer equipment and storage medium | |
CN108628743A (en) | Applied program testing method, device, equipment and storage medium | |
US11537760B2 (en) | Web application execution with secure elements | |
CN112417476A (en) | Desensitization method and data desensitization system for sensitive data | |
US11386214B2 (en) | Web application execution with secure element extension | |
JP4979210B2 (en) | Login information management apparatus and method | |
US9626410B2 (en) | Vertically partitioned databases | |
US10372710B2 (en) | Using metadata to take action on an SMS message on a proprietary system | |
JP2015090993A (en) | Encryption control device, encryption control method and program | |
CN111400743B (en) | Transaction processing method, device, electronic equipment and medium based on blockchain network | |
US20070253621A1 (en) | Method and system to process a data string | |
JP6732887B2 (en) | Method and system for database queries | |
CN115270180A (en) | Log storage and packaging method and device | |
CN114741706A (en) | Virtual disk file encryption method, device and equipment | |
CN107707532A (en) | URL generations, query argument verification method, device, equipment and storage medium | |
CN112565156A (en) | Information registration method, device and system | |
CN113821814A (en) | Model file generation and analysis method, device, equipment and storage medium |
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 |