A database navigation tree updating method and apparatus

By detecting executed statements and updating the database navigation tree based on changes, the problem of the database navigation tree not being able to be updated in real time was solved, improving the user experience and reducing resource consumption.

CN122309532APending Publication Date: 2026-06-30SHANGHAI DAMENG DATABASE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI DAMENG DATABASE
Filing Date
2026-03-31
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

The existing database navigation tree cannot be updated in real time to reflect changes in database objects caused by database operations, resulting in a poor user experience.

Method used

By detecting executed statements, it is determined whether database object operations have resulted in changes, and the database navigation tree is updated based on the change information. Different navigation tree update strategies are used to achieve synchronous updates.

Benefits of technology

It enables synchronized updates of database object operations and navigation tree, improving user experience and reducing resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309532A_ABST
    Figure CN122309532A_ABST
Patent Text Reader

Abstract

The application discloses a database navigation tree updating method and device. The specific implementation scheme comprises the following steps: determining an execution statement; detecting the execution statement to obtain a detection result; determining change information in the case that the detection result indicates that the database object operation causes the database object to change; and updating the database navigation tree based on the change information. The detection result is obtained by detecting the execution statement, the detection of the execution statement corresponding to the database object operation is realized, the database navigation tree is updated according to the change information when the database object operation causes the database object to change, the synchronous updating of the database object operation and the database navigation tree is realized, the database navigation tree is updated to different degrees through the detailed degree of the change information, the resource consumption is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database technology, and in particular to a method and apparatus for updating a database navigation tree. Background Technology

[0002] Currently, database navigation trees typically only adjust the displayed content of the operated node and its child nodes when an add, delete, modify, or refresh operation is performed on the node. The results of other database object operations are not synchronized to the corresponding nodes in the database navigation tree.

[0003] Database operations outside the database navigation tree (such as SQL execution within the SQL editor) do not synchronously update changes to database objects in the navigation tree. Similarly, changes to database objects outside the current node resulting from operations on nodes within the navigation tree are not synchronously updated across nodes (e.g., if an operation on node A causes changes to database objects under node B, and node B is not a child node of node A, the changes will not be automatically updated to node B). This asynchrony between database object operations and the database navigation tree display makes the navigation tree content unreal-time and unreliable, rendering it unusable for effectively viewing the results of database object operations. Summary of the Invention

[0004] This invention provides a method and apparatus for updating a database navigation tree, thereby achieving synchronous updates of the database navigation tree and improving user experience.

[0005] According to one aspect of the present invention, a database navigation tree update method is provided, comprising: Determine the execution statements, which include statements used when performing database object operations, and the database object operations include operations related to the database object; The executed statement is detected to obtain a detection result, which indicates whether the database object operation has caused the database object to change. If the detection result indicates that the database object operation has caused a change to the database object, change information is determined, including information that the database object has been changed. Update the database navigation tree based on the aforementioned change information.

[0006] According to another aspect of the present invention, a database navigation tree updating apparatus is provided, comprising: The first determining module is used to determine the execution statement, which includes the statement used when performing database object operations, and the database object operations include operations related to the database object; The detection module is used to detect the executed statement and obtain the detection result, which indicates whether the database object operation has caused the database object to change. The second determining module is used to determine change information when the detection result indicates that the database object operation has caused the database object to change, the change information including information that the database object has been changed; The update module is used to update the database navigation tree based on the change information.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the database navigation tree update method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the database navigation tree update method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the database navigation tree update method according to any embodiment of the present invention.

[0010] The technical solution of this invention involves: determining the execution statement; detecting the execution statement to obtain a detection result; determining change information when the detection result indicates that the database object operation has caused a change in the database object; and updating the database navigation tree based on the change information. By detecting the execution statement and obtaining the detection result, the detection of the execution statement corresponding to the database object operation is achieved. When the database object operation causes a change in the database object, the database navigation tree is updated according to the change information, realizing the synchronous update of the database object operation and the database navigation tree. The database navigation tree is updated to different degrees based on the level of detail of the change information, reducing resource consumption and improving the user experience.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a database navigation tree update method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a database object change detection thread according to Embodiment 1 of the present invention; Figure 3 This is a flowchart of a detection method provided according to Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of a database navigation tree updating device according to Embodiment 3 of the present invention; Figure 5 This is a block diagram of an electronic device provided according to Embodiment 4 of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Example 1 Figure 1This is a flowchart of a database navigation tree update method according to Embodiment 1 of the present invention. This embodiment is applicable to updating the database navigation tree. The method can be executed by a database navigation tree update device, which can be implemented in hardware and / or software. The database navigation tree update device can be configured in an electronic device, which may include a PC or a server, etc. Figure 1 As shown, the method includes: S110, Determine the statement to be executed.

[0017] The execution statements include statements used when performing database object operations, and the database object operations include operations related to the database object.

[0018] In this embodiment, execution statements can be understood as statements used to perform database object operations. Database object operations can be implemented through execution statements. Database object operations can be understood as operations related to database objects, such as adding, deleting, querying, and modifying database objects.

[0019] Specifically, when performing database object operations, the client background executes the relevant statements to complete the database object operation. The execution is then passed to the database object change detection thread, which, if already running, begins detecting the executed statements.

[0020] S120. The executed statement is detected to obtain the detection result.

[0021] The detection result indicates whether the database object operation caused a change to the database object.

[0022] In this embodiment, the detection result can be understood as an indication of whether the database object operation has caused a change in the database object. The changes in the database object include, for example, adding an object, deleting an object, or a change in the object's state.

[0023] Specifically, the first step is to assess the executed statement at the language level. Keyword searches or syntactic analysis can be used to determine if the statement only manipulates data. If so, it means the database object operation did not result in any changes to the database object; otherwise, further analysis of the database object's state before and after the operation is needed to obtain the detection result for the executed statement.

[0024] For example, a simple analysis of the executed statement can be performed to determine from the language level whether the executed statement is a pure data operation statement, that is, a statement that only operates on data (such as SELECT, UPDATE, INSERT, DELETE, etc.).

[0025] S130. If the detection result indicates that the database object operation has caused a change in the database object, determine the change information.

[0026] The change information includes information about changes made to the database object.

[0027] In this embodiment, change information can be understood as information about changes that have occurred to the database object before and after performing database object operations.

[0028] Specifically, when the detection result indicates that the database object operation has caused a change in the database object, the information that the database object has changed before and after the database object operation is executed is recorded, and this information is identified as change information.

[0029] For example, methods for scanning and querying information indicated by database objects may include: driver interface query, which obtains information about the current database object through the standard database access interface provided by the database connection driver (such as a JDBC driver), compares it with the information of the database object queried previously, and obtains the change information; and system table query, which executes SQL queries to obtain information about the current database object based on the system table information provided by each database (such as DM SYSOBJECTS, Oracle ALL_OBJECTS), compares it with the information of the database object queried previously, and obtains the change information.

[0030] For example, change information may include: the number of changes to various database objects, and specific information such as the object type, name, and status of the database objects that have been changed.

[0031] S140. Update the database navigation tree based on the change information.

[0032] In this embodiment, a database navigation tree can be understood as a tree that includes at least one node. A database navigation tree is a hierarchical data structure that can be used to visualize and organize database objects and their relationships in a database.

[0033] Specifically, the level of detail in the change information is determined, and different navigation tree update strategies are set for the database navigation tree based on this level of detail. By applying different update strategies, the database navigation tree can be updated. The more detailed the change information, the fewer nodes the navigation tree update strategy needs to refresh.

[0034] The technical solution of this invention involves: determining the execution statement; detecting the execution statement to obtain a detection result; determining change information when the detection result indicates that the database object operation has caused a change in the database object; and updating the database navigation tree based on the change information. By detecting the execution statement and obtaining the detection result, the detection of the execution statement corresponding to the database object operation is achieved. When the database object operation causes a change in the database object, the database navigation tree is updated according to the change information, realizing the synchronous update of the database object operation and the database navigation tree. The database navigation tree is updated to different degrees based on the level of detail of the change information, reducing resource consumption and improving the user experience.

[0035] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

[0036] In one embodiment, prior to determining the execution statement, the following is also included: The database object change detection thread and its corresponding thread state are determined. The database object change detection thread is used to detect the database object. The thread state indicates whether the database object change detection thread is awakened. If the thread state indicates that the database object change detection thread has been awakened, end the sleep of the database object change detection thread.

[0037] In this embodiment, the database object change detection thread can be understood as a thread used to detect whether a database object has changed. The database object change detection thread can be a group of programs. The thread state can be understood as the state of whether the database object change detection thread has been notified and awakened.

[0038] Specifically, a database object change detection thread is identified. This thread enters a waiting state, awaiting notification to be awakened. This notification is sent by the program. If the database object change detection thread receives a notification and its corresponding thread status indicates that it has been awakened, the thread's sleep state ends, and it begins detecting database objects. Conversely, if the database object change detection thread receives a notification and its corresponding thread status indicates that it is closed, the thread terminates.

[0039] For example, Figure 2 This is a flowchart of a database object change detection thread according to Embodiment 1 of the present invention. Figure 2As shown, after determining the database object change detection thread, the current state of the database object can be recorded. The database object change detection thread is then put into a waiting state, awaiting notification and its state being determined in real time. When the thread state indicates that the database object change detection thread has been awakened, the sleep state of the thread is terminated; when the thread state indicates that the database object change detection thread is shut down, the thread is terminated.

[0040] In one embodiment, updating the database navigation tree based on the change information includes: Determine the level of detail in the change information; Based on the level of detail, a navigation tree refresh strategy is determined, which includes a strategy for updating the database navigation tree; Update the database navigation tree using the navigation tree refresh strategy.

[0041] In this embodiment, the level of detail can be understood as the information indicating the content contained in the change information. For example, the change information may only indicate that there is an object change but without specific information, or provide the number of object changes, or provide specific information about the changed object.

[0042] Specifically, the level of detail for the change information is determined. This information may include specific details about changes to database objects, or only information about changes to database objects. Different navigation tree refresh strategies are specified for each information type based on the level of detail. The database navigation tree is then refreshed to varying degrees based on these strategies.

[0043] Optionally, determining the navigation tree refresh strategy based on the level of detail includes: If the information type indicates that the level of detail of the change information is the first level of detail, then the navigation tree update strategy is determined to be refreshing the database navigation tree; Based on the stated level of detail, a navigation tree update strategy is constructed. This strategy includes refreshing the changed nodes contained in the database navigation tree according to the stated level of detail. Specifically, the more detailed the change information indicated by the level of detail, the more accurately the navigation tree update strategy can locate the changed nodes in the database navigation tree that need to be refreshed. This avoids more meaningless repeated refreshes of the database navigation tree, and the level of detail of the change information can be reasonably adjusted according to actual application needs. For example, when the level of detail of the change information is the first level, it indicates that the change information involves changes to a database object but does not provide specific information about the changed database object. In this case, the database navigation tree needs to be fully refreshed to synchronize the changed content (i.e., the node count information and the information on all nodes are refreshed). Therefore, the navigation tree update strategy is to refresh the database navigation tree.

[0044] When the level of detail for the change information is the second level, it indicates that the change information pertains to the number of database object changes. The database navigation tree can synchronously refresh the node count information and the first change node with the changed count based on the number of database object changes. Therefore, the navigation tree update strategy is to refresh the first change node contained in the database navigation tree.

[0045] When the level of detail for the change information is the third level, it indicates that the change information includes detailed information such as the database object type, name, and status. The database navigation tree can accurately locate the second change node and directly update the object node attributes according to the detailed information. Therefore, the navigation tree update strategy is to refresh the second change node contained in the database navigation tree.

[0046] The first level of detail indicates that the change information only includes changes to database objects without providing specific details about those objects. The second level of detail indicates that the change information includes the number of database objects changed. The first change node can be understood as the node in the database navigation tree that counts the changes. The third level of detail indicates that the change information includes detailed information such as the database object type, name, and status. The second change node can be understood as the node in the database navigation tree that shows attribute changes.

[0047] Example 2 Figure 3 This is a flowchart of a detection method according to Embodiment 2 of the present invention. This embodiment focuses on the detection method for executed statements described in the above embodiments. Figure 3 As shown, the method includes: S210, Determine the statement to be executed.

[0048] S220. The executed statement is judged, and the judgment result is determined.

[0049] The determination result indicates whether the executed statement is a data manipulation statement, which includes statements that operate on the data stored in the database indicated by the executed statement.

[0050] In this embodiment, the judgment result can be understood as indicating whether the executed statement is the result of a data manipulation statement. The judgment result can be obtained by analyzing the executed statement at the language level. A data manipulation statement can be understood as a statement that operates on the data contained in the executed statement. A data manipulation statement can be a statement that performs operations such as adding, deleting, modifying, and querying data.

[0051] For example, such as Figure 2 As shown, a simple analysis of the executed statement is performed. Through keyword retrieval or syntax analysis, it is determined at the language level whether the executed statement is a data manipulation statement, and the result is obtained. Examples of data manipulation statements include: SELECT, UPDATE, INSERT, DELETE, etc.

[0052] S230. If the judgment result indicates that the executed statement is the data operation statement, determine that the detection result is that the database object operation did not cause the database object to be changed.

[0053] For example, such as Figure 2 As shown, if the judgment result indicates that the executed statement is a data manipulation statement, it is determined that the database object operation did not cause any change to the database object. This means that the execution process of the statement corresponding to the database object operation did not result in any change to the database object. The database object change detection thread is then put back into a waiting state to receive the next notification.

[0054] S240. If the judgment result indicates that the executed statement is not the data operation statement, determine the state of the first database object and the state of the second database object, and determine the detection result based on the state of the first database object and the state of the second database object.

[0055] The first database object state includes the state of the database object before performing the database object operation, and the second database object state includes the state of the database object after performing the database object operation.

[0056] In this embodiment, the first database object state can be understood as the state of the database object before performing the current database object operation. This state can be obtained by scanning records after determining the database object change detection thread, or it can be determined as the second database object state when the database object change detection thread entered sleep mode in the previous loop. The second database object state can be understood as the state of the database object after performing the database object operation. This state can be obtained by scanning records after obtaining the judgment result.

[0057] Specifically, if the judgment result indicates that the executed statement is not a data manipulation statement, it is necessary to further determine the detection result based on the state of the database object. This can be achieved by scanning and recording the current state of the database object after the judgment result indicates that the executed statement is not a data manipulation statement, using this as the second database object state, and combining it with the already determined first database object state to obtain the detection result.

[0058] Optionally, determining the detection result based on the state of the first database object and the state of the second database object includes: Compare the state of the first database object with the state of the second database object to obtain a comparison result, the comparison result indicating whether the state of the first database object and the state of the second database object are consistent; Based on the comparison results, the detection results are determined.

[0059] In this embodiment, the comparison result can be understood as the result obtained by comparing the state of the first database object and the state of the second database object. The comparison result can be used to indicate whether the state of the first database object and the state of the second database object are consistent.

[0060] For example, such as Figure 2 As shown, by comparing the scan results from the previous scan (first database object state) and the current scan (second database object state), a comparison result indicating whether the two scan results are consistent is obtained.

[0061] Optionally, determining the detection result based on the comparison result includes: If the comparison result indicates that the state of the first database object and the state of the second database object are consistent, then the detection result is determined to be that the database object operation did not cause any change to the database object; Otherwise, the detection result indicates that the database object operation caused a change to the database object.

[0062] For example, such as Figure 2 As shown, if the comparison result indicates that the state of the first database object is the same as the state of the second database object, it means that the execution process of the statement corresponding to the database object operation did not result in a change to the database object. Therefore, the detection result is determined to be that the database object operation did not cause a change to the database object, and the database object change detection thread then re-enters the waiting state to receive the next notification. If the comparison result indicates that the state of the first database object is different from the state of the second database object, it means that the execution process of the statement corresponding to the database object operation has resulted in a change to the database object. Therefore, the detection result is determined to be that the database object operation caused a change to the database object. Next, the change information needs to be determined, and the database navigation tree needs to be updated based on the change information.

[0063] S250, If the detection result indicates that the database object operation has caused a change in the database object, determine the change information.

[0064] S260. Update the database navigation tree based on the change information.

[0065] The technical solution of this invention involves judging the executed statement and determining a judgment result. If the judgment result indicates that the executed statement is a data operation statement, the detection result is determined to be that the database object operation did not cause a change in the database object. If the judgment result indicates that the executed statement is not a data operation statement, a first database object state and a second database object state are determined, and a detection result is determined based on the first and second database object states. By judging whether the executed statement is a data operation statement to obtain a judgment result, preliminary detection of the executed statement is achieved. Then, by determining the detection result based on the first and second database object states, real-time detection of whether the database object has changed is achieved, thereby completing the synchronous update of database object operations and the database navigation tree.

[0066] Example 3 Figure 4 This is a schematic diagram of a database navigation tree update device according to Embodiment 3 of the present invention. Figure 4 As shown, the device includes: The first determining module 310 is used to determine the execution statement, which includes the statement used when performing database object operations, and the database object operations include operations related to the database object. The detection module 320 is used to detect the executed statement and obtain a detection result, wherein the detection result indicates whether the database object operation causes the database object to change. The second determining module 330 is used to determine change information when the detection result indicates that the database object operation has caused the database object to change, the change information including information that the database object has been changed. The update module 340 is used to update the database navigation tree based on the change information.

[0067] The database navigation tree update device provided in this embodiment of the invention determines the execution statement through a first determining module; detects the execution statement through a detection module to obtain a detection result; determines change information through a second determining module when the detection result indicates that the database object operation has caused a change in the database object; and updates the database navigation tree based on the change information through an update module. Through the cooperation of these modules, the execution statement is detected to obtain a detection result, thus realizing the detection of the execution statement corresponding to the database object operation. When the database object operation causes a change in the database object, the database navigation tree is updated according to the change information, achieving synchronous updates between the database object operation and the database navigation tree. The database navigation tree is updated to different degrees based on the level of detail of the change information, reducing resource consumption and improving the user experience.

[0068] In one embodiment, the detection module 320 includes: The judgment unit is used to judge the executed statement and determine the judgment result. The judgment result indicates whether the executed statement is a data operation statement. The data operation statement includes statements that operate on the data stored in the database indicated by the executed statement. The first determining unit is configured to determine, when the judgment result indicates that the executed statement is the data operation statement, that the detection result is that the database object operation did not cause the database object to be changed; The second determining unit is configured to determine the first database object state and the second database object state when the judgment result indicates that the executed statement is not the data operation statement, and to determine the detection result based on the first database object state and the second database object state. The first database object state includes the state of the database object before the database object operation is performed, and the second database object state includes the state of the database object after the database object operation is performed.

[0069] In one embodiment, the second determining unit includes: A comparison subunit is used to compare the state of the first database object and the state of the second database object to obtain a comparison result, wherein the comparison result indicates whether the state of the first database object and the state of the second database object are consistent. A subunit is defined for determining the detection result based on the comparison result.

[0070] In one embodiment, the sub-unit is determined specifically for: If the comparison result indicates that the state of the first database object and the state of the second database object are consistent, then the detection result is determined to be that the database object operation did not cause any change to the database object; Otherwise, the detection result indicates that the database object operation caused a change to the database object.

[0071] In one embodiment, the database navigation tree update device further includes a startup module, specifically used for: The database object change detection thread and its corresponding thread state are determined. The database object change detection thread is used to detect the database object. The thread state indicates whether the database object change detection thread is awakened. If the thread state indicates that the database object change detection thread has been awakened, end the sleep of the database object change detection thread.

[0072] In one embodiment, the update module 340 includes: The third determining unit is used to determine the level of detail of the change information; The fourth determining unit is used to determine a navigation tree refresh strategy based on the level of detail, wherein the navigation tree refresh strategy includes a strategy for updating the database navigation tree; An update unit is used to update the database navigation tree using the navigation tree refresh strategy.

[0073] In one embodiment, the fourth determining unit is specifically used for: Based on the level of detail, a navigation tree update strategy is constructed, which includes a strategy for refreshing the change nodes contained in the database navigation tree according to the level of detail.

[0074] The database navigation tree update device provided in this embodiment of the invention can execute the database navigation tree update method provided in any embodiment of the invention. Through the cooperation and coordination between the modules, the update of the database navigation tree is completed, and it has the corresponding functional modules and beneficial effects of the execution method.

[0075] Example 4 According to embodiments of the present invention, the present invention also provides an electronic device, a computer-readable storage medium, and a computer program product.

[0076] Figure 5This is a block diagram of an electronic device according to Embodiment 4 of the present invention, which implements the database navigation tree update method described in the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0077] like Figure 5 As shown, the electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory (ROM) 412 or a random access memory (RAM) 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the ROM 412 or loaded from storage unit 418 into the RAM 413. The RAM 413 may also store various programs and data required for the operation of the electronic device 410. The processor 411, ROM 412, and RAM 413 are interconnected via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0078] Multiple components in the electronic device are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, optical disk, etc.; and a communication unit 419, such as a network card, modem, wireless transceiver, etc. The communication unit 419 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0079] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as the database navigation tree update method.

[0080] In some embodiments, the database navigation tree update method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the database navigation tree update method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured to perform the database navigation tree update method by any other suitable means (e.g., by means of firmware).

[0081] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0083] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0085] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0086] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0087] In some embodiments, the computer program product includes a computer program that, when executed by a processor, implements the database navigation tree update method provided in the embodiments of the present invention.

[0088] The technical solution of this invention provides a database navigation tree update method and apparatus. The process involves: determining an execution statement; detecting the execution statement to obtain a detection result; determining change information when the detection result indicates that a database object operation has caused a change in the database object; and updating the database navigation tree based on the change information. By detecting the execution statement and obtaining the detection result, the system detects the execution statement corresponding to the database object operation. When a database object operation causes a change in the database object, the database navigation tree is updated according to the change information, achieving synchronous updates between the database object operation and the database navigation tree. By updating the database navigation tree to different degrees based on the level of detail of the change information, resource consumption is reduced and the user experience is improved.

[0089] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0090] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A database navigation tree update method, characterized in that, include: Determine the execution statements, which include statements used when performing database object operations, and the database object operations include operations related to the database object; The executed statement is detected to obtain a detection result, which indicates whether the database object operation has caused the database object to change. If the detection result indicates that the database object operation has caused a change to the database object, change information is determined, and the change information includes information that the database object has been changed. Update the database navigation tree based on the aforementioned change information.

2. The method according to claim 1, characterized in that, The step of detecting the executed statement and obtaining the detection result includes: The executed statement is judged, and the judgment result is determined. The judgment result indicates whether the executed statement is a data operation statement. The data operation statement includes statements that operate on the data stored in the database indicated by the executed statement. If the judgment result indicates that the executed statement is the data operation statement, it is determined that the detection result is that the database object operation did not cause any change to the database object; If the judgment result indicates that the executed statement is not the data operation statement, the first database object state and the second database object state are determined, and the detection result is determined based on the first database object state and the second database object state. The first database object state includes the state of the database object before the database object operation is performed, and the second database object state includes the state of the database object after the database object operation is performed.

3. The method according to claim 2, characterized in that, The step of determining the detection result based on the state of the first database object and the state of the second database object includes: The states of the first database object and the second database object are compared to obtain a comparison result, which indicates whether the states of the first database object and the second database object are consistent. Based on the comparison results, the detection results are determined.

4. The method according to claim 3, characterized in that, Determining the detection result based on the comparison result includes: If the comparison result indicates that the state of the first database object and the state of the second database object are consistent, then the detection result is determined to be that the database object operation did not cause any change to the database object; Otherwise, the detection result indicates that the database object operation caused a change to the database object.

5. The method according to claim 1, characterized in that, Before determining the execution statement, the following is also included: The database object change detection thread and its corresponding thread state are determined. The database object change detection thread is used to detect the database object. The thread state indicates whether the database object change detection thread is awakened. If the thread state indicates that the database object change detection thread has been awakened, end the sleep of the database object change detection thread.

6. The method according to claim 1, characterized in that, The step of updating the database navigation tree based on the change information includes: Determine the level of detail in the change information; Based on the level of detail, a navigation tree refresh strategy is determined, which includes a strategy for updating the database navigation tree; Update the database navigation tree using the navigation tree refresh strategy.

7. The method according to claim 6, characterized in that, The determination of the navigation tree refresh strategy based on the level of detail includes: Based on the level of detail, a navigation tree update strategy is constructed, which includes a strategy for refreshing the change nodes contained in the database navigation tree according to the level of detail.

8. A database navigation tree updating device, characterized in that, include: The first determining module is used to determine the execution statement, which includes the statement used when performing database object operations, and the database object operations include operations related to the database object; The detection module is used to detect the executed statement and obtain the detection result, which indicates whether the database object operation has caused the database object to change. The second determining module is used to determine change information when the detection result indicates that the database object operation has caused the database object to change, the change information including information that the database object has been changed; The update module is used to update the database navigation tree based on the change information.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the database navigation tree update method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the database navigation tree update method according to any one of claims 1-7.

11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the database navigation tree update method according to any one of claims 1-7.