CN112131063A - Retry method and device, computer device and computer readable storage medium - Google Patents

Retry method and device, computer device and computer readable storage medium Download PDF

Info

Publication number
CN112131063A
CN112131063A CN202011049455.4A CN202011049455A CN112131063A CN 112131063 A CN112131063 A CN 112131063A CN 202011049455 A CN202011049455 A CN 202011049455A CN 112131063 A CN112131063 A CN 112131063A
Authority
CN
China
Prior art keywords
retry
instruction
time interval
retry operation
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011049455.4A
Other languages
Chinese (zh)
Other versions
CN112131063B (en
Inventor
白玉
张新磊
张牧宇
陈亚坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011049455.4A priority Critical patent/CN112131063B/en
Publication of CN112131063A publication Critical patent/CN112131063A/en
Application granted granted Critical
Publication of CN112131063B publication Critical patent/CN112131063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The invention discloses a retry method and a retry device, computer equipment and a computer readable storage medium, wherein the method comprises the following steps: when response delay is detected, determining a retry time interval of each instruction retry operation according to a preset retry basic time interval and a retry weight parameter of each instruction retry operation; executing the instruction retry operation in the sequence according to the retry time interval of the instruction retry operation in the sequence; when the instruction retry operation before the sequence fails, the instruction retry operation after the sequence is executed according to the retry time interval of the instruction retry operation after the sequence until the end condition of the instruction retry operation is satisfied. The invention determines the retry time interval of each instruction retry operation according to the preset retry basic time interval and the retry weight parameter, thereby not only improving the flexibility of the retry time interval, but also improving the retry success rate.

Description

Retry method and device, computer device and computer readable storage medium
Technical Field
The present invention relates to the field of data interaction technologies, and in particular, to a retry method and apparatus, a computer device, and a computer-readable storage medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Data interaction and instruction transmission exist among different systems, and the ever-increasing business requirements enable the data interaction and instruction transmission among the different systems to be more frequent. However, regardless of the data interaction method, there is inevitably a situation in which the response is delayed. There are many reasons for the delay, such as network connection timeouts, system anomalies, etc. System response delays can cause inter-system data interaction failures.
For example, system a and system B agree to perform data interaction at 4 am each day by means of a text server. Due to network reasons, timeout occurs in the process of pushing the text to the system B by the system a, which results in failure of data interaction. For another example, according to the regulatory regulation, the system a and the system B agree that the system a remotely calls the instruction of the system B before 4 am every day to complete the reporting of the related data, and the remote call instruction fails due to the temporary abnormality of the service of the system B, so that the reporting of the data of the system a fails.
When response delay occurs, the partial system does not perform instruction retry operation any more. In addition, part of the system continuously executes retry operation of a designated number of times in a very short time; and the partial system performs instruction retry in equal time span and completes the instruction retry operation for specified times. However, the delay caused by network reasons or system service abnormality often requires manual intervention, and retry operations are continuously executed for a specified number of times in a short time, and the success rate is not high. In addition, if the time span is set to be longer or the total retry time of the instruction is longer under the condition of retrying the instruction in the equal time span, the data interaction is overtime; if the time span is set to be short, there may still be a case where data interaction fails after a specified number of retry operations are continuously performed, resulting in a low retry success rate. On the other hand, there is a problem that retry time span is not flexible enough when retry operations are continuously executed a specified number of times in a very short time or instruction retries are performed in a constant time span.
Therefore, the conventional retry method has a problem that the retry success rate and the retry time span are not flexible enough.
Disclosure of Invention
The embodiment of the invention provides a retry method, which is used for improving the retry success rate and the flexibility of retry time span, and comprises the following steps:
when response delay is detected, determining a retry time interval of each instruction retry operation according to a preset retry basic time interval and a retry weight parameter of each instruction retry operation;
executing the instruction retry operation in the sequence according to the retry time interval of the instruction retry operation in the sequence;
when the instruction retry operation before the sequence fails, the instruction retry operation after the sequence is executed according to the retry time interval of the instruction retry operation after the sequence until the end condition of the instruction retry operation is satisfied.
The embodiment of the present invention further provides a retry apparatus, configured to improve the retry success rate and the flexibility of the retry time span, where the retry apparatus includes:
a first interval determining module, configured to determine, when a response delay is detected, a retry time interval of each instruction retry operation according to a preset retry base time interval and a retry weight parameter of each instruction retry operation;
the instruction retry module executes the instruction retry operation with the prior sequence according to the retry time interval of the instruction retry operation with the prior sequence;
and the retry ending module is used for executing the instruction retry operation with the subsequent sequence according to the retry time interval of the instruction retry operation with the subsequent sequence when the instruction retry operation with the prior sequence fails until the ending condition of the instruction retry operation is met.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the retry method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing the retry method is stored.
In the embodiment of the invention, when response delay is detected, the retry time interval of each instruction retry operation is determined according to the preset retry basic time interval and the retry weight parameter of each instruction retry operation; executing the instruction retry operation in the sequence according to the retry time interval of the instruction retry operation in the sequence; when the instruction retry operation before the sequence fails, the instruction retry operation after the sequence is executed according to the retry time interval of the instruction retry operation after the sequence until the end condition of the instruction retry operation is satisfied. The embodiment of the invention determines the retry time interval of each instruction retry operation according to the preset retry basic time interval and the retry weight parameter, thereby not only improving the flexibility of the retry time interval, but also improving the retry success rate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart of an implementation of a retry method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another implementation of a retry method according to an embodiment of the present invention;
FIG. 3 is a functional block diagram of a retry apparatus according to an embodiment of the present invention;
FIG. 4 is another functional block diagram of a retry apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 shows a flow of implementing the retry method provided by the embodiment of the present invention, and for convenience of description, only the relevant parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
as shown in fig. 1, a retry method includes:
step 101, when a response delay is detected, determining a retry time interval of each instruction retry operation according to a preset retry basic time interval and a retry weight parameter of each instruction retry operation;
102, executing the retry operation of the instruction with the prior sequence according to the retry time interval of the retry operation of the instruction with the prior sequence;
and 103, when the instruction retry operation in the front sequence fails, executing the instruction retry operation in the back sequence according to the retry time interval of the instruction retry operation in the back sequence until the end condition of the instruction retry operation is met.
The response delay is monitored and detected when the retry is performed, for example, the response delay of the monitored data interaction, and it will be understood by those skilled in the art that the response delay may also be other types of response delay, for example, the response delay of the remote invocation request, etc., which is not limited in particular by the embodiment of the present invention.
In the embodiment of the invention, when the corresponding delay is detected, the instruction retry operation is required to be carried out, and the retry time interval of the instruction retry operation is determined. Specifically, when the response delay is detected, the retry time interval of each instruction retry operation may be determined according to a preset retry base time interval and a retry weight parameter of each instruction retry operation.
The retry base time interval is a preset retry time interval, and can be preset according to actual conditions and specific requirements. For example, the retry base time interval is preset to be 1 second, or the retry base time interval is preset to be 3 seconds, and those skilled in the art will understand that the retry base time interval may also be preset to be 2 seconds, 2.5 seconds, and the like, which is not limited in particular by the embodiment of the present invention.
The retry weight parameter of each instruction retry operation is similar to the retry basic time interval, and the retry weight parameter configured in advance can be preset according to actual conditions and specific requirements. For example, the retry weight parameter is set to be an exponential parameter, or the retry weight parameter is set to be a logarithmic parameter, or the retry weight parameter is set to be a quadratic function that varies with time, and those skilled in the art can understand that the retry weight parameter may also be set to be a plurality of discrete constants that vary regularly, for example, the retry weight parameter of each instruction retry operation is a discrete constant that decreases sequentially, or a discrete constant that increases sequentially, or a discrete constant that decreases sequentially and then increases sequentially, or a discrete constant that increases sequentially and then decreases sequentially, and the like, and the embodiments of the present invention do not particularly limit this.
After determining the retry time interval of each instruction retry operation, the instruction retry operation in the previous order is executed according to the retry time interval of the instruction retry operation in the previous order. The retry operation of the instruction with the prior execution sequence may be executed successfully or failed. After the retry operation of the instruction whose execution sequence is prior succeeds, the retry operation may be ended.
However, after the instruction retry operation with the prior execution sequence fails, the instruction retry operation with the subsequent execution sequence needs to be further executed according to the retry time interval of the instruction retry operation with the subsequent execution sequence, and the above process is executed in a loop until the end condition of the instruction retry operation is satisfied. Wherein, satisfying the ending condition of the instruction retry operation comprises: (1) the execution of the retry operation of the instructions which follow the sequence is successful; (2) the retry number reaches a preset maximum retry number threshold.
The preset maximum retry number threshold is a preset maximum retry number threshold, and the preset maximum retry number threshold may be preset according to actual conditions and specific requirements. For example, the preset maximum retry number threshold is preset to be 5 times, or the preset maximum retry number threshold is preset to be 8 times, and it can be understood by those skilled in the art that the preset maximum retry number threshold can be preset to be 6 times, or 10 times, etc., and the embodiment of the present invention is not limited thereto.
In the embodiment of the invention, when the response delay is detected, the retry time interval of each instruction retry operation is determined according to the preset retry basic time interval and the retry weight parameter of each instruction retry operation; executing the instruction retry operation in the sequence according to the retry time interval of the instruction retry operation in the sequence; when the instruction retry operation before the sequence fails, the instruction retry operation after the sequence is executed according to the retry time interval of the instruction retry operation after the sequence until the end condition of the instruction retry operation is satisfied. The embodiment of the invention determines the retry time interval of each instruction retry operation according to the preset retry basic time interval and the retry weight parameter, thereby not only improving the flexibility of the retry time interval, but also improving the retry success rate.
In one embodiment of the present invention, in order to increase the retry success rate, the retry time interval of the sequentially previous instruction retry operation is sequentially increased to the retry time interval of the sequentially next instruction retry operation.
In determining the retry time interval of the instruction retry operation, it may be set that the retry time interval of each instruction retry operation exhibits a periodic variation. In the case of a retry failure, the time of the next retry interval may be appropriately extended in order to increase the success rate of the retry. Accordingly, the retry time interval of the instruction retry operation in the order before to the retry time interval of the instruction retry operation in the order after can be set to be gradually increased, thereby improving the success rate of the retry.
In an embodiment of the present invention, in order to further improve the retry success rate, the retry weight parameter of each instruction retry operation is an index parameter, and the retry time interval of each instruction retry operation satisfies the following relationship:
PN=Q×KN-1N=1,2,3…;
and K is greater than 1;
wherein, PNA retry time interval representing N instruction retry operations, Q representing a retry base time interval, KN-1A retry weight parameter indicating an nth instruction retry operation, N-1 indicating an exponent in the retry weight parameter, and K indicating a base in the retry weight parameter.
The embodiment of the invention can set the retry weight parameter of each instruction retry operation as the index parameter, and simultaneously satisfies that the base number of the index parameter is more than 1, so as to satisfy that the retry time interval of the instruction retry operation in the front sequence is gradually increased to the retry time interval of the instruction retry operation in the back sequence, thereby further improving the success rate of retry.
Specifically, for example, the base number K in the retry weight parameter is 2, the number of retries N is 5, and the retry base time interval is 2 seconds, and it can be determined that the retry time interval of the first instruction retry operation is 2 seconds, the retry time interval of the second instruction retry operation is 4 seconds, the retry time interval of the third instruction retry operation is 8 seconds, the retry time interval of the fourth instruction retry operation is 16 seconds, the retry time interval of the fifth instruction retry operation is 32 seconds, and the retry time intervals of the first to fifth instruction retry operations sequentially increase.
In one embodiment of the present invention, in order to improve the retry efficiency, the retry time interval of the retry operation of the instruction in the sequence before to the retry time interval of the retry operation of the instruction in the sequence after is decreased.
In determining the retry time interval of the instruction retry operation, it may be set that the retry time interval of each instruction retry operation exhibits a periodic variation. In the case of a retry failure, the time of the next retry interval may be appropriately reduced in order to improve the efficiency of the retry. Accordingly, the retry time interval of the instruction retry operation in the order before to the retry time interval of the instruction retry operation in the order after can be set to be decreased in sequence, thereby improving the retry efficiency.
In an embodiment of the present invention, in order to further improve the retry efficiency, the retry weight parameter of each retry operation is an index parameter, and the retry time interval of each retry operation satisfies the following relationship:
PN=Q×KN-1N=1,2,3…;
k is more than 0 and less than 1;
wherein, PNA retry time interval indicating an Nth instruction retry operation, Q indicating a retry base time interval, KN-1A retry weight parameter indicating an nth instruction retry operation, N-1 indicating an exponent in the retry weight parameter, and K indicating a base in the retry weight parameter.
The embodiment of the invention can set the retry weight parameter of each instruction retry operation as the index parameter, and simultaneously satisfies that the base number of the index parameter is more than 0 and less than 1, so as to satisfy that the retry time interval of the instruction retry operation in the front sequence is decreased to the retry time interval of the instruction retry operation in the back sequence, thereby further improving the retry efficiency.
Specifically, for example, the base number K in the retry weight parameter is 0.5, the number of retries N is 3, and the retry base time interval is 0.5 seconds, and it can be determined that the retry time interval of the first instruction retry operation is 0.5 seconds, the retry time interval of the second instruction retry operation is 0.25 seconds, the retry time interval of the third instruction retry operation is 0.125 seconds, and the retry time intervals of the first to third instruction retry operations are sequentially decremented, thereby improving the retry efficiency.
In an embodiment of the present invention, in order to improve the flexibility of the retry time interval, the retry time interval of the instruction retry operation in the previous order to the retry time interval of the instruction retry operation in the next order is sequentially decreased and then sequentially increased, or sequentially decreased and then sequentially increased.
In determining the retry time interval of the instruction retry operation, it may be set that the retry time interval of each instruction retry operation exhibits a periodic variation. At a certain stage or period, the time of the next retry interval may be reduced appropriately; the time for the next retry interval may be increased as appropriate during another phase or period. Accordingly, the retry time interval of the instruction retry operation in the previous order to the retry time interval of the instruction retry operation in the next order can be sequentially increased and then sequentially decreased, or sequentially decreased and then sequentially increased.
Fig. 2 shows a flow of implementing the retry method provided by the embodiment of the present invention, and for convenience of description, only the relevant parts of the embodiment of the present invention are shown, and the following details are described below:
in an embodiment of the present invention, as shown in fig. 2, in the retry method, in step 101, when a response delay is detected, a retry time interval of each instruction retry operation is determined according to a preset retry base time interval and a retry weight parameter of each instruction retry operation, and is replaced with:
in step 201, when a response delay is detected, a retry time interval of each instruction retry operation is determined according to a preset retry base time interval and a maximum retry number threshold.
In another embodiment, to further increase the flexibility of determining the retry time interval, when a response delay is detected, the retry time interval for each instruction retry operation is determined based only on the pre-configured retry base time interval and the maximum retry number threshold. The retry time interval of each instruction retry operation is based on a preset maximum retry threshold value and shows regular change. For example, the retry time interval of each instruction retry operation is sequentially increased or sequentially decreased, or the retry time interval is sequentially increased and then sequentially decreased, or the retry time interval is sequentially decreased and then sequentially increased.
In the embodiment of the invention, when the response delay is detected, the retry time interval of each instruction retry operation is determined according to the preset retry basic time interval and the maximum retry number threshold, so that the flexibility of determining the retry time interval can be further improved.
In one embodiment of the present invention, in order to improve the flexibility of the retry time interval, the retry time interval of each instruction retry operation satisfies the following relationship:
Figure BDA0002709102240000071
wherein, PNThe retry time interval of the Nth instruction retry operation is shown, Q is the retry base time interval, and M is the maximum retry threshold configured in advance.
In the embodiment of the invention, each retry time interval is executed to form a cosine function which takes the retry time as a variable on the basis of a preset maximum retry time threshold, and the change rule that the retry time interval of the instruction retry operation in the previous sequence to the retry time interval of the instruction retry operation in the next sequence is decreased in sequence and then increased in sequence or increased in sequence and then decreased in sequence is satisfied.
In an embodiment of the present invention, in order to improve flexibility of determining the retry time interval, on the basis of the above method steps, the retry method further includes:
configuring a retry basic time interval and a retry weight parameter of each instruction retry operation according to the received configuration instruction;
and configuring a preset maximum retry time threshold according to the received configuration instruction.
When the retry weight parameter of the configured retry base time interval and each instruction retry operation is preset with the maximum retry number threshold, the configuration instruction of a user (operation and maintenance personnel and the like) is received on a visual interface, or the configuration instruction is received in a clicking or inputting mode, and the preset maximum retry number threshold is further modified according to the received modification instruction, so that the flexibility of the configuration of the retry base time interval and the retry weight parameter of each instruction retry operation and the maximum retry number threshold is improved.
It is noted and described that any reasonable variation of the retry interval of the retry operation of the instruction described above by those skilled in the art is included in the scope of the present invention.
Embodiments of the present invention further provide a retry apparatus, as described in the following embodiments. Since the principle of solving the problem of these apparatuses is similar to that of the retry method, the implementation of these apparatuses can be referred to the implementation of the method, and the repeated description is omitted.
Fig. 3 shows functional modules of a retry method provided by an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
referring to fig. 3, the modules included in the retry are used to execute the steps in the embodiment corresponding to fig. 1, and specific reference is made to fig. 1 and the related description in the embodiment corresponding to fig. 1, which are not repeated herein. In this embodiment of the present invention, the retry apparatus includes a first interval determining module 301, an instruction retry module 302, and a retry ending module 303.
The first interval determining module 301 is configured to determine, when a response delay is detected, a retry time interval of each instruction retry operation according to a preset retry base time interval and a retry weight parameter of each instruction retry operation.
The instruction retry module 302 executes the instruction retry operation in the previous order according to the retry time interval of the instruction retry operation in the previous order.
A retry ending module 303, configured to, when a retry operation of a preceding instruction fails, execute a retry operation of a succeeding instruction according to a retry time interval of the retry operation of the succeeding instruction until an ending condition of the retry operation is satisfied.
In this embodiment of the present invention, when detecting a response delay, the first interval determining module 301 determines a retry interval of each instruction retry operation according to a preset retry base interval and a retry weight parameter of each instruction retry operation; the instruction retry module 302 executes the instruction retry operation in the order before according to the retry time interval of the instruction retry operation in the order before; the retry ending module 303 executes the instruction retry operation that follows the sequence according to the retry time interval of the instruction retry operation that follows the sequence until the ending condition of the instruction retry operation is satisfied when the instruction retry operation that precedes the sequence fails. The embodiment of the invention determines the retry time interval of each instruction retry operation according to the preset retry basic time interval and the retry weight parameter, thereby not only improving the flexibility of the retry time interval, but also improving the retry success rate.
In one embodiment of the present invention, in order to increase the retry success rate, the retry time interval of the sequentially previous instruction retry operation is sequentially increased to the retry time interval of the sequentially next instruction retry operation.
In an embodiment of the present invention, in order to further improve the retry success rate, the retry weight parameter of each instruction retry operation is an index parameter, and the retry time interval of each instruction retry operation satisfies the following relationship:
PN=Q×KN-1N=1,2,3…;
and K is greater than 1;
wherein, PNA retry time interval indicating an Nth instruction retry operation, Q indicating a retry base time interval, KN-1A retry weight parameter indicating an nth instruction retry operation, N-1 indicating an exponent in the retry weight parameter, and K indicating a base in the retry weight parameter.
In one embodiment of the present invention, in order to improve the retry efficiency, the retry time interval of the retry operation of the instruction in the sequence before to the retry time interval of the retry operation of the instruction in the sequence after is decreased.
In an embodiment of the present invention, in order to further improve the flexibility of the retry time interval, the retry weight parameter of each retry operation is an index parameter, and the retry time interval of each retry operation satisfies the following relationship:
PN=Q×KN-1N=1,2,3…;
k is more than 0 and less than 1;
wherein, PNA retry time interval indicating an Nth instruction retry operation, Q indicating a retry base time interval, KN-1A retry weight parameter indicating an nth instruction retry operation, N-1 indicating an exponent in the retry weight parameter, and K indicating a base in the retry weight parameter.
In an embodiment of the present invention, in order to improve the flexibility of the retry time interval, the retry time interval of the instruction retry operation in the previous order to the retry time interval of the instruction retry operation in the next order is sequentially decreased and then sequentially increased, or sequentially decreased and then sequentially increased.
Fig. 4 shows another functional module of the retry apparatus provided in the embodiment of the present invention, and for convenience of description, only the relevant parts of the retry apparatus according to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to improve flexibility of the retry time interval, referring to fig. 4, each unit included in the retry apparatus is configured to execute each step in the corresponding embodiment of fig. 2, and specific reference is made to fig. 2 and the related description in the corresponding embodiment of fig. 2, which is not repeated herein. In this embodiment of the present invention, the first interval determining module 301 in the retry apparatus is replaced with a second interval determining module 401.
The second interval determining module 401 is configured to determine, when the response delay is detected, a retry time interval of each instruction retry operation according to a preset retry base time interval and a maximum retry number threshold.
In this embodiment of the present invention, when the second interval determining module 401 detects a response delay, the retry interval of each instruction retry operation is determined according to the preset retry base time interval and the maximum retry number threshold, so that the flexibility of determining the retry interval can be further improved.
In an embodiment of the present invention, to further improve the flexibility of the retry time interval, the retry time interval of each instruction retry operation satisfies the following relationship:
Figure BDA0002709102240000091
wherein, PNThe retry time interval of the Nth instruction retry operation is shown, Q is the retry base time interval, and M is the maximum retry threshold configured in advance.
In an embodiment of the present invention, in order to improve flexibility of determining the retry time interval, on the basis of the above module structure, the retry apparatus further includes:
and the configuration module is used for configuring a retry basic time interval and a retry weight parameter of each instruction retry operation according to the received configuration instruction.
And the configuration module is also used for configuring a preset maximum retry time threshold according to the received configuration instruction.
Fig. 5 shows a computer device provided by an embodiment of the present invention, which includes a memory 502, a processor 501, and a computer program stored in the memory 502 and executable on the processor 501, wherein the processor 501 implements the retry method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing the retry method is stored.
In summary, in the embodiment of the present invention, when a response delay is detected, a retry time interval of each instruction retry operation is determined according to a preset retry base time interval and a retry weight parameter of each instruction retry operation; executing the instruction retry operation in the sequence according to the retry time interval of the instruction retry operation in the sequence; when the instruction retry operation before the sequence fails, the instruction retry operation after the sequence is executed according to the retry time interval of the instruction retry operation after the sequence until the end condition of the instruction retry operation is satisfied. The embodiment of the invention determines the retry time interval of each instruction retry operation according to the preset retry basic time interval and the retry weight parameter, thereby not only improving the flexibility of the retry time interval, but also improving the retry success rate.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A retry method, comprising:
when response delay is detected, determining a retry time interval of each instruction retry operation according to a preset retry basic time interval and a retry weight parameter of each instruction retry operation;
executing the instruction retry operation in the sequence according to the retry time interval of the instruction retry operation in the sequence;
when the instruction retry operation before the sequence fails, the instruction retry operation after the sequence is executed according to the retry time interval of the instruction retry operation after the sequence until the end condition of the instruction retry operation is satisfied.
2. A retry method as claimed in claim 1, wherein the retry time interval of the sequentially preceding instruction retry operation increases sequentially to the retry time interval of the sequentially succeeding instruction retry operation.
3. A retry method as claimed in claim 2, wherein the retry weight parameter of each retry operation is an exponential parameter, and the retry time interval of each retry operation satisfies the following relationship:
PN=Q×KN-1N=1,2,3…;
and K is greater than 1;
wherein, PNA retry time interval indicating an Nth instruction retry operation, Q indicating a retry base time interval, KN-1A retry weight parameter indicating an nth instruction retry operation, N-1 indicating an exponent in the retry weight parameter, and K indicating a base in the retry weight parameter.
4. A retry method as claimed in claim 1, wherein the retry time interval of the sequentially preceding instruction retry operation is sequentially decreased to the retry time interval of the sequentially succeeding instruction retry operation.
5. A retry method as claimed in claim 4, wherein the retry weight parameter of each retry operation is an exponential parameter, and the retry time interval of each retry operation satisfies the following relationship:
PN=Q×KN-1N=1,2,3…;
k is more than 0 and less than 1;
wherein, PNA retry time interval indicating an Nth instruction retry operation, Q indicating a retry base time interval, KN-1A retry weight parameter indicating an nth instruction retry operation, N-1 indicating an exponent in the retry weight parameter, and K indicating a base in the retry weight parameter.
6. The retry method as claimed in claim 1, wherein the retry time interval of the retry operation of the sequentially preceding instruction to the retry time interval of the retry operation of the sequentially succeeding instruction is sequentially decreased and then sequentially increased, or sequentially decreased and then sequentially increased.
7. A retry method as claimed in claim 6, wherein the step of determining the retry time interval of each instruction retry operation according to the pre-configured retry base time interval and the retry weight parameter of each instruction retry operation when the response delay is detected is replaced with the step of:
when response delay is detected, determining a retry time interval of each instruction retry operation according to a preset retry basic time interval and a maximum retry number threshold;
the retry time interval of each instruction retry operation satisfies the following relationship:
Figure FDA0002709102230000021
wherein, PNThe retry time interval of the Nth instruction retry operation is shown, Q is the retry base time interval, and M is the maximum retry threshold configured in advance.
8. A retry apparatus, comprising:
a first interval determining module, configured to determine, when a response delay is detected, a retry time interval of each instruction retry operation according to a preset retry base time interval and a retry weight parameter of each instruction retry operation;
the instruction retry module executes the instruction retry operation with the prior sequence according to the retry time interval of the instruction retry operation with the prior sequence;
and the retry ending module is used for executing the instruction retry operation with the subsequent sequence according to the retry time interval of the instruction retry operation with the subsequent sequence when the instruction retry operation with the prior sequence fails until the ending condition of the instruction retry operation is met.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the retry method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program for executing the retry method according to any one of claims 1 to 7.
CN202011049455.4A 2020-09-29 2020-09-29 Retry method and device, computer equipment and computer readable storage medium Active CN112131063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011049455.4A CN112131063B (en) 2020-09-29 2020-09-29 Retry method and device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011049455.4A CN112131063B (en) 2020-09-29 2020-09-29 Retry method and device, computer equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112131063A true CN112131063A (en) 2020-12-25
CN112131063B CN112131063B (en) 2023-10-24

Family

ID=73844707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011049455.4A Active CN112131063B (en) 2020-09-29 2020-09-29 Retry method and device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112131063B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11556472B1 (en) 2021-08-04 2023-01-17 International Business Machines Corporation Data processing system having masters that adapt to agents with differing retry behaviors

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829139A (en) * 2006-03-30 2006-09-06 阿里巴巴公司 Message repeating method and system
US20080281549A1 (en) * 2003-12-01 2008-11-13 Fujitsu Ten Limited Test Apparatus for Control Unit, Pattern Signal Creating Apparatus, and Test Program Generating Apparatus
CN107544853A (en) * 2017-08-23 2018-01-05 万惠投资管理有限公司 It is a kind of to interact the method and system retried with bank
CN110689394A (en) * 2018-07-06 2020-01-14 北京嘀嘀无限科技发展有限公司 Method and device for processing service supplementary notes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080281549A1 (en) * 2003-12-01 2008-11-13 Fujitsu Ten Limited Test Apparatus for Control Unit, Pattern Signal Creating Apparatus, and Test Program Generating Apparatus
CN1829139A (en) * 2006-03-30 2006-09-06 阿里巴巴公司 Message repeating method and system
CN107544853A (en) * 2017-08-23 2018-01-05 万惠投资管理有限公司 It is a kind of to interact the method and system retried with bank
CN110689394A (en) * 2018-07-06 2020-01-14 北京嘀嘀无限科技发展有限公司 Method and device for processing service supplementary notes

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11556472B1 (en) 2021-08-04 2023-01-17 International Business Machines Corporation Data processing system having masters that adapt to agents with differing retry behaviors
WO2023010975A1 (en) * 2021-08-04 2023-02-09 International Business Machines Corporation Data processing system having masters that adapt to agents with differing retry behaviors
GB2623724A (en) * 2021-08-04 2024-04-24 Ibm Data processing system having masters that adapt to agents with differing retry behaviors

Also Published As

Publication number Publication date
CN112131063B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
JP6818014B2 (en) Operation retry method and equipment for jobs
US20080263551A1 (en) Optimization and utilization of media resources
US9513835B2 (en) Impact-based migration scheduling from a first tier at a source to a second tier at a destination
CN111049705A (en) Method and device for monitoring distributed storage system
US8239854B2 (en) Bookmark and configuration file for installation sequence
CN108681598B (en) Automatic task rerun method, system, computer equipment and storage medium
CN110119306B (en) Method, device and equipment for balancing automatic scheduling of jobs and storage medium
US9979630B2 (en) Optimized consumption of third-party web services in a composite service
EP4122163A1 (en) Causality determination of upgrade regressions via comparisons of telemetry data
US10649670B2 (en) Data block processing
CN112131063B (en) Retry method and device, computer equipment and computer readable storage medium
CN110968410B (en) Task failure retry method and device, computer equipment and storage medium
CN114827280A (en) Request processing method, device, equipment and medium
CN113297009B (en) Information backup method, equipment, platform and storage medium
CN112988433A (en) Method, apparatus and computer program product for fault management
US20140149524A1 (en) Information processing apparatus and information processing method
JP2007102550A (en) Data backup system
CN111522680A (en) Method, device and equipment for automatically repairing abnormal task node
CN107958414B (en) Method and system for eliminating long transactions of CICS (common integrated circuit chip) system
US9639636B1 (en) Algorithmically driven selection of parallelization technique for running model simulation
CN109117277B (en) Method and device for simulating synchronous blocking in asynchronous environment, storage medium, server and terminal
CN113342512B (en) IO task silencing and driving method and device and related equipment
CN110347886B (en) Distributed parent-child relationship element searching method
CN110716972A (en) Method and device for processing error of high-frequency calling external interface
CN113760494A (en) Task scheduling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant