Method, device and system for interface server failure recovery

By obtaining the current and pre-failure working status of the interface server, and formulating targeted recovery strategies, the problem of unsuccessful restart and recovery after the interface server is solved, and the flexibility and efficiency of failure recovery are improved.

CN114637618BActive Publication Date: 2025-02-11CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011493660.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-16
Publication Date
2025-02-11
Estimated Expiration
2040-12-16

AI Technical Summary

Technical Problem

The prior art after the interface server fails, it still cannot join the system normally after restarting and restoring, and a simple restart may not solve the specific failure, resulting in repeated failures.

Method used

By obtaining the current working status of each interface server, determining the first working status before the failure, and formulating a recovery strategy based on the first working status and the failure status, including restoring at least one interface server to a normal working status or restoring all interface servers to a normal working status, and formulating recovery strategies based on the first working status and the failure status, including restoring at least one interface server to a normal working status or restoring all interface servers to a normal working status state.

Benefits of technology

It improves the flexibility and efficiency of interface server failure recovery, ensuring the normal operation of distributed interface server systems and reliable resolution of failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637618B_ABST
    Figure CN114637618B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and system for recovering an interface server fault, which is applied to a distributed interface server system, including a plurality of the interface servers, and the method comprises: obtaining the current working state of each interface server, wherein the current working state includes a fault state; obtaining the first working state of the corresponding interface server before the fault according to the fault state, wherein the first working state is used to characterize the working state of the interface server before the fault occurs; determining the recovery strategy of the interface server in the distributed interface server system according to the first working state and the fault state, so as to recover the interface server, so as to realize the flexibility of interface server fault recovery and improve the efficiency and reliability of fault interface server recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and system for recovering a fault of an interface server. Background Art

[0002] The internal system and the external system may be isolated within the enterprise, and the internal system and the external system may be connected by using an interface server. The interface server mainly receives data from the external system, and reassembles the received external system data packets according to the data communication protocol of the internal system and forwards them to the internal system, so as to achieve data protocol isolation and security protection.

[0003] In the prior art, if there is only a single interface server in the enterprise system, it will become a single point of failure of the system, that is, if the interface server fails, the entire system will be unavailable. If multiple interface servers are used in the system to work simultaneously, if one interface server fails, there are other interface servers in the system, so that the entire system can continue to work.

[0004] However, for the failed interface server that needs to be restored, sometimes it still cannot be added to the entire system to continue to provide services after restarting and restoring it, and the entire system needs to be further reconfigured and restarted. In addition, for specific failure modes, a simple restart may not be able to solve the failure. Restarting the interface server to join the system and working for a short time will still cause another failure. Summary of the invention

[0005] The present invention provides a method, device and system for recovering an interface server failure, so as to realize the flexibility of recovering an interface server failure and improve the efficiency and reliability of recovering a failed interface server.

[0006] In a first aspect, an embodiment of the present invention provides a method for recovering an interface server failure, which is applied to a distributed interface server system, including a plurality of the interface servers, and includes:

[0007] Acquire the current working status of each interface server, wherein the current working status includes a fault status;

[0008] According to the fault state, obtaining a first working state of the corresponding interface server before the fault occurs, wherein the first working state is used to characterize the working state of the interface server before the fault occurs;

[0009] A recovery strategy for the interface server in the distributed interface server system is determined according to the first working state and the fault state, so as to recover the interface server.

[0010] In an optional embodiment, obtaining the first working state of the corresponding interface server before the failure includes:

[0011] If the current working state of the interface server is a fault state, the first working state of the interface server before the fault is obtained according to the heartbeat record of a preset period.

[0012] In an optional embodiment, determining a recovery strategy of the interface server according to the first working state and the fault state includes:

[0013] If there is no normal working state in the first working state;

[0014] then determining that the recovery strategy of the interface server is a first recovery strategy, wherein the first recovery strategy is used to indicate that at least one interface server is restored to a normal working state;

[0015] Alternatively, the recovery strategy of the interface server is determined to be a second recovery strategy, wherein the second recovery strategy is used to indicate that all interface servers are restored to a normal working state.

[0016] In an optional embodiment, determining a recovery strategy of the interface server according to the first working state and the fault state includes:

[0017] If there are multiple interface servers whose first working states are normal working states, the recovery strategy is determined to be a third recovery strategy, wherein the third recovery strategy is used to indicate that at least one interface server corresponding to the first working state is restored to a normal working state.

[0018] In an optional embodiment, the method further includes:

[0019] If there is an interface server whose first working state is a normal working state, then the corresponding interface server is determined to be the first interface server,

[0020] And determine that the recovery strategy is to recover the first interface server.

[0021] In an optional embodiment, the method further includes:

[0022] If the recovery strategy is the third recovery strategy, and it is detected that a failure occurs in other normally working interface servers, the third recovery strategy is stopped and the second recovery strategy is started.

[0023] In an optional embodiment, restoring the interface server includes:

[0024] The heartbeat number of the interface server within a preset period is detected, and if the heartbeat number reaches a preset threshold, it is determined that the interface server has recovered successfully.

[0025] In a second aspect, an embodiment of the present invention provides a device for recovering an interface server failure, which is applied to a distributed interface server system and includes a plurality of the interface servers. The device includes:

[0026] An acquisition module, used to acquire the current working status of each interface server, wherein the current working status includes a fault status;

[0027] An obtaining module, used for obtaining a first working state of the corresponding interface server before the failure according to the failure state, wherein the first working state is used for representing the working state of the interface server before the failure occurs;

[0028] A determination module is used to determine a recovery strategy of the interface server in the distributed interface server system according to the first working state and the fault state, so as to recover the interface server.

[0029] In an optional embodiment, obtaining the first working state of the corresponding interface server before the failure includes:

[0030] If the current working state of the interface server is a fault state, the first working state of the interface server before the fault is obtained according to the heartbeat record of a preset period.

[0031] In an optional embodiment, determining a recovery strategy of the interface server according to the first working state and the fault state includes:

[0032] If there is no normal working state in the first working state;

[0033] then determining that the recovery strategy of the interface server is a first recovery strategy, wherein the first recovery strategy is used to indicate that at least one interface server is restored to a normal working state;

[0034] Alternatively, the recovery strategy of the interface server is determined to be a second recovery strategy, wherein the second recovery strategy is used to indicate that all interface servers are restored to a normal working state.

[0035] In an optional embodiment, determining a recovery strategy of the interface server according to the first working state and the fault state includes:

[0036] If there are multiple interface servers whose first working states are normal working states, the recovery strategy is determined to be a third recovery strategy, wherein the third recovery strategy is used to indicate that at least one interface server corresponding to the first working state is restored to a normal working state.

[0037] In an optional embodiment, the method further includes:

[0038] If there is an interface server whose first working state is a normal working state, then the corresponding interface server is determined to be the first interface server,

[0039] And determine that the recovery strategy is to recover the first interface server.

[0040] In an optional embodiment, the method further includes:

[0041] If the recovery strategy is the third recovery strategy, and it is detected that a failure occurs in other normally working interface servers, the third recovery strategy is stopped and the second recovery strategy is started.

[0042] In an optional embodiment, restoring the interface server includes:

[0043] The heartbeat number of the interface server within a preset period is detected, and if the heartbeat number reaches a preset threshold, it is determined that the interface server has recovered successfully.

[0044] The present invention provides a method, device and system for recovering an interface server fault, which is applied to a distributed interface server system, including a plurality of the interface servers, and the method comprises: obtaining the current working state of each interface server, wherein the current working state includes a fault state; obtaining the first working state of the corresponding interface server before the fault according to the fault state, wherein the first working state is used to characterize the working state of the interface server before the fault occurs; determining the recovery strategy of the interface server in the distributed interface server system according to the first working state and the fault state, so as to recover the interface server, so as to realize the flexibility of interface server fault recovery and improve the efficiency and reliability of fault interface server recovery. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0046] Figure 1 Schematic diagram of the method flow for interface server failure recovery provided by an embodiment of the present invention Figure 1 ;

[0047] Figure 2Schematic diagram of the process of the method for recovering an interface server failure provided by an embodiment of the present invention Figure 2 ;

[0048] Figure 3 A schematic diagram of the structure of an interface server failure recovery device provided by an embodiment of the present invention;

[0049] Figure 4 A schematic diagram of the structure of a system for recovering an interface server failure provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, products or devices.

[0052] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0053] In the prior art, for a faulty interface server that needs to be restored, sometimes after restarting and restoring it, it still cannot be added to the entire system to continue providing services, and the entire system needs to be further reconfigured and restarted. In addition, for a specific failure mode, a simple restart may not be able to solve the failure, and restarting the interface server to join the system and work for a short time will still cause another failure.

[0054] Figure 1Schematic diagram of the method flow for interface server failure recovery provided by an embodiment of the present invention Figure 1 ,like Figure 1 As shown, the method for recovering from an interface server failure in this embodiment may include:

[0055] S101. Obtain the current working status of each interface server, where the current working status includes a fault status.

[0056] In this embodiment, the internal system needs to be isolated from the external system during the operation of the enterprise system, and the internal system and the external system need to be connected through the interface server to realize data transmission. The interface server mainly receives data from the external system. A single interface server can be set in the entire system, or multiple interface servers can be set, which is not limited in this embodiment. It is inevitable that the interface server will fail during the operation of the system, so it is necessary to obtain the current working status of each interface server in the system, such as normal working status and fault status. Then, recovery is achieved for the faulty interface server. For example, there are 2 interface servers set in the system: interface server A and interface server B. When the current working status of at least one interface server is detected to be a faulty state, for example, the current working status of interface server A is detected to be a faulty state, then the current working status of all interface servers in the system operation is obtained, and for another example, the current working status of interface server B is obtained as a normal working state.

[0057] S102: Obtain a first working state of the corresponding interface server before the failure according to the failure state, where the first working state is used to represent the working state of the interface server before the failure occurs.

[0058] In combination with the above examples, the working status of the interface server in the system is detected in different time periods to obtain the corresponding working status. Therefore, according to the fault state of interface server A, the first working status before the fault is obtained, and the first working status may include a normal working status and a fault state. For example, if the first working status is a normal working status, it means that the interface server is in a fault state in the current time period, but the interface server is in a normal working state in the first preset time period before the fault occurs. For another example, if the first working status is a fault state, it means that the interface server is in a fault state in the current time period, and the interface server is also in a fault state in the second preset time period before the fault occurs. In this embodiment, the first preset time period and the second preset time period are not specifically limited, and the first preset time period and the second preset time period may be the same or different.

[0059] In an optional embodiment, the probability of recovery of an interface server whose first working state before failure is a normal working state is higher, so the embodiments of the present invention can flexibly set the recovery priority of the interface server whose first working state is a normal working state to be higher than the recovery priority corresponding to the interface server whose first working state is a faulty state. Therefore, the distributed interface server system can adopt a flexible recovery strategy according to the recovery priority to improve the recovery reliability and efficiency of the interface servers in the distributed interface server system.

[0060] S103: Determine a recovery strategy for the interface server in the system according to the first working state and the fault state, so as to recover the interface server.

[0061] This embodiment determines the recovery strategy of the interface server according to the first working state and the fault state of the interface server in the system to recover the interface server. For example, the recovery strategy of the interface server is specifically determined according to whether there is a normal working state in the first working state, or according to the number of journey working states in the first working state, to achieve recovery of the interface server, thereby ensuring the normal operation of the distributed interface server system.

[0062] This embodiment adaptively selects recovery according to the working mode of the interface server before the failure. The distributed interface server system selects different recovery methods for different failure modes. Compared with the fixed recovery method in the prior art, the present invention has a more efficient and accurate fault recovery mode, thereby ensuring that the recovery process is safe and reliable, and ensuring the normal operation of the distributed interface server system.

[0063] Combination Figure 1 In the illustrated embodiment, obtaining the first working state of the corresponding interface server before failure can be further achieved in the following manner. Specifically, if the current working state of the interface server is a failure state, the first working state of the interface server before failure is obtained based on the heartbeat record of a preset period.

[0064] For example, in this embodiment, the heartbeat record of the interface server is obtained according to a preset period of every 20ms. If the current working state of the interface server is a fault state, the first working state is obtained according to the heartbeat record of the preset period before the interface server fails. For example, the first working state can be a normal working state or a fault state. And if the heartbeat record meets the first threshold, it is determined that the first working state is a normal working state, or if the heartbeat record does not meet the first threshold, it is determined that the first working state is a fault state, so as to further determine the recovery strategy of the interface server and recover the faulty interface server of the distributed interface server system. The first threshold can be defined in detail according to the specific operating conditions to achieve a better implementation effect, and is not limited in this embodiment.

[0065] Further, the interface server is restored, including: detecting the heartbeat number of the interface server within a preset period, and if the heartbeat number reaches a preset threshold, determining that the interface server is restored successfully.

[0066] Combination Figure 1 In the illustrated embodiment, determining the recovery strategy of the interface server according to the first working state and the fault state can be specifically implemented in the following manner: specifically, if the normal working state does not exist in the first working state; then determining the recovery strategy of the interface server as the first recovery strategy, wherein the first recovery strategy is used to characterize that at least one interface server has recovered to a normal working state; or, determining the recovery strategy of the interface server as the second recovery strategy, wherein the second recovery strategy is used to characterize that all interface servers have been restored to a normal working state.

[0067] For example, a distributed interface server system includes three interface servers, such as interface server A, interface server B, and interface server C, and all three interface servers fail. The first working states corresponding to the three interface servers before the failure are all failure states. Then, it can be determined that the interface server recovery strategy is the first recovery strategy or the second recovery strategy, wherein the first recovery strategy indicates that at least one of the currently failed interface servers can be restored to a normal working state, for example, interface server A can be restored to a normal working state; the second recovery strategy indicates restoring all the currently failed interface servers to a normal working state, for example, interface server A, interface server B, and interface server C are all restored to a normal working state.

[0068] Further, when the recovery strategy adopted is the first recovery strategy, for example, by detecting the presence of a heartbeat data packet in interface server A, and the initial value C1 of its corresponding heartbeat counter is 0, the value of the heartbeat counter is increased by 1 each time a heartbeat data packet is detected, until the value C2 corresponding to the heartbeat counter reaches a preset threshold (for example, the fault recovery heartbeat number C), it is determined that interface server A has recovered successfully.

[0069] For another example, when the second recovery strategy is adopted, the heartbeat counter values ​​corresponding to the interface server A, the interface server B, and the interface server C are respectively detected to see whether they have reached the preset threshold value. For example, the heartbeat counter value corresponding to the interface server A is C3, the heartbeat counter value corresponding to the interface server B is C4, and the heartbeat counter value corresponding to the interface server C is C5, and C3, C4, and C5 respectively reach the corresponding preset threshold values, then it is determined that the interface server A, the interface server B, and the interface server C have all recovered successfully. The method of respectively obtaining the corresponding data values ​​of C3, C4, and C5 is the same as the implementation method and principle of obtaining C2 as described above, and will not be repeated here, and the preset threshold values ​​corresponding to C3, C4, and C5 may be the same or different, and detailed examples are given according to specific circumstances, and this embodiment is not limited.

[0070] Combination Figure 1 In the illustrated embodiment, determining the recovery strategy of the interface server according to the first working state and the fault state can be specifically implemented in the following manner: specifically, if there are multiple interface servers whose first working state is a normal working state, then the recovery strategy is determined to be the third recovery strategy, wherein the third recovery strategy is used to characterize at least one interface server corresponding to restoring the first working state to a normal working state.

[0071] For example, a distributed interface server system includes three interface servers, such as interface server A, interface server B, and interface server C. Interface server A and interface server B both fail, and the first working states corresponding to interface server A and interface server B before the failure are both normal working states. Then, the interface server recovery strategy can be determined to be the third recovery strategy, wherein the first recovery strategy indicates that at least one of the currently failed interface servers can be restored to a normal working state, for example, interface server A is restored to a normal working state, or interface server B is restored to a normal working state, or interface server A and interface server B are restored to a normal working state.

[0072] Further, when the recovery strategy adopted is the third recovery strategy, for example, by detecting that the interface server A has a heartbeat data packet, and the initial value C1 of the corresponding heartbeat counter is 0, the value of the heartbeat counter is increased by 1 each time a heartbeat data packet is detected, until the value C2 corresponding to the heartbeat counter reaches a preset threshold value (for example, the number of heartbeats for fault recovery C), it is determined that the interface server A has recovered successfully. Or, for example, by detecting that the interface server B has a heartbeat data packet, and the initial value C6 of the corresponding heartbeat counter is 0, the value of the heartbeat counter is increased by 1 each time a heartbeat data packet is detected, until the value C7 corresponding to the heartbeat counter reaches a preset threshold value (for example, the number of heartbeats for fault recovery C), it is determined that the interface server B has recovered successfully.

[0073] For another example, when the third recovery strategy is adopted, the heartbeat counter values ​​corresponding to the interface server A and the interface server B are respectively detected to see whether they reach the preset threshold value. For example, the heartbeat counter value corresponding to the interface server A is C8, and the heartbeat counter value corresponding to the interface server B is C9, and C8 and C9 reach the corresponding preset threshold values, respectively, then it is determined that the interface server A and the interface server B have both recovered successfully. The preset threshold values ​​corresponding to C8 and C9 may be the same or different, and are given in detail according to the specific situation, and are not limited in this embodiment.

[0074] Combination Figure 1 In the illustrated embodiment, the interface server recovery method further includes: if the recovery strategy is the third recovery strategy, if a failure occurs in other interface servers in a normal working state, the third recovery strategy is stopped and the second recovery strategy is started.

[0075] For example, multiple interface servers fail in the distributed interface server system, such as interface server A and interface server B, and the first working states corresponding to interface server A and interface server B before the failure are both normal working states, then the interface server recovery strategy is determined to be the third recovery strategy, and then in the process of implementing the third recovery strategy, if other interface servers that are working normally (such as interface server D) are detected to fail, the distributed interface server system stops the third recovery strategy and starts the second recovery strategy. For example, the second recovery strategy is to recover interface server A, interface server B, and interface server D respectively.

[0076] Combination Figure 1 In the illustrated embodiment, the interface server recovery method further includes: if there is an interface server whose first working state is a normal working state, determining that the corresponding interface server is the first interface server, and determining that the recovery strategy is to recover the first interface server.

[0077] For example, among the interface servers of the distributed interface server system that have failed, there is an interface server whose first working state is a normal working state, and it is determined that the interface server corresponding to the first working state is the first interface server, then the recovery strategy is determined to be to recover the first interface server.

[0078] Further, when the first interface server is restored, the presence of a heartbeat data packet is detected in the first interface server, and the initial value C10 of its corresponding heartbeat counter is 0. Each time a heartbeat data packet is detected, the value of the heartbeat counter is increased by 1 until the value C11 corresponding to the heartbeat counter reaches a preset threshold (for example, the fault recovery heartbeat number C is equal to 20), then it is determined that the first interface server has been restored successfully.

[0079] This embodiment accurately formulates a recovery strategy according to the number of corresponding interface servers in normal working state before the failure, so as to achieve flexible recovery of corresponding interface servers in the distributed interface service system, thereby improving the efficiency and reliability of recovery.

[0080] refer to Figure 2 , Figure 2 Schematic diagram of the process of the method for recovering an interface server failure provided by an embodiment of the present invention Figure 2 ,like Figure 2 As shown, if the distributed interface server system includes two interface servers and at least one interface server is detected to have a fault, then the recovery strategy of the interface server in the distributed interface server system needs to be determined according to the first working state corresponding to the faulty interface server. For example, if the first working state corresponding to the faulty interface server is already in a faulty state within a preset time period before the fault, regardless of whether the number of the faulty interface servers is 1 or 2, the first recovery strategy or the second recovery strategy can be used to achieve the recovery of the faulty interface server in the distributed interface server system.

[0081] If both interface servers of the distributed interface server system fail, and the first working states corresponding to the two interface servers before the failure are both normal working states, then at least one failed interface server is restored first. If one interface server of the distributed interface server system fails, and the first working state corresponding to the interface server before the failure is a normal working state, then the failed interface server is restored first. Or if both interface servers of the distributed interface server system fail, and the first working state corresponding to one of the interface servers before the failure is both a normal working state, and the first working state corresponding to the other interface server before the failure is a faulty state, then the interface server whose first working state corresponds to a normal working state is restored first. In an optional embodiment, in the process of preferentially restoring the interface server corresponding to the first working state as a normal working state, if there are other corresponding interface servers whose current working state is a normal working state that fail, then the recovery strategy of the distributed interface server system is changed to the second recovery strategy to ensure the reliable and efficient operation of the distributed interface server system.

[0082] In an optional embodiment, if all failed interface servers in the distributed interface service system recover to normal working state, the operation safety and reliability of the distributed interface server system are further guaranteed.

[0083] In an optional embodiment, no matter how many interface servers there are in the distributed interface service system, only one interface server fails, and no matter whether the first working state corresponding to the interface server is a normal working state, the distributed interface service system only needs to restore the failed interface server. This recovery strategy is called a single interface server recovery strategy.

[0084] For example, if the distributed interface server system includes only two interface servers, when one of the interface servers fails, no matter whether the first working state corresponding to the interface server is a normal working state, the distributed interface server only needs to restore the failed interface server. Even if another normally working interface server fails during the restoration of the failed interface server, the two failed interface servers are restored at the same time. The implementation method of restoring the interface server is as described and principle in the above embodiment, which will not be repeated here.

[0085] Figure 3 A schematic diagram of the structure of the device for recovering an interface server failure provided by an embodiment of the present invention, such as Figure 3 As shown, the device comprises:

[0086] An acquisition module 21 is used to acquire the current working status of each interface server, wherein the current working status includes a fault status;

[0087] An obtaining module 22 is used to obtain a first working state of the corresponding interface server before the failure according to the failure state, where the first working state is used to characterize the working state of the interface server before the failure occurs;

[0088] The determination module 23 is used to determine a recovery strategy of the interface server in the distributed interface server system according to the first working state and the fault state, so as to recover the interface server.

[0089] In an optional embodiment, obtaining a first working state of the interface server before a failure includes:

[0090] If the current working state of the interface server is a fault state, the first working state of the interface server before the fault is obtained according to the heartbeat record of a preset period.

[0091] In an optional embodiment, determining a recovery strategy of the interface server according to the first working state and the fault state includes:

[0092] If there is no normal working state in the first working state;

[0093] then determining that the recovery strategy of the interface server is a first recovery strategy, wherein the first recovery strategy is used to indicate that at least one interface server is restored to a normal working state;

[0094] Alternatively, the recovery strategy of the interface server is determined to be a second recovery strategy, wherein the second recovery strategy is used to indicate that all interface servers are restored to a normal working state.

[0095] In an optional embodiment, determining a recovery strategy of the interface server according to the first working state and the fault state includes:

[0096] If there are multiple interface servers whose first working status is a normal working status, the recovery strategy is determined to be a third recovery strategy, wherein the third recovery strategy is used to indicate that at least one interface server corresponding to the first working status is restored to a normal working status.

[0097] In an optional embodiment, the method further includes:

[0098] If there is an interface server whose first working state is a normal working state, then the corresponding interface server is determined to be the first interface server,

[0099] And determine the recovery strategy to be recovery of the first interface server.

[0100] In an optional embodiment, the method further includes:

[0101] If the recovery strategy is the third recovery strategy, and it is detected that a failure occurs in other normally working interface servers, the third recovery strategy is stopped and the second recovery strategy is started.

[0102] In an optional embodiment, restoring the interface server includes:

[0103] The heartbeat number of the interface server within a preset period is detected. If the heartbeat number reaches a preset threshold, it is determined that the interface server has recovered successfully.

[0104] The interface server failure recovery device of this embodiment can execute Figure 1 , Figure 2 For the technical solution in the method shown, its specific implementation process and technical principles can be found in Figure 1 , Figure 2 The relevant descriptions in the method shown will not be repeated here.

[0105] Figure 4 A structural diagram of a system for recovering an interface server failure provided by an embodiment of the present invention, such as Figure 4 As shown, the interface server fault recovery system 30 of this embodiment may include: a processor 31 and a memory 32 .

[0106] A memory 32, used to store computer programs (such as application programs and function modules for implementing the above-mentioned interface server recovery method), computer instructions, etc.;

[0107] The above-mentioned computer programs, computer instructions, etc. may be stored in partitions in one or more memories 32. And the above-mentioned computer programs, computer instructions, data, etc. may be called by the processor 31.

[0108] The processor 31 is used to execute the computer program stored in the memory 32 to implement the various steps in the method involved in the above embodiment.

[0109] For details, please refer to the relevant description in the previous method embodiment.

[0110] The processor 31 and the memory 32 may be independent structures or integrated structures. When the processor 31 and the memory 32 are independent structures, the memory 32 and the processor 31 may be coupled and connected via a bus 33 .

[0111] The server of this embodiment can execute Figure 1 , Figure 2 For the technical solution in the method shown, its specific implementation process and technical principles can be found in Figure 1 , Figure 2 The relevant descriptions in the method shown will not be repeated here.

[0112] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When at least one processor of a user device executes the computer-executable instructions, the user device executes the above-mentioned various possibilities.

[0113] Among them, computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also be present in a communication device as discrete components.

[0114] Those skilled in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc., various media that can store program codes.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for recovering an interface server failure, applied to a distributed interface server system, comprising a plurality of said interface servers, characterized in that: Said include: Acquire the current working status of each interface server, wherein the current working status includes a fault status; According to the fault state, obtaining a first working state of the corresponding interface server before the fault occurs, wherein the first working state is used to characterize the working state of the interface server before the fault occurs; Determining a recovery strategy for an interface server in the distributed interface server system according to the first working state and the fault state, so as to recover the interface server; Determining a recovery strategy of the interface server in the distributed interface server system according to the first working state and the fault state includes: If there is no normal working state in the first working state; then determining that the recovery strategy of the interface server is a first recovery strategy, wherein the first recovery strategy is used to indicate that at least one interface server is restored to a normal working state; Alternatively, determining that the recovery strategy of the interface server is a second recovery strategy, wherein the second recovery strategy is used to indicate that all interface servers are restored to a normal working state; If there are multiple interface servers whose first working states are in a normal working state, determining that the recovery strategy is a third recovery strategy, wherein the third recovery strategy is used to indicate that at least one interface server corresponding to the first working state is restored to a normal working state; If there is an interface server whose first working state is a normal working state, then the corresponding interface server is determined to be the first interface server, And determine that the recovery strategy is to recover the first interface server.

2. The method according to claim 1, characterized in that: Obtaining the first working state of the corresponding interface server before the failure, including: If the current working state of the interface server is a fault state, the first working state of the interface server before the fault is obtained according to the heartbeat record of a preset period.

3. The method according to claim 1, characterized in that The method further comprises: If the recovery strategy is the third recovery strategy, and it is detected that a failure occurs in other normally working interface servers, the third recovery strategy is stopped and the second recovery strategy is started.

4. The method according to any one of claims 1 to 3, characterized in that Restoring the interface server includes: The heartbeat number of the interface server within a preset period is detected, and if the heartbeat number reaches a preset threshold, it is determined that the interface server has recovered successfully.

5. A device for recovering an interface server failure, applied to a distributed interface server system, comprising a plurality of the interface servers, characterized in that: Said include: An acquisition module, used to acquire the current working status of each interface server, wherein the current working status includes a fault status; An obtaining module, used for obtaining a first working state of the corresponding interface server before the failure according to the failure state, wherein the first working state is used for representing the working state of the interface server before the failure occurs; a determination module, configured to determine a recovery strategy of an interface server in the distributed interface server system according to the first working state and the fault state, so as to recover the interface server; The determination module is specifically used to determine that if there is no normal working state in the first working state, the recovery strategy of the interface server is the first recovery strategy, wherein the first recovery strategy is used to characterize that at least one interface server has been restored to a normal working state; or, determine that the recovery strategy of the interface server is the second recovery strategy, wherein the second recovery strategy is used to characterize that all interface servers have been restored to a normal working state; if there are multiple interface servers whose first working states are normal working states, determine that the recovery strategy is the third recovery strategy, wherein the third recovery strategy is used to characterize that at least one interface server corresponding to the restoration of the first working state to a normal working state; if there is one interface server whose first working state is normal working state, determine that the corresponding interface server is the first interface server, and determine that the recovery strategy is to restore the first interface server.

6. A system for recovering from an interface server failure, characterized in that: include: A memory and a processor, wherein the memory stores executable instructions of the processor; wherein the processor is configured to execute the method for interface server failure recovery according to any one of claims 1 to 4 by executing the executable instructions.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for interface server failure recovery described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Multiserver adaptive task scheduling method and device thereof

    CN102006314A

  • Data transmission structure and program development method of network server pool system

    CN103731291A