CN117389996B - Database optimization suggestion generation method, terminal equipment and storage medium - Google Patents

Database optimization suggestion generation method, terminal equipment and storage medium Download PDF

Info

Publication number
CN117389996B
CN117389996B CN202311685706.1A CN202311685706A CN117389996B CN 117389996 B CN117389996 B CN 117389996B CN 202311685706 A CN202311685706 A CN 202311685706A CN 117389996 B CN117389996 B CN 117389996B
Authority
CN
China
Prior art keywords
database
target
optimization suggestion
principle
configuration interface
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
CN202311685706.1A
Other languages
Chinese (zh)
Other versions
CN117389996A (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 Everything Safety Technology Co ltd
Original Assignee
Shenzhen Everything Safety Technology 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 Everything Safety Technology Co ltd filed Critical Shenzhen Everything Safety Technology Co ltd
Priority to CN202311685706.1A priority Critical patent/CN117389996B/en
Publication of CN117389996A publication Critical patent/CN117389996A/en
Application granted granted Critical
Publication of CN117389996B publication Critical patent/CN117389996B/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/217Database tuning

Abstract

The application discloses a database optimization suggestion generation method, terminal equipment and a storage medium, wherein the method comprises the following steps: outputting a configuration interface and receiving database connection parameters based on the configuration interface; acquiring database structure information of a target database according to the connection parameters; and acquiring a standard database principle, and generating a database optimization suggestion of the target database according to a comparison result of the standard database principle and the database structure information. The method solves the technical problem that the rules of the manual detection database are omitted, so that the designed database deviates from the actual database, and can automatically detect the rules of the database and generate database optimization suggestions.

Description

Database optimization suggestion generation method, terminal equipment and storage medium
Technical Field
The present disclosure relates to the field of database technologies, and in particular, to a method for generating database optimization suggestions, a terminal device, and a storage medium.
Background
A database is a repository that organizes, stores, and manages data according to a data structure. In the process of designing a database, the design specification of the database needs to be determined firstly to limit the format, the length and the like of data stored in the database, and the currently commonly used design specification of the database comprises consistency, integrity, safety, expandability, three major forms and the like.
In the related database rule design scheme, default rules are generally used first, and then the design rules of the database are detected and adjusted in an artificial mode so that the database meets the storage requirements of various data. Because the rules of the detection database are omitted in a manual detection mode, the designed database deviates from the actual database, and the database design is not completely executed according to the established database design specification.
The foregoing is merely provided to facilitate an understanding of the principles of the present application and is not admitted to be prior art.
Disclosure of Invention
The application provides a database optimization suggestion generation method, terminal equipment and a storage medium, and aims to solve the technical problem that rules for manually detecting a database are omitted, so that the designed database deviates from the actual database.
In order to achieve the above object, the present application provides a database optimization suggestion generation method, which includes the following steps:
outputting a configuration interface and receiving database connection parameters based on the configuration interface;
acquiring database structure information of a target database according to the connection parameters;
and acquiring a standard database principle, and generating a database optimization suggestion of the target database according to a comparison result of the standard database principle and the database structure information.
Optionally, the step of obtaining the standard database principle and generating the database optimization suggestion of the target database according to the comparison result of the standard database principle and the database structure information includes:
acquiring the standard database principle;
when the database structure information is not matched with the standard database principle, determining a data table which is not matched with the standard database principle in the target database and a target database principle which corresponds to the data table in the standard database principle;
and generating the database optimization suggestion according to the data table and the target database principle.
Optionally, after the step of generating the database optimization suggestion according to the data table and the target database principle, the method further includes:
outputting the configuration interface, wherein the configuration interface comprises an optimization suggestion selection box;
responding to the operation action of the optimization suggestion selection frame, and acquiring a corresponding target optimization suggestion;
and acquiring the database structure information of the target database, and modifying the database structure information according to the target optimization suggestion to generate a target database dictionary.
Optionally, after the step of obtaining the database structure information of the target database and modifying the database structure information according to the target optimization suggestion to generate a target database dictionary, the method further includes:
outputting the configuration interface, wherein the configuration interface comprises a result display frame and a confirmed downloading control;
displaying links corresponding to the database dictionary in the result display frame;
and when the confirmation downloading control is triggered, acquiring the database dictionary according to the link so as to enable the database dictionary to be fed back to the client.
Optionally, before the step of outputting the configuration interface and receiving the database connection parameters based on the configuration interface, the method further includes:
outputting the configuration interface, wherein the configuration interface comprises a database principle setting frame and a confirmation control;
receiving a corresponding standard database principle in response to the operation action of the database principle setting frame;
and when the confirmation control is triggered, storing the standard database principle.
Optionally, the step of receiving the corresponding standard database rule in response to the operation action of the database rule setting frame includes:
acquiring initial design information of a database;
receiving customized database design information based on the database principle setting frame, and generating the standard database principle according to the database initial design information and the customized database design information;
and rendering the standard database setting rules to the database rule setting frame so that the client side stores the standard database rules.
Optionally, the step of outputting a configuration interface and receiving database connection parameters based on the configuration interface includes:
outputting the configuration interface, wherein the configuration interface comprises a parameter input box;
and receiving the database connection parameters in response to the operation action of the parameter input box, wherein the database connection parameters are used for connecting with a target database.
Optionally, the step of obtaining the database structure information of the target database according to the database connection parameter includes:
outputting the configuration interface, wherein the configuration interface comprises an acquisition control;
acquiring the database connection parameters received based on the configuration interface;
querying the target database based on the database connection parameters and associating with the target database;
and when the acquisition control is triggered, acquiring the database structure information of the target database.
In addition, to achieve the above object, the present application further provides a terminal device, including: a memory, a processor and a system program of a database optimization suggestion generation method stored on the memory and executable on the processor, the system program of the database optimization suggestion generation method being executed by the processor to implement the steps of the database optimization suggestion generation method as described above.
In addition, in order to achieve the above object, the present application also provides a storage medium having stored thereon a system program of a database optimization suggestion generation method, the system program of the database optimization suggestion generation method being executed by a processor to implement the steps of the database optimization suggestion generation method as described above.
The application provides a database optimization suggestion generation method, terminal equipment and a storage medium, wherein a configuration interface is output, and database connection parameters are received based on the configuration interface; acquiring database structure information of a target database according to the connection parameters; and finally, acquiring a standard database principle, and generating a database optimization suggestion of the target database according to a comparison result of the standard database principle and the database structure information. The appointed target database can be connected through the input connection parameters, so that database structure information of the appointed target database is compared with the standard database principle established before, and a database optimization suggestion is generated according to the comparison result, and therefore the technical effects of automatically detecting rules of the database and generating the database optimization suggestion are achieved.
Drawings
FIG. 1 is a flow chart of a first embodiment of a database optimization suggestion generation method of the present application;
FIG. 2 is an interface schematic diagram of a configuration interface according to an embodiment of the present application;
FIG. 3 is a flow chart of a second embodiment of a database optimization suggestion generation method of the present application;
FIG. 4 is a flow chart of a third embodiment of a database optimization suggestion generation method of the present application;
fig. 5 is a schematic architecture diagram of a hardware operating environment of a terminal device according to an embodiment of the present application;
the achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
According to the database optimization suggestion generation method, a configuration interface is output, and database connection parameters are received based on the configuration interface; acquiring database structure information of a target database according to the connection parameters; and acquiring a standard database principle, and generating a database optimization suggestion of the target database according to a comparison result of the standard database principle and the database structure information. The technical problem that the rules of manual detection of the database are omitted, so that the designed database deviates from the actual database is solved.
In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example 1
Referring to fig. 1, in a first embodiment, the database optimization suggestion generation method includes the following steps:
step S10: and outputting a configuration interface and receiving database connection parameters based on the configuration interface.
In this embodiment, the processing action is executed by the background server, where the background server may be set in the remote service or the local server, and of course, may also be set in the terminal device. In a scenario of processing based on the non-terminal itself, the background server may send the configuration interface to the terminal device, and may allow the terminal device to render and display the configuration interface based on the rendering information. After the terminal displays the configuration interface, the user can operate on the configuration interface based on the input means of the terminal device. When the user inputs the database connection parameters in the configuration interface, the front end of the interface feeds the input database connection parameters back to the background server, so that the background server can acquire the database connection parameters input by the user.
The background server is arranged on the terminal equipment, and the terminal equipment can directly perform configuration interface rendering and output based on the rendering information of the data storage area. Thereby receiving the database connection parameters entered by the user based on the configuration interface. The database connection parameters mentioned in this embodiment may include the IP address, port number, database name, user name, password, etc. of the database.
As an alternative implementation manner, when designing the configuration interface, the front end and the rear end of the configuration interface may be separated in a B/S (Browser/Server) mode, so that the front end is only responsible for displaying the interface, and the rear end is responsible for receiving and processing the data. The B/S structure is a network structure mode after WEB is raised, and the WEB browser is the most main application software of the client. The mode unifies the client, concentrates the core part of system function realization on the server, and simplifies the development, maintenance and use of the system. The client only needs to install a browser, such as Chrome, safari, microsoft Edge, netscape Navigator or Internet Explorer, the Server installs SQL Server, oracle, MYSQL and other databases, and the browser can interact data with the databases through the Web Server.
Optionally, in this embodiment, the step S10 includes:
outputting the configuration interface, wherein the configuration interface comprises a parameter input box; and receiving the database connection parameters in response to the operation action of the parameter input box, wherein the database connection parameters are used for connecting with a target database.
Specifically, the user may input the database connection parameter in a parameter input box in the configuration interface based on an input device of the terminal device, and when the background server detects the database connection parameter fed back by the configuration interface, the database connection parameter is automatically received, where the database connection parameter includes connection information and authentication information that can connect to a corresponding target database.
As an alternative embodiment, the user may also import a corresponding file in the parameter input box based on the input device of the terminal device, wherein the file stores the database connection parameters that need to be input. By the method, the background server can receive the file and acquire the database connection parameters stored in the file.
The configuration interface is implemented in a web page, and the user inputs the database connection parameters such as the IP address, the port number, the database name, the user name, the password and the like of the database in the parameter input box of the configuration interface, so that the configuration interface feeds back all the database connection parameters to the background server of the configuration interface, and the web page background can receive the database connection parameters.
Step S20: and acquiring the database structure information of the target database according to the database connection parameters.
In this embodiment, the corresponding target database is determined according to the database connection parameter, and then the database structure information of the target database is obtained.
The database structure information of the target database is used for defining a structure or layout of a group of data, and comprises structural objects such as a table, a view, a field, a relation, a package, an index, a type and a plurality of other elements, and also comprises limit rules corresponding to the table, such as a primary key, a data storage type, an encryption storage mode and the like.
Optionally, in this embodiment, the step S20 includes:
outputting the configuration interface, wherein the configuration interface comprises an acquisition control; acquiring the database connection parameters received based on the configuration interface; querying the target database based on the database connection parameters and associating with the target database; and when the acquisition control is triggered, acquiring the database structure information of the target database.
For example, assume that the input database connection parameters include an IP address, a port number, a database name, a user name, a password, and the like of the database, firstly, the target database is confirmed according to the IP address, the port number, and the database name of the database, then the target database is connected, when the target database is connected, the acquired user name and password are input, and the target database can be connected after verification is passed. After the connection is established with the target database, the information of the target database can be acquired at any time, and when the user needs to acquire the information, the acquisition button in the configuration interface is clicked by a mouse, so that the database structure information of the target database is acquired.
Step S30: and acquiring a standard database principle, and generating a database optimization suggestion of the target database according to a comparison result of the standard database principle and the database structure information.
In this embodiment, the standard database rules are collected and determined in advance, and may be modified in the configuration interface according to different requirements. The database structure information is obtained through the step S20, and the database structure information and the standard database principle are compared, so that a distinguishing point of the database structure information of the standard database principle and the target database can be obtained, and a database optimization suggestion is generated for reference of a user according to the distinguishing point.
As an alternative implementation manner, the database structure information of the target database is detected, the target database can be tested by using the acquired standard database principle, and the database optimization suggestion is generated according to the test result. This approach can be applied in scenarios where the number of databases to be detected is relatively small, to speed up the detection rate and reduce the occupation of processes.
Specifically, a specific method for testing the database may be to map the data in the target database, and determine whether the data type in the target database meets the standard database rule by testing table mapping, column mapping and data type mapping. The target database can also be tested by a black box test method or a white box test method. The black box testing method integrates a UI (User Interface) and a database, and data is inserted/deleted/updated from the front end in a trigger calling mode. The database data may then be retrieved using the Select statement to see if the trigger successfully performed the intended operation. The white box test method triggers the data of the trigger by inserting or updating or deleting through the stub and the driver, and the basic idea is to test the database separately before integrating with the UI.
Optionally, in this embodiment, the step S30 includes:
acquiring the standard database principle; when the database structure information is not matched with the standard database principle, determining a data table which is not matched with the standard database principle in the target database and a target database principle which corresponds to the data table in the standard database principle; and generating the database optimization suggestion according to the data table and the target database principle.
Specifically, the standard database principle is compared with the database structure information corresponding to each database table in the target database, so that the database table which does not accord with the standard database principle is obtained, and the part of the database structure information in the database table which does not accord with the standard database principle, namely the target database principle, is obtained. And recording the three types of information in a file according to the acquired data table, the non-conforming target database principle and the standard database principle corresponding to the target database principle, and generating a database optimization suggestion which can be checked by a user.
It will be appreciated that when the database structure information matches the standard database rules, i.e. the structure information of the tables in the target database conforms to the standard database rules, the target database is canonical and conforms to the user's required database, the above steps need not be performed.
Illustratively, assume that the database structure information of the target database is obtained as table 1{ NAME, VARCHAR (10), PRIMARY KEY: no, height DOUBLE (3, 2), FOREIGN KEY: ID, NOT NULL, table 2{ID,INT,PRIMARY KEY: NAME, height DOUBLE (3, 2), FOREIGN KEY: no, UNIQUE }, table 3{SEX,INT,PRIMARY KEY: no, height DOUBLE (3, 2), FOREIGN KEY: no, UNIQUE }. And the standard database principle specifies { SEX, VARCHAR (2), PRIMARY KEY: NAME, height DOUBLE (3, 2), FOREIGN KEY: no, NOT NULL }, i.e. constraint information of the table in table 3 does NOT conform to the standard database principle, wherein, described in table 3 is gender, data belonging to character types, INT cannot be used, and gender should be bound to NAME, so there should be a primary key constraint, primary key should be set to NAME, and finally no unique constraint should be set, since gender has only two possible values and the value cannot be NULL, no unique constraint should be set, and no non-NULL constraint should be set. After the comparison is completed, the result is table 3{ the data type should be set to varchar nr (2), the primary key should be set to NAME, the UNIQUE should NOT be set, the non-NULL constraint NOT NULL }, and the comparison result is recorded in a file as a database optimization suggestion and output.
In the technical scheme provided by the embodiment, the database connection parameters are obtained and connected with the target database through the database connection parameters so as to obtain the database structure information of the target database, so that various information of the target database can be obtained in a safe mode. By comparing the standard database principle with the database structure information to generate a database optimization suggestion of the target database, the rules of the database can be automatically detected and the database optimization suggestion can be generated.
Example two
Referring to fig. 3, in the second embodiment, after the step S30, the method further includes the following steps:
step S31: and outputting the configuration interface, wherein the configuration interface comprises an optimization suggestion selection box.
In this embodiment, as shown in fig. 2, fig. 2 is an interface schematic diagram of a configuration interface related to an embodiment of the present application, where the configuration interface includes an optimization suggestion selection box. The user may select the generated optimization suggestion in the optimization suggestion selection box based on the selection means of the terminal device and may apply the optimization suggestion in the target database in one-touch.
As an optional implementation manner, the configuration interface may further include an application optimization suggestion control, when the user triggers the application optimization suggestion control through a selection device of the terminal device, the selected optimization suggestion is applied to the target database according to the connected target database, so that a one-key optimization target database can be realized.
Specifically, to prevent data leakage stored in the database, when the optimization suggestion is applied to the target database, the server side pops up the authentication interface, and the user can apply the optimization suggestion after verification through the user name and the password in the database connection parameters acquired before.
Step S32: and responding to the operation action of the optimization suggestion selection box, and acquiring a corresponding target optimization suggestion.
In this embodiment, according to the link or the file selected in the optimization suggestion frame by the user through the selecting device of the terminal device, the corresponding target optimization suggestion may be determined.
As an alternative implementation manner, the user may choose to view the optimization suggestions in the optimization suggestion selection frame, modify the optimization suggestions in the optimization suggestion selection frame, and save the modified optimization suggestions after modification is completed. In this way, the generated optimization suggestions can be secondarily modified to meet various requirements of users for the database in special scenes.
Specifically, when the database optimization suggestions are modified, in order to facilitate the user to more intuitively view the generated optimization suggestions, the user can jump to the corresponding setting interface when clicking the link corresponding to the optimization suggestions, the optimization suggestions can be modified in the setting interface, and the modified optimization suggestions are automatically saved and replaced by the initial optimization suggestions.
For example, after generating the optimization suggestion, the user may click through a mouse in an optimization suggestion selection box of the configuration interface to view the generated optimization suggestion, where the optimization suggestion is presented in a linked manner in the optimization suggestion selection box. If the user needs to make a secondary modification to the generated optimization suggestion, the link can be clicked, and various data in the optimization suggestion can be modified in an interface displayed later.
Step S33: and acquiring the database structure information of the target database, and modifying the database structure information according to the target optimization suggestion to generate a target database dictionary.
In this embodiment, for the determined optimization suggestion, the point in the optimization suggestion, where the database structure information in the target database needs to be modified, is acquired, and the database structure information of the target database is modified according to the point, which can be understood that this step may be the implementation principle of applying the optimization suggestion to the target database by one key as described above, and does not represent that this step needs to be performed manually, or is performed step by step in the configuration interface.
The information contained in the database dictionary comprises database design data, SQL programs stored in the database, user rights, user statistics, information in the design process of the database and database growth statistics information.
Further, in this embodiment, after the step S33, the method further includes:
outputting the configuration interface, wherein the configuration interface comprises a result display frame and a confirmed downloading control; displaying links corresponding to the database dictionary in the result display frame; and when the confirmation downloading control is triggered, acquiring the database dictionary according to the link so as to enable the database dictionary to be fed back to the client.
Specifically, after the database dictionary is generated, the database dictionary is automatically displayed in the result display frame, wherein the file corresponding to the database dictionary or the link corresponding to the database dictionary can be displayed in the result display frame, and the user clicks the link through a selection device of the terminal equipment to further download the corresponding database dictionary and check various information corresponding to the data table stored in the modified target database.
For example, assuming that the optimization suggestion is not modified by the user, the database structure information of the target database is updated by applying the optimization suggestion through one-touch, so as to obtain an updated target database. According to the updated information of the target database, such as database design data, SQL programs stored in the database, user rights, user statistics, information in the design process of the database and database growth statistics, a database dictionary is generated for reference of the user according to the information.
In the technical scheme provided by the embodiment, the generated optimization suggestions are displayed in the optimization suggestion selection frame, and the user is supported to modify the optimization suggestions, so that various requirements of the user on the database in a special scene can be met. By applying the optimization suggestion to the target database, a database dictionary of the target database to which the optimization suggestion has been applied is generated, so that a user can conveniently refer to whether the optimized target database meets the requirements.
Example III
Referring to fig. 4, in the third embodiment, before the step of the step S10, the method further includes the following steps:
step S40: and outputting the configuration interface, wherein the configuration interface comprises a database principle setting frame and a confirmation control.
In this embodiment, before the database connection parameters are input, various rules of the database are also required to be collected and determined, and it is to be understood that the collected database rules are input through a database rule setting box, so that the database rules are acquired by the background server side of the configuration interface.
Among other things, the collected database principles may include consistency, integrity, security, extensibility, triple-paradigm, and so forth.
Step S50: and responding to the operation action of the database principle setting frame, and receiving the corresponding standard database principle.
In this embodiment, the operation action in the database rule setting frame may be that the user inputs the corresponding standard database rule based on the input device of the terminal device, or may be that the user selects the corresponding file in the storage space of the terminal device through the selection device based on the terminal device, and then uploads the file, that is, uploads the file storing the standard database rule.
Optionally, in this embodiment, the step S50 includes:
acquiring initial design information of a database; receiving customized database design information based on the database principle setting frame, and generating the standard database principle according to the database initial design information and the customized database design information; and rendering the standard database principle to the database principle setting frame so that the client side stores the standard database principle.
Specifically, the database initial design information is collected database design principles, namely basic constraint principles of some database designs. In addition, the user can add or modify in the database principle setting frame based on the input device of the terminal equipment, thereby adding the customized database design information. The background server side automatically generates a standard database principle according to the collected database initial design information and the customized database design information added by the user.
As an alternative implementation manner, the customized database design information can also be obtained by obtaining additional database structure information, so as to obtain corresponding customized database design information. In this way customized data design information can be quickly generated and the database structure information of one database can be used to detect if tables in other databases conform to this database structure information.
Step S60: and when the confirmation control is triggered, storing the standard database principle.
In this embodiment, when it is detected that the confirmation control is triggered by the user through the selection device of the terminal device, that is, the user has input the added customized database design information, and the system has automatically generated the corresponding standard database principle, the standard database principle needs to be saved, so that the subsequent detection process can be obtained from the storage medium at any time when using the database design principle.
By way of example, assuming that consistency, integrity, security, scalability, three-major format, etc. are used as the initial database design information, the customized database design information is set by the user according to various requirements of the database, including whether the primary key of each table is id, whether the length is limited, what data type is used for a specific field in the database to store, whether the key field is stored in an encrypted manner, whether the length of the field is reasonable (e.g., the length of the encrypted field is generally 32, 64, 128 is optimal, so that the limited length can be set, if the limited length is exceeded, an alarm is given), the fields of a single table should not be too many and a threshold is set, whether the primary external key has an index, etc. And taking the information as customized database design information, and fusing the customized database design information with the initial database design information to generate a standard database principle.
In the technical scheme provided by the embodiment, by acquiring the initial design information of the database and providing the database principle setting frame capable of customizing the design information of the database, different requirements of various users on the database can be met, so that the finally generated standard database principle is diversified, and modification is supported.
Since the system described in the embodiments of the present application is a system for implementing the method of the embodiments of the present application, based on the method described in the first embodiment of the present application, a person skilled in the art can understand the specific structure and the modification of the system, and thus the detailed description is omitted herein. All systems used in the methods of the embodiments of the present application are within the scope of the protection sought herein.
Fig. 5 is a schematic architecture diagram of a hardware running environment of a terminal device according to an embodiment of the present application.
As shown in fig. 5, the terminal device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a network interface 1003, and a memory 1004. Wherein the communication bus 1002 is used to enable connected communication between these components. The network interface 1003 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1004 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable Non-Volatile Memory (NVM), such as a disk Memory. The memory 1004 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is not limiting and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 5, an operating system, a network communication module, and a database optimization suggestion generation program may be included in the memory 1004 as one storage medium. The operating system is a program for managing and controlling hardware and software resources of the terminal device, and the database optimization suggestion generation program and other software or running of the program.
In the terminal device shown in fig. 5, the network interface 1003 is mainly used for connecting a terminal, and performs data communication with the terminal; the processor 1001 may be configured to invoke a database optimization suggestion generation program stored in the memory 1004.
In this embodiment, the terminal device includes: memory 1004, processor 1001, and database optimization suggestion generation program stored on the memory and executable on the processor, wherein:
when the processor 1001 calls the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
outputting a configuration interface and receiving database connection parameters based on the configuration interface;
acquiring database structure information of a target database according to the database connection parameters;
and acquiring a standard database principle, and generating a database optimization suggestion of the target database according to a comparison result of the standard database principle and the database structure information.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
acquiring the standard database principle;
when the database structure information is not matched with the standard database principle, determining a data table which is not matched with the standard database principle in the target database and a target database principle which corresponds to the data table in the standard database principle;
and generating the database optimization suggestion according to the data table and the target database principle.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
outputting the configuration interface, wherein the configuration interface comprises an optimization suggestion selection box;
responding to the operation action of the optimization suggestion selection frame, and acquiring a corresponding target optimization suggestion;
and acquiring the database structure information of the target database, and modifying the database structure information according to the target optimization suggestion to generate a target database dictionary.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
outputting the configuration interface, wherein the configuration interface comprises a result display frame and a confirmed downloading control;
displaying links corresponding to the database dictionary in the result display frame;
and when the confirmation downloading control is triggered, acquiring the database dictionary according to the link so as to enable the database dictionary to be fed back to the client.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
outputting the configuration interface, wherein the configuration interface comprises a database principle setting frame and a confirmation control;
receiving a corresponding standard database principle in response to the operation action of the database principle setting frame;
and when the confirmation control is triggered, storing the standard database principle.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
acquiring initial design information of a database;
receiving customized database design information based on the database principle setting frame, and generating the standard database principle according to the database initial design information and the customized database design information;
and rendering the standard database setting rules to the database rule setting frame so that the client side stores the standard database rules.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
outputting the configuration interface, wherein the configuration interface comprises a parameter input box;
and receiving the database connection parameters in response to the operation action of the parameter input box, wherein the database connection parameters are used for connecting with a target database.
In one embodiment, when the processor 1001 invokes the database optimization suggestion generation program stored in the memory 1004, the following operations are performed:
outputting the configuration interface, wherein the configuration interface comprises an acquisition control;
acquiring the database connection parameters received based on the configuration interface;
querying the target database based on the database connection parameters and associating with the target database;
and when the acquisition control is triggered, acquiring the database structure information of the target database.
Furthermore, it will be appreciated by those of ordinary skill in the art that implementing all or part of the processes in the methods of the above embodiments may be accomplished by computer programs to instruct related hardware. The computer program comprises program instructions, and the computer program may be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the terminal device to carry out the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a storage medium storing a database optimization suggestion generation program that, when executed by a processor, implements the respective steps of the database optimization suggestion generation method as described in the above embodiments.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, etc. which may store the program code.
It should be noted that, because the storage medium provided in the embodiments of the present application is a storage medium used to implement the method in the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand the specific structure and the modification of the storage medium, and therefore, the description thereof is omitted herein. All storage media used in the methods of the embodiments of the present application are within the scope of protection intended in the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the invention. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (5)

1. A database optimization suggestion generation method, characterized in that the database optimization suggestion generation method comprises the following steps:
outputting a configuration interface, wherein the configuration interface comprises a database principle setting frame, a result display frame, an optimization suggestion selection frame, a confirmation downloading control and a confirmation control;
acquiring initial design information of a database;
receiving customized database design information based on the database principle setting frame, and generating a standard database principle according to the database initial design information and the customized database design information;
rendering the standard database principle to the database principle setting frame, and storing the standard database principle when the confirmation control is triggered;
receiving database connection parameters based on the configuration interface;
acquiring database structure information of a target database according to the database connection parameters;
acquiring a standard database principle, and determining a data table which is not matched with the standard database principle in the target database and a target database principle corresponding to the data table in the standard database principle when the database structure information is not matched with the standard database principle;
generating a database optimization suggestion of the target database according to the data table, the target database principle and the standard database principle corresponding to the target database principle;
responsive to an operational action of the optimization suggestion selection box, obtaining a corresponding target optimization suggestion includes:
in the optimization suggestion selection frame of the configuration interface, checking the generated database optimization suggestions through mouse click, wherein the database optimization suggestions are displayed in the optimization suggestion selection frame in a linked mode and serve as the target optimization suggestions;
clicking the link when the generated database optimization suggestion needs to be modified, modifying various data of the database optimization suggestion in a displayed interface, and determining the target optimization suggestion;
acquiring the database structure information of the target database, and modifying the database structure information according to the target optimization suggestion to generate a target database dictionary;
displaying the target links corresponding to the database dictionary in the result display frame;
and when the confirmation downloading control is triggered, acquiring the database dictionary according to the target link so as to enable the database dictionary to be fed back to the client.
2. The database optimization suggestion generation method of claim 1, wherein the step of receiving database connection parameters based on the configuration interface includes:
outputting the configuration interface, wherein the configuration interface comprises a parameter input box;
and receiving the database connection parameters in response to the operation action of the parameter input box, wherein the database connection parameters are used for connecting with a target database.
3. The database optimization suggestion generation method of claim 1, wherein the step of obtaining database structure information of a target database according to the database connection parameters includes:
outputting the configuration interface, wherein the configuration interface comprises an acquisition control;
acquiring the database connection parameters received based on the configuration interface;
querying the target database based on the database connection parameters and associating with the target database;
and when the acquisition control is triggered, acquiring the database structure information of the target database.
4. A terminal device, characterized in that the terminal device comprises: a memory, a processor and a system program of a database optimization suggestion generation method stored on the memory and executable on the processor, the system program of the database optimization suggestion generation method being executed by the processor to implement the steps of the database optimization suggestion generation method as claimed in any one of claims 1 to 3.
5. A storage medium, characterized in that a system program of a database optimization suggestion generation method is stored on the storage medium, the system program of the database optimization suggestion generation method being executed by a processor to implement the steps of the database optimization suggestion generation method according to any one of claims 1 to 3.
CN202311685706.1A 2023-12-11 2023-12-11 Database optimization suggestion generation method, terminal equipment and storage medium Active CN117389996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311685706.1A CN117389996B (en) 2023-12-11 2023-12-11 Database optimization suggestion generation method, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311685706.1A CN117389996B (en) 2023-12-11 2023-12-11 Database optimization suggestion generation method, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117389996A CN117389996A (en) 2024-01-12
CN117389996B true CN117389996B (en) 2024-03-29

Family

ID=89463417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311685706.1A Active CN117389996B (en) 2023-12-11 2023-12-11 Database optimization suggestion generation method, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117389996B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753490A (en) * 2018-12-13 2019-05-14 深圳壹账通智能科技有限公司 Database optimizing method, system, equipment and medium based on loophole reparation
CN110851438A (en) * 2018-08-20 2020-02-28 北京京东尚科信息技术有限公司 Database index optimization suggestion and verification method and device
CN111522816A (en) * 2020-04-16 2020-08-11 云和恩墨(北京)信息技术有限公司 Data processing method, device, terminal and medium based on database engine
CN112597182A (en) * 2020-12-16 2021-04-02 平安普惠企业管理有限公司 Data query statement optimization method and device, terminal and storage medium
CN112905706A (en) * 2021-03-19 2021-06-04 平安消费金融有限公司 Database synchronization method and device, storage medium and computer equipment
CN113495902A (en) * 2020-03-19 2021-10-12 华为技术有限公司 Data processing method and data standard management system
CN113722325A (en) * 2021-08-31 2021-11-30 北京锐安科技有限公司 Method and device for detecting table information in database, computer equipment and storage medium
CN116881219A (en) * 2023-06-09 2023-10-13 北京百度网讯科技有限公司 Database optimization processing method and device, electronic equipment and storage medium
CN116975649A (en) * 2023-06-02 2023-10-31 腾讯科技(深圳)有限公司 Data processing method, device, electronic equipment, storage medium and program product

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851438A (en) * 2018-08-20 2020-02-28 北京京东尚科信息技术有限公司 Database index optimization suggestion and verification method and device
CN109753490A (en) * 2018-12-13 2019-05-14 深圳壹账通智能科技有限公司 Database optimizing method, system, equipment and medium based on loophole reparation
CN113495902A (en) * 2020-03-19 2021-10-12 华为技术有限公司 Data processing method and data standard management system
CN111522816A (en) * 2020-04-16 2020-08-11 云和恩墨(北京)信息技术有限公司 Data processing method, device, terminal and medium based on database engine
CN112597182A (en) * 2020-12-16 2021-04-02 平安普惠企业管理有限公司 Data query statement optimization method and device, terminal and storage medium
CN112905706A (en) * 2021-03-19 2021-06-04 平安消费金融有限公司 Database synchronization method and device, storage medium and computer equipment
CN113722325A (en) * 2021-08-31 2021-11-30 北京锐安科技有限公司 Method and device for detecting table information in database, computer equipment and storage medium
CN116975649A (en) * 2023-06-02 2023-10-31 腾讯科技(深圳)有限公司 Data processing method, device, electronic equipment, storage medium and program product
CN116881219A (en) * 2023-06-09 2023-10-13 北京百度网讯科技有限公司 Database optimization processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117389996A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN105511873B (en) User interface control display method and device
CN107015804B (en) Method and system for rapidly developing project by configuring API
CN109783388B (en) UI (user interface) automatic testing method and device and electronic equipment
US9245142B2 (en) Access control data editing support device and method
US8311794B2 (en) Testing executable logic
US20110209042A1 (en) Information Technology Standard Inventory Utility
KR101201019B1 (en) Declarative sequenced report parameterization
US20140244784A1 (en) Website Impersonation System and Method
CN112148580B (en) Test method and device and electronic equipment
CN111694572A (en) Code format conversion method, device, computer equipment and storage medium
CN111475161A (en) Method, device and equipment for accessing component
CN111475553A (en) Data query display method and device, electronic equipment and storage medium
CN109542942B (en) Function call query method and device and electronic equipment
CN117389996B (en) Database optimization suggestion generation method, terminal equipment and storage medium
JP2010123045A (en) Work procedure manual generation device, method, and program
US7900155B2 (en) System and method for providing information about an operation's applicability to an item
US9965533B2 (en) Reverse application programming interface (API) endpoint creation process and standardized schema
CN112597023A (en) Case management method and device based on guide picture, computer equipment and storage medium
CN112015715A (en) Industrial Internet data management service testing method and system
CN110059485A (en) Privately owned API detection method, terminal and the storage medium of IOS application
US20150347529A1 (en) System and method for contextual workflow automation
CN115617780A (en) Data import method, device, equipment and storage medium
CN114386853A (en) Data auditing processing method, device and equipment based on universal auditing model
CN113971191A (en) Data import method and device and computer readable storage medium
CN112861060A (en) Page creating method and device, computer equipment and storage medium

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