Client configuration and database matching method and device and storage medium
By storing database influence parameters on the client, the client can adjust itself to adapt to database changes, and solve the problem of traditional clients adapting to different database versions and modes, improving compatibility and efficiency, reducing error risk and communication overhead.
Patent Information
- Application Number
- CN202411381300.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-14
AI Technical Summary
Traditional clients cannot flexibly adapt to different database versions, modes and configurations, resulting in frequent communication with servers increasing overhead, reducing system efficiency, and prone to human errors that affect stability and performance.
By obtaining the client-influence parameters of the database from the server, it is stored as key connection information. The client adjusts itself based on this information to adapt to database changes, reduces communication with the server, and realizes dynamic parameters, user interface and connection pool management.
Improve client processing efficiency and compatibility, reduce manual configuration requirements and error risks, and ensure interaction accuracy and system stability.
Smart Images

Figure CN119311735A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of R&D management and database management, and in particular to a client configuration and database matching method, device and storage medium. Background Art
[0002] Databases are widely used in various data storage and management scenarios. As customers' requirements for databases continue to increase, they not only require efficient data access, but also require higher guarantees in terms of security, performance, and reliability. Due to the diversification of business needs, there are also different expectations for the performance of the same function in different database systems. For example, some functions should behave as Oracle when compatible with Oracle, but should behave as SQL Server when compatible with SQL Server. This requires the client to adapt to the database system.
[0003] Traditional clients can only adapt to a database of a specific mode and cannot flexibly cope with different database versions, modes, and configurations. In order to adapt to the database, the client needs to frequently communicate with the server where the database is located, which increases communication overhead, reduces the execution efficiency of the system, and easily causes the client to miss queries on server information, resulting in erroneous results. In addition, in database version upgrades, migrations, or cluster environments, manually adjusting the client configuration is not only time-consuming and labor-intensive, but also prone to human errors, affecting the stability and performance of the system. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a client configuration and database matching method, device and storage medium to enable the client to automatically adapt to databases of different versions and modes.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a client configuration method, which is applied to the client and adopts the following technical solution:
[0006] Acquire a client influencing parameter of a database from a server, wherein the client influencing parameter affects an application form of the client;
[0007] storing the client-side impact parameter as key connection information in the client;
[0008] Adjust the client according to the stored key connection information to obtain a client adapted to the database;
[0009] Interaction with the database is performed through an adapted client.
[0010] In order to solve the above technical problems, the embodiment of the present application provides a database matching method, which is applied to a server and adopts the following technical solution:
[0011] After successfully connecting to the client, obtain the database parameters of the database;
[0012] Identifying client-affected parameters among the database parameters, the client-affected parameters including a version, a mode, a polymorphic configuration, and an encryption configuration of the database;
[0013] The client influence parameters are sent to the client, so that the client determines an application form that matches the database according to the client influence parameters, and adjusts the client according to the determined application form to obtain a client that is adapted to the database; the application form includes the client's operating logic and expression method; the client adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
[0014] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor includes a client configuration device, which is applied to a client and adopts the following technical solution:
[0015] A parameter acquisition module, used for acquiring client-side influencing parameters of a database from a server, wherein the client-side influencing parameters influence the application form of the client;
[0016] An information storage module, used for storing the client influencing parameter as key connection information in the client;
[0017] A client adjustment module, used for adjusting the client according to the stored key connection information to obtain a client adapted to the database;
[0018] The database interaction module is used to interact with the database through the adjusted client.
[0019] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor includes a database matching device, which is applied to a server and adopts the following technical solution:
[0020] The acquisition module is used to obtain the database parameters of the database after successfully connecting to the client;
[0021] A parameter identification module, used to identify client-side impact parameters in the database parameters, wherein the client-side impact parameters include the version, mode, polymorphic configuration, and encryption configuration of the database;
[0022] A parameter sending module is used to send the client influence parameters to the client, so that the client can determine the application form that matches the database according to the client influence parameters, and adjust the client according to the determined application form to obtain a client adapted to the database; the application form includes the client's operating logic and expression method; the client adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
[0023] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps of the client configuration method or the database matching method as described above are implemented.
[0024] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: obtaining the client influencing parameters of the database from the server, the client influencing parameters will affect the application form of the client, and storing the client influencing parameters as key connection information on the client, so that there is no need to frequently communicate with the server to obtain database information, thereby reducing the communication burden of the client and improving the processing efficiency of the client; the client adjusts itself according to the stored key connection information, so that it can flexibly respond to version changes, mode changes, polymorphic configurations and security requirements of the database, realizes automatic adaptation to different databases, improves the compatibility of the client and the database, and at the same time reduces the need for manual configuration and reduces the risk of errors; the accuracy of the interaction is ensured by interacting with the database through the adjusted client. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0027] Figure 2 is a flow chart of an embodiment of a client configuration method according to the present application;
[0028] Figure 3 is a flow chart of an embodiment of a database matching method according to the present application;
[0029] Figure 4 is a structural diagram of an embodiment of a client configuration device according to the present application;
[0030] Figure 5 is a schematic structural diagram of an embodiment of a database matching device according to the present application;
[0031] Figure 6 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0033] Reference to "embodiments" herein 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 skilled in the art that the embodiments described herein may be combined with other embodiments.
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0035] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0036] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0037] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0038] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0039] It should be noted that the client configuration method provided in the embodiment of the present application is generally executed by a terminal device, and accordingly, the client configuration device is generally arranged in the terminal device.
[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0041] Continue to refer Figure 2 , shows a flow chart of an embodiment of a client configuration method according to the present application. The client configuration method, applied to a client, comprises the following steps:
[0042] Step S201, obtaining client influencing parameters of a database from a server, where the client influencing parameters influence the application form of the client.
[0043] In this embodiment, the client configuration method is executed on the electronic device (eg Figure 1 The terminal device shown in the figure can communicate with the server through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future.
[0044] The client may be an application or a terminal device operated by a user.
[0045] Specifically, the client obtains the client-side influence parameter from the server, and the client-side influence parameter is a parameter of the database in the server, which can affect the attribute of the database. For databases with different attributes, the client needs to adopt a specific interaction method for interaction.
[0046] Furthermore, before the above step S201, it may also include: sending authentication information to the server; receiving the authentication result returned by the server based on the authentication information; when it is determined according to the authentication result that the server has passed the authentication of the client, sending connection success information to the server, and obtaining the client impact parameters of the database from the server.
[0047] Specifically, the client sends authentication information to the server where the database is located in the initial stage to indicate its identity. The authentication information may include a user name, password or other forms of authentication tokens, security certificates, client information, etc., which are used to verify the legitimacy of the client.
[0048] The server verifies the client based on the received authentication information and returns the authentication result. The authentication result indicates whether the client is authenticated. If the authentication result determines that the server has authenticated the client, the client sends a connection success message to the server to confirm that further operations can be performed. After confirming that the connection is successful, the client obtains the client-side impact parameters related to the database from the server for subsequent configuration.
[0049] In this embodiment, authentication information is sent to the server and the returned authentication result is received; when the authentication result indicates that the server has successfully authenticated the client, a connection success message is sent to the server, and the client impact parameters of the database are obtained from the server, ensuring that only authenticated clients can interact with the database, thereby improving security; after the connection is successful, the client impact parameters are obtained to ensure that the client can subsequently interact normally with the database.
[0050] Furthermore, the above step S201 may include: obtaining database parameters of the database through the server; identifying client-affected parameters in the database parameters, the client-affected parameters including database version, mode, polymorphic configuration and encryption configuration; and sending the client-affected parameters to the client through the server.
[0051] Specifically, the server obtains the database parameters of the database. Database parameters are all parameters related to the database, which fully describe the properties of the database. Database parameters can be classified into client-affected parameters and conventional parameters. Conventional parameters do not affect the application form of the client and do not affect the client application processing logic. On the contrary, client-affected parameters affect the application form of the client and the client application processing logic. Client-affected parameters include database version, mode, polymorphic configuration, and encryption configuration.
[0052] Here, version refers to a specific version of a database management system. Different versions of a database may have significant differences in functionality, performance, and compatibility. For example, Oracle Database 12c and Oracle Database 19c are two different versions with significant differences in functionality and performance. The older version may not support some features of the newer version.
[0053] Mode refers to the structural design and organization of objects such as tables, views, and stored procedures in a database. Different modes can affect the way database operations are performed. For example, in an e-commerce system, the database has "transaction mode" and "analysis mode". In transaction mode, the database table design and index optimization may be for fast insertion and query of order data; in analysis mode, it may be optimized for complex queries and data aggregation.
[0054] Polymorphic configuration means that the database behaves differently under different configurations, and the operation mode or function of the database can be adjusted as needed. For example, a function behaves as Oracle in Oracle database and as SQL Server in SQL Server. Through polymorphic configuration, the same client logic can be used in different database environments. It reflects the compatible processing standards (such as SQL standards) and the behavior of specific database systems when the database processes data.
[0055] Encryption configuration refers to whether the data transmission between the server where the database is located and the client uses an encryption protocol.
[0056] The server sends the identified client impact parameters to the client for subsequent configuration adjustment.
[0057] In this embodiment, the database parameters of the database are obtained through the server; the client-affected parameters in the database parameters are identified, including the version, mode, polymorphic configuration and encryption configuration of the database, and then the client-affected parameters are sent to the client. Fine-grained parameter management ensures that the client can make configuration adjustments more accurately, thereby improving the compatibility between the client and the database.
[0058] Step S202: storing the client influencing parameters as key connection information in the client.
[0059] Specifically, the client saves the acquired client-affected parameters as key connection information conn_i nfo to ensure that the client can access this information at any time so that it can make adjustments when database properties change or reconnect. The stored key connection information provides a reference framework for the client to make dynamic adjustments based on this information.
[0060] The client-side influencing parameters are stored in the client as key connection information, so the client no longer needs to frequently query the server for database information, which reduces the communication burden and improves the client's response speed and processing efficiency.
[0061] Step S203, adjusting the client according to the stored key connection information to obtain a client that is adapted to the database.
[0062] Specifically, the client makes self-adjustments according to the key connection information previously stored, thereby changing the application form of the client to match the database implementation and adapt to the specific requirements of the current database.
[0063] Furthermore, the above step S203 may include: determining an application form that matches the database based on the stored key connection information, the application form including the client's operating logic and expression method; adjusting the client based on the determined application form to obtain a client that adapts to the database, the adjustment including dynamic parameter adjustment, user interface adjustment and connection pool management.
[0064] Specifically, based on the stored key connection information, determine the application form suitable for the current database. The application form includes the client's operation logic (for example, in transaction processing mode, optimize insertion and query operations; in analysis mode, optimize complex queries and data aggregation operations) and expression methods (for example, when the database is Oracle 12c, the 12c compatibility mode will be used; if it is SQL Server, it will be adjusted to the SQL Server compatibility mode).
[0065] The client can pre-set an adjustment strategy table that lists the specific parameters and corresponding processing methods for different database versions and modes. The client can determine the application form by referring to this table and make corresponding adjustments. Adjustments can include dynamic parameter adjustments (for example, dynamically adjusting SQL statements and security configurations during interaction based on polymorphic configuration and whether encryption is required), user interface adjustments (if the client application has a user interface, the interface elements can be adjusted based on the database compatibility mode and encryption configuration, for example, icons or information prompts showing the encryption status in encrypted transmission mode), and optimization of connection pool management (adjusting the configuration of the database connection pool based on different compatibility modes and encryption configurations, for example, in encrypted transmission mode, the number of connections in the connection pool may need to be reduced to reduce the overhead of encryption calculations), etc.
[0066] In this embodiment, the application form that matches the database is determined based on the stored key connection information; the client is adjusted according to the application form, including dynamic parameter adjustment, user interface adjustment and connection pool management, so that the client can adapt to the needs of different databases; the automated adjustment mechanism reduces manual configuration, reduces the probability of error, and can quickly respond to changes in the database.
[0067] Step S204: interact with the database through the adjusted client.
[0068] Specifically, after the adjustment is completed, the client can interact normally with the database. At this time, the client has been optimized according to the latest database parameters and has achieved matching with the database. The client can handle interactive tasks in the best state, ensuring the accuracy of the interaction.
[0069] In this embodiment, the client influencing parameters of the database are obtained from the server. The client influencing parameters will affect the application form of the client. The client influencing parameters are stored in the client as key connection information, so there is no need to frequently communicate with the server to obtain database information, which reduces the communication burden of the client and improves the processing efficiency of the client; the client adjusts itself according to the stored key connection information, so that it can flexibly respond to version changes, mode changes, polymorphic configurations and security requirements of the database, realizes automatic adaptation to different databases, improves the compatibility of the client and the database, and at the same time reduces the need for manual configuration and reduces the risk of errors; the adjusted client interacts with the database to ensure the accuracy of the interaction.
[0070] Furthermore, after the above step S204, it may also include: obtaining the client impact parameters of the database from the server according to the verification instruction triggered by the timer, and updating the key connection information according to the obtained client impact parameters; or, receiving a database change notification, and obtaining the client impact parameters of the database from the server according to the change notification, and updating the key connection information according to the obtained client impact parameters.
[0071] Specifically, the client can detect changes in database attributes through a periodic verification mechanism. A timer can be set in the client to obtain the latest client-affected parameters from the server and update key connection information according to the verification instructions triggered regularly to ensure that the client always matches the latest database configuration.
[0072] Alternatively, the client registers a listener for the database and receives notifications of changes in database properties. When a database property changes, the server sends a change notification to the client. After receiving the notification, the client obtains the new client-affected parameters from the server and updates the stored key connection information.
[0073] In this embodiment, the client-side influencing parameters are ensured to be kept up to date through periodic verification or database change notification, so that the client always keeps synchronization with the database configuration, preventing system incompatibility or performance degradation caused by changes in database properties, and improving reliability.
[0074] Furthermore, the above client configuration method may also include: when a database migration or cluster change occurs, generating a change notification through the server; and sending the change notification to the client through the server.
[0075] Specifically, in addition to version changes, databases also affect clients when database migration or database cluster changes occur. Database migration refers to migrating a database from one environment to another, such as from a local data center to the cloud. Migration will cause changes in database configuration. Database cluster changes refer to combining multiple database servers to provide services as a whole. When a database cluster changes, it is necessary to identify the configuration of the master node and slave node to ensure that the slave node can take over seamlessly when the master node fails.
[0076] In this case, the server also needs to generate a change notification and then send the change notification to the client.
[0077] In this embodiment, when the database is migrated or the cluster environment changes, the client can obtain and adapt to the latest database status in a timely manner through change notification, thereby ensuring the continuity and stability of data access.
[0078] refer to Figure 3 , shows a flow chart of an embodiment of a database matching method according to the present application. The database matching method, applied to a server, comprises the following steps:
[0079] Step S301, after successfully connecting to the client, obtain database parameters of the database.
[0080] Specifically, the server first establishes a connection with the client, and after the connection is successful, the server obtains database parameters of the database, wherein the database is set in the server. The database parameters are all parameters related to the database, which fully describe the properties of the database.
[0081] Step S302, identifying client-affected parameters in the database parameters, where the client-affected parameters include database version, mode, polymorphic configuration, and encryption configuration.
[0082] Specifically, database parameters can be classified into client-side impact parameters and general parameters. General parameters will not affect the client's application form or the client's application processing logic. Client-side impact parameters will affect the client's application form and the client's application processing logic. Client-side impact parameters include database version, mode, polymorphic configuration, and encryption configuration.
[0083] Here, version refers to a specific version of a database management system. Different versions of a database may have significant differences in functionality, performance, and compatibility. For example, Oracle Database 12c and Oracle Database 19c are two different versions with significant differences in functionality and performance. The older version may not support some features of the newer version.
[0084] Mode refers to the structural design and organization of objects such as tables, views, and stored procedures in a database. Different modes can affect the way database operations are performed. For example, in an e-commerce system, the database has "transaction mode" and "analysis mode". In transaction mode, the database table design and index optimization may be for fast insertion and query of order data; in analysis mode, it may be optimized for complex queries and data aggregation.
[0085] Polymorphic configuration means that the database behaves differently under different configurations, and the operation mode or function of the database can be adjusted as needed. For example, a function behaves as Oracle in Oracle database and as SQL Server in SQL Server. Through polymorphic configuration, the same client logic can be used in different database environments. It reflects the compatible processing standards (such as SQL standards) and the behavior of specific database systems when the database processes data.
[0086] Encryption configuration refers to whether the data transmission between the server where the database is located and the client uses an encryption protocol.
[0087] Step S303, sending the client influence parameters to the client, so that the client can determine the application form that matches the database according to the client influence parameters, and adjust the client according to the determined application form to obtain a client that adapts to the database; the application form includes the client's operating logic and expression method; the client adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
[0088] Specifically, the server can send the client-side impact parameters to the client in the form of a message. The client saves the received client-side impact parameters as key connection information conn_i nfo to ensure that the information can be accessed at any time so as to make adjustments when the database properties change or reconnect. The stored key connection information provides a reference framework for the client to make dynamic adjustments based on the information.
[0089] The client-side influencing parameters are stored in the client as key connection information, so the client no longer needs to frequently query the server for database information, which reduces the communication burden and improves the client's response speed and processing efficiency.
[0090] The client will determine the application form suitable for the current database based on the stored key connection information. The application form includes the client's operation logic (for example, in transaction processing mode, optimize insertion and query operations; in analysis mode, optimize complex queries and data aggregation operations) and expression method (for example, when the database is Oracle 12c, the 12c compatibility mode will be used; if it is SQL Server, it will be adjusted to the SQL Server compatibility mode).
[0091] Then, the client is adjusted according to the determined application form, including dynamic parameter adjustment (for example, dynamically adjusting the SQL statement and security configuration during interaction according to the polymorphic configuration and whether encryption is required), user interface adjustment (if the client application has a user interface, the interface elements can be adjusted according to the database compatibility mode and encryption configuration, for example, an icon or information prompt showing the encryption status in encrypted transmission mode), and connection pool management optimization (adjusting the configuration of the database connection pool according to different compatibility modes and encryption configurations, for example, in encrypted transmission mode, it may be necessary to reduce the number of connections in the connection pool to reduce the overhead of encryption calculations), etc.
[0092] In this embodiment, by acquiring and identifying the client-affected parameters in the database parameters and sending them to the client, the server can realize intelligent support for different clients; the database actively provides key configuration parameters, and the client can automatically determine the matching application form after receiving these parameters, thereby reducing the complex manual configuration process and improving the compatibility between the client and the database; by providing dynamic parameter adjustment, user interface adjustment and connection pool management functions, the client can quickly adapt to different database versions, modes and security configurations, avoiding compatibility issues caused by database upgrades or migrations; by actively pushing client-affected parameters through the database, the frequent communication between the client and the server is reduced, the communication overhead is reduced, and the interaction efficiency is improved; this automatic adjustment and parameter synchronization mechanism also ensures the efficient operation and stability of the system.
[0093] Furthermore, the above step of identifying the client-affecting parameters in the database parameters may include: obtaining a morphological parameter table of the database, the morphological parameter table records the parameter types that affect the database morphology, and the database morphology affects the application morphology of the client; and determining the client-affecting parameters in the database parameters according to the morphological parameter table.
[0094] Specifically, the server obtains a morphology parameter table, which records various parameter types that affect the database morphology. The morphology parameter table is a configuration table that describes the operating characteristics of the database under different environments and configurations.
[0095] The database shape refers to how the database behaves in a specific configuration or state. This may include the database version, operating mode (such as transaction processing mode, analysis mode), performance tuning settings, etc. The shape of the database determines how data is processed, specific functions are supported, and how it interacts with clients. For example, a database may optimize complex queries in analysis mode, while prioritizing fast writes and data consistency in transaction processing mode.
[0096] According to the morphological parameter table, the server identifies the influencing parameters related to the client interaction from the database parameters. The client can make appropriate adjustments based on these parameters in subsequent interactions to ensure system compatibility and performance optimization.
[0097] In one embodiment, the client-side influencing parameters are locked and cannot be set or modified, but can only be viewed until the client-side influencing parameters are sent to the client.
[0098] In this embodiment, a morphology parameter table is obtained and the client influencing parameters are determined in the database parameters, thereby achieving more refined management; the morphology parameter table provides a structured reference framework, enabling the server to accurately identify which parameters will affect the client's application morphology, enabling the server to automatically provide the necessary configuration, and ensuring that the client can dynamically adjust according to the latest database status in different environments.
[0099] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned client-side influence parameters, the above-mentioned client-side influence parameters can also be stored in a node of a blockchain.
[0100] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0101] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0102] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0103] Further references Figure 4 , as a response to the above Figure 2 The present application provides an embodiment of a client configuration device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0104] like Figure 4 As shown, the client configuration device 400 described in this embodiment is applied to the client, including: a parameter acquisition module 401, an information storage module 402, a client adjustment module 403 and a database interaction module 404, wherein:
[0105] The parameter acquisition module 401 is used to acquire the client-side influencing parameters of the database from the server, where the client-side influencing parameters influence the application form of the client.
[0106] The information storage module 402 is used to store the client influencing parameters as key connection information in the client.
[0107] The client adjustment module 403 is used to adjust the client according to the stored key connection information to obtain a client that is adapted to the database.
[0108] The database interaction module 404 is used to interact with the database through the adjusted client.
[0109] In this embodiment, the client influencing parameters of the database are obtained from the server. The client influencing parameters will affect the application form of the client. The client influencing parameters are stored in the client as key connection information, so there is no need to frequently communicate with the server to obtain database information, which reduces the communication burden of the client and improves the processing efficiency of the client; the client adjusts itself according to the stored key connection information, so that it can flexibly respond to version changes, mode changes, polymorphic configurations and security requirements of the database, realizes automatic adaptation to different databases, improves the compatibility of the client and the database, and at the same time reduces the need for manual configuration and reduces the risk of errors; the adjusted client interacts with the database to ensure the accuracy of the interaction.
[0110] In some optional implementations of this embodiment, the client configuration device 400 may further include: an authentication sending module and a result receiving module, wherein:
[0111] The authentication sending module is used to send authentication information to the server.
[0112] The result receiving module is used to receive the authentication result returned by the server according to the authentication information.
[0113] The parameter acquisition module 401 is also used to send a connection success message to the server and acquire the client-affected parameters in the database from the server when it is determined according to the authentication result that the server has successfully authenticated the client.
[0114] In this embodiment, authentication information is sent to the server and the returned authentication result is received; when the authentication result indicates that the server has successfully authenticated the client, a connection success message is sent to the server, and the client impact parameters of the database are obtained from the server, ensuring that only authenticated clients can interact with the database, thereby improving security; after the connection is successful, the client impact parameters are obtained to ensure that the client can subsequently interact normally with the database.
[0115] In some optional implementations of this embodiment, the parameter acquisition module 401 may include: a parameter acquisition submodule, a parameter identification submodule and a parameter sending submodule, wherein:
[0116] The parameter acquisition submodule is used to obtain the database parameters of the database through the server.
[0117] The parameter identification submodule is used to identify the client-side impact parameters in the database parameters, which include the database version, mode, polymorphic configuration and encryption configuration.
[0118] The parameter sending submodule is used to send the client impact parameters to the client through the server.
[0119] In this embodiment, the database parameters of the database are obtained through the server; the client-affected parameters in the database parameters are identified, including the version, mode, polymorphic configuration and encryption configuration of the database, and then the client-affected parameters are sent to the client. Fine-grained parameter management ensures that the client can make configuration adjustments more accurately, thereby improving the compatibility between the client and the database.
[0120] In some optional implementations of this embodiment, the client adjustment module 403 may include: a morphology determination submodule and a client adjustment submodule, wherein:
[0121] The form determination submodule is used to determine the application form that matches the database based on the stored key connection information. The application form includes the client's operation logic and expression method.
[0122] The client adjustment submodule is used to adjust the client according to the determined application form to obtain a client adapted to the database. The adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
[0123] In this embodiment, the application form that matches the database is determined based on the stored key connection information; the client is adjusted according to the application form, including dynamic parameter adjustment, user interface adjustment and connection pool management, so that the client can adapt to the needs of different databases; the automated adjustment mechanism reduces manual configuration, reduces the probability of error, and can quickly respond to changes in the database.
[0124] In some optional implementations of this embodiment, the client configuration device 400 may further include: an instruction acquisition module and a notification acquisition module, wherein:
[0125] The instruction acquisition module is used to obtain the client impact parameters of the database from the server according to the verification instruction triggered by the timer, and update the key connection information according to the obtained client impact parameters.
[0126] The notification acquisition module is used to receive a database change notification, and obtain the client impact parameter of the database from the server according to the change notification, and update the key connection information according to the obtained client impact parameter.
[0127] In this embodiment, the client-side influencing parameters are ensured to be kept up to date through periodic verification or database change notification, so that the client always keeps synchronization with the database configuration, preventing system incompatibility or performance degradation caused by changes in database properties, and improving reliability.
[0128] In some optional implementations of this embodiment, the client configuration device 400 may further include: a notification generating module and a notification sending module, wherein:
[0129] The notification generation module is used to generate change notifications through the server when the database is migrated or the cluster changes.
[0130] The notification sending module is used to send change notifications to the client through the server.
[0131] In this embodiment, when the database is migrated or the cluster environment changes, the client can obtain and adapt to the latest database status in a timely manner through change notification, thereby ensuring the continuity and stability of data access.
[0132] Further references Figure 5 , as a response to the above Figure 3 The present application provides an embodiment of a database matching device, and the device embodiment is similar to Figure 3 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0133] like Figure 5 As shown, the database matching device 500 described in this embodiment is applied to a server, and includes: an acquisition module 501, a parameter identification module 502 and a parameter sending module 503, wherein:
[0134] The acquisition module 501 is used to acquire database parameters of the database after successfully connecting to the client.
[0135] The parameter identification module 502 is used to identify the client-side impact parameters in the database parameters, where the client-side impact parameters include the version, mode, polymorphic configuration and encryption configuration of the database.
[0136] The parameter sending module 503 is used to send the client influence parameters to the client, so that the client can determine the application form that matches the database according to the client influence parameters, and adjust the client according to the determined application form to obtain a client that adapts to the database; the application form includes the client's operating logic and expression method; the client adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
[0137] In this embodiment, by acquiring and identifying the client-affected parameters in the database parameters and sending them to the client, the server can realize intelligent support for different clients; the database actively provides key configuration parameters, and the client can automatically determine the matching application form after receiving these parameters, thereby reducing the complex manual configuration process and improving the compatibility between the client and the database; by providing dynamic parameter adjustment, user interface adjustment and connection pool management functions, the client can quickly adapt to different database versions, modes and security configurations, avoiding compatibility issues caused by database upgrades or migrations; by actively pushing client-affected parameters through the database, the frequent communication between the client and the server is reduced, the communication overhead is reduced, and the interaction efficiency is improved; this automatic adjustment and parameter synchronization mechanism also ensures the efficient operation and stability of the system.
[0138] In some optional implementations of this embodiment, the parameter identification module 502 may include: a table acquisition submodule and a parameter determination submodule, wherein:
[0139] The table acquisition submodule is used to obtain the database morphology parameter table. The morphology parameter table records the parameter types that affect the database morphology. The database morphology affects the application morphology of the client.
[0140] The parameter determination submodule is used to determine the client influencing parameters in the database parameters according to the morphological parameter table.
[0141] In this embodiment, a morphology parameter table is obtained and the client influencing parameters are determined in the database parameters, thereby achieving more refined management; the morphology parameter table provides a structured reference framework, enabling the server to accurately identify which parameters will affect the client's application morphology, enabling the server to automatically provide the necessary configuration, and ensuring that the client can dynamically adjust according to the latest database status in different environments.
[0142] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0143] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 with components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.
[0144] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0145] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the client configuration method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.
[0146] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions stored in the memory 61 or process data, such as computer-readable instructions for running the client configuration method.
[0147] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
[0148] The computer device provided in this embodiment can execute the above-mentioned client configuration method. Here, the client configuration method can be the client configuration method of each of the above-mentioned embodiments. The processor 62 of the computer device can include the above-mentioned client configuration device 400.
[0149] In this embodiment, the client influencing parameters of the database are obtained from the server. The client influencing parameters will affect the application form of the client. The client influencing parameters are stored in the client as key connection information, so there is no need to frequently communicate with the server to obtain database information, which reduces the communication burden of the client and improves the processing efficiency of the client; the client adjusts itself according to the stored key connection information, so that it can flexibly respond to version changes, mode changes, polymorphic configurations and security requirements of the database, realizes automatic adaptation to different databases, improves the compatibility of the client and the database, and at the same time reduces the need for manual configuration and reduces the risk of errors; the adjusted client interacts with the database to ensure the accuracy of the interaction.
[0150] The computer device provided in this embodiment can execute the above database matching method. Here, the database matching method can be the database matching method of each of the above embodiments. The processor 62 of the computer device can include the above database matching device 500.
[0151] In this embodiment, by acquiring and identifying the client-affected parameters in the database parameters and sending them to the client, the server can realize intelligent support for different clients; the database actively provides key configuration parameters, and the client can automatically determine the matching application form after receiving these parameters, thereby reducing the complex manual configuration process and improving the compatibility between the client and the database; by providing dynamic parameter adjustment, user interface adjustment and connection pool management functions, the client can quickly adapt to different database versions, modes and security configurations, avoiding compatibility issues caused by database upgrades or migrations; by actively pushing client-affected parameters through the database, the frequent communication between the client and the server is reduced, the communication overhead is reduced, and the interaction efficiency is improved; this automatic adjustment and parameter synchronization mechanism also ensures the efficient operation and stability of the system.
[0152] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the client configuration method as described above.
[0153] In this embodiment, the client influencing parameters of the database are obtained from the server. The client influencing parameters will affect the application form of the client. The client influencing parameters are stored in the client as key connection information, so there is no need to frequently communicate with the server to obtain database information, which reduces the communication burden of the client and improves the processing efficiency of the client; the client adjusts itself according to the stored key connection information, so that it can flexibly respond to version changes, mode changes, polymorphic configurations and security requirements of the database, realizes automatic adaptation to different databases, improves the compatibility of the client and the database, and at the same time reduces the need for manual configuration and reduces the risk of errors; the adjusted client interacts with the database to ensure the accuracy of the interaction.
[0154] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the database matching method as described above.
[0155] In this embodiment, by acquiring and identifying the client-affected parameters in the database parameters and sending them to the client, the server can realize intelligent support for different clients; the database actively provides key configuration parameters, and the client can automatically determine the matching application form after receiving these parameters, thereby reducing the complex manual configuration process and improving the compatibility between the client and the database; by providing dynamic parameter adjustment, user interface adjustment and connection pool management functions, the client can quickly adapt to different database versions, modes and security configurations, avoiding compatibility issues caused by database upgrades or migrations; by actively pushing client-affected parameters through the database, the frequent communication between the client and the server is reduced, the communication overhead is reduced, and the interaction efficiency is improved; this automatic adjustment and parameter synchronization mechanism also ensures the efficient operation and stability of the system.
[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0157] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A client configuration method, characterized in that: Applied to the client, including the following steps: Acquire a client influencing parameter of a database from a server, wherein the client influencing parameter affects an application form of the client; storing the client-side impact parameter as key connection information in the client; Adjust the client according to the stored key connection information to obtain a client adapted to the database; Interaction with the database is performed through an adapted client.
2. The client configuration method according to claim 1, characterized in that: Before the step of obtaining the client-side impact parameter of the database from the server, the method further includes: Send authentication information to the server; Receiving an authentication result returned by the server according to the authentication information; When it is determined according to the authentication result that the server has successfully authenticated the client, a connection success message is sent to the server, and the step of obtaining the client-affected parameters of the database from the server is performed.
3. The client configuration method according to claim 1, characterized in that: The step of obtaining the client-side impact parameter of the database from the server comprises: Get the database parameters of the database through the server; Identifying client-affected parameters among the database parameters, the client-affected parameters including a version, a mode, a polymorphic configuration, and an encryption configuration of the database; The client influence parameter is sent to the client through the server.
4. The client configuration method according to claim 1, characterized in that: The step of adjusting the client according to the stored key connection information to obtain a client adapted to the database comprises: Determine an application form that matches the database according to the stored key connection information, the application form including the operation logic and expression mode of the client; The client is adjusted according to the determined application form to obtain a client adapted to the database, wherein the adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
5. The client configuration method according to claim 1, characterized in that: After the step of interacting with the database through the adjusted client, the method further includes: According to the verification instruction triggered by the timer, the client impact parameter of the database is obtained from the server, and the key connection information is updated according to the obtained client impact parameter; or, A change notification of the database is received, and according to the change notification, a client impact parameter of the database is obtained from the server, and the key connection information is updated according to the obtained client impact parameter.
6. The client configuration method according to claim 5, characterized in that: The method further comprises: When the database is migrated or the cluster changes, a change notification is generated through the server; The change notification is sent to the client through the server.
7. A database matching method, characterized in that: Applied to the server, including the following steps: After successfully connecting to the client, obtain the database parameters of the database; Identifying client-affected parameters among the database parameters, the client-affected parameters including a version, a mode, a polymorphic configuration, and an encryption configuration of the database; The client influence parameters are sent to the client, so that the client determines an application form that matches the database according to the client influence parameters, and adjusts the client according to the determined application form to obtain a client that is adapted to the database; the application form includes the client's operating logic and expression method; the client adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
8. The database matching method according to claim 7, characterized in that: The step of identifying the client-affected parameters in the database parameters comprises: Acquire a form parameter table of the database, the form parameter table records parameter types that affect the form of the database, and the form of the database affects the application form of the client; According to the morphological parameter table, the client influencing parameters are determined in the database parameters.
9. A computer device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor comprises a client configuration device, wherein the client configuration device is applied to a client and comprises: A parameter acquisition module, used for acquiring client-side influencing parameters of a database from a server, wherein the client-side influencing parameters influence the application form of the client; An information storage module, used for storing the client influencing parameter as key connection information in the client; A client adjustment module, used for adjusting the client according to the stored key connection information to obtain a client adapted to the database; The database interaction module is used to interact with the database through the adjusted client.
10. A computer device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor comprises a database matching device, and the database matching device is applied to a server and comprises: The acquisition module is used to obtain the database parameters of the database after successfully connecting to the client; A parameter identification module, used to identify client-side impact parameters in the database parameters, wherein the client-side impact parameters include the version, mode, polymorphic configuration, and encryption configuration of the database; A parameter sending module is used to send the client influence parameters to the client, so that the client can determine the application form that matches the database according to the client influence parameters, and adjust the client according to the determined application form to obtain a client adapted to the database; the application form includes the client's operating logic and expression method; the client adjustment includes dynamic parameter adjustment, user interface adjustment and connection pool management.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method as claimed in any one of claims 1 to 6 are implemented, or the steps of the method as claimed in any one of claims 7 to 8 are implemented.