Business recovery methods, systems and devices

By receiving access reconnection requests from clients and assembling file access information on the target server, the problem of high database read/write pressure during server failover in distributed file systems is solved, improving server processing performance and the success rate of transparent failover.

CN122093382APending Publication Date: 2026-05-26SUGON INFORMATION IND +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUGON INFORMATION IND
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In distributed file systems, when switching over a faulty server, existing technologies place heavy read and write pressure on the database, impacting server processing performance.

Method used

The target server receives the client's access reconnection request, assembles file access information according to the request type, and directly restores the client's access to the target file through the assembled file access information, reducing database read and write operations.

Benefits of technology

This reduces the read and write pressure on the database, improves the server's processing performance, and increases the success rate of transparent failover.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093382A_ABST
    Figure CN122093382A_ABST
Patent Text Reader

Abstract

The application relates to a service recovery method, system and device. The method comprises the following steps: a target server receives an access reconnection request of a client to a target file; the access reconnection request carries file access information of the client and a request type of the target file; the target file is a file requested by the client to access a fault server when no fault switching occurs; the file access information is assembled according to the request type; and the access of the client to the target file is recovered according to the assembled file access information. The target server is a server which undertakes file sharing service of the fault server. The method can improve the processing performance of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a business recovery method, system, and apparatus. Background Technology

[0002] In a distributed file system, each server node can provide file sharing services. When a server node fails, other healthy server nodes can take over the file sharing services that the failed server node has not yet completed.

[0003] In related technologies, when restoring file access services, the server node undertaking the file sharing service needs to obtain historical access information of files from the database that records access data, so as to restore the file access service based on the historical access data.

[0004] However, the business recovery methods in related technologies put significant read and write pressure on the database, affecting the processing performance of the server. Summary of the Invention

[0005] Therefore, it is necessary to provide a business recovery method, system, and apparatus to address the aforementioned technical problems and improve the processing performance of the server.

[0006] In a first aspect, embodiments of this application provide a service recovery method, applied to a target server, which is a server that undertakes the file sharing service of a failed server; the method includes:

[0007] Receive client's access reconnection request for the target file; the access reconnection request carries the client's file access information and the request type of the target file; the target file is the file that the client requested to access from the failed server when no failover occurred;

[0008] The file access information is assembled based on the request type;

[0009] Based on the assembled file access information, restore the client's access to the target file.

[0010] In the business recovery method provided in this application embodiment, the target server receives a client's access reconnection request for a target file. The access reconnection request carries the client's file access information and the request type of the target file. The target file is the file that the client requested access from the failed server when no failover occurred. Then, based on the request type, the file access information is assembled, and then the client's access to the target file is restored based on the assembled file access information. In this method, after the failed server fails and the target server takes over the file sharing service from the failed server, the client sends an access reconnection request for the target file to the target server. The access reconnection request carries file access information and request type, which is equivalent to the target server obtaining the basic parameter information of the client's access to the target file, so that the target server can open the file based on the basic parameter information. On this basis, the target server assembles the file access information according to the request type and opens the file with the assembled file access information to successfully restore the client's access to the target file. This is equivalent to directly realizing the reconnection access to the target file by assembling the file access information brought by the client, eliminating the operation of reading and writing data in the database, reducing the read and write pressure on the database, and improving the processing performance of the server.

[0011] In one embodiment, the file access information is assembled according to the request type, including:

[0012] If the request type is the first access type, the file access information is assembled based on the file name and directory path of the target file in the file access information to obtain the assembled file access information.

[0013] If the request type is a successful reconnection access type, then obtain the historical information assembly method of the target file, assemble the file access information, and obtain the assembled file access information.

[0014] If the request type is "unsuccessful reconnection access", the file access information is assembled and processed according to the general information assembly method to obtain the assembled file access information.

[0015] In the service recovery method provided in this application embodiment, if the request type is an initial access type, the file access information is assembled based on the filename and directory path of the target file in the file access information to obtain the assembled file access information; if the request type is a successful reconnection access type, the historical information assembly method of the target file is obtained, and the file access information is assembled to obtain the assembled file access information; if the request type is an unsuccessful reconnection access type, the file access information is assembled and processed according to the general information assembly method to obtain the assembled file access information. In this method, the assembly method of the file access information is different when the access to the target file corresponds to different request types. Under different request types, the file access information is assembled by obtaining the information assembly method that matches the request type, so that the assembled file access information can better match the client's access method to the target file, thereby improving the accuracy of the file access information assembly.

[0016] In one embodiment, the assembled file access information is obtained by assembling the target file's filename and directory path from the file access information, including:

[0017] Based on multiple information assembly methods, obtain the optimal information assembly method for the target file;

[0018] Based on the optimal information assembly method, the filename and directory path are assembled to obtain the complete path to the target file;

[0019] The complete path is determined as the assembled file access information.

[0020] In the service recovery method provided in this application embodiment, the optimal information assembly method for the target file is obtained based on multiple information assembly methods. Then, the filename and directory path are assembled according to the optimal information assembly method to obtain the complete path to the target file. Finally, the complete path is determined as the assembled file access information. In this method, when the request type is an initial access type, the optimal information assembly method is determined from multiple information assembly methods. The filename and directory path are then assembled using this optimal information assembly method to obtain the assembled file access information. This makes the assembly of file access information more reasonable and accurate, improving the efficiency of querying and accessing the target file.

[0021] In one embodiment, the historical information assembly method of the target file is obtained, and the file access information is assembled to obtain the assembled file access information, including:

[0022] Based on the file access information, obtain the filename of the target file and the directory path where the target file is located;

[0023] Based on the historical information assembly method, the file name and directory path are assembled to obtain the assembled file access information.

[0024] In the service recovery method provided in this application embodiment, the filename and directory path of the target file are obtained based on file access information. Then, the filename and directory path are assembled according to the historical information assembly method to obtain the assembled file access information. In this method, when the request type is a successful reconnection access type, the filename and directory path in the file access information are assembled using the historical information assembly method of the target file to obtain the assembled file access information. The historical information assembly method is the information assembly method when the target file was first accessed on the faulty server. By directly assembling the file access information using this historical information assembly method, the assembled file access information is more accurate, improving the efficiency of the client accessing the target file.

[0025] In one embodiment, file access information is assembled and processed according to a general information assembly method to obtain assembled file access information, including:

[0026] Based on the file access information, obtain the filename of the target file and the directory path where the target file is located;

[0027] Based on the general information assembly method, the file name and directory path are assembled and processed to obtain the processed information;

[0028] The processed information is identified as the assembled file access information.

[0029] In the service recovery method provided in this application embodiment, the filename and directory path of the target file are obtained based on file access information. Then, the filename and directory path are assembled and processed according to a general information assembly method to obtain processed information. This processed information is then determined as the assembled file access information. In this method, when the request type is an unsuccessful reconnection access type, the filename and directory path in the file access information are assembled and processed using a general information assembly method to obtain the assembled file access information. This general information assembly method is applicable to different operating systems. Regardless of the client's operating system, it unifies the assembly method of file access information and avoids path errors caused by operating system differences.

[0030] In one embodiment, restoring the client's access to the target file based on the assembled file access information includes:

[0031] Based on the client information carried in the access reconnection request, perform permission verification on the client;

[0032] If the client's permission verification passes, open the target file based on the assembled file access information;

[0033] The system sends a message to the client indicating that the file was opened successfully, and also sends the access identifier of the target file to the client, thus restoring the client's access to the target file.

[0034] In the service recovery method provided in this application embodiment, the client's permissions are verified based on the client information carried in the access reconnection request. If the client's permissions are verified, the target file is opened according to the assembled file access information. The client is then notified that the file was opened successfully, and the access identifier of the target file is sent to the client, thus restoring the client's access to the target file. In this method, before opening the target file according to the assembled file access information, the client's permissions are verified to confirm whether the client has the permission to open and read / write the target file. If the verification is successful, the target file is opened according to the assembled file access information, and the client is notified that the file was opened successfully, allowing the client to continue reading and writing operations on the target file. This restores the client's access to the target file and improves the success rate of transparent failover.

[0035] Secondly, embodiments of this application also provide a service recovery method applied to a client, the method comprising:

[0036] Send a reconnection request for the target file to the target server, instructing the target server to assemble the file access information in the reconnection request according to the request type, and then restore access to the target file; the target server is the server that takes over the shared service of the failed server; the target file is the file that the client requested to access from the failed server when no failover occurred.

[0037] In the service recovery method provided in this application embodiment, the client sends a reconnection request for access to a target file to the target server, instructing the target server to assemble the file access information in the reconnection request according to the request type, and then restore access to the target file. The target server is the server that takes over the shared service of the failed server; the target file is the file that the client requested to access from the failed server when no failover occurred. In this method, after the failed server fails and the target server takes over the file sharing service of the failed server, the client sends a reconnection request for access to the target file to the target server. The reconnection request carries file access information and request type, which is equivalent to the target server obtaining the basic parameter information of the client's access to the target file, so that the target server can open the file according to the basic parameter information. Based on this, the target server assembles the file access information according to the request type and opens the file with the assembled file access information to successfully restore the client's access to the target file. This is equivalent to directly realizing the reconnection access to the target file by assembling the file access information brought by the client, eliminating the operation of reading and writing data in the database, reducing the read and write pressure on the database, and improving the processing performance of the server.

[0038] In one embodiment, before sending a request to the target server to reconnect to the target file, the method further includes:

[0039] Send an initial access request for the target file to the faulty server, instructing the faulty server to open the target file based on the file access information carried in the initial access request.

[0040] In the service recovery method provided in this application embodiment, an initial access request for a target file is sent to the faulty server to instruct the faulty server to open the target file based on the file access information carried in the initial access request. In this method, before sending a reconnection request for access to the target file to the target server, the client also interacts with the faulty server to access the target file on the faulty server. That is, the client sends an initial access request for the target file to the faulty server, and the initial access request carries file access information. The target file is opened by assembling the file access information, thereby improving bandwidth and stability in fault switching scenarios.

[0041] Thirdly, this application also provides a business recovery system, which includes a client and a server; the server is a shared service that undertakes the faulty server.

[0042] The server is configured to implement the steps of the method in any of the embodiments of the first aspect described above;

[0043] A client for implementing the steps of the method in any of the embodiments of the second aspect described above.

[0044] Fourthly, this application also provides a business recovery device, comprising:

[0045] The request receiving module is used to receive client requests for access to a target file. The access reconnection request carries the client's file access information and the request type of the target file. The target file is the file that the client requests to access from the failed server when no failover has occurred.

[0046] The information assembly module is used to assemble file access information according to the request type;

[0047] The business recovery module is used to restore the client's access to the target file based on the assembled file access information.

[0048] Fifthly, embodiments of this application also provide a service recovery device, including:

[0049] The request sending module is used to send a reconnection request for access to the target file to the target server, instructing the target server to assemble the file access information in the reconnection request according to the request type in the reconnection request and then restore access to the target file; the target server is the server that takes over the shared service of the failed server; the target file is the file that the client requests to access from the failed server when no failover has occurred.

[0050] In a sixth aspect, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the embodiments of the first or second aspect described above.

[0051] In a seventh aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first or second aspect described above.

[0052] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0053] The service recovery method, system, and apparatus provided in this application embodiment involve a target server receiving a client's request to reconnect to a target file. The reconnection request carries the client's file access information and the request type for the target file. The target file is the file the client requested to access from the failed server when no failover occurred. Then, based on the request type, the file access information is assembled, and finally, based on the assembled file access information, the client's access to the target file is restored. In this method, after the failed server fails and the target server takes over the file sharing service, the client sends a request to the target server to reconnect to the target file. The reconnection request carries file access information and the request type, which is equivalent to the target server obtaining the basic parameter information of the client's access to the target file, allowing the target server to open the file based on this basic parameter information. Based on this, the target server assembles the file access information according to the request type and opens the file using the assembled file access information to successfully restore the client's access to the target file. This is equivalent to directly achieving reconnection access to the target file by assembling the file access information brought by the client, eliminating the operation of reading and writing data in the database, reducing the database's read and write pressure, and improving the server's processing performance. Attached Figure Description

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

[0055] Figure 1 This is a schematic diagram illustrating the opening of a file using historical access data in one embodiment.

[0056] Figure 2 This is an application environment diagram of a service recovery method in one embodiment;

[0057] Figure 3 This is a flowchart illustrating a service recovery method in one embodiment;

[0058] Figure 4 This is a schematic diagram of the process of assembling file access information in one embodiment;

[0059] Figure 5 This is a schematic diagram of the process for assembling file access information in another embodiment;

[0060] Figure 6 This is a schematic diagram of the process for assembling file access information in another embodiment;

[0061] Figure 7 This is a schematic diagram of the process for assembling file access information in another embodiment;

[0062] Figure 8 This is a schematic diagram of the process for restoring access services in one embodiment;

[0063] Figure 9 This is a schematic diagram of a process for opening a file using assembled file access information in one embodiment.

[0064] Figure 10 This is a schematic diagram of the service recovery device in one embodiment;

[0065] Figure 11 This is a schematic diagram of the service recovery device in another embodiment;

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

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

[0068] The technical background of the embodiments of this application will be described below.

[0069] Samba is a free software that implements the Server Messages Block (SMB) protocol on Linux and UNIX operating systems. It consists of server and client programs. Samba is one of the most important services for local servers on Linux operating systems, used for file sharing between Linux and Windows operating systems. In a distributed file system, each node independently provides Samba service, sharing the same backend directory. All nodes together form a Samba cluster, supporting high availability and load balancing. Samba clients can access shared folders by mounting to any node providing Samba service via any service IP (Internet Protocol).

[0070] To provide highly available services, after a node within the redundancy range fails, other healthy nodes need to take over the unfinished shared services from the failed node. By taking over the service IP of the failed node, other nodes enable Samba clients corresponding to the failed node to reconnect to the healthy node and continue processing file requests. To support reconnection, Samba clients generate access data when accessing files on the Samba server. During the reconnection process, the Samba client actively reconnects and includes an identifier key corresponding to this access data. The Samba server verifies whether this data matches the key recorded when the node first accessed the file. If they match, the reconnection is accepted using this access data; otherwise, the reconnection request is rejected. Because the Samba protocol is designed to provide services to a single node and does not consider the scenario where IPs can migrate to other nodes to continue handling business in a distributed file system, the data recorded by the server is only stored on the local node by default. When other nodes take over the service IP of the failed node and receive requests from Samba clients corresponding to the failed node, they cannot find the corresponding access data, cannot complete the verification, and therefore cannot reconnect.

[0071] In related technologies, to address the issue of incomplete verification, a method is proposed to synchronize access data to other nodes. This way, even if the local node fails, other nodes, having also recorded the access data, can still complete the verification. For example... Figure 1As shown, the client first mounts to server 1, and server 1 returns support for transparent failover. Then, the client attempts to access files A and B using a method supporting transparent failover (Durable handle request v2, DH2Q). Server 1 records the file opening information in the database of all nodes and successfully returns an open file A with an identifier key1. However, a failure occurs during the process of recording the database and returning a successful open file B, and the request to open file B cannot be completed. At this point, the IP address shifts, and the client detects the IP shift and attempts to remount. Because the client previously received a successful response to open file A, it reopens file A using DH2C (Durable handle reconnect v2, reopening after a successful initial open and transparent failover) with key1. Server 2 searches for the identifier key1 in the database. After a successful search, it uses the information from the value corresponding to identifier key1 to compose the file access information, successfully opens the file, and returns the result. Since the client did not receive a response confirming the successful opening of file B, it was unsure whether the Samba server 1 had previously opened the file. Therefore, it reopened file B using a DH2Q replay operation (Durable handle request v2 replay operation, which does not know whether the initial file opening was successful and reopens the file after a transparent failover). Server 2 searched the database for a record of this client opening the file. If found, it opened the file and returned the previously recorded identifier. If not found, it recorded the file opening information in the database of all nodes and returned a success message with the identifier key2.

[0072] Because access data needs to be verified, the implementation of related technologies inevitably records access data in a TDB (Trivial Database), which is shared by all processes on a single node. Since each client request to access a file requires recording in or retrieving access records from the database, this puts significant read / write pressure on the TDB, necessitating locking to prevent concurrency. All threads are waiting for read / write operations from the TDB, resulting in severe performance degradation. Furthermore, because all nodes need to be able to take over the business of failed nodes, all nodes need to record access data. Therefore, as the number of nodes increases, the number of input / output operations per second (IOPS) per node will decrease. Additionally, when a failed server recovers, records from other nodes' TDB databases need to be synchronized to this node. During this time, the entire cluster database needs to be frozen, causing all servers to be unable to provide normal business services.

[0073] Based on this, this application provides a service recovery method. When a faulty server fails, and the target server takes over the file-sharing service, the client sends a reconnection request for the target file to the target server. This reconnection request carries file access information and the request type, effectively allowing the target server to obtain basic parameter information from the client's access to the target file. This allows the target server to open the file based on these basic parameters. Furthermore, the target server assembles the file access information according to the request type and opens the file using the assembled information, successfully restoring the client's access to the target file. This method directly reconnects the target file by assembling the file access information from the client, eliminating the need for database read / write operations, reducing database read / write pressure, and improving server processing performance.

[0074] It should be noted that the beneficial effects or technical problems solved by the embodiments of this application are not limited to this one, but may also be other implicit or related problems. For details, please refer to the description of the embodiments below.

[0075] The following describes the application environment of the service recovery method provided in the embodiments of this application, which can be applied to, for example... Figure 2 In the application environment shown, client 102 communicates with target server 104 via a network. Client 102 sends a reconnection request for access to the target file to target server 104. Upon receiving the request, target server 104 assembles the file access information carried in the request, opens the target file using the assembled file access information, and restores the client's access to the target file. Client 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. Target server 104 can be any server node in a distributed system; for example, it can be any node among multiple server nodes in a distributed file system.

[0076] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0077] In one exemplary embodiment, such as Figure 3 As shown, a service recovery method is provided, which can be applied to... Figure 2Taking target server 104 as an example, the explanation includes the following steps 201 to 203. Wherein:

[0078] S201, Receive client's request to reconnect to the target file; The request to reconnect carries the client's file access information and the request type of the target file; The target file is the file that the client requested to access from the failed server when no failover occurred.

[0079] In this embodiment, the target server is the server that takes over the file sharing service of the failed server. It can be understood that before interacting with the target server, the client communicates with the failed server to access the target file. However, during this process, the failed server fails, and the target server takes over the file sharing service of the failed server so that the client can continue to access the target file through the target server.

[0080] Therefore, the client's request to reconnect to the target file is a request sent by the client to the target server to access the target file after the target server takes over the file sharing service from the failed server. This allows the client to access the target file again and perform read and write operations on it. The target file is the file that the client requested to access from the failed server before the failover occurred; that is, the file that the client accessed before the failed server failed.

[0081] Failover refers to the automatic takeover of tasks performed by another device when a device in a system fails and becomes inoperable. This mechanism ensures system continuity and stability, reducing service interruption time. In this embodiment, transparent failover is used to achieve client reconnection. Transparent failover means that it is completely transparent to the user, who is unaware of any failure or interruption. In this embodiment, it means that when a server experiences a hardware or software failure, the client will transparently reconnect to another server without interrupting the server application storing data in shared files.

[0082] Each server supports transparent failover. During the client mounting phase, the server returns a response supporting transparent failover, enabling the client to automatically resend mount and file access requests to the new server when encountering server IP migration. Each server also supports IP failover; after some servers fail, the IPs of the failed servers can be migrated to other normal servers, allowing the client to automatically reconnect by accessing the original mount IP when a server fails.

[0083] In this embodiment, after the faulty server fails, the IP address of the client attached to the faulty server is migrated to the target server, allowing the target server to take over the file sharing service from the faulty server. The client initiates a connection request to the target server, and the target server returns a response indicating support for transparent failover, signifying that the connection between the target server and the client has been successfully established.

[0084] Next, the client sends a reconnection request to the target server to restore the client's access to the target file, so that the target server can restore the client's access to the target file and allow the client to continue to access the target file through the target server and complete read and write operations on the target file.

[0085] The target server receives a reconnection request for accessing a target file from the client. This request includes the client's file access information and the request type for the target file. The client's file access information refers to the basic parameters when requesting access to the target file, including the filename, file path, file format, and type. The file format and type include text files, images, videos, and audio files. The request type for the target file is determined based on the access history of the target file on the faulty server, including successful initial access, successful reconnection access, and unsuccessful reconnection access.

[0086] The "Initial Access" type refers to the request sent to the target client when it first accesses the target file. For example, if a client sends an access request for file A to a faulty server, but the server fails before the request is successfully sent, the client's subsequent reconnection request should also be of the "Initial Access" type. The "Successful Reconnection Access" type refers to the request sent to the target server after a successful initial access to the target file via the faulty server. For example, if a client sends an access request for file A to a faulty server, the server successfully opens file A and sends a successful response to the client, and then fails again, the client's subsequent reconnection request should also be of the "Successful Reconnection Access" type. The "Unsuccessful Reconnection Access" type refers to the request sent to the target server when no response has been received from the faulty server regarding access to the target file. For example, if a client sends an access request for file A to a faulty server, and the faulty server fails before it can respond to the client regarding whether the initial file opening was successful, then when the client sends a reconnection request for access to the target file to the target server again, the request type should be "unsuccessful reconnection access".

[0087] S202, Assemble the file access information according to the request type.

[0088] Based on the request type carried in the above access reconnection request, the file access information carried in the access reconnection request is assembled, and the target file is opened based on the assembled file access information.

[0089] In this embodiment, different request types can be assembled using different assembly methods to assemble file access information. For example, the mapping relationship between different request types and different assembly methods is pre-stored in a database. When assembling file access information, the assembly method corresponding to the current request type can be matched in the above mapping relationship in the database, and then the matched assembly method is used to complete the assembly of the file access information.

[0090] S203, based on the assembled file access information, restore the client's access to the target file.

[0091] After assembling the file access information, the target server opens the file based on the assembled file access information to successfully restore the client's access to the target file.

[0092] It should be noted that in this embodiment, the file is opened using the assembled file access information, allowing the target server to still handle reconnection requests. This ensures that failover support does not result in performance degradation, significantly improving performance under transparent failover and preventing service unavailability during database synchronization when the faulty node recovers. Furthermore, because this embodiment skips querying and checking the identifier in the database, it avoids the problem of files being unopenable due to lost or corrupted records, thus improving the success rate of transparent failover.

[0093] In the business recovery method provided in this application embodiment, the target server receives a client's access reconnection request for a target file. The access reconnection request carries the client's file access information and the request type of the target file. The target file is the file that the client requested access from the failed server when no failover occurred. Then, based on the request type, the file access information is assembled, and then the client's access to the target file is restored based on the assembled file access information. In this method, after the failed server fails and the target server takes over the file sharing service from the failed server, the client sends an access reconnection request for the target file to the target server. The access reconnection request carries file access information and request type, which is equivalent to the target server obtaining the basic parameter information of the client's access to the target file, so that the target server can open the file based on the basic parameter information. On this basis, the target server assembles the file access information according to the request type and opens the file with the assembled file access information to successfully restore the client's access to the target file. This is equivalent to directly realizing the reconnection access to the target file by assembling the file access information brought by the client, eliminating the operation of reading and writing data in the database, reducing the read and write pressure on the database, and improving the processing performance of the server.

[0094] Based on the above embodiments, an embodiment of the process of assembling file access information according to request type will be provided for description.

[0095] In one exemplary embodiment, such as Figure 4 As shown, the file access information is assembled according to the request type, including:

[0096] S301, if the request type is the first access type, then the file access information is assembled based on the file name and directory path of the target file in the file access information to obtain the assembled file access information.

[0097] As mentioned earlier, the initial access type refers to the request sent to the target client when the client accesses the target file for the first time. The file access information includes the file name, the directory path where the file is located, the file format, and the type.

[0098] In this embodiment of the application, when the request type is the initial access type, the filename and directory path of the target file are first obtained from the file access information. Then, the filename and directory path of the target file are assembled to obtain the assembled file access information. When assembling the filename and directory path of the target file, an assembly method suitable for this request type can be selected.

[0099] For example, assembly methods include absolute path assembly, relative path assembly, and wildcard assembly. When the request type is initial access, any one of the multiple assembly methods can be used to assemble the file access information.

[0100] An absolute path is a complete path starting from the root directory, including all folder names. For example, C:\Users\Documents\File.txt, where Documents is the directory path where the file is located, and File.txt is the filename. A relative path is a path relative to the current working directory. For example, if the current directory is C:\Users, then Documents\File.txt is a relative path. Using relative paths simplifies path representation, but you need to ensure that the current working directory is correct. Wildcards are special characters used to match file or folder names, such as "*" and "?". For example, the question mark "?" can be used to match a single character, such as C:\Users\Username\Doc?ments, which matches the Documents folder, where C:\Users\Username is the directory path where the file is located, and Documents is the filename. Generally, wildcards can be used to flexibly locate and match files, facilitating batch operations and searches.

[0101] S302, if the request type is a successful reconnection access type, then obtain the historical information assembly method of the target file, assemble the file access information, and obtain the assembled file access information.

[0102] A successful reconnection access type refers to a request initiated to the target server when the target file is successfully accessed for the first time from the faulty server. The historical information assembly method is the information assembly method used during the initial access to the target file. In other words, when the target server receives a reconnection request of type "successful reconnection access," the target file has already been successfully accessed for the first time from the faulty server. Therefore, it can obtain the historical information assembly method for the target file from the faulty server, and assemble the file access information according to this method to obtain the assembled file access information.

[0103] S303 If the request type is unsuccessful reconnection access type, the file access information is assembled and processed according to the general information assembly method to obtain the assembled file access information.

[0104] The "Unsuccessful Reconnection Access" type refers to a request initiated to the target server when no response is received from the faulty server regarding access to the target file. The "General Information Assembly Method" refers to a unified method for assembling file access information across different operating systems. Using a general assembly method to assemble file access information can avoid path errors caused by differences in operating systems. This general information assembly method can be an absolute path assembly method, a relative path assembly method, or it can use Python functions, Java functions, etc.

[0105] If the request type of the target file is an unsuccessful reconnection access type, obtain the general information assembly method, and then assemble and process the file access information using the general information assembly method to obtain the assembled file access information.

[0106] In the service recovery method provided in this application embodiment, if the request type is an initial access type, the file access information is assembled based on the filename and directory path of the target file in the file access information to obtain the assembled file access information; if the request type is a successful reconnection access type, the historical information assembly method of the target file is obtained, and the file access information is assembled to obtain the assembled file access information; if the request type is an unsuccessful reconnection access type, the file access information is assembled and processed according to the general information assembly method to obtain the assembled file access information. In this method, the assembly method of the file access information is different when the access to the target file corresponds to different request types. Under different request types, the file access information is assembled by obtaining the information assembly method that matches the request type, so that the assembled file access information can better match the client's access method to the target file, thereby improving the accuracy of the file access information assembly.

[0107] Based on the above embodiments, an embodiment is provided to illustrate the process of assembling the target file's filename and directory path from the file access information to obtain the assembled file access information.

[0108] In one exemplary embodiment, such as Figure 5 As shown, the file access information is assembled based on the target file's filename and directory path, resulting in the assembled file access information, which includes:

[0109] S401: Based on multiple information assembly methods, obtain the optimal information assembly method for the target file.

[0110] Information assembly methods can include absolute path assembly, relative path assembly, wildcard assembly, Python function assembly, and Java function assembly, etc.

[0111] In this embodiment of the application, when the request type is the first access type, the optimal information assembly method is obtained from multiple information assembly methods to assemble the file access information.

[0112] For example, when obtaining the optimal information assembly method for the target file, multiple information assembly methods are displayed to the user through the assembly method interface. The user selects the optimal information assembly method from the multiple information assembly methods, and then the target server determines the optimal information assembly method selected by the user as the information assembly method for the target file.

[0113] S402, based on the optimal information assembly method, assemble the file name and directory path to obtain the complete path to access the target file.

[0114] After obtaining the optimal information assembly method for the target file, the filename and directory path of the target file are assembled using the optimal information assembly method to obtain the complete path to access the target file.

[0115] S403, the complete path is determined as the file access information after assembly.

[0116] Based on the complete path obtained from the above assembly, this complete path is directly determined as the assembled file access information.

[0117] In the service recovery method provided in this application embodiment, the optimal information assembly method for the target file is obtained based on multiple information assembly methods. Then, the filename and directory path are assembled according to the optimal information assembly method to obtain the complete path to the target file. Finally, the complete path is determined as the assembled file access information. In this method, when the request type is an initial access type, the optimal information assembly method is determined from multiple information assembly methods. The filename and directory path are then assembled using this optimal information assembly method to obtain the assembled file access information. This makes the assembly of file access information more reasonable and accurate, improving the efficiency of querying and accessing the target file.

[0118] Based on the above embodiments, an embodiment is provided to illustrate the process of assembling file access information to obtain assembled file access information, according to the above method for assembling historical information of target files.

[0119] In one exemplary embodiment, such as Figure 6 As shown, the method for assembling historical information of the target file involves assembling the file access information to obtain the assembled file access information, including:

[0120] S501: Based on the file access information, obtain the filename of the target file and the directory path where the target file is located.

[0121] As mentioned earlier, the file access information includes the file name and file path, so the file name and directory path of the target file can be directly extracted from the file access information of the target file.

[0122] S502, based on the historical information assembly method, assembles the file name and directory path to obtain the assembled file access information.

[0123] In this embodiment, the historical information assembly method of the target file is used to assemble the file access information. Therefore, it is necessary to first obtain the historical information assembly method of the target file. In one embodiment, the target server sends an assembly method retrieval request to the faulty server, instructing the faulty server to send the historical information assembly method of the target file to the target server. Upon receiving the assembly method sent by the faulty server, the target server determines that assembly method as the historical information assembly method of the target file.

[0124] Furthermore, after obtaining the historical information assembly method of the target file, the historical information assembly method is used to assemble the extracted file name and directory path to obtain the assembled file access information.

[0125] In the service recovery method provided in this application embodiment, the filename and directory path of the target file are obtained based on file access information. Then, the filename and directory path are assembled according to the historical information assembly method to obtain the assembled file access information. In this method, when the request type is a successful reconnection access type, the filename and directory path in the file access information are assembled using the historical information assembly method of the target file to obtain the assembled file access information. The historical information assembly method is the information assembly method when the target file was first accessed on the faulty server. By directly assembling the file access information using this historical information assembly method, the assembled file access information is more accurate, improving the efficiency of the client accessing the target file.

[0126] Based on the above embodiments, an embodiment is provided to illustrate the process of assembling file access information according to a general information assembly method to obtain assembled file access information.

[0127] In one exemplary embodiment, such as Figure 7 As shown, the file access information is assembled according to the general information assembly method to obtain the assembled file access information, including:

[0128] S601: Based on the file access information, obtain the filename of the target file and the directory path where the target file is located.

[0129] Extract the filename and directory path of the target file directly from the file access information.

[0130] S602, according to the general information assembly method, assembles and processes the file name and directory path to obtain the processed information.

[0131] In this embodiment of the application, the general information assembly method can be a pre-stored database. The target server can obtain the general information assembly method from the database, and use the general information assembly method to assemble the file name and directory path, and perform verification processing on the assembled information to ensure the accuracy of the assembly.

[0132] S603 determines the processed information as the assembled file access information.

[0133] After assembling and processing the filename and directory path, the target server determines the processed information as the assembled file access information.

[0134] In the service recovery method provided in this application embodiment, the filename and directory path of the target file are obtained based on file access information. Then, the filename and directory path are assembled and processed according to a general information assembly method to obtain processed information. This processed information is then determined as the assembled file access information. In this method, when the request type is an unsuccessful reconnection access type, the filename and directory path in the file access information are assembled and processed using a general information assembly method to obtain the assembled file access information. This general information assembly method is applicable to different operating systems. Regardless of the client's operating system, it unifies the assembly method of file access information and avoids path errors caused by operating system differences.

[0135] Based on any of the above embodiments, an embodiment is provided to illustrate the process of restoring the client's access to the target file based on the assembled file access information.

[0136] In one exemplary embodiment, such as Figure 8 As shown, based on the assembled file access information, the client's access to the target file is restored, including:

[0137] S701 verifies the client's permissions based on the client information carried in the access reconnection request.

[0138] The client information includes the username and password.

[0139] The target server contains user information about users who can access the target file. When a client accesses the target file, permission verification is performed on the client based on this information. This involves comparing the client information carried in the access reconnection request with the user information recorded on the target server. If the client information in the access reconnection request matches the user information recorded on the target server, the verification passes; otherwise, the verification fails.

[0140] S702, if the client's permission verification passes, opens the target file based on the assembled file access information.

[0141] If the client's permissions are verified, the file is opened based on the assembled file access information, which includes the full path of the target file. The target file can then be opened successfully based on this assembled file access information.

[0142] S703 sends a message to the client indicating that the file was opened successfully, and sends the access identifier of the target file to the client to complete the restoration of the client's access to the target file.

[0143] After successfully opening the target file, a message is sent to the client indicating that the file was opened successfully. Based on the current open record of the target file, an access identifier for the target file is generated and sent to the client, thus restoring the client's access to the target file.

[0144] In the service recovery method provided in this application embodiment, the client's permissions are verified based on the client information carried in the access reconnection request. If the client's permissions are verified, the target file is opened according to the assembled file access information. The client is then notified that the file was opened successfully, and the access identifier of the target file is sent to the client, thus restoring the client's access to the target file. In this method, before opening the target file according to the assembled file access information, the client's permissions are verified to confirm whether the client has the permission to open and read / write the target file. If the verification is successful, the target file is opened according to the assembled file access information, and the client is notified that the file was opened successfully, allowing the client to continue reading and writing operations on the target file. This restores the client's access to the target file and improves the success rate of transparent failover.

[0145] The above describes embodiments with the target server as the execution subject. Based on this, this application also provides embodiments corresponding to the above process with the client as the execution subject. Below, embodiments of the task processing method with the client as the execution subject will be described.

[0146] Since the implementation principles, detailed processes, and technical effects of the aforementioned embodiments with the target server as the execution subject are all the same as those of the aforementioned embodiments with the client as the execution subject, for the sake of brevity and clarity, the aforementioned embodiments will not be described in detail one by one. The implementation process and effects of each embodiment can be found in the description of the aforementioned embodiments.

[0147] In one exemplary embodiment, a service recovery method is provided, applied to a client, the method comprising:

[0148] Send a reconnection request for the target file to the target server, instructing the target server to assemble the file access information in the reconnection request according to the request type, and then restore access to the target file; the target server is the server that takes over the shared service of the failed server; the target file is the file that the client requested to access from the failed server when no failover occurred.

[0149] After a failure occurs at the faulty server, the client's IP address, which was previously attached to the faulty server, is redirected to the target server, allowing the target server to take over the file-sharing service. The client sends a reconnection request to the target server for access to the target file, enabling the target server to restore the client's access to the target file. Upon receiving the client's reconnection request, the target server assembles the file access information from the reconnection request based on the request type, and then opens the target file based on the assembled file access information, thus restoring the client's access to the target file.

[0150] In the service recovery method provided in this application embodiment, the client sends a reconnection request for access to a target file to the target server, instructing the target server to assemble the file access information in the reconnection request according to the request type, and then restore access to the target file. The target server is the server that takes over the shared service of the failed server; the target file is the file that the client requested to access from the failed server when no failover occurred. In this method, after the failed server fails and the target server takes over the file sharing service of the failed server, the client sends a reconnection request for access to the target file to the target server. The reconnection request carries file access information and request type, which is equivalent to the target server obtaining the basic parameter information of the client's access to the target file, so that the target server can open the file according to the basic parameter information. Based on this, the target server assembles the file access information according to the request type and opens the file with the assembled file access information to successfully restore the client's access to the target file. This is equivalent to directly realizing the reconnection access to the target file by assembling the file access information brought by the client, eliminating the operation of reading and writing data in the database, reducing the read and write pressure on the database, and improving the processing performance of the server.

[0151] Based on the above embodiments, an embodiment is provided to illustrate the process before the client sends a request to the target server to reconnect to the target file.

[0152] In an exemplary embodiment, before sending a request to the target server to reconnect to the target file, the method further includes:

[0153] Send an initial access request for the target file to the faulty server, instructing the faulty server to open the target file based on the file access information carried in the initial access request.

[0154] Before the target client takes over the file-sharing service from the failed server, it accesses the target file through the failed server. Therefore, before the client sends a reconnection request to the target server for accessing the target file, there is still interaction between the client and the failed server.

[0155] The client sends an initial access request for the target file to the faulty server, so that the faulty server can open the target file based on the file access information carried in the initial access request. The client also carries file access information with it when sending the access request to the faulty server; similarly, the file access information includes the filename, file path, file format, and type.

[0156] When the faulty server receives the client's initial access request for the target file, it also assembles the file access information to obtain the assembled file access information, and then opens the file using the assembled file access information. The method for assembling the file access information can be any of the aforementioned information assembly methods.

[0157] In the service recovery method provided in this application embodiment, an initial access request for a target file is sent to the faulty server to instruct the faulty server to open the target file based on the file access information carried in the initial access request. In this method, before sending a reconnection request for access to the target file to the target server, the client also interacts with the faulty server to access the target file on the faulty server. That is, the client sends an initial access request for the target file to the faulty server, and the initial access request carries file access information. The target file is opened by assembling the file access information, thereby improving bandwidth and stability in fault switching scenarios.

[0158] In addition, in an exemplary embodiment, the process of opening files by assembling file access information is described using two files as an example.

[0159] like Figure 9 As shown, the client first interacts with server 1. After successfully establishing a connection with the server, the client opens file A. Server 1 uses the file access information provided by the client to open the file and sends a success message to the client, carrying identifier 1. Then, the client opens file B. Server 1 uses the file access information provided by the client to open the file, but before sending a success message, an exception occurs on server 1, triggering an IP migration to server 2. After successfully establishing a connection with server 2, the client reopens file A using DH2C, with identifier 1 attached. Server 2 does not use identifier 1 to open the file; instead, it uses the file access information provided by the client to assemble the file and then opens it, sending a success message to the client. Then, the client opens file B. Server 2 uses the file access information provided by the client to assemble the file and then opens it, sending a success message to the client, and sending an identifier 2.

[0160] In this embodiment, when a faulty server fails and the target server takes over the file-sharing service, the client sends a reconnection request for the target file to the target server. This reconnection request carries file access information and the request type, essentially allowing the target server to obtain basic parameter information from the client's access to the target file. This enables the target server to open the file based on these parameters. Furthermore, the target server assembles the file access information according to the request type and opens the file using the assembled information, successfully restoring the client's access to the target file. This is equivalent to directly reconnecting to the target file by assembling the file access information from the client, eliminating the need for database read / write operations, reducing database read / write pressure, and improving server processing performance.

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

[0162] Based on the same inventive concept, this application also provides a service recovery system. The solution provided by this system is similar to the solution described in the above-described method; therefore, the specific limitations of one or more service recovery systems provided below can be found in the limitations of the service recovery method described above, and will not be repeated here.

[0163] In one exemplary embodiment, the service recovery system includes a client and a server; the server is a shared service that undertakes the faulty server.

[0164] The server is used to implement the steps of the method in any of the above embodiments where the target server is the execution subject; the client is used to implement the steps of the method in any of the above embodiments where the client is the execution subject.

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

[0166] In one exemplary embodiment, such as Figure 10 As shown, a service recovery device 1 is provided, including: a request receiving module 10, an information assembly module 20, and a service recovery module 30, wherein:

[0167] Request receiving module 10 is used to receive client access reconnection requests for target files; the access reconnection request carries the client's file access information and the request type of the target file; the target file is the file that the client requests to access from the faulty server when no failover has occurred;

[0168] The information assembly module 20 is used to assemble file access information according to the request type;

[0169] The business recovery module 30 is used to restore the client's access to the target file based on the assembled file access information.

[0170] In one embodiment, the information assembly module 20 is further configured to:

[0171] If the request type is the initial access type, the file access information is assembled based on the filename and directory path of the target file in the file access information to obtain the assembled file access information; if the request type is the successful reconnection access type, the historical information assembly method of the target file is obtained, and the file access information is assembled to obtain the assembled file access information; if the request type is the unsuccessful reconnection access type, the file access information is assembled and processed according to the general information assembly method to obtain the assembled file access information.

[0172] In one embodiment, the information assembly module 20 is further configured to:

[0173] Based on multiple information assembly methods, the optimal information assembly method for the target file is obtained; based on the optimal information assembly method, the file name and directory path are assembled to obtain the complete path for accessing the target file; the complete path is determined as the assembled file access information.

[0174] In one embodiment, the information assembly module 20 is further configured to:

[0175] Based on the file access information, obtain the filename and directory path of the target file; based on the historical information assembly method, assemble the filename and directory path to obtain the assembled file access information.

[0176] In one embodiment, the information assembly module 20 is further configured to:

[0177] Based on the file access information, obtain the filename and directory path of the target file; according to the general information assembly method, assemble and process the filename and directory path to obtain the processed information; determine the processed information as the assembled file access information.

[0178] In one embodiment, the service recovery module 30 is further configured to:

[0179] Based on the client information carried in the access reconnection request, the client's permissions are verified; if the client's permissions are verified, the target file is opened according to the assembled file access information; feedback is sent to the client that the file was opened successfully, and the access identifier of the target file is sent to the client to complete the restoration of the client's access to the target file.

[0180] In one exemplary embodiment, such as Figure 11 As shown, a service recovery device 2 is provided, including: a request sending module 40, wherein:

[0181] The request sending module 40 is used to send a reconnection request for access to the target file to the target server, so as to instruct the target server to assemble the file access information in the reconnection request according to the request type in the reconnection request and restore access to the target file; the target server is the server that takes over the shared service of the failed server; the target file is the file that the client requests to access from the failed server when no failover has occurred.

[0182] In one embodiment, the service recovery device 2 further includes:

[0183] The initial access module is used to send an initial access request for the target file to the faulty server, instructing the faulty server to open the target file based on the file access information carried in the initial access request.

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

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

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

[0187] In one exemplary 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:

[0188] Receive client's access reconnection request for the target file; the access reconnection request carries the client's file access information and the request type of the target file; the target file is the file that the client requested to access from the failed server when no failover occurred;

[0189] The file access information is assembled based on the request type;

[0190] Based on the assembled file access information, restore the client's access to the target file.

[0191] The implementation principles and technical effects of each step in the processor embodiment of this application are similar to those of the above-mentioned service recovery method, and will not be repeated here.

[0192] 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:

[0193] Receive client's access reconnection request for the target file; the access reconnection request carries the client's file access information and the request type of the target file; the target file is the file that the client requested to access from the failed server when no failover occurred;

[0194] The file access information is assembled based on the request type;

[0195] Based on the assembled file access information, restore the client's access to the target file.

[0196] The implementation principles and technical effects of each step in the computer program executed by the processor in this embodiment are similar to those of the above-described service recovery method, and will not be repeated here.

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

[0198] Receive client's access reconnection request for the target file; the access reconnection request carries the client's file access information and the request type of the target file; the target file is the file that the client requested to access from the failed server when no failover occurred;

[0199] The file access information is assembled based on the request type;

[0200] Based on the assembled file access information, restore the client's access to the target file.

[0201] The implementation principles and technical effects of each step in the computer program executed by the processor in this embodiment are similar to those of the above-described service recovery method, and will not be repeated here.

[0202] It should be noted that the personnel information (including but not limited to personnel and equipment information, personnel 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 personnel or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0203] Those skilled in the art will understand that all or part of the processes in 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. When executed, the computer program can include the processes of the embodiments described above. 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.

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

[0205] 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 service restoration method characterized by, The application is applied to a target server, which is a server of a file sharing service of a fault server; the method comprises: receiving an access reconnection request of a client to a target file; the access reconnection request carries file access information of the client and a request type of the target file; the target file is a file requested by the client to access the fault server before a fault switching occurs; assembling the file access information according to the request type; resuming the access of the client to the target file according to the assembled file access information.

2. The method of claim 1, wherein, The assembling of the file access information according to the request type comprises: if the request type is a first access type, assembling the file name of the target file and the directory path of the target file in the file access information to obtain the assembled file access information; if the request type is a successful reconnection access type, obtaining a historical information assembling mode of the target file, assembling the file access information to obtain the assembled file access information; if the request type is an unsuccessful reconnection access type, assembling and processing the file access information according to a general information assembling mode to obtain the assembled file access information.

3. The method of claim 2, wherein, The assembling of the file name of the target file and the directory path of the target file in the file access information to obtain the assembled file access information comprises: obtaining an optimal information assembling mode of the target file according to a plurality of information assembling modes; assembling the file name and the directory path according to the optimal information assembling mode to obtain a complete path for accessing the target file; determining the complete path as the assembled file access information.

4. The method of claim 2, wherein, The obtaining of the historical information assembling mode of the target file, the assembling of the file access information to obtain the assembled file access information comprises: obtaining the file name of the target file and the directory path of the target file according to the file access information; assembling the file name and the directory path according to the historical information assembling mode to obtain the assembled file access information.

5. The method of claim 2, wherein, The assembling of the file access information according to the general information assembling mode to obtain the assembled file access information comprises: obtaining the file name of the target file and the directory path of the target file according to the file access information; assembling and processing the file name and the directory path according to the general information assembling mode to obtain processed information; determining the processed information as the assembled file access information.

6. The method according to any one of claims 1 to 5, characterized in that, The resuming of the access of the client to the target file according to the assembled file access information comprises: performing permission verification on the client according to the client information carried in the access reconnection request; opening the target file according to the assembled file access information if the permission verification on the client is passed. The client is fed back a file opening success, and an access identifier of the target file is sent to the client to complete resumption of access service of the target file by the client.

7. A service restoration method characterized by, The method applied to the client comprises: sending an access reconnection request for a target file to a target server to instruct the target server to resume access to the target file according to file access information in the access reconnection request after assembling the file access information according to a request type in the access reconnection request; the target server is a server that undertakes shared services of a fault server; the target file is a file requested to be accessed by the client from the fault server before a fault switching occurs.

8. The method of claim 7, wherein, Before sending the access reconnection request for the target file to the target server, the method further comprises: sending a primary access request for the target file to the fault server to instruct the fault server to open the target file based on file access information carried in the primary access request.

9. A service restoration system, characterized by, The service resumption system comprises a client and a server; the server is a server that undertakes shared services of a fault server; The server is configured to implement steps of the method in any one of claims 1 to 6. The client is configured to implement steps of the method in any one of claims 7 to 8.

10. A service restoration apparatus characterized by comprising: The device comprises: a request receiving module configured to receive an access reconnection request for a target file by a client; the access reconnection request carries file access information of the client and a request type of the target file; the target file is a file requested to be accessed by the client from a fault server before a fault switching occurs; an information assembling module configured to assemble the file access information according to the request type; a service resumption module configured to resume access to the target file by the client according to the assembled file access information.

11. A service restoration apparatus, characterized by comprising: The device comprises: a request sending module configured to send an access reconnection request for a target file to a target server to instruct the target server to resume access to the target file according to file access information in the access reconnection request after assembling the file access information according to a request type in the access reconnection request; the target server is a server that undertakes shared services of a fault server; the target file is a file requested to be accessed by the client from the fault server before a fault switching occurs.