Dynamic data source management method and system, client, device and storage medium
Unified management and monitoring of multiple data sources and client applications through the dynamic data source connection manager solves the problems of tedious data source management and slow downtime response under traditional static configuration, and achieves efficient and safe data source management and control. Improved operation and maintenance efficiency and system security.
Patent Information
- Application Number
- CN202210002757.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-01-04
AI Technical Summary
Traditional data source management technology uses static configuration files, which results in cumbersome data source configuration management and low operation and maintenance efficiency. It is also difficult to detect and repair in time when the data source goes down, and there is a risk of irreversible loss, especially in the coupling environment of multiple data sources. High, the risk of operational errors is high, and it is difficult to achieve safe and standardized use management.
Adopting a dynamic data source connection management method, the dynamic data source manager uniformly registers, manages and monitors multiple data sources and client applications, provides a graphical monitoring interface, monitors and regulates data source connections in real time, and realizes dynamic adjustment and adjustment of data source configuration. Permission management reduces the use of configuration files and improves operation and maintenance efficiency and security.
It achieves loose coupling management of data sources, improves operation and maintenance efficiency and emergency response capabilities, enhances system security and versatility, and can balance and regulate data source connections in different environments, reducing the maintenance burden of developers and preventing data sources from abuse.
Smart Images

Figure CN114372040B
Abstract
Description
Technical Field
[0001] 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 Art
[0002] Currently, in traditional data source management technologies, data source configuration management generally adopts static configuration files to maintain data source connection configuration information on the application side. This method is a static and direct management method, which requires developers to focus on business while also taking into account the maintenance of static data source configuration files. Developers need to invest a lot of energy in maintaining cumbersome data source configuration files.
[0003] At the same time, when the application service using traditional data source management technology is started, it reads the statically maintained data source configuration in the configuration file and creates a connection channel with the corresponding data source. After the project is started, the application can perform business operations through the connection channel with the data source. However, after the application is launched, when the configuration information of a certain data source changes, the operation and maintenance personnel need to manually modify the data source configuration file and restart the application service to complete the modification of the data source; when a certain data source goes down, the operation and maintenance personnel cannot find it in time, which will cause the data source repair to lag, and even cause irreversible losses. Therefore, how to improve the efficiency of operation and maintenance and emergency response when downtime occurs becomes crucial.
[0004] Furthermore, in contemporary Internet companies, data storage is widely used. With the development of technology, various types of storage components emerge in an endless stream, and it is very common for a single application to use multiple data sources at the same time. At this time, if the traditional static data source connection method is continued, the configuration file context will become huge, and the high coupling between the application and the data source will make the data source management work extremely cumbersome. Once an operation error occurs, it will lead to serious consequences. Therefore, how to reasonably manage the dynamic data source configuration has become a key issue. In addition, with the expansion of the organizational scale of Internet companies, how to safely manage the standardized use of data sources in a complex organizational structure has also become a difficult problem.
[0005] In order to solve the pain points of the above-mentioned developers, operation and maintenance personnel and Internet companies, dynamic data source connection management technology came into being. The patent of this invention proposes a dynamic data source connection method, which aims to continue to use the previous method of creating data source connection on the application side and further improve the dynamic management mode of the data source. The high coupling mode managed directly on the application side is changed to rely on third-party centralized management, so that developers can reduce tedious maintenance work and improve output efficiency; abandon complicated configuration files, change the data source configuration modification method from configuration files to an easy-to-understand graphical monitoring interface, add real-time monitoring, and improve the operation and maintenance and emergency efficiency of operation and maintenance personnel; add access control of data source permissions, desensitize the data source configuration information, and safely manage the standardized use of data sources in enterprises with complex organizational structures. Summary of the invention
[0006] The embodiment of the present application provides a dynamic data source connection method for a railway passenger ticket system. The present invention aims to continue to use the current method of dynamically creating a data source connection on the application side, improve the management mode of the data source, and change the current data source management mode from static to dynamic.
[0007] In a first aspect, an embodiment of the present application provides a dynamic data source management method, including:
[0008] Dynamic data source management steps: uniformly register, manage and monitor multiple data sources of different types and multiple client applications, uniformly manage data source configuration, receive and process client application requests for data source configuration, and send data source configuration to client applications;
[0009] Client application startup steps: The client application sends a data source configuration request, obtains the data source configuration and processes it, and then sends a channel connection request to the corresponding data source;
[0010] Data source dynamic connection steps: After receiving the channel connection request from 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.
[0011] In an embodiment of the present invention, the above-mentioned dynamic data source management step includes:
[0012] Management and monitoring steps: Centrally manage client applications and data source configurations, monitor the connection status of client applications and data sources, and issue control instructions;
[0013] Request service step: providing communication interface service, receiving and transmitting the control instruction, receiving the data source configuration acquisition request of the client application and issuing the data source configuration;
[0014] Publishing step: receiving control instructions and broadcasting them to client applications that have subscribed to the control instructions;
[0015] Storage module: provides data storage services and stores data source configurations.
[0016] In the embodiment of the present invention, the management and monitoring step further includes:
[0017] Initialization step: register the client application and data source, associate the client application with the data source, and specify the number of dynamic connections in the dynamic connection channel;
[0018] Configuration management step: manage the storage of data source configuration;
[0019] Tenant management steps: create tenants, manage tenant permissions, bind tenants to relevant data sources, and specify clients in tenants;
[0020] Downtime protection steps: When a data source goes down or a network failure occurs in the data source, a downtime control instruction is broadcast to the client application. The client application cuts off or rebuilds the dynamic connection channel established with the corresponding data source based on the downtime control instruction.
[0021] Dynamic control step: broadcast and publish dynamic control instructions to client applications. The client applications dynamically adjust the dynamic connection channels or dynamic connection numbers established with the corresponding data sources based on the dynamic control instructions. The dynamic adjustment operations include adding, modifying or deleting.
[0022] Encryption step: Encrypt the data source configuration and control instructions. The client application receives the encrypted data source configuration and control instructions and performs corresponding operations after decryption.
[0023] In the embodiment of the present invention, the above-mentioned service request step includes:
[0024] Heartbeat monitoring steps: Receive heartbeat data sent by the client application, read the heartbeat data in real time to monitor the connection status of the client and the client and the data source.
[0025] In the embodiment of the present invention, the above-mentioned publishing step further includes:
[0026] Broadcast step: used to broadcast the control instructions to the client applications that have subscribed to the control instructions.
[0027] In an embodiment of the present invention, the above-mentioned storing step further includes:
[0028] Stores encrypted data source configuration, heartbeat data, the binding relationship between client applications and data sources, encryption keys, and tenant permission information.
[0029] In a second aspect, an embodiment of the present application provides a dynamic data source management system, which adopts the dynamic data source management method as described above, including:
[0030] Dynamic data source management module: uniformly registers, manages and monitors multiple data sources of different types and multiple client applications, uniformly manages data source configuration, receives and processes requests from client applications for data source configuration, and sends data source configuration to client applications;
[0031] Multiple client applications: communicate and connect to the dynamic data source management module, the client application sends a data source configuration request to the dynamic data source management module, obtains the data source configuration and processes it, and then sends a channel connection request to the corresponding data source;
[0032] Multiple data sources: Communication connection dynamic data source management module. After the data source receives the channel connection request from the client application, it establishes a connection channel with the corresponding client application to realize dynamic connection of the data source.
[0033] In an embodiment of the present invention, the dynamic data source management module includes:
[0034] Management and monitoring module: used to uniformly manage client applications and data source configurations, monitor the connection status of client applications and data sources, and issue control instructions;
[0035] Request service module: connected to the management and monitoring module, used to communicate with the client application and the management and monitoring module, receive and transmit the control instructions, receive the data source configuration acquisition request of the client application and issue the data source configuration;
[0036] Publishing module: connects to the request service module, receives the control instructions and broadcasts them to the client applications that have subscribed to the control instructions;
[0037] Storage module: connects to the management monitoring module and the request service module. The storage module is used to provide data storage and store data source configuration.
[0038] In an embodiment of the present invention, the management and monitoring module further includes:
[0039] Initialization module: used for client application and data source registration, associating the client application with the data source, and specifying the number of dynamic connections in the dynamic connection channel;
[0040] Configuration management module: used to manage the storage of data source configuration;
[0041] Tenant management module: used to create tenants, manage tenant permissions, bind tenants to relevant data sources, and specify clients in tenants;
[0042] Downtime protection module: When a data source goes down or a network failure occurs in the data source, downtime control instructions are broadcast to all client applications. The client applications cut off or rebuild the dynamic connection channel established with the corresponding data source based on the downtime control instructions.
[0043] Dynamic control module: broadcasts dynamic control instructions to client applications. Client applications dynamically adjust the dynamic connection channels or dynamic connection numbers established with the corresponding data sources based on the dynamic control instructions. Dynamic adjustment operations include adding, modifying or deleting.
[0044] Encryption module: Encrypts data source configuration and control instructions. The client application receives the encrypted data source configuration and control instructions and performs corresponding operations after decryption.
[0045] In an embodiment of the present invention, the request service module includes:
[0046] Heartbeat monitoring module: used to receive heartbeat data sent by client applications. The management monitoring module reads the heartbeat data in real time to monitor the connection status of the client and the client and the data source.
[0047] In the embodiment of the present invention, the publishing module further includes:
[0048] Broadcast module: used to broadcast and publish control instructions to client applications that have subscribed to the control instructions.
[0049] In an embodiment of the present invention, the storage module further includes:
[0050] Used to store encrypted data source configuration, heartbeat data, the binding relationship between client applications and data sources, encryption keys, and tenant permission information.
[0051] In a third aspect, an embodiment of the present application provides a client that adopts the dynamic data source management method as described above, including the above-mentioned multiple client applications.
[0052] In a fourth aspect, an embodiment of the present application provides a server device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the dynamic data source management method as described above when executing the computer program.
[0053] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the dynamic data source management method as described in the first aspect above.
[0054] Compared with the related prior art, it has the following outstanding beneficial effects:
[0055] 1. The present invention abandons the original management method of directly performing static data source configuration in the client application, and hands over the data source configuration management right 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;
[0056] 2. The present invention adopts a heartbeat mechanism: monitoring the running status of the client application and the data source connection status, and automatically taking emergency measures and issuing an alarm when the application running status is abnormal;
[0057] 3. The present invention has high security: sensitive information in the data source configuration is desensitized, thereby improving the security of the system;
[0058] 4. The present invention has high versatility: it adopts tenant mode to manage the rights of data source, improves the versatility of dynamic data source manager, and prevents the abuse of data source;
[0059] 5. The present invention has high reliability: when dynamically regulating data sources, the present invention can regulate the number of data source connections for each application to achieve the most balanced performance in different environments; it can add, modify or delete data sources during application operation; it can also be used to temporarily shield the corresponding data source for emergency response when the data source is down;
[0060] 6. The present invention has a loosely coupled architecture: the management architecture of the present invention changes the original C / S management mode to a management mode relying on a third party. Developers can focus on business when developing client applications and will not be constrained by tedious data source maintenance work. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0062] Figure 1 is a flow chart of the dynamic data source management method of the present invention;
[0063] Figure 2 This is a schematic diagram of the architecture of a dynamic data source management system according to an embodiment of the present invention;
[0064] Figure 3 It is a schematic diagram of the dynamic data source management system of the present invention;
[0065] Figure 4 Schematic diagram of the hardware structure of a server device according to an embodiment of the present application.
[0066] In the above picture:
[0067] 100 dynamic data source management system
[0068] 10Dynamic data source management module 20Client application module
[0069] 30 Data source module
[0070] 81. Processor; 82. Memory; 83. Communication interface; 80. Bus. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0072] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0073] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent.
[0074] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0075] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0076] The present invention aims to provide a dynamic data source connection management technology, to more conveniently complete the adaptation function of multiple data sources, and to manage the dynamic interactive connection between application services and data sources.
[0077] The dynamic data source connection management technology proposed in the present invention abandons the original management mode of data source configuration in client application, and hands over 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 to a management mode relying on a third party.
[0078] When a client application uses multiple data sources, it only needs to pre-register the corresponding data source information in the dynamic data source manager and bind the data source used by the client application. When the client application starts, it requests the dynamic data source manager to obtain the data source configuration information bound to the application, and directly creates a connection channel for the data source bound to it on the application side.
[0079] Figure 1 It is a schematic flow chart of the method of the present invention, as shown in Figure 1 As shown, the embodiment of the present application provides a dynamic data source management method, including:
[0080] Dynamic data source management step S10: uniformly register, manage and monitor multiple data sources of different types and multiple client applications, uniformly manage data source configuration, receive and process client application requests for data source configuration, and send data source configuration to client applications;
[0081] The client application starts step S20: the client application sends a data source configuration request, obtains the data source configuration, and then sends a channel connection request to the corresponding data source;
[0082] Data source dynamic connection step S30: After receiving the channel connection request from the client application, the data source establishes a dynamic connection channel with the corresponding client application to achieve dynamic connection between the client application and the data source.
[0083] The above-mentioned dynamic data source management step S10 includes:
[0084] Management and monitoring steps: Centrally manage client applications and data source configurations, monitor the connection status of client applications and data sources, and issue control instructions;
[0085] Request service steps: provide communication interface services, receive and transmit control instructions, receive data source configuration acquisition requests from client applications and issue data source configurations;
[0086] Publishing step: receiving control instructions and broadcasting them to client applications that have subscribed to the control instructions;
[0087] Storage module: provides data storage services and stores data source configurations.
[0088] The above management and monitoring steps further include:
[0089] Initialization step: register the client application and data source, associate the client application with the data source, and specify the number of dynamic connections in the dynamic connection channel;
[0090] Configuration management step: manage the storage of data source configuration;
[0091] Tenant management steps: create tenants, manage tenant permissions, bind tenants to relevant data sources, and specify clients in tenants;
[0092] Downtime protection steps: When a data source goes down or a network failure occurs in the data source, a downtime control instruction is broadcast to the client application. The client application cuts off or rebuilds the dynamic connection channel established with the corresponding data source based on the downtime control instruction.
[0093] Dynamic control step: broadcast and publish dynamic control instructions to client applications. The client applications dynamically adjust the dynamic connection channels or dynamic connection numbers established with the corresponding data sources based on the dynamic control instructions. The dynamic adjustment operations include adding, modifying or deleting.
[0094] Encryption step: Encrypt the data source configuration and control instructions. The client application receives the encrypted data source configuration and control instructions and performs corresponding operations after decryption.
[0095] The above service request steps include:
[0096] Heartbeat monitoring steps: Receive heartbeat data sent by the client application, read the heartbeat data in real time to monitor the connection status of the client and the client and the data source.
[0097] The above publishing steps also include:
[0098] Broadcast step: used to broadcast the control instructions to the client applications that have subscribed to the control instructions.
[0099] In an embodiment of the present invention, the above-mentioned storing step further includes:
[0100] Stores encrypted data source configuration, heartbeat data, the binding relationship between client applications and data sources, encryption keys, and tenant permission information.
[0101] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings:
[0102] 1. Functional architecture design plan
[0103] like Figure 2 As shown, the overall architecture is mainly divided into three parts: client, data source and dynamic data source manager.
[0104] Clients refer to all client applications that request the dynamic data source manager to obtain configuration, send heartbeats to the dynamic data source manager at regular intervals, create connection channels with the data source and maintain a specified number of connections in the channel according to the data source configuration, subscribe to instructions issued by the dynamic data source manager, and obey the management and scheduling of the dynamic data source manager.
[0105] Data sources refer to actual data storage components, including relational databases, non-relational databases, cache storage, big data storage, and object storage.
[0106] The dynamic data source manager is mainly responsible for configuration storage, request scheduling, management monitoring and issuing instructions. The dynamic data source manager includes four components: management monitor, request server, publisher and storage. The management monitor and request server share the configuration and data storage volume in the storage. Among them, the request server processes the requests of the client application and the instructions of the management monitor, and is responsible for the heartbeat records of the client application, the distribution of data source configuration, and the transmission of management monitor instructions. Its communication protocol with the client application is HTTPS; the management monitor provides a visual interface, which can intuitively monitor the application status, monitor the data source connection status, store and maintain the application data source configuration, manage tenant permissions and issue instructions; the publisher provides the instruction broadcast function, broadcasting the received instructions to the client application that has subscribed to the publisher; the storage provides the data storage function, storing the desensitized data source configuration information, storing the heartbeat records of the storage application, storing the binding relationship between the storage application and the data source, storing the encryption key, and storing the tenant permission information.
[0107] The Dynamic Data Source Manager has the following features:
[0108] A centralized and visual approach is adopted to manage data source information, which can conveniently register and maintain client applications and data source configuration information through the page, and bind client applications and data source configuration information.
[0109] An encryption algorithm is used to desensitize sensitive information in the data source configuration, improving security.
[0110] Receive the heartbeat of each client application in order to visually monitor the running status of the client application and the data source connection status. When an application's running status is abnormal, the dynamic data source manager will mark the application as stopped and logically recycle the number of connections corresponding to the data source. The monitoring page will issue relevant alarm information.
[0111] The number of data source connections allocated to each client application can be adjusted in a personalized manner through the deployment environment.
[0112] The concept of tenants is introduced, and different data source permissions are granted to each tenant. Developers need to bind tenants to client applications in advance to determine which data sources the client applications are authorized to use.
[0113] When an application needs to add, modify or delete a data source, or needs to modify the number of connections in the data source connection channel, or for disaster recovery (that is, it is necessary to temporarily block a down data source in the client application cluster), the publish and subscribe function of the dynamic data source manager can be used to send control instructions to notify the client application.
[0114] The following is an explanation of the specific implementation of the dynamic data source connection method according to a specific embodiment of the present invention:
[0115] 1. Initialization
[0116] Initialization operation refers to the setting of tenants, client applications, data sources, encryption configuration and other information through the management monitor interface at the beginning of project development. This step only needs to be performed once, and the management of dynamic data source connections can be automatically realized later. The specific operation process is as follows:
[0117] 1) The administrator registers the configuration information related to the client application and data source into the dynamic data source manager through the interface so that it can identify the corresponding client and data source. When registering a data source, you need to set the number of connections, encryption method, key and other information for each data source.
[0118] 2) Create a tenant through the interface, bind the data source that the tenant is authorized to use, and merge the client into the specified tenant. A single tenant can have multiple application clients, and a single application client belongs to only one tenant. You can also create a tenant first and perform the first step in the tenant interface.
[0119] 3) Through the interface, the client application is associated with the data source it uses, and the number of data source connections is set individually for each client application.
[0120] 2. Client application configuration and startup process
[0121] The above describes the initialization process. After the initialization operation is completed, developers can start coding and debugging. Before coding, you need to configure the key on the client side so that after obtaining the configuration sent by the dynamic data source manager, you can decrypt and create a data source connection channel. The following is a detailed description of the startup process:
[0122] 1) When the client application starts, it first needs to subscribe to the publisher to receive its broadcast control instructions, and at the same time access the request server to obtain the data source configuration, request the server to query the data source configuration information previously set by the management monitor in the memory, and send it to the client application.
[0123] 2) After the client application receives the configuration sent by the request server, it decrypts the configuration information using the key, creates a connection channel with the corresponding data source according to the configuration, and maintains a specified number of connections in the connection channel according to the configuration.
[0124] 3) After the client application is started, it will periodically send a heartbeat to the request server, the main content of which is the application status and the status information of the connected data source. After receiving the heartbeat request, the request server maintains the heartbeat data in the data storage volume for monitoring and scheduling by the management monitor. When the client application performs its own business, it matches different data sources through parameter identifiers of different businesses, and then accesses the specified data source through the matched data source connection channel to realize the dynamic connection between the client application and the data source.
[0125] 3. Data source control during application runtime
[0126] The above introduces the configuration and startup process of the client application. After the application is started, if the data source configuration is changed (data source address, password, number of connections, etc.), or if disaster recovery is required, real-time data source control operations are required.
[0127] In actual operation, client applications need to adjust data source configurations in a timely manner according to the operating environment. For example, when the alarm of the management monitor is found that the connection status of a data source is unavailable (that is, the data source is down or a network failure occurs between the data source and the application cluster), all client applications using the data source will be affected. At this time, the data source needs to be temporarily blocked.
[0128] The management monitor can complete the above-mentioned control operations, which defines commonly used control instructions. When regulating the data source configuration, it is necessary to send control instructions from the management monitor to the request server. The control instructions mainly include encrypted data source information and specific control operations. The request server broadcasts the control instructions to all client applications through the publisher. When the client application receives the broadcast, it determines whether the data source is included. If it is included, it temporarily disconnects all connections with the data source; if it does not include the data source, it does not perform any operation. Similarly, after the data source is repaired, you can send instructions again to allow the application to reconnect to the corresponding data source.
[0129] In addition, when a client application needs to adjust the number of connections in the data source channel or add, modify, or delete a data source, the control instruction is also sent to all client applications through the above-mentioned broadcast method. At this time, the control instruction not only includes the encrypted data source information and specific control operations, but also adds an application identifier. After receiving the control instruction, the application first determines the application identifier. If it is itself, it will take subsequent control operations, otherwise it will not do anything.
[0130] 4. Data source configuration desensitization
[0131] In actual applications, the data source configuration will contain sensitive information such as the IP address, port, user name and password of each data source. The server provides commonly used encryption interfaces (AES, RSA, etc.) to desensitize the above sensitive information.
[0132] The specific implementation method is that when developers use the management monitor to configure the data source connection for the application, they can choose an encryption method (such as AES) to write the configuration to the data storage volume and set the encryption key. At the same time, developers also need to set the encryption key consistent with the dynamic data source manager in 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 manner through the request server. After the application receives the desensitized configuration, it decrypts it and performs subsequent operations.
[0133] By configuring desensitization for data sources, network attacks and malicious theft of data sources can be avoided, greatly improving system security.
[0134] 5. Heartbeat monitoring mechanism
[0135] After the client application is started, it will periodically send heartbeat data to the request manager, which includes the connection status and number of connections of each data source of the client application. Through the heartbeat mechanism, the management monitor can visually display the running status of each client application and the connection status of the data source.
[0136] When the request manager fails to receive the heartbeat of a client application within the specified time, the client application is considered down. At this time, the request manager will automatically mark the application client as unavailable and logically reclaim the number of connections allocated to each data source of the application. At the same time, the management monitor will also issue an alarm on the interface to remind developers to check the running status of the client application. Similarly, the management monitor will also read the heartbeat records in real time to monitor the connection status of the data source. When the connection status of a data source is unavailable in all the client application heartbeats in the cluster, a data source downtime alarm will be issued on the interface.
[0137] 6. Tenant authority mechanism
[0138] In order to improve the versatility of the dynamic data source manager, a tenant authority management mechanism is adopted. When the organization using the dynamic data source management technology is large, tenants can be allocated according to departments or project groups, and each tenant can only use the resources granted to the tenant. Each tenant can monitor the status of the application client and data source belonging to the tenant, and can regulate the data source connection belonging to the tenant and issue the data source configuration information belonging to the tenant.
[0139] 7. Publish and Subscribe Mechanism
[0140] In order to achieve dynamic regulation, the publish-subscribe mechanism is adopted. The specific principle is that the client application subscribed to the publisher will passively receive the message published by the publisher. This message adopts the broadcast mode when multiple client applications subscribe. When the client application starts, it needs to subscribe to the publisher first, and then receive the broadcast message for operation when the data source is regulated later.
[0141] Second, as Figure 3 As shown, the embodiment of the present application further provides a dynamic data source management system 100, which adopts the dynamic data source management method as described above, including:
[0142] Dynamic data source management module 10: uniformly register, manage and monitor multiple data sources of different types and multiple client applications, uniformly manage data source configuration, receive and process client application requests for data source configuration, and send data source configuration to client applications;
[0143] Multiple client applications 20: communicate and connect to the dynamic data source management module, the client application sends a data source configuration request to the dynamic data source management module, obtains the data source configuration and processes it, and then sends a channel connection request to the corresponding data source;
[0144] Multiple data sources 30: Communication connection dynamic data source management module. After receiving the channel connection request from the client application, the data source establishes a connection channel with the corresponding client application to realize dynamic connection of the data source.
[0145] In the embodiment of the present invention, the dynamic data source management module 10 includes:
[0146] Management and monitoring module: used to uniformly manage client applications and data source configurations, monitor the connection status of client applications and data sources, and issue control instructions;
[0147] Request service module: connects to the management and monitoring module, is used to communicate with the client application and the management and monitoring module, receives and transmits control instructions, receives the data source configuration acquisition request from the client application and issues the data source configuration;
[0148] Publishing module: connects to the request service module, receives the control instructions and broadcasts them to the client applications that have subscribed to the control instructions;
[0149] Storage module: connected to the management monitoring module and the request service module, the storage module is used to provide data storage and store data source configuration.
[0150] In the embodiment of the present invention, the management and monitoring module further includes:
[0151] Initialization module: used for client application and data source registration, associating the client application with the data source, and specifying the number of dynamic connections in the dynamic connection channel;
[0152] Configuration management module: used to manage the storage of data source configuration;
[0153] Tenant management module: used to create tenants, manage tenant permissions, bind tenants to relevant data sources, and specify clients in tenants;
[0154] Downtime protection module: When a data source goes down or a network failure occurs in the data source, downtime control instructions are broadcast to all client applications. The client applications cut off or rebuild the dynamic connection channel established with the corresponding data source based on the downtime control instructions.
[0155] Dynamic control module: broadcasts dynamic control instructions to client applications. Client applications dynamically adjust the dynamic connection channels or dynamic connection numbers established with the corresponding data sources based on the dynamic control instructions. Dynamic adjustment operations include adding, modifying or deleting.
[0156] Encryption module: Encrypts data source configuration and control instructions. The client application receives the encrypted data source configuration and control instructions and performs corresponding operations after decryption.
[0157] In an embodiment of the present invention, the request service module includes:
[0158] Heartbeat monitoring module: used to receive heartbeat data sent by client applications. The management monitoring module reads the heartbeat data in real time to monitor the connection status of the client and the client and the data source.
[0159] In the embodiment of the present invention, the publishing module further includes:
[0160] Broadcast module: used to broadcast and publish control instructions to client applications that have subscribed to the control instructions.
[0161] In an embodiment of the present invention, the storage module further includes:
[0162] Used to store encrypted data source configuration, heartbeat data, the binding relationship between client applications and data sources, encryption keys, and tenant permission information.
[0163] In a third aspect, an embodiment of the present application provides a client that adopts the dynamic data source management method as described above, including the above-mentioned multiple client applications.
[0164] In a fourth aspect, an embodiment of the present application provides a server device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the dynamic data source management method as described above when executing the computer program.
[0165] In addition, combined Figure 1 The dynamic data source management method described in the embodiment of the present application can be implemented by a server device. Figure 4 Schematic diagram of the hardware structure of a server device according to an embodiment of the present application.
[0166] The computer device may include a processor 81 and a memory 82 storing computer program instructions.
[0167] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0168] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can 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), etc.
[0169] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .
[0170] The processor 81 implements any one of the dynamic data source management methods in the above embodiments by reading and executing computer program instructions stored in the memory 82 .
[0171] In some of these embodiments, the computer device may further include a communication interface 83 and a bus 80. Figure 4 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.
[0172] The communication interface 83 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 83 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0173] The bus 80 includes hardware, software or both, and couples the components of the computer device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0174] The computer device can be based on a dynamic connection method to achieve the combination Figure 1 Describes the dynamic data source management method.
[0175] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the dynamic data source management method as described in the first aspect above is implemented.
[0176] Compared with the prior art, the present invention mainly realizes: abandoning the original management mode of data source configuration in client application, handing over the data source configuration management right to the dynamic data source manager, making the client application and the data source loosely coupled, and realizing the centralized management of the data source. A heartbeat mechanism is adopted to monitor the running status of the client application and the data source connection status, and emergency measures can be automatically taken and alarms can be issued when the application running status is abnormal. Sensitive information in the data source configuration is desensitized to improve the security of the system. The data source authority management is carried out in a tenant manner to improve the versatility of the dynamic data source manager and prevent the abuse of the data source. When dynamically regulating the data source, the number of data source connections of each application can be regulated to achieve the most balanced performance in different environments; the data source can be added, modified or deleted during the application operation; and it can also be used to temporarily shield the corresponding data source for emergency response when the data source is down. In terms of management architecture, the original C / S management mode is changed to a management mode relying on a third party, so that developers can focus on business when developing client applications and will not be constrained by tedious data source maintenance work.
[0177] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0178] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A dynamic data source management method, characterized in that: include: Dynamic data source management step: uniformly register, manage and monitor multiple data sources of different types and multiple client applications, uniformly manage data source configuration, receive and process requests from the client application for the data source configuration, and issue the data source configuration to the client application; The client application starts a step in which the client application sends a request for configuring the data source, obtains the configuration of the data source, and then sends a channel connection request to the corresponding data source. Data source dynamic connection step: after receiving the channel connection request from the client application, the data source establishes a dynamic connection channel with the corresponding client application to achieve dynamic connection between the client application and the data source; The dynamic data source management step includes: Management and monitoring step: uniformly manage the client application and the data source configuration, monitor the connection status of the client application and the data source, and issue control instructions; Request service step: providing communication interface service, receiving and transmitting the control instruction, receiving the data source configuration acquisition request of the client application and issuing the data source configuration; Publishing step: receiving the control instruction, and broadcasting and publishing it to the client application that has subscribed to the control instruction; Storage step: providing data storage service to store the data source configuration.
2. The dynamic data source management method according to claim 1, characterized in that: The management and monitoring step also includes: 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; Configuration management step: managing the storage of the data source configuration; Tenant management step: create tenants, manage tenant permissions, bind the tenants to the relevant data sources, and specify the client in the tenant; Downtime protection step: when the data source is down or a network failure occurs in the data source, a downtime control instruction is broadcast to the client application, and the client application cuts off or rebuilds the dynamic connection channel established with the corresponding data source based on the downtime control instruction; Dynamic regulation step: broadcasting and issuing a dynamic regulation instruction to the client application, wherein the client application dynamically adjusts the dynamic connection channel or the number of dynamic connections established with the corresponding data source based on the dynamic regulation instruction, wherein the dynamic adjustment operation includes adding, modifying or deleting; Encryption step: encrypt the data source configuration and the control instruction, the client application receives the encrypted data source configuration and the control instruction, and performs corresponding operations after decryption.
3. The dynamic data source management method according to claim 2, characterized in that: The service request step comprises: Heartbeat monitoring step: receiving heartbeat data sent by the client application, and reading the heartbeat data in real time to monitor the connection status of the client and the client and the data source.
4. The dynamic data source management method according to claim 2, characterized in that: The publishing step also includes: Broadcasting step: used to broadcast and publish the control instruction to the client application that has subscribed to the control instruction.
5. The dynamic data source management method according to claim 3, characterized in that: The storing step further comprises: The encrypted data source configuration is stored, the heartbeat data is stored, the binding relationship between the client application and the data source is stored, and the encryption key and the tenant permission information are stored.
6. A dynamic data source management system, using the dynamic data source management method as described in claims 1-5, characterized in that: include: Dynamic data source management module: uniformly registers, manages and monitors multiple data sources of different types and multiple client applications, uniformly manages data source configuration, receives and processes requests from the client applications for the data source configuration, and sends the data source configuration to the client applications; Multiple client applications: communicating with the dynamic data source management module, the client application sends the data source configuration request to the dynamic data source management module, obtains the data source configuration and processes it, and then sends a channel connection request to the corresponding data source; Multiple data sources: the data source is communicatively connected to the dynamic data source management module, and after receiving the channel connection request from the client application, the data source establishes a connection channel with the corresponding client application to realize dynamic connection of the data source; The dynamic data source management module includes: Management and monitoring module: used to uniformly manage the client application and the data source configuration, monitor the connection status of the client application and the data source, and issue control instructions; Request service module: connected to the management and monitoring module, used to communicate with the client application and the management and monitoring module, receive and transmit the control instructions, receive the data source configuration acquisition request of the client application and issue the data source configuration; Publishing module: connected to the request service module, the publishing module receives the control instruction and broadcasts it to the client application that has subscribed to the control instruction; Storage module: connected to the management and monitoring module and the request service module, the storage module is used to provide data storage and store the data source configuration.
7. The dynamic data source management system according to claim 6, characterized in that: The management and monitoring module also includes: Initialization module: 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; Configuration management module: used to manage the storage of the data source configuration; Tenant management module: used to create tenants, manage the tenant permissions, bind the tenants to the relevant data sources, and specify the client in the tenant; Downtime protection module: when the data source is down or a network failure occurs in the data source, a downtime control instruction is broadcast to all the client applications, and the client application cuts off or rebuilds the dynamic connection channel established with the corresponding data source based on the downtime control instruction; Dynamic control module: broadcasts and issues dynamic control instructions to the client application, and the client application dynamically adjusts the dynamic connection channel or the number of dynamic connections established with the corresponding data source based on the dynamic control instructions, and the dynamic adjustment operation includes adding, modifying or deleting; Encryption module: encrypts the data source configuration and the control instructions, and the client application receives the encrypted data source configuration and the control instructions, and performs corresponding operations after decryption.
8. The dynamic data source management system according to claim 7, characterized in that: The request service module includes: Heartbeat monitoring module: used to receive the heartbeat data sent by the client application, and the management monitoring module reads the heartbeat data in real time to monitor the connection status of the client and the client and the data source.
9. The dynamic data source management system according to claim 8, characterized in that: The publishing module also includes: Broadcast module: used to broadcast and publish the control instruction to the client application that has subscribed to the control instruction.
10. The dynamic data source management system according to claim 8, characterized in that: The storage module also includes: Used to store the encrypted data source configuration, store the heartbeat data, store the binding relationship between the client application and the data source, store the encryption key and the tenant permission information.
11. A client, using the dynamic data source management method as claimed in any one of claims 1 to 5, characterized in that: Includes at least one of the client applications.
12. A server device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the dynamic data source management method according to any one of claims 1 to 5 is implemented.
13. A server device readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the dynamic data source management method as described in any one of claims 1 to 5 is implemented.
