WO2021208625A1 - 数据库访问方法以及装置 - Google Patents

数据库访问方法以及装置 Download PDF

Info

Publication number
WO2021208625A1
WO2021208625A1 PCT/CN2021/078985 CN2021078985W WO2021208625A1 WO 2021208625 A1 WO2021208625 A1 WO 2021208625A1 CN 2021078985 W CN2021078985 W CN 2021078985W WO 2021208625 A1 WO2021208625 A1 WO 2021208625A1
Authority
WO
WIPO (PCT)
Prior art keywords
access
database
information
connection
user
Prior art date
Application number
PCT/CN2021/078985
Other languages
English (en)
French (fr)
Inventor
周家晶
苗浩
周继恩
Original Assignee
中国银联股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Publication of WO2021208625A1 publication Critical patent/WO2021208625A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Definitions

  • This application relates to the computer field, especially to the field of database access.
  • Database middleware is a system that provides general and reuse services between the database and the client, which can reduce the complexity of the application structure.
  • the authority configuration management module is set in the database middleware to manage the authority of users to access the database.
  • the authority configuration management module manages the user's authority, the user's authority to access the database is too large, and the user's access authority exceeds the original access authority, resulting in a higher risk of access security.
  • the embodiments of the present application provide a database access method and device to solve the problems existing in related technologies.
  • the technical solutions are as follows:
  • a database access method including:
  • it further includes:
  • the authentication request information sent by the client is forwarded to the database, and the authentication request information corresponds to the user identification information to perform access authentication based on the authentication request information and account information. If the access authentication is passed, execute the step of obtaining account information in the database .
  • multiple different types of user access instructions correspond to the same user identification information, and the user access information further includes user access instructions.
  • it further includes:
  • the account information is recorded to the first connection, and the access connection session includes the first connection, and the first connection is a connection between the database middleware and the client established according to the user access instruction.
  • obtaining account information in a database includes:
  • the account information sent by the database is recorded in the second connection, the account information is acquired.
  • it further includes:
  • connection pool when the second connection is queried according to the account information, the access data is sent to the database through the queried second connection.
  • it further includes:
  • connection pool if the second connection is not queried according to the account information, the user access information is sent to the database to establish a connection between the database middleware and the database according to the user access information.
  • it further includes:
  • the recognition result is sent to the database side, and the database side includes a main database and multiple sub-databases, so that the main database executes account management statements according to the recognition results and synchronizes the execution results to the sub-databases.
  • a database access method including:
  • the account information is sent to the database middleware to be stored in the access connection session.
  • the access connection session is established based on the user access information, and the user access information includes user identification information.
  • it further includes:
  • access authentication is performed according to the authentication request information sent by the database middleware and the user identification information;
  • the step of sending the account information to the database middleware is executed.
  • it further includes:
  • a database access device including:
  • the access connection session establishment module is used to establish an access connection session according to the user access information sent by the client, and the user access information includes user identification information;
  • the user identification information sending module is used to send the user identification information to the database to match the corresponding account information according to the user identification information;
  • the account information acquisition module is used to acquire the account information in the database
  • the first account information recording module is used to record account information in the access connection session, generate access results, and send the access results to the client.
  • it further includes:
  • the authentication information sending module is used to forward the authentication request information sent by the client to the database.
  • the authentication request information corresponds to the user identification information to perform access authentication based on the authentication request information and account information. If the access authentication is passed, indicate the account
  • the information acquisition module executes the step of acquiring account information in the database.
  • multiple different types of user access instructions correspond to the same user identification information, and the user access information further includes user access instructions.
  • it further includes:
  • the second account information recording module is configured to record account information to the first connection.
  • the access connection session includes the first connection, and the first connection is a connection between the database middleware and the client established according to a user access instruction.
  • the account information acquisition module includes:
  • the second connection obtaining submodule is configured to obtain a second connection according to user identification information, and the second connection is a connection between the database middleware and the database established according to the user access instruction;
  • the account information query sub-module is used to obtain account information when the account information sent by the database is recorded in the second connection.
  • it further includes:
  • the access data sending module is used to send the access data to the database through the second connection found in the connection pool when the second connection is queried according to the account information.
  • it further includes:
  • the user access information sending module is used to send the user access information to the database in the connection pool when the second connection is not queried based on the account information, so as to establish a connection between the database middleware and the database according to the user access information .
  • it further includes:
  • the account management sentence recognition module is used to recognize the type of account management sentence sent by the client and obtain the recognition result
  • the recognition result sending module is used to send the recognition result to the database end.
  • the database end includes a main database and multiple sub-databases so that the main database executes account management statements according to the recognition results and synchronizes the execution results to the sub-databases.
  • a database access device including:
  • the account information matching module is used to match the corresponding account information according to the user identification information sent by the database middleware;
  • the account information sending module is used to send the account information to the database middleware to save it in the access connection session when the matching is successful.
  • the access connection session is established based on the user access information, and the user access information includes user identification information.
  • it further includes:
  • the access authentication module is used to perform access authentication based on the authentication request information sent by the database middleware and the user identification information in the case of successful matching. In the case of successful access authentication, instruct the account information sending module to execute sending the account information to Steps of database middleware.
  • it further includes:
  • the information generation module for access request failure is used to generate access request failure information in the case of unsuccessful matching and/or unsuccessful access authentication, and send the access request failure information to the database middleware, so that the database middleware will The information that the access request failed is sent to the client.
  • an electronic device including:
  • At least one processor At least one processor
  • a memory communicatively connected with at least one processor; wherein,
  • the memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute any one of the foregoing methods.
  • a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to make a computer execute any of the above methods.
  • An embodiment in the above application has the following advantages or beneficial effects: because the database middleware sends the user identification information to the database, the database can directly use the user identification information to match the account information, which overcomes the excessive authority of the user to access the database, resulting in Access security is a technical problem with higher risks, which in turn achieves the technical effect of improving the accuracy and security of database access.
  • FIG. 1 is a schematic diagram of a database access method applied to database middleware according to an embodiment of the present application
  • Fig. 2 is a scene diagram of a method for accessing a database according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a database access method applied to database middleware according to another embodiment of the present application.
  • FIG. 4 is a schematic diagram of a database access method applied to database middleware according to another embodiment of the present application.
  • FIG. 5 is a schematic diagram of a database access method applied to database middleware according to another embodiment of the present application.
  • Fig. 6 is a schematic diagram of a database access method applied to database middleware according to another embodiment of the present application.
  • Fig. 7 is a scene diagram of a method for accessing a database according to another embodiment of the present application.
  • FIG. 8 is a scene diagram of a method for accessing a database according to another embodiment of the present application.
  • Fig. 9 is a schematic diagram of a database access method applied to a database according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a database access method applied to a database according to another embodiment of the present application.
  • FIG. 11 is a schematic diagram of a database access device applied to database middleware according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a database access device applied to database middleware according to another embodiment of the present application.
  • FIG. 13 is a schematic diagram of a database access device applied to database middleware according to another embodiment of the present application.
  • FIG. 14 is a schematic diagram of a database access device applied to database middleware according to another embodiment of the present application.
  • 15 is a schematic diagram of a database access device applied to a database according to another embodiment of the present application.
  • FIG. 16 is a schematic diagram of a database access device applied to a database according to another embodiment of the present application.
  • FIG. 17 is a block diagram of an electronic device used to implement a method for accessing a database according to an embodiment of the present application.
  • this embodiment provides a database access method, which is applied to database middleware and includes the following steps:
  • S110 Establish an access connection session according to the user access information sent by the client, where the user access information includes user identification information;
  • S120 Send the user identification information to the database to match the corresponding account information according to the user identification information;
  • S130 Acquire account information in the database, record the account information in the access connection session, generate an access result, and send the access result to the client.
  • the client sends user access information to the database middleware.
  • the user access information includes user identification information and user access instructions corresponding to the user identification information.
  • User identification information includes user name, IP (Internet Protocol) address and host name (host), etc.
  • the user access instruction is an instruction received by the transmission port of the client (for example, the host). Inputting instructions from different transmission ports can generate different user access instructions. Different user access instructions can correspond to the same user identification information.
  • the database middleware After the database middleware receives the user's access information, it establishes an access connection session based on the user's access information.
  • the access connection session includes the connection between the client and the database middleware, and the context information for establishing the connection.
  • different access connection sessions can be established according to different user access instructions.
  • a user access instruction, B user access instruction, and C user access instruction correspond to the same user identification information, which are input from port A, port B, and port C respectively (the input can be in chronological order), and the database middleware can be based on the user
  • the identification information and the A user access instruction establish an A access connection session
  • the B access connection session is established according to the user identification information and the B user access instruction
  • the C access connection session is established according to the user identification information and the C user access instruction.
  • different user identification information the established access connection dialog is also different.
  • the first user access information includes D user identification information and corresponding D1 user access instructions (D2 user access instructions, D3 user access instructions, etc.), and a first access connection session is established according to the first user access information.
  • the second user access information includes E user identification information and corresponding E1 user access instructions (E2 user access instructions, E3 user access instructions, etc.), and a second access connection session is established according to the second user access information.
  • the database middleware sends the user identification information to the database, so that the database matches the corresponding account information according to the user identification information.
  • a user access instruction, B user access instruction, and C user access instruction correspond to the first user identification information
  • D user access instruction and E user access instruction correspond to the second user identification information
  • the database uses the first user identification information to match the first account Information, using the second user identification information to match the second account information.
  • the database middleware only sends the account information of the client connected to the database middleware to the database, the database cannot identify different user access information (user identification information) from it, and the user's authority to access the database exceeds the original authority range.
  • at least two types of matching account information among user name, IP address, and host name can be used.
  • a combination of IP address and user name can be used to match account information, or a combination of IP address and host name can be used to match account information. It can effectively avoid that the user's permission to access the database may exceed the original permission range, causing the problem of excessive permissions, and improving the accuracy and security of database access.
  • the user identification information includes the username josn and the IP address 172.18.64.%. If the IP address is blocked by the database middleware, the account information can only be matched based on the username josn.
  • the matching account information may be josn@% or josn@ ⁇ database middleware ip>, which leads to the expansion of the matching scope, which in turn leads to the expansion of the scope of access rights.
  • the database middleware obtains the matched account information from the database and saves it in the access connection session, so that all information about the user's access to the database is recorded in the access connection session, which facilitates the management of the access connection session.
  • the access instruction of user A, the access instruction of user B, and the access instruction of user C correspond to the first user identification information.
  • the first access connection session is established according to the first user identification information and the access instruction of user A
  • the second access connection session is established according to the first user identification information and the access instruction of user B
  • the third access connection session is established according to the first user identification information and the access instruction of user C. Access the connection session.
  • the database uses the first user identification information to match the first account information, and records the first account information in the first access connection session, the second access connection session, and the third access connection session.
  • the D user access instruction corresponds to the second user identification information, and a fourth access connection session is established according to the second user identification information and the D user access instruction.
  • the database uses the second user identification information to match the second account information, and records the second account information in the fourth access connection session. Therefore, the access connection session contains the correspondence between user access information (user identification information and user access instruction), accessible account information, etc., to obtain the access result. Finally, the access result is sent to the client, so that the user can obtain the currently accessed database.
  • the database middleware sends the user identification information to the database
  • the database can directly use the user identification information to match the account information, which can effectively prevent the user's access to the database from exceeding the original authority range, resulting in excessive authority The problem of improving the accuracy and security of database access.
  • the method further includes:
  • S141 Forward the authentication request information sent by the client to the database, and the authentication request information corresponds to the user identification information, so as to perform access authentication according to the authentication request information and the account information, and if the access authentication is passed, execute S130.
  • the authentication request information includes a user name and password.
  • the client can send the user identification information and the corresponding authentication request information to the database middleware at the same time.
  • the database middleware can send user identification information and authentication request information to the database at the same time.
  • the authentication can also be completed in the database middleware.
  • the database middleware uses the currently established access connection session to query other access connection sessions with the same user identification information, and obtain the account information corresponding to the queried access connection session. Then, the database middleware uses a matching algorithm to match the username and password in the authentication request information with the password in the account information (or the password encrypted on the database side) to verify whether the passwords of both parties are consistent. If they are consistent, the authentication is passed, and step S130 is executed; if they are not consistent, the authentication is not passed, and step S142 is executed.
  • the database or database middleware verifies the correspondence between the authentication request information (user identification information) and the account information. If the authentication is passed, it is considered that the obtained account information is accurate, and the database can be accessed according to the user's real intention, which further improves the accuracy and security of database access.
  • multiple different types of user access instructions correspond to the same user identification information, and the user access information further includes user access instructions.
  • multiple different types of user access instructions may include A user access instructions, B user access instructions, and C user access instructions, corresponding to the first user identification information.
  • the multiple different types of user access instructions may also include C user access instructions and D user access instructions, corresponding to the second user identification information.
  • the A user access instruction, the B user access instruction, and the C user access instruction may be sent to the database middleware together with the first user identification information in a chronological order.
  • the user name, IP address, and host name corresponding to the A user access instruction, B user access instruction and C user access instruction are all the same. Since user access instructions are input from different ports, it can be considered that A user access instruction, B user access instruction and C User access instructions correspond to user access instructions sent by user A, user B, and user C, and the three are different.
  • the method further includes:
  • Step S150 Record the account information to the first connection, the access connection session includes the first connection, and the first connection is the connection between the database middleware and the client established according to the user access instruction.
  • the database middleware may record the account information sent by the database in the access connection session or the first connection.
  • the access connection session is associated with the first connection
  • the first connection is a communication link established according to a user access instruction, that is, a connection between the database middleware and the client.
  • the access instruction of user A, the access instruction of user B, and the access instruction of user C correspond to the first user identification information.
  • One connection corresponds to the third access connection session.
  • the first account information is recorded in the first connection of the A user, the first connection of the B user, and the first connection of the C user.
  • the account information is recorded in the connection between the database middleware and the client, so that when the same user accesses the database next time, the account information can be obtained by querying the last (historical) connection between the database middleware and the client.
  • the first account information is recorded in the first connection of the A user.
  • the account information is traceable, which not only improves the accuracy and security of database access, but also improves Improve the efficiency of database access.
  • S130 includes:
  • S131 Acquire a second connection according to the user identification information, where the second connection is a connection between the database middleware and the database established according to the user access instruction;
  • S132 Acquire account information when the account information sent by the database is recorded in the second connection
  • S133 Record the account information in the access connection session, generate the access result, and send the access result to the client.
  • the database middleware establishes a connection between the database middleware and the database, that is, the second connection, according to the user access instruction, and manages the second connection. Then, the user identification information is sent to the database, and the database matches the corresponding account information according to the user identification information. After the database middleware receives the account information, it records the account information in the second connection, and puts the second connection in the connection pool for easy reuse. During the next visit, the database middleware can query the corresponding second connection. If account information is recorded in the second connection, the account information can be directly obtained from the second connection. For example, the access instruction of user A, the access instruction of user B, and the access instruction of user C correspond to the first user identification information.
  • the second connection of user A is established according to the access instruction of user A
  • the second connection of user B is established according to the access instruction of user B
  • the second connection of user C is established according to the access instruction of user C.
  • the first account information is recorded in the second connection of the A user, the second connection of the B user, and the second connection of the C user.
  • user A next visits, he can directly obtain the second connection of user A according to the first user identification information.
  • the account information is traceable, which not only improves the accuracy and security of database access, but also improves The access efficiency of the database.
  • the method further includes:
  • connection pool In the connection pool, when the second connection is queried according to the account information, the access data is sent to the database through the queried second connection.
  • the database middleware records the account information after the second connection, and places the second connection in the connection pool. Because when the user accesses the database for the first time, the account information is recorded in the access connection session. When subsequently accessing the database, the second connection is queried in the connection pool by accessing the account information recorded in the connection session. The account information in is the same as the account information in the access connection session. By querying the second connection through account information, a communication link that can send access data to the database can be quickly found. For example, when user A visits for the first time, the first account information is recorded in the first access connection session, and the first account information is also recorded in the second connection of user A, which is stored in the connection pool. When user A visits for the second time, the first account information is obtained in the first access connection session, and the database middleware queries the connection pool for the second connection of user A with the first account information recorded as the access data by The communication link that the database middleware sends to the database.
  • the multiplexing of the connection pool that stores multiple second connections not only effectively avoids the problem of excessive user access authority when accessing the database, but also improves the accuracy and security of database access, and improves Improve the efficiency of database access.
  • the method further includes:
  • connection pool In the connection pool, if the second connection is not queried according to the account information, send the user access information to the database to establish a connection between the database middleware and the database according to the user access information.
  • the user access information or user access information and authentication request information are sent to the database.
  • the database establishes a connection between the database middleware and the database according to the user access instruction in the user access information, that is, the second connection. Match the corresponding account information according to the user identification information in the user access information, and record the account information in the second connection.
  • query the second connection through the account information and quickly find the communication link that can send the access data from the database middleware to the database.
  • the method further includes:
  • the database end includes a main database and multiple sub-databases, so that the main database executes the account management statement according to the recognition result, and synchronizes the execution result to the sub-database.
  • the database middleware recognizes the type of the account management sentence, obtains the recognition result, and sends the recognition result to the database.
  • one database can be adaptively selected as the main database according to requirements, and the main database can synchronize the execution results to other sub-databases.
  • the management process can be simplified and the management cost can be reduced.
  • the account management statement is executed by the database side, so that access permission control is still centrally managed by the database side, and there is no need to design an additional access permission control system on the database middleware, which reduces development Cost, and avoid the security management risk brought by the redevelopment of a set of access control system.
  • this embodiment provides a specific example of a database access method, which realizes that users can safely access a distributed database.
  • Coordinator Coordinator as the database middleware.
  • the client sends user access information and authentication request information to the coordinator, and establishes a connection and authentication with the coordinator.
  • User access information includes: user name (john), original user name address (IP: 172.18.1.2), and/or host information (for example, host name host).
  • the authentication request information includes: the user's authentication message and the encrypted password (enc(password)).
  • the coordinator sends user access information and authentication request information to the relational database management system (MySQL). MySQL uses the original IP and/or host information for account matching to obtain the corresponding account information (john@172.18.%.%). Then, the authentication is performed according to the authentication request information.
  • the coordinator obtains the account information (john@172.18.%.%) from MySQL and saves it in the access connection session.
  • the coordinator obtains the connection between the database middleware and the distributed database from the connection pool, it only looks for the connection with the same account information. If there is no free connection available, establish a connection with the data node in the distributed database, and save the account information in the newly established connection to facilitate connection pool management.
  • a simple strategy can be used to support MySQL account management statements.
  • the coordinator when it receives an account management statement, it will execute the statement on the metadata master node to obtain account management information. If the execution is successful, the account management information will be synchronized to each data node, and the account management information of each data node and the metadata master node will be kept synchronized.
  • this embodiment provides a database access method, which is applied to a database, including:
  • S220 If the matching is successful, send the account information to the database middleware to save it in the access connection session.
  • the access connection session is established based on the user access information, and the user access information includes user identification information.
  • the method further includes:
  • S230 In the case of a successful match, perform access authentication according to the authentication request information sent by the database middleware and the user identification information;
  • the method further includes:
  • S250 In the case of unsuccessful matching and/or unsuccessful access authentication, generate access request failure information, and send the access request failure information to the database middleware, so that the database middleware sends the access request failure information to the client end.
  • the database matches the corresponding account information according to the user identification information sent by the database middleware, and if the matching is successful, sends the account information to the database middleware, and then, according to the authentication request information sent by the database middleware, and User identification information is used for access authentication. If the access authentication is successful, step S220 is executed. In the case of unsuccessful matching and/or unsuccessful access authentication, step S250 is executed.
  • this embodiment provides a database access device applied to database middleware, including:
  • the access connection session establishment module 110 is configured to establish an access connection session according to user access information sent by the client, and the user access information includes user identification information;
  • the user identification information sending module 120 is configured to send user identification information to the database to match corresponding account information according to the user identification information;
  • the account information obtaining module 130 is used to obtain account information in the database
  • the first account information recording module 140 is configured to record account information in the access connection session, generate access results, and send the access results to the client.
  • the method further includes:
  • the authentication information sending module 150 is used to forward the authentication request information sent by the client to the database.
  • the authentication request information corresponds to the user identification information to perform access authentication based on the authentication request information and account information.
  • instruct The account information obtaining module 130 executes the step of obtaining account information in the database.
  • multiple different types of user access instructions correspond to the same user identification information, and the user access information further includes user access instructions.
  • the method further includes:
  • the second account information recording module 160 is configured to record account information to the first connection.
  • the access connection session includes the first connection.
  • the first connection is a connection between the database middleware and the client established according to a user access instruction.
  • the account information acquisition module 130 includes:
  • the second connection obtaining submodule 131 is configured to obtain a second connection according to user identification information, and the second connection is a connection between the database middleware and the database established according to the user access instruction;
  • the account information query submodule 132 is configured to obtain account information when the account information sent by the database is recorded in the second connection.
  • the method further includes:
  • the access data sending module 170 is configured to send the access data to the database through the queried second connection when the second connection is queried according to the account information in the connection pool.
  • the method further includes:
  • the user access information sending module 180 is used to send the user access information to the database in the connection pool when the second connection is not queried according to the account information, so as to establish a connection between the database middleware and the database according to the user access information. connect.
  • the method further includes:
  • the account management sentence recognition module 191 is used to recognize the type of the account management sentence sent by the client, and obtain the recognition result;
  • the recognition result sending module 192 is configured to send the recognition result to the database end.
  • the database end includes a main database and multiple sub-databases, so that the main database executes account management statements according to the recognition results and synchronizes the execution results to the sub-databases.
  • this embodiment provides a database access device, including:
  • the account information matching module 210 is configured to match the corresponding account information according to the user identification information sent by the database middleware;
  • the account information sending module 220 is used to send the account information to the database middleware to save it in the access connection session when the matching is successful.
  • the access connection session is established based on the user access information, and the user access information includes user identification information .
  • the method further includes:
  • the access authentication module 230 is used to perform access authentication according to the authentication request information sent by the database middleware and the user identification information in the case of successful matching, and instruct the account information sending module 220 to execute the account information transmission in the case of successful access authentication. Steps sent to the database middleware.
  • the method further includes:
  • the access request failed information generating module 240 is used to generate access request failure information in the case of unsuccessful matching and/or unsuccessful access authentication, and send the access request failure information to the database middleware, so that the database middleware Send the information that the access request failed to the client.
  • the present application also provides an electronic device and a readable storage medium.
  • FIG. 17 it is a block diagram of an electronic device of a method for accessing a database according to an embodiment of the present application.
  • Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the application described and/or required herein.
  • the electronic device includes: one or more processors 1701, memory 1702, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
  • the various components are connected to each other using different buses, and can be installed on a common motherboard or installed in other ways as needed.
  • the processor may process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to an interface).
  • an external input/output device such as a display device coupled to an interface.
  • multiple processors and/or multiple buses can be used with multiple memories and multiple memories.
  • multiple electronic devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
  • a processor 1701 is taken as an example.
  • the memory 1702 is a non-transitory computer-readable storage medium provided by this application.
  • the memory stores instructions that can be executed by at least one processor, so that the at least one processor executes a database access method provided in this application.
  • the non-transitory computer-readable storage medium of this application stores computer instructions, and the computer instructions are used to make a computer execute a database access method provided by this application.
  • the memory 1702 can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to a database access method in the embodiment of the present application (for example, , The access connection session establishment module 110, the user identification information sending module 120, the account information acquiring module 130, and the first account information recording module 140 shown in FIG. 11).
  • the processor 1701 executes various functional applications and data processing of the server by running non-transitory software programs, instructions, and modules stored in the memory 1702, that is, implements a database access method in the foregoing method embodiment.
  • the memory 1702 may include a program storage area and a data storage area.
  • the program storage area may store an operating system and an application program required by at least one function; Data etc.
  • the memory 1702 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
  • the memory 1702 may optionally include memories remotely provided with respect to the processor 1701, and these remote memories may be connected to an electronic device of a database access method via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the electronic device of a database access method may further include: an input device 1703 and an output device 1704.
  • the processor 1701, the memory 1702, the input device 1703, and the output device 1704 may be connected by a bus or other methods. In FIG. 17, the connection by a bus is taken as an example.
  • the input device 1703 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device of a database access method, such as touch screen, keypad, mouse, track pad, touch pad, and pointer Stick, one or more mouse buttons, trackball, joystick and other input devices.
  • the output device 1704 may include a display device, an auxiliary lighting device (for example, LED), a tactile feedback device (for example, a vibration motor), and the like.
  • the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
  • Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, the programmable processor It can be a dedicated or general-purpose programmable processor that can receive data and instructions from the storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
  • machine-readable medium and “computer-readable medium” refer to any computer program product, device, and/or device used to provide machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memory, programmable logic devices (PLD)), including machine-readable media that receive machine instructions as machine-readable signals.
  • machine-readable signal refers to any signal used to provide machine instructions and/or data to a programmable processor.
  • the systems and techniques described here can be implemented on a computer that has: a display device for displaying information to the user (for example, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) ); and a keyboard and a pointing device (for example, a mouse or a trackball) through which the user can provide input to the computer.
  • a display device for displaying information to the user
  • LCD liquid crystal display
  • keyboard and a pointing device for example, a mouse or a trackball
  • Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (for example, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, voice input, or tactile input) to receive input from the user.
  • the systems and technologies described herein can be implemented in a computing system that includes back-end components (for example, as a data server), or a computing system that includes middleware components (for example, an application server), or a computing system that includes front-end components (for example, A user computer with a graphical user interface or a web browser, through which the user can interact with the implementation of the system and technology described herein), or includes such back-end components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system can be connected to each other through any form or medium of digital data communication (for example, a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
  • the computer system can include clients and servers.
  • the client and server are generally far away from each other and usually interact through a communication network.
  • the relationship between the client and the server is generated by computer programs that run on the corresponding computers and have a client-server relationship with each other.

Abstract

本申请公开了一种数据库访问方法以及装置,具体实现方案为:根据客户端发送的用户访问信息建立访问连接会话,用户访问信息包括用户标识信息;将用户标识信息发送至数据库,以根据用户标识信息匹配对应的账户信息;获取数据库中的账户信息,并将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。数据库访问方法能够有效避免用户访问数据库的权限可能超出原有的权限范围,导致权限过大的问题,提高了数据库访问的精确性和安全性。

Description

数据库访问方法以及装置 技术领域
本申请涉及计算机领域,尤其涉及数据库访问领域。
背景技术
为了提高数据库或数据库集群的处理性能和易用性等,通常使用数据库中间件。数据库中间件是处于数据库与客户端之间提供通用、复用服务的系统,能够减少应用结构的复杂性。目前,在数据库中间件中设置权限配置管理模块,对用户访问数据库的权限进行管理。然而,权限配置管理模块在对用户的权限进行管理时,用户访问数据库的权限过大,出现用户的访问权限超出了原有访问权限的现象,导致访问安全性具有较高的风险。
发明内容
本申请实施例提供一种数据库访问方法以及装置,以解决相关技术存在的问题,技术方案如下:
第一方面,提供了一种数据库访问方法,包括:
根据客户端发送的用户访问信息建立访问连接会话,用户访问信息包括用户标识信息;
将用户标识信息发送至数据库,以根据用户标识信息匹配对应的账户信息;
获取数据库中的账户信息,并将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。
在一种实施方式中,还包括:
将客户端发送的认证请求信息转发至数据库,认证请求信息与用户标识信息对应,以根据认证请求信息和账户信息进行访问认证,在访问认证通过的情况下,执行获取数据库中的账户信息的步骤。
在一种实施方式中,多个不同种类的用户访问指令对应同一用户标识信息,用户访问信息还包括用户访问指令。
在一种实施方式中,还包括:
将账户信息记录至第一连接,访问连接会话包括第一连接,第一连接是根据用户访问指令建立的数据库中间件和客户端之间的连接。
在一种实施方式中,获取数据库中的账户信息,包括:
根据用户标识信息获取第二连接,第二连接是根据用户访问指令建立的数据库中间件和数据库之间的连接;
在第二连接中记录有数据库发送的账户信息的情况下,获取账户信息。
在一种实施方式中,还包括:
在连接池中,根据账户信息查询到第二连接的情况下,将访问数据通过查询到的第二连接发送至数据库中。
在一种实施方式中,还包括:
在连接池中,根据账户信息并未查询到第二连接的情况下,将用户访问信息发送至数据库,以根据用户访问信息建立数据库中间件和数据库之间的连接。
在一种实施方式中,还包括:
识别客户端发送的账户管理语句的类型,得到识别结果;
将识别结果发送至数据库端,数据库端包括主数据库和多个分数据库,以使主数据库根据识别结果执行账户管理语句,并将执行结果同步至分数据库中。
第二方面,提供了一种数据库访问方法,包括:
根据数据库中间件发送的用户标识信息匹配对应的账户信息;
在匹配成功的情况下,将账户信息发送至数据库中间件,以保存至访问连接会话中,访问连接会话是根据用户访问信息建立的,用户访问信息包括用户标识信息。
在一种实施方式中,还包括:
在匹配成功的情况下,根据数据库中间件发送的认证请求信息,以及用户标识信息进行访问认证;
在访问认证成功的情况下,执行将账户信息发送至数据库中间件的步骤。
在一种实施方式中,还包括:
在匹配不成功和/或访问认证不成功的情况下,生成访问请求失败的信息,将访问请求失败的信息发送至数据库中间件,以使数据库中间件将访问请求失败的信息发送至客户端。
第三方面,提供了一种数据库访问装置,包括:
访问连接会话建立模块,用于根据客户端发送的用户访问信息建立访问连接会话,用户访问信息包括用户标识信息;
用户标识信息发送模块,用于将用户标识信息发送至数据库,以根据用户标识信息匹配对应的账户信息;
账户信息获取模块,用于获取数据库中的账户信息;
第一账户信息记录模块,用于将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。
在一种实施方式中,还包括:
认证信息发送模块,用于将客户端发送的认证请求信息转发至数据库,认证请求信息与用户标识信息对应,以根据认证请求信息和账户信息进行访问认证,在访问认证通过的情况下,指示账户信息获取模块执行获取数据库中的账户信息的步骤。
在一种实施方式中,多个不同种类的用户访问指令对应同一用户标识信息,用户访问信息还包括用户访问指令。
在一种实施方式中,还包括:
第二账户信息记录模块,用于将账户信息记录至第一连接,访问连接会话包括第一连接,第一连接是根据用户访问指令建立的数据库中间件和客户端之间的连接。
在一种实施方式中,账户信息获取模块包括:
第二连接获取子模块,用于根据用户标识信息获取第二连接,第二连接是根据用户访问指令建立的数据库中间件和数据库之间的连接;
账户信息查询子模块,用于在第二连接中记录有数据库发送的账户信 息的情况下,获取账户信息。
在一种实施方式中,还包括:
访问数据发送模块,用于在连接池中,根据账户信息查询到第二连接的情况下,将访问数据通过查询到的第二连接发送至数据库中。
在一种实施方式中,还包括:
用户访问信息发送模块,用于在连接池中,根据账户信息并未查询到第二连接的情况下,将用户访问信息发送至数据库,以根据用户访问信息建立数据库中间件和数据库之间的连接。
在一种实施方式中,还包括:
账户管理语句识别模块,用于识别客户端发送的账户管理语句的类型,得到识别结果;
识别结果发送模块,用于将识别结果发送至数据库端,数据库端包括主数据库和多个分数据库,以使主数据库根据识别结果执行账户管理语句,并将执行结果同步至分数据库中。
第四方面,提供了一种数据库访问装置,包括:
账户信息匹配模块,用于根据数据库中间件发送的用户标识信息匹配对应的账户信息;
账户信息发送模块,用于在匹配成功的情况下,将账户信息发送至数据库中间件,以保存至访问连接会话中,访问连接会话是根据用户访问信息建立的,用户访问信息包括用户标识信息。
在一种实施方式中,还包括:
访问认证模块,用于在匹配成功的情况下,根据数据库中间件发送的认证请求信息,以及用户标识信息进行访问认证,在访问认证成功的情况下,指示账户信息发送模块执行将账户信息发送至数据库中间件的步骤。
在一种实施方式中,还包括:
访问请求失败的信息生成模块,用于在匹配不成功和/或访问认证不成功的情况下,生成访问请求失败的信息,将访问请求失败的信息发送至数据库中间件,以使数据库中间件将访问请求失败的信息发送至客户端。
第五方面,提供了一种电子设备,包括:
至少一个处理器;以及
与至少一个处理器通信连接的存储器;其中,
存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述任一项的方法。
第六方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,计算机指令用于使计算机执行上述任一项的方法。
上述申请中的一个实施例具有如下优点或有益效果:由于数据库中间件将用户标识信息发送数据库中,使得数据库可以直接利用用户标识信息来匹配账户信息,克服了用户访问数据库的权限过大,导致访问安全性具有较高的风险的技术问题,进而达到提高了数据库访问的精确性和安全性的技术效果。
上述可选方式所具有的其他效果将在下文中结合具体实施例加以说明。
附图说明
附图用于更好地理解本方案,不构成对本申请的限定。其中:
图1是根据本申请一实施例的一种应用于数据库中间件的数据库访问方法的示意图;
图2是根据本申请一实施例的一种数据库访问方法的场景图;
图3是根据本申请另一实施例的一种应用于数据库中间件的数据库访问方法的示意图;
图4是根据本申请另一实施例的一种应用于数据库中间件的数据库访问方法的示意图;
图5是根据本申请另一实施例的一种应用于数据库中间件的数据库访问方法的示意图;
图6是根据本申请另一实施例的一种应用于数据库中间件的数据库访问方法的示意图;
图7是根据本申请另一实施例的一种数据库访问方法的场景图;
图8是根据本申请另一实施例的一种数据库访问方法的场景图;
图9是根据本申请一实施例的一种应用于数据库的数据库访问方法的示意图;
图10是根据本申请另一实施例的一种应用于数据库的数据库访问方法的示意图;
图11是根据本申请一实施例的一种应用于数据库中间件的数据库访问装置的示意图;
图12是根据本申请另一实施例的一种应用于数据库中间件的数据库访问装置的示意图;
图13是根据本申请另一实施例的一种应用于数据库中间件的数据库访问装置的示意图;
图14是根据本申请另一实施例的一种应用于数据库中间件的数据库访问装置的示意图;
图15是根据本申请另一实施例的一种应用于数据库的数据库访问装置的示意图;
图16是根据本申请另一实施例的一种应用于数据库的数据库访问装置的示意图;
图17是用来实现本申请实施例的一种数据库访问方法的电子设备的框图。
具体实施方式
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
如图1所示,本实施方式提供了一种数据库访问方法,应用于数据库中间件,包括如下步骤:
S110:根据客户端发送的用户访问信息建立访问连接会话,用户访问信息包括用户标识信息;
S120:将用户标识信息发送至数据库,以根据用户标识信息匹配对应的账户信息;
S130:获取数据库中的账户信息,并将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。
一种示例中,如图2所示,在数据库访问的场景中:首先,客户端将用户访问信息发送至数据库中间件。用户访问信息包括用户标识信息和与用户标识信息对应的用户访问指令。用户标识信息包括用户名、IP(网际互连协议,Internet Protocol)地址和主机名(host)等。用户访问指令是客户端(例如,主机)的传输端口接收的指令。从不同的传输端口输入指令,可以生成不同的用户访问指令。不同的用户访问指令可以对应相同的用户标识信息。
数据库中间件接收用户访问信息后,根据用户访问信息建立访问连接会话。访问连接会话包括客户端与数据库中间件之间的连接,以及建立连接的上下文信息。一方面,在多个不同的用户访问指令对应相同的用户标识信息的情况下,根据不同的用户访问指令可以建立不同的访问连接会话。例如,A用户访问指令、B用户访问指令和C用户访问指令对应相同的用户标识信息,分别从A端口、B端口和C端口输入(输入时可以有时间先后顺序),数据库中间件可以根据用户标识信息和A用户访问指令建立A访问连接会话,根据用户标识信息和B用户访问指令建立B访问连接会话,根据用户标识信息和C用户访问指令建立C访问连接会话。另一方面,不同的用户标识信息,建立的访问连接对话也不同。例如,第一用户访问信息包括D用户标识信息和对应的D1用户访问指令(D2用户访问指令、D3用户访问指令等),根据第一用户访问信息建立第一访问连接会话。第二用户访问信息包括E用户标识信息和对应的E1用户访问指令(E2用户访问指令、E3用户访问指令等),根据第二用户访问信息建立第二访问连接会话。
数据库中间件将用户标识信息发送至数据库中,使得数据库根据用户标识信息匹配对应的账户信息。例如,A用户访问指令、B用户访问指令和C用户访问指令对应第一用户标识信息,D用户访问指令、E用户访问 指令对应第二用户标识信息,数据库利用第一用户标识信息匹配第一账户信息,利用第二用户标识信息匹配第二账户信息。如果数据库中间件仅仅将客户端连接到数据库中间件的账户信息发送给数据库,导致数据库无法从中识别出不同的用户访问信息(用户标识信息),导致用户访问数据库的权限超出原有的权限范围。在一种示例中,可以采用用户名、IP地址和主机名中的至少两种匹配账户信息。例如,可以采用IP地址和用户名的组合与账户信息进行匹配,或者采用IP地址和主机名的组合与账户信息进行匹配。能够有效避免用户访问数据库的权限可能超出原有的权限范围,导致权限过大的问题,提高了数据库访问的精确性和安全性。例如,用户标识信息包括用户名josn和IP地址172.18.64.%,如果IP地址被数据库中间件屏蔽,只能根据用户名josn匹配账户信息时,匹配的账户信息可能是josn@%或者josn@<数据库中间件ip>,导致匹配范围扩大,进而导致访问权限范围扩大。
数据库中间件从数据库中获取匹配得到的账户信息,并将其保存至访问连接会话中,使得访问连接会话中记录有用户访问数据库的全部信息,便于对访问连接会话进行管理。例如,A用户访问指令、B用户访问指令和C用户访问指令对应第一用户标识信息。根据第一用户标识信息和A用户访问指令建立第一访问连接会话,根据第一用户标识信息和B用户访问指令建立第二访问连接会话,根据第一用户标识信息和C用户访问指令建立第三访问连接会话。数据库利用第一用户标识信息匹配第一账户信息,并将第一账户信息记录在第一访问连接会话、第二访问连接会话和第三访问连接会话中。D用户访问指令对应第二用户标识信息,根据第二用户标识信息和D用户访问指令建立第四访问连接会话。数据库利用第二用户标识信息匹配第二账户信息,并将第二账户信息记录在第四访问连接会话中。因此,访问连接会话中包含了用户访问信息(用户标识信息和用户访问指令)、可以访问的账户信息等的对应关系,得到访问结果。最后,将访问结果发送至客户端,使得用户能够获取当前访问的数据库。
本实施方式中,由于数据库中间件将用户标识信息发送数据库中,使得数据库可以直接利用用户标识信息来匹配账户信息,能够有效避免用户 访问数据库的权限可能超出原有的权限范围,导致权限过大的问题,提高了数据库访问的精确性和安全性。
在一种实施方式中,如图3所示,还包括:
S141:将客户端发送的认证请求信息转发至数据库,认证请求信息与用户标识信息对应,以根据认证请求信息和账户信息进行访问认证,在访问认证通过的情况下,执行S130。
一种示例中,认证请求信息包括用户名密码。客户端可以同时发送用户标识信息和对应的认证请求信息至数据库中间件。数据库中间件可以同时将用户标识信息和认证请求信息发送至数据库。数据库根据用户标识信息匹配对应的账户信息之后,利用匹配算法对认证请求信息中的用户名密码和账户信息中的密码(或数据库端加密的密码)进行匹配,验证双方的密码是否一致。如果一致,则认证通过,执行步骤S130,即数据库中间件获取账户信息,将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。如果不一致,则认证不通过,执行步骤S142:在认证不通过的情况下,接收数据库发送的访问失败的信息,并将访问失败的信息转发至客户端。
另一种示例中,数据中间件获取客户端发送的认证请求信息之后,还可以在数据库中间件中完成认证。具体的,数据库中间件利用当前建立的访问连接会话查询用户标识信息相同的其他访问连接会话,获取查询到的访问连接会话对应的账户信息。然后,数据库中间件利用匹配算法对认证请求信息中的用户名密码和账户信息中的密码(或数据库端加密的密码)进行匹配,验证双方的密码是否一致。如果一致,则认证通过,执行步骤S130,如果不一致,则认证不通过,执行步骤S142。
本实施方式中,由于客户端发送的认证请求信息与用户标识信息对应,数据库或数据库中间件对认证请求信息(用户标识信息)和账户信息之间的对应关系进行验证。认证通过,则认为获取的账户信息准确,可以按照用户的真实意图访问数据库,进一步提高了数据库访问的精确性和安全性。
在一种实施方式中,多个不同种类的用户访问指令对应同一用户标识 信息,用户访问信息还包括用户访问指令。
一种示例中,多个不同种类的用户访问指令可以包括A用户访问指令、B用户访问指令和C用户访问指令,对应第一用户标识信息。多个不同种类的用户访问指令还可以包括C用户访问指令、D用户访问指令,对应第二用户标识信息。A用户访问指令、B用户访问指令和C用户访问指令可以按照时间的先后顺序,和第一用户标识信息共同发送至数据库中间件中。A用户访问指令、B用户访问指令和C用户访问指令对应的用户名、IP地址以及主机名都相同,由于从不同的端口输入用户访问指令,可以认为A用户访问指令、B用户访问指令和C用户访问指令分别对应A用户、B用户和C用户发送的用户访问指令,三者是不同的。
在一种实施方式中,如图4所示,还包括:
步骤S150:将账户信息记录至第一连接,访问连接会话包括第一连接,第一连接是根据用户访问指令建立的数据库中间件和客户端之间的连接。
一种示例中,数据库中间件可以将数据库发送的账户信息记录至访问连接会话中或者第一连接中。访问连接会话与第一连接相关联,第一连接是根据用户访问指令建立的通信链路,即数据库中间件和客户端之间的连接。例如,A用户访问指令、B用户访问指令和C用户访问指令对应第一用户标识信息。根据A用户访问指令建立A用户的第一连接,对应第一访问连接会话;根据B用户访问指令建立B用户的第一连接,对应第二访问连接会话;根据C用户访问指令建立C用户的第一连接,对应第三访问连接会话。由于数据库根据第一用户标识信息匹配得到第一账户信息,所以将第一账户信息记录在A用户的第一连接、B用户的第一连接和C用户的第一连接中。将账户信息记录在数据库中间件和客户端之间的连接中,便于同一用户下次访问数据库时,能够通过查询上一次(历史)的数据库中间件和客户端之间的连接来获取账户信息。例如,第一账户信息记录在A用户的第一连接中,当A用户下次访问时,查询A用户的第一连接,或者查询第一访问连接会话,得到账户信息。
本实施方式中,通过将账户信息记录在用户访问指令建立的数据库中间件和客户端之间的连接中,使得账户信息具有可追溯性,不仅提高了数据 库访问的准确性和安全性,还提高了数据库的访问效率。
在一种实施方式中,如图4所示,S130,包括:
S131:根据用户标识信息获取第二连接,第二连接是根据用户访问指令建立的数据库中间件和数据库之间的连接;
S132:在第二连接中记录有数据库发送的账户信息的情况下,获取账户信息;
S133:将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。
一种示例中,数据库中间件根据用户访问指令建立数据库中间件和数据库之间的连接,即第二连接,并对第二连接进行管理。然后,将用户标识信息发送至数据库,数据库根据用户标识信息匹配对应的账户信息。数据库中间件接收账户信息后,将账户信息记录在第二连接中,将第二连接放入连接池中,便于复用。下一次访问时,数据库中间件可以查询对应的第二连接。第二连接中如果记录有账户信息,则可以直接从第二连接中获取账户信息。例如,A用户访问指令、B用户访问指令和C用户访问指令对应第一用户标识信息。根据A用户访问指令建立A用户的第二连接,根据B用户访问指令建立B用户的第二连接,根据C用户访问指令建立C用户的第二连接。根据第一用户标识信息匹配第一账户信息后,将第一账户信息记录在A用户的第二连接、B用户的第二连接和C用户的第二连接中。一方面,A用户在下一次访问的时候,可以直接根据第一用户标识信息获取A用户的第二连接。在A用户的第二连接中查找是否记录有账户信息,如果有,则直接获取账户信息。如果没有,根据第一用户标识信息查找B用户的第二连接或者C用户的第二连接。从B用户的第二连接或者C用户的第二连接中查找是否记录有账户信息,如果有,则直接获取账户信息。原因是A用户的第二连接、B用户的第二连接和C用户的第二连接,记录的账户信息相同。
本实施方式中,通过将账户信息记录在用户访问指令建立的数据库中间件和数据库之间的连接中,使得账户信息具有可追溯性,不仅提高了数据库访问的准确性和安全性,还提高了数据库的访问效率。
在一种实施方式中,如图5所示,还包括:
S160:在连接池中,根据账户信息查询到第二连接的情况下,将访问数据通过查询到的第二连接发送至数据库中。
一种示例中,数据库中间件将账户信息记录在第二连接后,并将第二连接放在连接池中。由于在用户首次访问数据库的时候,在访问连接会话中记录有账户信息,在后续访问数据库的时候,通过访问连接会话中记录的账户信息,在连接池中查询第二连接,查询的第二连接中的账户信息与访问连接会话中的账户信息相同。通过账户信息查询第二连接,能快速找到能将访问数据发送到数据库的通信链路。例如,A用户在第一次访问的时候,在第一访问连接会话中记录有第一账户信息,在A用户的第二连接中也记录有第一账户信息,存放于连接池中。当A用户第二次访问的时候,在第一访问连接会话中获取第一账户信息,数据库中间件在连接池中查询到记录有第一账户信息的A用户的第二连接,作为访问数据由数据库中间件发送到数据库的通信链路。
本实施方式中,通过保存有多个第二连接的连接池的复用,不仅有效避免了访问数据库时,用户的访问权限过大的问题,而且提高了数据库访问的准确性和安全性,提高了数据库的访问效率。
在一种实施方式中,如图5所示,还包括:
S170:在连接池中,根据账户信息并未查询到第二连接的情况下,将用户访问信息发送至数据库,以根据用户访问信息建立数据库中间件和数据库之间的连接。
一种示例中,如果在连接池中,并未查询到第二连接的情况下,将用户访问信息或者用户访问信息和认证请求信息,发送至数据库中。数据库根据用户访问信息中的用户访问指令建立数据库中间件和数据库之间的连接,即第二连接。根据用户访问信息中的用户标识信息匹配对应的账户信息,并将账户信息记录在第二连接中。在下一次访问数据库的时候,在连接池中,通过账户信息查询第二连接,能快速找到能将访问数据由数据库中间件发送到数据库的通信链路。
在一种实施方式中,如图6所示,还包括:
S180:识别客户端发送的账户管理语句的类型,得到识别结果;
S190:将识别结果发送至数据库端,数据库端包括主数据库和多个分数据库,以使主数据库根据识别结果执行账户管理语句,并将执行结果同步至分数据库中。
一种示例中,客户端发送账户管理语句至数据库中间件之后,数据库中间件识别账户管理语句的类型,得到识别结果,并将识别结果发送至数据库。在数据库中,可以根据需求适应性的选择一个数据库作为主数据库,主数据库将执行结果同步给其他分数据库即可。
由于主数据库和分数据库可以使用相同的账户管理语句,能够简化管理流程,降低管理成本。同时,由于数据库端需要匹配的大量账户信息,由数据库端执行账户管理语句,使得访问权限控制依然由数据库端集中管理,不需要在数据库中间件上额外设计一套访问权限控制系统,降低了开发成本,也避免了重新开发一套访问控制体系带来的安全管理风险。
如图7所示,本实施方式提供了一种数据库访问方法的具体实施例,实现了用户安全访问分布式数据库。
协调器(Coordinator)作为数据库中间件。客户端将用户访问信息和认证请求信息发送至协调器,与协调器建立连接和认证。用户访问信息包括:用户名(john)、原始用户名地址(IP:172.18.1.2)和/或主机信息(例如,主机名host)。认证请求信息包括:用户的认证报文和加密后的密码(enc(password))。协调器将用户访问信息和认证请求信息发送给关系型数据库管理系统(MySQL)。MySQL使用原始IP和/或主机信息进行账户匹配,得到对应的账户信息(john@172.18.%.%)。然后,根据认证请求信息进行认证,若认证成功,则协调器向MySQL获取账户信息(john@172.18.%.%),并保存在访问连接会话中。协调器从连接池获取数据库中间件和分布式数据库之间的连接时,仅查找账户信息相同的连接。如果没有可用空闲连接,则与分布式数据库中的数据节点建立连接,并将账户信息保存在新建立的连接中,以便于连接池管理。
在分布式数据库中,可以使用一个简单的策略实现对MySQL账户管理语句的支持。如图8所示,当协调器收到账户管理语句后,会将该语句在元 数据主节点执行,得到账户管理信息。若执行成功,则将账户管理信息同步到各数据节点,各数据节点和元数据主节点的账户管理信息会保持同步。
如图9所示,本实施方式提供一种数据库访问方法,应用于数据库中,包括:
S210:根据数据库中间件发送的用户标识信息匹配对应的账户信息;
S220:在匹配成功的情况下,将账户信息发送至数据库中间件,以保存至访问连接会话中,访问连接会话是根据用户访问信息建立的,用户访问信息包括用户标识信息。
在一种实施方式中,如图10所示,还包括:
S230:在匹配成功的情况下,根据数据库中间件发送的认证请求信息,以及用户标识信息进行访问认证;
S240:在访问认证成功的情况下,执行将账户信息发送至数据库中间件的步骤。
在一种实施方式中,如图10所示,还包括:
S250:在匹配不成功和/或访问认证不成功的情况下,生成访问请求失败的信息,将访问请求失败的信息发送至数据库中间件,以使数据库中间件将访问请求失败的信息发送至客户端。
一种示例中,数据库根据数据库中间件发送的用户标识信息匹配对应的账户信息,在匹配成功的情况下,将账户信息发送至数据库中间件,然后,根据数据库中间件发送的认证请求信息,以及用户标识信息进行访问认证。在访问认证成功的情况下,执行步骤S220。在匹配不成功和/或访问认证不成功的情况下,执行步骤S250。
如图11所示,本实施方式提供了一种数据库访问装置,应用于数据库中间件,包括:
访问连接会话建立模块110,用于根据客户端发送的用户访问信息建立访问连接会话,用户访问信息包括用户标识信息;
用户标识信息发送模块120,用于将用户标识信息发送至数据库,以根据用户标识信息匹配对应的账户信息;
账户信息获取模块130,用于获取数据库中的账户信息;
第一账户信息记录模块140,用于将账户信息记录至访问连接会话中,生成访问结果,将访问结果发送至客户端。
在一种实施方式中,如图12所示,还包括:
认证信息发送模块150,用于将客户端发送的认证请求信息转发至数据库,认证请求信息与用户标识信息对应,以根据认证请求信息和账户信息进行访问认证,在访问认证通过的情况下,指示账户信息获取模块130执行获取数据库中的账户信息的步骤。
在一种实施方式中,多个不同种类的用户访问指令对应同一用户标识信息,用户访问信息还包括用户访问指令。
在一种实施方式中,如图12所示,还包括:
第二账户信息记录模块160,用于将账户信息记录至第一连接,访问连接会话包括第一连接,第一连接是根据用户访问指令建立的数据库中间件和客户端之间的连接。
在一种实施方式中,如图12所示,账户信息获取模块130包括:
第二连接获取子模块131,用于根据用户标识信息获取第二连接,第二连接是根据用户访问指令建立的数据库中间件和数据库之间的连接;
账户信息查询子模块132,用于在第二连接中记录有数据库发送的账户信息的情况下,获取账户信息。
在一种实施方式中,如图13所示,还包括:
访问数据发送模块170,用于在连接池中,根据账户信息查询到第二连接的情况下,将访问数据通过查询到的第二连接发送至数据库中。
在一种实施方式中,如图13所示,还包括:
用户访问信息发送模块180,用于在连接池中,根据账户信息并未查询到第二连接的情况下,将用户访问信息发送至数据库,以根据用户访问信息建立数据库中间件和数据库之间的连接。
在一种实施方式中,如图14所示,还包括:
账户管理语句识别模块191,用于识别客户端发送的账户管理语句的 类型,得到识别结果;
识别结果发送模块192,用于将识别结果发送至数据库端,数据库端包括主数据库和多个分数据库,以使主数据库根据识别结果执行账户管理语句,并将执行结果同步至分数据库中。
如图15所示,本实施方式提供了一种数据库访问装置,包括:
账户信息匹配模块210,用于根据数据库中间件发送的用户标识信息匹配对应的账户信息;
账户信息发送模块220,用于在匹配成功的情况下,将账户信息发送至数据库中间件,以保存至访问连接会话中,访问连接会话是根据用户访问信息建立的,用户访问信息包括用户标识信息。
在一种实施方式中,如图16所示,还包括:
访问认证模块230,用于在匹配成功的情况下,根据数据库中间件发送的认证请求信息,以及用户标识信息进行访问认证,在访问认证成功的情况下,指示账户信息发送模块220执行将账户信息发送至数据库中间件的步骤。
在一种实施方式中,如图16所示,还包括:
访问请求失败的信息生成模块240,用于在匹配不成功和/或访问认证不成功的情况下,生成访问请求失败的信息,将访问请求失败的信息发送至数据库中间件,以使数据库中间件将访问请求失败的信息发送至客户端。
请实施例各装置中的各模块的功能可以参见上述方法中的对应描述,在此不再赘述。
根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。
如图17所示,是根据本申请实施例的一种数据库访问方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计 算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。
如图17所示,该电子设备包括:一个或多个处理器1701、存储器1702,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图17中以一个处理器1701为例。
存储器1702即为本申请所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请所提供的一种数据库访问方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的一种数据库访问方法。
存储器1702作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的一种数据库访问方法对应的程序指令/模块(例如,附图11所示的访问连接会话建立模块110、用户标识信息发送模块120、账户信息获取模块130和第一账户信息记录模块140)。处理器1701通过运行存储在存储器1702中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的一种数据库访问方法。
存储器1702可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据一种数据库访问方法的电子设备的使用所创建的数据等。此外,存储器1702可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施 例中,存储器1702可选包括相对于处理器1701远程设置的存储器,这些远程存储器可以通过网络连接至一种数据库访问方法的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
一种数据库访问方法的电子设备还可以包括:输入装置1703和输出装置1704。处理器1701、存储器1702、输入装置1703和输出装置1704可以通过总线或者其他方式连接,图17中以通过总线连接为例。
输入装置1703可接收输入的数字或字符信息,以及产生与一种数据库访问方法的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置1704可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和 /或数据提供给可编程处理器的任何信号。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。

Claims (24)

  1. 一种数据库访问方法,其特征在于,包括:
    根据客户端发送的用户访问信息建立访问连接会话,所述用户访问信息包括用户标识信息;
    将所述用户标识信息发送至数据库,以根据所述用户标识信息匹配对应的账户信息;
    获取所述数据库中的所述账户信息,并将所述账户信息记录至所述访问连接会话中,生成访问结果,将所述访问结果发送至所述客户端。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    将所述客户端发送的认证请求信息转发至所述数据库,所述认证请求信息与所述用户标识信息对应,以根据所述认证请求信息和所述账户信息进行访问认证,在所述访问认证通过的情况下,执行获取所述数据库中的所述账户信息的步骤。
  3. 根据权利要求1所述的方法,其特征在于,多个不同种类的用户访问指令对应同一用户标识信息,所述用户访问信息还包括所述用户访问指令。
  4. 根据权利要求3所述的方法,其特征在于,还包括:
    将所述账户信息记录至第一连接,所述访问连接会话包括所述第一连接,所述第一连接是根据所述用户访问指令建立的数据库中间件和所述客户端之间的连接。
  5. 根据权利要求3所述的方法,其特征在于,获取所述数据库中的所述账户信息,包括:
    根据所述用户标识信息获取第二连接,所述第二连接是根据所述用户访问指令建立的所述数据库中间件和所述数据库之间的连接;
    在所述第二连接中记录有所述数据库发送的所述账户信息的情况下,获取所述账户信息。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    在连接池中,根据所述账户信息查询到所述第二连接的情况下,将访问数据通过查询到的所述第二连接发送至所述数据库中。
  7. 根据权利要求6所述的方法,其特征在于,还包括:
    在所述连接池中,根据所述账户信息并未查询到所述第二连接的情况下,将所述用户访问信息发送至所述数据库,以根据所述用户访问信息建立所述数据库中间件和所述数据库之间的连接。
  8. 根据权利要求1所述的方法,其特征在于,还包括:
    识别所述客户端发送的账户管理语句的类型,得到识别结果;
    将所述识别结果发送至数据库端,所述数据库端包括主数据库和多个分数据库,以使所述主数据库根据所述识别结果执行所述账户管理语句,并将执行结果同步至所述分数据库中。
  9. 一种数据库访问方法,其特征在于,包括:
    根据数据库中间件发送的用户标识信息匹配对应的账户信息;
    在匹配成功的情况下,将所述账户信息发送至所述数据库中间件,以保存至访问连接会话中,所述访问连接会话是根据用户访问信息建立的,所述用户访问信息包括所述用户标识信息。
  10. 根据权利要求9所述的方法,其特征在于,还包括:
    在匹配成功的情况下,根据所述数据库中间件发送的认证请求信息,以及所述用户标识信息进行访问认证;
    在访问认证成功的情况下,执行将所述账户信息发送至所述数据库中间件的步骤。
  11. 根据权利要求10所述的方法,其特征在于,还包括:
    在匹配不成功和/或访问认证不成功的情况下,生成访问请求失败的信息,将所述访问请求失败的信息发送至所述数据库中间件,以使所述数据库中间件将所述访问请求失败的信息发送至所述客户端。
  12. 一种数据库访问装置,其特征在于,包括:
    访问连接会话建立模块,用于根据客户端发送的用户访问信息建立访问连接会话,所述用户访问信息包括用户标识信息;
    用户标识信息发送模块,用于将所述用户标识信息发送至数据库,以根据所述用户标识信息匹配对应的账户信息;
    账户信息获取模块,用于获取所述数据库中的所述账户信息;
    第一账户信息记录模块,用于将所述账户信息记录至所述访问连接会话中,生成访问结果,将所述访问结果发送至所述客户端。
  13. 根据权利要求12所述的装置,其特征在于,还包括:
    认证信息发送模块,用于将所述客户端发送的认证请求信息转发至所述数据库,所述认证请求信息与所述用户标识信息对应,以根据所述认证请求信息和所述账户信息进行访问认证,在所述访问认证通过的情况下,指示所述账户信息获取模块执行获取所述数据库中的所述账户信息的步骤。
  14. 根据权利要求12所述的装置,其特征在于,多个不同种类的用户访问指令对应同一用户标识信息,所述用户访问信息还包括所述用户访问指令。
  15. 根据权利要求14所述的装置,其特征在于,还包括:
    第二账户信息记录模块,用于将所述账户信息记录至第一连接,所述访问连接会话包括所述第一连接,所述第一连接是根据所述用户访问指令建立的数据库中间件和所述客户端之间的连接。
  16. 根据权利要求14所述的装置,其特征在于,所述账户信息获取模块包括:
    第二连接获取子模块,用于根据所述用户标识信息获取第二连接,所述第二连接是根据所述用户访问指令建立的所述数据库中间件和所述数据库之间的连接;
    账户信息查询子模块,用于在所述第二连接中记录有所述数据库发送的所述账户信息的情况下,获取所述账户信息。
  17. 根据权利要求16所述的装置,其特征在于,还包括:
    访问数据发送模块,用于在连接池中,根据所述账户信息查询到所述第二连接的情况下,将访问数据通过查询到的所述第二连接发送至所述数据库中。
  18. 根据权利要求17所述的装置,其特征在于,还包括:
    用户访问信息发送模块,用于在所述连接池中,根据所述账户信息并未查询到所述第二连接的情况下,将所述用户访问信息发送至所述数据库,以根据所述用户访问信息建立所述数据库中间件和所述数据库之间的连接。
  19. 根据权利要求12所述的装置,其特征在于,还包括:
    账户管理语句识别模块,用于识别所述客户端发送的账户管理语句的类型,得到识别结果;
    识别结果发送模块,用于将所述识别结果发送至数据库端,所述数据库端包括主数据库和多个分数据库,以使所述主数据库根据所述识别结果执行所述账户管理语句,并将执行结果同步至所述分数据库中。
  20. 一种数据库访问装置,其特征在于,包括:
    账户信息匹配模块,用于根据数据库中间件发送的用户标识信息匹配对应的账户信息;
    账户信息发送模块,用于在匹配成功的情况下,将所述账户信息发送至所述数据库中间件,以保存至访问连接会话中,所述访问连接会话是根据用户访问信息建立的,所述用户访问信息包括所述用户标识信息。
  21. 根据权利要求20所述的装置,其特征在于,还包括:
    访问认证模块,用于在匹配成功的情况下,根据所述数据库中间件发送的认证请求信息,以及所述用户标识信息进行访问认证,在访问认证成功的情况下,指示所述账户信息发送模块执行将所述账户信息发送至所述数据库中间件的步骤。
  22. 根据权利要求21所述的装置,其特征在于,还包括:
    访问请求失败的信息生成模块,用于在匹配不成功和/或访问认证不成功的情况下,生成访问请求失败的信息,将所述访问请求失败的信息发送至所述数据库中间件,以使所述数据库中间件将所述访问请求失败的信息发送至所述客户端。
  23. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-11中任一项所述的方法。
  24. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行权利要求1-11中任一项所述的方法。
PCT/CN2021/078985 2020-04-13 2021-03-04 数据库访问方法以及装置 WO2021208625A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010284096.4 2020-04-13
CN202010284096.4A CN111552934A (zh) 2020-04-13 2020-04-13 数据库访问方法以及装置

Publications (1)

Publication Number Publication Date
WO2021208625A1 true WO2021208625A1 (zh) 2021-10-21

Family

ID=72007466

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078985 WO2021208625A1 (zh) 2020-04-13 2021-03-04 数据库访问方法以及装置

Country Status (2)

Country Link
CN (1) CN111552934A (zh)
WO (1) WO2021208625A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552934A (zh) * 2020-04-13 2020-08-18 中国银联股份有限公司 数据库访问方法以及装置
CN112800463B (zh) * 2021-02-02 2022-06-24 天津五八到家货运服务有限公司 信息处理方法、装置及系统
CN113660292B (zh) * 2021-10-19 2022-01-11 北京安华金和科技有限公司 一种获取调用客户端的主体的信息方法和装置
CN114254032B (zh) * 2022-02-25 2022-05-06 成都思维世纪科技有限责任公司 分布式共享连接的资产静态数据采集方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106685998A (zh) * 2017-02-24 2017-05-17 浙江仟和网络科技有限公司 一种基于cas统一认证服务中间件的sso认证方法
CN108228597A (zh) * 2016-12-14 2018-06-29 深圳市优朋普乐传媒发展有限公司 数据库访问方法和装置
CN109327535A (zh) * 2018-11-09 2019-02-12 郑州云海信息技术有限公司 一种数据库访问方法、系统、中间件设备及介质
CN111552934A (zh) * 2020-04-13 2020-08-18 中国银联股份有限公司 数据库访问方法以及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100542383B1 (ko) * 2004-01-09 2006-01-12 주식회사 바넷정보기술 3-Tier 구조 기반의 데이터베이스 접근 통제 시스템및 방법
CN110311899A (zh) * 2019-06-17 2019-10-08 平安医疗健康管理股份有限公司 多业务系统访问方法、装置及服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228597A (zh) * 2016-12-14 2018-06-29 深圳市优朋普乐传媒发展有限公司 数据库访问方法和装置
CN106685998A (zh) * 2017-02-24 2017-05-17 浙江仟和网络科技有限公司 一种基于cas统一认证服务中间件的sso认证方法
CN109327535A (zh) * 2018-11-09 2019-02-12 郑州云海信息技术有限公司 一种数据库访问方法、系统、中间件设备及介质
CN111552934A (zh) * 2020-04-13 2020-08-18 中国银联股份有限公司 数据库访问方法以及装置

Also Published As

Publication number Publication date
CN111552934A (zh) 2020-08-18

Similar Documents

Publication Publication Date Title
WO2021208625A1 (zh) 数据库访问方法以及装置
US11665000B2 (en) Method and apparatus for processing privacy data of block chain, device, and storage medium
US11909886B2 (en) Method, apparatus for blockchain-based multi-party computation, device and medium
US7970943B2 (en) Providing interoperability in software identifier standards
US20130132372A1 (en) Systems and methods for dynamic service integration
US11750396B2 (en) Private data processing method, device and medium
WO2021197432A1 (zh) 一种数据库集群的路由方法和装置
US20210209595A1 (en) Blockchain transfer processing method and apparatus, device, and medium
KR20210108905A (ko) 블록체인 네트워크에 기반하는 데이터 공유 방법, 장치, 전자 장치 및 저장 매체
KR20220044603A (ko) 블록체인 데이터베이스 관리 시스템
US8611542B1 (en) Peer to peer key synchronization
US20230014427A1 (en) Global secondary index method for distributed database, electronic device and storage medium
JP2021117972A (ja) デバイス対話方法、権限管理方法、対話型デバイスおよびクライアント
US20220300503A1 (en) Querying distributed databases
US11410173B1 (en) Tokenization web services
US11784810B2 (en) Performing key server redundancy verification to verify a key is obtained from redundant key servers
WO2022161124A1 (zh) 数据共享方法和装置
WO2021227609A1 (zh) 数据访问连接会话保护方法以及装置
JP2022141962A (ja) データの照会と書き込み方法、装置、電子機器、読み取り可能な記憶媒体およびコンピュータプログラム
WO2021174791A1 (zh) 任务迁移方法、装置、电子设备及存储介质
US10554789B2 (en) Key based authorization for programmatic clients
US11403219B2 (en) Method and system for targeted pre-caching of data
US11650921B2 (en) Method and system for establishing a distributed network without a centralized directory
US20230376628A1 (en) Privacy Manager for Connected TV and Over-the-Top Applications
US20230283465A1 (en) Keystore service for encryption in a secure service enclave

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21787996

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21787996

Country of ref document: EP

Kind code of ref document: A1