Service downgrading method, device, equipment, computer readable medium and program product
By receiving multiple interface call data and determining business configuration information, the problem of poor applicability in the existing technology of determining whether to downgrade based on one request and response is solved, and effective business downgrade and customization strategies are realized to adapt to changing business needs.
Patent Information
- Application Number
- CN202211175549.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-09-26
AI Technical Summary
In the prior art, the method of determining whether to be downgraded based on a request and response is poor in complex business scenarios, resulting in the state of subsequent fuses being unable to maintain.
By receiving multiple interface call data of the target service, the service configuration information is determined, including downgrade threshold information and downgrade interface information, and whether to perform service downgrade processing is determined based on the interface call data and service configuration information.
It realizes effective business downgrade in complex business scenarios, supports customized downgrade strategies, adapts to changing business needs, and maintains the status of fuses.
Smart Images

Figure CN115766484B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a service degradation method, apparatus, device, computer-readable medium, and program product. Background Art
[0002] In a distributed system environment, a business usually relies on multiple basic services. As the business complexity increases, the dependencies between services become more complex, and the service avalanche effect follows. In order to improve the stability of application services, downgrade circuit breakers have emerged. At present, when downgrading a business, the usual method is to determine whether to downgrade based on a request and response.
[0003] However, the inventors have discovered that when the above-mentioned method is used to downgrade the service, the following technical problems often occur: the method of determining whether to downgrade is based on a single request and response, and whether to downgrade can only be determined when the interface is called, resulting in downgrade in actual business scenarios, and when the preceding node of the interface is blocked, the interface will not be called, resulting in the inability to maintain the status of subsequent fuses, and poor applicability in complex business scenarios.
[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a service degradation method, apparatus, electronic device, computer-readable medium, and computer program product to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a service downgrade method, the method comprising: receiving interface call data corresponding to a target service; determining service configuration information corresponding to the target service, wherein the service configuration information comprises downgrade configuration information, and the downgrade configuration information comprises downgrade threshold information and downgrade interface information; determining whether to downgrade the target service according to the interface call data and the downgrade threshold information included in the service configuration information; in response to determining to downgrade the target service, performing service downgrade on the request of the target service according to the downgrade interface information included in the service configuration information.
[0008] Optionally, the above-mentioned downgrade threshold information includes a downgrade ratio threshold; and the above-mentioned determination whether to downgrade the above-mentioned target business includes: determining the number of failed calls based on the above-mentioned each interface call data and preset failure call conditions; in response to determining that the ratio of the above-mentioned number of failed calls to the number of the above-mentioned each interface call data is greater than or equal to the above-mentioned downgrade ratio threshold, determining to downgrade the above-mentioned target business.
[0009] Optionally, the downgrade threshold information includes a downgrade quantity threshold and a downgrade ratio threshold; and the determination of whether to downgrade the target service includes: determining the number of failed calls based on the above-mentioned interface call data and preset failure call conditions; in response to determining that the number of failed calls is greater than or equal to the above-mentioned downgrade quantity threshold, and the ratio of the number of failed calls to the number of the above-mentioned interface call data is greater than or equal to the above-mentioned downgrade ratio threshold, determining to downgrade the target service.
[0010] Optionally, the receiving of each interface call data corresponding to the target service includes: receiving each interface call data corresponding to the target service within a preset period time period.
[0011] Optionally, the above-mentioned service configuration information also includes retry configuration information; and after the above-mentioned request for the above-mentioned target service is subjected to service downgrade processing, the method also includes: determining whether the above-mentioned retry configuration information represents a retry of the above-mentioned target service; in response to determining that the above-mentioned retry configuration information represents a retry of the above-mentioned target service, adding the above-mentioned request to a failed request queue; according to the above-mentioned failed request queue and a preset time interval, retrying the interface corresponding to the above-mentioned request to obtain an interface retry result set, wherein the interface retry result in the above-mentioned interface retry result set represents whether the above-mentioned interface is retried successfully.
[0012] Optionally, the above-mentioned service configuration information also includes recovery configuration information, and the above-mentioned recovery configuration information includes recovery threshold information and recovery interface information; and the method also includes: determining whether to perform recovery processing on the above-mentioned target service based on the above-mentioned interface retry result set and the above-mentioned recovery threshold information; in response to determining to perform recovery processing on the above-mentioned target service, performing service recovery processing on the above-mentioned target service according to the above-mentioned recovery interface information.
[0013] Optionally, the above-mentioned service configuration information also includes recovery configuration information, and the above-mentioned recovery configuration information includes recovery threshold information and recovery interface information; and the method also includes: in response to determining that the above-mentioned retry configuration information indicates not to retry the above-mentioned target service, performing service recovery processing on the above-mentioned target service according to the above-mentioned recovery interface information.
[0014] Optionally, the above-mentioned recovery threshold information includes a recovery ratio threshold; and the above-mentioned determination of whether to perform recovery processing on the above-mentioned target business is based on the above-mentioned interface retry result set and the above-mentioned recovery threshold information, including: determining the number of interface retry results included in the above-mentioned interface retry result set that represent a successful interface retry as the number of successful retries; in response to determining that the ratio of the above-mentioned successful retries number to the number of each interface retry results included in the above-mentioned interface retry result set is greater than or equal to the above-mentioned recovery ratio threshold, determining to perform recovery processing on the above-mentioned target business.
[0015] Optionally, the above-mentioned recovery threshold information includes a recovery ratio threshold and a recovery quantity threshold; and the above-mentioned determination of whether to perform recovery processing on the above-mentioned target business is based on the above-mentioned interface retry result set and the above-mentioned recovery threshold information, including: determining the number of interface retry results included in the above-mentioned interface retry result set that represent successful interface retry as the number of successful retries; in response to determining that the above-mentioned successful retries number is greater than or equal to the above-mentioned recovery quantity threshold, and the ratio of the above-mentioned successful retries number to the number of each interface retry results included in the above-mentioned interface retry result set is greater than or equal to the above-mentioned recovery ratio threshold, determining to perform recovery processing on the above-mentioned target business.
[0016] Optionally, the above-mentioned downgrade configuration information also includes an extended service identifier, and the interface call data in the above-mentioned each interface call data corresponds to the extended service identifier; and the above-mentioned determining the number of failed calls based on the above-mentioned each interface call data and the preset failure call condition includes: determining each interface call data in the above-mentioned each interface call data that meets the above-mentioned preset failure call condition as interface call failure data, and obtaining an interface call failure data set; determining each interface call failure data in the above-mentioned interface call failure data set that meets the preset extended service identifier condition as a target interface call failure data set, wherein the above-mentioned preset extended service identifier condition is that the extended service identifier corresponding to the interface call failure data is the same as the extended service identifier included in the above-mentioned downgrade configuration information; and determining the number of each target interface call failure data included in the above-mentioned target interface call failure data set as the number of failed calls.
[0017] Optionally, the method further includes: publishing and processing the service degradation event information corresponding to the target service.
[0018] Optionally, the publishing process of the service degradation event information corresponding to the target service includes: sending the service degradation event information to an alarm terminal device.
[0019] Optionally, the publishing process of the service degradation event information corresponding to the target service includes: sending the service degradation event information to an associated data storage end, so as to provide a visual display of each service degradation event information stored in the data storage end.
[0020] In a second aspect, some embodiments of the present disclosure provide a service downgrading device, the device comprising: a receiving unit, configured to receive interface call data corresponding to a target service; a first determination unit, configured to determine service configuration information corresponding to the target service, wherein the service configuration information comprises downgrade configuration information, and the downgrade configuration information comprises downgrade threshold information and downgrade interface information; a second determination unit, configured to determine whether to downgrade the target service according to the interface call data and the downgrade threshold information included in the service configuration information; a downgrading unit, configured to downgrade the request of the target service according to the downgrade interface information included in the service configuration information in response to determining that the target service is to be downgraded.
[0021] Optionally, the above-mentioned degradation threshold information includes a degradation ratio threshold.
[0022] Optionally, the second determination unit is further configured to: determine the number of failed calls based on the above-mentioned interface call data and preset failure call conditions; in response to determining that the ratio of the above-mentioned number of failed calls to the number of the above-mentioned interface call data is greater than or equal to the above-mentioned downgrade ratio threshold, determine to downgrade the above-mentioned target business.
[0023] Optionally, the above-mentioned downgrade threshold information includes a downgrade quantity threshold and a downgrade ratio threshold.
[0024] Optionally, the second determination unit is further configured to: determine the number of failed calls based on the above-mentioned interface call data and preset failure call conditions; in response to determining that the above-mentioned number of failed calls is greater than or equal to the above-mentioned downgrade number threshold, and the ratio of the above-mentioned number of failed calls to the number of the above-mentioned interface call data is greater than or equal to the above-mentioned downgrade ratio threshold, determine to downgrade the above-mentioned target business.
[0025] Optionally, the receiving unit is further configured to: receive each interface call data corresponding to the above target service within a preset period time period.
[0026] Optionally, the above service configuration information also includes retry configuration information.
[0027] Optionally, the device further includes: a retry determination unit, an adding unit and a retry unit. The retry determination unit is configured to determine whether the retry configuration information indicates retrying the target service. The adding unit is configured to add the request to a failed request queue in response to determining that the retry configuration information indicates retrying the target service. The retry unit is configured to retry the interface corresponding to the request according to the failed request queue and a preset time interval to obtain an interface retry result set, wherein the interface retry result in the interface retry result set indicates whether the interface is successfully retried.
[0028] Optionally, the service configuration information further includes recovery configuration information, and the recovery configuration information includes recovery threshold information and recovery interface information.
[0029] Optionally, the device further includes: a recovery determination unit and a first recovery unit. The recovery determination unit is configured to determine whether to perform recovery processing on the target service according to the interface retry result set and the recovery threshold information. The first recovery unit is configured to perform service recovery processing on the target service according to the recovery interface information in response to determining to perform recovery processing on the target service.
[0030] Optionally, the service configuration information further includes recovery configuration information, and the recovery configuration information includes recovery threshold information and recovery interface information.
[0031] Optionally, the device further includes: a second recovery unit configured to, in response to determining that the retry configuration information indicates not to retry the target service, perform service recovery processing on the target service according to the recovery interface information.
[0032] Optionally, the above-mentioned recovery threshold information includes a recovery ratio threshold.
[0033] Optionally, the recovery determination unit is further configured to: determine the number of interface retry results characterizing the success of the interface retry included in the above-mentioned interface retry result set as the number of successful retries; in response to determining that the ratio of the above-mentioned number of successful retries to the number of each interface retry results included in the above-mentioned interface retry result set is greater than or equal to the above-mentioned recovery ratio threshold, determine to perform recovery processing on the above-mentioned target service.
[0034] Optionally, the above-mentioned restoration threshold information includes a restoration ratio threshold and a restoration quantity threshold.
[0035] Optionally, the recovery determination unit is further configured to: determine the number of interface retry results characterizing a successful interface retry included in the above-mentioned interface retry result set as the number of successful retries; in response to determining that the above-mentioned successful retries number is greater than or equal to the above-mentioned recovery number threshold, and the ratio of the above-mentioned successful retries number to the number of each interface retry results included in the above-mentioned interface retry result set is greater than or equal to the above-mentioned recovery ratio threshold, determine to perform recovery processing on the above-mentioned target business.
[0036] Optionally, the above-mentioned downgrade configuration information also includes an extended service identifier, and the interface call data in the above-mentioned each interface call data corresponds to the extended service identifier.
[0037] Optionally, the second determination unit includes: a first data determination unit, a second data determination unit and a failed call number determination unit. The first data determination unit is configured to determine each interface call data that satisfies the preset failed call condition in the above-mentioned interface call data as interface call failure data, and obtain an interface call failure data set. The second data determination unit is configured to determine each interface call failure data that satisfies a preset extended service identification condition in the above-mentioned interface call failure data set as a target interface call failure data set, wherein the preset extended service identification condition is that the extended service identification corresponding to the interface call failure data is the same as the extended service identification included in the above-mentioned downgrade configuration information. The failed call number determination unit is configured to determine the number of each target interface call failure data included in the above-mentioned target interface call failure data set as the failed call number.
[0038] Optionally, the service degradation device further includes: a publishing unit configured to publish the service degradation event information corresponding to the target service.
[0039] Optionally, the publishing unit is further configured to: send the service degradation event information to an alarm terminal device.
[0040] Optionally, the publishing unit is further configured to: send the service degradation event information to an associated data storage end, so as to provide a visual display of each service degradation event information stored in the data storage end.
[0041] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0042] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0043] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner of the above-mentioned first aspect when executed by a processor.
[0044] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the service downgrade method of some embodiments of the present disclosure, from the business perspective, a custom downgrade strategy is supported, so that it can adapt to complex and changeable business scenarios. Specifically, the reason for the poor applicability in complex business scenarios is that the method of judging whether to downgrade based on a request and response can only judge whether to downgrade when calling the interface, resulting in downgrade in the actual business scenario, and when the front node of the interface is blocked, the interface will not be called, resulting in the state of the subsequent fuse cannot be maintained, and the applicability in complex business scenarios is poor. Based on this, the service downgrade method of some embodiments of the present disclosure, first, receives the data of each interface call corresponding to the target business. Thus, the received data of each interface call can represent the data of calling the interface of the target business multiple times, so as to determine whether to downgrade the target business. Then, the service configuration information corresponding to the above target business is determined. Among them, the above-mentioned service configuration information includes downgrade configuration information, and the above-mentioned downgrade configuration information includes downgrade threshold information and downgrade interface information. Thus, the determined service configuration information can characterize the relevant information configured for the target service, and the downgrade configuration information included in the service configuration information can characterize the downgrade logic related information configured for the target service. Afterwards, according to the above-mentioned interface call data and the downgrade threshold information included in the above-mentioned service configuration information, it is determined whether to downgrade the above-mentioned target service. Thus, it can be determined whether to downgrade the above-mentioned target service by calling the interface call data of the target service multiple times and the downgrade threshold information of the target service configured by the user-defined configuration. Finally, in response to determining to downgrade the above-mentioned target service, according to the downgrade interface information included in the above-mentioned service configuration information, the request of the above-mentioned target service is downgraded. Thus, when it is determined to downgrade the target service, the target service can be downgraded by the downgrade interface information of the target service configured by the user-defined configuration. Also because the received interface call data is the data of calling the interface of the target service multiple times, the method of judging whether to downgrade based on one request and response is avoided. And because the downgrade configuration information in the determined service configuration information is configured by the user-defined configuration in advance, it can be adjusted according to the change of the service scenario. As a result, from a business perspective, customized downgrade strategies can be supported to adapt to complex and changing business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0046] Figure 1 is an architectural diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
[0047] Figure 2 is a timing diagram of an application scenario of a service degradation method according to some embodiments of the present disclosure;
[0048] Figure 3 is a flow chart of some embodiments of the service downgrading method according to the present disclosure;
[0049] Figure 4 are flow charts of other embodiments of the service downgrading method according to the present disclosure;
[0050] Figure 5 are flow charts of some further embodiments of the service downgrading method according to the present disclosure;
[0051] Figure 6 is a schematic diagram of the structure of some embodiments of the service degradation device according to the present disclosure;
[0052] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0053] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0054] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0055] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0056] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0057] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0058] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0059] Figure 1 An exemplary system architecture 100 is shown to which a service degradation method or a service degradation apparatus according to some embodiments of the present disclosure can be applied.
[0060] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0061] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0062] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens and supporting information browsing, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules for providing distributed services, for example, or they can be implemented as a single software or software module. No specific limitation is made here.
[0063] The server 105 may be a server that provides various services, such as a background server that provides support for information displayed on the terminal devices 101, 102, and 103. The background server may analyze and process the received request and other data, and feed back the processing results to the terminal device.
[0064] It should be noted that the service degradation method provided in the embodiment of the present disclosure may be executed by the server 105. Accordingly, the service degradation device may be arranged in the server 105.
[0065] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules for providing distributed services, or it can be implemented as a single software or software module. No specific limitation is made here.
[0066] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0067] Figure 2 It is a timing diagram of an application scenario of the service degradation method according to some embodiments of the present disclosure.
[0068] exist Figure 2 In an application scenario, a user terminal may send a request to a business system. The business system may be a server for responding to requests from the user terminal. The business system may request external services from external dependencies. The external dependencies may be servers for providing services to the business system. The business system may send interface call data to a monitoring server. The monitoring server may be used to execute a business degradation method. A sequential flow of an application scenario of the business degradation method includes the following steps:
[0069] Step 201: The user terminal sends a request for a target service to the service system. Here, the request may be a page access request.
[0070] Step 202: The business system calls a service from an external dependency. Here, calling a service may refer to calling an interface.
[0071] Step 203: The external dependency sends the external dependency processing result to the business system, wherein the external dependency processing result may be the processing result fed back by the external dependency for the received call request.
[0072] In step 204, the business system sends the interface call data generated according to the external dependency processing result sent by the received external dependency to the monitoring server. When the external dependency processing result includes processing data, it can represent that the business system successfully calls the service to the external dependency, so that the business system can generate interface call data representing the successful interface call. When the external dependency processing result is empty or includes an identifier representing a call failure, it can represent that the business system fails to call the service to the external dependency, so that the business system can generate interface call data representing the failure of the interface call.
[0073] Step 205: The business system sends the business system processing result to the user end according to the external dependency processing result sent by the received external dependency. When the external dependency processing result includes processing data, the business system can generate the business system processing result corresponding to the user end's request according to the processing data.
[0074] Step 206: The monitoring server determines the service configuration information corresponding to the target service. The service configuration information includes degradation configuration information, and the degradation configuration information includes degradation threshold information and degradation interface information.
[0075] Step 207: The monitoring server determines whether to downgrade the target service according to the received interface call data of the target service and the downgrade threshold information included in the service configuration information.
[0076] Step 208 , in response to determining to downgrade the target service, the monitoring server performs service downgrade processing on the request of the target service in the service system according to the downgrade interface information included in the service configuration information.
[0077] It should be noted that the above-mentioned user terminal, the above-mentioned business system, the above-mentioned external dependency and the above-mentioned monitoring server can be hardware or software. When the above-mentioned user terminal, the above-mentioned business system, the above-mentioned external dependency and the above-mentioned monitoring server are hardware, they can be implemented as a distributed cluster composed of multiple servers or terminal devices, or they can be implemented as a single server or a single terminal device. When the above-mentioned user terminal, the above-mentioned business system, the above-mentioned external dependency and the above-mentioned monitoring server are embodied as software, they can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0078] Continue to refer Figure 3 , shows a process 300 of some embodiments of the service downgrade method according to the present disclosure. The service downgrade method comprises the following steps:
[0079] Step 301, receiving each interface call data corresponding to the target service.
[0080] In some embodiments, the execution subject of the service degradation method (for example Figure 1 The server 105 shown or Figure 2The monitoring service end shown in the figure can receive various interface call data corresponding to the target business. Among them, the above-mentioned target business can be any business. Here, the business can refer to a transaction implemented as an interface to provide related services. The business can be uniquely represented by a business identifier. The above-mentioned target business corresponds to an interface. The various interface call data corresponding to the target business can be data related to various call results of calling the above-mentioned interface. For example, the interface call data can be data representing the successful call of the above-mentioned interface or the failure of calling the above-mentioned interface. As an example, the interface call data can include an interface identifier and an interface call result. The interface identifier can uniquely identify the interface. The interface call result can represent success or failure. The interface call data can also include a business identifier. The above-mentioned various interface call data can be sent by the request processing server of the above-mentioned target business. The request processing server can be understood as the business system of the above-mentioned target business. As an example, when the user end sends a page request to the above-mentioned business system, the business system calls the above-mentioned interface. If the call is successful, the interface call result represents success. If the call fails, the interface call result represents failure. The business system can send the interface call data to the above-mentioned execution subject and can send the request result to the user end. In practice, the execution subject may receive a preset number of interface call data corresponding to the target service through a wired connection or a wireless connection. Here, the specific setting of the preset number is not limited.
[0081] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0082] In some optional implementations of some embodiments, the above-mentioned execution entity can receive the various interface call data corresponding to the above-mentioned target business within a preset periodic time period. Among them, the above-mentioned preset periodic time period can be a pre-set periodic time period for monitoring the interface call status of the target business. For example, the monitoring period can be 5 minutes. The preset periodic time period of the last monitoring can be 08:00:00-08:05:00. Then the current preset periodic time period can be 08:05:00-08:10:00. Thus, by receiving the various interface call data corresponding to the above-mentioned target business within the preset periodic time period, the interface call status of the target business can be periodically monitored.
[0083] Step 302: Determine the service configuration information corresponding to the target service.
[0084] In some embodiments, the execution subject may determine the service configuration information corresponding to the target service. The service configuration information may be information related to the configuration of the service. The service configuration information may include downgrade configuration information. The downgrade configuration information may be information configured for downgrade processing of the service. The downgrade configuration information may include downgrade threshold information and downgrade interface information. The downgrade threshold information may be threshold-related information for determining whether to downgrade the service. The downgrade threshold information may include a threshold for the number of failed interface calls. The threshold for the number of failed interface calls may be a threshold for limiting the maximum number of failed calls of the interface of the target service. The downgraded interface information may be information related to the downgraded interface. The downgraded interface information may include a downgraded interface identifier. The downgraded interface identifier may be an identifier of the interface after the target service is downgraded.
[0085] In practice, the execution subject may obtain the service configuration information whose corresponding service identifier is the service identifier of the target service from the computing device storing the service configuration information. The computing device storing the service configuration information may be understood as a server of the configuration center.
[0086] In practice, the execution subject may also determine the service configuration information corresponding to the target service from the service configuration information pre-stored locally. The service configuration information pre-stored locally may be understood as the service configuration information stored in the local memory or cache during initialization.
[0087] Step 303: Determine whether to perform downgrade processing on the target service according to the degradation threshold information included in the interface call data and the service configuration information.
[0088] In some embodiments, the execution subject may determine whether to downgrade the target service based on the interface call data and the downgrade threshold information included in the service configuration information. In practice, the execution subject may determine the number of interface call data representing call failures in the interface call data as the number of failed calls. Then, in response to determining that the number of failed calls is greater than or equal to the interface call failure number threshold included in the downgrade threshold information, it may be determined that the target service is downgraded.
[0089] Optionally, the degradation threshold information may include a degradation ratio threshold. The degradation ratio threshold may be a threshold for limiting a maximum ratio of failed calls.
[0090] In some optional implementations of some embodiments, the execution subject may determine whether to downgrade the target service by following the steps below:
[0091] The first step is to determine the number of failed calls based on the above-mentioned interface call data and the preset failed call conditions. The preset failed call conditions can be interface call data that characterizes call failure. In practice, the execution subject can determine the number of each interface call data that meets the preset failed call conditions in the above-mentioned interface call data as the number of failed calls.
[0092] In the second step, in response to determining that the ratio of the number of failed calls to the number of each interface call data is greater than or equal to the downgrade ratio threshold, it is determined to downgrade the target service. Thus, it is possible to determine whether the target service needs to be downgraded from the dimension of the failed call ratio through the pre-customized downgrade ratio threshold.
[0093] Optionally, the above-mentioned degradation threshold information may include a degradation quantity threshold and a degradation ratio threshold.
[0094] In some optional implementations of some embodiments, the execution subject may determine whether to downgrade the target service by following the steps below:
[0095] The first step is to determine the number of failed calls based on the above interface call data and the preset failed call conditions. In practice, the execution entity may determine the number of interface call data that meet the preset failed call conditions in the above interface call data as the number of failed calls.
[0096] In the second step, in response to determining that the number of failed calls is greater than or equal to the downgrade number threshold, and the ratio of the number of failed calls to the number of each interface call data is greater than or equal to the downgrade ratio threshold, it is determined that the target service is to be downgraded. Thus, it is possible to determine whether the target service needs to be downgraded based on the dimensions of the failed call ratio and downgrade number thresholds by using the pre-customized downgrade ratio threshold and downgrade number threshold.
[0097] Optionally, the downgrade configuration information may also include an extended service identifier. The extended service identifier may be an identifier of a custom service, which may uniquely identify an interface method of an interface of the service. A custom service may correspond to an interface method of an interface of a target service. By using the extended service identifier, the service party may customize the calling status of the method to be monitored under the interface of the configured service. The interface call data in each of the above interface call data corresponds to an extended service identifier.
[0098] In some optional implementations of some embodiments, the execution subject may determine the number of failed calls according to the above-mentioned interface call data and preset failed call conditions through the following steps:
[0099] In the first step, each interface call data satisfying the preset failure call condition among the above-mentioned interface call data is determined as interface call failure data to obtain an interface call failure data set.
[0100] In the second step, each interface call failure data satisfying the preset extended service identification condition in the above interface call failure data set is determined as the target interface call failure data set. The above preset extended service identification condition may be that the extended service identification corresponding to the interface call failure data is the same as the extended service identification included in the above downgrade configuration information.
[0101] In the third step, the number of each target interface call failure data included in the target interface call failure data set is determined as the number of failed calls. Thus, by extending the service identifier, it is possible to support customized degradation strategies for services of different granularities from the perspective of service granularity, thereby adapting to complex and changeable business scenarios of different granularities.
[0102] Step 304: in response to determining to downgrade the target service, perform service downgrade processing on the request of the target service according to the downgrade interface information included in the service configuration information.
[0103] In some embodiments, the execution subject may, in response to determining to downgrade the target service, perform service downgrade processing on the request of the target service according to the downgrade interface information included in the service configuration information. In practice, the execution subject may determine the interface corresponding to the downgrade interface identifier included in the downgrade interface information as the interface of the target service to perform service downgrade processing on the request of the target service.
[0104] Optionally, the execution subject may publish and process the service degradation event information corresponding to the target service. The service degradation event information may be information indicating that the target service needs to be downgraded or has undergone downgrade processing. The service degradation event information may include, but is not limited to: interface identifier before the target service is downgraded, event type, downgrade time, and downgrade event result. The event type may be the type of processing of the interface of the target service. For example, the event type included in the service degradation event information may be "downgrade". The downgrade time may be the time of performing service downgrade processing on the target service. The event result may be a result indicating whether the downgrade is successful. Here, the publishing process may be a process of sending the service degradation event information to the downgrade event subscriber. The downgrade event subscriber may be a subscriber who needs to obtain the service degradation event information. Here, the subscriber may be, but is not limited to, a terminal device, a server, or the execution subject. In practice, the execution subject may store the service degradation event information in a local preset directory to publish and process the service degradation event information. The service degradation event information stored in the local preset directory may be read by other methods of the execution subject.
[0105] In practice, the execution subject may also publish and process the service degradation event information corresponding to the target service in response to receiving the degradation event result corresponding to the target service. The degradation event result may be sent by the server in response to the request of the target service.
[0106] In some optional implementations of some embodiments, the above-mentioned execution entity may send the above-mentioned service degradation event information to an alarm terminal device. Among them, the above-mentioned alarm terminal device may be a terminal device that needs to know the result of downgrading the above-mentioned target service. For example, the above-mentioned alarm terminal device may be a terminal device of a business party manager. In practice, the above-mentioned execution entity may send the above-mentioned service degradation event information to the alarm terminal device through a preset contact method. The above-mentioned preset contact method may include but is not limited to: SMS sending method, email sending method, telephone notification method, and mini-program notification method. Thus, the service degradation event information can be sent to the alarm terminal device so that the user of the alarm terminal device can know the downgrade result of the target service.
[0107] In some optional implementations of some embodiments, the above-mentioned execution entity may send the above-mentioned business degradation event information to an associated data storage terminal for visual display of each business degradation event information stored in the above-mentioned data storage terminal. The above-mentioned data storage terminal may be a server storing data that can be used for data visualization. The execution entity for visual display of each business degradation event information stored in the above-mentioned data storage terminal may be the above-mentioned execution entity or a visualization terminal device. The visualization terminal device may be a background terminal device for visualization. Thus, the business degradation event information may be sent to an associated data storage terminal for visual display.
[0108] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the service downgrade method of some embodiments of the present disclosure, from the business perspective, a custom downgrade strategy is supported, so that it can adapt to complex and changeable business scenarios. Specifically, the reason for the poor applicability in complex business scenarios is that the method of judging whether to downgrade based on a request and response can only judge whether to downgrade when calling the interface, resulting in downgrade in the actual business scenario, and when the front node of the interface is blocked, the interface will not be called, resulting in the state of the subsequent fuse cannot be maintained, and the applicability in complex business scenarios is poor. Based on this, the service downgrade method of some embodiments of the present disclosure, first, receives the data of each interface call corresponding to the target business. Thus, the received data of each interface call can represent the data of calling the interface of the target business multiple times, so as to determine whether to downgrade the target business. Then, the service configuration information corresponding to the above target business is determined. Among them, the above-mentioned service configuration information includes downgrade configuration information, and the above-mentioned downgrade configuration information includes downgrade threshold information and downgrade interface information. Thus, the determined service configuration information can characterize the relevant information configured for the target service, and the downgrade configuration information included in the service configuration information can characterize the downgrade logic related information configured for the target service. Afterwards, according to the above-mentioned interface call data and the downgrade threshold information included in the above-mentioned service configuration information, it is determined whether to downgrade the above-mentioned target service. Thus, it can be determined whether to downgrade the above-mentioned target service by calling the interface call data of the target service multiple times and the downgrade threshold information of the target service configured by the user-defined configuration. Finally, in response to determining to downgrade the above-mentioned target service, according to the downgrade interface information included in the above-mentioned service configuration information, the request of the above-mentioned target service is downgraded. Thus, when it is determined to downgrade the target service, the target service can be downgraded by the downgrade interface information of the target service configured by the user-defined configuration. Also because the received interface call data is the data of calling the interface of the target service multiple times, the method of judging whether to downgrade based on one request and response is avoided. And because the downgrade configuration information in the determined service configuration information is configured by the user-defined configuration in advance, it can be adjusted according to the change of the service scenario. As a result, from a business perspective, customized downgrade strategies can be supported to adapt to complex and changing business scenarios.
[0109] Further references Figure 4 , which shows a process 400 of another embodiment of a service degradation method. The process 400 of the service degradation method includes the following steps:
[0110] Step 401, receiving each interface call data corresponding to the target service.
[0111] Step 402: Determine the service configuration information corresponding to the target service.
[0112] Step 403: Determine whether to perform downgrade processing on the target service according to the degradation threshold information included in the interface call data and the service configuration information.
[0113] Step 404, in response to determining to downgrade the target service:
[0114] Step 4041: Perform service downgrade processing on the request of the target service according to the downgrade interface information included in the service configuration information.
[0115] In some embodiments, the specific implementation of steps 401-4041 and the technical effects brought about can be referred to Figure 3 The corresponding steps 301-304 in the embodiments are not described in detail here.
[0116] Step 4042, determine whether the retry configuration information represents a retry target service.
[0117] In some embodiments, the execution subject of the service degradation method (for example Figure 1 The server 105 shown or Figure 2 The monitoring server shown in the figure) can determine whether the retry configuration information indicates retrying the above-mentioned target business. The above-mentioned business configuration information can also include retry configuration information. The retry configuration information can be information configured for the retry logic after the business is downgraded. The retry configuration information can indicate whether the interface of the business can be retried. The retry configuration information can include a retry identifier. The retry identifier can be an identifier that indicates whether the interface of the business can be retried. For example, the retry configuration information can be "Y", indicating that the interface of the business can be retried. The retry configuration information can be "N", indicating that the interface of the business cannot be retried. The retry configuration information can also include an interface identifier. In practice, the above-mentioned execution entity can determine that the retry configuration information indicates retrying the above-mentioned target business in response to determining that the above-mentioned retry identifier is an identifier that indicates that the interface of the business can be retried. Here, the interface retry can be to re-call the interface using various request parameters of the request of the above-mentioned target business.
[0118] Step 4043 , in response to determining that the retry configuration information represents a retry target service, adding the request to a failed request queue.
[0119] In some embodiments, the execution subject may add the request to a failed request queue in response to determining that the retry configuration information indicates retrying the target service. The failed request queue may be a message queue for storing each failed request. In practice, the execution subject may add the request to the end of the failed request queue.
[0120] Step 4044, according to the failed request queue and the preset time interval, retry the interface corresponding to the request to obtain an interface retry result set.
[0121] In some embodiments, the execution subject may retry the interface corresponding to the request according to the failed request queue and the preset time interval to obtain an interface retry result set. The preset time interval may be a preset period duration for retrying the interface. For example, the preset time interval may be 1 minute. In practice, the execution subject may retry the interface corresponding to each request in the failed request queue once every preset time interval to generate a set of interface retry results for each interface corresponding to each request. Thus, a set of interface retry results for the interface corresponding to the request of the target business may be obtained. Specifically, when the retry process is successful, the identifier representing the successful retry of the interface may be determined as the interface retry result. When the retry process fails, the identifier representing the failed retry of the interface may be determined as the interface retry result. Thus, the interface retry result in the interface retry result set may represent whether the interface is successfully retried. Here, the retry process may be to use the request parameters of the request and call the interface again.
[0122] from Figure 4 It can be seen that Figure 3 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the service downgrade method in some corresponding embodiments embodies the steps of expanding the retry processing after downgrade. Therefore, the scheme described in these embodiments can retry the interface of the target service at a fixed time when the target service needs to be retried after downgrade. Thus, it is realized that from the business perspective, a customized retry strategy is supported, so that it can adapt to complex and changing business scenarios.
[0123] Further references Figure 5 , which shows a process 500 of some other embodiments of the service degradation method. The process 500 of the service degradation method includes the following steps:
[0124] Step 501, receiving each interface call data corresponding to the target service.
[0125] Step 502: Determine the service configuration information corresponding to the target service.
[0126] Step 503: Determine whether to perform downgrade processing on the target service according to the degradation threshold information included in the interface call data and the service configuration information.
[0127] Step 504, in response to determining to downgrade the target service:
[0128] Step 5041: Perform service downgrade processing on the request of the target service according to the downgrade interface information included in the service configuration information.
[0129] Step 5042, determine whether the retry configuration information represents a retry target service.
[0130] Step 5043: In response to determining that the retry configuration information indicates that the target service is to be retried, add the request to a failed request queue.
[0131] Step 5044: retry the interface corresponding to the request according to the failed request queue and the preset time interval to obtain an interface retry result set.
[0132] In some embodiments, the specific implementation of steps 501-5045 and the technical effects brought about can be referred to Figure 4 The corresponding steps 401-4044 in the embodiments are not described in detail here.
[0133] Step 5045: Determine whether to perform recovery processing on the target service according to the interface retry result set and the recovery threshold information.
[0134] In some embodiments, the execution subject of the service degradation method (for example Figure 1 The server 105 shown or Figure 2 The monitoring service end shown in the figure) can determine whether to perform recovery processing on the target service according to the above-mentioned interface retry result set and the above-mentioned recovery threshold information. The above-mentioned service configuration information can also include recovery configuration information. The above-mentioned recovery configuration information can be information configured for recovery processing after service downgrade. The above-mentioned recovery configuration information includes recovery threshold information and recovery interface information. The recovery threshold information can be threshold-related information used to determine whether to perform recovery processing on the downgraded service. The recovery threshold information can include a threshold for the number of successful interface retries. The threshold for the number of successful interface retries can be a threshold for limiting the minimum number of successful retries of the interface of the above-mentioned target service. The recovery interface information can be information related to the interface after recovery. The recovery interface information can include a recovery interface identifier. The recovery interface identifier can be an identifier of the interface after the target service is recovered. In practice, the above-mentioned execution subject can determine the number of each interface retry result that represents the successful interface retry in the above-mentioned interface retry result set as the number of successful interface retries. Then, in response to determining that the number of successful interface retries is greater than or equal to the threshold for successful interface retries, it can be determined that the target service is to be recovered.
[0135] Optionally, the above-mentioned recovery threshold information may include a recovery ratio threshold. The above-mentioned recovery ratio threshold may be a threshold used to define a minimum ratio of successful retries.
[0136] In some optional implementations of some embodiments, the execution subject may determine whether to perform recovery processing on the target service through the following steps:
[0137] In the first step, the number of interface retry results included in the above interface retry result set indicating successful interface retry is determined as the number of successful retries.
[0138] In the second step, in response to determining that the ratio of the number of successful retries to the number of retry results of each interface included in the interface retry result set is greater than or equal to the recovery ratio threshold, it is determined to restore the target business. Thus, it is possible to determine whether the target business needs to be restored from the dimension of the successful retry ratio through the recovery ratio threshold configured in advance.
[0139] Optionally, the above-mentioned restoration threshold information may include a restoration ratio threshold and a restoration quantity threshold.
[0140] In some optional implementations of some embodiments, the execution subject may determine whether to perform recovery processing on the target service through the following steps:
[0141] In the first step, the number of interface retry results included in the above interface retry result set indicating successful interface retry is determined as the number of successful retries.
[0142] In the second step, in response to determining that the number of successful retries is greater than or equal to the recovery number threshold, and the ratio of the number of successful retries to the number of each interface retry result included in the interface retry result set is greater than or equal to the recovery ratio threshold, it is determined that the target business needs to be restored. Thus, it is possible to determine whether the target business needs to be restored from the dimensions of the successful call ratio and the successful number threshold by using the recovery ratio threshold and the recovery number threshold that are pre-customized.
[0143] Step 5046, in response to determining to perform recovery processing on the target service, perform service recovery processing on the target service according to the recovery interface information.
[0144] In some embodiments, the execution subject may perform service recovery processing on the target service according to the recovery interface information in response to determining to perform service recovery processing on the target service. In practice, the execution subject may determine the interface corresponding to the recovery interface identifier included in the recovery interface information as the interface of the target service to perform service recovery processing on the target service.
[0145] Step 5047: In response to determining that the retry configuration information indicates that the target service is not to be retried, a service recovery process is performed on the target service according to the recovery interface information.
[0146] In some embodiments, the execution subject may perform service recovery processing on the target service according to the recovery interface information in response to determining that the retry configuration information indicates not to retry the target service. Here, the specific implementation of service recovery processing on the target service may refer to step 5046.
[0147] It should be noted that step 5044 and step 5045 can be executed in parallel.
[0148] from Figure 5 It can be seen that Figure 4 Compared with the description of some corresponding embodiments, Figure 5 The process 500 of the service downgrade method in some corresponding embodiments embodies the steps of expanding the recovery process after downgrade. Therefore, the schemes described in these embodiments can restore the target service when the target service meets the recovery conditions after downgrade. This realizes supporting customized recovery strategies from the business perspective, so as to adapt to complex and changing business scenarios.
[0149] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a service degradation device, and these device embodiments are Figure 3 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0150] like Figure 6 As shown, the service degradation apparatus 600 of some embodiments includes: a receiving unit 601, a first determining unit 602, a second determining unit 603 and a degradation unit 604. The receiving unit 601 is configured to receive various interface call data corresponding to the target service; the first determining unit 602 is configured to determine the service configuration information corresponding to the target service, wherein the service configuration information includes degradation configuration information, and the degradation configuration information includes degradation threshold information and degradation interface information; the second determining unit 603 is configured to determine whether to perform degradation processing on the target service according to the various interface call data and the degradation threshold information included in the service configuration information; the degradation unit 604 is configured to perform service degradation processing on the request of the target service according to the degradation interface information included in the service configuration information in response to determining to perform degradation processing on the target service.
[0151] Optionally, the second determination unit 603 can be further configured to: determine the number of failed calls based on the above-mentioned interface call data and preset failure call conditions; in response to determining that the ratio of the above-mentioned number of failed calls to the number of the above-mentioned interface call data is greater than or equal to the above-mentioned downgrade ratio threshold, determine to downgrade the above-mentioned target business.
[0152] Optionally, the above-mentioned downgrade threshold information includes a downgrade quantity threshold and a downgrade ratio threshold.
[0153] Optionally, the second determination unit 603 can be further configured to: determine the number of failed calls based on the above-mentioned interface call data and preset failure call conditions; in response to determining that the above-mentioned number of failed calls is greater than or equal to the above-mentioned downgrade number threshold, and the ratio of the above-mentioned number of failed calls to the number of the above-mentioned interface call data is greater than or equal to the above-mentioned downgrade ratio threshold, determine to downgrade the above-mentioned target business.
[0154] Optionally, the receiving unit 601 may be further configured to: receive each interface call data corresponding to the above target service within a preset period time period.
[0155] Optionally, the above service configuration information also includes retry configuration information.
[0156] Optionally, the service degradation device 600 may further include: a retry determination unit, an adding unit and a retry unit (not shown in the figure). The retry determination unit is configured to determine whether the above-mentioned retry configuration information represents retrying the above-mentioned target service. The adding unit is configured to add the above-mentioned request to the failed request queue in response to determining that the above-mentioned retry configuration information represents retrying the above-mentioned target service. The retry unit is configured to retry the interface corresponding to the above-mentioned request according to the above-mentioned failed request queue and a preset time interval, and obtain an interface retry result set, wherein the interface retry result in the above-mentioned interface retry result set represents whether the above-mentioned interface is successfully retried.
[0157] Optionally, the service configuration information further includes recovery configuration information, and the recovery configuration information includes recovery threshold information and recovery interface information.
[0158] Optionally, the service degradation device 600 may further include: a recovery determination unit and a first recovery unit (not shown in the figure). The recovery determination unit is configured to determine whether to perform recovery processing on the target service according to the interface retry result set and the recovery threshold information. The first recovery unit is configured to perform service recovery processing on the target service according to the recovery interface information in response to determining to perform recovery processing on the target service.
[0159] Optionally, the service configuration information further includes recovery configuration information, and the recovery configuration information includes recovery threshold information and recovery interface information.
[0160] Optionally, the service degradation device 600 may further include: a second recovery unit (not shown in the figure), configured to, in response to determining that the retry configuration information indicates not to retry the target service, perform service recovery processing on the target service according to the recovery interface information.
[0161] Optionally, the above-mentioned recovery threshold information includes a recovery ratio threshold.
[0162] Optionally, the recovery determination unit can be further configured to: determine the number of interface retry results characterizing the success of the interface retry included in the above-mentioned interface retry result set as the number of successful retries; in response to determining that the ratio of the above-mentioned number of successful retries to the number of each interface retry results included in the above-mentioned interface retry result set is greater than or equal to the above-mentioned recovery ratio threshold, determine to perform recovery processing on the above-mentioned target service.
[0163] Optionally, the above-mentioned restoration threshold information includes a restoration ratio threshold and a restoration quantity threshold.
[0164] Optionally, the recovery determination unit can be further configured to: determine the number of interface retry results characterizing the success of the interface retry included in the above-mentioned interface retry result set as the number of successful retries; in response to determining that the above-mentioned successful retries number is greater than or equal to the above-mentioned recovery number threshold, and the ratio of the above-mentioned successful retries number to the number of each interface retry results included in the above-mentioned interface retry result set is greater than or equal to the above-mentioned recovery ratio threshold, determine to perform recovery processing on the above-mentioned target business.
[0165] Optionally, the above-mentioned downgrade configuration information also includes an extended service identifier, and the interface call data in the above-mentioned each interface call data corresponds to the extended service identifier.
[0166] Optionally, the second determination unit 603 may include: a first data determination unit, a second data determination unit and a failed call number determination unit (not shown in the figure). The first data determination unit is configured to determine each interface call data that satisfies the above-mentioned preset failed call condition in the above-mentioned interface call data as interface call failure data, and obtain an interface call failure data set. The second data determination unit is configured to determine each interface call failure data that satisfies a preset extended service identification condition in the above-mentioned interface call failure data set as a target interface call failure data set, wherein the above-mentioned preset extended service identification condition is that the extended service identification corresponding to the interface call failure data is the same as the extended service identification included in the above-mentioned downgrade configuration information. The failed call number determination unit is configured to determine the number of each target interface call failure data included in the above-mentioned target interface call failure data set as the failed call number.
[0167] Optionally, the service degradation apparatus 600 may further include: a publishing unit (not shown in the figure), configured to publish the service degradation event information corresponding to the target service.
[0168] Optionally, the issuing unit may be further configured to: send the service degradation event information to an alarm terminal device.
[0169] Optionally, the publishing unit may be further configured to: send the service degradation event information to an associated data storage end, so as to provide a visual display of each service degradation event information stored in the data storage end.
[0170] It is understood that the units described in the device 600 are similar to those described in the reference Figure 3 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0171] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 The server 105 shown or Figure 2 A structural diagram of the monitoring server) 700 is shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0172] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0173] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0174] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0175] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0176] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0177] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives the interface call data corresponding to the target service; determines the service configuration information corresponding to the target service, wherein the service configuration information includes downgrade configuration information, and the downgrade configuration information includes downgrade threshold information and downgrade interface information; determines whether to downgrade the target service according to the interface call data and the downgrade threshold information included in the service configuration information; in response to determining to downgrade the target service, performs service downgrade processing on the request of the target service according to the downgrade interface information included in the service configuration information.
[0178] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0179] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0180] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The units described may also be provided in a processor, for example, may be described as: a processor including a receiving unit, a first determining unit, a second determining unit, and a degradation unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the receiving unit may also be described as a "unit for receiving each interface call data corresponding to the target service".
[0181] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0182] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned service degradation methods when executed by a processor.
[0183] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A service downgrading method, comprising: Receive each interface call data corresponding to the target business; Determine service configuration information corresponding to the target service, wherein the service configuration information includes degradation configuration information, and the degradation configuration information includes degradation threshold information and degradation interface information; Determining whether to perform downgrade processing on the target service according to the interface call data and the downgrade threshold information included in the service configuration information; In response to determining to perform downgrade processing on the target service, the interface corresponding to the downgraded interface identifier included in the downgraded interface information is determined as the interface of the target service, so as to perform service downgrade processing on the request of the target service.
2. The method according to claim 1, wherein: The degradation threshold information includes a degradation ratio threshold; and The determining whether to downgrade the target service includes: Determine the number of failed calls according to the interface call data and preset failed call conditions; In response to determining that the ratio of the number of failed calls to the number of each interface call data is greater than or equal to the degradation ratio threshold, it is determined to perform degradation processing on the target service.
3. The method according to claim 1, wherein: The downgrade threshold information includes a downgrade quantity threshold and a downgrade ratio threshold; as well as The determining whether to downgrade the target service includes: Determine the number of failed calls according to the interface call data and preset failed call conditions; In response to determining that the number of failed calls is greater than or equal to the downgrade number threshold, and the ratio of the number of failed calls to the number of each interface call data is greater than or equal to the downgrade ratio threshold, it is determined to downgrade the target service.
4. The method according to claim 1, wherein: The receiving of each interface call data corresponding to the target service includes: Receive each interface call data corresponding to the target service within a preset period time period.
5. The method according to claim 1, wherein: The service configuration information also includes retry configuration information; as well as After performing service downgrade processing on the request for the target service, the method further includes: Determining whether the retry configuration information indicates retrying the target service; In response to determining that the retry configuration information indicates retrying the target service, adding the request to a failed request queue; According to the failed request queue and the preset time interval, the interface corresponding to the request is retried to obtain an interface retry result set, wherein the interface retry result in the interface retry result set indicates whether the interface is retried successfully.
6. The method according to claim 5, wherein: The service configuration information also includes recovery configuration information, and the recovery configuration information includes recovery threshold information and recovery interface information; as well as The method further comprises: Determining whether to perform recovery processing on the target service according to the interface retry result set and the recovery threshold information; In response to determining to perform recovery processing on the target service, a service recovery processing is performed on the target service according to the recovery interface information.
7. The method according to claim 5, wherein: The service configuration information also includes recovery configuration information, and the recovery configuration information includes recovery threshold information and recovery interface information; as well as The method further comprises: In response to determining that the retry configuration information indicates that the target service is not to be retried, service recovery processing is performed on the target service according to the recovery interface information.
8. The method according to claim 6, wherein: The restoration threshold information includes a restoration ratio threshold; and The determining whether to perform recovery processing on the target service according to the interface retry result set and the recovery threshold information includes: Determine the number of interface retry results that indicate successful interface retries and are included in the interface retry result set as the number of successful retries; In response to determining that the ratio of the number of successful retries to the number of each interface retry result included in the interface retry result set is greater than or equal to the recovery ratio threshold, it is determined to perform recovery processing on the target service.
9. The method according to claim 6, wherein: The restoration threshold information includes a restoration ratio threshold and a restoration quantity threshold; as well as The determining whether to perform recovery processing on the target service according to the interface retry result set and the recovery threshold information includes: Determine the number of interface retry results that indicate successful interface retries and are included in the interface retry result set as the number of successful retries; In response to determining that the number of successful retries is greater than or equal to the recovery number threshold, and the ratio of the number of successful retries to the number of each interface retry result included in the interface retry result set is greater than or equal to the recovery ratio threshold, it is determined to restore the target service.
10. The method according to any one of claims 2-3, wherein: The downgrade configuration information also includes an extended service identifier, and the interface call data in each of the interface call data corresponds to the extended service identifier; as well as The determining the number of failed calls according to the respective interface call data and the preset failed call conditions includes: Determine each interface call data satisfying the preset failed call condition among the each interface call data as interface call failed data, and obtain an interface call failed data set; Determine each interface call failure data satisfying a preset extended service identification condition in the interface call failure data set as a target interface call failure data set, wherein the preset extended service identification condition is that the extended service identification corresponding to the interface call failure data is the same as the extended service identification included in the downgrade configuration information; The number of each target interface call failure data included in the target interface call failure data set is determined as the number of failed calls.
11. The method according to any one of claims 1 to 9, wherein: The method further comprises: The service degradation event information corresponding to the target service is published and processed.
12. The method according to claim 11, wherein: The publishing and processing of the service degradation event information corresponding to the target service includes: The service degradation event information is sent to the alarm terminal device.
13. The method according to claim 11, wherein: The publishing and processing of the service degradation event information corresponding to the target service includes: The service degradation event information is sent to an associated data storage end, so as to provide a visual display of each service degradation event information stored in the data storage end.
14. A service degradation device, comprising: A receiving unit, configured to receive each interface call data corresponding to the target service; A first determining unit is configured to determine service configuration information corresponding to the target service, wherein the service configuration information includes degradation configuration information, and the degradation configuration information includes degradation threshold information and degradation interface information; A second determining unit is configured to determine whether to perform downgrade processing on the target service according to the respective interface call data and the downgrade threshold information included in the service configuration information; The downgrading unit is configured to, in response to determining to downgrade the target service, determine the interface corresponding to the downgraded interface identifier included in the downgraded interface information as the interface of the target service, so as to downgrade the request of the target service.
15. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 13.
16. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
17. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Method and apparatus for service degradation processing
CN114584480A