CN114827280A - Request processing method, device, equipment and medium - Google Patents

Request processing method, device, equipment and medium Download PDF

Info

Publication number
CN114827280A
CN114827280A CN202210454792.4A CN202210454792A CN114827280A CN 114827280 A CN114827280 A CN 114827280A CN 202210454792 A CN202210454792 A CN 202210454792A CN 114827280 A CN114827280 A CN 114827280A
Authority
CN
China
Prior art keywords
information
interface
target
interval duration
retry interval
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
CN202210454792.4A
Other languages
Chinese (zh)
Other versions
CN114827280B (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210454792.4A priority Critical patent/CN114827280B/en
Priority claimed from CN202210454792.4A external-priority patent/CN114827280B/en
Publication of CN114827280A publication Critical patent/CN114827280A/en
Application granted granted Critical
Publication of CN114827280B publication Critical patent/CN114827280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Abstract

The present disclosure provides a request processing method, apparatus, device and medium, which can be applied to the computer technology field and the financial technology field. The request processing method comprises the following steps: responding to the interface return failure information fed back by the target interface, and acquiring the interface identification information of the target interface; determining interface return state change information of the target interface, running state change information of a target server associated with the target interface and preset retry interval duration information in a preset time period according to the interface identification information, wherein the preset retry interval duration information represents a time difference between the time when the target interface returns failure information and the time when the service request is retransmitted to the target server; determining actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information; and according to the actual retry interval duration information, resending the service request to the target server at the target moment.

Description

Request processing method, device, equipment and medium
Technical Field
The present disclosure relates to the field of computer technology and financial technology, and in particular, to a request processing method, apparatus, device, medium, and program product.
Background
In a distributed environment, the services are interdependent, and often access failure may be caused by network jitter and the like. At this time, the retry mechanism is used, so that the final success rate of the request can be improved, the fault influence is reduced, and the cascade fault is prevented, so that the distributed system has more elasticity.
The conventional retry mechanism determines the retry time for the system to resend the service request based on various empirical values and manually adjusting parameters, but this approach is inefficient because the manual intervention is cumbersome in adjusting parameters.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a request processing method, apparatus, device, medium, and program product.
According to an aspect of the present disclosure, there is provided a request processing method including:
responding to the interface return failure information fed back by the target interface, and acquiring the interface identification information of the target interface;
determining interface return state change information of the target interface, running state change information of a target server associated with the target interface and preset retry interval duration information in a preset time period according to the interface identification information, wherein the preset retry interval duration information represents a time difference between the time when the target interface returns failure information and the time when the service request is retransmitted to the target server;
determining actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information; and
and according to the actual retry interval duration information, retransmitting the service request to the target server at the target moment.
According to the embodiment of the disclosure, determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information includes:
under the condition that the interface returned state change information meets a first preset condition, constructing a first retry interval time length function according to a preset retry interval time length parameter, an operation state change parameter and a first random coefficient, wherein the first random coefficient is generated by a preset random number generation function;
and inputting the running state change information and the preset retry interval duration into a first retry interval duration function, and determining the actual retry interval duration information.
According to the embodiment of the disclosure, determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information includes:
under the condition that the interface return state change information and the running state information meet a second preset condition, constructing a second retry interval duration function according to a preset retry interval duration parameter, a running state change parameter and a second random coefficient, wherein the second random coefficient is generated by a preset random number generation function;
and inputting the running state change information and the preset retry interval duration into a second retry interval duration function, and determining actual retry interval duration information.
According to the embodiment of the disclosure, determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information includes:
under the condition that the interface return state change information and the running state information meet a third preset condition, constructing a third retry interval time length function according to a preset retry interval time length parameter and a third random coefficient, wherein the third random coefficient is generated by a preset random number generation function;
and inputting the preset retry interval duration into a third retry interval duration function, and determining actual retry interval duration information.
According to the embodiment of the disclosure, the resending of the service request to the target server at the target moment according to the actual retry interval duration information comprises:
responding to the interface return failure information fed back by the target interface, and recording the first moment;
determining a target moment according to the actual retry interval duration information and the first moment;
and re-sending the service request to the target server at the target moment.
According to the embodiment of the present disclosure, determining that the interface of the target interface returns the state change information, the operation state change information of the target server, and the preset retry interval duration information within the preset time period according to the interface identification information includes:
determining the running state change information of the target server by inquiring a server list corresponding to the target interface according to the interface identification information;
and according to the interface identification information, determining interface return state change information by inquiring an interface return state information list corresponding to the target interface.
According to the embodiment of the disclosure, determining the running state change information of the target server by querying the server list corresponding to the target interface according to the interface identification information includes:
acquiring first running state information and second running state information by inquiring a server list corresponding to a target interface according to the interface identification information, wherein the first running state information represents the running state information of the target server in a first preset time period; the second running state information represents the running state information of the target server in a second preset time period;
and determining the operation state change information according to the first operation state information and the second operation state information.
According to the embodiment of the present disclosure, according to the interface identification information, determining the interface return state change information by querying the interface return state information list corresponding to the target interface includes:
according to the interface identification information, acquiring first interface return state information and second interface return state information by inquiring an interface return state information list corresponding to a target interface, wherein the first interface return state information represents the first interface return state information of the target interface in a first preset time period, and the second interface return state information represents the second interface return state information of the target interface in a second preset time period;
and determining the interface return state change information according to the first interface return state information and the second interface return state information.
Another aspect of the present disclosure provides a request processing apparatus including: the device comprises an acquisition module, a first determination module, a second determination module and a sending module. The acquisition module is used for responding to the failure information returned by the interface fed back by the target interface and acquiring the interface identification information of the target interface. The first determining module is used for determining that the interface return state change information of the target interface, the running state change information of the target server associated with the target interface and the preset retry interval duration information are returned within a preset time period according to the interface identification information, wherein the preset retry interval duration information represents a time difference between the time when the target interface returns the failure information and the time when the service request is retransmitted to the target server. And the second determining module is used for determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information. And the sending module is used for resending the service request to the target server at the target moment according to the actual retry interval duration information.
According to an embodiment of the present disclosure, the second determination module includes a first construction unit and a first determination unit. The first construction unit is used for constructing a first retry interval duration function according to a preset retry interval duration parameter, an operation state change parameter and a first random coefficient under the condition that the interface return state change information meets a first preset condition, wherein the first random coefficient is generated by a preset random number generation function. And the first determining unit is used for inputting the running state change information and the preset retry interval duration into a first retry interval duration function and determining the actual retry interval duration information.
According to an embodiment of the present disclosure, the second determination module includes a second construction unit and a second determination unit. The second constructing unit is configured to construct a second retry interval duration function according to the preset retry interval duration parameter, the operating state variation parameter, and a second random coefficient when the interface return state variation information and the operating state information satisfy a second preset condition, where the second random coefficient is generated by a preset random number generation function. And the second determining unit is used for inputting the running state change information and the preset retry interval duration into a second retry interval duration function and determining the actual retry interval duration information.
According to an embodiment of the present disclosure, the second determination module includes a third construction unit and a third determination unit. The third constructing unit is configured to construct a third retry interval duration function according to the preset retry interval duration parameter and a third random coefficient when the interface return state change information and the running state information satisfy a third preset condition, where the third random coefficient is generated by a preset random number generating function. And the third determining unit is used for inputting the preset retry interval duration into a third retry interval duration function and determining the actual retry interval duration information.
According to an embodiment of the present disclosure, the first determination module includes a fourth determination unit and a fifth determination unit. The fourth determining unit is configured to determine, according to the interface identification information, running state change information of the target server by querying a server list corresponding to the target interface. And the fifth determining unit is used for determining the interface return state change information by inquiring the interface return state information list corresponding to the target interface according to the interface identification information.
According to an embodiment of the present disclosure, the fourth determination unit includes a first query subunit and a first determination subunit. The first query subunit is configured to obtain first operating state information and second operating state information by querying a server list corresponding to a target interface according to the interface identification information, where the first operating state information represents operating state information of the target server within a first preset time period; the second running state information represents the running state information of the target server in a second preset time period. And the first determining subunit is used for determining the operation state change information according to the first operation state information and the second operation state information.
According to an embodiment of the present disclosure, the fifth determining unit includes a second querying subunit and a second determining subunit. The second query subunit is configured to obtain, according to the interface identification information, first interface return state information and second interface return state information by querying an interface return state information list corresponding to the target interface, where the first interface return state information represents first interface return state information of the target interface within a first preset time period, and the second interface return state information represents second interface return state information of the target interface within a second preset time period. And the second determining subunit is used for determining the interface return state change information according to the first interface return state information and the second interface return state information.
Another aspect of the present disclosure provides an electronic device including: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the request processing method described above.
Another aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described request processing method.
Another aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described request processing method.
According to the embodiment of the disclosure, it is determined that the interface of the target interface returns the state change information, the running state change information of the target server associated with the target interface and the preset retry interval duration information within the preset time period through the interface identification information. And determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information. And according to the actual retry interval duration information, retransmitting the service request to the target server at the target moment. Because the interface return state change information of the target interface in the preset time period and the running state change information of the target server associated with the target interface reflect the states of the target interface and the target server, the retry efficiency of the service request can be improved according to the actual retry interval duration information determined by the states of the target interface and the target server.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a request processing method, apparatus, device, medium and program product according to embodiments of the disclosure;
FIG. 2 schematically shows a flow diagram of a request processing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of determining an actual retry interval duration in accordance with an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a method of resending a service request to a target server according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a flowchart of a method of determining operational state change information and interface return state change information for a target server according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a logical block diagram of a request processing method according to an embodiment of the present disclosure;
FIG. 7 schematically shows a block diagram of a request processing device according to an embodiment of the present disclosure; and
fig. 8 schematically shows a block diagram of an electronic device adapted to implement the request processing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
It should be noted that the request processing method and apparatus of the present disclosure may be used in the financial field and the computer technology field, and may also be used in any field other than the financial field.
As microservice architecture systems become larger and larger, the calling relationships between microservices also become more and more complex. In the application of micro-services, a request initiated by a client can cooperatively generate a final request result through a plurality of different micro-service calls in a back-end system, in a complex micro-service architecture system, almost every front-end request forms a complex distributed service call link, delay timeout or error of any dependent service in each link can cause final failure of the whole request, and tracing is also a very tedious matter.
The retry interval duration can be dynamically determined from the interface perspective, regarding an interface call initiating server and all servers corresponding to the interface as a small control system, regarding the call of the interface call initiating server as the input of the control system, regarding the server corresponding to the interface as the output of the system, the state of the server providing the interface will change with the change of the input, and will also affect the execution state of the next input, and the retry interval duration parameter is corrected by transmitting the information of the states back to the input.
The system has close relation with the state of the accessed server and the corresponding interface in the duration of the retry interval, and the relation is as follows:
when the corresponding interface is not successfully returned all the time, the retry time of the system is increased without retrying, the increased time is related to the utilization rate of the central processing unit and the change rate of the occupancy rate of the memory, and the change value is larger than zero and smaller than the original retry time.
And when the corresponding interface returns successfully and the utilization rate of the central processing unit of the server and the occupation rate of the memory of the corresponding interface are reduced, reducing the retry time of the system, wherein the reduced time is related to the change rate of the utilization rate of the central processing unit and the occupation rate of the memory, and the change value is greater than zero and less than the original retry time.
And when the corresponding interface has successful return but the utilization rate of the server CPU and the occupation rate of the memory of the corresponding interface are not changed or are increased, maintaining the original retry time.
In view of this, embodiments of the present disclosure provide a request processing method, which determines, through interface identification information, that an interface of a target interface returns state change information, running state change information of a target server associated with the target interface, and preset retry interval duration information within a preset time period. And determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information. And according to the actual retry interval duration information, retransmitting the service request to the target server at the target moment. Because the interface return state change information of the target interface in the preset time period and the running state change information of the target server associated with the target interface reflect the states of the target interface and the target server, the retry efficiency of the service request can be improved according to the actual retry interval duration information determined by the states of the target interface and the target server.
Fig. 1 schematically shows an application scenario diagram of a request processing method according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the request processing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the request processing device provided by the embodiment of the present disclosure may be generally disposed in the server 105. The request processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the request processing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for an implementation.
The request processing method of the disclosed embodiment will be described in detail below with fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a request processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the request processing method of this embodiment includes operations S210 to S240.
In operation S210, in response to the interface return failure information fed back by the target interface, interface identification information of the target interface is acquired.
According to the embodiment of the present disclosure, the interface identification information may be a unique identifier of the interface in the distributed system, and may be set to be a service name + a function name + an interface serial number, for example: xx service login interface 80001, and so on.
In operation S220, it is determined that, within a preset time period, the interface return state change information of the target interface, the operation state change information of the target server associated with the target interface, and preset retry interval duration information are determined according to the interface identification information, where the preset retry interval duration information represents a time difference between a time when the target interface returns failure information and a time when the service request is resent to the target server.
According to the embodiment of the disclosure, according to the interface identification information, the operation state change information of the target server associated with the target interface can be determined by querying the server list providing the target interface. The operation state change information of the target server may include usage rate change information of the central processing unit and memory usage rate change information.
According to the embodiment of the disclosure, the target server associated with the target interface may be one server or may be a plurality of servers. When the target server associated with the target interface is a plurality of servers, based on the load balancing principle, when a system retry is performed, a service request is sent to any one of the servers associated with the target interface, and therefore, the running state change information of the target server can be the utilization rate change information and the memory utilization rate change information of the central processing units of the plurality of servers.
According to an embodiment of the present disclosure, the interface of the target interface returns the state change information, which may be change information of success information returned for the interface of the target interface. The interface return status information of the interface can be acquired by the interceptor. And inquiring interface return success information in the interface return state information of the target interface according to the identification information of the target interface. The success information returned by the interface can be stored by using unsigned shaping, and the counting is continued from zero when the maximum value of the shaping storage is exceeded.
In operation S230, actual retry interval duration information is determined according to the running state change information, the interface return state change information, and the preset retry interval duration information.
According to an embodiment of the present disclosure, for example: when the number of the successful messages returned by the interface is reduced in the preset time period, which indicates that the interface is successfully called in the preset time period, the server possibly providing the interface is not recovered yet, the server needs to wait for a longer time and then resends the service request to the target server, and the actual retry interval duration can be determined to be T 1
According to an embodiment of the present disclosure, for example: when the number of the successful information returned by the interface increases within the preset time period, it indicates that the interface is successfully called within the preset time period, and indicates that the server providing the interface is recovered, and it is necessary to further determine the running state information of the server providing the interface. For example: in the case that the server of the interface is determined to be restored to the normal state through the operation state information of the server of the interface, the actual retry interval duration can be determined to be T 2 . In the case where it is determined through the operation state information of the server of the interface that the server of the interface is not restored or whether the normal state is not determined to be restored,the actual retry interval duration may be determined to be T3.
In operation S240, the service request is retransmitted to the target server at the target time according to the actual retry interval duration information.
According to an embodiment of the present disclosure, for example: the moment when the interface which receives the feedback of the target interface returns the failure information is t 1 The actual retry interval duration information is T1, and the target time T can be determined 2 Can be t 1 + T1. At a target time t 2 And re-sending the service request to the target server.
According to the embodiment of the disclosure, it is determined that the interface of the target interface returns the state change information, the running state change information of the target server associated with the target interface and the preset retry interval duration information within the preset time period through the interface identification information. And determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information. And according to the actual retry interval duration information, resending the service request to the target server at the target moment. Because the interface return state change information of the target interface in the preset time period and the running state change information of the target server associated with the target interface reflect the states of the target interface and the target server, the retry efficiency of the service request can be improved according to the actual retry interval duration information determined by the states of the target interface and the target server.
Fig. 3 schematically illustrates a flow chart of a method of determining an actual retry interval duration according to an embodiment of the disclosure.
As shown in fig. 3, the method of determining the actual retry interval duration of this embodiment includes operations S310 to S320.
In operation S310, under the condition that the interface return state change information satisfies a first preset condition, a first retry interval duration function is constructed according to a preset retry interval duration parameter, the operating state change parameter, and a first random coefficient, where the first random coefficient is generated by a preset random number generation function.
According to an embodiment of the present disclosure, the first preset condition may be that the number of successful information returned by the interface decreases. The first retry interval duration function is given by equation (one):
T1=T 0 *(1+|k1*Δ C +(1-k1)*Δ S i (one)
Wherein, T 1 Indicating the actual retry interval duration, T, determined under a first predetermined condition 0 Representing a preset retry interval duration, k1 representing a first random coefficient, Δ C Indicating the rate of change, Δ, of central processor usage of the target server S Indicating the memory usage change rate of the target server.
In operation S320, the running state change information and the preset retry interval duration are input to the first retry interval duration function, and the actual retry interval duration information is determined.
According to the embodiment of the present disclosure, the operation state change information Δ within the preset time period C 、Δ S Presetting a retry interval duration T 0 In the formula shown in equation (one), the actual retry interval duration information T1 is determined.
According to an embodiment of the present disclosure, the preset time period may be determined according to a frequency of acquiring the operation state information of the target server. For example: the frequency of acquiring the operation state information of the target server may be 1 second/time, and the preset time period may be determined to be 2 seconds.
According to the embodiment of the disclosure, since the first retry interval duration function is determined when the interface return state change information of the target interface meets the first preset condition, and when the number of the interface return success information of the target interface is decreased, it may be determined that the target server does not recover the state, and therefore, the relevant parameter is input into the first retry interval duration function to determine the actual retry interval duration, and the retry efficiency may be improved.
According to the embodiment of the disclosure, determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information includes:
under the condition that the interface return state change information and the running state information meet a second preset condition, constructing a second retry interval duration function according to a preset retry interval duration parameter, a running state change parameter and a second random coefficient, wherein the second random coefficient is generated by a preset random number generation function;
and inputting the running state change information and the preset retry interval duration into a second retry interval duration function, and determining actual retry interval duration information.
According to the embodiment of the disclosure, the second preset condition may be that the number of the successful information returned by the interface increases, and the running state of the target server is recovered. The second retry interval duration function is given by equation (two):
T2=T 0 *(1-|k2*Δ C +(1-k2)*Δ S i (II)
Where T2 represents the actual retry interval duration determined under the second preset condition, T 0 Representing a preset retry interval duration, k2 representing a second random coefficient, Δ C Indicating the rate of change, Δ, of central processor usage of the target server S Indicating the memory usage change rate of the target server.
According to an embodiment of the present disclosure, the operation state of the target server may adopt (k2 × Δ ·) C +(1-k2)*Δ S ) The value of (2) is judged. When (k2 Δ;) C +(1-k2)*Δ S ) And when the value is less than 0, the running state of the target server is recovered. When (k2 Δ;) C +(1-k2)*Δ S ) If the value is greater than 0, the operation state of the target server is not recovered or is ambiguous.
According to the embodiment of the present disclosure, the operation state change information Δ within the preset time period C 、Δ S Presetting a retry interval duration T 0 In the formula shown in the equation (two), the actual retry interval duration information T2 is determined.
According to the embodiment of the disclosure, since the second retry interval duration function is determined when the interface return state change information and the running state information of the target interface satisfy the second preset condition, and the recovered state of the target server is determined when the number of the interface return success information of the target interface increases, the relevant parameters are input into the second retry interval duration function to determine the actual retry interval duration, so that the retry efficiency can be improved.
According to the embodiment of the disclosure, determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information includes:
under the condition that the interface return state change information and the running state information meet a third preset condition, constructing a third retry interval time length function according to a preset retry interval time length parameter and a third random coefficient, wherein the third random coefficient is generated by a preset random number generation function;
and inputting the preset retry interval duration into a third retry interval duration function, and determining actual retry interval duration information.
According to an embodiment of the present disclosure, the third preset condition may be that the amount of information returned by the interface successfully rises, but the running state of the target server is not recovered or whether recovery is not determined. The third retry interval duration function is shown in equation (three):
T3=T 0 k3 star 2 (three)
Where T3 represents the actual retry interval duration determined under the third preset condition, T 0 Indicating a preset retry interval duration, and k3 indicating a third random coefficient.
According to an embodiment of the present disclosure, the retry interval duration T will be preset 0 In the formula shown in the input equation (three), the actual retry interval duration information T3 is determined.
According to the embodiment of the disclosure, since the third retry interval duration function is determined when the interface return state change information and the running state information of the target interface satisfy the second preset condition, and the running state of the target server cannot be determined or the running state of the target server is determined not to be recovered under the condition that the number of the interface return success information of the target interface increases, the relevant parameters are input into the third retry interval duration function to determine the actual retry interval duration, so that the retry efficiency can be improved.
FIG. 4 schematically illustrates a flow chart of a method of resending a service request to a target server according to an embodiment of the disclosure.
As shown in fig. 4, the method of re-sending a service request to a target server of this embodiment includes operations S410 to S430.
In operation S410, in response to the interface returned failure information fed back by the target interface, a first time is recorded.
In operation S420, a target time is determined according to the actual retry interval duration information and the first time.
In operation S430, the service request is re-transmitted to the target server at the target time.
According to an embodiment of the present disclosure, for example: responding to the interface return failure information fed back by the target interface, and recording the first time t 1 According to the actual retry interval duration T and the first time T 1 Determining a target time t 2 . The timer can be started when the interface return failure information fed back by the target interface is received, and the service request is sent to the target server again after the interval duration T.
According to the embodiment of the disclosure, because the system determines the target time for resending the service request to the target server according to the actual retry interval duration determined by the return state change information of the target interface and the running state change information of the target server, the problem that the target interface continuously returns failure information when the service request is resent to the target server by adopting a fixed duration interval in the related art can be solved.
Fig. 5 schematically shows a flowchart of a method for determining running state change information and interface return state change information of a target server according to an embodiment of the present disclosure.
As shown in fig. 5, this embodiment includes operations S510 to S520.
In operation S510, the operation state change information of the target server is determined by querying the server list corresponding to the target interface according to the interface identification information.
According to an embodiment of the present disclosure, the operation state change information of the target server may include a usage change rate of the central processor and a usage change rate of the memory. Because each server may provide access functions of a plurality of interfaces, if each interface queries the utilization rate of the central processing unit and the utilization rate of the memory once every time of calling, the load of the server is increased, the server can report the utilization rate of the central processing unit and the utilization rate of the memory at regular time, or the central server can pull the utilization rate of the central processing unit and the utilization rate of the memory of the corresponding server at regular time, and stores the association between the interfaces and the running state of the server in the central server for dynamically calculating the utilization change rate of the central processing unit and the utilization change rate of the memory of the target server associated with the target interface.
In operation S520, according to the interface identification information, the interface return state change information is determined by querying the interface return state information list corresponding to the target interface.
According to an embodiment of the present disclosure, for example: calling and returning information of the target interface can be obtained through the interceptor, and interface returning success information is returned to an interface returning state information list of the central server. By querying the interface return state information list corresponding to the target interface, it may be determined that the interface returns state change information, for example: by querying the interface of the target interface to return success information, it may be determined that the interface returns the quantity change information of the success information within a preset time period, for example: the number of successful messages returned by the interface rises or falls.
According to the embodiment of the disclosure, whether the target interface can be successfully called within the preset time period can be determined through the change of the interface return state information, and whether the operation state of the target server associated with the target interface can be recovered under the condition that the target interface is successfully called can be determined through the operation state change information of the target server, so that the actual retry interval duration of resending the service request to the target server is determined, and the efficiency of successfully responding the retry service request is improved.
According to the embodiment of the disclosure, determining the running state change information of the target server by querying the server list corresponding to the target interface according to the interface identification information includes:
acquiring first running state information and second running state information by inquiring a server list corresponding to a target interface according to the interface identification information, wherein the first running state information represents the running state information of the target server in a first preset time period; the second running state information represents the running state information of the target server in a second preset time period;
and determining the operation state change information according to the first operation state information and the second operation state information.
According to an embodiment of the present disclosure, for example: the server associated with the target interface has N servers, and since the server is generally sent to any one of the N target servers based on load balancing when resending the service request, the running state change information of the N servers can be determined when determining the running state change information of the target server within the preset time period.
According to an embodiment of the present disclosure, for example: according to the interface identification information, the first operation state information is acquired by inquiring a server list corresponding to the target interface, and the first operation state information can be the utilization rate of a central processing unit of the target server in a first preset time period
Figure BDA0003617206250000161
And memory usage of target server
Figure BDA0003617206250000162
The second operation state information may be a central processing unit utilization rate of the target server within a second preset time period
Figure BDA0003617206250000163
And memory usage of target server
Figure BDA0003617206250000164
When the number of the target servers associated with the target interface is N, the cpu usage change rate of the target server may be calculated according to equation (four), and the memory usage change rate of the target server may be calculated according to equation (five).
Figure BDA0003617206250000165
Wherein, Delta C Indicating the rate of change of the central processor usage,
Figure BDA0003617206250000166
representing the central processor usage of the target server within a first preset time period,
Figure BDA0003617206250000167
and N represents the number of target servers associated with the target interface.
Figure BDA0003617206250000168
Wherein, Delta S The rate of change of the memory usage is indicated,
Figure BDA0003617206250000169
representing the memory usage rate of the target server within a first preset time period,
Figure BDA00036172062500001610
and N represents the number of target servers associated with the target interface.
According to the embodiment of the disclosure, the actual retry interval duration is dynamically determined according to the change of the running state of the target server in the preset time period, so as to ensure that the service request is retransmitted to the target server under the condition that the target server is recovered to be normal and can successfully respond to the service request, and the system retry efficiency is improved.
According to the embodiment of the disclosure, according to the interface identification information, by querying an interface return state information list corresponding to a target interface, determining interface return state change information includes:
according to the interface identification information, acquiring first interface return state information and second interface return state information by inquiring an interface return state information list corresponding to a target interface, wherein the first interface return state information represents the first interface return state information of the target interface in a first preset time period, and the second interface return state information represents the second interface return state information of the target interface in a second preset time period;
and determining the interface return state change information according to the first interface return state information and the second interface return state information.
According to the embodiment of the present disclosure, the interface return state information of the target interface is recorded in the interface return state information list. The interface return state information may be success information returned by the interface, that is, whether the target interface can be normally called is determined through the change of the number of success information returned by the interface within a preset time period by the target interface.
According to the embodiment of the disclosure, since the target interface may be associated with a plurality of target servers, the number of successful information returned by the interface increases within a preset time period, and it cannot be determined that the operating states of all the target servers associated with the target interface are recovered to normal, therefore, when the actual retry interval is determined, the operating state of the target server associated with the target interface needs to be determined.
According to an embodiment of the present disclosure, for example: and if m is greater than n, the quantity of the successful information returned by the target interface is reduced in the preset time period, and the target interface is not recovered to be normal. If m is less than n, the number of the successful information returned by the target interface is increased in the preset time period, and the target interface is recovered to be normal.
According to the embodiment of the disclosure, the recovery state of the target interface is preliminarily determined by the change of the state information returned by the interface of the target interface, and the actual retry interval duration is finally determined by determining the operation state change information of the server associated with the target interface, so as to ensure that the target interface and the target server are both recovered to be normal and the service request can be retransmitted to the target server under the condition that the service request can be successfully responded, so as to improve the retry efficiency of the system.
FIG. 6 schematically shows a logical block diagram of a request processing method according to an embodiment of the present disclosure.
As shown in fig. 6, this embodiment includes operations S601 to S608.
In operation S601, in response to the interface return failure information fed back by the target interface, interface identification information of the target interface is acquired.
In operation S602, it is determined that the interface of the target interface returns state change information, running state change information of the target server associated with the target interface, and preset retry interval duration information within a preset time period according to the interface identification information.
In operation S603, it is determined whether the interface return state change information of the target interface satisfies a first preset condition, if so, operation S604 is performed, and if not, operation S605 is performed.
In operation S604, the running state change information and the preset retry interval duration are input to the first retry interval duration function, and the actual retry interval duration information T1 is determined.
In operation S605, it is determined whether the interface return state change information of the target interface and the operation state change information of the target server associated with the target interface satisfy a second preset condition. If so, operation S606 is performed, and if not, operation S607 is performed.
In operation S606, the running state change information and the preset retry interval duration are input to the second retry interval duration function, and the actual retry interval duration information T2 is determined.
In operation S607, the preset retry interval duration is input to the third retry interval duration function, and the actual retry interval duration information T3 is determined.
In operation S608, the service request is retransmitted to the target server at the target time according to the actual retry interval duration information.
Based on the request processing method, the disclosure also provides a request processing device. The apparatus will be described in detail below with reference to fig. 7.
Fig. 7 schematically shows a block diagram of a request processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 7, the request processing apparatus 700 of this embodiment includes an obtaining module 710, a first determining module 720, a second determining module 730, and a sending module 740.
The obtaining module 710 is configured to obtain the interface identifier information of the target interface in response to the interface return failure information fed back by the target interface. In an embodiment, the obtaining module 710 may be configured to perform the operation S210 described above, which is not described herein again.
The first determining module 720 is configured to determine, according to the interface identification information, that the interface of the target interface returns state change information, running state change information of the target server associated with the target interface, and preset retry interval duration information in a preset time period, where the preset retry interval duration information represents a time difference between a time when the target interface returns failure information and a time when the service request is resent to the target server. In an embodiment, the first determining module 720 may be configured to perform the operation S220 described above, which is not described herein again.
The second determining module 730 is configured to determine actual retry interval duration information according to the running state change information, the interface return state change information, and the preset retry interval duration information. In an embodiment, the second determining module 730 may be configured to perform the operation S230 described above, which is not described herein again.
And a sending module 740, configured to resend the service request to the target server at the target time according to the actual retry interval duration information. In an embodiment, the sending module 740 may be configured to perform the operation S240 described above, which is not described herein again.
According to an embodiment of the present disclosure, the second determination module includes a first construction unit and a first determination unit. The first construction unit is used for constructing a first retry interval duration function according to a preset retry interval duration parameter, an operation state change parameter and a first random coefficient under the condition that the interface return state change information meets a first preset condition, wherein the first random coefficient is generated by a preset random number generation function. And the first determining unit is used for inputting the running state change information and the preset retry interval duration into a first retry interval duration function and determining the actual retry interval duration information.
According to an embodiment of the present disclosure, the second determination module includes a second construction unit and a second determination unit. The second constructing unit is configured to construct a second retry interval duration function according to the preset retry interval duration parameter, the operating state variation parameter, and a second random coefficient when the interface return state variation information and the operating state information satisfy a second preset condition, where the second random coefficient is generated by a preset random number generation function. And the second determining unit is used for inputting the running state change information and the preset retry interval duration into a second retry interval duration function and determining the actual retry interval duration information.
According to an embodiment of the present disclosure, the second determination module includes a third construction unit and a third determination unit. The third constructing unit is configured to construct a third retry interval duration function according to the preset retry interval duration parameter and a third random coefficient when the interface return state change information and the running state information satisfy a third preset condition, where the third random coefficient is generated by a preset random number generating function. And the third determining unit is used for inputting the preset retry interval duration into a third retry interval duration function and determining the actual retry interval duration information.
According to an embodiment of the present disclosure, the first determination module includes a fourth determination unit and a fifth determination unit. The fourth determining unit is configured to determine, according to the interface identification information, running state change information of the target server by querying a server list corresponding to the target interface. And the fifth determining unit is used for determining the interface return state change information by inquiring the interface return state information list corresponding to the target interface according to the interface identification information.
According to an embodiment of the present disclosure, the fourth determination unit includes a first query subunit and a first determination subunit. The first query subunit is configured to obtain first operating state information and second operating state information by querying a server list corresponding to a target interface according to the interface identification information, where the first operating state information represents operating state information of the target server within a first preset time period; the second running state information represents the running state information of the target server in a second preset time period. And the first determining subunit is used for determining the operation state change information according to the first operation state information and the second operation state information.
According to an embodiment of the disclosure, the fifth determination unit includes a second query subunit and a second determination subunit. The second query subunit is configured to obtain, according to the interface identification information, first interface return state information and second interface return state information by querying an interface return state information list corresponding to the target interface, where the first interface return state information represents first interface return state information of the target interface within a first preset time period, and the second interface return state information represents second interface return state information of the target interface within a second preset time period. And the second determining subunit is used for determining the interface return state change information according to the first interface return state information and the second interface return state information.
According to the embodiment of the present disclosure, any plurality of the obtaining module 710, the first determining module 720, the second determining module 730, and the sending module 740 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 710, the first determining module 720, the second determining module 730, and the sending module 740 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or may be implemented in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the obtaining module 710, the first determining module 720, the second determining module 730, and the sending module 740 may be at least partially implemented as a computer program module that, when executed, may perform a corresponding function.
Fig. 8 schematically shows a block diagram of an electronic device adapted to implement a request processing method according to an embodiment of the present disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 800 may also include input/output (I/O) interface 805, input/output (I/O) interface 805 also connected to bus 804, according to an embodiment of the present disclosure. Electronic device 800 may also include one or more of the following components connected to I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 802 and/or RAM 803 described above and/or one or more memories other than the ROM 802 and RAM 803.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 801. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via communication section 809, and/or installed from removable media 811. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. A request processing method, comprising:
responding to the interface return failure information fed back by the target interface, and acquiring the interface identification information of the target interface;
determining, according to the interface identification information, that in a preset time period, the interface of the target interface returns state change information, running state change information of a target server associated with the target interface, and preset retry interval duration information, where the preset retry interval duration information represents a time difference between a time when the target interface returns failure information and a time when a service request is resent to the target server;
determining actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information; and
and according to the actual retry interval duration information, resending the service request to the target server at the target moment.
2. The method of claim 1, wherein the determining actual retry interval duration information from the operational state change information, the interface return state change information, and the preset retry interval duration information comprises:
under the condition that the interface returned state change information meets a first preset condition, constructing a first retry interval time length function according to a preset retry interval time length parameter, an operation state change parameter and a first random coefficient, wherein the first random coefficient is generated by a preset random number generation function;
and inputting the running state change information and the preset retry interval duration into the first retry interval duration function, and determining the actual retry interval duration information.
3. The method of claim 1, wherein the determining actual retry interval duration information from the operational state change information, the interface return state change information, and the preset retry interval duration information comprises:
under the condition that the interface return state change information and the running state information meet a second preset condition, constructing a second retry interval duration function according to a preset retry interval duration parameter, a running state change parameter and a second random coefficient, wherein the second random coefficient is generated by the preset random number generation function;
and inputting the running state change information and the preset retry interval duration into the second retry interval duration function, and determining the actual retry interval duration information.
4. The method according to claim 1, wherein the determining actual retry interval duration information according to the running state change information, the interface return state change information, and the preset retry interval duration information includes:
under the condition that the interface return state change information and the running state information meet a third preset condition, constructing a third retry interval time length function according to a preset retry interval time length parameter and a third random coefficient, wherein the third random coefficient is generated by the preset random number generation function;
and inputting the preset retry interval duration into the third retry interval duration function, and determining the actual retry interval duration information.
5. The method of claim 1, wherein resending the service request to the target server at a target time based on the actual retry interval duration information comprises:
responding to the interface return failure information fed back by the target interface, and recording the first moment;
determining the target time according to the actual retry interval duration information and the first time;
and resending the service request to the target server at the target time.
6. The method of claim 1, wherein determining that the interface of the target interface returns the status change information, the running status change information of the target server, and the preset retry interval duration information within a preset time period according to the interface identification information comprises:
determining the running state change information of the target server by inquiring a server list corresponding to the target interface according to the interface identification information;
and determining the interface return state change information by inquiring an interface return state information list corresponding to the target interface according to the interface identification information.
7. The method of claim 6, wherein the determining the operation state change information of the target server by querying a server list corresponding to the target interface according to the interface identification information comprises:
acquiring first running state information and second running state information by inquiring a server list corresponding to the target interface according to the interface identification information, wherein the first running state information represents the running state information of the target server in a first preset time period; the second running state information represents the running state information of the target server in a second preset time period;
and determining the operation state change information according to the first operation state information and the second operation state information.
8. The method of claim 6, wherein the determining, according to the interface identification information, the interface return state change information by querying an interface return state information list corresponding to the target interface comprises:
acquiring first interface return state information and second interface return state information by inquiring an interface return state information list corresponding to the target interface according to the interface identification information, wherein the first interface return state information represents the first interface return state information of the target interface in a first preset time period, and the second interface return state information represents the second interface return state information of the target interface in a second preset time period;
and determining the interface return state change information according to the first interface return state information and the second interface return state information.
9. A request processing apparatus comprising:
the acquisition module is used for responding to the interface return failure information fed back by the target interface and acquiring the interface identification information of the target interface;
a first determining module, configured to determine, according to the interface identification information, that, within a preset time period, the interface return state change information of the target interface, the operation state change information of the target server associated with the target interface, and preset retry interval duration information, where the preset retry interval duration information represents a time difference between a time when the target interface returns failure information and a time when a service request is resent to the target server;
the second determining module is used for determining the actual retry interval duration information according to the running state change information, the interface return state change information and the preset retry interval duration information; and
and the sending module is used for resending the service request to the target server at the target moment according to the actual retry interval duration information.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.
12. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 8.
CN202210454792.4A 2022-04-26 Request processing method, device, equipment and medium Active CN114827280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210454792.4A CN114827280B (en) 2022-04-26 Request processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210454792.4A CN114827280B (en) 2022-04-26 Request processing method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN114827280A true CN114827280A (en) 2022-07-29
CN114827280B CN114827280B (en) 2024-04-26

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604342A (en) * 2022-09-29 2023-01-13 重庆长安汽车股份有限公司(Cn) Data processing method, server, computer readable storage medium
CN116401089A (en) * 2023-04-23 2023-07-07 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604342A (en) * 2022-09-29 2023-01-13 重庆长安汽车股份有限公司(Cn) Data processing method, server, computer readable storage medium
CN115604342B (en) * 2022-09-29 2024-04-16 重庆长安汽车股份有限公司 Data processing method, server, computer readable storage medium
CN116401089A (en) * 2023-04-23 2023-07-07 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment
CN116401089B (en) * 2023-04-23 2024-01-26 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US10878355B2 (en) Systems and methods for incident queue assignment and prioritization
US11175913B2 (en) Elastic application framework for deploying software
US11651312B2 (en) Combining batch and queueable technologies in a platform for large volume parallel processing
JP6404911B2 (en) A technique for reliable messaging for intermediaries in network communication environments
US7979512B2 (en) Service delivery online
US8793322B2 (en) Failure-controlled message publication and feedback in a publish/subscribe messaging environment
US8996588B2 (en) Mechanism for facilitating dynamic management of assets in an on-demand services environment
US8856365B2 (en) Computer-implemented method, computer system and computer readable medium
CN111127181B (en) Voucher accounting method and device
CN113900834A (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN113162848A (en) Method, device, gateway and medium for realizing block chain gateway
CN110223179B (en) Data processing method, device, system and medium for fund
CN113411400B (en) Information calling method and device, electronic equipment and readable storage medium
CN112288577B (en) Transaction processing method, device, electronic equipment and medium for distributed service
CN110008173A (en) A kind of method and device of data storage
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN111831503B (en) Monitoring method based on monitoring agent and monitoring agent device
CN112417042A (en) Method and device for processing service request
CN111818179A (en) User request processing method and device, computing equipment and medium
CN114827280A (en) Request processing method, device, equipment and medium
CN114827280B (en) Request processing method, device, equipment and medium
US11188593B1 (en) Reactive programming database interface
CN111510480A (en) Request sending method and device and first server
CN112860770A (en) Report generation method and device, electronic equipment and storage medium
CN114979308B (en) Message processing 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