CN110674110B - Bank distributed database construction method and device - Google Patents

Bank distributed database construction method and device Download PDF

Info

Publication number
CN110674110B
CN110674110B CN201910846524.5A CN201910846524A CN110674110B CN 110674110 B CN110674110 B CN 110674110B CN 201910846524 A CN201910846524 A CN 201910846524A CN 110674110 B CN110674110 B CN 110674110B
Authority
CN
China
Prior art keywords
key value
bank
public key
private key
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910846524.5A
Other languages
Chinese (zh)
Other versions
CN110674110A (en
Inventor
周思来
张建亮
邹昌宏
刘文光
万良
王娟
夏建星
韦伟
孙传兴
陈南鹏
袁平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN201910846524.5A priority Critical patent/CN110674110B/en
Publication of CN110674110A publication Critical patent/CN110674110A/en
Application granted granted Critical
Publication of CN110674110B publication Critical patent/CN110674110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Abstract

The invention provides a method and a device for constructing a bank distributed database, wherein the method for constructing the bank distributed database comprises the following steps: generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; assigning the data of the target search parameter to a corresponding public key value or private key value; and constructing the bank distributed database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value. The invention can establish a flexible and changeable parameter mechanism with high compatibility, and can quickly respond to the requirement of business requirement by parameter configuration under the condition of changing codes as little as possible or even not changing the codes.

Description

Bank distributed database construction method and device
Technical Field
The invention relates to the technical field of computers, in particular to a database technology, and specifically relates to a method and a device for constructing a bank distributed database.
Background
With the development of bank information construction, banking businesses are not changed in one year, but are diversified more and more, and the updating iteration speed is faster and faster. The traditional bank system cannot keep pace with the era in the form that the fixed code supports fixed business, and the business complexity and the high requirements on reliability, safety and availability of the bank system do not allow the bank to update and iterate the system too frequently like the internet company. In the prior art, the type and structure are relatively fixed when parameters are configured in a bank system, and codes are also required to be applied to positioning and acquiring rules of the parameters.
For example, when a certain bank sets a certain parameter, it is considered that there may be regional differences in branch businesses of various regions, so that the parameter is set specifically for some regions, and the branches of other regions are not set. And as will be noted in the code, the parameter is retrieved in the unit of a branch, and if the branch is not configured with the parameter, the corresponding business rule is not followed. In addition, for a highly scalable banking system, the number of parameter accesses in a transaction may be a significant proportion of the data accesses. It is clearly not sensible to repeatedly read data through the database, especially for parameters where the positioning logic is complex, to check the database multiple times for the presence of parameters is more tolerable.
Disclosure of Invention
Aiming at the problems in the prior art, the invention can establish a set of parameter mechanism with high compatibility and flexibility, and can meet the requirement of quickly responding to business requirements through parameter configuration under the condition of changing codes as little as possible or even not changing the codes.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides a method for constructing a bank distributed database, including:
generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; and
generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; the number of the public key values and the number of the private key values are 1 or more;
assigning the data of the target search parameter to a corresponding public key value or private key value;
and constructing the bank distributed database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
In an embodiment, the constructing the bank distributed database according to the public key value, the private key value, and the preset public key value and private key value includes:
constructing the bank sub-database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value;
and constructing the bank distributed database according to the plurality of bank sub-databases.
In one embodiment, the method for constructing the bank distributed database further includes: storing the common key value in a thread level cache.
In one embodiment, the method for constructing the bank distributed database further includes: and when the public key value and the private key value are changed, updating the parameter data corresponding to the public key value and the private key value in the bank sub-database, and updating the public key value in the thread level cache.
In one embodiment, the public key value and the private parameter respectively correspond to the corresponding target search parameters one to one.
In a second aspect, the present invention provides an apparatus for constructing a bank distributed database, including:
the public key value generating unit is used for generating a public key value of the bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; and;
the private key value generating unit is used for searching and generating a private key value of each bank sub-database according to a specific target of each bank sub-database to be constructed; the number of the public key values and the number of the private key values are 1 or more;
the data assignment unit is used for assigning the data of the target search parameter to a corresponding public key value or private key value;
and the database construction unit is used for constructing the bank distributed database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
In one embodiment, the database construction unit includes:
the sub-data building module is used for building the bank sub-database according to the public key values, the private key values, the preset public key values and the preset search paths of the private key values;
and the database construction module is used for constructing the bank distributed database according to the plurality of bank sub-databases.
In an embodiment, the apparatus for constructing a bank distributed database further includes a cache unit, configured to store the common key value in a thread-level cache.
In an embodiment, the apparatus for constructing a bank distributed database further includes a key value updating unit, configured to update parameter data corresponding to the public key value and the private key value in the bank sub-database, and update the public key value in the thread-level cache.
In a third aspect, the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for constructing the bank distributed database when executing the program.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of a method of building a bank distributed database.
As can be seen from the above description, the present invention provides a method and an apparatus for constructing a bank distributed database, where private key values are set based on regional differences of branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct the bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter to a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a method for constructing a bank distributed database according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating steps 400 of a method for constructing a bank distributed database according to an embodiment of the present invention;
fig. 3 is a second flowchart illustrating a method for constructing a bank distributed database according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for constructing a bank distributed database in an embodiment of the present invention;
FIG. 5 is a flow chart of a method for constructing a bank distributed database in an embodiment of the present invention;
FIG. 6 is a diagram illustrating a hierarchical cache of a distributed database in an exemplary embodiment of the present invention;
fig. 7 is a first schematic structural diagram of a device for constructing a bank distributed database in an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a database building unit in a device for building a bank distributed database according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a device for constructing a bank distributed database according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram three of a device for constructing a bank distributed database in an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the development of bank information construction, banking businesses are not changed in one year, but are diversified more and more, and the updating iteration speed is faster and faster. The traditional bank system cannot keep pace with the era in the form that the fixed code supports fixed business, and the business complexity and the high requirements on reliability, safety and availability of the bank system do not allow the bank to update and iterate the system too frequently like the internet company. The form of the parameter configuration service exists in all banking systems, but the type and the structure are relatively fixed when the parameters are configured, and the positioning and the obtaining rules of the parameters also need to be realized by applying codes. For example, when a certain bank sets a certain parameter, it is considered that there may be regional differences in branch businesses of various regions, so that the parameter is set specifically for some regions, and the branch in other regions is not set. And as will also be noted in the code, the parameter is retrieved in the unit of a branch, and if the branch is not configured with the parameter, the corresponding business rule is not followed. When the rules for a parameter change, a large amount of application code may need to be modified to accommodate the characteristics of the new parameter. When the parameter structure is changed, the table structure must be frequently changed. Such as the example above, as verification develops, some of the features of this business apply to the entire bank development, and so it is desirable to extract some common parameters to the full bank level. This results in a parameter retrieval that is two-level: the local specific parameters are checked first and then the full row parameters are checked, at which time only the service code can be modified. When the parameter requires the addition of some attributes, the table structure must also be modified.
On the other hand, for a highly scalable banking system, the number of parameter accesses in a transaction may be a large proportion of the data accesses. If it is clearly not sensible to repeatedly read data through the DB, it is more intolerable to check the presence of parameters in the DB multiple times, especially for parameters for which the positioning logic is complex. In the aspect of caching, because the structures and the positioning modes of all parameters are not uniform, and a uniform caching mechanism is not used, each parameter always independently manages the own cache. Of course, it is also possible to establish a uniform cache pool, but the application needs to implement the interfacing function with the cache pool.
Based on the above (disadvantages of the prior art), an embodiment of the present invention provides a specific implementation of a method for building a bank distributed database, and referring to fig. 1, the method specifically includes the following steps:
step 100: and generating a public key value of the bank sub-database according to a target search parameter shared by the bank sub-database to be constructed.
It is understood that the common key in step 100 is a kind of parameter key, which indicates the possible key for all parameters, such as the division number, the currency, etc.
Step 200: and generating private key values of the bank sub-databases according to the specific target search parameters of each bank sub-database to be constructed.
It is understood that the private key in step 200 is also a kind of parameter key, and represents a specific key of a specific type of parameter, such as the month of the year of the calendar parameter, the cost type of the cost parameter, and so on.
After the method according to step 100 and step 200 is implemented, a large number of parameters are extracted as public key values which may be used, and for these key values, the application does not need to display to extract and assign values, and the parameter interface can automatically obtain from the transaction input or the corresponding data table. Such as the parameter positioning key value in the above example: the branch + currency + institution + product code, the branch number and institution number can be obtained from the input message, and the currency and product code can be obtained from the account number (different systems may have different conditions, but a common key value can be extracted). Under normal conditions, the key values only need to be extracted once (certain conditions may change), the key values are placed in a transaction thread after extraction, and any parameter is read again in the current transaction without re-extraction.
Step 300: and assigning the data of the target search parameter to a corresponding public key value or private key value.
It is understood that the number of the public key values and the private key values is 1 or more.
Step 400: and constructing the bank distributed database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
For most parameters, it is necessary to specify the institution, currency, etc. at the time of location. Some parameters may need to specify special attributes, such as a parameter that wants to obtain a certain type of fee, and a type of fee. Of course, different parameters need different key values, even some parameters may only need one parameter in the whole row, and the parameters can be obtained only by specifying the type of the parameters.
As can be seen from the above description, the present invention provides a method for constructing a bank distributed database, in which private key values are set based on possible regional differences of branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct the bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter to a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
In one embodiment, referring to fig. 2, step 400 specifically includes:
step 401: and constructing the bank sub-database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
Step 402: and constructing the bank distributed database according to the plurality of bank sub-databases.
In steps 401 to 402, each parameter may be located in a plurality of ways, for example, if a suitable loan product is desired, the division + currency + institution + product code may be entered for location. However, it may be desirable that the designated product code does not exist, in which case an attempt may also be made to match the branch + currency + institution, and even further match the branch + currency if a failure occurs. The matching rule needs to be implemented by application codes in the past. In the method, a search path of each parameter is defined in advance, each matching rule is a node on the path, and the priority of matching is defined among the nodes. When a certain parameter needs to be acquired, the application does not need to try to acquire repeatedly, the parameter interfaces can finish matching check in a unified mode, and coupling between application codes and parameter search rules is reduced. The search path can be stored in a configuration file or a data table, and even if the search path changes, the application code does not need to be changed.
In an embodiment, referring to fig. 3, the method for building the bank distributed database further includes:
step 500: storing the common key value in a thread level cache.
It can be understood that the parameter with higher frequency of use is set as the common key value, and the corresponding cache is designed for reading. Due to the relation of the search path, when the parameters are actually used, there is often more than one search node. The data size of the parameters determines that the system cannot load all the parameters into the cache at one time, but needs to make sure whether the parameters exist in the cache or not. Thus, the acquisition of the parameters is actually divided into two steps: firstly, determining the existence parameter of a certain searching node, and then reading the parameter data by the node. The data in the cache is effectively divided into two categories: key value set of parameters, data of parameters. The key value set of the parameter can be preloaded when the system is started (or loaded according to types when in use), while the parameter data only loads a certain record to the cache when in use, and then if the parameter record is reused, the parameter record only needs to be read through the cache.
In an embodiment, referring to fig. 4, the method for constructing a bank distributed database further includes:
step 600: and when the public key value and the private key value are changed, updating the parameter data corresponding to the public key value and the private key value in the bank sub-database, and updating the public key value in the thread level cache.
In the case of a distributed database, management and maintenance of parameters cannot be dispersed to each cluster, and only a certain cluster (hereinafter referred to as a parameter cluster) is subjected to unified management. For example: and acquiring parameters by adopting a mode of local cache, central cache and remote service. When a certain parameter needs to be acquired, the local cache is read first, and if the local cache does not exist and then the central cache is read, the central cache does not exist and then the parameter cluster is read. When the parameter of the parameter cluster changes, the change is synchronized to the central cache and the local caches of all the clusters. The cache is actually slave class data: parameter key value set and parameter data. Therefore, when the key value sets of the parameters are changed (such as parameter addition and parameter deletion), the cache of the parameter key value sets needs to be updated in addition to the cache of the parameter data, so that the complete and accurate parameter key value sets of all the clusters are ensured.
In one embodiment, the public key value and the private parameter respectively correspond to the corresponding target search parameters one to one.
As can be seen from the above description, the present invention provides a method for constructing a bank distributed database, in which private key values are set based on possible regional differences of branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct the bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter to a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
To further explain the present solution, the present invention provides a specific application example of the construction method of the bank distributed database by taking a local cache, a central cache, and a remote service cache as examples, and the specific application example specifically includes the following contents, see fig. 5 and fig. 6.
In the specific application example, the parameter positioning function is packaged and a uniform interface is provided, only the parameter type and the corresponding private key value are input, the most matched public key value can be automatically checked in the interface, and the parameter result is output.
S0: and generating a public key value of the bank sub-database according to a target search parameter shared by the bank sub-database to be constructed.
It should be noted that, for a key with specificity, such as a fee type, an explicit assignment is still required (obviously, such a key is also necessary for some parameters, and multiple fee types may need to be acquired in the same transaction, and therefore, it is not suitable as a public key).
S1: and generating private key values of the bank sub-databases according to the specific target search parameters of each bank sub-database to be constructed.
The number of the public key values and the private key values in steps S0 and S1 is 1 or more. Storing data as a set of key values (a set of key value pairs), where the key serves as a unique identifier, and the key and value can be anything from a simple object to a complex object, it will be appreciated that this results in a database that is highly separable and allows for horizontal expansion on a scale that cannot be achieved with other types of databases.
S2: and assigning the data of the target search parameter to a corresponding public key value or private key value.
When the key value sets of the parameters are changed (such as parameter addition and parameter deletion), the cache of the parameter key value sets needs to be updated besides the cache of the parameter data, so that the complete and accurate parameter key value sets of all the clusters are ensured.
S3: and constructing the bank sub-database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
It can be known from steps S1 and S2 that the parameter keys are classified into two categories: public key values and private key values. For most parameters, it is necessary to specify the institution, currency, etc. at the time of location. Some parameters may need to specify special attributes, such as a parameter that wants to obtain a certain type of fee, and a type of fee. Of course, different parameters need different key values, even some parameters may only need one parameter in the whole row, and the parameters can be obtained only by specifying the type of the parameters. Therefore, it is necessary to know what key value each parameter depends on, and this dependency is called a parameter search path.
It will be appreciated that each matching rule is a node on the path, and the priority of the matching is defined between the nodes. When a certain parameter needs to be acquired, repeated attempts for acquisition are not needed, the parameter interfaces can finish matching check in a unified way, and coupling between the application code and the parameter search rule is reduced. The search path can be stored in a configuration file or a data table, and even if the search path changes, the application code does not need to be changed.
S4: storing the common key value in a thread-level cache.
It can be understood that, in the distributed mode, management and maintenance of the parameters cannot be distributed to each cluster, and only unified management is performed in a certain cluster (hereinafter referred to as a parameter cluster). The specific application example acquires the parameters by adopting a mode of local cache, central cache and remote service. When a certain parameter needs to be acquired, the local cache is read first, and if the local cache does not exist and then the central cache does not exist, the central cache does not exist and then the parameter cluster is read. When the parameter of the parameter cluster changes, the change is synchronized to the central cache and the local caches of all the clusters. (there are various mature mechanisms for synchronization mechanism, which are not described in detail here) it has been described above that the cache actually contains the following data: parameter key value set and parameter data. Therefore, when the key value sets of the parameters are changed (for example, parameter addition and parameter deletion), the cache of the parameter key value sets needs to be updated in addition to the cache of the parameter data, so that it is ensured that all the clusters have complete and accurate parameter key value sets, as shown in fig. 6.
S5: and constructing the bank distributed database according to the plurality of bank sub-databases.
It will be appreciated that the parameter interface may look for matching parameters based on a preset search path. However, different search paths require different key values to be entered. If the key needed by the application to identify the parameter is entered, the search path will have no practical meaning: the application still needs to obtain the parameters according to the appointed key value, and when the key value element is changed, the application still needs to be modified. In addition, the search node in this specific application example refers to a set of definite key value combinations when the parameter is located, and when the parameter library has the same parameter of the key value combination, the search is successful. The search path means that when the parameters are positioned, a plurality of search nodes are possible, and the plurality of nodes are arranged according to a specified sequence to be the search path.
As can be seen from the above description, the present invention provides a method for constructing a bank distributed database, in which private key values are set based on possible regional differences of branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct the bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter on a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
Based on the same inventive concept, the embodiment of the present application further provides a device for constructing a bank distributed database, which can be used to implement the method described in the foregoing embodiment, as described in the following embodiments. Because the principle of solving the problems of the device for constructing the bank distributed database is similar to that of the method for constructing the bank distributed database, the implementation of the device for constructing the bank distributed database can be implemented by the method for constructing the bank distributed database, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
The embodiment of the present invention provides a specific implementation manner of a device for constructing a bank distributed database, which can implement the method for constructing a bank distributed database, and referring to fig. 7, the device for constructing a bank distributed database specifically includes the following contents:
a public key value generating unit 10, configured to generate a public key value of a bank sub-database to be constructed according to a target search parameter shared by the bank sub-databases; and;
a private key value generating unit 20, configured to generate a private key value of each bank sub-database to be constructed according to a specific target search parameter of the bank sub-database; the number of the public key values and the number of the private key values are 1 or more;
a data assignment unit 30, configured to assign data of the target search parameter to a corresponding public key value or private key value;
and the database construction unit 40 is configured to construct the bank distributed database according to the public key value, the private key value, and a preset search path of the public key value and the private key value.
In an embodiment, referring to fig. 8, the database construction unit 40 includes:
the sub-data constructing module 401 is configured to construct the bank sub-database according to the public key value, the private key value, and a preset search path of the public key value and the private key value;
a database building module 402, configured to build the bank distributed database according to multiple bank sub-databases.
In an embodiment, referring to fig. 9, the device for constructing a bank distributed database further includes:
a cache unit 50 for storing the common key value in a thread level cache.
In an embodiment, referring to fig. 10, the device for constructing a bank distributed database further includes:
and a key value updating unit 60, configured to update the parameter data corresponding to the public key value and the private key value in the bank sub-database, and update the public key value in the thread-level cache.
As can be seen from the above description, the present invention provides a device for constructing a bank distributed database, in which private key values are set based on regional differences of branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct the bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter to a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
The embodiment of the present application further provides a specific implementation manner of an electronic device, which can implement all steps in the method for constructing a bank distributed database in the foregoing embodiment, and referring to fig. 11, the electronic device specifically includes the following contents:
a processor (processor)1201, a memory (memory)1202, a communication Interface 1203, and a bus 1204;
the processor 1201, the memory 1202 and the communication interface 1203 complete communication with each other through the bus 1204; the communication interface 1203 is configured to implement information transmission among related devices, such as a server-side device, an acquisition device, a client device, and the like.
The processor 1201 is configured to invoke the computer program in the memory 1202, and the processor implements all the steps in the method for building a bank distributed database in the foregoing embodiment when executing the computer program, for example, the processor implements the following steps when executing the computer program:
step 100: and generating a public key value of the bank sub-database according to a target search parameter shared by the bank sub-database to be constructed.
Step 200: generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; the number of the public key values and the number of the private key values are 1 or more.
Step 300: and assigning the data of the target search parameter to a corresponding public key value or private key value.
Step 400: and constructing the bank distributed database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
As can be seen from the above description, in the electronic device in the embodiment of the present application, a private key value is set based on that there may be regional differences in branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct a bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter to a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the method for constructing a bank distributed database in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all the steps in the method for constructing a bank distributed database in the foregoing embodiment, for example, when the processor executes the computer program, the processor implements the following steps:
step 100: and generating a public key value of the bank sub-database according to a target search parameter shared by the bank sub-database to be constructed.
Step 200: generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; the number of the public key values and the number of the private key values are 1 or more.
Step 300: and assigning the data of the target search parameter to a corresponding public key value or private key value.
Step 400: and constructing the bank distributed database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value.
As can be seen from the above description, in the computer-readable storage medium in the embodiment of the present application, private key values are set based on that there may be regional differences in branch businesses in various regions in a bank, and a common key value is established according to parameters common to all branches, so as to construct a bank distributed database, specifically: firstly, generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; and then, assigning the data of the target search parameter to a corresponding public key value or private key value, and finally constructing a bank distributed database. According to the construction method of the bank distributed database, provided by the invention, the unified parameter storage, the high compatibility, the flexible and changeable parameter mechanism and the access mechanism are realized, and the coupling between the parameter structure and the access rule and the application code is eliminated to the maximum extent. The method avoids repeated modification of the application code due to parameter adjustment, reduces the development complexity of the application code, and improves the fault tolerance. The requirement that the service needs can be quickly responded through parameter configuration under the condition that the codes are changed as little as possible or even not changed is met.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Although the present application provides method steps as described in an embodiment or flowchart, additional or fewer steps may be included based on conventional or non-inventive efforts. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
Although embodiments of the present description provide method steps as described in embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, in implementing the embodiments of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, and the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The embodiments of this specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The described embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
The above description is only an example of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure. Various modifications and variations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the embodiments of the present specification.

Claims (9)

1. A bank distributed database construction method is characterized by comprising the following steps:
generating a public key value of a bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; and
generating private key values of the bank sub-databases according to specific target search parameters of each bank sub-database to be constructed; the number of the public key values and the number of the private key values are 1 or more;
assigning the data of the target search parameter to a corresponding public key value or private key value;
constructing the bank distributed database according to the public key values, the private key values, and search paths of preset public key values and private key values;
the constructing the bank distributed database according to the public key value, the private key value, the preset public key value and the preset search path of the private key value comprises the following steps:
constructing the bank sub-database according to the public key value, the private key value, a preset public key value and a preset search path of the private key value;
and constructing the bank distributed database according to the plurality of bank sub-databases.
2. The method of constructing a bank distributed database according to claim 1, further comprising: storing the common key value in a thread level cache.
3. The method of constructing a bank distributed database according to claim 2, further comprising: and when the public key value and the private key value are changed, updating the parameter data corresponding to the public key value and the private key value in the bank sub-database, and updating the public key value in the thread level cache.
4. The method for constructing a distributed database for banks according to claim 1, wherein said public key value and private parameter are respectively in one-to-one correspondence with their corresponding target search parameters.
5. An apparatus for constructing a bank distributed database, comprising:
the public key value generating unit is used for generating a public key value of the bank sub-database according to a target search parameter shared by the bank sub-database to be constructed; and;
the private key value generating unit is used for searching and generating a private key value of each bank sub-database according to a specific target of each bank sub-database to be constructed; the number of the public key values and the number of the private key values are 1 or more;
the data assignment unit is used for assigning the data of the target search parameter to a corresponding public key value or private key value;
the database construction unit is used for constructing the bank distributed database according to the public key values, the private key values, the preset public key values and the preset search paths of the private key values;
the database construction unit includes:
the sub-data building module is used for building the bank sub-database according to the public key values, the private key values, the preset public key values and the preset search paths of the private key values;
and the database construction module is used for constructing the bank distributed database according to the plurality of bank sub-databases.
6. The apparatus for building a bank distributed database according to claim 5, further comprising a cache unit for storing the public key value in a thread level cache.
7. The apparatus for building a bank distributed database according to claim 6, further comprising: and the key value updating unit is used for updating the parameter data corresponding to the public key value and the private key value in the bank sub-database and updating the public key value in the thread level cache.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for constructing a bank distributed database according to any one of claims 1 to 4 when executing the program.
9. A computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the method for constructing a bank distributed database according to any one of claims 1 to 4.
CN201910846524.5A 2019-09-09 2019-09-09 Bank distributed database construction method and device Active CN110674110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910846524.5A CN110674110B (en) 2019-09-09 2019-09-09 Bank distributed database construction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910846524.5A CN110674110B (en) 2019-09-09 2019-09-09 Bank distributed database construction method and device

Publications (2)

Publication Number Publication Date
CN110674110A CN110674110A (en) 2020-01-10
CN110674110B true CN110674110B (en) 2022-07-05

Family

ID=69076676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910846524.5A Active CN110674110B (en) 2019-09-09 2019-09-09 Bank distributed database construction method and device

Country Status (1)

Country Link
CN (1) CN110674110B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111445967A (en) * 2020-02-17 2020-07-24 青岛市城阳区人民医院 Obstetrical clinical auxiliary sequential labor information processing system and method based on artificial intelligence

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019104674A1 (en) * 2017-11-30 2019-06-06 深圳大学 Ciphertext search authority verification method and system therefor
KR20190086301A (en) * 2018-01-12 2019-07-22 인제대학교 산학협력단 System and method for distributed database using block chain

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8402023B2 (en) * 2010-10-19 2013-03-19 Reachable, Inc. Systems and methods for ranking user defined targets in a universal graph database
CN102054050B (en) * 2011-01-30 2012-08-01 天津神舟通用数据技术有限公司 Implementation method of packet mechanism of Shentong database
CN103841211A (en) * 2014-03-25 2014-06-04 冯力新 Method and system for establishing multiple subsystems with individual data stored in distributed mode and realizing unified entrance access of clients
CN105260403B (en) * 2015-09-22 2019-05-31 同望科技股份有限公司 General integration across database access method
SG11201808657TA (en) * 2016-04-01 2018-10-30 Jpmorgan Chase Bank Na Systems and methods for providing data privacy in a private distributed ledger
CN105956166B (en) * 2016-05-19 2020-02-07 北京京东尚科信息技术有限公司 Database reading and writing method and device
CN117033488A (en) * 2016-11-10 2023-11-10 海德拉哈希图有限责任公司 Method and apparatus for a distributed database including anonymous entries
CN108667930B (en) * 2018-05-09 2020-10-30 聚龙股份有限公司 Dynamic data source configuration and automatic switching method
CN109327551B (en) * 2018-12-04 2021-05-18 浩云科技股份有限公司 Method and device for accessing Internet of things equipment into Internet of things platform and server
CN110209377A (en) * 2019-04-26 2019-09-06 平安科技(深圳)有限公司 Interface packet processing method, device, equipment and storage medium based on factory class

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019104674A1 (en) * 2017-11-30 2019-06-06 深圳大学 Ciphertext search authority verification method and system therefor
KR20190086301A (en) * 2018-01-12 2019-07-22 인제대학교 산학협력단 System and method for distributed database using block chain

Also Published As

Publication number Publication date
CN110674110A (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN109597661B (en) Service function configuration method and device
CN108920139B (en) Program generation method, device and system, electronic equipment and storage medium
CN112488855B (en) Business verification method and device based on rule template
CN109634587B (en) Method and equipment for generating warehousing script and warehousing data
CN112487083B (en) Data verification method and device
US10515228B2 (en) Commit and rollback of data streams provided by partially trusted entities
US9003231B1 (en) System for instantiating service instances for testing in a known state
CN113238924B (en) Chaotic engineering realization method and system in distributed graph database system
CN104423961A (en) Method and system for generating testing script
CN107016016A (en) A kind of method and device of data processing
CN111273943A (en) Application file generation method and device and electronic equipment
CN115774552A (en) Configurated algorithm design method and device, electronic equipment and readable storage medium
CN110674110B (en) Bank distributed database construction method and device
CN115841236A (en) Business modeling method, device and medium for realizing quick response
CN112712125B (en) Event stream pattern matching method and device, storage medium and processor
Tsai et al. Data Partitioning and Redundancy Management for Robust Multi-Tenancy SaaS.
Girbea et al. Efficient address space generation for an OPC UA server
CN109582476B (en) Data processing method, device and system
US10379973B2 (en) Allocating storage in a distributed storage system
CN112861185A (en) Data automatic deformation transmission method based on Hive data warehouse
CN104572921A (en) Cross-datacenter data synchronization method and device
US20180278472A1 (en) System and method for performing mass renaming of list of items at run-time with variable differentiation factor
Romsaiyud Applying MVC data model on hadoop for delivering the business intelligence
AU2021268828A1 (en) Secure data replication in distributed data storage environments
CN108595488B (en) Data migration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220913

Address after: 25 Financial Street, Xicheng District, Beijing 100033

Patentee after: CHINA CONSTRUCTION BANK Corp.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Patentee before: CHINA CONSTRUCTION BANK Corp.

Patentee before: Jianxin Financial Science and Technology Co.,Ltd.

TR01 Transfer of patent right