Database processing method and apparatus, computer device, and storage medium

CN117033452BActive Publication Date: 2026-08-07BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BANK OF CHINA
Filing Date
2023-07-10
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]然而,由于非可视化的环境中通常需要手动输入指令来进行查询,故非可视化的环境操作复杂,导致数据库维护的效率较低

Benefits of technology

[0015]The aforementioned database processing method, apparatus, computer equipment, storage medium, and computer program product acquire update information corresponding to multiple update events in the target database, generate update tables based on each update information, receive update query information for the target database sent by a terminal through an update information query interface, retrieve table records matching the update query information from the update tables of the target database, and return the table records matching the update query information to the terminal, so that the terminal can display the table records matching the update query information on the update information query interface. Since the update information query interface is a visual interface, querying and displaying update information of the target database through a visual interface is more concise and intuitive, enabling database administrators to promptly identify database problems and improving the efficiency of database maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117033452B_ABST
    Figure CN117033452B_ABST
Patent Text Reader

Abstract

The application relates to a database processing method and device, computer equipment, a storage medium and a computer program product. The method can be applied to the financial field or other fields, and can be used for querying update information of a database of a bank. The method comprises the following steps: acquiring update information corresponding to a plurality of update events of a target database; the update information corresponding to the update events is used for recording an update process of the update events on the target database; generating an update table based on the update information; the update table comprises a plurality of table records; receiving update query information of the target database sent by a terminal through an update information query interface; acquiring a table record matched with the update query information from the update table of the target database; and returning the table record matched with the query information to the terminal, so that the terminal displays the table record matched with the query information on the update information query interface. The method can improve the efficiency of database maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a database processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of computer technology, more and more financial institutions are conducting online business. The business data for these online transactions is typically stored in databases, which are maintained periodically by database administrators, such as correcting erroneous data. However, when querying the database, only the modified data is usually displayed, without tracing back to the person who performed the modification.

[0003] In traditional techniques, log searches are typically performed in a non-visual environment, and information relevant to database updates is extracted from the searched logs. For example, a non-visual environment could be a command-line (CMD) environment.

[0004] However, since queries in non-visual environments typically require manual input of commands, operations in non-visual environments are complex, leading to lower efficiency in database maintenance. Summary of the Invention

[0005] Therefore, it is necessary to provide a database processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the maintenance efficiency of the database in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides a database processing method. The method includes: acquiring update information corresponding to multiple update events of a target database; the update information corresponding to each update event being used to record the update process of the update event for the target database; generating an update table based on each update information; the update table including multiple table records, the data in each table record being obtained from the corresponding update information; receiving update query information for the target database sent by a terminal through an update information query interface, and obtaining table records matching the update query information from the update table of the target database; returning the table records matching the update query information to the terminal, so that the terminal displays the table records matching the update query information on the update information query interface.

[0007] This application also provides a database processing method. The method includes: displaying an update information query interface for a target database; receiving update query information input into the update information query interface, and sending the update query information to a server; receiving table records returned by the server that match the update query information; the table records that match the update query information are obtained by the server from the update table of the target database based on the update query information; the update table is generated based on update information corresponding to multiple update events in the target database.

[0008] Secondly, this application provides a database processing apparatus. The apparatus includes an update information acquisition module, configured to acquire update information corresponding to multiple update events of a target database; the update information corresponding to each update event is used to record the update process of the update event for the target database; an update table generation module, configured to generate an update table based on each update information; the update table includes multiple table records, and the data in each table record is obtained from the corresponding update information; a table record acquisition module, configured to receive update query information for the target database sent by a terminal through an update information query interface, and acquire table records matching the update query information from the update table of the target database; and a table record return module, configured to return the table records matching the update query information to the terminal, so that the terminal displays the table records matching the update query information on the update information query interface.

[0009] In some embodiments, the update information corresponding to the update event includes object information of the event triggering object, the event triggering object being the object that triggers the update event, and the update information corresponding to the update event also includes database change information, the database change information being used to reflect the changes that occur in the target database triggered by the update event; the update table generation module is further configured to: for each update information, obtain attribute fields and corresponding attribute field values ​​from the object information in the update information; obtain a first table field corresponding to the attribute field, use the table field and the attribute field value corresponding to the attribute field as the field value of the first table field, determine a second table field corresponding to the database change information, use the database change information as the field value of the second table field, generate a table record corresponding to the update information based on the field value of the first table field and the field value of the second table field; and generate an update table based on the table records corresponding to each update information.

[0010] In some embodiments, the object information includes attribute field values ​​corresponding to multiple attribute fields; the update table generation module is used to: obtain a first table field corresponding to each attribute field in the object information; different attribute fields correspond to different first table fields; the update query information includes a specified field value corresponding to the first table field; the table record acquisition module is further used to: obtain a table record from the update table of the target database where the field value of the first table field is the specified field value.

[0011] This application also provides a database processing apparatus. The apparatus includes: a query interface display module for displaying an update information query interface for a target database; a query information sending module for receiving update query information input into the update information query interface and sending the update query information to a server; and a table record receiving module for receiving table records returned by the server that match the update query information; the table records matching the update query information are obtained by the server from the update table of the target database based on the update query information; the update table is generated based on update information corresponding to multiple update events in the target database.

[0012] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the database processing method described above.

[0013] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in the database processing method described above.

[0014] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in the database processing method described above.

[0015] The aforementioned database processing method, apparatus, computer equipment, storage medium, and computer program product acquire update information corresponding to multiple update events in the target database, generate update tables based on each update information, receive update query information for the target database sent by a terminal through an update information query interface, retrieve table records matching the update query information from the update tables of the target database, and return the table records matching the update query information to the terminal, so that the terminal can display the table records matching the update query information on the update information query interface. Since the update information query interface is a visual interface, querying and displaying update information of the target database through a visual interface is more concise and intuitive, enabling database administrators to promptly identify database problems and improving the efficiency of database maintenance. Attached Figure Description

[0016] Figure 1 This is an application environment diagram of a database processing method in one embodiment;

[0017] Figure 2 This is a flowchart illustrating a database processing method in one embodiment;

[0018] Figure 3 This is a flowchart illustrating the database processing method in another embodiment;

[0019] Figure 4 This is a structural block diagram of a database processing device in one embodiment;

[0020] Figure 5 This is a structural block diagram of a database processing apparatus in another embodiment;

[0021] Figure 6 This is an internal structural diagram of a computer device in one embodiment;

[0022] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0024] The database processing method provided in this application embodiment can be applied to, for example, Figure 1The application environment shown includes a terminal 102 and a server 104. Terminal 102 can be the terminal corresponding to a database administrator, and server 102 can be the backend server of the target enterprise. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server.

[0025] Specifically, server 104 obtains update information corresponding to multiple update events in the target database; the update information corresponding to each update event is used to record the update process of the update event for the target database; and an update table is generated based on each update information; the update table includes multiple table records, and the data in each table record is obtained from the corresponding update information. Server 104 can receive update query information for the target database sent by terminal 102 through the update information query interface, obtain table records matching the update query information from the update table of the target database, and return the table records matching the query information to terminal 102, so that terminal 102 can display the table records matching the query information on the update information query interface.

[0026] In some embodiments, terminal 102 may display an update information query interface for the target database, receive update query information input into the update information query interface, and send update query information to server 104. Terminal 102 receives table records returned by server 104 that match the update query information and displays the table records that match the update query information in the update information query interface; the table records that match the update query information are obtained by the server from the update table of the target database based on the update query information; the update table is generated based on the update information corresponding to multiple update events in the target database.

[0027] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0028] Those skilled in the art will understand that Figure 1 The application environments shown are only some scenarios related to the solution of this application and do not constitute a limitation on the application environment of the solution of this application.

[0029] In some embodiments, such as Figure 2 As shown, a database processing method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0030] Step 202: Obtain update information corresponding to multiple update events in the target database; the update information corresponding to the update events is used to record the update process of the update events for the target database.

[0031] The target database is the database of the target enterprise, used to store relevant data from the target enterprise's online business platform. For example, the target enterprise could be a financial institution or bank, and the target database could be a bank's database used to store business transaction data. An update event is triggered in response to an update request to the target database. The update type of an update event can include at least one of the following: table creation, insertion, deletion, modification, or query. Update information records the update process of an update event on the target database. This can be a database log, automatically generated when the update event is triggered.

[0032] Update information can include object information of the event triggering object and database change information. The event triggering object refers to the object that triggers the update event. Object information is used to identify the event triggering object and can include at least one of the event triggering object's username or IP address. Database change information reflects the changes that have occurred in the target database triggered by the update event. Update information can also include update time and update type. Update time is the trigger time of the update event, and update content can be the database statement used to update the target database. For example, if a new row of data "cash,100" is added to the table "xx_table" in the target database, the corresponding update information can include: "event_time: 2023-06-06 12:32:05; user_host: xxx; IP: xxx.xxx.xxx.xxx; thread_id: 1; server_id: 1; command_type: INSERT; argument: INSERT INTO xx_table VLAUES(cash,100)".

[0033] Specifically, in response to a modification request for the target database, the server triggers an update event for the target database, updates the data in the target database, generates update information corresponding to the update event, and then stores it locally. The server can respond to the generation of update information corresponding to the update event in the target database, retrieve the update information corresponding to the update event, and can also retrieve update information corresponding to multiple update times of the target database at preset time intervals. The preset time interval is pre-set; for example, it can be 1 hour, meaning the server retrieves update information corresponding to multiple newly generated update events of the target database every hour.

[0034] Step 204: Generate an update table based on each update information; the update table includes multiple table records, and the data in each table record is obtained from the corresponding update information.

[0035] The update table is generated based on update information. It includes table fields and multiple table records. The table fields are pre-defined fields, which can include at least one of the following: first table fields corresponding to the attribute fields in the object information, or second table fields corresponding to the database change information. Attribute fields are fields in the object information used to identify different attributes of the object. Each attribute field corresponds to a first table field. For example, the attribute field for the object's username is "user_host," and the corresponding first table field is "updating user"; the attribute field for the object's IP address is "IP," and the corresponding first table field is "updating IP." A table record is a row of data in the update table. Each table record includes the field values ​​corresponding to each table field, and these values ​​are obtained from the corresponding update information.

[0036] Specifically, for each update, the server can obtain the attribute fields and their corresponding values ​​from the object information of the update information. Then, it determines the first table field corresponding to each attribute field, uses the attribute field values ​​as the field values ​​of their respective first table fields, determines the second table field corresponding to the database change information, uses the database change information as the field value of the second table field, generates table records corresponding to the update information based on the field values ​​of the first and second table fields, and combines the table records corresponding to each update to generate an update table.

[0037] Step 206: Receive the update query information for the target database sent by the receiving terminal through the update information query interface, and retrieve the table records that match the update query information from the update table of the target database.

[0038] The terminal can be the one used by database administrators to maintain the database. The update information query interface is a visual interface, which is more convenient and displays content more intuitively compared to the non-visual environment where database logs are queried by entering SQL statements. The update query information instructs the server to find table records in the target database's update tables that match the update query information. The update query information can include specified field values ​​for one or more table fields; therefore, the table records that match the update query information include all specified field values. For example, the update query information can include at least one specified field value corresponding to a first table field. For instance, if the first table field is "Update Personnel," the update query information could include "Update Personnel: Zhang xx." There can be one or more table records that match the update query information. It is also possible that the update query information is entered incorrectly, or that no table record in the update table matches the update query information.

[0039] Specifically, the server receives update information query requests for the target database sent by the terminal through the update information query interface. In response to these requests, the server extracts update query information from the request and retrieves the matching table records from the update table of the target database. For example, if the update query information includes "Update Personnel: Zhang xx", then the server retrieves the table record whose first table field "Update Personnel" has a value of "Zhang xx" from the update table, thus obtaining the table record matching the update query information.

[0040] Step 208: Return the table records that match the update query information to the terminal so that the terminal can display the table records that match the update query information on the update information query interface.

[0041] Specifically, the server can return table records that match the update query information to the terminal. The terminal receives the table records returned by the server that match the update query information and displays the table records that match the update query information in the update information query interface.

[0042] In the above database processing method, update information corresponding to multiple update events in the target database is obtained, an update table is generated based on each update information, and update query information for the target database is received from the terminal through the update information query interface. Table records matching the update query information are obtained from the update table of the target database and returned to the terminal so that the terminal can display the table records matching the update query information on the update information query interface. Since the update information query interface is a visual interface, querying and displaying the update information of the target database through the visual interface is more concise and intuitive. Database administrators can promptly discover database problems, thus improving the efficiency of database maintenance.

[0043] In some embodiments, due to the large number and variety of tables in the target database, and the close interrelationship of business logic, different modules and developers may share a single table. When developer permissions are unclear, it becomes impossible to determine who is responsible for modifying and maintaining the table, leading to duplicate modifications. Therefore, permissions for different developer accounts can be set to either read-only or read-write, depending on actual needs. With read-only permissions, developers can only log in and connect to the target database to view data; with read-write permissions, developers can log in and connect to the target database to view and modify data. Furthermore, a dedicated database administrator is assigned to each development agile group. This administrator can modify the permissions of each developer's account, thereby reducing unauthorized user tampering with the target database and improving database security.

[0044] In some embodiments, the update information corresponding to the update event includes object information of the event triggering object, which is the object that triggers the update event. The update information also includes database change information, which reflects the changes that occur in the target database triggered by the update event. Generating an update table based on each update information includes: for each update information, obtaining attribute fields and their corresponding attribute field values ​​from the object information in the update information; obtaining a first table field corresponding to the attribute field, using the table field and the attribute field value as the field value of the first table field; determining a second table field corresponding to the database change information, using the database change information as the field value of the second table field; generating a table record corresponding to the update information based on the field values ​​of the first and second table fields; and generating an update table based on the table records corresponding to each update information.

[0045] The update information includes the object information of the event triggering object and the database change information. It may also include the update time and update type. Therefore, the table fields of the update table also include a third table field corresponding to the update time attribute and a fourth table field corresponding to the update type attribute.

[0046] Specifically, for each update, the server can obtain the attribute fields and their corresponding attribute field values ​​from the object information in the update information, obtain the first table field corresponding to the attribute field, and use the table field and the attribute field value as the field value of the first table field; then the server determines the second table field corresponding to the database change information and uses the database change information as the field value of the second table field; the server can also determine the third table field corresponding to the update time attribute and the fourth table field corresponding to the update type attribute in the update information, use the field value corresponding to the update time attribute as the field value of the third table field, use the field value corresponding to the update type attribute as the field value of the fourth table field, combine the field values ​​of the first table field, the second table field, the third table field, and the fourth table field to obtain the table record corresponding to the update information, and then fill the update table with the table records corresponding to each update information.

[0047] For example, the first table field includes "Update Personnel" and "Update IP", the second table field is "Detailed Update Content", the third table field is "Update Time", and the fourth table field is "Update Type". A table record can be: (Update Personnel: xxx; Update IP: xxx.xxx.xxx.xxx; Update Time: 2023-06-06 12:32:05; Update Type: Insert; Detailed Update Content: INSERT INTO xx_table VLAUES(cash,100)).

[0048] In this embodiment, by determining the first table field corresponding to the attribute field, the attribute field value corresponding to the attribute field is used as the field value of the first table field, and by determining the second table field corresponding to the database change information, the database change information is used as the field value of the second table field, and the update information is transformed into a table record in the update table. The update information is stored in a table format, making the data more intuitive.

[0049] In some embodiments, object information includes attribute field values ​​corresponding to multiple attribute fields; obtaining the first table field corresponding to the attribute field includes: obtaining the first table field corresponding to each attribute field in the object information; different attribute fields correspond to different first table fields; the update query information includes the specified field value corresponding to the first table field; obtaining the table record matching the update query information from the update table of the target database includes: obtaining the table record whose field value of the first table field is the specified field value from the update table of the target database.

[0050] The object information may include multiple attribute fields, and the first table field corresponding to each attribute field is different. For example, if the attribute field is "user_host", the corresponding first table field is "updating personnel"; if the attribute field is "IP", the corresponding first table field is "updating IP".

[0051] Specifically, if the update query information includes a specified field value corresponding to a field in the first table, the server obtains the specified field value corresponding to the field in the first table included in the update query information, searches for the specified field value in the update table of the target database, obtains the table record where the field value of the first table field is the specified field value corresponding to the field in the first table field, and obtains the table record that matches the update query information.

[0052] In some embodiments, the update query information may also include at least one of the specified field values ​​corresponding to the first table field, the third table field, or the fourth table field. For example, the update query information may include "Updater: xxx; Update time: 2023-06-06 to 2023-06-08; Update type: Delete".

[0053] In some embodiments, the database change information includes a table identifier for the target table in the target database to which the update event is applied. The server can determine the fifth table field corresponding to the table identifier, obtain the table identifier from the database change information, and use the table identifier as the field value of the fifth table field. Therefore, the update query information may also include a specified field value corresponding to the fifth table field. The server can obtain table records from the updated table in the target database where the field value of the fifth table field is the specified field value. For example, if the fifth table field is "table name", and the update query information includes "table name: xx_table", then the server can obtain table records from the updated table where the field value of "table name" is "xx_table".

[0054] In this embodiment, since the update query information includes the specified field value corresponding to the field of the first table, the table record with the field value of the first table field as the specified field value is obtained from the update table of the target database. This enables a targeted query of the update information of the target database, which can intuitively show the person who made the modification to the target database, discover the problems in the database more quickly, and improve the efficiency of database maintenance.

[0055] In some embodiments, such as Figure 3 As shown, a database processing method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:

[0056] Step 302: Display the update information query interface for the target database.

[0057] The update information query interface is used to query update information of update events in the target database and displays the queried information in a table format.

[0058] Specifically, the terminal displays a database maintenance interface for the target database, which includes an update information query entry. In response to a click triggered by the update information query entry, the terminal displays an update information query interface for the target database. This interface includes a query input area and an update information display area. The query input area is used to input update query information. After receiving table records from the server that match the update query information, the update information display area displays these matching records.

[0059] Step 304: Receive update query information entered into the update information query interface and send the update query information to the server.

[0060] The update query information is obtained from the query information input area of ​​the update query interface. The update query information may include at least one of the specified field values ​​corresponding to the first table field, the third table field, the fourth table field, or the fifth table field. For example, the update query information may include "Updater: xxx; Update time: 2023-06-06 to 2023-06-08; Update type: Delete".

[0061] Specifically, in response to an update information query operation triggered through the update information query interface, the terminal retrieves update query information from the query information input area of ​​the update information query interface, generates an update information query request based on the update query information, and sends the update information query request to the server. For example, the query information input area displays input areas corresponding to the first, third, fourth, and fifth table fields, respectively. The update query information retrieved by the terminal from the input areas corresponding to the first, third, fourth, and fifth table fields could be: "Update Personnel: xxx; Update Time: 2023-06-06 to 2023-06-08; Update Type: Delete; Table Name: xx_table". The update information query operation can be a click on the "Query" button in the update information query interface.

[0062] In some embodiments, the input area corresponding to the first table field may also display a list of objects prohibited from updating and a list of objects allowed to update. The list of objects prohibited from updating can also be called a blacklist, and the list of objects allowed to update can also be called a whitelist. Objects in the list of objects prohibited from updating can be objects that have maliciously tampered with the target database, while objects in the list of objects allowed to update can be objects that have the permission to update the target database. By clicking on objects in the list of objects prohibited from updating, update information including information about objects in the list of objects prohibited from updating can be quickly found, thereby enabling timely maintenance of the target database and improving the efficiency of database maintenance.

[0063] Step 306: Receive the table records returned by the server that match the update query information; the table records that match the update query information are obtained by the server from the update table of the target database based on the update query information; the update table is generated based on the update information corresponding to multiple update events in the target database.

[0064] Specifically, the terminal receives the table records returned by the server that match the update query information, and displays these table records in the update information display area of ​​the update information query interface. The terminal can also display the statistical results of multiple table records using visual charts such as pie charts and bar charts in the update information display area.

[0065] In this embodiment, when there are questions about the data in the target database, in order to trace the person who made the changes and the content modified, it is usually necessary to input a database log query statement in a non-visual environment to query the update information of the target database. Furthermore, the update information displayed in a non-visual environment is not intuitive. Since the update information query interface is a visual interface, simple click and selection operations can be performed through the update information query interface, reducing query time and achieving fast querying. Moreover, by receiving the update query information input into the update information query interface, sending the update query information to the server, and receiving the table records returned by the server that match the update query information, the update information of the target database can be filtered, displaying the only update information that the user wants to view. This allows for faster tracing of the person who made the changes and the content modified, thereby improving the efficiency of database maintenance.

[0066] In some embodiments, the update information corresponding to the update event includes object information of the event triggering object, which is the object that triggers the update event. The update information corresponding to the update event also includes database change information, which reflects the changes that have occurred in the target database triggered by the update event. The steps of generating the update table include: for each update information, obtaining the attribute field and the corresponding attribute field value from the object information in the update information; obtaining the first table field corresponding to the attribute field, using the table field and the attribute field value corresponding to the attribute field as the field value of the first table field; determining the second table field corresponding to the database change information, using the database change information as the field value of the second table field; generating the table record corresponding to the update information based on the field value of the first table field and the field value of the second table field; and generating the update table based on the table record corresponding to each update information.

[0067] The update information includes the object information of the event triggering object and the database change information. It may also include the update time and update type. Therefore, the table fields of the update table also include a third table field corresponding to the update time attribute and a fourth table field corresponding to the update type attribute.

[0068] Specifically, for each update, the server can obtain the attribute fields and their corresponding attribute field values ​​from the object information in the update information, obtain the first table field corresponding to the attribute field, and use the table field and the attribute field value as the field value of the first table field; then the server determines the second table field corresponding to the database change information and uses the database change information as the field value of the second table field; the server can also determine the third table field corresponding to the update time attribute and the fourth table field corresponding to the update type attribute in the update information, use the field value corresponding to the update time attribute as the field value of the third table field, use the field value corresponding to the update type attribute as the field value of the fourth table field, combine the field values ​​of the first table field, the second table field, the third table field, and the fourth table field to obtain the table record corresponding to the update information, and then fill the update table with the table records corresponding to each update information.

[0069] In this embodiment, by determining the first table field corresponding to the attribute field, the attribute field value corresponding to the attribute field is used as the field value of the first table field, and by determining the second table field corresponding to the database change information, the database change information is used as the field value of the second table field, and the update information is transformed into a table record in the update table. The update information is stored in a table format, making the data more intuitive.

[0070] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0071] Based on the same inventive concept, this application also provides a database processing apparatus for implementing the database processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more database processing apparatus embodiments provided below can be found in the limitations of the database processing method described above, and will not be repeated here.

[0072] In some embodiments, such as Figure 4As shown, a database processing apparatus is provided, comprising: an update information acquisition module 402, an update table generation module 404, a table record acquisition module 406, and a table record return module 408, wherein:

[0073] The update information acquisition module 402 is used to acquire update information corresponding to multiple update events in the target database; the update information corresponding to the update events is used to record the update process of the update events for the target database.

[0074] The update table generation module 404 is used to generate an update table based on each update information; the update table includes multiple table records, and the data in each table record is obtained from the corresponding update information.

[0075] The table record acquisition module 406 is used to receive update query information for the target database sent by the terminal through the update information query interface, and to retrieve table records that match the update query information from the update table of the target database.

[0076] The table record return module 408 is used to return the table records that match the update query information to the terminal, so that the terminal can display the table records that match the update query information on the update information query interface.

[0077] In some embodiments, the update information corresponding to the update event includes object information of the event triggering object, which is the object that triggers the update event. The update information corresponding to the update event also includes database change information, which reflects the changes that have occurred in the target database triggered by the update event. The update table generation module 404 is further configured to: for each update information, obtain attribute fields and their corresponding attribute field values ​​from the object information in the update information; obtain the first table field corresponding to the attribute field, use the table field and the attribute field value corresponding to the attribute field as the field value of the first table field; determine the second table field corresponding to the database change information, use the database change information as the field value of the second table field; generate a table record corresponding to the update information based on the field values ​​of the first table field and the second table field; and generate an update table based on the table records corresponding to each update information.

[0078] In some embodiments, the object information includes attribute field values ​​corresponding to multiple attribute fields; the table generation module 404 is used to: obtain the first table fields corresponding to each attribute field in the object information; different attribute fields correspond to different first table fields; update the query information to include the specified field value corresponding to the first table field; the table record acquisition module is also used to: obtain table records from the updated table of the target database where the field value of the first table field is the specified field value.

[0079] In some embodiments, such as Figure 5 As shown, a database processing device is provided, which includes: a query interface display module 502, a query information sending module 504, and a table record receiving module 506, wherein:

[0080] The query interface display module 502 is used to display the query interface for update information of the target database.

[0081] The query information sending module 504 is used to receive update query information entered into the update information query interface and send the update query information to the server.

[0082] The table record receiving module 506 is used to receive the table records returned by the server that match the update query information; the table records that match the update query information are obtained by the server from the update table of the target database based on the update query information; the update table is generated based on the update information corresponding to multiple update events in the target database.

[0083] Each module in the aforementioned database processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0084] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores relevant data involved in database processing methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a database processing method.

[0085] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a database processing method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0086] Those skilled in the art will understand that Figure 6 and Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0087] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the database processing method described above.

[0088] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the database processing method described above.

[0089] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the database processing method described above.

[0090] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0091] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0092] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A database processing method, characterized in that, The method includes: Obtain update information corresponding to multiple update events of the target database; the update information corresponding to each update event is used to record the update process of the update event for the target database; the update information corresponding to each update event includes object information of the event triggering object, the event triggering object is the object that triggers the update event, and the update information corresponding to each update event also includes database change information, the database change information is used to reflect the changes that occur in the target database triggered by the update event; generate an update table based on each update information; the update table includes multiple table records, and the data in each table record is obtained from the corresponding update information; wherein, generating the update table based on each update information includes: For each update message, retrieve the attribute field and the corresponding attribute field value from the object information in the update message; Obtain the first table field corresponding to the attribute field, use the attribute field value corresponding to the attribute field as the field value of the first table field, and determine the second table field corresponding to the database change information, and use the database change information as the field value of the second table field; The table record corresponding to the update information is generated based on the field values ​​of the first table field and the field values ​​of the second table field; An update table is generated based on the table records corresponding to each update information; the update query information for the target database is sent by the receiving terminal through the update information query interface, and the table record matching the update query information is obtained from the update table of the target database; The table records that match the update query information are returned to the terminal so that the terminal can display the table records that match the update query information on the update information query interface.

2. The method according to claim 1, characterized in that, The object information includes the attribute field values ​​corresponding to multiple attribute fields; The first table field corresponding to the attribute field includes: Obtain the first table field corresponding to each attribute field in the object information; different attribute fields correspond to different first table fields. The update query information includes the specified field value corresponding to the field in the first table; retrieving the table record matching the update query information from the update table in the target database includes: Retrieve table records from the updated table of the target database where the field value of the first table field is the specified field value.

3. A database processing method, characterized in that, The method includes: Displays an interface for querying update information for the target database; Receive update query information input into the update information query interface, and send the update query information to the server; The server receives table records that match the update query information. These table records are obtained by the server from the update table of the target database based on the update query information. The update table is generated based on update information corresponding to multiple update events in the target database. The update information corresponding to each update event includes object information of the event triggering object, which is the object that triggers the update event. The update information also includes database change information, which reflects the changes that occur in the target database triggered by the update event. The steps for generating the updated table include: For each update message, obtain the attribute field and the corresponding attribute field value from the object information in the update message; Obtain the first table field corresponding to the attribute field, use the value of the attribute field corresponding to the table field and the attribute field as the field value of the first table field, determine the second table field corresponding to the database change information, use the database change information as the field value of the second table field, and generate the table record corresponding to the update information based on the field value of the first table field and the field value of the second table field; An update table is generated based on the table records corresponding to each of the update information.

4. A database processing apparatus, characterized in that, The device includes: The update information acquisition module is used to acquire update information corresponding to multiple update events of the target database. The update information corresponding to the update events is used to record the update process of the update events for the target database. The update information corresponding to the update events includes object information of the event triggering object, which is the object that triggers the update event. The update information corresponding to the update events also includes database change information, which reflects the changes that occur in the target database triggered by the update events. An update table generation module is used to generate an update table based on the update information; the update table includes multiple table records, and the data in each table record is obtained from the corresponding update information; wherein, generating the update table based on the update information includes: For each update message, retrieve the attribute field and the corresponding attribute field value from the object information in the update message; Obtain the first table field corresponding to the attribute field, use the attribute field value corresponding to the attribute field as the field value of the first table field, and determine the second table field corresponding to the database change information, and use the database change information as the field value of the second table field; The table record corresponding to the update information is generated based on the field values ​​of the first table field and the field values ​​of the second table field; An update table is generated based on the table records corresponding to each of the aforementioned update information; The table record acquisition module is used to receive update query information for the target database sent by the terminal through the update information query interface, and to acquire table records that match the update query information from the update table of the target database. The table record return module is used to return the table records that match the update query information to the terminal, so that the terminal can display the table records that match the update query information on the update information query interface.

5. A database processing apparatus, characterized in that, The device includes: The query interface display module is used to display the query interface for update information of the target database; The query information sending module is used to receive update query information input into the update information query interface and send the update query information to the server; The table record receiving module is used to receive table records returned by the server that match the update query information; the table records that match the update query information are obtained by the server from the update table of the target database according to the update query information; the update table is generated based on the update information corresponding to multiple update events of the target database; wherein, the update information corresponding to the update event includes object information of the event triggering object, the event triggering object is the object that triggers the update event, and the update information corresponding to the update event also includes database change information, the database change information is used to reflect the changes that occur in the target database triggered by the update event; The steps for generating the updated table include: For each update message, obtain the attribute field and the corresponding attribute field value from the object information in the update message; Obtain the first table field corresponding to the attribute field, use the value of the attribute field corresponding to the table field and the attribute field as the field value of the first table field, determine the second table field corresponding to the database change information, use the database change information as the field value of the second table field, and generate the table record corresponding to the update information based on the field value of the first table field and the field value of the second table field; An update table is generated based on the table records corresponding to each of the update information.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data query method and device, equipment and storage medium

    CN109783543A

  • Data query method and device and electronic equipment

    CN111125156A