CN114048010A - Method, device, equipment and storage medium for controlling service timeout time - Google Patents

Method, device, equipment and storage medium for controlling service timeout time Download PDF

Info

Publication number
CN114048010A
CN114048010A CN202111257530.0A CN202111257530A CN114048010A CN 114048010 A CN114048010 A CN 114048010A CN 202111257530 A CN202111257530 A CN 202111257530A CN 114048010 A CN114048010 A CN 114048010A
Authority
CN
China
Prior art keywords
time
service instance
service
timeout
upstream
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.)
Pending
Application number
CN202111257530.0A
Other languages
Chinese (zh)
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111257530.0A priority Critical patent/CN114048010A/en
Publication of CN114048010A publication Critical patent/CN114048010A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The disclosure relates to the technical field of artificial intelligence, in particular to the technical field of cloud computing, and can be applied to scenes such as management of service timeout time. The specific implementation scheme is as follows: acquiring time statistical information related to service return time of each upstream service instance, wherein the service return time is the time taken by the upstream service instance to receive a corresponding downstream service instance to return a service result; determining a target service instance from the multiple upstream service instances based on the time statistical information corresponding to each upstream service instance; and adjusting the timeout time for at least one target service instance based on the time statistical information and/or the importance information corresponding to each target service instance. Based on the process, the overtime of the service instance is dynamically adjusted, so that the overtime can continuously keep higher availability and effectively adapt to a real service scene.

Description

Method, device, equipment and storage medium for controlling service timeout time
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to the technical field of cloud computing, and can be applied to scenes such as management of service timeout time.
Background
In some scenarios where information services are provided via service instances, a user's request may need to be streamed among multiple service instances, the connections between which form a complete service link for a user request.
When one service instance requests a service result of a corresponding downstream service instance, the timeout time of the service instance needs to be set, so that it is ensured that an exception can be handled when the downstream service instance does not return the service result after exceeding the timeout time. In the related art, the timeout time is set manually, and the timeout time degrades with the lapse of time, so that the method cannot adapt to a real service scene, and the availability of the timeout time is reduced.
Disclosure of Invention
The disclosure provides a method, a device, equipment and a storage medium for controlling service timeout time.
According to a first aspect of the present disclosure, there is provided a method for controlling a service timeout time, including:
acquiring time statistical information related to service return time of each upstream service instance, wherein the service return time is the time taken by the upstream service instance to receive a corresponding downstream service instance to return a service result;
determining a target service instance from the multiple upstream service instances based on the time statistical information corresponding to each upstream service instance;
and adjusting the timeout time for at least one target service instance based on the time statistical information and/or the importance information corresponding to each target service instance.
According to a second aspect of the present disclosure, there is provided a control apparatus of a service timeout time, comprising:
the information acquisition module is used for acquiring time statistical information related to service return time of each upstream service instance, wherein the service return time is the time taken by the upstream service instance to receive a corresponding downstream service instance to return a service result;
the target determining module is used for determining a target service instance from the upstream service instances based on the time statistical information corresponding to each upstream service instance;
and the overtime adjusting module is used for adjusting the overtime time for at least one target service instance based on the time statistical information and/or the importance information corresponding to each target service instance.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described method of controlling service timeout time.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the above-described service timeout time control method.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described method of controlling a service timeout time.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
in the technical scheme of the disclosure, the target service instances whose timeout time needs to be extended can be determined automatically based on the time statistical information related to the service return time of the service instances, the extension time needed by the timeout time of each target service instance is calculated, and the corresponding timeout time is adjusted based on the extension time of the target service instance. Based on the process, the overtime time of the service instance is dynamically adjusted, so that the overtime time can continuously keep higher availability, a real service scene is effectively adapted, and the risk of the service system failing due to unreasonable overtime time is reduced.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 illustrates an exemplary service link diagram for one user request provided by an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for controlling service timeout provided by an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating another method for controlling the service timeout provided by the embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a control apparatus for service timeout provided by an embodiment of the present disclosure;
fig. 5 shows a schematic block diagram of an example electronic device that may be used to implement the control method of service timeout provided by embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In some scenarios where information services are provided via service instances, a user's request may need to be streamed among multiple service instances, the connections between which form a complete service link for a user request.
When one service instance requests a service result of a corresponding downstream service instance, the timeout time of the service instance needs to be set, so that it is ensured that an exception can be handled when the downstream service instance does not return the service result after exceeding the timeout time. In the related art, the timeout time is set manually, and the timeout time degrades with the lapse of time, so that the method cannot adapt to a real service scene, and the availability of the timeout time is reduced.
The embodiment of the present disclosure provides a method, an apparatus, a device, and a storage medium for controlling a service timeout period, which aim to solve at least one of the above technical problems in the prior art.
Generally, a user's request may need to be streamed among multiple service instances, the connections between which form a complete service link for a user request. In the embodiment of the present disclosure, if one service instance in the service link is capable of receiving a service result returned by another service instance, the service instance may be referred to as an upstream service instance of the another service instance, and the another service instance may be referred to as a downstream service instance of the corresponding upstream service instance. Of course, an upstream service instance may also serve as a downstream service instance for other upstream service instances. Specifically, the upstream service instance may send a request to the corresponding downstream service instance and receive a service result returned by the corresponding downstream service instance.
Fig. 1 illustrates an exemplary service link diagram for one user request provided by the embodiment of the present disclosure, and as shown in fig. 1, the service link includes 8 service instances, which are service instance a to service instance H. In a service system where each service instance comprises a plurality of service instances, it will be appreciated that a service link comprising 8 service instances may be constructed for each user request. The service instance a may send a request to a service instance B and a service instance C, and receive a service result returned by the service instance B and the service instance C, where the service instance a is an upstream service instance of the service instance B and the service instance C, it may be understood that the service instance B is an upstream service instance of the service instance D and the service instance E, the service instance C is an upstream service instance of the service instance F, the service instance D is an upstream service instance of the service instance G, and the service instance E and the service instance F are upstream service instances of the service instance H. It is understood that in fig. 1, the service instance G and the service instance H are the service instances at the bottom layer, and therefore can only be used as downstream service instances, but cannot be used as upstream service instances.
Fig. 2 shows a flowchart of a method for controlling a service timeout period according to an embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes the following steps:
s210: time statistics related to service return time for each upstream service instance are obtained.
Here, the service return time is the time taken by the upstream service instance to receive the corresponding downstream service instance to return the service result, and the time statistic information may be some information related to some statistic result of the service return time, and may characterize some specified characteristics of the service return time. Taking service instance a and service instance B as an example, service instance a is an upstream service instance of service instance B, service instance B is a downstream service instance of service instance a, and service instance a may send a request to service instance B and receive a service result returned by service instance B. The service return time of the service instance a is the time taken for the service instance a to receive the service result returned by the corresponding service instance B after sending the request to the service instance B.
Optionally, the time statistic information may include a timeout proportion corresponding to the service return time of each upstream service instance, and may further include time distribution characteristic information of the service return time of each upstream service instance. The delay condition of the service return time of each upstream service instance can be accurately reflected through the timeout proportion, the distribution condition of the service return time of each upstream service instance can be accurately reflected through the time distribution characteristic information, and accurate analysis on the service return time of the upstream service instance is facilitated.
The corresponding timeout proportion of each type of upstream service instance is the ratio of the number of service return times of the type of upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the type of upstream service instance. Continuing to take the service instance a and the service instance B as an example, the service instance a is an upstream service instance of the service instance B, the service instance B is a downstream service instance of the service instance a, and the service instance a sends 100 requests to the service instance B in total, so that there are 100 service return times for the service instance a, where 5 service return times exceed the corresponding service return time of the timeout time, and the timeout proportion is 5%.
S220: and determining a target service instance from the plurality of upstream service instances based on the time statistical information corresponding to each upstream service instance.
The embodiment of the disclosure may preset a corresponding judgment condition for the time statistic information, where the judgment condition is used to determine whether the timeout time of each upstream service instance needs to be extended, and when the time statistic information corresponding to one upstream service instance satisfies the judgment condition, the upstream service instance may be determined as a target service instance, which may be understood as a service instance whose timeout time needs to be extended. For example, in the service instances a to F, if the time statistic information corresponding to the service instance B and the service instance C meets the preset judgment condition, the service instance B and the service instance C may be determined as the target service instance, and the timeout time of the service instance B and the service instance C needs to be prolonged in the subsequent steps.
Optionally, the time statistic information may include a timeout proportion corresponding to the service return time of each upstream service instance, and in step S220, a comparison result between the timeout proportion corresponding to the service return time of each upstream service instance and the standard timeout proportion may be determined; and determining the upstream service instance with the overtime ratio corresponding to the service return time larger than the standard overtime ratio as the target service instance.
S230: and adjusting the timeout time for at least one target service instance based on the time statistical information and/or the importance information corresponding to each target service instance.
The time statistics may be some information related to some statistics of the service return times, and may characterize some specified characteristics of the service return times. And the importance information of the target service instance is related to the importance degree of the service result returned by the downstream service instance of the target service instance. The extension time which can be allocated to each target service instance is determined through at least one of the time statistical information and the importance information, so that the timeout time of the target service instance is adjusted based on the extension time.
Optionally, for each target service instance, the embodiment of the present disclosure may determine, based on the time distribution characteristic information corresponding to the target service instance, that the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion, where the timeout time of the target service instance is required to be extended. The sum of the time required for the extension time for each target service instance may then be calculated.
And when the sum of the time is determined not to be larger than the time balance, allocating the time balance to the timeout time of each target service instance according to the required extension time of each target service instance.
When the time sum is determined to be larger than the time balance, sequencing the target service instances according to the sequence of the importance degrees from top to bottom based on the importance degree information of each target service instance; and then, preferentially distributing the time balance to the time-out time of the top-ranked target service instance according to the required extension time of each target service instance.
The method for controlling the service timeout time provided by the embodiment of the disclosure can automatically determine the target service instances whose timeout time needs to be extended based on the time statistical information related to the service return time of the service instances, calculate the extension time needed by the timeout time of each target service instance, and adjust the corresponding timeout time based on the extension time of the target service instance. Based on the process, the overtime time of the service instance is dynamically adjusted, so that the overtime time can continuously keep higher availability, a real service scene is effectively adapted, and the risk of the service system failing due to unreasonable overtime time is reduced.
Fig. 3 is a flowchart illustrating another method for controlling service timeout time according to an embodiment of the present disclosure, where as shown in fig. 3, the method mainly includes the following steps:
s310: and acquiring the timeout proportion corresponding to the service return time of each upstream service instance.
As previously described, each upstream service instance includes a plurality of upstream service instances. In this step, for each upstream service instance, the embodiment of the present disclosure may obtain a sub timeout proportion corresponding to the service return time of each upstream service instance in the same upstream service instance; and determining the timeout proportion corresponding to the service return time of each upstream service instance based on the plurality of sub timeout proportions. Here, the sub-timeout proportion corresponding to each upstream service instance is a ratio of the number of service return times of the upstream service instance exceeding the corresponding timeout time to the total number of service return times of the upstream service instance. By comprehensively considering the timeout condition of the service return time of each upstream service instance in the same upstream service instance, the timeout proportion of the upstream service instance on the whole can be accurately reflected.
Specifically, in the process that the service system provides the service based on the user request, the condition of the service return time of each service instance for each user request can be counted in real time, and the sub-timeout proportion corresponding to the service return time is calculated, so that when the timeout time of a certain service instance needs to be adjusted, the sub-timeout proportion corresponding to the service return time of each service instance can be obtained in time. For the same type of upstream service instance, an average value of sub timeout proportions corresponding to the service return time of all service instances in the type of upstream service instance may be calculated, and the average value may be used as the timeout proportion corresponding to the service return time of the type of upstream service instance.
S320: and acquiring time distribution characteristic information of the service return time of each upstream service instance.
As previously described, each upstream service instance includes a plurality of upstream service instances. In this step, for each type of upstream service instance, the embodiment of the present disclosure may obtain the time distribution characteristic sub-information of the service return time of each upstream service instance in the same type of upstream service instance; and determining the time distribution characteristic information of the service return time of each upstream service instance based on the plurality of time distribution characteristic sub-information. By comprehensively considering the distribution situation of the service return time of each upstream service instance in the same type of upstream service instance, the time distribution characteristics of the upstream service instances on the whole can be accurately reflected.
Specifically, in the process that the service system provides the service based on the user request, the condition of the service return time of each service instance for each user request can be counted in real time, and the time distribution characteristic sub-information corresponding to the service return time is calculated, so that when the timeout time of a certain service instance needs to be adjusted, the time distribution characteristic sub-information corresponding to the service return time of each service instance can be obtained in time. And fusing the time distribution characteristic sub-information corresponding to the service return time of all the service instances in the upstream service instance to obtain the time distribution characteristic information corresponding to the service return time of the upstream service instance.
It should be noted that the execution sequence of step S310 and step S320 is not sequential. Step S310 may be performed first, and then step S320 may be performed; or, step S320 is executed first, and then step S310 is executed; alternatively, step S310 and step S320 are performed simultaneously.
S330: and determining the comparison result of the timeout proportion corresponding to the service return time of each upstream service instance and the standard timeout proportion.
In this step, the timeout proportion corresponding to the service return time of each upstream service instance may be compared with the standard timeout proportion. It is understood that the comparison result may include that the timeout proportion corresponding to the service return time of the upstream service instance is greater than the standard timeout proportion, and the timeout proportion corresponding to the service return time of the upstream service instance is not greater than the standard timeout proportion.
S340: and determining the upstream service instance with the overtime ratio corresponding to the service return time larger than the standard overtime ratio as the target service instance.
As described above, the target service instance refers to a service instance whose timeout period needs to be extended, and it can be understood that, when the timeout ratio corresponding to the service return time of a service instance is greater than the standard timeout ratio, it indicates that the service instance has more service return times exceeding the corresponding timeout period, and therefore, the timeout period of the service instance needs to be extended in order to reduce the corresponding timeout ratio.
S350: and aiming at each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance.
In an embodiment of the disclosure, the time distribution profile information includes a plurality of quantile values of service return times of the upstream service instances. For example, the quantile value is one of the characteristic numbers of the random variable. The area enclosed by the random variable distribution curve and the X axis is divided into n equal parts to obtain n-1 values (X _1, X _2 … … X _ (n-1)), and these values are called n quantile values. For example, a target service instance has 100 service return times, and the 100 service return times are determined in descending order, so that the 80 quantile value of the target service instance is the 80 th service return time, which may also indicate that 80% of the 100 service return times are not greater than the 80 quantile value of the service return time of the target service instance.
In this step, a minimum quantile value that can ensure that the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion can be screened out from a plurality of quantile values of the service return time of the upstream service instance; and calculating the time difference between the service return time corresponding to the minimum quantile value and the timeout time of the target service instance, and determining the time difference as the required extension time of the timeout time of the target service instance.
For example, a standard timeout proportion of 90% indicates that 90% of the service return time for the desired service instance does not exceed the corresponding timeout time. If one type of target service instance has 100 service return times, it is necessary to determine the 90-quantile value of the target service instance, i.e., the service return time ranked at the 90 th position, determine the time difference between the service return time at the 90 th position and the timeout time of the type of target service instance, and determine the time difference as the extension time required for the timeout time of the type of target service instance. Assuming that the service return time of the 90 th bit is 0.12 seconds and the timeout time is 0.1 seconds, the extension time required for the timeout time is 0.12 seconds.
S360: the sum of the time required for the extension time for each target service instance is calculated.
In this step, the extension time required by each target service instance is summed to obtain a time sum, and the time sum represents the total extension time required by the timeout time of all the target service instances. When the sum of time is not greater than the time balance, executing step S370; when the sum of time is greater than the time balance, step S380 is executed. Here, the time balance is a time that can be allocated in the service system, and assuming that a service link guarantees that the service return time for the user is 1 second, and the actual return time of the service system is 0.7 second, a time balance of 0.3 second is left, and the left time balance can be allocated to the timeout time of the target service instance, thereby extending the timeout time.
S370: and when the sum of the time is determined not to be larger than the time balance, allocating the time balance to the timeout time of each target service instance according to the required extension time of each target service instance.
In the embodiment of the present disclosure, if the sum of the time is not greater than the time balance, the time balance is sufficient to allocate the required extension time for each target service instance, so as to realize the extension of the timeout time of each target service instance.
S380: and when the time sum is determined to be larger than the time balance, sequencing the target service instances according to the sequence from top to bottom of the importance degree based on the importance degree information of each target service instance.
S390: and preferentially distributing the time balance to the time-out time of the top-ranked target service instance according to the required extension time of each target service instance.
In the embodiment of the present disclosure, if the sum of the time is not greater than the time balance, the extended time required for allocating the time balance to all kinds of target service instances cannot be described, and only some kinds of service instances can be allocated preferentially. Therefore, various target service instances can be sorted according to the importance, and the time balance is preferentially distributed to the target service instances with high importance.
As described above, the importance information of the target service instance is related to the importance of the service result returned by the downstream service instance of the target service instance. The importance degree of the service result can be represented by the importance degree of the service to which the service result is applied, and the degree of influence of the service result on the user experience, and other dimensions, and an importance value can be quantized based on the importance degree and the degree of influence of the dimensions, and the importance value is used for indicating the service. Importance of the results
After extending the timeout for some target service instances, the timeout may be validated online. For stability during validation and potential influence of unreasonable timeout on-line stability, means such as gray-scale distribution can be adopted to implement staging and validation of extension rooms.
Based on the same principle as the above-mentioned service timeout time control method, fig. 4 shows a schematic diagram of a service timeout time control device provided in an embodiment of the present disclosure. As shown in fig. 4, the control device 400 for service timeout time includes an information acquisition module 410, a targeting module 420, and a timeout adjusting module 430.
The information obtaining module 410 is configured to obtain time statistics information related to service return time of each upstream service instance, where the service return time is time taken for the upstream service instance to receive a service result returned by a corresponding downstream service instance.
The target determination module 420 is configured to determine a target service instance from the plurality of upstream service instances based on the temporal statistics corresponding to each of the upstream service instances.
The timeout adjusting module 430 is configured to adjust the timeout time for at least one target service instance based on the time statistic information and/or the importance information corresponding to each target service instance.
The control device for the service timeout time provided by the embodiment of the disclosure can automatically determine the target service instances whose timeout time needs to be extended based on the time statistical information related to the service return time of the service instances, calculate the extension time needed by the timeout time of each target service instance, and adjust the corresponding timeout time based on the extension time of the target service instance. Based on the process, the overtime time of the service instance is dynamically adjusted, so that the overtime time can continuously keep higher availability, a real service scene is effectively adapted, and the risk of the service system failing due to unreasonable overtime time is reduced.
In the embodiment of the present disclosure, when the information obtaining module 410 is configured to obtain the time statistical information related to the service return time of each upstream service instance, specifically configured to:
acquiring a timeout proportion corresponding to the service return time of each upstream service instance, and acquiring time distribution characteristic information of the service return time of each upstream service instance;
the corresponding timeout proportion of each type of upstream service instance is the ratio of the number of service return times of the type of upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the type of upstream service instance.
In this disclosure, each upstream service instance includes a plurality of upstream service instances, and when the information obtaining module 410 is configured to obtain a timeout proportion corresponding to the service return time of each upstream service instance, it is specifically configured to:
aiming at each upstream service instance, acquiring a sub-timeout proportion corresponding to the service return time of each upstream service instance in the same upstream service instance;
determining the overtime proportion corresponding to the service return time of each upstream service instance based on the plurality of sub overtime proportions;
the sub-timeout proportion corresponding to each upstream service instance is a ratio of the number of the service return times of the upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the upstream service instance.
In the embodiment of the present disclosure, when the information obtaining module 410 is configured to obtain the time distribution characteristic information of the service return time of each upstream service instance, specifically, to:
acquiring time distribution characteristic sub-information of service return time of each upstream service instance in the same type of upstream service instance aiming at each type of upstream service instance;
and determining the time distribution characteristic information of the service return time of each upstream service instance based on the plurality of time distribution characteristic sub-information.
In the embodiment of the present disclosure, when the target determining module 420 is configured to determine the target service instance from the multiple upstream service instances based on the time statistic information corresponding to each upstream service instance, specifically, to:
determining a comparison result of the overtime proportion corresponding to the service return time of each upstream service instance and the standard overtime proportion;
and determining the upstream service instance with the overtime ratio corresponding to the service return time larger than the standard overtime ratio as the target service instance.
In this embodiment of the present disclosure, when the timeout adjusting module 430 is configured to adjust the timeout time for at least one target service instance based on the time statistic information and/or the importance information corresponding to each target service instance, specifically configured to:
aiming at each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance;
calculating the time sum of the extension time required by each target service instance;
and when the sum of the time is determined not to be larger than the time balance, allocating the time balance to the timeout time of each target service instance according to the required extension time of each target service instance.
In this embodiment of the present disclosure, when the timeout adjusting module 430 is configured to adjust the timeout time for at least one target service instance based on the time statistic information and/or the importance information corresponding to each target service instance, specifically configured to:
aiming at each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance;
calculating the time sum of the extension time required by each target service instance;
when the time sum is determined to be larger than the time balance, sequencing the target service instances according to the sequence of the importance degrees from top to bottom based on the importance degree information of each target service instance;
and preferentially distributing the time balance to the time-out time of the top-ranked target service instance according to the required extension time of each target service instance.
In an embodiment of the present disclosure, the time distribution profile information includes a plurality of quantile values of service return time of the upstream service instance;
the timeout adjusting module 430 is specifically configured to, when determining, based on the time distribution characteristic information corresponding to the target service instance, that the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion, and when determining the required extension time of the timeout time of the target service instance, perform:
screening out a minimum quantile value which can ensure that the overtime proportion of the target service instance is not greater than the corresponding standard overtime proportion from a plurality of quantile values of the service return time of the upstream service instance;
and calculating the time difference between the service return time corresponding to the minimum quantile value and the timeout time of the target service instance, and determining the time difference as the required extension time of the timeout time of the target service instance.
It can be understood that each module of the control device for the service timeout period in the embodiment of the present disclosure has a function of implementing the corresponding step of the control method for the service timeout period. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the control device of the service timeout period, reference may be made to the corresponding description of the control method of the service timeout period, which is not described herein again.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
Fig. 5 shows a schematic block diagram of an example electronic device that may be used to implement the control method of service timeout provided by embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the electronic device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 executes the respective methods and processes described above, such as the control method of the service timeout time. For example, in some embodiments, the method of controlling the service timeout time may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the above described method of controlling the service timeout time may be performed. Alternatively, in other embodiments, the calculation unit 501 may be configured by any other suitable means (e.g. by means of firmware) to perform the control method of the service timeout time.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (19)

1. A method of controlling service timeout time, comprising:
acquiring time statistical information related to service return time of each upstream service instance, wherein the service return time is the time taken by the upstream service instance to receive a corresponding downstream service instance to return a service result;
determining a target service instance from the plurality of upstream service instances based on the time statistic information corresponding to each upstream service instance;
and adjusting the timeout time for at least one target service instance based on the time statistical information and/or the importance information corresponding to each target service instance.
2. The control method according to claim 1, wherein the obtaining of the time statistic information about the service return time of each upstream service instance comprises:
acquiring an overtime proportion corresponding to the service return time of each upstream service instance, and acquiring time distribution characteristic information of the service return time of each upstream service instance;
the corresponding timeout proportion of each type of upstream service instance is the ratio of the number of service return times of the type of upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the type of upstream service instance.
3. The control method according to claim 2, wherein each upstream service instance includes a plurality of upstream service instances, and the obtaining of the timeout proportion corresponding to the service return time of each upstream service instance includes:
aiming at each upstream service instance, acquiring a sub-timeout proportion corresponding to the service return time of each upstream service instance in the same upstream service instance;
determining the overtime proportion corresponding to the service return time of each upstream service instance based on the plurality of sub overtime proportions;
the sub-timeout proportion corresponding to each upstream service instance is a ratio of the number of the service return times of the upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the upstream service instance.
4. The control method according to claim 2, wherein the obtaining of the time distribution characteristic information of the service return time of each of the upstream service instances comprises:
acquiring time distribution characteristic sub-information of service return time of each upstream service instance in the same type of upstream service instance aiming at each type of upstream service instance;
and determining the time distribution characteristic information of the service return time of each upstream service instance based on a plurality of time distribution characteristic sub-information.
5. The control method according to claim 2, wherein said determining a target service instance from among a plurality of types of said upstream service instances based on said temporal statistical information corresponding to each type of said upstream service instance comprises:
determining a comparison result of the overtime proportion corresponding to the service return time of each upstream service instance and the standard overtime proportion;
and determining the upstream service instance of which the overtime proportion corresponding to the service return time is greater than the standard overtime proportion as a target service instance.
6. The control method according to claim 2, wherein the adjusting the timeout time for at least one of the target service instances based on the time statistic information and/or the importance information corresponding to each of the target service instances comprises:
for each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance;
calculating the time sum of the extension time required by each target service instance;
and when the time sum is determined not to be larger than the time balance, distributing the time balance to the timeout time of each target service instance according to the required extension time of each target service instance.
7. The control method according to claim 2, wherein the adjusting the timeout time for at least one of the target service instances based on the time statistic information and/or the importance information corresponding to each of the target service instances comprises:
for each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance;
calculating the time sum of the extension time required by each target service instance;
when the time sum is determined to be larger than the time balance, based on the importance information of each target service instance, sequencing the target service instances according to the order of the importance from top to bottom;
and preferentially distributing the time balance to the time-out time of the top-ranked target service instance according to the required extension time of each target service instance.
8. The control method according to claim 6 or 7, the time distribution characteristic information including a plurality of quantiles of service return times of the upstream service instances;
when determining that the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance, the time required to extend the timeout of the target service instance includes:
screening out a minimum quantile value which can ensure that the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion from a plurality of quantile values of the service return time of the upstream service instance;
and calculating the time difference between the service return time corresponding to the minimum quantile value and the timeout time of the target service instance, and determining the time difference as the required extension time of the timeout time of the target service instance.
9. A service timeout time control apparatus comprising:
the information acquisition module is used for acquiring time statistical information related to service return time of each upstream service instance, wherein the service return time is the time taken by the upstream service instance to receive a corresponding downstream service instance to return a service result;
a target determining module, configured to determine a target service instance from the multiple types of upstream service instances based on the time statistic information corresponding to each type of upstream service instance;
and the timeout adjusting module is used for adjusting the timeout time for at least one target service instance based on the time statistical information and/or the importance information corresponding to each target service instance.
10. The control device according to claim 9, wherein the information obtaining module, when configured to obtain the time statistic information related to the service return time of each upstream service instance, is specifically configured to:
acquiring a timeout proportion corresponding to the service return time of each upstream service instance, and acquiring time distribution characteristic information of the service return time of each upstream service instance;
the corresponding timeout proportion of each type of upstream service instance is the ratio of the number of service return times of the type of upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the type of upstream service instance.
11. The control device according to claim 10, wherein each of the upstream service instances includes a plurality of upstream service instances, and the information obtaining module, when configured to obtain the timeout proportion corresponding to the service return time of each of the upstream service instances, is specifically configured to:
aiming at each upstream service instance, acquiring a sub-timeout proportion corresponding to the service return time of each upstream service instance in the same upstream service instance;
determining the overtime proportion corresponding to the service return time of each upstream service instance based on the plurality of sub overtime proportions;
the sub-timeout proportion corresponding to each upstream service instance is a ratio of the number of the service return times of the upstream service instance exceeding the corresponding timeout time to the total number of the service return times of the upstream service instance.
12. The control device according to claim 10, wherein the information obtaining module, when configured to obtain the time distribution characteristic information of the service return time of each of the upstream service instances, is specifically configured to:
acquiring time distribution characteristic sub-information of service return time of each upstream service instance in the same type of upstream service instance aiming at each type of upstream service instance;
and determining the time distribution characteristic information of the service return time of each upstream service instance based on a plurality of time distribution characteristic sub-information.
13. The control device according to claim 10, wherein the target determining module, when configured to determine the target service instance from the plurality of types of upstream service instances based on the time statistic information corresponding to each type of upstream service instance, is specifically configured to:
determining a comparison result of the overtime proportion corresponding to the service return time of each upstream service instance and the standard overtime proportion;
and determining the upstream service instance of which the overtime proportion corresponding to the service return time is greater than the standard overtime proportion as a target service instance.
14. The control device according to claim 10, wherein the timeout adjusting module, when configured to adjust the timeout time for at least one of the target service instances based on the time statistic information and/or the importance information corresponding to each of the target service instances, is specifically configured to:
for each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance;
calculating the time sum of the extension time required by each target service instance;
and when the time sum is determined not to be larger than the time balance, distributing the time balance to the timeout time of each target service instance according to the required extension time of each target service instance.
15. The control device according to claim 10, wherein the timeout adjusting module, when configured to adjust the timeout time for at least one of the target service instances based on the time statistic information and/or the importance information corresponding to each of the target service instances, is specifically configured to:
for each target service instance, determining the required extension time of the timeout time of the target service instance when the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion based on the time distribution characteristic information corresponding to the target service instance;
calculating the time sum of the extension time required by each target service instance;
when the time sum is determined to be larger than the time balance, based on the importance information of each target service instance, sequencing the target service instances according to the order of the importance from top to bottom;
and preferentially distributing the time balance to the time-out time of the top-ranked target service instance according to the required extension time of each target service instance.
16. The control device according to claim 14 or 15, the time distribution characteristic information comprising a plurality of quantile values of service return times of the upstream service instances;
the timeout adjusting module is configured to, when determining, based on the time distribution characteristic information corresponding to the target service instance, that the timeout proportion of the target service instance is not greater than a corresponding standard timeout proportion and an extended time required by the timeout time of the target service instance, specifically:
screening out a minimum quantile value which can ensure that the timeout proportion of the target service instance is not greater than the corresponding standard timeout proportion from a plurality of quantile values of the service return time of the upstream service instance;
and calculating the time difference between the service return time corresponding to the minimum quantile value and the timeout time of the target service instance, and determining the time difference as the required extension time of the timeout time of the target service instance.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
CN202111257530.0A 2021-10-27 2021-10-27 Method, device, equipment and storage medium for controlling service timeout time Pending CN114048010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111257530.0A CN114048010A (en) 2021-10-27 2021-10-27 Method, device, equipment and storage medium for controlling service timeout time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111257530.0A CN114048010A (en) 2021-10-27 2021-10-27 Method, device, equipment and storage medium for controlling service timeout time

Publications (1)

Publication Number Publication Date
CN114048010A true CN114048010A (en) 2022-02-15

Family

ID=80206114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111257530.0A Pending CN114048010A (en) 2021-10-27 2021-10-27 Method, device, equipment and storage medium for controlling service timeout time

Country Status (1)

Country Link
CN (1) CN114048010A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661510A (en) * 2022-03-25 2022-06-24 北京百度网讯科技有限公司 Request timeout detection method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661510A (en) * 2022-03-25 2022-06-24 北京百度网讯科技有限公司 Request timeout detection method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112988381B (en) Method and device for generating optimization information for cloud resources and electronic equipment
CN113114504B (en) Method, apparatus, device, medium and product for allocating resources
CN114500339B (en) Node bandwidth monitoring method and device, electronic equipment and storage medium
CN114048010A (en) Method, device, equipment and storage medium for controlling service timeout time
CN111798167A (en) Warehouse replenishment method and device
CN113342665A (en) Task allocation method and device, electronic equipment and computer readable medium
CN112615795A (en) Flow control method and device, electronic equipment, storage medium and product
CN114090247A (en) Method, device, equipment and storage medium for processing data
CN115499707A (en) Method and device for determining video similarity
CN115202847A (en) Task scheduling method and device
CN114327918A (en) Method and device for adjusting resource amount, electronic equipment and storage medium
CN114999665A (en) Data processing method and device, electronic equipment and storage medium
CN114021642A (en) Data processing method and device, electronic equipment and storage medium
CN113486229A (en) Method and device for controlling grabbing pressure, electronic equipment and readable storage medium
CN113360672A (en) Methods, apparatus, devices, media and products for generating a knowledge graph
CN113010782A (en) Demand amount acquisition method and device, electronic equipment and computer readable medium
CN113407844B (en) Version recommendation method, device and equipment of applet framework and storage medium
CN113989004B (en) Resource allocation method and device, electronic equipment and readable storage medium
CN113411390B (en) Scheduling method and device of content distribution network and electronic equipment
CN115129266B (en) Data storage method, device and equipment based on block chain and storage medium
CN117808599A (en) Data distribution information generation method, device, equipment and platform
CN113313195B (en) Labeling task processing method, labeling task processing device, labeling task processing equipment, labeling task processing storage medium and labeling task processing program product
CN113422734B (en) Resource distribution method, device, electronic equipment and storage medium
CN114781480A (en) Target object evaluation method, evaluation model training method and device
CN114926069A (en) Model training method and workload distribution method

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