Method and apparatus for remote database maintenance via client

By analyzing the processing nodes and historical upload efficiency of database maintenance tasks, and assigning maintenance permissions to clients, the problem of low efficiency in database administrators understanding maintenance tasks is solved, thus achieving efficient distributed database maintenance and secure and reliable remote maintenance.

CN117290333BActive Publication Date: 2025-12-02WUHAN XINGYUAN YUNYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311244346.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-12-02
Estimated Expiration
2043-09-26

AI Technical Summary

Technical Problem

Database administrators are unable to quickly and accurately understand the key content of maintenance items uploaded by relevant personnel at the central node, resulting in low maintenance efficiency.

Method used

By analyzing the processing nodes of database maintenance tasks and obtaining historical upload efficiency, if it is lower than a preset threshold, maintenance permissions are assigned to the client, allowing intermediate nodes to remotely maintain the database. Blockchain technology is used to ensure data security and traceability, thereby achieving distributed maintenance.

Benefits of technology

It improves the efficiency and response speed of database maintenance, reduces the burden on administrator nodes, realizes distributed maintenance and multi-node collaborative work, and enhances the reliability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117290333B_ABST
    Figure CN117290333B_ABST
Patent Text Reader

Abstract

This application relates to the field of database technology, specifically a method and apparatus for remotely maintaining a database via a client. The method includes: acquiring database maintenance items to be uploaded; analyzing and obtaining the processing nodes for these maintenance items, including a first administrator node and a first intermediate node; if the database maintenance item is located at the first intermediate node, acquiring relevant historical data on uploading the database maintenance item to the first administrator node via the first intermediate node; based on the relevant historical data, acquiring the historical upload efficiency of the first intermediate node; if the historical upload efficiency is lower than a preset efficiency threshold, assigning maintenance permissions to the client of the first intermediate node, allowing remote database maintenance via the client of the first intermediate node. Using this method, relevant personnel at the central node can directly perform maintenance operations on the client, improving 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 database technology, and in particular to a method and apparatus for remotely maintaining a database via a client. Background Technology

[0002] Database maintenance is crucial for ensuring the normal operation of a database. However, currently, most database maintenance is performed by designated database administrator nodes through a central server. When personnel at the central node need to maintain the database, they must upload the proposed maintenance tasks to the database administrator node, which then performs the maintenance centrally based on these tasks. However, this process can easily lead to inefficiency, as database administrators may not be able to quickly and accurately understand the key details of the maintenance tasks uploaded by personnel at the central node.

[0003] Therefore, there is an urgent need for a method and device for remotely maintaining a database via a client to solve the problem of low efficiency caused by the database administrator's inability to quickly and accurately understand the key content of maintenance matters uploaded by relevant personnel at the central node. Summary of the Invention

[0004] Therefore, it is necessary to provide a method and apparatus for remote database maintenance via a client, which can solve the problem that database administrators cannot quickly and accurately understand the key content of maintenance matters uploaded by relevant personnel at the central node, resulting in low efficiency.

[0005] Firstly, this application provides a method for remotely maintaining a database via a client. The method includes:

[0006] Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, the processing nodes include a first administrator node and a first intermediate node;

[0007] If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0008] Based on the relevant historical data, obtain the historical upload efficiency of the first intermediate node;

[0009] If the historical upload efficiency is lower than a preset efficiency threshold, maintenance permissions are assigned to the client of the first intermediate node. These maintenance permissions allow the database to be maintained remotely through the client of the first intermediate node.

[0010] In one embodiment, the client that assigns maintenance permissions to the first intermediate node includes:

[0011] Obtain the address information of all intermediate nodes within the region, and query the preset control association table to obtain the sequence number corresponding to the address information of all intermediate nodes;

[0012] If the sequence number corresponding to the address information of the intermediate node is not in the end sequence number, then send the instruction to allocate maintenance permissions to the intermediate node located in the end sequence number.

[0013] The intermediate node located at the end sequence number forwards the instruction to allocate maintenance permissions to the neighboring intermediate node, so that the neighboring intermediate node continues to forward the instruction to allocate maintenance permissions in sequence number order until the instruction to allocate maintenance permissions is sent to the client of the first intermediate node.

[0014] In one embodiment, the method further includes:

[0015] Obtain the historical number of times the database has been remotely maintained by the client through the first intermediate node;

[0016] If the number of maintenance operations is greater than a preset threshold, and the difference between the sequence number of the first intermediate node and the end sequence number is less than a preset difference threshold, then the first intermediate node is designated as the second administrator node. The second administrator node and the first administrator node are used to jointly obtain database maintenance items uploaded by other intermediate nodes besides the first intermediate node.

[0017] In one embodiment, after designating the first intermediate node as the second administrator node, the following steps are included:

[0018] Obtain database maintenance information uploaded by other intermediate nodes forwarded by the second administrator node, and obtain the identity data of the other intermediate nodes;

[0019] Based on the identity data of the other intermediate nodes, determine whether the identity data is valid;

[0020] If the identity data is valid, a first execution instruction is sent to the second administrator node. The first execution instruction is used to remind the second administrator node to perform the database maintenance tasks uploaded by the other intermediate nodes in order to maintain the database.

[0021] In one embodiment, after obtaining the database maintenance matters uploaded by other intermediate nodes forwarded by the second administrator node and obtaining the identity data of the other intermediate nodes, the method further includes:

[0022] The database maintenance information uploaded by other intermediate nodes and the identity data of the other intermediate nodes, which are forwarded by the second administrator node, are uploaded to the blockchain network.

[0023] Obtain the withdrawal request information for identity data and / or the withdrawal request information for database maintenance matters sent by the client of any of the other intermediate nodes;

[0024] Based on the withdrawal request information of identity data and / or the withdrawal request information of database maintenance matters, determine whether the client of any intermediate node is the target client;

[0025] If so, then the identity data and / or database maintenance matters are scheduled to the client of any of the intermediate nodes;

[0026] Obtain the identity data and / or the scheduling record of the database maintenance matters, and upload the scheduling record to the blockchain network.

[0027] In one embodiment, after assigning maintenance permissions to the client of the first intermediate node, the method further includes:

[0028] Obtain database maintenance items uploaded by the client of the first intermediate node, and add the database maintenance items to a shared operation folder, which is used by the first administrator node for operation;

[0029] According to the preset distributed scheduled task, traverse each database maintenance item in the shared operation folder and obtain the file content of each database maintenance item;

[0030] Based on the file content of each database maintenance item, a second execution instruction is sent to the client of the first intermediate node. The first execution instruction is used to remind the client of the first intermediate node to execute the database maintenance item in order to maintain the database.

[0031] In one embodiment, after sending the second execution instruction to the client of the first intermediate node, the process includes:

[0032] Obtain relevant historical data on each database maintenance task performed by the first intermediate node, and visualize the relevant historical data.

[0033] Secondly, this application also provides an apparatus for remotely maintaining a database via a client. The apparatus includes:

[0034] The acquisition module is used to acquire database maintenance items to be uploaded;

[0035] The processing module is used to analyze and obtain the processing nodes for the database maintenance matters, and the processing nodes include a first administrator node and a first intermediate node;

[0036] The acquisition module is also used to acquire relevant historical data of database maintenance matters uploaded to the first administrator node through the first intermediate node if the database maintenance matter is at the first intermediate node;

[0037] The processing module is also used to obtain the historical upload efficiency of the first intermediate node based on the relevant historical data;

[0038] The permission allocation module is used to allocate maintenance permissions to the client of the first intermediate node if the historical upload efficiency is lower than a preset efficiency threshold. The maintenance permissions are used to allow remote maintenance of the database through the client of the first intermediate node.

[0039] 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 perform the following steps:

[0040] Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, the processing nodes include a first administrator node and a first intermediate node;

[0041] If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0042] Based on the relevant historical data, obtain the historical upload efficiency of the first intermediate node;

[0043] If the historical upload efficiency is lower than a preset efficiency threshold, maintenance permissions are assigned to the client of the first intermediate node. These maintenance permissions allow the database to be maintained remotely through the client of the first intermediate node.

[0044] 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, performs the following steps:

[0045] Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, the processing nodes include a first administrator node and a first intermediate node;

[0046] If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0047] Based on the relevant historical data, obtain the historical upload efficiency of the first intermediate node;

[0048] If the historical upload efficiency is lower than a preset efficiency threshold, maintenance permissions are assigned to the client of the first intermediate node. These maintenance permissions allow the database to be maintained remotely through the client of the first intermediate node.

[0049] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0050] Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, the processing nodes include a first administrator node and a first intermediate node;

[0051] If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0052] Based on the relevant historical data, obtain the historical upload efficiency of the first intermediate node;

[0053] If the historical upload efficiency is lower than a preset efficiency threshold, maintenance permissions are assigned to the client of the first intermediate node. These maintenance permissions allow the database to be maintained remotely through the client of the first intermediate node.

[0054] The aforementioned method and apparatus for remotely maintaining a database via a client analyze the processing nodes of database maintenance tasks, including a first administrator node and a first intermediate node. If a database maintenance task is located at the first intermediate node, relevant historical data uploaded from the first intermediate node to the first administrator node can be obtained. Based on this historical data, the historical upload efficiency of the first intermediate node can be calculated. If the historical upload efficiency is lower than a preset efficiency threshold, maintenance permissions can be assigned to the client of the first intermediate node, allowing remote database maintenance through that client. This addresses the problem of low efficiency caused by database administrators' inability to quickly and accurately understand the key content of maintenance tasks uploaded by relevant personnel at the central node. By analyzing historical data, it determines whether the upload efficiency of the first intermediate node is lower than a preset efficiency threshold. If it is, maintenance permissions are assigned to the client of the first intermediate node, enabling remote database maintenance through the client. In this way, relevant personnel at the central node can directly perform maintenance operations on the client, avoiding the process of uploading maintenance tasks to the database administrator and improving maintenance efficiency. Attached Figure Description

[0055] Figure 1 This is an application environment diagram of a method for remotely maintaining a database via a client, as shown in one embodiment.

[0056] Figure 2 This is a flowchart illustrating a method for remotely maintaining a database via a client in one embodiment.

[0057] Figure 3 This is a flowchart illustrating a method for remotely maintaining a database via a client, as described in another embodiment.

[0058] Figure 4 This is a structural block diagram of an apparatus for remotely maintaining a database via a client, as shown in one embodiment.

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

[0060] 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.

[0061] The method for remotely maintaining a database via a client, provided in this application embodiment, can be applied to, for example... Figure 1 In the application environment shown, 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 located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0062] In one embodiment, such as Figure 2 As shown, a method for remotely maintaining a database via a client is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:

[0063] Step S202: Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, including the first administrator node and the first intermediate node.

[0064] Specifically, the database maintenance items to be uploaded refer to those requiring database maintenance, proposed by relevant personnel at the central node. Processing nodes are the nodes these maintenance items must traverse during maintenance operations. In this design, processing nodes include the first administrator node and the first intermediate node. The first administrator node is the designated database administrator node, responsible for the unified maintenance and management of the database. The first intermediate node is an intermediate node within the central node, which may be designated by the database administrator or automatically selected by the system. By acquiring the database maintenance items to be uploaded and analyzing their processing nodes, it's possible to determine which nodes the maintenance items need to pass through for processing. This prepares for subsequent maintenance operations, such as determining whether maintenance permissions need to be assigned to clients of the first intermediate node to improve maintenance efficiency.

[0065] Step S204: If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node.

[0066] Specifically, if database maintenance tasks are located at the first intermediate node, it means these tasks need to be uploaded to the first administrator node through the first intermediate node. In this case, relevant historical data can be obtained, namely, records of database maintenance tasks that have been uploaded to the first administrator node through the first intermediate node in the past. By obtaining this historical data, the upload efficiency of the first intermediate node can be analyzed to understand whether there have been inefficiencies in the upload of maintenance tasks by the first intermediate node in past maintenance operations. This can serve as a basis for determining whether maintenance permissions should be assigned to the clients of the first intermediate node. If the historical upload efficiency is lower than a preset efficiency threshold, it can be considered to assign maintenance permissions to the clients of the first intermediate node to improve maintenance efficiency.

[0067] Step S206: Obtain the historical upload efficiency of the first intermediate node based on relevant historical data.

[0068] Specifically, obtaining the historical upload efficiency of the first intermediate node based on relevant historical data refers to understanding the efficiency of the first intermediate node in uploading database maintenance tasks by analyzing past data records. This helps us assess the maintenance task processing capacity of the first intermediate node, thereby deciding whether to transfer maintenance permissions to the client of the first intermediate node. Collecting historical data: Collecting records of past database maintenance tasks, including upload time, uploaded content, uploader, etc., ensuring that these records include maintenance tasks uploaded from the first intermediate node to the first administrator node. Analyzing upload time: Analyzing the upload time of each maintenance task and calculating the time spent uploading to the first administrator node. This measures the upload efficiency of the first intermediate node, i.e., the transmission speed of maintenance tasks from the first intermediate node to the first administrator node. Comparing efficiency thresholds: Comparing the historical upload efficiency of the first intermediate node with a preset efficiency threshold. If the historical upload efficiency is lower than the threshold, it indicates that the processing capacity of the first intermediate node is low, and it may be necessary to consider allocating maintenance permissions to the client of the first intermediate node.

[0069] Step S208: If the historical upload efficiency is lower than the preset efficiency threshold, then maintenance permissions are assigned to the client of the first intermediate node. The maintenance permissions are used to allow remote maintenance of the database through the client of the first intermediate node.

[0070] Specifically, if the historical upload efficiency is lower than a preset efficiency threshold, it means that the first intermediate node has been inefficient in handling database maintenance tasks in past maintenance operations. To improve maintenance efficiency, maintenance permissions can be assigned to the clients of the first intermediate node, allowing them to perform database maintenance operations remotely.

[0071] Specifically, assigning maintenance permissions to clients on the first intermediate node means they will gain certain control and permissions to perform database maintenance operations, including but not limited to tasks such as backup, recovery, optimization, repair, and monitoring. By allowing clients on the first intermediate node to perform remote maintenance, the burden on the first administrator node can be reduced, improving the efficiency and response speed of maintenance operations. Furthermore, distributed maintenance can be implemented, enabling multiple nodes to perform maintenance operations simultaneously, thus improving overall maintenance capabilities.

[0072] In this embodiment, by analyzing the processing nodes of database maintenance tasks, maintenance tasks can be distributed to appropriate nodes for processing, avoiding excessive load concentration on the first administrator node. Simultaneously, by analyzing the historical upload efficiency of the first intermediate node, its capacity to handle maintenance tasks can be assessed, thereby rationally allocating maintenance tasks and improving overall maintenance efficiency. After assigning maintenance permissions to the clients of the first intermediate node, distributed maintenance can be achieved, allowing multiple nodes to perform maintenance operations simultaneously, improving overall maintenance capabilities. This reduces the burden on the first administrator node, improving maintenance concurrency and response speed. After assigning maintenance permissions to the clients of the first intermediate node, database maintenance operations can be performed remotely. This reduces the transmission time and latency of maintenance tasks, improving the response speed of maintenance operations.

[0073] In one embodiment, refer to Figure 3 Clients that assign maintenance permissions to the first intermediate node include:

[0074] Step S302: Obtain the address information of all intermediate nodes in the region, and query the preset control association table to obtain the sequence number corresponding to the address information of all intermediate nodes.

[0075] Step S304: If the sequence number corresponding to the address information of the intermediate node is not in the end sequence number, then send the instruction to allocate maintenance authority to the intermediate node located in the end sequence number.

[0076] In step S306, the intermediate node located at the end sequence number forwards the instruction to allocate maintenance rights to the neighboring intermediate nodes, so that the neighboring intermediate nodes continue to forward the instruction to allocate maintenance rights in sequence number order until the instruction to allocate maintenance rights is sent to the client of the first intermediate node.

[0077] Specifically, first, the address information of all intermediate nodes within the region is obtained, and a query is performed in a pre-defined control association table to obtain the sequence numbers corresponding to these intermediate node addresses. These sequence numbers can be used to represent the positional order of the intermediate nodes. For each intermediate node, it is determined whether the sequence number corresponding to its address information is an end sequence number. If it is not an end sequence number, it means that the intermediate node has neighboring intermediate nodes. For intermediate nodes with end sequence numbers, a command to allocate maintenance permissions is sent to that intermediate node. The intermediate node with the end sequence number forwards the command to allocate maintenance permissions to its neighboring intermediate nodes. The neighboring intermediate nodes continue to forward the command to allocate maintenance permissions in sequence number order until the command to allocate maintenance permissions is sent to the client of the first intermediate node.

[0078] For example, suppose there are four intermediate nodes in the region, and their address information and corresponding sequence numbers are as follows:

[0079] Intermediate Node A - Address: 192.168.1.100, Serial Number: 1

[0080] Intermediate node B - Address: 192.168.1.101, Sequence number: 2

[0081] Intermediate node C - Address: 192.168.1.102, Serial Number: 3

[0082] Intermediate node D - Address: 192.168.1.103, Sequence number: 4

[0083] The maintenance permission allocation process follows the steps described above: Obtain the address information of all intermediate nodes within the region and retrieve their corresponding sequence numbers. For intermediate node A, its sequence number is 1, placing it at the end of the sequence. Therefore, a maintenance permission allocation instruction is sent to intermediate node A. Intermediate node A forwards the instruction to its neighboring intermediate node B. Intermediate node B forwards the instruction to its neighboring intermediate node C. Intermediate node C forwards the instruction to its neighboring intermediate node D. Intermediate node D is the last node and therefore does not forward the instruction further, instead sending it to the client of the first intermediate node. Through this process, maintenance permissions are forwarded sequentially from intermediate node A to intermediate nodes B, C, and D according to their sequence numbers, ultimately reaching the client of the first intermediate node. This ensures the correctness of the maintenance permission allocation order and transmission path.

[0084] In this embodiment, the order of maintenance permission allocation is determined by the sequence number and address information of the intermediate nodes, and the maintenance permission instruction is transmitted to the client of the first intermediate node through forwarding between intermediate nodes. This ensures that maintenance permissions are allocated to each intermediate node in sequence, thereby achieving sequential execution of maintenance tasks.

[0085] In one embodiment, the method further includes: obtaining the historical number of times the database is remotely maintained by the client through the first intermediate node; if the number of maintenance times is greater than a preset number threshold, and the difference between the sequence number of the first intermediate node and the end sequence number is less than a preset difference threshold, then the first intermediate node is designated as the second administrator node, wherein the second administrator node and the first administrator node are used to jointly obtain database maintenance matters uploaded by other intermediate nodes besides the first intermediate node.

[0086] Specifically, firstly, the client of the first intermediate node can obtain the historical maintenance count of the database. If the historical maintenance count is greater than a preset threshold, and the difference between the sequence number of the first intermediate node and the end sequence number is less than a preset difference threshold, then the first intermediate node is designated as the second administrator node. The first and second administrator nodes collaborate to retrieve database maintenance requests uploaded by other intermediate nodes besides the first intermediate node. In summary, this process determines whether to designate the first intermediate node as the second administrator node based on certain conditions, and the first and second administrator nodes collaborate to retrieve database maintenance requests uploaded by other intermediate nodes. This allows for appropriate operations and permission allocation based on the maintenance count and the intermediate node's sequence number.

[0087] In this embodiment, the serial number and address information of intermediate nodes ensure that maintenance permissions are sequentially passed from the first intermediate node to other intermediate nodes, achieving sequential execution of maintenance tasks. Based on the historical maintenance count of the database and the difference between the intermediate node's serial number and the end node's serial number, it is determined whether the first intermediate node meets the condition to be designated as the second administrator node, thus achieving condition filtering and operation allocation. The first and second administrator nodes collaborate to obtain database maintenance items uploaded by other intermediate nodes besides the first intermediate node, enabling collaborative work among multiple nodes.

[0088] In one embodiment, after designating the first intermediate node as the second administrator node, the following is included:

[0089] Step S402: Obtain database maintenance information uploaded by other intermediate nodes and forwarded by the second administrator node, as well as the identity data of the other intermediate nodes.

[0090] Step S404: Determine whether the identity data is valid based on the identity data of other intermediate nodes.

[0091] Step S406: If the identity data is valid, a first execution instruction is sent to the second administrator node. The first execution instruction is used to remind the second administrator node to perform database maintenance tasks uploaded by other intermediate nodes in order to maintain the database.

[0092] Specifically, the first administrator node needs to obtain database maintenance requests uploaded by other intermediate nodes and forwarded by the second administrator node, and also obtain the identity data of these intermediate nodes. Based on the obtained identity data, the first administrator node determines whether the identity data is valid. If the identity data is valid, the first administrator node sends a first execution instruction to the second administrator node. The purpose of the first execution instruction is to remind the second administrator node to execute the database maintenance requests uploaded by the other intermediate nodes to maintain the database.

[0093] In this embodiment, by verifying the legitimacy of the identity data, if it is legitimate, an instruction is sent to the second administrator node to execute the database maintenance tasks uploaded by other intermediate nodes, thereby maintaining the database. By verifying the legitimacy of the identity data uploaded by other intermediate nodes, malicious users can be prevented from tampering with data or impersonating legitimate users to perform illegal operations. Verifying the legitimacy of identity data can prevent malicious users from exploiting system security vulnerabilities to illegally access or attack the system, protecting it from attacks. Legitimacy verification ensures that only database maintenance tasks uploaded by authenticated intermediate nodes are executed, thus guaranteeing data integrity and reliability. Legitimacy verification prevents unauthorized intermediate nodes from obtaining sensitive user identity data, thereby protecting user privacy.

[0094] In one embodiment, after obtaining database maintenance matters uploaded by other intermediate nodes forwarded by the second administrator node, and obtaining the identity data of the other intermediate nodes, the method further includes:

[0095] Step S502 involves uploading the database maintenance information forwarded by the second administrator node from other intermediate nodes, as well as the identity data of the other intermediate nodes, to the blockchain network.

[0096] Step S504: Obtain the withdrawal request information for identity data and / or the withdrawal request information for database maintenance matters sent by the client of any of the other intermediate nodes.

[0097] Step S506: Based on the withdrawal application information of identity data and / or the withdrawal application information of database maintenance matters, determine whether the client of any intermediate node is the target client.

[0098] Step S508: If so, then dispatch identity data and / or database maintenance matters to the client of any intermediate node;

[0099] Step S510: Obtain the scheduling record of identity data and / or database maintenance matters, and upload the scheduling record to the blockchain network.

[0100] Specifically, the second administrator node uploads database maintenance requests and identity data uploaded by other intermediate nodes to the blockchain network. This means that the second administrator node creates relevant data records on the blockchain. Clients of any intermediate node can send requests for withdrawal of identity data and / or database maintenance requests. These requests may include a detailed description of the requested specific identity data or database maintenance request. Based on the withdrawal request information, the system determines whether the intermediate node's client is the target client. This may involve verifying and matching the request information to ensure permissions and accuracy. If the intermediate node's client is confirmed as the target client, the system will schedule the corresponding identity data and / or database maintenance request to that client. This means the target client will receive the requested data or request. During the scheduling process, the system records detailed scheduling information, including which intermediate node's client requested what data or request, and uploads these scheduling records to the blockchain network. This helps ensure the transparency and traceability of the scheduling process.

[0101] In this embodiment, blockchain technology is used to achieve security, trustworthiness, and traceability of data scheduling. By storing data and scheduling records on the blockchain, data security can be ensured, and an auditable scheduling process can be provided. Furthermore, the decentralized nature of the blockchain network also helps to improve the system's reliability and resistance to attacks.

[0102] In one embodiment, after assigning maintenance permissions to the client of the first intermediate node, the method further includes:

[0103] Step S602: Obtain the database maintenance items uploaded by the client of the first intermediate node, and add the database maintenance items to the shared operation folder. The shared operation folder is used for the first administrator node to operate.

[0104] Step S604: According to the preset distributed scheduled task, traverse each database maintenance item in the shared operation folder and obtain the file content of each database maintenance item.

[0105] In step S606, based on the file content of each database maintenance item, a second execution instruction is sent to the client of the first intermediate node. The first execution instruction is used to remind the client of the first intermediate node to perform database maintenance items in order to maintain the database.

[0106] Specifically, the client of the first intermediate node uploads database maintenance items and lists them in the shared operation folder. This means that the client of the first intermediate node stores the relevant information of the database maintenance items in the shared folder for other nodes to access and operate. According to a preset distributed scheduled task, the system iterates through each database maintenance item in the shared operation folder. This means that the system automatically checks each item in the shared folder at predetermined time intervals or rules. For each database maintenance item, the system retrieves its file content. This means that the system reads the specific content of each item in the shared folder, which may be scripts, instructions, or descriptions of other maintenance operations. Based on the file content of each database maintenance item, the system sends a second execution instruction to the client of the first intermediate node. This means that the system sends an instruction to the client of the first intermediate node, reminding it to execute the database maintenance item. This instruction may include specific maintenance operations, execution time, and other relevant information. After receiving the second execution instruction, the client of the first intermediate node executes the corresponding database maintenance item. This means that the client of the first intermediate node performs the corresponding maintenance operations on the database according to the description in the instruction.

[0107] In this embodiment, distributed scheduled tasks and a shared operation folder are used to automate and distribute database maintenance. By periodically traversing the shared folder and sending execution commands, the system can promptly process and execute database maintenance tasks. This approach improves the efficiency and accuracy of database maintenance and reduces the need for human intervention.

[0108] In one embodiment, after sending the second execution instruction to the client of the first intermediate node, the process includes: obtaining relevant historical data on the execution of each database maintenance task by the first intermediate node, and visualizing the relevant historical data.

[0109] Specifically, the system acquires historical data related to each database maintenance task performed by the first intermediate node. This means the system records relevant information and data about each database maintenance task performed by the first intermediate node, such as execution time, execution result, and execution duration. This historical data can be used for subsequent analysis and visualization. The system then visualizes the acquired historical data, such as generating charts, reports, or other forms of graphical representation. Through visualization, users can more intuitively understand the execution status and trends of database maintenance tasks.

[0110] In this embodiment, the purpose of visualizing historical data is to provide a comprehensive understanding and analysis of the execution status of database maintenance tasks. By observing the visualized historical data, users can identify potential problems, optimize execution strategies, and make corresponding adjustments. Simultaneously, visualization also helps in evaluating the effectiveness of database maintenance tasks, such as whether execution time meets requirements and whether execution results meet expectations. In short, visualizing historical data can improve the monitoring and management capabilities of database maintenance task execution.

[0111] In other embodiments, the method further includes:

[0112] Remote login: Use a remote login tool (such as SSH, RDP, etc.) to remotely connect to the database server via a client and perform maintenance operations. This method requires enabling remote login functionality on the database server and configuring the appropriate security settings.

[0113] Remote command execution: This involves sending commands or scripts from a client to a database server, where they are then executed. Protocols such as SSH and Telnet can be used for remote command execution.

[0114] Database management tools: Use database management tools (such as MySQL Workbench, SQL Server Management Studio, etc.) to remotely connect to the database server via a client to perform database maintenance operations. This method provides more convenient operation and management through a graphical interface.

[0115] API calls: Using the database's provided API interface, the client remotely calls the database's maintenance interface to perform corresponding maintenance operations. This method is suitable when the database provides publicly accessible API interfaces, and the client can access these interfaces.

[0116] Web console: A web-based management interface accessed via a web browser by a client, allowing for remote database maintenance. This method typically involves a web-based management interface provided by the database vendor, enabling users to manage and maintain the database through a browser.

[0117] These technologies can be used to remotely maintain databases, choosing the appropriate method based on specific needs and scenarios. Remote database maintenance via client-side methods can improve management and maintenance efficiency, enhance troubleshooting and monitoring capabilities, reduce costs and manpower, and improve the flexibility and operability of database management.

[0118] It should be understood that although the steps in the flowcharts of the embodiments described above 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 embodiments described above 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.

[0119] Based on the same inventive concept, this application also provides an apparatus for remotely maintaining a database via a client to implement the above-described method for remotely maintaining a database via a client. The solution provided by this apparatus is similar to the implementation described in the above-described method. Therefore, the specific limitations of one or more apparatus embodiments for remotely maintaining a database via a client provided below can be found in the limitations of the method for remotely maintaining a database via a client described above, and will not be repeated here.

[0120] In one embodiment, such as Figure 4 As shown, an apparatus for remotely maintaining a database via a client is provided, comprising:

[0121] Module 402 is used to retrieve database maintenance items to be uploaded;

[0122] Processing module 404 is used to analyze and obtain the processing nodes for database maintenance matters. The processing nodes include the first administrator node and the first intermediate node.

[0123] The acquisition module 402 is also used to acquire relevant historical data of database maintenance matters uploaded to the first administrator node through the first intermediate node if the database maintenance matter is at the first intermediate node;

[0124] The processing module 404 is also used to obtain the historical upload efficiency of the first intermediate node based on relevant historical data;

[0125] The permission allocation module 406 is used to allocate maintenance permissions to the client of the first intermediate node if the historical upload efficiency is lower than a preset efficiency threshold. The maintenance permissions are used to allow the client of the first intermediate node to remotely maintain the database.

[0126] In one embodiment, the device includes:

[0127] The acquisition module 402 is also used to acquire the address information of all intermediate nodes in the region and query the preset control association table to obtain the serial number corresponding to the address information of all intermediate nodes.

[0128] The sending module is used to send an instruction to allocate maintenance permissions to the intermediate node located at the end sequence number if the sequence number corresponding to the address information of the intermediate node is not located at the end sequence number.

[0129] The sending module is also used to forward the instruction for allocating maintenance rights from the intermediate node located at the end sequence number to the neighboring intermediate node, so that the neighboring intermediate node continues to forward the instruction for allocating maintenance rights in the order of the sequence number until the instruction for allocating maintenance rights is sent to the client of the first intermediate node.

[0130] In one embodiment, the device further includes:

[0131] The acquisition module 402 is also used to acquire the historical number of times the database has been remotely maintained by the client through the first intermediate node;

[0132] The processing module 404 is further configured to, if the number of maintenance operations is greater than a preset threshold and the difference between the sequence number of the first intermediate node and the end sequence number is less than a preset difference threshold, designate the first intermediate node as the second administrator node, wherein the second administrator node and the first administrator node are used to jointly obtain database maintenance items uploaded by other intermediate nodes besides the first intermediate node.

[0133] In one embodiment, the device further includes:

[0134] The acquisition module 402 is also used to acquire database maintenance matters uploaded by other intermediate nodes forwarded by the second administrator node, and to acquire the identity data of other intermediate nodes;

[0135] Processing module 404 is also used to determine whether the identity data is valid based on the identity data of other intermediate nodes;

[0136] The sending module is also used to send a first execution instruction to the second administrator node if the identity data is valid. The first execution instruction is used to remind the second administrator node to perform database maintenance tasks uploaded by other intermediate nodes in order to maintain the database.

[0137] In one embodiment, the device further includes:

[0138] The upload module is used to upload database maintenance information, which is forwarded by the second administrator node from other intermediate nodes, as well as the identity data of other intermediate nodes, to the blockchain network.

[0139] The acquisition module 402 is also used to acquire the withdrawal application information of identity data and / or the withdrawal application information of database maintenance matters sent by the client of any of the other intermediate nodes;

[0140] The processing module 404 is also used to determine whether the client of any intermediate node is the target client based on the withdrawal application information of the identity data and / or the withdrawal application information of the database maintenance matters.

[0141] The scheduling module is also used to schedule identity data and / or database maintenance matters to the client of any intermediate node, depending on whether the client of any intermediate node is the target client.

[0142] The acquisition module 402 is also used to acquire identity data and / or scheduling records of database maintenance matters, and the upload module is also used to upload the scheduling records to the blockchain network.

[0143] In one embodiment, the device further includes:

[0144] The acquisition module 402 is also used to acquire database maintenance items uploaded by the client of the first intermediate node, and the processing module 404 is also used to list the database maintenance items in a shared operation folder, which is used for the first administrator node to operate.

[0145] The processing module 404 is also used to traverse each database maintenance item in the shared operation folder according to the preset distributed scheduled task and obtain the file content of each database maintenance item.

[0146] The sending module is also used to send a second execution instruction to the client of the first intermediate node based on the file content of each database maintenance item. The first execution instruction is used to remind the client of the first intermediate node to perform database maintenance items in order to maintain the database.

[0147] In one embodiment, the device further includes:

[0148] The acquisition module 402 is also used to acquire relevant historical data of each database maintenance task performed by the first intermediate node, and the display module is used to visualize the relevant historical data.

[0149] The modules in the aforementioned device for remotely maintaining the database via a client 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 corresponding operations of each module.

[0150] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces 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 interfaces. 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 interfaces are 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 executed by the processor, the computer program implements a method for remotely maintaining a database via a client. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a 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.

[0151] Those skilled in the art will understand that Figure 5 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.

[0152] In one embodiment, 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 perform the following steps:

[0153] Step S202: Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, including the first administrator node and the first intermediate node;

[0154] Step S204: If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0155] Step S206: Obtain the historical upload efficiency of the first intermediate node based on relevant historical data;

[0156] Step S208: If the historical upload efficiency is lower than the preset efficiency threshold, then maintenance permissions are assigned to the client of the first intermediate node. The maintenance permissions are used to allow remote maintenance of the database through the client of the first intermediate node.

[0157] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0158] Step S202: Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, including the first administrator node and the first intermediate node;

[0159] Step S204: If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0160] Step S206: Obtain the historical upload efficiency of the first intermediate node based on relevant historical data;

[0161] Step S208: If the historical upload efficiency is lower than the preset efficiency threshold, then maintenance permissions are assigned to the client of the first intermediate node. The maintenance permissions are used to allow remote maintenance of the database through the client of the first intermediate node.

[0162] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0163] Step S202: Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, including the first administrator node and the first intermediate node;

[0164] Step S204: If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node;

[0165] Step S206: Obtain the historical upload efficiency of the first intermediate node based on relevant historical data;

[0166] Step S208: If the historical upload efficiency is lower than the preset efficiency threshold, then maintenance permissions are assigned to the client of the first intermediate node. The maintenance permissions are used to allow remote maintenance of the database through the client of the first intermediate node.

[0167] 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.

[0168] 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.

[0169] 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.

[0170] 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 method for remotely maintaining a database via a client, characterized in that, The method includes: Obtain the database maintenance items to be uploaded, analyze and obtain the processing nodes of the database maintenance items, the processing nodes include a first administrator node and a first intermediate node; If the database maintenance item is at the first intermediate node, then obtain the relevant historical data of the database maintenance item uploaded to the first administrator node through the first intermediate node; Based on the relevant historical data, obtain the historical upload efficiency of the first intermediate node; If the historical upload efficiency is lower than a preset efficiency threshold, maintenance permissions are assigned to the client of the first intermediate node. These maintenance permissions allow the database to be maintained remotely through the client of the first intermediate node.

2. The method according to claim 1, characterized in that, The client that assigns maintenance permissions to the first intermediate node includes: Obtain the address information of all intermediate nodes within the region, and query the preset control association table to obtain the sequence number corresponding to the address information of all intermediate nodes; If the sequence number corresponding to the address information of the intermediate node is not in the end sequence number, then send the instruction to allocate maintenance permissions to the intermediate node located in the end sequence number. The intermediate node located at the end sequence number forwards the instruction to allocate maintenance permissions to the neighboring intermediate node, so that the neighboring intermediate node continues to forward the instruction to allocate maintenance permissions in sequence number order until the instruction to allocate maintenance permissions is sent to the client of the first intermediate node.

3. The method according to claim 2, characterized in that, The method further includes: Obtain the historical number of times the database has been remotely maintained by the client through the first intermediate node; If the number of maintenance operations is greater than a preset threshold, and the difference between the sequence number of the first intermediate node and the end sequence number is less than a preset difference threshold, then the first intermediate node is designated as the second administrator node. The second administrator node and the first administrator node are used to jointly obtain database maintenance items uploaded by other intermediate nodes besides the first intermediate node.

4. The method according to claim 3, characterized in that, After designating the first intermediate node as the second administrator node, the following steps are included: Obtain database maintenance information uploaded by other intermediate nodes forwarded by the second administrator node, and obtain the identity data of the other intermediate nodes; Based on the identity data of the other intermediate nodes, determine whether the identity data is valid; If the identity data is valid, a first execution instruction is sent to the second administrator node. The first execution instruction is used to remind the second administrator node to perform the database maintenance tasks uploaded by the other intermediate nodes in order to maintain the database.

5. The method according to claim 4, characterized in that, After obtaining the database maintenance items uploaded by other intermediate nodes forwarded by the second administrator node, and obtaining the identity data of the other intermediate nodes, the process further includes: The database maintenance information uploaded by other intermediate nodes and the identity data of the other intermediate nodes, which are forwarded by the second administrator node, are uploaded to the blockchain network. Obtain the withdrawal request information for identity data and / or the withdrawal request information for database maintenance matters sent by the client of any of the other intermediate nodes; Based on the withdrawal request information of identity data and / or the withdrawal request information of database maintenance matters, determine whether the client of any intermediate node is the target client; If so, then the identity data and / or database maintenance matters are scheduled to the client of any of the intermediate nodes; Obtain the identity data and / or the scheduling record of the database maintenance matters, and upload the scheduling record to the blockchain network.

6. The method according to claim 4, characterized in that, After assigning maintenance permissions to the client of the first intermediate node, the method further includes: Obtain database maintenance items uploaded by the client of the first intermediate node, and add the database maintenance items to a shared operation folder, which is used by the first administrator node for operation; According to the preset distributed scheduled task, traverse each database maintenance item in the shared operation folder and obtain the file content of each database maintenance item; Based on the file content of each database maintenance item, a second execution instruction is sent to the client of the first intermediate node. The second execution instruction is used to remind the client of the first intermediate node to execute the database maintenance item in order to maintain the database.

7. The method according to claim 6, characterized in that, After sending the second execution instruction to the client of the first intermediate node, the process includes: Obtain relevant historical data on each database maintenance task performed by the first intermediate node, and visualize the relevant historical data.

8. An apparatus for remotely maintaining a database via a client, characterized in that, The device includes: The acquisition module is used to acquire database maintenance items to be uploaded; The processing module is used to analyze and obtain the processing nodes for the database maintenance matters, and the processing nodes include a first administrator node and a first intermediate node; The acquisition module is also used to acquire relevant historical data of database maintenance matters uploaded to the first administrator node through the first intermediate node if the database maintenance matter is at the first intermediate node; The processing module is also used to obtain the historical upload efficiency of the first intermediate node based on the relevant historical data; The permission allocation module is used to allocate maintenance permissions to the client of the first intermediate node if the historical upload efficiency is lower than a preset efficiency threshold. The maintenance permissions are used to allow remote maintenance of the database through the client of the first intermediate node.

9. 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 7.

10. 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 7.

Citation Information

Patent Citations

  • Fault diagnosis and remote maintenance method and system for platform door system

    CN111026094A

  • Blockchain node management method and apparatus, computer device, and storage medium

    WO2022134471A1