CN112835866B - Database implementation method and device, electronic equipment and storage medium - Google Patents

Database implementation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112835866B
CN112835866B CN201911180155.7A CN201911180155A CN112835866B CN 112835866 B CN112835866 B CN 112835866B CN 201911180155 A CN201911180155 A CN 201911180155A CN 112835866 B CN112835866 B CN 112835866B
Authority
CN
China
Prior art keywords
database
plug
registration
registration request
identity
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
CN201911180155.7A
Other languages
Chinese (zh)
Other versions
CN112835866A (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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies 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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN201911180155.7A priority Critical patent/CN112835866B/en
Publication of CN112835866A publication Critical patent/CN112835866A/en
Application granted granted Critical
Publication of CN112835866B publication Critical patent/CN112835866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method, a device, electronic equipment and a storage medium for realizing a database, wherein the method is applied to a database server and comprises the following steps: receiving a database registration request; executing database registration operation according to the database registration request, and returning the registered identity of the database; receiving a plug-in registration request with the identity of the database; and responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in. The embodiment of the application is beneficial to simplifying the management work of the database and flexibly supporting the expansion of the database data service.

Description

Database implementation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of database management technologies, and in particular, to a method and apparatus for implementing a database, an electronic device, and a storage medium.
Background
With the development of visual intelligence, many applications based on visual intelligence technology have been landed, and it is well known that the basic data of visual intelligence applications or analysis systems consist of a large amount of picture structured data, which is stored in the form of a database. Depending on the data content and the purpose, many types of libraries are often required, such as: a dynamic library storing a set of snap shots from the camera, and a static library storing a set of photographs of credentials. With the continuous expansion of library types, each library needs to maintain a set of business basic capability interfaces, which certainly increases the development work of developers, and has lower multiplexing rate of some common features among different types of databases, not to mention centralized management. In some improvements, data of all databases are stored in the same table, logical isolation is performed based on type fields, difference fields of different data are all added in the same table, development workload of common characteristics of different databases is reduced to a certain extent, but as different part of attributes of the databases are directly added into the field storage, the fields are increased along with continuous expansion of the databases, and database management work is still quite complicated.
Disclosure of Invention
Aiming at the problems, the application provides a method, a device, electronic equipment and a storage medium for realizing a database, which are beneficial to simplifying the management work of the database and flexibly supporting the expansion of the data service of the database.
To achieve the above object, a first aspect of an embodiment of the present application provides a method for implementing a database, including:
Receiving a database registration request;
Executing database registration operation according to the database registration request, and returning the registered identity of the database;
Receiving a plug-in registration request with the identity of the database;
And responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in.
In one possible embodiment, before receiving the database registration request, the method further comprises:
Abstracting all types of databases to extract common fields;
the database registration request comprises attribute information corresponding to the public field; the executing database registration operation according to the database registration request includes:
And registering attribute information corresponding to the public fields in the database. .
In a possible implementation manner, the system is provided with a unified plug-in registration interface, and the plug-in registration request further comprises a plug-in required by the database service function; the response to the plug-in registration request carries out plug-in registration on the database, and the method comprises the following steps:
and calling the plug-in registration interface to be a plug-in required by the database registration service function based on the identity of the database.
In one possible implementation, the plug-ins required for the database service function include at least one of a schema extension plug-in or a value mapping plug-in.
In one possible embodiment, the method further comprises:
Performing field expansion on the database by using the mode expansion plug-in aiming at the special attribute of the data to be inserted, and recording the information of an expansion field;
And if the operation of inquiring or inserting a certain extension field in the database is received, the operation is corresponding to the extension field through the mode extension plug-in, and the value mapping plug-in is utilized to perform value replacement on the data to be inquired or inserted in the extension field according to a preset value mapping relation.
A second aspect of an embodiment of the present application provides an implementation apparatus for a database, where the apparatus includes:
The first request receiving module is used for receiving a database registration request;
the database registration module is used for executing database registration operation according to the database registration request and returning the registered identity of the database;
the second request receiving module is used for receiving a plug-in registration request with the identity of the database;
and the plug-in registration module is used for responding to the plug-in registration request, registering the plug-in the database and returning the identity of the registered plug-in.
A third aspect of an embodiment of the present application provides an electronic device, including: the database comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the steps in the database implementation method are realized when the processor executes the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for implementing a database described above.
The scheme of the application at least comprises the following beneficial effects: receiving a database registration request sent by a client; then, according to the database registration request, executing database registration operation, and returning the registered identity of the database to the client; receiving a plug-in registration request with the identity of the database sent by a client; and responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in to the client. When various types of databases are needed to be added to the database server, the databases can be successfully registered only by inputting some basic information without registering according to the types of the databases, and the identification information of the databases is obtained, so that the adding flow of the databases is simplified, all database data are stored in the same table and are logically isolated by the identification information, the management work of the databases is greatly simplified, in addition, corresponding plug-ins are selected for registration according to the registered services of the databases, the processing of the services is only related to the types of the plug-ins, and the plug-ins registered by each database are different, so that the expansion of the data service of the databases is more flexible.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram of an application architecture according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for implementing a database according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating another implementation method of a database according to an embodiment of the present application;
FIG. 4-a is a diagram illustrating registration of a database according to an embodiment of the present application;
FIG. 4-b is a diagram illustrating a registration of a plug-in provided by an embodiment of the present application;
FIG. 4-c is a diagram illustrating registration of another plug-in provided by an embodiment of the present application;
Fig. 5 is a schematic structural diagram of an implementation device of a database according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another implementation apparatus for a database according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another implementation apparatus for a database according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another implementation apparatus for a database according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
The terms "comprising" and "having" and any variations thereof, as used in the description, claims and drawings, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used for distinguishing between different objects and not for describing a particular sequential order.
The network system architecture to which the scheme of the embodiment of the present application may be applied is first described by way of example with reference to the accompanying drawings. Referring to fig. 1, fig. 1 is an application architecture diagram provided in an embodiment of the present application, as shown in fig. 1, the application architecture diagram includes a database server and a client, the client is an application program, and the application program is installed on a terminal of a user, where the terminal of the user may be a laptop, a tablet computer, a desktop computer, a notebook computer, or the like, and the database server and the client are connected through a wired or wireless network to perform communication or interaction. Specifically, the client is configured to receive input from a user and send various requests to the database server, for example: a data query request, a data insertion request, a data deletion request and the like, and receives various information returned by the database server; the database server may provide some common resources, such as: a plug-in library or plug-in registration framework developed by a developer, and can generate configuration files and the like for the plug-ins, and when receiving requests sent by users through clients, respond to the requests to perform relevant operations (such as plug-in registration) and return certain operation results (such as data query results) to the clients. In some examples, the database server may be a local server, or may be a cloud server; either a single server or a cluster of servers; the virtual machine may be a physical machine or a virtual machine, and is not particularly limited. Based on the application architecture shown in fig. 1, the method for implementing the database according to the embodiment of the present application is described in detail below with reference to other drawings.
Referring to fig. 2, fig. 2 is a flowchart of a method for implementing a database according to an embodiment of the present application, as shown in fig. 2, including the steps of:
S21, the database server receives a database registration request.
In particular embodiments of the present application, the database server may include a transmission control protocol (Transmission Control Protocol, TCP) interface, a hypertext transfer protocol (HyperText Transfer Protocol, HTTP) interface, or a user datagram protocol (User Datagram Protocol, UDP) interface. The database registration request refers to a request of a new database sent to a database server by a user through a client under the condition that the system needs the new database, wherein the database can be a picture database or other databases, or can be an example of the database, and the database registration request can be sent in a control triggering mode or in a program code mode, and particularly can be sent in a TCP protocol, an HTTP protocol or a UDP protocol.
S22, the database server executes database registration operation according to the database registration request and returns the registered identity of the database.
In the specific embodiment of the application, the database server performs database registration under the condition of receiving a database registration request sent by a client, and returns the Identity (ID) of the registered database to the client after the database registration is successful, and different types of databases (such as a dynamic database and a static database) are logically isolated by the Identity, and all data are stored in the same table, so that the storage space of the database is fully utilized. Specifically, the identity mark can be generated by the database server after the database is successfully registered, or can be selected from the identity mark library by the database server.
S23, the database server receives a plug-in registration request with the identity of the database.
In a specific embodiment of the present application, the plug-in is a program written by an application program interface conforming to a certain specification, and the plug-in can only run under a system platform specified by the program. After the client receives the identity of the database returned by the database server, the user sends a plug-in registration request to the database server through the client, and as each database has different data and different services to be processed by each database, the plug-ins registered by each database are different, for example: the mode (schema) extends plug-ins, value (value) maps plug-ins and the like, and when a plug-in registration request is sent, the identity of the database should be carried in the plug-in registration request, so that the database server can accurately register the plug-ins to be registered to the corresponding database.
S24, the database server responds to the plug-in registration request, carries out plug-in registration on the database and returns the identity of the registered plug-in.
In a specific embodiment of the present application, after receiving the above-mentioned plug-in registration request, the database server first reads and analyzes the request to obtain the identification information of the database therefrom, then finds the corresponding database to perform plug-in registration based on the identification information, and after the plug-in registration is successful, returns the identity of the registered plug-in to the client, so that the user can invoke the corresponding plug-in to perform service processing according to the identity of the plug-in when executing the related service of the database, for example: when the data to be inserted in the database has the address information of the target object, the 'address' field needs to be expanded, and the mode expansion plug-in can be called for field expansion according to the identity of the mode expansion plug-in.
Compared with the prior art, the embodiment of the application receives the database registration request sent by the client; then, according to the database registration request, executing database registration operation, and returning the registered identity of the database to the client; receiving a plug-in registration request with the identity of the database sent by a client; and responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in to the client. When various types of databases are needed to be added to the database server, the databases can be successfully registered only by inputting some basic information without registering according to the types of the databases, and the identification information of the databases is obtained, so that the adding flow of the databases is simplified, all database data are stored in the same table and are logically isolated by the identification information, the management work of the databases is greatly simplified, in addition, corresponding plug-ins are selected for registration according to the registered services of the databases, the processing of the services is only related to the types of the plug-ins, and the plug-ins registered by each database are different, so that the expansion of the data service of the databases is more flexible.
Referring to fig. 3, fig. 3 is a flow chart of another implementation method of a database according to an embodiment of the present application, as shown in fig. 3, including the steps of:
s31, abstracting all types of databases to extract common fields;
in the embodiment of the application, because of all types of databases, a simple dynamic library and a static library in a picture library have some common fields, for example: the common fields such as the library name, the picture address and the picture characteristic value do not need to distinguish the types of the databases, so that all types of databases can be abstracted first to extract the common fields.
S32, receiving a database registration request; the database registration request comprises attribute information corresponding to the public field;
In a specific embodiment of the present application, a database registration request sent by a client carries attribute information corresponding to a public field of a database to be registered, and taking a picture library as an example, it is assumed that the extracted public field includes: library name. The attribute information of these common fields may be included in the database registration request, including the picture feature value and the picture address: library name- "cell resident registry", picture feature value- "2,3,4" picture address- "http:// website.com/images/search. Phpa-b". Of course, the picture address here is an access address in the format of a picture URL (Uniform Resource Locator ), and in some examples, the picture address may also be a storage address of a picture.
S33, registering the attribute information corresponding to the public field to finish database registration operation, and returning the registered identity of the database;
In the embodiment of the present application, since all types of databases are abstracted, the database registered herein can be understood as an abstract database, as shown in fig. 4-a, the registration of the database can be completed only by registering attribute information of a public field input by a user at a client, and the identity information of the registered database is returned to the client, for example: when registering the database A, the attribute information (such as a library name- "construction team personnel registry", picture characteristic values- "a, B, c" picture address- "http:// website.com/images/x.xx") of the public field of the database A is registered, and the identity ID (such as SG 2019001) of the database A is returned, when registering the database B, the attribute information (such as a library name- "certain middle school student registry", picture characteristic value- "2,1" picture address- "http:// website.com/images/y.yy") of the public field of the database B is registered, and the identity ID (such as XS 2019002) of the database B is returned.
In some possible embodiments, after receiving the database registration request sent by the client, the method further comprises:
Reading the database registration request to detect whether a token value exists in the database registration request;
If the attribute information corresponding to the public field does not exist, the step of registering the attribute information corresponding to the public field is not executed, and if the attribute information corresponding to the public field exists, the token value is compared with a token value stored in advance by a database server; the prestored token value is generated by a database server after the user successfully logs in for the first time;
if the token value is the same as the token value stored in the database server in advance, the step of registering the attribute information corresponding to the public field is executed, and if the token value is different from the token value stored in the database server in advance, the step of registering the attribute information corresponding to the public field is not executed.
In this embodiment, after receiving the database registration request sent by the client, the registration operation of the attribute information of the public field of the database is not immediately executed, but the token value is used to verify the client, and the database registration operation is completed only after the verification is passed, which is beneficial to avoiding illegal registration of a non-authorized person.
S34, receiving a plug-in registration request with the identity of the database;
in the specific embodiment of the application, the system, namely the database system, is provided with a unified plug-in registration interface, and all plug-ins are registered by calling the plug-in registration interface, and it is to be noted that, because all database business operations are based on a database unit, the registration identification of the database is a necessary parameter, and in addition, the plug-in registration request can also comprise the plug-ins required to be registered by the specific business function of the database besides the identification of the database.
S35, responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in.
In one possible embodiment, the performing, in response to the plug-in registration request, plug-in registration on the database includes:
And calling the plug-in registration interface to be a plug-in required by the database registration service function based on the identity of the database. In practice, the database server is provided with a plurality of plug-ins, and the user can select the corresponding plug-ins for registration according to the database service type, and in some examples, the plug-ins required for the database service function include at least one of a schema extension plug-in or a value mapping plug-in.
As shown in fig. 4-B, if the registered database needs an extension field, a registration mode extension plug-in is needed, taking the above database a as an example, if the database a needs to store data such as age and gender, a first registration mode extension plug-in is needed to extend fields such as "age and gender" and taking the above database B as an example, if the database B needs to store data such as address and course score, a first registration mode extension plug-in is needed to extend fields such as "address and course number cid". After the mode extension plugin is registered, the identification information generated by the database server for the mode extension plugin is returned to the client, for example: scheme, etc., are not particularly limited.
As shown in fig. 4-c, if the extension field sex of the database a is stored with 0 or 1 when stored, where 0 corresponds to female and 1 corresponds to male, when the user queries the extension field, it is not appropriate to directly display 0 or 1 to the user, and in this case, a registration value mapping plug-in is needed to solve the problem, and after registration is completed, the ID of the plug-in is returned, for example: value, etc.
In the embodiment, a unified plug-in registration interface is called for plug-in registration, so that workload of development and maintenance of staff is reduced, different plug-ins are selected according to different database service types, and the database data service expansion is more flexible.
In one possible implementation manner, before the performing plug-in registration on the database in response to the plug-in registration request, the method further includes:
Obtaining a plug-in required by the database service function from the plug-in registration request; judging whether plug-ins required by the database service function need configuration files or not; and if so, acquiring a configuration file corresponding to the plug-in required by the database service function.
In this embodiment, before the database server performs plug-in registration, it is first determined whether a plug-in required by a database service function needs a configuration file, if not, the plug-in is directly registered, if so, a corresponding configuration file is obtained, and registration is performed according to registration information in the configuration file.
In one possible embodiment, the method further comprises:
Performing field expansion on the database by using the mode expansion plug-in aiming at the special attribute of the data to be inserted, and recording the information of an expansion field;
And if the operation of inquiring or inserting a certain extension field in the database is received, the operation is corresponding to the extension field through the mode extension plug-in, and the value mapping plug-in is utilized to perform value replacement on the data to be inquired or inserted in the extension field according to a preset value mapping relation.
In a specific embodiment of the present application, the specific attribute is different from the attribute of other data, and if the data to be inserted is age data, the mode expansion plug-in is used to expand the age field of the database, and if the data to be inserted is gender data, the mode expansion plug-in is used to expand the gender field of the database, and meanwhile, the mode expansion plug-in records the information of the expansion fields of different databases, for example: database a has an age field, database B has an address field, etc.
In addition, when receiving a query or an insertion request input by a client, the record of the mode expansion plug-in can conveniently route the data to be queried or inserted into the corresponding expansion field, for example: when inquiring the age of Zhang three, the age field can be found through the mode expansion plug-in, when inquiring the gender, the gender sex field can be found through the mode expansion plug-in, and when returning the inquiring result to the client, the value mapping plug-in is utilized to replace the value of part of the expansion field in the database with the value which is convenient for the user to understand according to the preset mapping relation, for example: the value of the sex of Zhang three in the database is 1, and the mapping value of 1 is "man", the value mapping plug-in will replace 1 with "man" for output, and if the client inserts data "man", the value mapping plug-in will replace 1 and store it in the database.
In the embodiment, according to the special attribute of the database data, the mode expansion plug-in is utilized to perform field expansion, when the database needs to be queried or data is inserted, the mode expansion plug-in is more convenient for route searching, and meanwhile, the value mapping plug-in is utilized to perform value replacement, so that the database service processing and expansion can be supported to a greater extent.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a device for implementing a database according to an embodiment of the present application, as shown in fig. 5, the device includes:
A first request receiving module 51, configured to receive a database registration request;
The database registration module 52 is configured to perform a database registration operation according to the database registration request, and return an identity of the registered database;
a second request receiving module 53, configured to receive a plug-in registration request with an identity of the database;
And the plug-in registration module 54 is configured to perform plug-in registration on the database in response to the plug-in registration request, and return the identity of the registered plug-in.
It can be seen that the embodiment of the application receives a database registration request; executing database registration operation according to the database registration request, and returning the registered identity of the database; receiving a plug-in registration request with the identity of the database; and responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in. When various types of databases are needed to be added to the database server, the databases can be successfully registered only by inputting some basic information without registering according to the types of the databases, and the identification information of the databases is obtained, so that the adding flow of the databases is simplified, all database data are stored in the same table and are logically isolated by the identification information, the management work of the databases is greatly simplified, in addition, corresponding plug-ins are selected for registration according to the registered services of the databases, the processing of the services is only related to the types of the plug-ins, and the plug-ins registered by each database are different, so that the expansion of the data service of the databases is more flexible.
Optionally, as shown in fig. 6, the apparatus further includes:
the public field extraction module 55 is configured to abstract all types of databases to extract public fields;
The database registration request comprises attribute information corresponding to the public field; the database registration module 52 includes:
A database registration unit 5201, configured to register attribute information corresponding to the common field in the database.
Optionally, as shown in fig. 7, the system is provided with a unified plug-in registration interface, and the plug-in registration request further includes a plug-in required by the database service function; the plug-in registration module 54 includes:
and the plug-in registration unit 5401 is configured to invoke a plug-in required by the plug-in registration interface to register a service function for the database based on the identity of the database.
Optionally, the plug-ins required for the database service function include at least one of a schema extension plug-in or a value mapping plug-in.
Optionally, as shown in fig. 8, the apparatus further includes:
a field expansion module 56, configured to perform field expansion on the database by using the mode expansion plug-in for a specific attribute of the data to be inserted, and record information of an expansion field;
A field correspondence module 57, configured to, if an operation for querying or inserting an extension field in the database is received, correspond to the extension field through the schema extension plug-in;
and the value replacing module 58 is configured to replace the value of the data to be queried or inserted in the extension field according to a preset value mapping relationship by using the value mapping plug-in.
It should be noted that, each step in the implementation method of the database shown in fig. 2 and fig. 3 may be executed by each unit module in the implementation device of the database provided by the embodiment of the present application, and may achieve the same or similar beneficial effects, for example: steps S21 and S32 may be implemented by the first request receiving module 51 in the implementation device of the database, for example: step S22 may be implemented with the database registration module 52 in the implementation means of the database, step S31 may be implemented with the common field extraction module 55 in the implementation means of the database, etc. It should be noted that, the implementation device of the database provided in the embodiment of the present application may be applied in a scenario of database establishment and maintenance, and in particular, the implementation device of the database may be applied in a server, a computer, or a mobile terminal, etc. capable of performing database establishment and maintenance.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 9, including: a memory 901 for storing one or more computer programs; a processor 902, configured to call a computer program stored in the memory 901 to execute the steps in the implementation method embodiment of the database; a communication interface 903 for input and output, where the communication interface 903 may be one or more; it will be appreciated that the various parts of the electronic device communicate via a bus connection, respectively. The processor 902 is specifically configured to invoke a computer program to perform the following steps:
Receiving a database registration request;
Executing database registration operation according to the database registration request, and returning the registered identity of the database;
Receiving a plug-in registration request with the identity of the database;
And responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in.
It can be seen that the embodiment of the application receives a database registration request; executing database registration operation according to the database registration request, and returning the registered identity of the database; receiving a plug-in registration request with the identity of the database; and responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in. When various types of databases are needed to be added to the database server, the databases can be successfully registered only by inputting some basic information without registering according to the types of the databases, and the identification information of the databases is obtained, so that the adding flow of the databases is simplified, all database data are stored in the same table and are logically isolated by the identification information, the management work of the databases is greatly simplified, in addition, corresponding plug-ins are selected for registration according to the registered services of the databases, the processing of the services is only related to the types of the plug-ins, and the plug-ins registered by each database are different, so that the expansion of the data service of the databases is more flexible.
In one possible implementation, before the database server receives the database registration request sent by the client, the processor 902 is further configured to: abstracting all types of databases to extract common fields; the database registration request comprises attribute information corresponding to the public field; the processor 902 performs the database registration operation according to the database registration request, including: and registering attribute information corresponding to the public fields in the database.
In a possible implementation manner, the system is provided with a unified plug-in registration interface, and the plug-in registration request further comprises a plug-in required by the database service function; processor 902 executes the database server to perform plug-in registration on the database in response to the plug-in registration request, including: and calling the plug-in registration interface to be a plug-in required by the database registration service function based on the identity of the database.
In one possible implementation, the plug-ins required for the database service function include at least one of a schema extension plug-in or a value mapping plug-in.
In one possible implementation, the processor 902 is further configured to: performing field expansion on the database by using the mode expansion plug-in aiming at the special attribute of the data to be inserted, and recording the information of an expansion field;
And if the operation of inquiring or inserting a certain extension field in the database is received, the operation is corresponding to the extension field through the mode extension plug-in, and the value mapping plug-in is utilized to perform value replacement on the data to be inquired or inserted in the extension field according to a preset value mapping relation.
The electronic device may be a computer, a notebook computer, a tablet computer, a palm computer, a server, or the like. The electronic device may include, but is not limited to, a memory 901, a processor 902, a communication interface 903. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of an electronic device and is not limiting of an electronic device, and may include more or fewer components than shown, or certain components may be combined, or different components.
It should be noted that, since the steps in the method for implementing a database are implemented when the processor 902 of the electronic device executes the computer program, the embodiments of the method for implementing a database are all applicable to the electronic device, and all achieve the same or similar beneficial effects.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps in the database implementation method when being executed by a processor.
In particular, the computer program when executed by the processor performs the steps of: receiving a database registration request; executing database registration operation according to the database registration request, and returning the registered identity of the database; receiving a plug-in registration request with the identity of the database; and responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in.
Optionally, the computer program when executed by the processor further implements the steps of: abstracting all types of databases to extract common fields; the database registration request comprises attribute information corresponding to the public field; the computer program when executed by the processor further performs the steps of: and registering attribute information corresponding to the public fields in the database.
Optionally, the system is provided with a unified plug-in registration interface, and the plug-in registration request further comprises a plug-in required by the database service function; the computer program when executed by the processor further performs the steps of: and calling the plug-in registration interface to be a plug-in required by the database registration service function based on the identity of the database.
Optionally, the plug-ins required for the database service function include at least one of a schema extension plug-in or a value mapping plug-in.
Optionally, the computer program when executed by the processor further implements the steps of: performing field expansion on the database by using the mode expansion plug-in aiming at the special attribute of the data to be inserted, and recording the information of an expansion field; and if the operation of inquiring or inserting a certain extension field in the database is received, the operation is corresponding to the extension field through the mode extension plug-in, and the value mapping plug-in is utilized to perform value replacement on the data to be inquired or inserted in the extension field according to a preset value mapping relation.
The computer program of the computer readable storage medium may include, for example, computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
It should be noted that, since the steps in the method for implementing the database are implemented when the computer program of the computer readable storage medium is executed by the processor, all the examples of the method for implementing the database are applicable to the computer readable storage medium, and the same or similar beneficial effects can be achieved.
The foregoing has outlined rather broadly the more detailed description of embodiments of the application, wherein the principles and embodiments of the application are explained in detail using specific examples, the above examples being provided solely to facilitate the understanding of the method and core concepts of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A method for implementing a database, the method comprising:
Receiving a database registration request;
Executing database registration operation according to the database registration request, and returning the registered identity of the database;
Receiving a plug-in registration request with the identity of the database;
responding to the plug-in registration request, carrying out plug-in registration on the database, and returning the identity of the registered plug-in;
the system is provided with a unified plug-in registration interface, and the plug-in registration request also comprises plug-ins required by the database service function; the response to the plug-in registration request carries out plug-in registration on the database, and the method comprises the following steps:
calling the plug-in registration interface to be a plug-in required by the database registration service function based on the identity of the database; wherein each of the database registered plug-ins is different.
2. The method of claim 1, wherein prior to receiving the database registration request, the method further comprises:
Abstracting all types of databases to extract common fields;
the database registration request comprises attribute information corresponding to the public field; the executing database registration operation according to the database registration request includes:
and registering attribute information corresponding to the public fields in the database.
3. The method of claim 1, wherein the plug-ins required for the database business function comprise at least one of a schema extension plug-in or a value mapping plug-in.
4. A method according to claim 3, characterized in that the method further comprises:
Performing field expansion on the database by using the mode expansion plug-in aiming at the special attribute of the data to be inserted, and recording the information of an expansion field;
And if the operation of inquiring or inserting a certain extension field in the database is received, the operation is corresponding to the extension field through the mode extension plug-in, and the value mapping plug-in is utilized to perform value replacement on the data to be inquired or inserted in the extension field according to a preset value mapping relation.
5. An apparatus for implementing a database, the apparatus comprising:
The first request receiving module is used for receiving a database registration request;
the database registration module is used for executing database registration operation according to the database registration request and returning the registered identity of the database;
the second request receiving module is used for receiving a plug-in registration request with the identity of the database;
The plug-in registration module is used for responding to the plug-in registration request, carrying out plug-in registration on the database and returning the identity of the registered plug-in;
The system is provided with a unified plug-in registration interface, and the plug-in registration request also comprises plug-ins required by the database service function; the plug-in registration module comprises:
The plug-in registration unit is used for calling the plug-in registration interface to be a plug-in required by the database registration service function based on the identity of the database; wherein each of the database registered plug-ins is different.
6. The apparatus of claim 5, wherein the apparatus further comprises:
The public field extraction module is used for abstracting all types of databases and extracting public fields;
The database registration request comprises attribute information corresponding to the public field; the database registration module includes:
and the database registration unit is used for registering the attribute information corresponding to the public field in the database.
7. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the method of implementing the database according to any one of claims 1 to 4 when the computer program is executed by the processor.
8. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps in the method of implementing a database according to any of claims 1 to 4.
CN201911180155.7A 2019-11-25 2019-11-25 Database implementation method and device, electronic equipment and storage medium Active CN112835866B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911180155.7A CN112835866B (en) 2019-11-25 2019-11-25 Database implementation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911180155.7A CN112835866B (en) 2019-11-25 2019-11-25 Database implementation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112835866A CN112835866A (en) 2021-05-25
CN112835866B true CN112835866B (en) 2024-07-26

Family

ID=75922914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911180155.7A Active CN112835866B (en) 2019-11-25 2019-11-25 Database implementation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112835866B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523295A (en) * 2011-12-20 2012-06-27 深圳市茁壮网络股份有限公司 Plug-in registration method and system thereof
CN108932309A (en) * 2018-06-15 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Platform database management method, device, computer equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8756329B2 (en) * 2010-09-15 2014-06-17 Oracle International Corporation System and method for parallel multiplexing between servers in a cluster
US20120101829A1 (en) * 2010-10-22 2012-04-26 International Business Machines Corporation Wholesale device registration system, method, and program product
CN103686747B (en) * 2012-09-21 2018-10-12 中兴通讯股份有限公司 A kind of method and apparatus that subsystem is registered in the database and system
CN104363279B (en) * 2014-11-13 2018-01-23 北京京东尚科信息技术有限公司 The method and system of service is provided
CN105162785B (en) * 2015-09-07 2019-01-04 飞天诚信科技股份有限公司 A kind of method and apparatus registered based on authenticating device
CN105391695B (en) * 2015-10-20 2018-12-14 山东泰信电子股份有限公司 A kind of terminal registration method and method of calibration
CN105391696B (en) * 2015-10-20 2019-01-25 山东泰信电子股份有限公司 Endpoint to register, method of calibration and endpoint to register, check system
CN106202309B (en) * 2016-07-01 2019-12-13 薛瑞斌 multi-tenant data query method and system and sharing platform server
CN109327535B (en) * 2018-11-09 2022-02-22 郑州云海信息技术有限公司 Database access method, system, middleware equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523295A (en) * 2011-12-20 2012-06-27 深圳市茁壮网络股份有限公司 Plug-in registration method and system thereof
CN108932309A (en) * 2018-06-15 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Platform database management method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112835866A (en) 2021-05-25

Similar Documents

Publication Publication Date Title
CN108846753B (en) Method and apparatus for processing data
CN108282527B (en) Generate the distributed system and method for Service Instance
CN108093026B (en) Method and device for processing multi-tenant request
CN110413595B (en) Data migration method applied to distributed database and related device
CN111427613B (en) Application program interface API management method and device
CN110119294A (en) The generation method of menu page, apparatus and system
CN111339171B (en) Data query method, device and equipment
CN112579118B (en) Method, device, system, medium and equipment for updating configuration information of micro-service
CN111737443B (en) Answer text processing method and device and key text determining method
CN110674427B (en) Method, device, equipment and storage medium for responding to webpage access request
CN110297995B (en) Method and device for collecting information
CN112925757A (en) Method, equipment and storage medium for tracking operation log of intelligent equipment
CN109947759A (en) A kind of data directory method for building up, indexed search method and device
CN111177481B (en) User identifier mapping method and device
CN110046155A (en) The update of property data base, data characteristics determination method, device and equipment
CN105872635A (en) Video resource distribution method and device
CN105847320A (en) Resource obtaining method and device
CN112579877B (en) Control method, device, storage medium and equipment of information source system
CN111125226B (en) Configuration data acquisition method and device
CN112835866B (en) Database implementation method and device, electronic equipment and storage medium
CN113010588A (en) Data table processing method
CN110737662A (en) data analysis method, device, server and computer storage medium
CN112783842A (en) Log collection method and device
CN103220327B (en) user information storage method and device
CN117009430A (en) Data management method, device, storage medium and electronic equipment

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