Encryption machine fault processing method, encryption machine fault processing method, storage medium and program product
By introducing an encryptor detection system and nginx load balancer into the encryptor cluster, the problem of inaccurate fault identification in traditional technology is solved and the reliability of business processing is improved.
Patent Information
- Application Number
- CN202411064953.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-26
AI Technical Summary
Traditional encryptor clusters cannot accurately identify the failed encryptor when the encryptor fails, resulting in low reliability of service processing.
The encryption machine detection system and nginx load balancer were introduced. By sending detection instructions to the F5 load balancer and nginx load balancer, detecting multiple encryption machines in turn, determining the faulty encryption machine, and notifying the password application system.
It realizes accurate identification and isolation of the fault encryption machine, improves the reliability of business processing, and ensures that business requests can be responded smoothly.
Smart Images

Figure CN119030722A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of encryption technology, and in particular to encryption machine fault processing, methods, storage media and program products. Background Art
[0002] At present, traditional encryption machine clusters usually include business systems, cryptographic application systems, and multiple F5 load balancers. An F5 load balancer usually has multiple cryptographic machines under it. The cryptographic application system selects a suitable encryption machine to perform encryption tasks by randomly connecting to an F5 load balancer.
[0003] Specifically, after receiving the service request from the business system, the cryptographic application system sends the service request to the F5 load balancer, and the F5 load balancer randomly sends the service request to the subordinate encryption machine; however, when the encryption machine fails, the cryptographic application system cannot determine the failed encryption machine, resulting in the inability to respond to the service request normally, reducing the reliability of business processing. Summary of the invention
[0004] The main purpose of this application is to provide an encryption machine fault processing, method, storage medium and program product, aiming to solve the technical problem of low reliability of business processing.
[0005] To achieve the above purpose, the present application proposes a method for handling encryption machine failures, the method comprising:
[0006] The encryption machine cluster includes an encryption machine detection system, and the encryption machine cluster also includes a cryptographic application system, an F5 load balancer, an nginx load balancer, and a plurality of first encryption machines;
[0007] The method includes:
[0008] Sending a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine to obtain a first detection result, wherein the second encryption machine is at least two encryption machines of the plurality of first encryption machines that are subordinate to the F5 load balancer;
[0009] Sending a detection instruction to the nginx load balancer, so that the nginx load balancer detects each of the first encryption machines in turn to obtain a second detection result;
[0010] Based on the first detection result and the second detection result, the failed encryption machine is determined and the cryptographic application system is notified.
[0011] In one embodiment, the encryption machine cluster includes at least two F5 load balancers, and the step of sending a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine and obtaining a first detection result includes:
[0012] Sending a detection instruction to each of the F5 load balancers, so that each of the F5 load balancers sends the detection instruction to its own subordinate second encryption machine;
[0013] Based on the first response result of the second encryption machine to the detection instruction and the first detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to each of the F5 load balancers until the preset first condition is met to obtain the first detection result.
[0014] In one embodiment, the step of determining whether to return to the step of sending a detection instruction to each of the F5 load balancers based on the first response result of the second encryption machine to the detection instruction and the first detection number in the detection instruction until the preset first condition is met, and obtaining the first detection result includes:
[0015] When the first response result is a response failure and the current number of detections is less than the first number of detections, the process returns to the step of sending detection instructions to each of the F5 load balancers until the first response result is a response success and / or the current number of detections is greater than or equal to the first number of detections, thereby obtaining a first detection result.
[0016] In one embodiment, after the step of sending a detection instruction to each of the F5 load balancers, at least one of the following is further included:
[0017] When the first response results corresponding to the first detection times are all response failures and the preset first deletion condition is met, the F5 load balancer to which the second encryption machine belongs is deleted from the preset available list to obtain a temporary available list;
[0018] When the first response result is a successful response, the F5 load balancer to which the second encryption machine belongs is added to the preset available list to obtain a temporary available list.
[0019] In one embodiment, the encryption machine cluster includes at least two nginx load balancers, and the step of sending a detection instruction to the nginx load balancer so that the nginx load balancer detects each of the first encryption machines in turn, and obtaining the second detection result includes:
[0020] Sending a detection instruction to the first nginx load balancer, so that the first nginx load balancer sends the detection instruction to the third encryption machines in the temporary available list in sequence, wherein the temporary available list includes at least one of the first encryption machines;
[0021] Based on the second response result of the third encryption machine to the detection instruction and the second detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to the first nginx load balancer until the preset second condition is met, and send the detection instruction to the second nginx load balancer, so that the second nginx load balancer sends the detection instruction to the third encryption machine in the temporarily available list in sequence;
[0022] Based on the third response result of the third encryption machine to the detection instruction and the third detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to the second nginx load balancer until the preset third condition is met to obtain the second detection result.
[0023] In one embodiment, after the step of sending the detection instruction to the nginx load balancer, at least one of the following is included:
[0024] When the second response results corresponding to the second detection times are all response failures, and the third response results corresponding to the third detection times are all response failures, and the preset second deletion condition is met, the F5 load balancer to which the third encryption machine belongs is deleted from the temporary available list to obtain the target available list;
[0025] When the second response result or the third response result is a successful response, the F5 load balancer to which the third encryption machine belongs is added to the temporary available list to obtain a target available list.
[0026] In one embodiment, when the preset first deletion condition and / or the preset second deletion condition is not satisfied, the encryption machine in the off-site encryption machine cluster is added to the target available list;
[0027] The step of notifying the password application system comprises:
[0028] The target available list is sent to the cryptographic application system, so that the cryptographic application system uses the corresponding encryption machine based on the target available list when receiving a service request.
[0029] In one embodiment, the step of determining the encryption machine that has failed based on the first detection result and the second detection result includes:
[0030] When the first detection result and the second detection result corresponding to the target encryption machine are both detection failures, determining that the encryption machine that has failed is the target encryption machine;
[0031] After the step of determining the encryption machine that has failed based on the first detection result and the second detection result, the method further includes:
[0032] Based on the first response result in the first detection result, and the second detection result, the second response result and the third response result, the fault type of the encryption machine is determined, and a fault warning is issued.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the encryption machine fault handling method described above are implemented.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the encryption machine fault handling method as described above.
[0035] One or more technical solutions proposed in this application have at least the following technical effects:
[0036] The encryption machine cluster of the present application includes an encryption machine detection system, and the encryption machine cluster also includes a cryptographic application system, an F5 load balancer, an nginx load balancer and multiple first encryption machines; the encryption machine detection system sends a detection instruction to the F5 load balancer, and the F5 load balancer detects the second encryption machine subordinate to the F5 load balancer among the multiple first encryption machines to obtain a first detection result; because the F5 load balancer has at least two subordinate encryption machines, and the characteristics of the F5 load balancer: it will randomly send detection instructions to the subordinate second encryption machine, and only detect the second encryption machine through the F5 load balancer. When there is a fault, it is impossible to determine which specific encryption machine among the second encryption machines subordinate to the F5 load balancer has a fault.
[0037] Therefore, after obtaining the first detection result, the encryption machine detection system sends a detection instruction to the nginx load balancer, and the nginx load balancer can detect each of the first encryption machines in turn (that is, detect all the first encryption machines separately) to obtain the second detection result; it can be understood that the nginx load balancer can detect each encryption machine in turn, and the first detection result can be further verified, so that based on the first detection result and the second detection result, the encryption machine that has failed can be accurately determined, and the cryptographic application system can be notified. The cryptographic application system can select the F5 load balancer that has not failed based on the first detection result and the second detection result, thereby successfully completing the response to the business request. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A flowchart of the first embodiment of the encryption machine fault handling method of the present application is provided;
[0041] Figure 2 A schematic diagram of a scenario provided for Embodiment 1 of the encryption machine fault handling method of the present application;
[0042] Figure 3 A schematic diagram of a scenario provided for Embodiment 1 of the encryption machine fault handling method of the present application;
[0043] Figure 4 A flowchart of the second embodiment of the encryption machine fault handling method of the present application is provided;
[0044] Figure 5 A schematic diagram of a scenario provided for Embodiment 2 of the encryption machine fault handling method of the present application;
[0045] Figure 6 A schematic diagram of a scenario provided for Embodiment 2 of the encryption machine fault handling method of the present application;
[0046] Figure 7 A schematic diagram of the device structure of the hardware operating environment involved in the encryption machine fault handling method in the embodiment of the present application.
[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an encryption machine detection system, etc. The following takes the encryption machine detection system as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the present application embodiment provides a method for handling encryption machine failures, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the encryption machine fault handling method of the present application.
[0052] In this embodiment, the encryption machine fault handling method includes steps S10 to S30:
[0053] Step S10, sending a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine to obtain a first detection result, wherein the second encryption machine is at least two encryption machines among the multiple first encryption machines that are subordinate to the F5 load balancer.
[0054] It should be noted that, refer to Figure 2 The encryption machine cluster of this embodiment includes an encryption machine detection system, a cryptographic application system, an F5 load balancer, an nginx load balancer, and a plurality of first encryption machines; and Figure 3 Compared with the traditional encryption machine cluster shown in , the encryption machine cluster in this embodiment adds an encryption machine detection system and an nginx load balancer.
[0055] Under normal circumstances, in order to avoid mutual impact between various business systems, different business scenarios require the use of different encryption machines. For example, the encryption machines required for real-time transaction scenarios and batch encryption and decryption scenarios are different; therefore, the corresponding encryption machine clusters are usually divided based on the business scenario type; this embodiment only takes an encryption machine cluster corresponding to a business scenario as an example to illustrate the scenario.
[0056] At present, traditional encryption machine clusters usually include business systems, cryptographic application systems, and multiple F5 load balancers. An F5 load balancer usually has multiple subordinate cryptographic machines. The cryptographic application system selects a suitable encryption machine to perform encryption tasks by randomly connecting to an F5 load balancer; specifically, after receiving the business request from the business system, the cryptographic application system sends the business request to the F5 load balancer, and the F5 load balancer randomly sends the business request to the subordinate encryption machine.
[0057] However, when an encryption machine fails, the cryptographic application system cannot determine the failed encryption machine, resulting in failure to respond to business requests normally, reducing the reliability of business processing; for example, since the encryption application system can only access the encryption machine service through the F5 configured with the whitelist, each F5 has N encryption machines, refer to Figure 3 , F5_1 has three subordinate encryption machines. Since the service request is randomly distributed to encryption machines 1, 2, and 3 through F5_1, assuming that the service request fails, the encryption application system cannot determine which encryption machine 1, 2, and 3 has failed. For another example, assuming that encryption machine 1 fails, but every service request sent by F5_1 is randomly distributed to encryption machine 2 or 3, the encryption application system always believes that the encryption machine has no fault, and thus determines that encryption machines 1, 2, and 3 have no fault. When a new service request is forwarded to F5_1 and distributed to encryption machine 1, it will cause the service request to fail, that is, it is impossible to accurately judge the encryption machine failure.
[0058] In order to solve the above problems, this embodiment adds an encryption machine detection system and an nginx load balancer to the traditional encryption machine cluster. The encryption machine detection system sends a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine and obtains a first detection result.
[0059] It should be noted that the second encryption machine is at least two encryption machines among the multiple first encryption machines that are subordinate to the F5 load balancer. It can be understood that the first encryption machines include encryption machines 1-9, and the number of encryption machines subordinate to the F5 load balancer is greater than or equal to 2. For example, the encryption machines subordinate to F5_1 include encryption machines 1-3, that is, the encryption machines subordinate to different F5 load balancers are different.
[0060] Specifically, after the F5 load balancer receives the detection instruction sent by the encryption machine detection system, the F5 load balancer can send a detection packet or a heartbeat packet to one of its subordinate encryption machines. It can be understood that if the F5 load balancer receives a data packet returned by one of its subordinate encryption machines, it temporarily considers that the second encryption machine subordinate to the F5 load balancer has not failed, and the first detection result obtained can be that the second encryption machine subordinate to the F5 load balancer has not failed.
[0061] Step S20, sending a detection instruction to the nginx load balancer, so that the nginx load balancer detects each of the first encryption machines in turn to obtain a second detection result;
[0062] Since the F5 load balancer has at least two subordinate encryption machines, and the characteristics of the F5 load balancer are: it will randomly send detection instructions to the subordinate second encryption machine, and the second encryption machine is only detected through the F5 load balancer. When there is a fault, it is impossible to determine which specific encryption machine among the second encryption machines subordinate to the F5 load balancer has failed.
[0063] Therefore, after obtaining the first detection result, the encryption machine detection system sends a detection instruction to the nginx load balancer, and the nginx load balancer can detect each of the first encryption machines in turn (that is, detect all the first encryption machines separately) to obtain the second detection result.
[0064] It can be understood that each encryption machine can be detected in turn through the nginx load balancer, and the first detection result can be further verified. For example, if the first detection result is that the second encryption machine subordinate to the F5 load balancer has a fault, it is necessary to detect each encryption machine in turn through the nginx load balancer to determine whether each encryption machine subordinate to the F5 load balancer has a fault; if the first detection result is that the second encryption machine subordinate to the F5 load balancer has not a fault, it is necessary to detect each encryption machine in turn through the nginx load balancer to determine whether each encryption machine subordinate to the F5 load balancer has not a fault.
[0065] Specifically, after the nginx load balancer receives the detection instruction sent by the encryption machine detection system, the nginx load balancer can send detection packets or heartbeat packets to the first encryption machine in turn. It can be understood that if the nginx load balancer receives a data packet returned by a first encryption machine, it can be considered that the first encryption machine has not failed, that is, the second detection result is that the first encryption machine has not failed. If the nginx load balancer does not receive a data packet returned by a first encryption machine, it can be considered that the first encryption machine has failed, that is, the second detection result is that the first encryption machine has failed.
[0066] It is understandable that in order to ensure the real-time reliability of the service, a detection instruction can be sent to the nginx load balancer at regular intervals, and after obtaining the first detection result, a detection instruction can be sent to the nginx load balancer. Specifically, a detection instruction can be sent to the nginx load balancer every 2 minutes or 3 minutes.
[0067] Step S30, based on the first detection result and the second detection result, determine the encryption machine where the fault occurs, and notify the cryptographic application system.
[0068] It can be understood that when the first detection result shows that the encryption machine subordinate to the F5 load balancer has a fault, if the second detection result shows that the encryption machine subordinate to the F5 load balancer has no fault, then the encryption machine is a suspicious encryption machine and the suspicious encryption machine can be further detected; when the first detection result shows that the encryption machine subordinate to the F5 load balancer has a fault, if the second detection result shows that a certain encryption machine subordinate to the F5 load balancer has a fault, then the encryption machine is considered to have a fault; when the first detection result shows that the encryption machine subordinate to the F5 load balancer has no fault, if the second detection result shows that a certain encryption machine subordinate to the F5 load balancer has a fault, then the encryption machine is a suspicious encryption machine and the suspicious encryption machine can be further detected; when the first detection result shows that the encryption machine subordinate to the F5 load balancer has no fault, if the second detection result shows that a certain encryption machine subordinate to the F5 load balancer has no fault, then the encryption machine is considered to have no fault.
[0069] Based on the above, based on the first detection result and the second detection result, the status of multiple encryption machines can be determined, that is, which are faulty encryption machines, which are suspicious encryption machines, and which are normal encryption machines.
[0070] Therefore, based on the first detection result and the second detection result, the encryption machine detection system can accurately determine the failed encryption machine and notify the cryptographic application system. The cryptographic application system can select the F5 load balancer that has not failed based on the first detection result and the second detection result, thereby successfully completing the response to the business request.
[0071] In this embodiment, the encryption machine cluster includes an encryption machine detection system, and the encryption machine cluster also includes a cryptographic application system, an F5 load balancer, an nginx load balancer and multiple first encryption machines; the encryption machine detection system sends a detection instruction to the F5 load balancer, and the F5 load balancer detects the second encryption machine subordinate to the F5 load balancer among the multiple first encryption machines to obtain a first detection result; after obtaining the first detection result, the encryption machine detection system sends a detection instruction to the nginx load balancer, and the nginx load balancer can detect each of the first encryption machines in turn (that is, detect all the first encryption machines respectively) to obtain a second detection result; it can be understood that the nginx load balancer can detect each encryption machine in turn, and the first detection result can be further verified, so that based on the first detection result and the second detection result, the encryption machine with a fault can be accurately determined, and the cryptographic application system can be notified. The cryptographic application system can select the F5 load balancer that has not failed based on the first detection result and the second detection result, so as to successfully complete the response to the business request; thereby solving the problem of the inability to accurately identify the faulty encryption machine and improving the reliability of business processing.
[0072] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S10 includes steps S01 to S02:
[0073] Step S01, sending a detection instruction to each of the F5 load balancers, so that each of the F5 load balancers sends the detection instruction to its own subordinate second encryption machine;
[0074] It should be noted that the encryption machine cluster includes at least two F5 load balancers, for example, the encryption machine cluster includes F5_1, F5_2 and F5_3, refer to Figure 2 .
[0075] Specifically, the implementation method of the encryption machine detection system sending detection instructions to each of the F5 load balancers can be that the encryption machine detection system sends detection instructions to F5_1, F5_2 and F5_3 respectively at the same time, F5_1 can send the detection instruction to its subordinate encryption machine 1, 2 or 3, F5_2 can send the detection instruction to its subordinate encryption machine 4, 5 or 6, and F5_3 can send the detection instruction to its subordinate encryption machine 7, 8 or 9.
[0076] Step S02, based on the first response result of the second encryption machine to the detection instruction and the first detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to each of the F5 load balancers until the preset first condition is met and the first detection result is obtained.
[0077] It can be understood that in order to avoid errors in the detection results due to network fluctuations, the number of detection times can be set during the detection of the encryption machine. Specifically, the preset number of detection times can be carried in the detection instruction to inform each F5 load balancer of the number of times to send the detection instruction. For example, the first number of detection times can be 2, 3 or 4, etc., which can be set based on actual conditions.
[0078] Assuming that the first detection number is 3, the F5 load balancer can send three detection instructions to its subordinate second encryption machine. It can be understood that the F5 load balancer can record the current detection number each time it sends a detection instruction. Through multiple detections, the correctness of the first detection result can be ensured.
[0079] Specifically, based on the first response result of the second encryption machine to the detection instruction and the first detection number in the detection instruction, determining whether to return to the step of sending the detection instruction to each of the F5 load balancers until the preset first condition is met, the specific implementation method of obtaining the first detection result may be:
[0080] When the first response result is a response failure and the current number of detections is less than the first number of detections, the process returns to the step of sending detection instructions to each of the F5 load balancers until the first response result is a response success and / or the current number of detections is greater than or equal to the first number of detections, thereby obtaining a first detection result.
[0081] For example, after F5_1 sends the detection instruction to the second encryption machine, if the first response result of the second encryption machine to the detection instruction is a response failure, and the current detection number is less than the first detection number, the detection instruction is sent again. If the first response result of the second encryption machine to the detection instruction is still a response failure, and the current detection number is greater than or equal to the first detection number, it is considered that the second encryption machine has a fault; after F5_1 sends the detection instruction to the second encryption machine, if the first response result of the second encryption machine to the detection instruction is a response success, the first detection result is that the second encryption machine does not have a fault, refer to Figure 5 .
[0082] Furthermore, based on the first detection result and the second detection result, it is determined whether it is necessary to isolate the faulty encryption machine, or whether it is necessary to perform disaster recovery switching.
[0083] Specifically, refer to Figure 6After the step of sending the detection instruction to each of the F5 load balancers, at least one of the following feasible implementation methods is also included:
[0084] First, when the first response results corresponding to the first detection times are all response failures and the preset first deletion condition is met, the F5 load balancer to which the second encryption machine belongs is deleted from the preset available list to obtain a temporary available list.
[0085] For example, if the first response result of a certain F5 in the first detection is a response failure, the detection will continue twice. If the first response result is a response success in one of the second and third detections, it is considered that there may be a network failure or a failure in the encryption machine to which it belongs. Therefore, the F5 needs to be set as a suspicious F5; if three detections report errors, it is considered that there is a faulty encryption machine in the second encryption machine to which the F5 belongs, or it is considered that the F5 has a network failure. Therefore, the F5 can be directly deleted from the preset available list to achieve fault isolation and avoid affecting business processing.
[0086] It is understood that the preset available list may include initial, configured, and available F5 load balancers.
[0087] To avoid a lack of available encryption machines, before deleting the F5 load balancer to which the second encryption machine belongs from the preset available list, it must be ensured that there is at least one F5 load balancer in the preset available list; therefore, the preset first deletion condition may be: the number of available encryption machines must be greater than or equal to a preset number threshold, for example, when (the remaining number of available encryption machines / the initial number of available encryption machines) is greater than or equal to the preset number threshold, the preset first deletion condition is met.
[0088] Second, refer to Figure 6 When the first response result is a successful response, the F5 load balancer to which the second encryption machine belongs is added to the preset available list to obtain a temporary available list.
[0089] For example, if the first response result corresponding to a certain F5 load balancer during the first detection is a successful response, it is considered that the encryption machine has no faults, and the F5 load balancer to which the second encryption machine belongs is added to the preset available list to obtain a temporary available list.
[0090] It should be noted that, refer to Figure 6, the encryption machine cluster includes at least two nginx load balancers, for example, a first nginx load balancer (nginx1) and a second nginx load balancer (nginx2); it can be understood that in order to further verify the suspicious encryption machine and ensure the accuracy of the detection result, the first detection result can be verified in turn by at least two nginx load balancers.
[0091] Specifically, the sending of the detection instruction to the nginx load balancer so that the nginx load balancer detects each of the first encryption machines in turn, and the specific implementation method of obtaining the second detection result may be:
[0092] Send a detection instruction to the first nginx load balancer so that the first nginx load balancer sends the detection instruction to the third encryption machine in the temporarily available list in sequence, wherein the temporarily available list includes at least one of the first encryption machines; based on the second response result of the third encryption machine to the detection instruction and the second detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to the first nginx load balancer until the preset second condition is met, and send the detection instruction to the second nginx load balancer so that the second nginx load balancer sends the detection instruction to the third encryption machine in sequence in the temporarily available list; based on the third response result of the third encryption machine to the detection instruction and the third detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to the second nginx load balancer until the preset third condition is met to obtain the second detection result.
[0093] Among them, both the second detection number and the second detection number can be pre-set, for example, both can be 2 times or 3 times, etc. The following is a specific example in which the second detection number and the second detection number are both 3 times.
[0094] It can be understood that the encryption machine detection system sends a detection instruction to the first nginx load balancer, and the first nginx load balancer sends the detection instruction to the third encryption machine in the temporarily available list in sequence. If the second response result of the third encryption machine to the detection instruction is a response failure, and the current number of detections is less than the second number of detections, the detection instruction is sent again. If the second response result of the third encryption machine to the detection instruction is still a response failure, and the current number of detections is greater than or equal to the second number of detections, it is considered that the third encryption machine has a fault; the encryption machine detection system then sends a detection instruction to the second nginx load balancer, and detects the third encryption machine again until the preset third condition is met, and the second detection result is obtained, refer to Figure 6 .
[0095] It can be understood that the preset first condition, the preset second condition and the preset third condition can all be that the corresponding response result is a successful response and / or the current detection number is greater than or equal to the corresponding detection number.
[0096] In this process, after the first nginx load balancer sends the detection instruction to the third encryption machine, if the first response result of the third encryption machine to the detection instruction is a successful response, the second detection result is obtained that the third encryption machine does not have a fault, refer to Figure 6 ; After the first nginx load balancer sends the detection instruction to the third encryption machine, if the first response result of the third encryption machine to the detection instruction is a response failure, and after the second nginx load balancer sends the detection instruction to the third encryption machine, if the first response result of the third encryption machine to the detection instruction is a response success, it is considered that the second detection result is that the third encryption machine does not have a fault, refer to Figure 6 .
[0097] It should be noted that after the step of sending the detection instruction to the nginx load balancer, at least one of the following feasible implementation methods is included:
[0098] First, when the second response results corresponding to the second detection times are all response failures, and the third response results corresponding to the third detection times are all response failures, and the preset second deletion condition is met, the F5 load balancer to which the third encryption machine belongs is deleted from the temporary available list to obtain the target available list.
[0099] It can be understood that the second deletion condition may be the same as or different from the first deletion condition.
[0100] When the second response results corresponding to the second detection times are all response failures, and the third response results corresponding to the third detection times are all response failures, and the preset second deletion condition is met, it is considered that the third encryption machine has a fault, and the F5 load balancer to which the third encryption machine belongs is deleted from the temporary available list to obtain the target available list.
[0101] It can be understood that the encryption machines in the target available list are all available encryption machines.
[0102] Second, when the second response result or the third response result is a successful response, the F5 load balancer to which the third encryption machine belongs is added to the temporary available list to obtain a target available list.
[0103] Specifically, when the second response result or the third response result is a successful response, it is considered that the third encryption machine has no faults. Therefore, the F5 load balancer to which the third encryption machine belongs can be added to the temporary available list to obtain the target available list, thereby ensuring business continuity to the greatest extent.
[0104] It should be noted that the specific implementation of determining the encryption machine that has a fault based on the first detection result and the second detection result may be:
[0105] When both the first detection result and the second detection result corresponding to the target encryption machine fail to detect, it is determined that the encryption machine in which the fault occurs is the target encryption machine.
[0106] When the response result is failure, the detection result is considered to be detection failure.
[0107] Furthermore, since different instructions are authorized to different encryption machines, among the second encryption machines subordinate to F5_1, only encryption machine 1 has authorized instruction a, and encryption machines 2 and 3 cannot use instruction a; if the business system randomly distributes instruction a to the three encryption machines through F5_1, there will be occasional success and occasional failure. At this time, the cause of the failure cannot be determined; that is, the causes of the failure are diverse, for example, F5 load balancer failure, encryption machine failure or network failure.
[0108] Therefore, after the step of determining the encryption machine that has a fault based on the first detection result and the second detection result, the following steps may be performed:
[0109] Based on the first response result in the first detection result, and the second detection result, the second response result and the third response result, the fault type of the encryption machine is determined, and a fault warning is issued.
[0110] Specifically, based on the first response result in the first detection result, and the second detection result, the second response result, and the third response result, the specific implementation of determining the fault type of the encryption machine and issuing a fault warning may include at least one of the following:
[0111] First, the fault type is network fluctuation: for example, if the first detection result or the second detection result shows a first detection failure, followed by a second detection success, it is considered that the fault is caused by network fluctuation.
[0112] Second, the fault type is encryption machine failure: If the second response result and the third response result are both response failures, while the corresponding F5 is automatically deleted from the temporary available list, a fault warning message will also be sent to the relevant management personnel to allow the management personnel to check the fault condition of the encryption machine.
[0113] Third, the fault type is nginx fault: if the second response result is a response failure, and the third response results are all response successes, then it is considered that nginx1 has a fault; otherwise, it is considered that nginx2 has a fault.
[0114] Fourth, the fault type is F5 fault: if the first response result is a response failure, but the second response result or the third response result is a response success, it is considered that F5 has a fault.
[0115] Fifth, the fault type is unauthorized command: When accessing a new business scenario, you need to configure the business command first, and check at one time whether all encryption machines in the encryption machine cluster use the business command successfully. If an encryption machine reports an error, it is considered that the encryption machine has not authorized the business command.
[0116] Sixth, the fault type is a network area fault: If the fault warning information corresponding to each periodic detection (scheduled detection) is concentrated on F5 or nginx in one area, it is considered that there is a problem with the network in this area.
[0117] It should also be noted that since traditional encryption machine clusters do not have a remote disaster recovery mechanism, if most of the encryption machines in a certain area fail or there is a network failure in a local area, it is impossible to switch the traffic to encryption machines in other availability zones in time, affecting business continuity.
[0118] To solve the above problem, when the preset first deletion condition and / or the preset second deletion condition are not met, the encryption machine in the off-site encryption machine cluster can be added to the target available list; after obtaining the target available list, the target available list can be sent to the cryptographic application system, so that the cryptographic application system can use the corresponding encryption machine based on the target available list when receiving a business request, thereby ensuring the reliability of business processing.
[0119] Specifically, if a large number of F5s in the encryption machine cluster fail, when fault isolation is performed according to the preset first deletion condition or the preset second deletion condition, if the faulty F5 cannot be deleted because the preset first deletion condition or the preset second deletion condition is not met, the encryption machines in the off-site encryption machine cluster can be added to the target available list.
[0120] For example, when a large number of F5s in cluster 1 in region X fail and the failed F5s are deleted, an available F5 encryption machine is called from cluster 1 in region Y to be added to the target available list; specifically, assuming that cluster 1 in region X is provided with 3 F5s: x1, x2, and x3, and cluster 1 in region Y also has 3 F5s: y1, y2, and y3, and the preset quantity threshold is 0.6, and x1 in cluster 1 in region X fails. At this time (2 / 3>0.6), fault isolation can be performed; if x2 in cluster 1 in region X also fails, since (1 / 3<0.6), fault isolation cannot be performed, and a random F5, such as b1, can be selected from region Y, and x2 in region X is replaced by b1. At this time, there are two available F5s in region X: x3 and b1.
[0121] In this embodiment, when solving the encryption machine failure, the faulty encryption machine can be automatically isolated, and the business traffic can be automatically switched to other locally available encryption machines; when solving the problem of large-scale network or encryption machine failure, the problem of not being able to automatically switch the business traffic to an available encryption machine in a different location is solved; when it is found that a large number of encryption machines in a certain area have failed, the traffic is automatically switched to a non-faulty encryption machine in a different location, thereby improving the reliability of business processing.
[0122] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the encryption machine fault handling method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0123] The present application also provides an encryption machine cluster, the encryption machine cluster includes an encryption machine detection system, the encryption machine cluster also includes a cryptographic application system, an F5 load balancer, an nginx load balancer, and a plurality of first encryption machines;
[0124] The encryption machine detection system is used to send a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine to obtain a first detection result, wherein the second encryption machine is at least two encryption machines among the multiple first encryption machines that are subordinate to the F5 load balancer; send a detection instruction to the nginx load balancer so that the nginx load balancer detects each of the first encryption machines in turn to obtain a second detection result; based on the first detection result and the second detection result, determine the encryption machine that has failed, and notify the cryptographic application system.
[0125] The encryption machine cluster provided by the present application adopts the encryption machine cluster method in the above embodiment, which can solve the technical problem of low reliability of business processing. Compared with the prior art, the beneficial effects of the encryption machine cluster provided by the present application are the same as the beneficial effects of the encryption machine fault handling method provided by the above embodiment, and other technical features in the encryption machine cluster are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0126] The present application provides an encryption machine fault handling device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the encryption machine fault handling method in the above-mentioned embodiment one.
[0127] Reference below Figure 7 , which shows a schematic diagram of the structure of an encryption machine fault processing device suitable for implementing the embodiment of the present application. The encryption machine fault processing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The encryption machine fault handling device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0128] like Figure 7As shown, the encryption machine fault processing device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the encryption machine fault processing device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the encryption machine fault handling device to communicate wirelessly or wired with other devices to exchange data. Although the encryption machine fault handling device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided alternatively.
[0129] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0130] The encryption machine fault processing device provided by the present application adopts the encryption machine fault processing method in the above embodiment, which can solve the technical problem of low reliability of business processing. Compared with the prior art, the beneficial effects of the encryption machine fault processing device provided by the present application are the same as the beneficial effects of the encryption machine fault processing method provided by the above embodiment, and other technical features in the encryption machine fault processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0131] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0132] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0133] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the encryption machine fault handling method in the above-mentioned embodiment.
[0134] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0135] The computer-readable storage medium may be included in the encryption machine fault processing device; or may exist independently without being assembled into the encryption machine fault processing device.
[0136] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the encryption machine fault processing device, the encryption machine fault processing device executes the encryption machine fault processing method.
[0137] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0140] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned encryption machine fault handling method, and can solve the technical problem of low reliability of business processing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the encryption machine fault handling method provided by the above-mentioned embodiment, and will not be repeated here.
[0141] The present application also provides a computer program product, including a computer program, which implements the steps of the encryption machine failure processing method as described above when executed by a processor.
[0142] The computer program product provided by this application can solve the technical problem of low reliability of business processing. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the encryption machine fault processing method provided by the above embodiment, which will not be repeated here.
[0143] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for handling encryption machine failure, characterized in that: The encryption machine cluster includes an encryption machine detection system, and the encryption machine cluster also includes a cryptographic application system, an F5 load balancer, an nginx load balancer, and a plurality of first encryption machines; The method includes: Sending a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine to obtain a first detection result, wherein the second encryption machine is at least two encryption machines of the plurality of first encryption machines that are subordinate to the F5 load balancer; Sending a detection instruction to the nginx load balancer, so that the nginx load balancer detects each of the first encryption machines in turn to obtain a second detection result; Based on the first detection result and the second detection result, the failed encryption machine is determined and the cryptographic application system is notified.
2. The method according to claim 1, characterized in that The encryption machine cluster includes at least two F5 load balancers, and the step of sending a detection instruction to the F5 load balancer so that the F5 load balancer detects the second encryption machine and obtaining a first detection result includes: Sending a detection instruction to each of the F5 load balancers, so that each of the F5 load balancers sends the detection instruction to its own subordinate second encryption machine; Based on the first response result of the second encryption machine to the detection instruction and the first detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to each of the F5 load balancers until the preset first condition is met to obtain the first detection result.
3. The method according to claim 2, characterized in that The step of determining whether to return to the step of sending the detection instruction to each of the F5 load balancers based on the first response result of the second encryption machine to the detection instruction and the first detection number in the detection instruction until the preset first condition is met, and obtaining the first detection result includes: When the first response result is a response failure and the current number of detections is less than the first number of detections, the process returns to the step of sending detection instructions to each of the F5 load balancers until the first response result is a response success and / or the current number of detections is greater than or equal to the first number of detections, thereby obtaining a first detection result.
4. The method according to claim 2, characterized in that After the step of sending the detection instruction to each of the F5 load balancers, at least one of the following is also included: When the first response results corresponding to the first detection times are all response failures and the preset first deletion condition is met, the F5 load balancer to which the second encryption machine belongs is deleted from the preset available list to obtain a temporary available list; When the first response result is a successful response, the F5 load balancer to which the second encryption machine belongs is added to the preset available list to obtain a temporary available list.
5. The method according to claim 4, characterized in that The encryption machine cluster includes at least two nginx load balancers, and the step of sending a detection instruction to the nginx load balancer so that the nginx load balancer detects each of the first encryption machines in turn, and obtaining a second detection result includes: Sending a detection instruction to the first nginx load balancer, so that the first nginx load balancer sends the detection instruction to the third encryption machines in the temporary available list in sequence, wherein the temporary available list includes at least one of the first encryption machines; Based on the second response result of the third encryption machine to the detection instruction and the second detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to the first nginx load balancer until the preset second condition is met, and send the detection instruction to the second nginx load balancer, so that the second nginx load balancer sends the detection instruction to the third encryption machine in the temporarily available list in sequence; Based on the third response result of the third encryption machine to the detection instruction and the third detection number in the detection instruction, determine whether to return to the step of sending the detection instruction to the second nginx load balancer until the preset third condition is met to obtain the second detection result.
6. The method according to claim 5, characterized in that After the step of sending the detection instruction to the nginx load balancer, at least one of the following is included: When the second response results corresponding to the second detection times are all response failures, and the third response results corresponding to the third detection times are all response failures, and the preset second deletion condition is met, the F5 load balancer to which the third encryption machine belongs is deleted from the temporary available list to obtain the target available list; When the second response result or the third response result is a successful response, the F5 load balancer to which the third encryption machine belongs is added to the temporary available list to obtain a target available list.
7. The method according to any one of claims 4 to 6, characterized in that When the preset first deletion condition and / or the preset second deletion condition is not met, adding the encryption machines in the off-site encryption machine cluster to the target available list; The step of notifying the password application system comprises: The target available list is sent to the cryptographic application system, so that the cryptographic application system uses the corresponding encryption machine based on the target available list when receiving a service request.
8. The method according to claim 5, characterized in that The step of determining the encryption machine having a fault based on the first detection result and the second detection result includes: When the first detection result and the second detection result corresponding to the target encryption machine are both detection failures, determining that the encryption machine that has failed is the target encryption machine; After the step of determining the encryption machine that has failed based on the first detection result and the second detection result, the method further includes: Based on the first response result in the first detection result, and the second detection result, the second response result and the third response result, the fault type of the encryption machine is determined, and a fault warning is issued.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the encryption machine fault handling method as described in any one of claims 1 to 8 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the encryption machine failure handling method according to any one of claims 1 to 8 are implemented.
