Interface calling failure retry method and system, electronic equipment and storage medium

A technology of interface call and interface, which is applied in the field of interface call failure retry to achieve the effect of reducing data pressure, reducing the number of retries, and reducing the pressure of data operation

Pending Publication Date: 2022-03-18
苏州超行星创业投资有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the software development process, there are many scenarios that need to call the interface. Usually, if the interface call fails, it will be retried immediately, but this will bring great pressure to the cloud in the case of concurrency.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Interface calling failure retry method and system, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] Embodiment 1: as figure 1 As shown, the present invention proposes a method for interface call failure retry, including the following steps:

[0022] Step SS1: Take out the message from the message queue and call the cloud interface;

[0023] Step SS2: Determine whether the cloud interface is called successfully. If the call is successful, exit and process the next message. If the call fails, adopt the aging strategy;

[0024] Step SS3: If the call fails, resend the message to the message queue, and if the call succeeds, return to step SS1 to process the next message.

[0025] As a preferred embodiment, the call failure includes call timeout.

[0026] As a preferred embodiment, the aging strategy specifically includes: after the interface call fails, enter the retry waiting stage, where the retry waiting time=last failed retry time x 2+random number.

Embodiment 2

[0027] Embodiment 2: The present invention also proposes a system for interface call failure retry, including:

[0028] The message acquisition module, specific execution: take out the message from the message queue, and call the cloud interface;

[0029] Call the judgment module, specific execution: judge whether the cloud interface is called successfully, if the call is successful, exit, process the next message, if the call fails, use the aging strategy;

[0030] The message feedback module, specific implementation: if the call fails, the message is resent to the message queue, and if the call is successful, the message acquisition module is returned to process the next message.

[0031] As a preferred embodiment, the call failure includes call timeout.

[0032] As a preferred embodiment, the aging strategy specifically includes: after the interface call fails, enter the retry waiting stage, where the retry waiting time=last failed retry time x 2+random number.

Embodiment 3

[0033] Embodiment 3: The present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, and the steps of the method are implemented when the processor executes the program.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an interface calling failure retry method and system, electronic equipment and a storage medium, and the method comprises the following steps: SS1, taking out a message from a message queue, and calling a cloud interface; step SS2, judging whether the cloud interface is successfully called or not, if the cloud interface is successfully called, quitting and processing a next message, and if the cloud interface is failed to call, adopting an agging strategy; and step SS3, if the calling fails, re-sending the message to the message queue, and if the calling succeeds, returning to the step SS1 to process the next message. According to the invention, the data operation pressure of the cloud interface is reduced, the message which fails to be sent can be retransmitted, the retry times of invalid requests and failed requests are effectively reduced on the whole, and the data pressure of the cloud interface is reduced.

Description

technical field [0001] The invention relates to a method, system, electronic equipment and storage medium for interface call failure retry, and belongs to the technical field of computer software design. Background technique [0002] In the software development process, there are many scenarios that need to call the interface. Usually, if the interface call fails, it will be retried immediately, but this will bring great pressure to the cloud in the case of concurrency. Contents of the invention [0003] The purpose of the present invention is to overcome the technical defects in the prior art, solve the above technical problems, and propose a method, system, electronic equipment and storage medium for interface call failure retry. Strategy, the next call interval is equal to the last failed retry time x2 + random number, which reduces the pressure on the cloud interface and ensures that messages that fail to be sent can be resent. [0004] The present invention specifica...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36
CPCG06F11/362G06F11/3684G06F11/3688
Inventor 秦碧磊曹颂钟星
Owner 苏州超行星创业投资有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products