CN114372040A - Dynamic data source management method and system, client, equipment and storage medium - Google Patents

Dynamic data source management method and system, client, equipment and storage medium Download PDF

Info

Publication number
CN114372040A
CN114372040A CN202210002757.9A CN202210002757A CN114372040A CN 114372040 A CN114372040 A CN 114372040A CN 202210002757 A CN202210002757 A CN 202210002757A CN 114372040 A CN114372040 A CN 114372040A
Authority
CN
China
Prior art keywords
data source
client application
dynamic
regulation
control instruction
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
CN202210002757.9A
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.)
China Railway Trip Science And Technology Co ltd
China Academy of Railway Sciences Corp Ltd CARS
Institute of Computing Technologies of CARS
Beijing Jingwei Information Technology Co Ltd
Original Assignee
China Railway Trip Science And Technology Co ltd
China Academy of Railway Sciences Corp Ltd CARS
Institute of Computing Technologies of CARS
Beijing Jingwei Information 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 China Railway Trip Science And Technology Co ltd, China Academy of Railway Sciences Corp Ltd CARS, Institute of Computing Technologies of CARS, Beijing Jingwei Information Technology Co Ltd filed Critical China Railway Trip Science And Technology Co ltd
Priority to CN202210002757.9A priority Critical patent/CN114372040A/en
Publication of CN114372040A publication Critical patent/CN114372040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems

Abstract

The application discloses a dynamic data source management method and system, a client, equipment and a storage medium, wherein the method comprises the following steps: dynamic data source management: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, encrypting and issuing the data source configuration to the client application, receiving a subscription request of the client application, and broadcasting a regulation and control instruction to the client application; a client application starting step: the client side application sends a data source configuration request, carries out decryption processing after acquiring data source configuration, sends a channel connection request to a corresponding data source, and simultaneously subscribes a regulation and control instruction; and (3) data source dynamic connection: and after receiving the channel connection request of the client application, the data source establishes a dynamic connection channel with the corresponding client application to realize the dynamic connection between the client application and the data source.

Description

Dynamic data source management method and system, client, equipment and storage medium
Technical Field
The present application relates to the field of database management, and in particular, to a dynamic data source management method, system, computer device, and computer-readable storage medium.
Background
At present, in the conventional data source management technology, data source configuration management generally adopts a static configuration file manner to maintain data source connection configuration information at an application end. This method is a static and direct management method, and requires developers to focus on business and maintain static data source configuration files, and the developers need to invest a lot of effort to maintain cumbersome data source configuration files.
Meanwhile, when the application service adopting the traditional data source management technology is started, the statically maintained data source configuration in the configuration file is read, and a connection channel is established with the corresponding data source. After the project is started, the application can perform business operation through a connection channel with the data source. However, after the application is on line, when configuration information of a certain data source changes, operation and maintenance personnel are required to manually modify the configuration file of the data source and restart the application service, so that the modification of the data source can be completed; when a certain data source is down, operation and maintenance personnel cannot find the data source in time, so that the data source repair is delayed, and even irreversible loss is caused. Therefore, how to improve operation and maintenance and emergency efficiency when downtime occurs becomes very important.
Further, in the current internet enterprises, the use of data storage is extremely wide, and with the development of technology, various types of storage components are layered endlessly, and the way in which a single application uses multiple data sources at the same time becomes very common. At this time, if the traditional static data source connection mode is continuously adopted, the context of the configuration file becomes huge, the data source management work becomes extremely complicated due to the high coupling of the application and the data source, and once the operation is mishandled, the serious consequence that the whole body is dragged and moved is caused. Therefore, how to reasonably perform the dynamic data source configuration management becomes a key problem. Moreover, with the expansion of the organization scale of the internet enterprise, how to safely perform the normative use management of the data source in a complex organization architecture also becomes a difficult problem.
In order to solve the pain of the developers, the operation and maintenance personnel and the internet enterprises, a dynamic data source connection management technology is developed. The invention provides a dynamic data source connection method, which aims to further improve the dynamic management mode of a data source on the basis of continuously using a data source connection mode established at an application end before. A high coupling mode directly managed at an application end is changed to depend on third-party centralized management, so that the complex maintenance work of developers is reduced, and the output efficiency is improved; a complicated configuration file is abandoned, a data source configuration modification mode is changed from the configuration file to a graphical monitoring interface which is convenient to understand, real-time monitoring is added, and the operation and maintenance efficiency and the emergency efficiency of operation and maintenance personnel are improved; the access control of the data source authority is added, the data source configuration information is desensitized, and the data source normative use management can be safely carried out in enterprises with complex organizational structures.
Disclosure of Invention
The embodiment of the application provides a dynamic data source connection method for a railway ticket system, and aims to continuously use a method for dynamically establishing data source connection at a current application end, improve a management mode in the aspect of a data source and change the current data source management mode from static to dynamic.
In a first aspect, an embodiment of the present application provides a dynamic data source management method, including:
dynamic data source management: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, and issuing the data source configuration to the client application;
a client application starting step: the client application sends a data source configuration request, and sends a channel connection request to a corresponding data source after acquiring data source configuration processing;
and (3) data source dynamic connection: and after receiving the channel connection request of the client application, the data source establishes a dynamic connection channel with the corresponding client application to realize the dynamic connection between the client application and the data source.
In an embodiment of the present invention, the dynamic data source management step includes:
managing and monitoring: uniformly managing client application and data source configuration, monitoring the connection state of the client application and the data source, and issuing a regulation instruction;
a service request step: providing a communication interface service, receiving and transmitting the regulation and control instruction, receiving a data source configuration acquisition request of the client application and issuing the data source configuration;
a release step: receiving a regulation and control instruction, and broadcasting and issuing the regulation and control instruction to a client application subscribed with the regulation and control instruction;
a storage module: and providing a data storage service and storing the data source configuration.
In an embodiment of the present invention, the step of managing and monitoring further includes:
an initialization step: registering a client application and a data source, associating the client application with the data source, and specifying the number of dynamic connections in a dynamic connection channel;
a configuration management step: managing storage of data source configurations;
a tenant management step: creating a tenant, managing tenant permission, binding the tenant with a related data source, and designating a client in the tenant;
and (3) performing downtime protection: when the data source is down or the data source has a network fault, broadcasting and issuing a down regulation and control instruction to the client application, and cutting off or rebuilding a dynamic connection channel established with the corresponding data source by the client application based on the down regulation and control instruction;
dynamic regulation and control steps: broadcasting and issuing a dynamic regulation and control instruction to a client application, wherein the client application dynamically adjusts the number of dynamic connection channels or dynamic connection numbers established with corresponding data sources based on the dynamic regulation and control instruction, and the dynamic adjustment operation comprises addition, modification or deletion;
an encryption step: and encrypting the data source configuration and regulation and control instruction, receiving the encrypted data source configuration and regulation and control instruction by the client application, and performing corresponding operation after decryption.
In an embodiment of the present invention, the request service step includes:
a heartbeat monitoring step: and receiving heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the connection state of the client and the data source.
In this embodiment of the present invention, the issuing step further includes:
a broadcasting step: the client application is used for broadcasting and issuing the regulation and control instruction to the client application subscribed with the regulation and control instruction.
In an embodiment of the present invention, the storing step further includes:
storing the encrypted data source configuration, storing heartbeat data, storing the binding relationship between the client application and the data source, and storing the encryption key and the tenant permission information.
In a second aspect, an embodiment of the present application provides a dynamic data source management system, which adopts the above dynamic data source management method, and includes:
the dynamic data source management module: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, and issuing the data source configuration to the client application;
a plurality of client applications: the client application sends a data source configuration request to the dynamic data source management module, and sends a channel connection request to a corresponding data source after acquiring data source configuration processing;
a variety of data sources: and the data source establishes a connection channel with the corresponding client application after receiving the channel connection request of the client application, so as to realize the dynamic connection of the data source.
In an embodiment of the present invention, the dynamic data source management module includes:
the management monitoring module: the system is used for uniformly managing the client application and data source configuration, monitoring the connection state of the client application and the data source, and issuing a regulation and control instruction;
a request service module: the connection management monitoring module is used for communicating with the client application and the management monitoring module, receiving and transmitting the regulation and control instruction, receiving a data source configuration acquisition request of the client application and issuing the data source configuration;
a release module: the connection request service module is used for receiving the regulation and control instruction and broadcasting and issuing the regulation and control instruction to the client application subscribed with the regulation and control instruction;
a storage module: the device comprises a connection management monitoring module and a request service module, wherein the storage module is used for providing data storage and storing data source configuration.
In an embodiment of the present invention, the management monitoring module further includes:
an initialization module: the system is used for registering a client application and a data source, associating the client application with the data source and specifying the number of dynamic connections in a dynamic connection channel;
a configuration management module: a storage for managing data source configurations;
a tenant management module: the system is used for creating a tenant, managing the tenant authority, binding the tenant and a related data source, and designating a client in the tenant;
the downtime protection module: when the data source is down or the data source has a network fault, broadcasting and issuing a down regulation and control instruction to all client applications, and cutting off or rebuilding a dynamic connection channel established with the corresponding data source by the client applications based on the down regulation and control instruction;
a dynamic regulation module: broadcasting and issuing a dynamic regulation and control instruction to a client application, wherein the client application dynamically adjusts the number of dynamic connection channels or dynamic connection numbers established with corresponding data sources based on the dynamic regulation and control instruction, and the dynamic adjustment operation comprises addition, modification or deletion;
an encryption module: and encrypting the data source configuration and regulation and control instruction, receiving the encrypted data source configuration and regulation and control instruction by the client application, and performing corresponding operation after decryption.
In an embodiment of the present invention, the request service module includes:
a heartbeat monitoring module: the management monitoring module is used for receiving heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the connection state of the client and the data source.
In an embodiment of the present invention, the issuing module further includes:
a broadcasting module: the client application is used for broadcasting and issuing the regulation and control instruction to the regulation and control instruction subscribed client application.
In an embodiment of the present invention, the storage module further includes:
the system is used for storing encrypted data source configuration, heartbeat data, the binding relationship between client application and the data source, and encryption keys and tenant permission information.
In a third aspect, an embodiment of the present application provides a client, which uses the above dynamic data source management method, and includes the above multiple client applications.
In a fourth aspect, an embodiment of the present application provides a server device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the dynamic data source management method as described above when executing the computer program.
In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the dynamic data source management method according to the first aspect.
Compared with the related prior art, the method has the following outstanding advantages:
1. the method abandons the original management mode of directly performing static data source configuration on the client application, and transfers the data source configuration management right to the dynamic data source manager, so that the client application and the data source realize loose coupling, and the centralized management of the data source is realized;
2. the invention adopts a heartbeat mechanism: monitoring the running state of the client application and the connection state of the data source, and automatically taking emergency measures and giving an alarm when the running state of the application is abnormal;
3. the invention has high safety: sensitive information in the data source configuration is desensitized, and the safety of the system is improved;
4. the invention has high universality: the permission management of the data source is carried out in a tenant mode, the universality of a dynamic data source manager is improved, and the abuse of the data source is prevented;
5. the invention has high reliability: when the data source dynamic regulation and control are carried out, the connection number of the data source of each application can be regulated and controlled, so that the most balanced performance can be achieved in different environments; data sources can be added, modified or deleted in the application operation; the method can also be used for temporarily shielding the corresponding data source for emergency when the data source is down;
6. the invention has a loosely coupled architecture: the original C/S management mode is changed into a management mode depending on a third party on the management architecture, so that developers can concentrate on business when developing client application and cannot be limited by complicated data source maintenance work.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a dynamic data source management method of the present invention;
FIG. 2 is a diagram illustrating an embodiment of a dynamic data source management system;
FIG. 3 is a schematic diagram of the dynamic data source management system of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a server device according to an embodiment of the present application.
In the above figures:
100 dynamic data source management system
10 dynamic data source management module 20 client application module
30 data source module
81. A processor; 82. a memory; 83. a communication interface; 80. a bus.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The invention aims to provide a dynamic data source connection management technology, which can more conveniently complete the adaptation function of various data sources and manage the dynamic interactive connection between the application service and the data sources.
The dynamic data source connection management technology provided by the invention discards the original management mode of data source configuration in the client application, and transfers the data source configuration management right to the dynamic data source manager, so that the client application and the data source are loosely coupled. The original C/S management mode is changed into a management mode depending on a third party.
When one client application uses a plurality of data sources, the corresponding data source information is only registered in the dynamic data source manager in advance, and the used data source is bound for the client application. When the client application is started, the dynamic data source manager is requested to acquire the data source configuration information bound to the application, and a connection channel of the data source bound to the application is directly established at the application end.
Fig. 1 is a schematic flow diagram of a method of the present invention, and as shown in fig. 1, an embodiment of the present application provides a dynamic data source management method, including:
dynamic data source management step S10: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, and issuing the data source configuration to the client application;
client application starting step S20: the client application sends a data source configuration request, and sends a channel connection request to a corresponding data source after acquiring data source configuration processing;
data source dynamic connection step S30: and after receiving the channel connection request of the client application, the data source establishes a dynamic connection channel with the corresponding client application to realize the dynamic connection between the client application and the data source.
Wherein, the dynamic data source management step S10 includes:
managing and monitoring: uniformly managing client application and data source configuration, monitoring the connection state of the client application and the data source, and issuing a regulation instruction;
a service request step: providing a communication interface service, receiving and transmitting a regulation and control instruction, receiving a data source configuration acquisition request of a client application and issuing data source configuration;
a release step: receiving a regulation and control instruction, and broadcasting and issuing the regulation and control instruction to a client application subscribed with the regulation and control instruction;
a storage module: and providing a data storage service and storing the data source configuration.
Wherein, the step of managing and monitoring further comprises:
an initialization step: registering a client application and a data source, associating the client application with the data source, and specifying the number of dynamic connections in a dynamic connection channel;
a configuration management step: managing storage of data source configurations;
a tenant management step: creating a tenant, managing tenant permission, binding the tenant with a related data source, and designating a client in the tenant;
and (3) performing downtime protection: when the data source is down or the data source has a network fault, broadcasting and issuing a down regulation and control instruction to the client application, and cutting off or rebuilding a dynamic connection channel established with the corresponding data source by the client application based on the down regulation and control instruction;
dynamic regulation and control steps: broadcasting and issuing a dynamic regulation and control instruction to a client application, wherein the client application dynamically adjusts the number of dynamic connection channels or dynamic connection numbers established with corresponding data sources based on the dynamic regulation and control instruction, and the dynamic adjustment operation comprises addition, modification or deletion;
an encryption step: and encrypting the data source configuration and regulation and control instruction, receiving the encrypted data source configuration and regulation and control instruction by the client application, and performing corresponding operation after decryption.
Wherein, the request service step comprises:
a heartbeat monitoring step: and receiving heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the connection state of the client and the data source.
Wherein, the issuing step further comprises:
a broadcasting step: the client application is used for broadcasting and issuing the regulation and control instruction to the client application subscribed with the regulation and control instruction.
In an embodiment of the present invention, the storing step further includes:
storing the encrypted data source configuration, storing heartbeat data, storing the binding relationship between the client application and the data source, and storing the encryption key and the tenant permission information.
The following detailed description of specific embodiments of the invention refers to the accompanying drawings in which:
1. design scheme of functional architecture
As shown in FIG. 2, the overall architecture is mainly divided into three parts, namely a client, a data source and a dynamic data source manager.
The client is all client applications which request the dynamic data source manager to acquire configuration, regularly send heartbeat to the dynamic data source manager, establish a connection channel with the data source, maintain a specified number of connections in the channel according to the configuration of the data source, subscribe an instruction issued by the dynamic data source manager, and obey the management and scheduling of the dynamic data source manager.
The data source refers to a real data storage component, and includes a relational database, a non-relational database, a cache storage, a big data storage, an object storage and the like.
The dynamic data source manager is mainly responsible for configuring storage, requesting scheduling, managing monitoring and issuing instructions. The dynamic data source manager comprises a management monitor, a request server, a publisher and a storage, wherein the management monitor and the request server share the configuration and data storage volume in the storage. The request server processes a request of the client application and an instruction of the management monitor, is responsible for heartbeat recording of the client application, data source configuration issuing and transmission of the instruction of the management monitor, and has an HTTPS communication protocol with the client application; the management monitor provides a visual interface, and can visually monitor the application state, the connection state of the data source, the storage and maintenance of the application data source configuration, the tenant authority management and the instruction issue; the publisher provides an instruction broadcasting function, and broadcasts the received instruction to the client application subscribed to the publisher; the memory provides a data storage function, and stores desensitized data source configuration information, heartbeat records of applications, binding relationships between the applications and the data source, encryption keys and tenant permission information.
The dynamic data source manager has the following functions:
the data source information is managed by adopting a centralized and visual method, the client application and the data source configuration information can be conveniently registered and maintained through the page, and the client application and the data source configuration information are bound.
Sensitive information in the data source configuration is desensitized by using an encryption algorithm, so that the security is improved.
Receiving heartbeats of each client application so as to visually monitor the running state of the client application and the connection state of the data source, marking the application as a stop running state by the dynamic data source manager when the running state of a certain application is abnormal, logically recycling the connection number corresponding to the data source, and sending related alarm information by the monitoring page.
The number of data source connections distributed by each client application can be regulated and controlled in a personalized mode through the deployment environment.
The concept of the tenant is introduced, different data source permissions are given to each tenant, and developers need to bind the tenant for the client application in advance to determine which data sources the client application has the right to use.
When a data source needs to be newly added, modified or deleted in the running process of a certain application, or the number of connections in a data source connection channel needs to be modified, or the application is used for disaster recovery (namely a data source which is down in a client application cluster needs to be temporarily shielded), the method can be realized by using a publishing and subscribing function of a dynamic data source manager to send a regulation and control instruction to inform the client application.
The following explains a specific implementation of the dynamic data source connection method according to the specific embodiment of the present invention:
1. initialization
The initialization operation refers to the setting of information such as tenants, client applications, data sources, encryption configuration and the like through a management monitor interface at the beginning of project development, the step only needs to be operated once, and the management of dynamic data source connection can be automatically realized subsequently, and the specific operation flow is as follows:
1) the administrator registers the client application and data source related configuration information into the dynamic data source manager through the interface so that it can identify the corresponding client and data source. When registering data sources, it is necessary to set information such as the number of connections, encryption method, and key for each data source.
2) The method comprises the steps of creating a tenant through an interface, binding a data source which the tenant has the right to use for the tenant, and merging clients into a designated tenant, wherein a plurality of application clients can exist under a single tenant, and the single application client only belongs to one tenant. Or, the tenant may be created first, and the operation of the first step is performed under the tenant interface.
3) And associating the client application with the data source used by the client application through the interface, and setting the data source connection number for each client application in a personalized manner.
2. Client application configuration and startup process
The initialization process is introduced, and after the initialization operation is completed, a developer can perform encoding and debugging operations. Before encoding, a secret key needs to be configured at a client so as to decrypt and establish a data source connection channel after the configuration sent by the dynamic data source manager is acquired. The start-up procedure is described in detail below:
1) when the client application is started, the publisher is required to be subscribed to receive the broadcast regulation and control command issued by the publisher, the request server is accessed to obtain the data source configuration, and the request server inquires the data source configuration information which is set by the management monitor in the memory and issues the data source configuration information to the client application.
2) After receiving the configuration sent by the request server, the client application decrypts the configuration information through the key, creates a connection channel according to the configuration and the corresponding data source, and maintains the connection with the designated number in the connection channel according to the configuration.
3) After the client application is started, the heartbeat is sent to the request server at regular time, and the main content of the heartbeat is the application state and the state information of the connected data source. And after receiving the heartbeat request, the request server maintains heartbeat data in a data storage volume for monitoring and scheduling by the management monitor. When the client application terminal carries out self service, different data sources are matched through parameter identifications of different services, and then the appointed data source is accessed through the matched data source connecting channel, so that dynamic connection between the client application terminal and the data source is realized.
3. Data source regulation and control during application runtime
After the application is started, if the data source configuration is changed (such as a data source address, a password, a connection number and the like) or a disaster recovery is required, real-time data source regulation and control operation is required.
The client is applied to actual operation, and needs to be configured according to a timely regulation and control data source of an operation environment, for example: when the alarm of the management monitor finds that the connection status of a certain data source is unavailable (that is, the data source is down or a network fault occurs between the data source and the application cluster), all client applications using the data source are affected, and at this time, the data source needs to be temporarily shielded.
The management monitor may perform the above-described regulation operations, which define the commonly used regulation instructions. When configuring the regulation and control data source, a regulation and control instruction is required to be sent to the request server at the management monitor terminal, the regulation and control instruction mainly comprises encrypted data source information and specific regulation and control operation, and the request server broadcasts the regulation and control instruction to all client applications through the publisher. When receiving the broadcast, the client application judges whether the data source is contained, if so, all connections with the data source are temporarily disconnected; if the data source is not included, no action is taken. Similarly, after the data source is repaired, the sending instruction can be regulated again to ensure that the application is reconnected with the corresponding data source.
In addition, when a certain client application needs to regulate the number of connections in the data source channel or to add, modify, or delete a data source, the regulation instruction is also sent to all the client applications in the broadcast manner. At this time, the regulation and control instruction not only includes encrypted data source information and specific regulation and control operation, but also adds an application identifier. After receiving the regulation and control instruction, the application firstly judges the application identifier, if the application identifier is the application identifier, the subsequent regulation and control operation is adopted, otherwise, no operation is carried out.
4. Data source configuration desensitization
In practical application, the data source configuration includes sensitive information such as IP addresses, ports, user names, and passwords of the data sources, and the server provides a common encryption interface (AES, RSA, etc.) to desensitize the sensitive information.
The specific implementation manner is that when a developer uses the management monitor to configure data source connection for an application, an encryption manner (for example, AES) can be selected to write the configuration into the data storage volume, and an encryption key is set. At the same time, developers also need to set encryption keys consistent with the dynamic data source manager at the client application. When the client application requests the server to obtain the configuration, the configuration is sent to the client application in an encrypted mode through the request server, and the application end decrypts and performs subsequent operation after receiving the desensitized configuration.
By the desensitization treatment of the data source configuration, network attack and data source malicious embezzlement can be avoided, and the system security is greatly improved.
5. Heartbeat monitoring mechanism
After the client application is started, heartbeat data is sent to the request manager regularly, and the data comprises information such as connection states and connection numbers of all data sources of the client application. Through a heartbeat mechanism, the management monitor visually displays the running state of each client application and the connection state of the data source.
When the request manager does not receive the heartbeat of a certain client application beyond the specified time, the client application is judged to be down, at the moment, the request manager automatically marks the application client as unavailable, and logically recovers the connection number distributed to each data source of the application. Meanwhile, the management monitor can also send an alarm on the interface to remind a developer to check the running state of the client application. Similarly, the management monitor can also read the heartbeat record in real time and monitor the connection state of the data source. And when the connection state of a certain data source is unavailable in the heartbeats of all the client applications in the cluster, sending out a data source downtime alarm on the interface.
6. Tenant permission mechanism
In order to improve the universality of the dynamic data source manager, a mechanism of tenant authority management is adopted. When the organization using the dynamic data source management technology is huge, the tenants can be allocated according to departments or project groups, and each tenant can only use the resources with the authority given to the tenant. Each tenant can monitor the states of the application client and the data source which belong to the tenant, regulate and control the connection of the data source which belongs to the tenant, and issue the configuration information of the data source which belongs to the tenant.
7. Publish-subscribe mechanism
In order to realize dynamic regulation, a publish-subscribe mechanism is adopted. The specific principle is that the client applications subscribed to the publisher passively receive the message published by the publisher, and the message adopts a broadcast mode when a plurality of client applications subscribe. When the client application is started, the publisher needs to subscribe first, and then the broadcast message can be received for operation when the data source is regulated and controlled subsequently.
In a second aspect, as shown in fig. 3, an embodiment of the present application further provides a dynamic data source management system 100, which adopts the above dynamic data source management method, and includes:
the dynamic data source management module 10: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, and issuing the data source configuration to the client application;
the plurality of client applications 20: the client application sends a data source configuration request to the dynamic data source management module, and sends a channel connection request to a corresponding data source after acquiring data source configuration processing;
the various data sources 30: and the data source establishes a connection channel with the corresponding client application after receiving the channel connection request of the client application, so as to realize the dynamic connection of the data source.
In an embodiment of the present invention, the dynamic data source management module 10 includes:
the management monitoring module: the system is used for uniformly managing the client application and data source configuration, monitoring the connection state of the client application and the data source, and issuing a regulation and control instruction;
a request service module: the connection management monitoring module is used for communicating with the client application and the management monitoring module, receiving and transmitting a regulation and control instruction, receiving a data source configuration acquisition request of the client application and issuing data source configuration;
a release module: the connection request service module is used for receiving the regulation and control instruction and broadcasting and issuing the regulation and control instruction to the client application subscribed with the regulation and control instruction;
a storage module: the device comprises a connection management monitoring module and a request service module, wherein the storage module is used for providing data storage and storing data source configuration.
In an embodiment of the present invention, the management monitoring module further includes:
an initialization module: the system is used for registering a client application and a data source, associating the client application with the data source and specifying the number of dynamic connections in a dynamic connection channel;
a configuration management module: a storage for managing data source configurations;
a tenant management module: the system is used for creating a tenant, managing the tenant authority, binding the tenant and a related data source, and designating a client in the tenant;
the downtime protection module: when the data source is down or the data source has a network fault, broadcasting and issuing a down regulation and control instruction to all client applications, and cutting off or rebuilding a dynamic connection channel established with the corresponding data source by the client applications based on the down regulation and control instruction;
a dynamic regulation module: broadcasting and issuing a dynamic regulation and control instruction to a client application, wherein the client application dynamically adjusts the number of dynamic connection channels or dynamic connection numbers established with corresponding data sources based on the dynamic regulation and control instruction, and the dynamic adjustment operation comprises addition, modification or deletion;
an encryption module: and encrypting the data source configuration and regulation and control instruction, receiving the encrypted data source configuration and regulation and control instruction by the client application, and performing corresponding operation after decryption.
In an embodiment of the present invention, the request service module includes:
a heartbeat monitoring module: the management monitoring module is used for receiving heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the connection state of the client and the data source.
In an embodiment of the present invention, the issuing module further includes:
a broadcasting module: the client application is used for broadcasting and issuing the regulation and control instruction to the regulation and control instruction subscribed client application.
In an embodiment of the present invention, the storage module further includes:
the system is used for storing encrypted data source configuration, heartbeat data, the binding relationship between client application and the data source, and encryption keys and tenant permission information.
In a third aspect, an embodiment of the present application provides a client, which uses the above dynamic data source management method, and includes the above multiple client applications.
In a fourth aspect, an embodiment of the present application provides a server device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the dynamic data source management method as described above when executing the computer program.
In addition, the dynamic data source management method of the embodiment of the present application described in conjunction with fig. 1 may be implemented by a server device. Fig. 4 is a schematic diagram of a hardware structure of a server device according to an embodiment of the present application.
The computer device may comprise a processor 81 and a memory 82 in which computer program instructions are stored.
Specifically, the processor 81 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 82 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 82 may include a Hard Disk Drive (Hard Disk Drive, abbreviated to HDD), a floppy Disk Drive, a Solid State Drive (SSD), flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 82 may include removable or non-removable (or fixed) media, where appropriate. The memory 82 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 82 is a Non-volatile (Non-Volatie) memory. In particular embodiments, Memory 82 includes Read-Only Memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), Electrically rewritable ROM (EAROM), or FLASH Memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), where the DRAM may be a Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), an Extended data output Dynamic Random-Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), and the like.
The memory 82 may be used to store or cache various data files for processing and/or communication use, as well as possible computer program instructions executed by the processor 81.
The processor 81 implements any of the dynamic data source management methods in the above embodiments by reading and executing computer program instructions stored in the memory 82.
In some of these embodiments, the computer device may also include a communication interface 83 and a bus 80. As shown in fig. 4, the processor 81, the memory 82, and the communication interface 83 are connected via the bus 80 to complete communication therebetween.
The communication interface 83 is used for implementing communication between modules, devices, units and/or equipment in the embodiment of the present application. The communication port 83 may also be implemented with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
Bus 80 includes hardware, software, or both to couple the components of the computer device to each other. Bus 80 includes, but is not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, Bus 80 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (FSB), a Hyper Transport (HT) Interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (MCA) Bus, a PCI (Peripheral Component Interconnect) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics Bus (audio Electronics Association), abbreviated VLB) bus or other suitable bus or a combination of two or more of these. Bus 80 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The computer device may be based on a dynamic connection method, thereby implementing the dynamic data source management method described in connection with fig. 1.
In a fifth aspect, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the dynamic data source management method according to the first aspect.
Compared with the prior art, the invention mainly realizes that: the original management mode of data source configuration in the client application is abandoned, and the data source configuration management right is handed to the dynamic data source manager, so that the client application and the data source are loosely coupled, and the centralized management of the data source is realized. And a heartbeat mechanism is adopted to monitor the running state of the client application and the connection state of the data source, and emergency measures can be automatically taken and an alarm can be given when the running state of the application is abnormal. Sensitive information in the data source configuration is desensitized, and the safety of the system is improved. And the permission management of the data source is carried out in a tenant mode, so that the universality of the dynamic data source manager is improved, and the abuse of the data source is prevented. When the data source is dynamically regulated, the connection number of the data source of each application can be regulated so as to achieve the most balanced performance under different environments; data sources can be added, modified or deleted in the application operation; and the method can also be used for temporarily shielding the corresponding data source for emergency when the data source is down. The original C/S management mode is changed into a management mode depending on a third party on the management architecture, developers can concentrate on business when developing client application, and the management architecture is not limited by complicated data source maintenance work.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (15)

1. A method for dynamic data source management, comprising:
dynamic data source management: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, and issuing the data source configuration to the client application;
a client application starting step: the client application sends the data source configuration request, and sends a channel connection request to the corresponding data source after acquiring the data source configuration processing;
and (3) data source dynamic connection: and after receiving the channel connection request of the client application, the data source establishes a dynamic connection channel with the corresponding client application to realize the dynamic connection between the client application and the data source.
2. The dynamic data source management method of claim 1, wherein the dynamic data source management step comprises:
managing and monitoring: uniformly managing the client application and the data source configuration, monitoring the connection state of the client application and the data source, and issuing a regulation and control instruction;
a service request step: providing a communication interface service, receiving and transmitting the regulation and control instruction, receiving a data source configuration acquisition request of the client application and issuing the data source configuration;
a release step: receiving the regulation and control instruction, and broadcasting and issuing the regulation and control instruction to the client application subscribed with the regulation and control instruction;
a storage step: and providing a data storage service and storing the data source configuration.
3. The dynamic data source management method of claim 2, wherein the step of managing and monitoring further comprises:
an initialization step: registering the client application and the data source, associating the client application with the data source, and specifying the number of dynamic connections in the dynamic connection channel;
a configuration management step: managing storage of the data source configuration;
a tenant management step: creating a tenant, managing the tenant permission, binding the tenant with the related data source, and designating the client in the tenant;
and (3) performing downtime protection: when the data source is down or the data source has a network fault, broadcasting and issuing a down regulation and control instruction to the client application, and cutting off or rebuilding the dynamic connection channel established with the corresponding data source by the client application based on the down regulation and control instruction;
dynamic regulation and control steps: broadcasting and issuing a dynamic regulation and control instruction to the client application, wherein the client application dynamically regulates the dynamic connection channel or the dynamic connection number established with the corresponding data source based on the dynamic regulation and control instruction, and the dynamic regulation operation comprises addition, modification or deletion;
an encryption step: and encrypting the data source configuration and the regulation and control instruction, and receiving the encrypted data source configuration and the regulation and control instruction by the client application, and performing corresponding operation after decryption.
4. The dynamic data source management method of claim 2, wherein the request service step comprises:
a heartbeat monitoring step: and receiving heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the client and the connection state of the client and a data source.
5. The dynamic data source management method of claim 2, wherein the publishing step further comprises:
a broadcasting step: the client application is used for broadcasting and publishing the regulation and control instruction to the client application subscribed to the regulation and control instruction.
6. The dynamic data source management method of claim 2, wherein the storing step further comprises:
storing the encrypted data source configuration, storing the heartbeat data, storing the binding relationship between the client application and the data source, and storing the encryption key and the tenant permission information.
7. A dynamic data source management system using the dynamic data source management method as claimed in claims 1 to 6, comprising:
the dynamic data source management module: the method comprises the steps of uniformly registering, managing and monitoring a plurality of data sources and a plurality of client applications of different types, uniformly managing data source configuration, receiving and processing a request of the client application for the data source configuration, and issuing the data source configuration to the client application;
a plurality of client applications: the client application sends the data source configuration request to the dynamic data source management module, and sends a channel connection request to the corresponding data source after acquiring the data source configuration;
a variety of data sources: and the data source is in communication connection with the dynamic data source management module, and after receiving the channel connection request of the client application, the data source establishes a connection channel with the corresponding client application to realize dynamic connection of the data source.
8. The dynamic data source management system as claimed in claim 7, wherein the dynamic data source management module comprises:
the management monitoring module: the system is used for uniformly managing the client application and the data source configuration, monitoring the connection state of the client application and the data source, and issuing a regulation and control instruction;
a request service module: the management monitoring module is connected and used for communicating with the client application and the management monitoring module, receiving and transmitting the regulation and control instruction, receiving a data source configuration acquisition request of the client application and issuing the data source configuration;
a release module: the issuing module receives the regulation and control instruction and broadcasts and issues the regulation and control instruction to the client application subscribed with the regulation and control instruction;
a storage module: and the storage module is used for providing data storage and storing the data source configuration.
9. The dynamic data source management system of claim 8, wherein the management monitoring module further comprises:
an initialization module: the dynamic connection channel is used for registering the client application and the data source, associating the client application with the data source and specifying the number of dynamic connections in the dynamic connection channel;
a configuration management module: a storage for managing the data source configuration;
a tenant management module: the system is used for creating a tenant, managing the tenant permission, binding the tenant with the related data source, and designating the client in the tenant;
the downtime protection module: when the data source is down or the data source has a network fault, broadcasting and issuing a down regulation and control instruction to all the client applications, and cutting off or rebuilding the dynamic connection channel established with the corresponding data source by the client applications based on the down regulation and control instruction;
a dynamic regulation module: broadcasting and issuing a dynamic regulation and control instruction to the client application, wherein the client application dynamically regulates the dynamic connection channel or the dynamic connection number established with the corresponding data source based on the dynamic regulation and control instruction, and the dynamic regulation operation comprises addition, modification or deletion;
an encryption module: and encrypting the data source configuration and the regulation and control instruction, and receiving the encrypted data source configuration and the regulation and control instruction by the client application, and performing corresponding operation after decryption.
10. The dynamic data source management system of claim 8, wherein the request service module comprises:
a heartbeat monitoring module: the management monitoring module is used for receiving the heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the client and the connection state of the client and a data source.
11. The dynamic data source management system of claim 8, wherein the publishing module further comprises:
a broadcasting module: the client application is used for broadcasting and publishing the regulation and control instruction to the client application subscribed with the regulation and control instruction.
12. The dynamic data source management system of claim 8, wherein the storage module further comprises:
the system is used for storing the encrypted data source configuration, storing the heartbeat data, storing the binding relationship between the client application and the data source, and storing the encryption key and the tenant permission information.
13. A client using the dynamic data source management method according to any one of claims 1 to 6, characterized by comprising at least one of said client applications.
14. A server device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the dynamic data source management method according to any of claims 1 to 6 when executing the computer program.
15. A server device readable storage medium on which a computer program is stored, which program, when executed by a processor, implements a dynamic data source management method as claimed in any one of claims 1 to 6.
CN202210002757.9A 2022-01-04 2022-01-04 Dynamic data source management method and system, client, equipment and storage medium Pending CN114372040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210002757.9A CN114372040A (en) 2022-01-04 2022-01-04 Dynamic data source management method and system, client, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210002757.9A CN114372040A (en) 2022-01-04 2022-01-04 Dynamic data source management method and system, client, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114372040A true CN114372040A (en) 2022-04-19

Family

ID=81141468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210002757.9A Pending CN114372040A (en) 2022-01-04 2022-01-04 Dynamic data source management method and system, client, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114372040A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348185A (en) * 2022-08-19 2022-11-15 招银云创信息技术有限公司 Control method and control device of distributed query engine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348185A (en) * 2022-08-19 2022-11-15 招银云创信息技术有限公司 Control method and control device of distributed query engine
CN115348185B (en) * 2022-08-19 2023-12-05 招银云创信息技术有限公司 Control method and control device of distributed query engine

Similar Documents

Publication Publication Date Title
US11431495B2 (en) Encrypted file storage
US9424432B2 (en) Systems and methods for secure and persistent retention of sensitive information
US10084788B2 (en) Peer to peer enterprise file sharing
US9767300B2 (en) Managing restricted tagged content elements within a published message
US8621036B1 (en) Secure file access using a file access server
US10148637B2 (en) Secure authentication to provide mobile access to shared network resources
EP3356978B1 (en) Applying rights management policies to protected files
US10771261B1 (en) Extensible unified multi-service certificate and certificate revocation list management
US8848922B1 (en) Distributed encryption key management
US9590999B2 (en) Preview serving from an external preview service
US9571288B2 (en) Peer to peer enterprise file sharing
US20160191503A1 (en) Peer to peer enterprise file sharing
CN108289074B (en) User account login method and device
US10305693B2 (en) Anonymous secure socket layer certificate verification in a trusted group
EP3876127A1 (en) Remote device maintenance based on distributed data storage
CN116028486A (en) Method and device for data storage and data query
CN114372040A (en) Dynamic data source management method and system, client, equipment and storage medium
US20130254254A1 (en) Service mediation model
CN115694699A (en) Time delay parameter acquisition method and device, electronic equipment and storage medium
US11647020B2 (en) Satellite service for machine authentication in hybrid environments
US20200336371A1 (en) Single user device staging
CN114329574B (en) Encrypted partition access control method and system based on domain management platform and computing equipment
CN111367867B (en) Log information processing method and device, electronic equipment and storage medium
CN116432198A (en) Information processing method and electronic equipment
CN114117460A (en) Data protection method and device, electronic 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