CN112835866A - 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
CN112835866A
CN112835866A CN201911180155.7A CN201911180155A CN112835866A CN 112835866 A CN112835866 A CN 112835866A CN 201911180155 A CN201911180155 A CN 201911180155A CN 112835866 A CN112835866 A CN 112835866A
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.)
Pending
Application number
CN201911180155.7A
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.)
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/CN112835866A/en
Publication of CN112835866A publication Critical patent/CN112835866A/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/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 database implementation method, a database implementation device, electronic equipment and a storage medium, 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 identity of the registered database; receiving a plug-in registration request with the identity of the database; responding to the plug-in registration request, performing 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 supports the data service expansion of the database.

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 an apparatus for implementing a database, an electronic device, and a storage medium.
Background
With the development of visual intelligence, there have been many applications based on visual intelligence technology, and it is well known that basic data of a visual intelligence application or analysis system is composed of a large amount of picture structured data, and the data is stored in the form of a database. Depending on the data content and the use, many types of libraries are often required, such as: a dynamic library for storing the camera snapshot picture set and a static library for storing the certificate photo set. With the continuous expansion of library types, each library needs to maintain a set of service basic capability interfaces, which undoubtedly increases the development work of developers, has low reuse rate for some common features among different types of databases, and does not talk about centralized management. In some improved schemes, data of all databases are stored in the same table, logical isolation is performed based on type fields, and different fields of different data are all added in the same table, so that development workload of common characteristics of different databases is reduced to a certain extent.
Disclosure of Invention
In view of the above problems, the present application provides a method and an apparatus for implementing a database, an electronic device, and a storage medium, which are beneficial to simplifying the management work of the database and flexibly support the expansion of database data services.
In order to achieve the above object, a first aspect of the embodiments of the present application provides a method for implementing a database, where the method includes:
receiving a database registration request;
executing database registration operation according to the database registration request, and returning the identity of the registered database;
receiving a plug-in registration request with the identity of the database;
responding to the plug-in registration request, performing 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, and extracting public fields;
the database registration request comprises attribute information corresponding to the public field; the performing a database registration operation according to the database registration request includes:
and registering attribute information corresponding to the public fields in the database. .
In one possible implementation mode, the system is provided with a uniform plug-in registration interface, and the plug-in registration request further comprises plug-ins required by the database service function; the responding to the plug-in registration request, and the plug-in registration of the database comprises:
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 embodiment, the plug-in required by the database service function includes 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 extension on the database by using the mode extension plug-in unit according to the specific attribute of the data to be inserted, and recording the information of an extension field;
and if receiving an operation of inquiring or inserting a certain expansion field in the database, corresponding the expansion field to the expansion field through the mode expansion plug-in, and performing value replacement on the data to be inquired or inserted in the expansion field by using the value mapping plug-in according to a preset value mapping relation.
A second aspect of the embodiments of the present application provides an apparatus for implementing 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 identity identifier of the registered database;
the second request receiving module is used for receiving a plug-in registration request with the identity identifier of the database;
and the plug-in registration module is used for responding to the plug-in registration request, performing plug-in registration on the database and returning the identity of the registered plug-in.
A third aspect of embodiments of the present application provides an electronic device, including: the database implementation method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the steps of the database implementation method.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps in the implementation method of the database described above.
The above scheme of the present application includes at least the following beneficial effects: receiving a database registration request sent by a client; then, executing database registration operation according to the database registration request, and returning the identity identifier of the registered 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, performing plug-in registration on the database, and returning the identity of the registered plug-in to the client. In addition, corresponding plug-ins are selected to register according to the registered database service, the service processing is only related to the types of the plug-ins, the plug-ins registered in each database are different, and the expansion of the database data service is more flexible.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an application architecture provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for implementing a database according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another database implementation method provided in the embodiment of the present application;
FIG. 4-a is a diagram illustrating an example of a database registration process provided by an embodiment of the present application;
4-b is a diagram illustrating an example of registration of a plug-in provided by an embodiment of the present application;
4-c are diagrams of registration examples of another plug-in provided by embodiments of the present application;
fig. 5 is a schematic structural diagram of an apparatus for implementing a database according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another database implementation apparatus provided in the embodiment of the present application;
fig. 7 is a schematic structural diagram of another database implementation apparatus provided in the embodiment of the present application;
fig. 8 is a schematic structural diagram of another database implementation apparatus provided in the 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 to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "comprising" and "having," and any variations thereof, as appearing in the specification, claims and drawings of this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively 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 to distinguish between different objects and are not used to describe a particular order.
First, a network system architecture to which the solution of the embodiments of the present application may be applied will be 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, including a database server and a client, where the client is an application program and is installed on a terminal of a user, the terminal of the user may be a laptop, a tablet, a desktop, or a notebook, 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 an input from a user and send various requests to the database server, for example: the data processing method comprises the steps of receiving a data query request, a data insertion request, a data deletion request and the like, and receiving various information returned by a database server; the database server may provide some common resources such as: the system comprises a plug-in library or a plug-in registration framework developed by a developer, and can generate configuration files and the like for the plug-ins, and when requests sent by a user through a client are received, relevant operations (such as plug-in registration) are carried out in response to the requests, and certain operation results (such as data query results) are returned to the client. In some examples, the database server may be a local server or a cloud server; the server can be a single server or a server cluster; the virtual machine may be a physical machine or a virtual machine, and is not limited specifically. Based on the application architecture shown in fig. 1, the following describes in detail a method for implementing a database provided in the embodiment of the present application with reference to other drawings.
Referring to fig. 2, fig. 2 is a schematic 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 the database registration request.
In an embodiment of the present application, the database server may include a Transmission Control Protocol (TCP) interface, a HyperText Transfer Protocol (HTTP) interface, or a User Datagram Protocol (UDP) interface. The database registration request refers to a request for adding a database, which is sent to a database server by a user through a client under the condition that the system needs to add the database, the database can be a picture library or other databases, or can refer to a database instance, the database registration request can be sent in a control triggering mode, or can be sent in a program code mode, and specifically, a TCP protocol, an HTTP protocol, or a UDP protocol can be adopted.
And S22, the database server executes database registration operation according to the database registration request and returns the identity of the registered database.
In the embodiment of the application, the database server performs database registration when receiving a database registration request sent by a client, returns an Identity (Identity, ID) of the registered database to the client after the database registration is successful, logically isolates different types of databases (such as a dynamic database and a static database) by using the Identity, stores all data in the same table, and fully utilizes the storage space of the database. Specifically, the identity here may be generated by the database server after the database registration is successful, or may be selected by the database server from an identity library.
S23, the database server receives the plug-in registration request with the identity of the database.
In the embodiment of the present application, the plug-in is a program written by an application program interface conforming to a certain specification, and can only run under a system platform specified by the program. After the client receives the identity identifier of the database returned by the database server, the user sends a plug-in registration request to the database server through the client, and because each database has differences and the services to be processed by each database are different, the plug-ins registered by each database are different, such as: when a plug-in registration request is sent, an identity identifier of a database should be carried in the plug-in registration request, so that a database server can accurately register a plug-in to be registered in 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 plug-in registration request, the database server first reads and analyzes the request to obtain the identification information of the database, then finds the corresponding database based on the identification information to perform plug-in registration, and after the plug-in registration is successful, returns the identity of the registered plug-in to the client, so that a user can call the corresponding plug-in according to the identity of the plug-in to perform service processing when performing a relevant service of the database, for example: when the data to be inserted into the database contains the address information of the target object, the 'address' field needs to be expanded, and the mode expansion plug-in can be called according to the identity of the mode expansion plug-in to expand the field.
Compared with the prior art, the method and the device have the advantages that the database registration request sent by the client is received; then, executing database registration operation according to the database registration request, and returning the identity identifier of the registered 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, performing plug-in registration on the database, and returning the identity of the registered plug-in to the client. In addition, corresponding plug-ins are selected to register according to the registered database service, the service processing is only related to the types of the plug-ins, the plug-ins registered in each database are different, and the expansion of the database data service is more flexible.
Referring to fig. 3, fig. 3 is a schematic flowchart of another database implementation method according to an embodiment of the present application, and as shown in fig. 3, the method includes the steps of:
s31, abstracting all types of databases and extracting public fields;
in the embodiment of the present application, since all types of databases, such as the dynamic library and the static library in the photo library, have some common fields, for example: the public fields do not need to distinguish database types, so that the databases of all types can be abstracted first, and the public fields can be extracted.
S32, receiving a database registration request; the database registration request comprises attribute information corresponding to the public field;
in the 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 an extracted public field includes: the library name. The database registration request may include attribute information of the public fields, such as a picture feature value and a picture address: library name- "cell resident register", picture feature value- "2, 3, 4" picture address- "http:// web. Of course, the picture address here is an access address in a picture URL (Uniform Resource Locator) format, and in some examples, the picture address may also be a storage address of the picture.
S33, registering the attribute information corresponding to the public field to complete the database registration operation, and returning the identity of the registered database;
in the specific embodiment of the present application, since all types of databases are abstracted, the database registered here can be understood as an abstract database, as shown in fig. 4-a, only the attribute information of the public field input by the user at the client needs to be registered, so that the registration of the database can be completed, and the identity information of the registered database is returned to the client, for example: when registering the database a, registering attribute information of a common field of the database a (such as a library name- "a construction team personnel registry", and a picture characteristic value- "a, B, c" picture address- "http:// website. com/images/x.xx") and returning an identification ID of the database a (such as SG2019001), and when registering the database B, registering attribute information of a common attribute field of the database B (such as a library name- "a middle school student registry", and a picture characteristic value- "2, 1" picture address- "http:// website. com/images/y.yy") and returning an identification ID of the database B (such as XS 2019002).
In some possible embodiments, after receiving the database registration request sent by the client, the method further includes:
reading the database registration request to detect whether a token value exists in the database registration request;
if the token value does not exist, the step of registering the attribute information corresponding to the public field is not executed, and if the token value exists, the token value is compared with a token value prestored in a database server; the pre-stored token value is generated by the database server after the user successfully logs in for the first time;
and if the token value is the same as the token value prestored by the database server, executing the step of registering the attribute information corresponding to the public field, and if the token value is different from the token value prestored by the database server, not executing the step of registering the attribute information corresponding to the public field.
In the embodiment, after receiving a database registration request sent by a 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 for verifying the client, and the database registration operation is completed only after the verification is passed, so that the illegal registration of a person without an authority is avoided.
S34, receiving a plug-in registration request with the identity of the database;
in the embodiment of the present application, a system, that is, a database system, is provided with a uniform plug-in registration interface, and the registration of all plug-ins needs to call the plug-in registration interface, it should be noted that, since all database business operations are based on a database as a unit, a registration identifier of the database is a necessary parameter, and in addition, a plug-in registration request may include a plug-in required to be registered for a specific business function of the database in addition to an identity identifier of the database.
S35, responding to the plug-in registration request, performing plug-in registration on the database, and returning the identity of the registered plug-in.
In one possible embodiment, said performing a plug-in registration on said database in response to said plug-in registration request comprises:
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 corresponding plug-ins for registration according to the database service type, and in some examples, the plug-ins required by the database service function comprise at least one of a mode extension plug-in or a value mapping plug-in.
As shown in fig. 4-B, if the registered database needs to expand the field, a pattern expansion plug-in needs to be registered, taking the database a as an example, if the database a needs to store data such as age and gender, a pattern expansion plug-in needs to be registered first, and fields such as "age", gender sex "need to be expanded, taking the database B as an example, if the database B needs to store data such as address and course score, a pattern expansion plug-in needs to be registered first, and fields such as" address ", and" course number cid "need to be expanded. After the mode extension plug-in is registered, the identification information generated by the database server for the mode extension plug-in is returned to the client, for example: schema and the like, and are not particularly limited.
As shown in fig. 4-c, if the database a extension field sex is stored as 0 or 1, where 0 corresponds to female and 1 corresponds to male, when the user queries the extension field, it is not appropriate to directly show 0 or 1 to the user, at this time, a registration value mapping plug-in is needed to solve the problem, and after the registration is completed, the ID of the plug-in is returned, for example: value, etc.
In the embodiment, the unified plugin registration interface is called to register the plugin, so that the workload of development and maintenance of workers is reduced, and different plugins are selected according to different database service types, so that the database data service expansion is more flexible.
In one possible embodiment, before said registering the plug-in to the database in response to the plug-in registration request, the method further comprises:
acquiring a plug-in required by the database service function from the plug-in registration request; judging whether the plug-in required by the database service function needs a configuration file or not; and if so, acquiring a configuration file corresponding to the plug-in required by the database service function.
In the embodiment, before the database server performs plug-in registration, whether the plug-in required by the database service function needs a configuration file is judged, if not, the plug-in is directly registered, if so, the corresponding configuration file is acquired, and the registration is performed according to the registration information in the configuration file.
In one possible embodiment, the method further comprises:
performing field extension on the database by using the mode extension plug-in unit according to the specific attribute of the data to be inserted, and recording the information of an extension field;
and if receiving an operation of inquiring or inserting a certain expansion field in the database, corresponding the expansion field to the expansion field through the mode expansion plug-in, and performing value replacement on the data to be inquired or inserted in the expansion field by using the value mapping plug-in according to a preset value mapping relation.
In the embodiment of the present application, the specific attribute is an attribute different from other data, and when the schema extension plug-in is registered in the database, if the data to be inserted is age data, the schema extension plug-in is used to extend an age field for the database, and if the data to be inserted is gender data, the schema extension plug-in is used to extend a gender field for the database, and meanwhile, the schema extension plug-in records information of extension fields of different databases, for example: database a has an age field, database B has an address field, etc.
In addition, when a query or insertion request input by a client is received, data to be queried or inserted can be conveniently mapped to a corresponding extension field by the record of the mode extension plug-in, for example: when the age of Zhang III is inquired, the age field can be found through the schema extension plug-in, when the gender of Zhang III is inquired, the gender sex field can be found through the schema extension plug-in, and meanwhile, when the inquiry result is returned to the client, the value of part of the extension field in the database is replaced by the value which is convenient for the user to understand according to the preset mapping relation by using the value mapping plug-in, for example: if the value of the gender of Zhang III in the database is 1 and the mapping value of 1 is "male", the value mapping plug-in will replace 1 with "male" for output, and if the data inserted by the client is "male", the value mapping plug-in will replace 1 with 1 and store in the database.
In the embodiment, the field is expanded by using the mode expansion plug-in according to the special attribute of the database data, when the database needs to inquire or insert data, the mode expansion plug-in is more convenient for route searching, and meanwhile, the value mapping plug-in is used for 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 an apparatus for implementing a database according to an embodiment of the present application, and as shown in fig. 5, the apparatus 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 an identity of the registered plug-in.
It can be seen that, in the embodiment of the present application, a database registration request is received; executing database registration operation according to the database registration request, and returning the identity of the registered database; receiving a plug-in registration request with the identity of the database; responding to the plug-in registration request, performing plug-in registration on the database, and returning the identity of the registered plug-in. In addition, corresponding plug-ins are selected to register according to the registered database service, the service processing is only related to the types of the plug-ins, the plug-ins registered in each database are different, and the expansion of the database data service is more flexible.
Optionally, as shown in fig. 6, the apparatus further includes:
a common field extraction module 55, configured to abstract all types of databases to extract common fields;
the database registration request comprises attribute information corresponding to the public field; the database registration module 52 includes:
a database registration unit 5201 is 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 uniform 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 a plug-in registration unit 5401, configured to call 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-in required by the database service function includes 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 extension module 56, configured to perform field extension on the database by using the mode extension plug-in for the specific attribute of the data to be inserted, and record information of an extension field;
a field corresponding module 57, configured to, if an operation of querying or inserting a certain extended field in the database is received, correspond to the extended field through the mode extension plug-in;
and a value replacement module 58, configured to replace, by using the value mapping plugin, the value of the data to be queried or to be inserted in the extension field according to the preset value mapping relationship.
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 apparatus of the database provided in the embodiment of the present application, and the same or similar beneficial effects may be achieved, for example: steps S21 and S32 may be implemented by the first request receiving module 51 in the database implementation apparatus, for example: step S22 may be implemented by the database registration module 52 in the database implementation apparatus, step S31 may be implemented by the common field extraction module 55 in the database implementation apparatus, and so on. It should be noted that the apparatus for implementing a database provided in the embodiment of the present application can be applied to a scenario of database establishment and maintenance, and specifically, the apparatus for implementing a database can be applied to a server, a computer, a mobile terminal, or other devices 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 invoke a computer program stored in the memory 901 to execute the steps in the embodiment of the database implementation method described above; a communication interface 903 for input and output, wherein the communication interface 903 may be one or more; it will be appreciated that the various parts of the electronic device communicate via respective bus connections. The processor 902 is specifically configured to invoke a computer program to execute the following steps:
receiving a database registration request;
executing database registration operation according to the database registration request, and returning the identity of the registered database;
receiving a plug-in registration request with the identity of the database;
responding to the plug-in registration request, performing plug-in registration on the database, and returning the identity of the registered plug-in.
It can be seen that, in the embodiment of the present application, a database registration request is received; executing database registration operation according to the database registration request, and returning the identity of the registered database; receiving a plug-in registration request with the identity of the database; responding to the plug-in registration request, performing plug-in registration on the database, and returning the identity of the registered plug-in. In addition, corresponding plug-ins are selected to register according to the registered database service, the service processing is only related to the types of the plug-ins, the plug-ins registered in each database are different, and the expansion of the database data service is more flexible.
In a 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, and extracting public 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 one possible implementation mode, the system is provided with a uniform plug-in registration interface, and the plug-in registration request further comprises plug-ins required by the database service function; the processor 902 executes the database server to perform a plug-in registration for 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 embodiment, the plug-in required by the database service function includes 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 extension on the database by using the mode extension plug-in unit according to the specific attribute of the data to be inserted, and recording the information of an extension field;
and if receiving an operation of inquiring or inserting a certain expansion field in the database, corresponding the expansion field to the expansion field through the mode expansion plug-in, and performing value replacement on the data to be inquired or inserted in the expansion field by using the value mapping plug-in according to a preset value mapping relation.
Illustratively, the electronic device may be a computer, a notebook computer, a tablet computer, a palm computer, a server, or the like. Electronic devices may include, but are not limited to, memory 901, processor 902, communication interface 903. It will be appreciated by those skilled in the art that the schematic diagrams are merely examples of an electronic device and are not limiting of an electronic device and may include more or fewer components than those shown, or some components in combination, or different components.
It should be noted that, since the processor 902 of the electronic device executes the computer program to implement the steps in the database implementation method, the embodiments of the database implementation method are all applicable to the electronic device, and all can achieve the same or similar beneficial effects.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the database implementation method described above.
In particular, the computer program when executed by the processor implements the steps of: receiving a database registration request; executing database registration operation according to the database registration request, and returning the identity of the registered database; receiving a plug-in registration request with the identity of the database; responding to the plug-in registration request, performing 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, and extracting public fields; the database registration request comprises attribute information corresponding to the public field; the computer program when executed by the processor further implements the steps of: and registering attribute information corresponding to the public fields in the database.
Optionally, the system is provided with a uniform plug-in registration interface, and the plug-in registration request further includes a plug-in required by the database service function; the computer program when executed by the processor further implements 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-in required by the database service function includes 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 extension on the database by using the mode extension plug-in unit according to the specific attribute of the data to be inserted, and recording the information of an extension field; and if receiving an operation of inquiring or inserting a certain expansion field in the database, corresponding the expansion field to the expansion field through the mode expansion plug-in, and performing value replacement on the data to be inquired or inserted in the expansion field by using the value mapping plug-in according to a preset value mapping relation.
Illustratively, the computer program of the computer-readable storage medium comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
It should be noted that, since the computer program of the computer-readable storage medium is executed by the processor to implement the steps in the database implementation method, all the examples of the database implementation method are applicable to the computer-readable storage medium, and can achieve the same or similar beneficial effects.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

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 identity of the registered database;
receiving a plug-in registration request with the identity of the database;
responding to the plug-in registration request, performing plug-in registration on the database, and returning the identity of the registered plug-in.
2. The method of claim 1, wherein prior to receiving the database registration request, the method further comprises:
abstracting all types of databases, and extracting public fields;
the database registration request comprises attribute information corresponding to the public field; the performing a 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 system is provided with a unified plug-in registration interface, wherein the plug-in registration request further comprises a plug-in required by the database service function; the responding to the plug-in registration request, and the plug-in registration of the database comprises:
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.
4. The method of claim 3, wherein the plug-ins required for the database service function include at least one of schema extension plug-ins or value mapping plug-ins.
5. The method of claim 4, further comprising:
performing field extension on the database by using the mode extension plug-in unit according to the specific attribute of the data to be inserted, and recording the information of an extension field;
and if receiving an operation of inquiring or inserting a certain expansion field in the database, corresponding the expansion field to the expansion field through the mode expansion plug-in, and performing value replacement on the data to be inquired or inserted in the expansion field by using the value mapping plug-in according to a preset value mapping relation.
6. 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 identity identifier of the registered database;
the second request receiving module is used for receiving a plug-in registration request with the identity identifier of the database;
and the plug-in registration module is used for responding to the plug-in registration request, performing plug-in registration on the database and returning the identity of the registered plug-in.
7. The apparatus of claim 6, further comprising:
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 comprises:
and the database registration unit is used for registering the attribute information corresponding to the public field in the database.
8. The apparatus of claim 6, wherein the system provides a unified plug-in registration interface, and the plug-in registration request further comprises a plug-in required by the database service function; the plug-in registration module comprises:
and 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.
9. An electronic device, comprising a processor, a memory and a computer program stored on the memory and operable on the processor, wherein the processor implements the steps of the database implementation method according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, implements the steps in the method for implementing a database according to any one of claims 1 to 5.
CN201911180155.7A 2019-11-25 2019-11-25 Database implementation method and device, electronic equipment and storage medium Pending CN112835866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911180155.7A CN112835866A (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 CN112835866A (en) 2019-11-25 2019-11-25 Database implementation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112835866A true CN112835866A (en) 2021-05-25

Family

ID=75922914

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112835866A (en)

Citations (4)

* 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
CN103124967A (en) * 2010-09-15 2013-05-29 甲骨文国际公司 System and method for connecting an application server with a clustered database
CN105391695A (en) * 2015-10-20 2016-03-09 山东泰信电子股份有限公司 Terminal registration method and verification method
CN108932309A (en) * 2018-06-15 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Platform database management method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103124967A (en) * 2010-09-15 2013-05-29 甲骨文国际公司 System and method for connecting an application server with a clustered database
CN102523295A (en) * 2011-12-20 2012-06-27 深圳市茁壮网络股份有限公司 Plug-in registration method and system thereof
CN105391695A (en) * 2015-10-20 2016-03-09 山东泰信电子股份有限公司 Terminal registration method and verification method
CN108932309A (en) * 2018-06-15 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Platform database management method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108846753B (en) Method and apparatus for processing data
CN110659206B (en) Simulation architecture establishment method and device based on micro-service, medium and electronic equipment
CN110413595B (en) Data migration method applied to distributed database and related device
CN111339171B (en) Data query method, device and equipment
CN110213234B (en) Application program file developer identification method, device, equipment and storage medium
CN109815112B (en) Data debugging method and device based on functional test and terminal equipment
CN111324510B (en) Log processing method and device and electronic equipment
CN111353136B (en) Method and device for processing operation request
CN111427613B (en) Application program interface API management method and device
CN111367945A (en) Report query method, device, equipment and computer readable storage medium
CN113111669B (en) Increment-based front-end multi-language internationalized translation method and device
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium
CN112579118A (en) Method, device, system, medium and equipment for updating configuration information of microservice
CN111200645B (en) Service request processing method, device, equipment and readable storage medium
CN111125226A (en) Configuration data acquisition method and device
CN112835866A (en) Database implementation method and device, electronic equipment and storage medium
US11768889B1 (en) Evaluating configuration files for uniform resource indicator discovery
CN117009430A (en) Data management method, device, storage medium and electronic equipment
CN110781191B (en) Processing method of layout data and server
CN114489603A (en) Code generation method, apparatus, electronic device, medium, and product
CN112000313A (en) Request response method, device, equipment and storage medium
WO2020006930A1 (en) Data forgery method and apparatus, and computer storage medium
CN104980329A (en) Address book management method address book management device and mobile agent server
CN110737662A (en) data analysis method, device, server and computer storage medium
CN109032655A (en) A kind of configuration method, server and computer readable storage medium monitoring example

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