CN113032471A - Database processing method and device, electronic equipment and medium - Google Patents

Database processing method and device, electronic equipment and medium Download PDF

Info

Publication number
CN113032471A
CN113032471A CN202110308827.9A CN202110308827A CN113032471A CN 113032471 A CN113032471 A CN 113032471A CN 202110308827 A CN202110308827 A CN 202110308827A CN 113032471 A CN113032471 A CN 113032471A
Authority
CN
China
Prior art keywords
user
target
database
target database
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110308827.9A
Other languages
Chinese (zh)
Inventor
冯歆尧
彭泽武
谢瀚阳
梁盈威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid 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 Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202110308827.9A priority Critical patent/CN113032471A/en
Publication of CN113032471A publication Critical patent/CN113032471A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The present disclosure relates to a database processing method, apparatus, electronic device, and medium; wherein, the method comprises the following steps: if a platform login event triggered by a user is detected, determining the encoding type of a tenant code to which the user belongs according to the user identification; and generating an address link of the target database according to the coding type, and associating the identifier of the user with the target database according to the address link so as to allow the user to perform data operation on the target database. The embodiment of the disclosure effectively improves the management efficiency of the data authority in the target database.

Description

Database processing method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a database processing method and apparatus, an electronic device, and a medium.
Background
In a power grid enterprise, power grid data is mainly collected by each local city company under the power grid enterprise and uploaded to a big data platform in the power grid enterprise for archiving; on the basis, including province companies and various local city companies, when the power grid data needs to be acquired, data query operation can be performed only through a large data platform inside the province companies, and the power grid data in the large data platform has authority distribution, namely users of the province companies can have authority to check the data of the whole province power grid, and users of the local city companies can only check the data of local cities of the users. The existing data authority control mainly makes a user identifier and a data range which can be viewed by the user identifier into a single table for storage, so that the user can view the data range.
The defects of the existing scheme are as follows: the user applies for checking one data table every time, the system needs to operate a relevant program once to control the data authority, and a large amount of repeated work greatly reduces the management efficiency of the data authority.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a database processing method, apparatus, electronic device, and medium.
In a first aspect, the present disclosure provides a method for processing a database, the method including:
if a platform login event triggered by a user is detected, determining the code type of a tenant code to which the user belongs according to the user identifier;
and generating an address link of a target database according to the coding type, and associating the identifier of the user with the target database according to the address link so as to allow the user to perform data operation on the target database.
Optionally, determining, according to the identifier of the user, an encoding category of a tenant encoding to which the user belongs includes:
determining the encoding type of the tenant encoding to which the user belongs according to the identification of the user based on an encoding type mapping table; wherein the encoding category comprises a city class or a provincial company class.
Optionally, if the encoding type is a city office type, the generating an address link of the target database according to the encoding type includes:
calling a database information acquisition program, and determining information of a target database, a target mode of the target database, a user name of the target mode and a user password of the target mode according to a tenant code to which the user belongs;
generating an address link of a target database according to the information of the target database, a target mode of the target database, a user name of the target mode and a user password of the target mode;
the information of the target database comprises a network protocol IP address, a port number and a database name.
Optionally, the generating an address link of a target database according to the information of the target database, the target mode of the target database, the user name of the target mode, and the user password of the target mode includes:
calling a link generation program, and performing character conversion on the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode to obtain a conversion result;
and sequentially combining all characters in the conversion result to obtain the address link of the target database.
Optionally, if the encoding type is a province company type, the generating an address link of the target database according to the encoding type includes:
receiving a data table selection request of the user; wherein the data table selection request comprises target data;
determining a business system to which the target data belongs;
and determining the address link of the target database according to the service system to which the target data belongs.
Optionally, the determining an address link of a target database according to a service system to which the target data belongs includes:
determining a target mode of a target database according to a service system to which the target data belongs;
calling a database information acquisition program, and determining an IP address, a port number, a database name, a user name and a user password of a target database according to the tenant code to which the user belongs;
and generating an address link of the target database according to the IP address, the port number, the database name, the target mode of the target database, the user name of the target database and the user password of the target database.
Optionally, the method further comprises:
if a data operation request sent by a user is received, acquiring an identifier of the user; wherein the data operation request comprises at least one of a data query request, a data control request and a data definition request;
and determining a related target database according to the user identification so as to enable the user to perform data operation in the target database.
In a second aspect, the present disclosure also provides a database processing apparatus, including:
the code type determining module is used for determining the code type of a tenant code to which the user belongs according to the identification of the user if a platform login event triggered by the user is detected;
and the address link generation and association module is used for generating an address link of a target database according to the coding type and associating the identifier of the user with the target database according to the address link so as to enable the user to perform data operation on the target database.
Optionally, the encoding type determining module is specifically configured to:
determining the encoding type of the tenant encoding to which the user belongs according to the identification of the user based on an encoding type mapping table; wherein the encoding category comprises a city class or a provincial company class.
Optionally, the address link generation and association module includes: an information determining unit and an address link determining unit;
the information determining unit is used for calling a database information acquisition program, and determining information of a target database, a target mode of the target database, a user name of the target mode and a user password of the target mode according to a tenant code to which the user belongs;
the address link determining unit is used for generating an address link of the target database according to the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode;
the information of the target database comprises a network protocol IP address, a port number and a database name.
Optionally, the address link determining unit is specifically configured to:
calling a link generation program, and performing character conversion on the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode to obtain a conversion result;
and sequentially combining all characters in the conversion result to obtain the address link of the target database.
Optionally, the address link generation and association module further includes: a request receiving unit and a service system determining unit;
a request receiving unit, configured to receive a data table selection request of the user; wherein the data table selection request comprises target data;
the business system determining unit is used for determining the business system to which the target data belongs;
and the address link determining unit is also used for determining the address link of the target database according to the business system to which the target data belongs.
Optionally, the address link determining unit is specifically configured to:
determining a target mode of a target database according to a service system to which the target data belongs;
calling a database information acquisition program, and determining an IP address, a port number, a database name, a user name and a user password of a target database according to the tenant code to which the user belongs;
and generating an address link of the target database according to the IP address, the port number, the database name, the target mode of the target database, the user name of the target database and the user password of the target database.
Optionally, the method further comprises:
the identification acquisition module is used for acquiring the identification of the user if a data operation request sent by the user is received; wherein the data operation request comprises at least one of a data query request, a data control request and a data definition request;
and the target database determining module is used for determining the associated target database according to the identification of the user so as to enable the user to perform data operation in the target database.
In a third aspect, the present disclosure also provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the database processing method according to any one of the embodiments of the present invention.
In a fourth aspect, the present disclosure also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the database processing method according to any one of the embodiments of the present invention.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: the problem that the data stored in the database has no relevance with the user is solved, the user can directly operate the target database according to the relevance when operating the data subsequently, and meanwhile effective management of data authority in the target database is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a database processing method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating another database processing method provided by the embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a processing method of another database provided by the embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a processing method of another database provided by the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a processing device of a database according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a schematic flowchart of a database processing method according to an embodiment of the present disclosure. The embodiment can be applied to the case of carrying out authority distribution on data in the power grid system. The method of the embodiment may be performed by a database processing device, which may be implemented in hardware and/or software and may be configured in an electronic device. The database processing method according to any embodiment of the present application can be realized.
At present, the grid data of the local and city bureaus and the provincial companies are stored in a grid big data platform, and in the grid big data platform, the grid data of the provincial companies comprise the grid data of all the local and city bureaus within the province, and the data are stored in the same database of the grid big data platform, but the grid data of each individual city bureau are respectively stored in different modes of the same database, wherein the mode can be regarded as a sub-database.
Under the mode that each local market company belongs to, business systems such as a marketing system, a human resource system and the like which are used for distinguishing data sources are not distinguished; in a power grid big data platform, all data of all city companies in a province are respectively stored in a mode, and the data of the province companies are separately stored in a plurality of modes according to a service system to which the data belong; when needing to inquire the province company data or the local and city office data, the user obtains the data through a unified big data platform of the province company.
As shown in fig. 1, the method specifically includes the following steps:
s110, if a platform login event triggered by a user is detected, determining the encoding type of the tenant encoding to which the user belongs according to the user identification.
In this embodiment, the platform login event is a login request event for a user to log in the big data platform to query data, for example, the user inputs a registration account and fills in a registration password on a login interface of the big data platform; before logging in the big data platform, a user needs to perform auditing operations such as account registration and identity verification in the platform to verify the identity information of the user, so that leakage damage to data stored in the big data platform is avoided.
In order to effectively manage the registered users in the platform, the identity identification is carried out on each user so as to effectively distinguish each user; the user identification can be assigned by the big data platform after the user registers, and meanwhile, the user can be supported to select autonomously during registration, and the user identification can be a character string combination consisting of numbers, letters and symbols, such as 123_ A.
The tenant code to which the user belongs can be obtained from a code mapping table according to the user identifier; the user identification and the tenant code to which the user identification belongs are in a many-to-one relationship, namely one tenant code can be simultaneously associated with the identifications of a plurality of users; the tenant code may be a combination of numbers and letters, such as T1000. Specifically, the encoding category of the tenant encoding is to distinguish the authority range of the user capable of viewing the data, and may include a local office category and a provincial company category; the users in the class of local city bureaus can only view the power grid data of the local city bureaus, and the users in the class of provincial companies can view the power grid data of all the local city companies covered by the province.
And S120, generating an address link of the target database according to the coding type, and associating the user identifier with the target database according to the address link so that the user can perform data operation on the target database.
In this embodiment, the target database is a storage database of grid data that can be viewed by a user triggering a platform login event; the address link can be accurately positioned to the storage position of the target database from a plurality of databases in the big data platform, and the address link of the target database is dynamically updated according to the tenant code to which the user belongs, so that the safety of the data stored in the database is guaranteed.
Associating the user's identification with the target database according to the address link may include: establishing an identification database association table, and storing the identification of the user with the association relation and a target database into the identification database association table; so that the target database corresponding to the user identification can be quickly found out and the authority access can be carried out by directly calling the identification database association table subsequently.
If a platform login event triggered by a user is detected, determining the code type of a tenant code to which the user belongs according to the user identifier; and generating an address link of the target database according to the coding type, and associating the identifier of the user with the target database according to the address link so as to allow the user to perform data operation on the target database. The embodiment of the disclosure solves the problem that the data stored in the database has no relevance with the user, enables the user to directly operate the target database according to the relevance when operating the data subsequently, and simultaneously improves the effective management of the data authority in the target database.
Fig. 2 is a schematic flowchart of another database processing method according to an embodiment of the present disclosure. The embodiment is further expanded and optimized on the basis of the embodiment, and can be combined with any optional alternative in the technical scheme. As shown in fig. 2, the method includes:
s210, if a platform login event triggered by a user is detected, determining the encoding type of a tenant encoding to which the user belongs according to the identification of the user based on an encoding type mapping table; wherein the encoding category comprises a city bureau category or a provincial company category.
In this embodiment, the encoding type mapping table is established in advance according to the determined association relationship between the tenant encoding and the encoding type; the relationship between the tenant code and the code category can be distinguished according to professional staff. According to the method and the device, when the encoding type of the tenant encoding is determined, the encoding type is quickly searched according to the encoding type mapping table stored in the big data platform in advance, and the searching efficiency of the encoding type is effectively improved.
And S220, if the code type is the city type, calling a database information acquisition program, and determining the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode according to the tenant code to which the user belongs.
In this embodiment, the database information obtaining program is an application program written in advance by a programmer, so as to achieve quick obtaining of information. The modes are different sub-databases in the target database, and one target database can be provided with a plurality of target modes so as to realize independent storage of different information in the database; the user name of the target mode is a login name of the user for logging in the target mode to obtain target data; the user password of the target mode is a mode login password corresponding to the user login name.
It should be noted that, in this embodiment, the information of the local companies of the local type is stored in different patterns in one database, and each pattern has its own user name and user password.
S230, generating an address link of the target database according to the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode; the information of the target database comprises a network protocol IP address, a port number and a database name.
In this embodiment, all data is stored in one database, so that the network Protocol (IP) address, the port number, and the database name corresponding to the target database are all fixed. According to the embodiment, the corresponding address link can be generated according to the information of the local city office class, and the effective connection between the user of the local city company and the mode of the local city company can be directly established.
On the basis of this embodiment, optionally, generating an address link of the target database according to the information of the target database, the target mode of the target database, the user name of the target mode, and the user password of the target mode includes:
calling a link generation program, and performing character conversion on the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode to obtain a conversion result;
and sequentially combining all characters in the conversion result to obtain the address link of the target database.
The characters are converted into identification characters which are uniform and easy to recognize, and information of the target database, a target mode of the target database, a user name of the target mode and a user password of the target mode are converted into the identification characters, so that the problem that address linkage is repeated due to similar characters is solved. In this embodiment, finally, according to each character sequence combination in the conversion result, the format of the address link capable of obtaining the target database may include: IP address + port number + database name + mode + username in mode + user password in mode.
And S240, associating the user identification with the target database according to the address link so that the user can perform data operation on the target database.
Fig. 3 is a schematic flowchart of another database processing method provided in the embodiment of the present disclosure. The embodiment is further expanded and optimized on the basis of the embodiment, and can be combined with any optional alternative in the technical scheme. As shown in fig. 3, the method includes:
s310, if a platform login event triggered by a user is detected, determining the encoding type of a tenant encoding to which the user belongs according to the identification of the user based on an encoding type mapping table; wherein the encoding category comprises a city bureau category or a provincial company category.
S320, receiving a data sheet selection request of a user if the coding type is province company type; the data table selection request comprises target data.
In this embodiment, when a user queries data, the user selects a data table that the user wants to use on a query interface of a big data platform, where the data table includes data that the user wants to view; the user may send the data table selection request by clicking a virtual button of the data table in the query interface of the big data platform (e.g., selecting a circle in the data table, or clicking the data table).
S330, determining a business system to which the target data belongs; and determining the address link of the target database according to the business system to which the target data belongs.
Because the power grid data in the province company is stored according to the service system, the service system to which the target data belongs needs to be determined to accurately generate the address link of the target database.
On the basis of this embodiment, optionally, determining the address link of the target database according to the service system to which the target data belongs includes:
determining a target mode of a target database according to a service system to which target data belongs;
calling a database information acquisition program, and determining an IP address, a port number, a database name, a user name and a user password of a target database according to a tenant code to which a user belongs;
and generating an address link of the target database according to the IP address, the port number, the database name, the target mode of the target database, the user name of the target database and the user password of the target database.
In the big data platform, the business system and the target mode of the target database have a corresponding relation, so that the required mode can be quickly found out under a plurality of target modes of the big data platform. The name, IP address and port number of the provincial company database are all fixed and are the same as the corresponding information of the local and city bureaus stored in the same database. According to the method and the device, the corresponding address link can be generated according to the information of the provincial company, and the effective connection between the user of the provincial company and the model of the provincial company can be directly established.
In this embodiment, a process of obtaining a user name, a user password, and a mode is provided; the tenant code is taken as T1000 (Guangdong electric network province company) for explanation; assume the database name is sjk; port number 8080; the business system to which the target data belongs is a marketing system, the model name is yxxt, and the following switchCase statement implementation process can be seen as follows:
schema for database acquisition:
“switchCase(getTenantOneCode()=="T1000","yxxt",getTenantOneCode()=="T1001","data_fs",…”
the above code indicates that if the tenant code is T1000, representing province company, the pattern name is yxxt, and if the tenant code is T1001, representing the mountain office, the pattern name is data _ fs. The principle of obtaining the user name and the user password is the same.
Acquiring a user name:
“switchCase(getTenantOneCode()=="T1000","data_gddw",getTenantOneCode()=="T1001","data_fs",…”
acquiring a user password:
“switchCase(getTenantOneCode()=="T1000","data_gddw",getTenantOneCode()=="T1001","data_fs",…”
the user name and the password are the same and are both data _ gddw.
It should be noted that, in this embodiment, if the tenant code to which the user belongs is a local office class, the mode of the database used is uniquely determined by the local office, and each local office has a user name and a password that are unique in the mode; if the tenant code to which the user belongs is provincial company class, the data mode is determined by the business system to which the target data to be viewed belongs, and each business system has an independent user name and password.
And S340, associating the user identification with the target database according to the address link so that the user can perform data operation on the target database.
Fig. 4 is a schematic flowchart of another database processing method provided in the embodiment of the present disclosure. The embodiment is further expanded and optimized on the basis of the embodiment, and can be combined with any optional alternative in the technical scheme. As shown in fig. 4, the method includes:
and S410, if a platform login event triggered by a user is detected, determining the encoding type of the tenant encoding to which the user belongs according to the user identification.
And S420, generating an address link of the target database according to the coding type, and associating the user identifier with the target database according to the address link.
S430, if a data operation request sent by a user is received, acquiring an identifier of the user; wherein the data operation request comprises at least one of a data query request, a data control request and a data definition request.
In this embodiment, when a user needs to perform data operation on target data associated with the user in a big data platform, the user may click a virtual button of a data operation request in a display page of the big data platform, for example, click a data query button, a data control button, or a data definition button; the data control request can be data change operation on data which can be viewed by the user; the data definition request may be a custom treatment for attributes or characteristics of the data that the user may view.
The user identification can be associated and searched according to the user login name used when the user logs in the big data platform.
S440, determining the associated target database according to the user identification so that the user performs data operation in the target database.
In this embodiment, since the association relationship between the identifier of the registered user and the target database is stored in the big data platform, the target database associated with the identifier of the registered user can be directly and quickly searched according to the association relationship and the identifier of the registered user, and the target database is displayed on the platform page for the user to perform related data operations.
Before determining the associated target database according to the user identifier, the method of this embodiment further includes: judging whether the user is a new user or not according to the user identification, and if not, executing the operation of determining the associated target database according to the user identification; if yes, feeding back error information and indicating the user to log in and register. Therefore, the problem of data leakage caused by the fact that the user who is not subjected to identity authentication steals the platform data can be solved, and the risk of platform data steal can be further reduced.
Fig. 5 is a schematic structural diagram of a processing device of a database according to an embodiment of the present disclosure; the device is configured in the electronic equipment, and can realize the database processing method in any embodiment of the application. The device specifically comprises the following steps:
an encoding type determining module 510, configured to determine, according to an identifier of a user, an encoding type of a tenant encoding to which the user belongs if a platform login event triggered by the user is detected;
an address link generating and associating module 520, configured to generate an address link of a target database according to the encoding category, and associate the identifier of the user with the target database according to the address link, so that the user performs data operation on the target database.
On the basis of the foregoing embodiment, optionally, the encoding type determining module 510 is specifically configured to:
determining the encoding type of the tenant encoding to which the user belongs according to the identification of the user based on an encoding type mapping table; wherein the encoding category comprises a city class or a provincial company class.
On the basis of the foregoing embodiment, optionally, the address link generating and associating module 520 includes: an information determining unit and an address link determining unit;
the information determining unit is used for calling a database information acquisition program, and determining information of a target database, a target mode of the target database, a user name of the target mode and a user password of the target mode according to a tenant code to which the user belongs;
the address link determining unit is used for generating an address link of the target database according to the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode;
the information of the target database comprises a network protocol IP address, a port number and a database name.
On the basis of the foregoing embodiment, optionally, the address link determining unit is specifically configured to:
calling a link generation program, and performing character conversion on the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode to obtain a conversion result;
and sequentially combining all characters in the conversion result to obtain the address link of the target database.
On the basis of the foregoing embodiment, optionally, the address link generating and associating module 520 further includes: a request receiving unit and a service system determining unit;
a request receiving unit, configured to receive a data table selection request of the user; wherein the data table selection request comprises target data;
the business system determining unit is used for determining the business system to which the target data belongs;
and the address link determining unit is also used for determining the address link of the target database according to the business system to which the target data belongs.
On the basis of the foregoing embodiment, optionally, the address link determining unit is specifically configured to:
determining a target mode of a target database according to a service system to which the target data belongs;
calling a database information acquisition program, and determining an IP address, a port number, a database name, a user name and a user password of a target database according to the tenant code to which the user belongs;
and generating an address link of the target database according to the IP address, the port number, the database name, the target mode of the target database, the user name of the target database and the user password of the target database.
On the basis of the foregoing embodiment, optionally, the apparatus of this embodiment further includes:
the identification acquisition module is used for acquiring the identification of the user if a data operation request sent by the user is received; wherein the data operation request comprises at least one of a data query request, a data control request and a data definition request;
and the target database determining module is used for determining the associated target database according to the identification of the user so as to enable the user to perform data operation in the target database.
By the database processing device, the problem that the data stored in the database has no relevance with the user is solved, the user can directly operate the target database according to the relevance during subsequent data operation, and effective management of data authority in the target database is improved.
The database processing device provided by the embodiment of the invention can execute the database processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present disclosure. As shown in fig. 6, the electronic device includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of the processors 610 in the electronic device may be one or more, and one processor 610 is taken as an example in fig. 6; the processor 610, the memory 620, the input device 630, and the output device 640 in the electronic apparatus may be connected by a bus or other means, and fig. 6 illustrates an example of connection by a bus.
The memory 620 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the database processing method in the embodiment of the present invention. The processor 610 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 620, that is, implements the database processing method provided by the embodiment of the present invention.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 can further include memory located remotely from the processor 610, which can be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 630 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device, and may include a keyboard, a mouse, and the like. The output device 640 may include a display device such as a display screen.
The embodiment of the disclosure also provides a storage medium containing computer executable instructions, and the computer executable instructions are used for realizing the processing method of the database provided by the embodiment of the invention when being executed by a computer processor.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the database processing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of processing a database, the method comprising:
if a platform login event triggered by a user is detected, determining the code type of a tenant code to which the user belongs according to the user identifier;
and generating an address link of a target database according to the coding type, and associating the identifier of the user with the target database according to the address link so as to allow the user to perform data operation on the target database.
2. The method according to claim 1, wherein determining the encoding category of the tenant encoding to which the user belongs according to the user identification comprises:
determining the encoding type of the tenant encoding to which the user belongs according to the identification of the user based on an encoding type mapping table; wherein the encoding category comprises a city class or a provincial company class.
3. The method of claim 2, wherein if the code type is a city class, the generating an address link of the target database according to the code type comprises:
calling a database information acquisition program, and determining information of a target database, a target mode of the target database, a user name of the target mode and a user password of the target mode according to a tenant code to which the user belongs;
generating an address link of a target database according to the information of the target database, a target mode of the target database, a user name of the target mode and a user password of the target mode;
the information of the target database comprises a network protocol IP address, a port number and a database name.
4. The method of claim 3, wherein generating the address link of the target database according to the information of the target database, the target pattern of the target database, the user name of the target pattern, and the user password of the target pattern comprises:
calling a link generation program, and performing character conversion on the information of the target database, the target mode of the target database, the user name of the target mode and the user password of the target mode to obtain a conversion result;
and sequentially combining all characters in the conversion result to obtain the address link of the target database.
5. The method of claim 2, wherein if the code category is provincial company category, the generating the address link of the target database according to the code category comprises:
receiving a data table selection request of the user; wherein the data table selection request comprises target data;
determining a business system to which the target data belongs;
and determining the address link of the target database according to the service system to which the target data belongs.
6. The method of claim 5, wherein the determining the address link of the target database according to the business system to which the target data belongs comprises:
determining a target mode of a target database according to a service system to which the target data belongs;
calling a database information acquisition program, and determining an IP address, a port number, a database name, a user name and a user password of a target database according to the tenant code to which the user belongs;
and generating an address link of the target database according to the IP address, the port number, the database name, the target mode of the target database, the user name of the target database and the user password of the target database.
7. The method of claim 1, further comprising:
if a data operation request sent by a user is received, acquiring an identifier of the user; wherein the data operation request comprises at least one of a data query request, a data control request and a data definition request;
and determining a related target database according to the user identification so as to enable the user to perform data operation in the target database.
8. A database processing apparatus, characterized in that the apparatus comprises:
the code type determining module is used for determining the code type of a tenant code to which the user belongs according to the identification of the user if a platform login event triggered by the user is detected;
and the address link generation and association module is used for generating an address link of a target database according to the coding type and associating the identifier of the user with the target database according to the address link so as to enable the user to perform data operation on the target database.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of processing a database as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of processing a database according to any one of claims 1 to 7.
CN202110308827.9A 2021-03-23 2021-03-23 Database processing method and device, electronic equipment and medium Pending CN113032471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110308827.9A CN113032471A (en) 2021-03-23 2021-03-23 Database processing method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110308827.9A CN113032471A (en) 2021-03-23 2021-03-23 Database processing method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113032471A true CN113032471A (en) 2021-06-25

Family

ID=76472885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110308827.9A Pending CN113032471A (en) 2021-03-23 2021-03-23 Database processing method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113032471A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117436131A (en) * 2023-12-20 2024-01-23 临沂市中信信息技术有限公司 Data management system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440273A (en) * 2013-08-06 2013-12-11 北京航空航天大学 Data cross-platform migration method and device
CN107977562A (en) * 2017-11-30 2018-05-01 努比亚技术有限公司 Personal identification method, identification terminal and storage medium
CN108733787A (en) * 2018-05-11 2018-11-02 中国平安人寿保险股份有限公司 Database operation method, device, electronic equipment and storage medium
CN111367983A (en) * 2020-03-10 2020-07-03 中国联合网络通信集团有限公司 Database access method, system, device and storage medium
CN111709046A (en) * 2020-06-23 2020-09-25 中国平安财产保险股份有限公司 User permission data configuration method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440273A (en) * 2013-08-06 2013-12-11 北京航空航天大学 Data cross-platform migration method and device
CN107977562A (en) * 2017-11-30 2018-05-01 努比亚技术有限公司 Personal identification method, identification terminal and storage medium
CN108733787A (en) * 2018-05-11 2018-11-02 中国平安人寿保险股份有限公司 Database operation method, device, electronic equipment and storage medium
CN111367983A (en) * 2020-03-10 2020-07-03 中国联合网络通信集团有限公司 Database access method, system, device and storage medium
CN111709046A (en) * 2020-06-23 2020-09-25 中国平安财产保险股份有限公司 User permission data configuration method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117436131A (en) * 2023-12-20 2024-01-23 临沂市中信信息技术有限公司 Data management system
CN117436131B (en) * 2023-12-20 2024-04-05 临沂市中信信息技术有限公司 Data management system

Similar Documents

Publication Publication Date Title
JP7222036B2 (en) Model training system and method and storage medium
EP2924588B1 (en) Report creation method, device and system
CN107423632B (en) Customizable sensitive data desensitization method and system
CN104268241B (en) Attribute display method in a kind of configuration database
CN110225039B (en) Authority model obtaining method, authority authentication method, gateway, server and storage medium
CN110213290B (en) Data acquisition method, API gateway and storage medium
CN108471421B (en) Method, system and related device for constructing multiple exclusive platforms in cloud environment
WO2021013056A1 (en) Microservice-based data processing method and apparatus, and device and readable storage medium
CN113094334B (en) Digital service method, device, equipment and storage medium based on distributed storage
CN104243565B (en) The method and apparatus for obtaining configuration data
CN113032471A (en) Database processing method and device, electronic equipment and medium
CN111090803A (en) Data processing method and device, electronic equipment and storage medium
CN111930753B (en) Data retrieving method and device, electronic equipment and storage medium
CN113779625A (en) Data access method and device, electronic equipment and storage medium
CN111200645A (en) Service request processing method, device, equipment and readable storage medium
CN108388809B (en) Data range control method and system
CN111369255A (en) User management method and device, electronic equipment and storage medium
CN111752964A (en) Data processing method and device based on data interface
CN113407541B (en) Data acquisition method, data acquisition equipment, storage medium and device
CN115098738A (en) Service data extraction method and device, storage medium and electronic equipment
CN109241354B (en) Storage method, device, equipment and storage medium for technical standard data of power grid
CN110677494B (en) Access response method and device
CN114153438A (en) API automatic generation system
CN115017185A (en) Data processing method, device and storage medium
CN113127906A (en) Unified authority management platform, method and storage medium based on C/S architecture

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